Hi,

Panels are great to encapsulate functionality in reusable units. In order to reuse some panels in different contexts, I need to make the navigation elements they contain configurable. For example, consider a form whose post-submit navigation and cancel link destination need to be configurable. Are there any recommended best-practices for this? Which patterns do you use to accomplish this?

My first method was to make the form panel abstract with getPageClass() and getPageParameters() as abstract methods to provide navigation configuration. This proved too limitative as it forced the navigation destination to be bookmarkable pages.

My current method is form the form to receive a "strategy" implementation responsible for setting the response page on form submit and constructing a cancel link. This allows to use bookmarkable pages, page references, ect. as navigation destinations.

Do you have any better alternatives to suggest?

Regards,
Bertrand

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

Reply via email to