I will add the patch there if I ever come up with a good implementation. The
problem is that there are so many things that can be customizable that it
might be hard to come with a good, elegant solution. For example, the user
might want to use images only, or text only, or image before a text (for
example '<First', where < is a left arrow image) or image after text
('First<', where < is a left arrow image), or localized text as proposed in
the jira issue. The list can go on and on so first it must be decided what
is worth customizing.

In my first try to use either Image or Text, I had to add both components to
the <a> link and set one of them as invisible:

<a wicket:id="first"><span wicket:id="firstLabel">&lt;&lt;</span><img
wicket:id="firstImage"></img></a>

but then I can't switch them around (not that I needed to but just an
example). I'm new to Wicket. I'm still reading Wicket in Action. As my
understanding grows I might be able to help more. Maybe there's a way to
output my own markup (as I've seen with some javascript) to display the
image before or after.

Anyways, this is a great framework and I'm enjoying it so far. Long time
since I had fun writing web applications.

Regards,
Daniel Freitas

2008/7/28 Igor Vaynberg <[EMAIL PROTECTED]>

> create a patch and attach it to a jira issue is usually the best way.
>
> btw there is already an issue for something like this:
>
> https://issues.apache.org/jira/browse/WICKET-1735
>
> -igor
>
> On Mon, Jul 28, 2008 at 3:01 PM, Daniel Freitas
> <[EMAIL PROTECTED]> wrote:
> > BTW. I'm trying to customize the PagingNavigator. If I come up with a
> good
> > way to do it, how can I contribute to the project? Basically, I will try
> to
> > let the user choose images or text for the first, previous, next and last
> > links.
> >
> > Regards,
> >
> > 2008/7/28 Daniel Freitas <[EMAIL PROTECTED]>
> >
> >> I meant the wicket:id (which is not an html id right?). Anyways, I will
> >> just keep that in mind. Two components work as expected.
> >>
> >> 2008/7/28 Igor Vaynberg <[EMAIL PROTECTED]>
> >>
> >> two html elements cannot have the same id within the same html
> document...
> >>>
> >>> -igor
> >>>
> >>> On Mon, Jul 28, 2008 at 1:55 PM, Daniel Freitas
> >>> <[EMAIL PROTECTED]> wrote:
> >>> > I don't. I expected it to be rendered twice with the same id ;).
> Which
> >>> is
> >>> > not possible, thus I had to create two components with two ids to
> make
> >>> the
> >>> > navigator appear twice.
> >>> >
> >>> > Regards
> >>> >
> >>> > 2008/7/28 <[EMAIL PROTECTED]>
> >>> >
> >>> >> how would you expec the same component to render twice with
> different
> >>> HTML
> >>> >> ids?
> >>> >>
> >>> >> -Igor
> >>> >>
> >>> >> On 7/28/08, Daniel Freitas <[EMAIL PROTECTED]> wrote:
> >>> >> > With the following markup:
> >>> >> >
> >>> >> >                   <div wicket:id="topNavigator"/>
> >>> >> >                     <div wicket:id="booksList">
> >>> >> >                         <div wicket:id="books" class="book">
> >>> >> >                         <!-- list of books -->
> >>> >> >                         </div>
> >>> >> >                     </div>
> >>> >> >                     <div wicket:id="bottomNavigator"/>
> >>> >> >
> >>> >> >
> >>> >> > It works ok with regular PaginNavigator or with this Ajax code:
> >>> >> >
> >>> >> > topPagingNavigator = new AjaxPagingNavigator("topNavigator",
> books) {
> >>> >> >
> >>> >> >             @Override
> >>> >> >             protected void onAjaxEvent(AjaxRequestTarget target) {
> >>> >> >                 if (target != null) {
> >>> >> >                     //Syncs bottom paging navigator
> >>> >> >                     target.addComponent(bottomPagingNavigator);
> >>> >> >                 }
> >>> >> >
> >>> >> >                 super.onAjaxEvent(target);
> >>> >> >             }
> >>> >> >         };
> >>> >> >         bottomPagingNavigator = new
> >>> >> AjaxPagingNavigator("bottomNavigator",
> >>> >> > books) {
> >>> >> >             @Override
> >>> >> >             protected void onAjaxEvent(AjaxRequestTarget target) {
> >>> >> >                 if (target != null) {
> >>> >> >                     //Syncs top paging navigator
> >>> >> >                     target.addComponent(topPagingNavigator);
> >>> >> >                 }
> >>> >> >
> >>> >> >                 super.onAjaxEvent(target);
> >>> >> >             }
> >>> >> >         };
> >>> >> >         add(topPagingNavigator);
> >>> >> >         add(bottomPagingNavigator);
> >>> >> >
> >>> >> > I just wanted to avoid creating two components that do the same
> thing
> >>> in
> >>> >> the
> >>> >> > same set of data (I just want to display it twice). I wonder if I
> >>> might
> >>> >> run
> >>> >> > in the same problem whenever I want to display the same component
> in
> >>> two
> >>> >> > different places...
> >>> >> >
> >>> >>
> >>> >>
> ---------------------------------------------------------------------
> >>> >> 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]
>
>

Reply via email to