Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Passing value from JSP to Cewolf Dataproducer Java File  RSS feed

 
Mazhar Ismail
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using cewolf to generate charts using JSP.

Can anyone tell me how to pass a value (from a html form field) to cewolf dataproducer java file.

Thanks
Mazhar
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You'd submit the form containing the field to a servlet, which can then pass the value to the DatasetProducer object. The cewolfexample web app (which comes with cewolf) shows this in practice on the "Testpage" example (only there it submits to a JSP, not a servlet, but the procedure is similar).
 
Mazhar Ismail
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
got the solution we can pass the parameters from jsp using the cewolf:param tag

ex: <cewolf:param name="year" value="<%=(Serializable)inputYear%>"/>

and now can read in the produceDataset method of the java file.

ex:
String year = null;
if(params.containsKey("year")) {
year = (String)params.get("year");
}


hope makes sense
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!