you populate all components inside the listview yourself, so just
attach one to the td

-igor

On Mon, Sep 29, 2008 at 9:23 AM, radovan <[EMAIL PROTECTED]> wrote:
>
>
>
> Thies Edeling wrote:
>>
>> radovan wrote:
>>> Hallo community, my code looks like this:
>>>
>>>         listView = new ListView<MyItem>("collectionIterator",
>>>                 listOfMyItems) {
>>>
>>>             @Override
>>>             protected void populateItem(ListItem<MyItem> item) {
>>>                 MyItem myItem = (MyItem) item.getDefaultModelObject();
>>>                 String name = myItem.getName();
>>>              String value = myItem.getValue();
>>>                 item.add(new Label("name", name));
>>>                 item.add(new Label("value", value));
>>>             }
>>>         };
>>>
>>>              <table>
>>>                      <tr><th>Name</th><th>Value</th</tr>
>>>                      <tr wicket:id="collectionIterator">
>>>                              <td></td>
>>>                              <td></td>
>>>                      </tr>
>>>              </table>
>>>
>>> and I need to change css class for <td> element in table.
>>>
>>> If I add this:
>>>
>>>         item.add(new AttributeAppender("class", new
>>> Model<String>("newCssClass)," "));
>>>
>>> It adds this css class for all <td> tags. By oter words for whole row.
>>> But I
>>> need modify only some <td>, only some column. Could you give me some
>>> advice?
>>> Thanks a lot
>> use an if statement to only add the attribute to that specific td?
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>
>
> ok, but listItem is for whole row (for <tr>), how I get td from listItem?
> --
> View this message in context: 
> http://www.nabble.com/ListView---modify-css-for-some-column-tp19726888p19727084.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