-
1. Problem with includes
ilya_shaikovsky Apr 13, 2011 4:23 AM (in response to mark77)if you will look to generated source you will be probably see that tag just rendered as-is "<c:forEach...>...". Change xmlns to xmlns:c="http://java.sun.com/jsp/jstl/core" and it should start working.
-
2. Problem with includes
mark77 Apr 13, 2011 4:48 AM (in response to ilya_shaikovsky)Wow - that did the trick, thanks !
I further had to include the jstl library in my pom:
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.1.2</version>
</dependency>Strange thing is, that with JSF1.2 and RF3.3.3 everything worked without both changes...
-
3. Problem with includes
ilya_shaikovsky Apr 13, 2011 4:53 AM (in response to mark77)I guess you used JSP and not facelets previously..
-
4. Problem with includes
mark77 Apr 13, 2011 5:19 AM (in response to ilya_shaikovsky)No, it was always facelets, that's what puzzles me...
However, now my day is saved and I can proceed with the migration.
Working with JSF2 is way more comfortable than with JSF1.2.
I am missing some components in RF4 really... the picklist and shuttle were fine; I of course can take them from PrimeFaces, but I'd prefer to have all components having the same look and feel. Were they just dropped to hold the release date or will they be lost forever ?
-
5. Problem with includes
ilya_shaikovsky Apr 13, 2011 5:31 AM (in response to mark77)as any popular and usefull component shuttles - just can't be klost for sure
we just wanted to improve things there so postponed for more carefull design and review.
-
6. Problem with includes
mark77 Apr 13, 2011 5:35 AM (in response to ilya_shaikovsky)That's good news.
Thanks a lot for your great efforts and good work !
-
7. Re: Problem with includes
mark77 Apr 17, 2011 9:15 AM (in response to mark77)Now I am using:
{code:xml}<c:forEach items="#{shopHandler.screen.leftColumn}" var="item">
<f:subview>
<a4j:outputPanel width="100%">
<ui:include src="/#{shopHandler.theme}/#{item.src}">
<ui:param name="item" value="#{item}"/>
</ui:include>
<br/>
</a4j:outputPanel>
</f:subview>
</c:forEach>{code}
With the now correct c-namespace, the loop is working, but... the parameter "item" is not available later, as i have the following in my included file:
{code:xml}<a4j:poll render="id_#{item.catalogBean.catalogid}" action="#{item.load}" rendered="#{not item.loaded}" status="status_#{item.catalogBean.catalogid}" />{code}
The included parts are of different classes and only one of them provides this property loaded. However, it is detected correctly, but when the a4j:poll then tries to call the load method, i get a "resolved to null" in my log.
-
8. Re: Problem with includes
mark77 Apr 18, 2011 3:06 AM (in response to mark77)Oh.... seems to be an a4j:poll issue.
I tried it with:
<p:poll process="@this" interval="2" update="id_#{item.catalogBean.catalogid}" action="#{shopHandler.callLoad(item.id)}" rendered="#{not item.loaded}" />
And this works as expected...
-
9. Re: Problem with includes
ilya_shaikovsky Apr 18, 2011 4:27 AM (in response to mark77)I'm seeing different actions in a4j: and p: poll components.
i get a "resolved to null" in my log.
Maybe while trying different component you made some additional corrections ?
-
10. Re: Problem with includes
mark77 Apr 18, 2011 4:52 AM (in response to ilya_shaikovsky)The only thing I did was replacing a4j:poll by p:poll.
I assume that under the hood they behave quite different; obviously the foreach-item seems to not be evaluated upon the ajax postback if done via a4j:poll while p:poll seems to evaluate it at the render time and then encode it within the js-part, so there is no re-evaluation needed.