You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Stephane Bailliez <sb...@imediation.com> on 2001/10/19 19:13:12 UTC
Navigation, nextTemplate, cancelTemplate...
During the navigation I'm facing the problem of having some sort of logic to
go back to the calling template or to have a specific cancel template or end
template of a several steps navigation sequence.
I'm using here a system similar to Scarab with nextTemplate, cancelTemplate
and endTemplate. However, since a template in itself is not enough, I need
to also pass some parameters. For example assume I have a screen BoList.vm
that display the list of a specific business object, the link will be
something like:
http://.../ListBO.vm&bo=partner&sort=ascending&field=name
in this template I can edit a partner by clicking in a link similar to:
http://.../EditBO.vm&bo=partner&id=123&nextTemplate=ListBO.vm
This allow me in a the Save/Cancel button of the BO to go back to the
original page by doing a setTarget(nextTemplate). However I want to also
have some original parameters from the template like sort and field.
therefore I'm thinking about adding nextParameter fields such as:
http://.../EditBO.vm&bo=partner&id=123&nextTemplate=ListBO.vm&nextParameter=
sort,ascending&nextParameter=field,name
To process it I would have my own Page with the following logic in the code.
public class MyPage extends VelocityPage {
protected void doPostBuild(RunData data) throws Exception {
// if we are going to the nextTemplate we need to put all
nextParameters...
// same for cancelTemplate/cancelParameters and
endTemplate/endParameters
}
}
Looks like a bit of hacking but should do the work unless I missed
something.
Did anyone already implemented something like this ?
Thanks for the feedback.
Stephane
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org