You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Nav Che <na...@gmail.com> on 2008/10/21 21:06:08 UTC
How to pass parameters to a BreadCrumbPanel
Hello All,
How do i pass parameters between panels. Basically i have panels in my
appilcation which use breadcrumb model.
Say on panel A i display list of users and I want the user Id to be a link
upon clickin it should show the edit panel ( panel B ) of user and for
which it shld either pass user object or userid.
Please advise.
Thanks in advance
Regards
naveen
Re: How to pass parameters to a BreadCrumbPanel
Posted by Nav Che <na...@gmail.com>.
Hello Wayne,
Looks like if I use BreadCrumbPanelLink, i cannot pass the parameters as you
mentioned. However I tried to implement the model rather a crude way :)
.....By persisting the links in a List and saving the same in session. I
hope this is ok any experts please advise.
//Naveen
On Thu, Oct 23, 2008 at 1:53 AM, Wayne Pope <
waynemailinglists@googlemail.com> wrote:
> Hi Naveen,
>
> I do it something like this:
>
> TabbedPanel tabbedPanel = new TabbedPanel("tabs", tabs) {
> @Override
> protected WebMarkupContainer newLink(String linkId, final int
> index) {
> PageParameters parameters = new PageParameters();
> parameters.put("selected", ((ITab) getTabs().get(index))
> .getTitle().getObject());
> parameters.put("somethingIneedID", somethingIneedID);
> return new BookmarkablePageLink(linkId, MyPage.class,
> parameters);
> }
>
> };
> if (found)
> tabbedPanel.setSelectedTab(selected);
>
> if (tabSelect != null)
> tabbedPanel.setSelectedTab(tabSelect);
> add(tabbedPanel);
>
> you should be able to figue it out from there.
> Wayne
>
>
> On Tue, Oct 21, 2008 at 9:06 PM, Nav Che <na...@gmail.com> wrote:
>
> > Hello All,
> >
> > How do i pass parameters between panels. Basically i have panels in my
> > appilcation which use breadcrumb model.
> >
> > Say on panel A i display list of users and I want the user Id to be a
> link
> > upon clickin it should show the edit panel ( panel B ) of user and for
> > which it shld either pass user object or userid.
> >
> > Please advise.
> >
> > Thanks in advance
> >
> > Regards
> > naveen
> >
>
Re: How to pass parameters to a BreadCrumbPanel
Posted by Nav Che <na...@gmail.com>.
Hello Wayne,
Thanks for your advise, i shall try it out... I was actually planning to
write my own breadcrumbs for pages instead of panels. Not sure how
successful i would be :),,,,
Thanks again
//Naveen
On Thu, Oct 23, 2008 at 1:53 AM, Wayne Pope <
waynemailinglists@googlemail.com> wrote:
> Hi Naveen,
>
> I do it something like this:
>
> TabbedPanel tabbedPanel = new TabbedPanel("tabs", tabs) {
> @Override
> protected WebMarkupContainer newLink(String linkId, final int
> index) {
> PageParameters parameters = new PageParameters();
> parameters.put("selected", ((ITab) getTabs().get(index))
> .getTitle().getObject());
> parameters.put("somethingIneedID", somethingIneedID);
> return new BookmarkablePageLink(linkId, MyPage.class,
> parameters);
> }
>
> };
> if (found)
> tabbedPanel.setSelectedTab(selected);
>
> if (tabSelect != null)
> tabbedPanel.setSelectedTab(tabSelect);
> add(tabbedPanel);
>
> you should be able to figue it out from there.
> Wayne
>
>
> On Tue, Oct 21, 2008 at 9:06 PM, Nav Che <na...@gmail.com> wrote:
>
> > Hello All,
> >
> > How do i pass parameters between panels. Basically i have panels in my
> > appilcation which use breadcrumb model.
> >
> > Say on panel A i display list of users and I want the user Id to be a
> link
> > upon clickin it should show the edit panel ( panel B ) of user and for
> > which it shld either pass user object or userid.
> >
> > Please advise.
> >
> > Thanks in advance
> >
> > Regards
> > naveen
> >
>
Re: How to pass parameters to a BreadCrumbPanel
Posted by Wayne Pope <wa...@googlemail.com>.
Hi Naveen,
I do it something like this:
TabbedPanel tabbedPanel = new TabbedPanel("tabs", tabs) {
@Override
protected WebMarkupContainer newLink(String linkId, final int
index) {
PageParameters parameters = new PageParameters();
parameters.put("selected", ((ITab) getTabs().get(index))
.getTitle().getObject());
parameters.put("somethingIneedID", somethingIneedID);
return new BookmarkablePageLink(linkId, MyPage.class,
parameters);
}
};
if (found)
tabbedPanel.setSelectedTab(selected);
if (tabSelect != null)
tabbedPanel.setSelectedTab(tabSelect);
add(tabbedPanel);
you should be able to figue it out from there.
Wayne
On Tue, Oct 21, 2008 at 9:06 PM, Nav Che <na...@gmail.com> wrote:
> Hello All,
>
> How do i pass parameters between panels. Basically i have panels in my
> appilcation which use breadcrumb model.
>
> Say on panel A i display list of users and I want the user Id to be a link
> upon clickin it should show the edit panel ( panel B ) of user and for
> which it shld either pass user object or userid.
>
> Please advise.
>
> Thanks in advance
>
> Regards
> naveen
>