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]

Reply via email to