Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Add scriplets into JSF  RSS feed

 
Ken Flor
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

i am new to JSF.

please help me. Thanks.

I put this and formHandler.initParameters is invoked (accoding to the console, the method is called)..


<jsp:useBean id="formHandler" scope="page" class="ed21.nday.bean.CapturingNomParticularsBean">
<jsp:setProperty name="formHandler" property="*"/></jsp:useBean>

<%formHandler.initParameters();%>

Why is it when I put this, it does not work?
<h:inputText value=<jsp:scriptlet>formHandler.test()</jsp:scriptlet> size="10"></h:inputText>

Please help me. Thanks
 
Tim Holloway
Bartender
Posts: 18531
61
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ken, please don't ask the same question more than once. It confuses us and makes the Ranch an untidy place. We'll do our best to give timely answers if we know them.

I think you're expecting scriptlets to do client-side processing for you and they don't work that way. Scriptlets are code that get compiled into the JSP and run on the server.

Since JSF places certain restrictions on what you can code in your JSF page, I'm not even sure scriptlets would work there, However I've never even been tempted to use scriptlets with JSF, so I don't know. As far as I can see, anything you'd want to do in a scriptlet could probably be done more cleanly using straight JSF.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!