Hi.. I'll try to explain my problem... hope you can undertand it.
I've a VelocityPortlet with his default template. This template shows a
list of articles already stored in the db, and has a link to add a new
one: $jslink?eventSubmit_doEdit=
This method (doEdit) only set a template wich has the input fields:
public void doEdit(RunData rundata, Context context) throws Exception
{
String id = rundata.getParameters().getString(ID);
if (id!=null){
ArticlesManager mng = new ArticlesManager();
Article article = mng.getArticle(new
Long(id).longValue());
context.put("article", article);
}
context.put("totalLinks", new Integer(0));
setTemplate(rundata, "addArticle");
}
Until here, everything goes fine...
My problem is that I need to send some info from this template (addArticle
- not the default) and come back to the same template, and always, despite
of explicity set the template in the event method, the flow of the
application goes to the default template.
This is the event I'm calling:
public void doAddlinks(RunData rundata, Context context) throws
Exception {
...
int totalLinks = rundata.getParameters().getInt("totalLinks",
0);
...
context.put("totalLinks", new Integer(totalLinks));
setTemplate(rundata, "addArticle");
}
please, any help would be very appreciated.
regards,
Carlos.