on 11-28-2005 4:55 PM
Hi
When developing in HTMLB/JSP, is is possible to make a roadmap(or something similar), like you can do in WebdynPro?
thanks
Peter
Hi Dmitry
Thanks for your answer, but the problem is, that the text beside the "buttons" should be localizisable, and the roadmap resizable
I was hoping for a standardcomponent
Best regards
Peter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Peter,
With HTMLB you will need to implement a state machine which will look something like this
public class Controller extends PageProcessorComponent{
public DynPage getPage() {
return new MyDynPage();
}
public class MyDynPage extends JSPDynPage{
private int state = 0;
public void doProcessBeforeOutput() throws PageException {
switch(state){
case 0:
setJspName("page0.jsp");
break;
//...
case N:
setJspName("pageN.jsp");
break;
}
}
public void onStep0(Event event) {
state=0;
}
public void onStepN(Event event) {
state=N;
}
public void onBack(Event event) {
state--;
}
public void onNext(Event event) {
state++;
}
}
}
In the JSPs you will need to surface buttons/images with onClick referring to on...(Event event) methods listed above. Also you will need to save the state, I'd propose to put it on servlet request in
doProcessBeforeOutput()
componentRequest.getServletRequest().setAttribute("state", new Integer(state));
surface as
<input type="hidden" id="state" name="state" value="<%=state.toString()%>">
get back and analyze in
doProcessBeforeOutput()
String state = componentRequest.getParameter("state");
Best regards,
Dmitry
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.