Re: Possible to modify a decedent html tag attr of a component without the tag being a child component?

2008-03-30 Thread Igor Vaynberg
well, if you dont want img to be a child component use a label to output the entire markup, and change that based on whether or not the link is enabled. -igor On Sun, Mar 30, 2008 at 3:18 PM, Maurice Marrink <[EMAIL PROTECTED]> wrote: > Yeah but still even if he has the link and overwrites oncom

Re: Possible to modify a decedent html tag attr of a component without the tag being a child component?

2008-03-30 Thread Maurice Marrink
Yeah but still even if he has the link and overwrites oncomponenttag on that component, he has to get the content of the link tag (everything between and ) and be able to manipulate it. As far as i know this is not possible from within wicket. The most likely candidate getXmlTag() is private and e

Re: Possible to modify a decedent html tag attr of a component without the tag being a child component?

2008-03-30 Thread Igor Vaynberg
well, you have to have the reference to that link somehow to know if its enabled or disabled.. -igor On Sun, Mar 30, 2008 at 11:44 AM, Matthew Young <[EMAIL PROTECTED]> wrote: > I forgot to mention: the link is created by other people's code. I can't > change the template: I can't put wicket:i

Re: Possible to modify a decedent html tag attr of a component without the tag being a child component?

2008-03-30 Thread Matthew Young
I forgot to mention: the link is created by other people's code. I can't change the template: I can't put wicket:id in the tag. >new image(...) { > oncomponenttag(tag) { > if (link.isenabled()==false) { tag.put("class","foo"); } So how would this work? new Image("there-is-not-wicket-id-to-

Re: Possible to modify a decedent html tag attr of a component without the tag being a child component?

2008-03-30 Thread Igor Vaynberg
new image(...) { oncomponenttag(tag) { if (link.isenabled()==false) { tag.put("class","foo"); } } } -igor On Sun, Mar 30, 2008 at 11:27 AM, Matthew Young <[EMAIL PROTECTED]> wrote: > I have a link like this: > > > > When link.isEnable() == false, I need to add style attribute to the

Possible to modify a decedent html tag attr of a component without the tag being a child component?

2008-03-30 Thread Matthew Young
I have a link like this: When link.isEnable() == false, I need to add style attribute to the tag. Is it possible to do this without turning the into a child component of the link?