This is what I did to solve the issue:
In "Panel C" class:
// Return button.
List crumbs = getBreadCrumbModel().allBreadCrumbParticipants();
IBreadCrumbParticipant p = null;
for (Object obj : crumbs) {
p = (IBreadCrumbParticipant) obj;
if (p instanceof PanelB) {
break;
}
}
...
final IBreadCrumbParticipant participant = p;
BreadCrumbLink returnBtn = new BreadCrumbLink("returnBtn",
getBreadCrumbModel()) {
@Override
protected IBreadCrumbParticipant getParticipant(String
componentId) {
return participant;
}
};
form.add(returnBtn);
Not sure if it is the best solution, but it works...
Thanks,
Daniel
Kmus wrote:
>
> Hi,
>
> I'm working in an application that is using the Breadcrumb component and
> everything works as expected.
>
> Currently I'm trying to add a "previous/return" button in some of my
> modules to give the user a friendlier environment, but I don't know how to
> send the user to the previous panel and remove the current participant
> from the bread crumb bar.
>
> Right now when the user press my Previous button the breadcrumb bar
> prints:
> Panel A / Panel B / Panel C / Panel B
>
> What I want is:
> Panel A / Panel B
>
> I don't want to use the javascript:history.back(1) code because it doesn't
> feel right...
>
> Could someone help me with this?
>
> Thanks,
> Daniel
>
--
View this message in context:
http://www.nabble.com/Breadcrumb-%2B-previous-button-tp19696315p19726457.html
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]