Hi,
I'm playing with custom views in Magritte. I have a model
and overwrote descriptionContainer with my own instance of
MAComponentRenderer.
What I'm trying to achieve is to display a text input the
following:
<label for="anyid">labeltext</label>
<input type="text" id="anyid"..../>
As a quick test I changed the renderLabel: to
renderLabel: aDescription
aDescription hasLabel
ifTrue: [ html
label attributeAt: 'for' put: aDescription hash;
with: [ html render: aDescription label ] ]
I need an id attribute in the <input> tag which has the
same content as the for attribute in the <label> tag.
I don't have a glue how to insert an id attribute to the
renderControl:. Is there a way to add an attribute if I only
have a component. I doubt the component description is the
right place to put.
If I only want to change the behaviour of the text input field,
is it best to overwrite the visitStringDescription?
thanks in advance,
Norbert