Use a ListView to iterate over the attributes, in the onPopulate you
then add your textfield.
If you also want to have the option to make for example a dropdown you
should create a panel for each attribute type and add those instead of
the textfield.

If your textfields require the fixed id of SIZE, COLOR or whatever you
should override getMarkupId and return the id there. then use
setOutputMarkupId to let wicket render the id attribute for the html
elements.


Maurice

On Mon, May 5, 2008 at 12:47 PM, Mathias P.W Nilsson
<[EMAIL PROTECTED]> wrote:
>
>  I have tried solving this checking out Wicket in Action and some googling but
>  can not find where to look.
>
>  All components need an id. And the same in markup. My problem is the
>  following.
>
>  I need to add attributes to an item. example size, color.
>
>  What kind of attributes that is possible is determined by the items
>  subCategory. So the sub category will have some Attribute headers like size,
>  color etc.
>
>  When adding, editing the attribute I need to get all attribute headers for
>  the item subcategory and add them like textfields.
>
>
>  Ex
>
>  Attribute1
>
>  SIZE, COLOR, LENGTH
>  TEXTFIELDSIZE, TEXTFIELDCOLOR, TEXTFIELDLENGTH // Containing data
>  TEXTFIELDSIZE, TEXTFIELDCOLOR, TEXTFIELDLENGTH // for adding new rows
>  TEXTFIELDSIZE, TEXTFIELDCOLOR, TEXTFIELDLENGTH
>  TEXTFIELDSIZE, TEXTFIELDCOLOR, TEXTFIELDLENGTH
>
>  Hope you know what I mean here. My question is. How to add the dynamic text
>  fields.
>
>  --
>  View this message in context: 
> http://www.nabble.com/Markup-with-unknown-name-for-TextField-tp17058594p17058594.html
>  Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to