You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by "Brown, Berlin [GCG-PFS]" <Be...@Primerica.com> on 2011/09/01 19:57:10 UTC

On Label/Div or some other component, how to use setMarkupId and dynamic id

Is there a way to prefix a component with using setMarkupid but also
have the dynamic id.
 
I want my end output to have:
 
With Code:
 
x = new WebMarkupContainer("myId")
x.setMarkupId("myId");
 
<div id="myId_id2323" />

Re: On Label/Div or some other component, how to use setMarkupId and dynamic id

Posted by Robert Dahlström <ro...@ongame.com>.
If all you need is to scrape for them just give them a specific class. 
No need to use custom attributes.

Regards
Robert

On 09/01/2011 10:38 PM, Brown, Berlin [GCG-PFS] wrote:
> Well setMarkId is already there.
> And I have seen it done before, I think with the render Header?
>
> I think I got what I needed.
>
> -----Original Message-----
> From: jcgarciam [mailto:jcgarciam@gmail.com]
> Sent: Thursday, September 01, 2011 4:34 PM
> To: users@wicket.apache.org
> Subject: Re: On Label/Div or some other component, how to use
> setMarkupId and dynamic id
>
> I meant "some specific custom attribute".
>
> On Thu, Sep 1, 2011 at 5:33 PM, Juan Carlos Garcia
> <jc...@gmail.com>wrote:
>
>> Why not adding a behavior that output some specific custom tag using
>> the "onComponentTag" method? Will that work for you?
>>
>>
>>
>> On Thu, Sep 1, 2011 at 4:54 PM, Brown, Berlin [GCG-PFS] [via Apache
>> Wicket]<ml...@n4.nabble.com>  wrote:
>>
>>> Strange but I may scrape the page and search for those particular
>>> elements.  I want the prefix but I also want to keep uniqueness.
>>>
>>>
>>>
>>> -----Original Message-----
>>> From: Igor Vaynberg [mailto:[hidden
>>> email]<http://user/SendEmail.jtp?type=node&node=3784600&i=0>]
>>>
>>> Sent: Thursday, September 01, 2011 2:19 PM
>>> To: [hidden email]
>>> <http://user/SendEmail.jtp?type=node&node=3784600&i=1>
>>> Subject: Re: On Label/Div or some other component, how to use
>>> setMarkupId and dynamic id
>>>
>>> i guess the question would be: why?
>>>
>>> -igor
>>>
>>> On Thu, Sep 1, 2011 at 10:57 AM, Brown, Berlin [GCG-PFS]<[hidden
>>> email]<http://user/SendEmail.jtp?type=node&node=3784600&i=2>>
>>> wrote:
>>>
>>>> Is there a way to prefix a component with using setMarkupid but
>>>> also have the dynamic id.
>>>>
>>>> I want my end output to have:
>>>>
>>>> With Code:
>>>>
>>>> x = new WebMarkupContainer("myId")
>>>> x.setMarkupId("myId");
>>>>
>>>> <div id="myId_id2323" />
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [hidden
>>> email]<http://user/SendEmail.jtp?type=node&node=3784600&i=3>
>>> For additional commands, e-mail: [hidden
>>> email]<http://user/SendEmail.jtp?type=node&node=3784600&i=4>
>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [hidden
>>> email]<http://user/SendEmail.jtp?type=node&node=3784600&i=5>
>>> For additional commands, e-mail: [hidden
>>> email]<http://user/SendEmail.jtp?type=node&node=3784600&i=6>
>>>
>>>
>>>
>>> ------------------------------
>>>   If you reply to this email, your message will be added to the
>>> discussion
>>> below:
>>>
>>> http://apache-wicket.1842946.n4.nabble.com/On-Label-Div-or-some-other
>>> -component-how-to-use-setMarkupId-and-dynamic-id-tp3784344p3784600.ht
>>> ml  To start a new topic under Apache Wicket, email
>>> ml-node+1842946-398011874-65838@n4.nabble.com
>>> To unsubscribe from Apache Wicket, click
> here<http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp
> ?macro=unsubscribe_by_code&node=1842946&code=amNnYXJjaWFtQGdtYWlsLmNvbXw
> xODQyOTQ2fDEyNTYxMzc3ODY=>.
>>>
>>>
>>
>>
>>
>> --
>>
>> JC
>>
>>
>>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


RE: On Label/Div or some other component, how to use setMarkupId and dynamic id

Posted by "Brown, Berlin [GCG-PFS]" <Be...@Primerica.com>.
Well setMarkId is already there.
And I have seen it done before, I think with the render Header?

I think I got what I needed. 

-----Original Message-----
From: jcgarciam [mailto:jcgarciam@gmail.com] 
Sent: Thursday, September 01, 2011 4:34 PM
To: users@wicket.apache.org
Subject: Re: On Label/Div or some other component, how to use
setMarkupId and dynamic id

I meant "some specific custom attribute".

On Thu, Sep 1, 2011 at 5:33 PM, Juan Carlos Garcia
<jc...@gmail.com>wrote:

> Why not adding a behavior that output some specific custom tag using 
> the "onComponentTag" method? Will that work for you?
>
>
>
> On Thu, Sep 1, 2011 at 4:54 PM, Brown, Berlin [GCG-PFS] [via Apache 
> Wicket] <ml...@n4.nabble.com> wrote:
>
>> Strange but I may scrape the page and search for those particular 
>> elements.  I want the prefix but I also want to keep uniqueness.
>>
>>
>>
>> -----Original Message-----
>> From: Igor Vaynberg [mailto:[hidden 
>> email]<http://user/SendEmail.jtp?type=node&node=3784600&i=0>]
>>
>> Sent: Thursday, September 01, 2011 2:19 PM
>> To: [hidden email] 
>> <http://user/SendEmail.jtp?type=node&node=3784600&i=1>
>> Subject: Re: On Label/Div or some other component, how to use 
>> setMarkupId and dynamic id
>>
>> i guess the question would be: why?
>>
>> -igor
>>
>> On Thu, Sep 1, 2011 at 10:57 AM, Brown, Berlin [GCG-PFS] <[hidden 
>> email] <http://user/SendEmail.jtp?type=node&node=3784600&i=2>>
>> wrote:
>>
>> > Is there a way to prefix a component with using setMarkupid but 
>> > also have the dynamic id.
>> >
>> > I want my end output to have:
>> >
>> > With Code:
>> >
>> > x = new WebMarkupContainer("myId")
>> > x.setMarkupId("myId");
>> >
>> > <div id="myId_id2323" />
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden 
>> email]<http://user/SendEmail.jtp?type=node&node=3784600&i=3>
>> For additional commands, e-mail: [hidden 
>> email]<http://user/SendEmail.jtp?type=node&node=3784600&i=4>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden 
>> email]<http://user/SendEmail.jtp?type=node&node=3784600&i=5>
>> For additional commands, e-mail: [hidden 
>> email]<http://user/SendEmail.jtp?type=node&node=3784600&i=6>
>>
>>
>>
>> ------------------------------
>>  If you reply to this email, your message will be added to the 
>> discussion
>> below:
>>
>> http://apache-wicket.1842946.n4.nabble.com/On-Label-Div-or-some-other
>> -component-how-to-use-setMarkupId-and-dynamic-id-tp3784344p3784600.ht
>> ml  To start a new topic under Apache Wicket, email
>> ml-node+1842946-398011874-65838@n4.nabble.com
>> To unsubscribe from Apache Wicket, click
here<http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp
?macro=unsubscribe_by_code&node=1842946&code=amNnYXJjaWFtQGdtYWlsLmNvbXw
xODQyOTQ2fDEyNTYxMzc3ODY=>.
>>
>>
>
>
>
> --
>
> JC
>
>
>


-- 

JC


--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/On-Label-Div-or-some-other-co
mponent-how-to-use-setMarkupId-and-dynamic-id-tp3784344p3784704.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: On Label/Div or some other component, how to use setMarkupId and dynamic id

Posted by jcgarciam <jc...@gmail.com>.
I meant "some specific custom attribute".

On Thu, Sep 1, 2011 at 5:33 PM, Juan Carlos Garcia <jc...@gmail.com>wrote:

> Why not adding a behavior that output some specific custom tag using the
> "onComponentTag" method? Will that work for you?
>
>
>
> On Thu, Sep 1, 2011 at 4:54 PM, Brown, Berlin [GCG-PFS] [via Apache Wicket]
> <ml...@n4.nabble.com> wrote:
>
>> Strange but I may scrape the page and search for those particular
>> elements.  I want the prefix but I also want to keep uniqueness.
>>
>>
>>
>> -----Original Message-----
>> From: Igor Vaynberg [mailto:[hidden email]<http://user/SendEmail.jtp?type=node&node=3784600&i=0>]
>>
>> Sent: Thursday, September 01, 2011 2:19 PM
>> To: [hidden email] <http://user/SendEmail.jtp?type=node&node=3784600&i=1>
>> Subject: Re: On Label/Div or some other component, how to use
>> setMarkupId and dynamic id
>>
>> i guess the question would be: why?
>>
>> -igor
>>
>> On Thu, Sep 1, 2011 at 10:57 AM, Brown, Berlin [GCG-PFS]
>> <[hidden email] <http://user/SendEmail.jtp?type=node&node=3784600&i=2>>
>> wrote:
>>
>> > Is there a way to prefix a component with using setMarkupid but also
>> > have the dynamic id.
>> >
>> > I want my end output to have:
>> >
>> > With Code:
>> >
>> > x = new WebMarkupContainer("myId")
>> > x.setMarkupId("myId");
>> >
>> > <div id="myId_id2323" />
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]<http://user/SendEmail.jtp?type=node&node=3784600&i=3>
>> For additional commands, e-mail: [hidden email]<http://user/SendEmail.jtp?type=node&node=3784600&i=4>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]<http://user/SendEmail.jtp?type=node&node=3784600&i=5>
>> For additional commands, e-mail: [hidden email]<http://user/SendEmail.jtp?type=node&node=3784600&i=6>
>>
>>
>>
>> ------------------------------
>>  If you reply to this email, your message will be added to the discussion
>> below:
>>
>> http://apache-wicket.1842946.n4.nabble.com/On-Label-Div-or-some-other-component-how-to-use-setMarkupId-and-dynamic-id-tp3784344p3784600.html
>>  To start a new topic under Apache Wicket, email
>> ml-node+1842946-398011874-65838@n4.nabble.com
>> To unsubscribe from Apache Wicket, click here<http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=1842946&code=amNnYXJjaWFtQGdtYWlsLmNvbXwxODQyOTQ2fDEyNTYxMzc3ODY=>.
>>
>>
>
>
>
> --
>
> JC
>
>
>


-- 

JC


--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/On-Label-Div-or-some-other-component-how-to-use-setMarkupId-and-dynamic-id-tp3784344p3784704.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: On Label/Div or some other component, how to use setMarkupId and dynamic id

Posted by jcgarciam <jc...@gmail.com>.
Why not adding a behavior that output some specific custom tag using the
"onComponentTag" method? Will that work for you?



On Thu, Sep 1, 2011 at 4:54 PM, Brown, Berlin [GCG-PFS] [via Apache Wicket]
<ml...@n4.nabble.com> wrote:

> Strange but I may scrape the page and search for those particular
> elements.  I want the prefix but I also want to keep uniqueness.
>
>
>
> -----Original Message-----
> From: Igor Vaynberg [mailto:[hidden email]<http://user/SendEmail.jtp?type=node&node=3784600&i=0>]
>
> Sent: Thursday, September 01, 2011 2:19 PM
> To: [hidden email] <http://user/SendEmail.jtp?type=node&node=3784600&i=1>
> Subject: Re: On Label/Div or some other component, how to use
> setMarkupId and dynamic id
>
> i guess the question would be: why?
>
> -igor
>
> On Thu, Sep 1, 2011 at 10:57 AM, Brown, Berlin [GCG-PFS]
> <[hidden email] <http://user/SendEmail.jtp?type=node&node=3784600&i=2>>
> wrote:
>
> > Is there a way to prefix a component with using setMarkupid but also
> > have the dynamic id.
> >
> > I want my end output to have:
> >
> > With Code:
> >
> > x = new WebMarkupContainer("myId")
> > x.setMarkupId("myId");
> >
> > <div id="myId_id2323" />
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]<http://user/SendEmail.jtp?type=node&node=3784600&i=3>
> For additional commands, e-mail: [hidden email]<http://user/SendEmail.jtp?type=node&node=3784600&i=4>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]<http://user/SendEmail.jtp?type=node&node=3784600&i=5>
> For additional commands, e-mail: [hidden email]<http://user/SendEmail.jtp?type=node&node=3784600&i=6>
>
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://apache-wicket.1842946.n4.nabble.com/On-Label-Div-or-some-other-component-how-to-use-setMarkupId-and-dynamic-id-tp3784344p3784600.html
>  To start a new topic under Apache Wicket, email
> ml-node+1842946-398011874-65838@n4.nabble.com
> To unsubscribe from Apache Wicket, click here<http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=1842946&code=amNnYXJjaWFtQGdtYWlsLmNvbXwxODQyOTQ2fDEyNTYxMzc3ODY=>.
>
>



-- 

JC


--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/On-Label-Div-or-some-other-component-how-to-use-setMarkupId-and-dynamic-id-tp3784344p3784701.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


RE: On Label/Div or some other component, how to use setMarkupId and dynamic id

Posted by "Brown, Berlin [GCG-PFS]" <Be...@Primerica.com>.
Strange but I may scrape the page and search for those particular
elements.  I want the prefix but I also want to keep uniqueness.

 

-----Original Message-----
From: Igor Vaynberg [mailto:igor.vaynberg@gmail.com] 
Sent: Thursday, September 01, 2011 2:19 PM
To: users@wicket.apache.org
Subject: Re: On Label/Div or some other component, how to use
setMarkupId and dynamic id

i guess the question would be: why?

-igor

On Thu, Sep 1, 2011 at 10:57 AM, Brown, Berlin [GCG-PFS]
<Be...@primerica.com> wrote:
> Is there a way to prefix a component with using setMarkupid but also 
> have the dynamic id.
>
> I want my end output to have:
>
> With Code:
>
> x = new WebMarkupContainer("myId")
> x.setMarkupId("myId");
>
> <div id="myId_id2323" />
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: On Label/Div or some other component, how to use setMarkupId and dynamic id

Posted by Igor Vaynberg <ig...@gmail.com>.
i guess the question would be: why?

-igor

On Thu, Sep 1, 2011 at 10:57 AM, Brown, Berlin [GCG-PFS]
<Be...@primerica.com> wrote:
> Is there a way to prefix a component with using setMarkupid but also
> have the dynamic id.
>
> I want my end output to have:
>
> With Code:
>
> x = new WebMarkupContainer("myId")
> x.setMarkupId("myId");
>
> <div id="myId_id2323" />
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: On Label/Div or some other component, how to use setMarkupId and dynamic id

Posted by Martin Grigorov <mg...@apache.org>.
the only way is with
org.apache.wicket.markup.ComponentTag.putInternal(String,
CharSequence) but as its javadoc and name say it is internal and may
change its behavior any time

On Thu, Sep 1, 2011 at 7:57 PM, Brown, Berlin [GCG-PFS]
<Be...@primerica.com> wrote:
> Is there a way to prefix a component with using setMarkupid but also
> have the dynamic id.
>
> I want my end output to have:
>
> With Code:
>
> x = new WebMarkupContainer("myId")
> x.setMarkupId("myId");
>
> <div id="myId_id2323" />
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org