Thanks for the tip. I added this approach to the top page. Here is my 
implemenetation:

visitChildren(new IVisitor<Component>() {
        @Override
        public Object component(Component c) {
                c.setOutputMarkupId(true);
                return Component.IVisitor.CONTINUE_TRAVERSAL;
        }
});

Is this the right way to implement?

I notice one thing that is not what I want: instead of generating wanted HTML 
element ID such as "signInOut" or "feedback", Wicket added one number or letter 
to wicket ID as HTML element ID (for example: signInOut4, feedbackb).

How can I overcome this?

Regards.



--- On Sun, 2/28/10, Andrew Lombardi <and...@mysticcoders.com> wrote:

> From: Andrew Lombardi <and...@mysticcoders.com>
> Subject: Re: Make Wicket component ID HTML element ID?
> To: users@wicket.apache.org
> Date: Sunday, February 28, 2010, 6:41 PM
> Use a Component.IVisitor and you can
> setOutputMarkupId on every child component
> 
> On Feb 28, 2010, at 2:47 PM, David Chang wrote:
> 
> > Thanks for the info. But this method is only
> component-level. How can I make all Wicket components do
> this without repeating setOutputMarkupId(true) for each
> component?
> > 
> > Regards.
> > 
> > --- On Sun, 2/28/10, Jeremy Thomerson <jer...@wickettraining.com>
> wrote:
> > 
> >> From: Jeremy Thomerson <jer...@wickettraining.com>
> >> Subject: RE: Make Wicket component ID HTML element
> ID?
> >> To: users@wicket.apache.org
> >> Date: Sunday, February 28, 2010, 5:15 PM
> >> setOutputMarkupId(true)
> >> 
> >> 
> >> Jeremy Thomerson
> >> http://www.wickettraining.com
> >> -- sent from a wireless device
> >> 
> >> 
> >> -----Original Message-----
> >> From: David Chang <david_q_zh...@yahoo.com>
> >> Sent: Sunday, February 28, 2010 4:02 PM
> >> To: users@wicket.apache.org
> >> Subject: Make Wicket component ID HTML element
> ID?
> >> 
> >> I have many Wicket components that are unique on
> pages. I
> >> would like to make their wicket ID HTML element ID
> instead
> >> of typing HTML id attribute. How can I do this?
> >> 
> >> Thanks!
> >> 
> >> 
> >>       
> >> 
> >>
> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >> For additional commands, e-mail: users-h...@wicket.apache.org
> >> 
> >> 
> >> 
> >>
> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >> For additional commands, e-mail: users-h...@wicket.apache.org
> >> 
> >> 
> > 
> > 
> > 
> > 
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> > 
> 
> 
> To our success!
> 
> Mystic Coders, LLC | Code Magic | www.mysticcoders.com
> 
> ANDREW LOMBARDI | and...@mysticcoders.com
> 2321 E 4th St. Ste C-128, Santa Ana CA 92705
> ofc: 714-816-4488
> fax: 714-782-6024
> cell: 714-697-8046
> linked-in: http://www.linkedin.com/in/andrewlombardi
> twitter: http://www.twitter.com/kinabalu
> 
> Eco-Tip: Printing e-mails is usually a waste.
> 
> ========================================================
> This message is for the named person's use only. You must
> not, directly or indirectly, use,
>  disclose, distribute, print, or copy any part of this
> message if you are not the intended recipient.
> ========================================================
> 
> 




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

Reply via email to