-
1. Re: communication from scriptlet to jsf managed bean is not
ssilvert Jul 10, 2009 9:50 AM (in response to anil3379)Yes, that is the expected behavior. You have effectively re-created the old JSF 1.1 problem with looping. However, this is fixed in JSF 1.2/JSP 2.1 (JBoss AS 4.2 and AS 5.0). But, you need to use a JSTL or JSF tag.
See problem: http://onjava.com/pub/a/onjava/2004/06/09/jsf.html
Fix in JSF 1.2: http://java.sun.com/developer/technicalArticles/J2EE/jsf_12/
You should never use scriptlets. They are considered bad practice.
For this, I suggest using the JSTL c:forEach tag. But if you really want to do things the right way, use Faceletes instead of JSP.
Stan -
2. Re: communication from scriptlet to jsf managed bean is not
anil3379 Jul 10, 2009 10:05 AM (in response to anil3379)Hi stan,
Thanks for your reply. Here I have 2 problems.
- mix with jsf and JSTL for loop is not working.
- I need to put this fix in many places in my application. if I use facelets.I will have to change the type to .xhtml and it requires many modifications to my application.
Thanks,
Anil -
3. Re: communication from scriptlet to jsf managed bean is not
ssilvert Jul 11, 2009 3:31 PM (in response to anil3379)"anil3379" wrote:
Hi stan,
Thanks for your reply. Here I have 2 problems.
- mix with jsf and JSTL for loop is not working.
This works and it has always worked since JBoss AS 4.2. You must be doing something wrong."anil3379" wrote:
- I need to put this fix in many places in my application. if I use facelets.I will have to change the type to .xhtml and it requires many modifications to my application.
There is no getting around the fact that you must fix your broken code. You would benefit greatly from Facelets, but it's understandable if you can't make the switch.
Stan