Thank you, that worked.
-----Original Message-----
From: Igor Vaynberg [mailto:[email protected]]
Sent: Monday, November 23, 2009 7:03 PM
To: [email protected]
Subject: Re: Adding markup to ListView containing tag?
<div id="triage-items">
<div id="triage-1" wicket:id="listview">fancy markup here</div>
</div>
class mypage extends webpage implements iheadercontributor {
public mypage() {
add(new listview("listview,...) {
protected item newitem(string id, int idx) {
return new item(id, idx) {
protected oncomponenttag(tag) { tag.put("class","fancyitem"); }
};
});
}
renderhead(resp) {
resp.renderondomreadyjavascript("$(".fancyitem.whatever_jquery_thing_you_want");
}
}
-igor
On Mon, Nov 23, 2009 at 2:41 PM, Loritsch, Berin C.
<[email protected]> wrote:
> What I would like is to be able to have markup like this:
>
> <div id="triage-items">
> <div id="triage-1">fancy markup here</div>
> <div id="triage-2">fancy markup here</div>
> </div>
>
> Along with this, to provide javascript effects on hover/focus for the
> individual items in the list. The problem is that I can't do this with
> Wicket easily. I basically get markup like this:
>
> <div>fancy markup here</div>
> <div>fancy markup here</div>
>
> I attempted to create a panel with a panel with the ListView to do what
> I wanted, but it ended up looking like this:
>
> <div><div>fancy markup here</div></div>
> <div><div>fancy markup here</div></div>
>
> Which is no-where near what I want. I'm trying to work with the "Wicket
> in Action" book and the short section on repeating lists doesn't provide
> enough to help me get it working. All my attempts at writing the "id"
> attribute using the examples in the book don't work (no ID is ever
> created).
>
> Can anyone help my sanity? While I do care about the markup, it's less
> important than the end target of adding the AJAX effects to the items in
> the list.
>
> ---------------------------------------------------------------------
> 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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]