Problem rendering form
pogasu Aug 27, 2010 7:09 PMHi all!
I hope somebody can help me with this issue: I have 2 forms(form A, form B) in a webpage. I don't want that form B loads when the page loads for the first time but when the user clicks on an action link inside form A.
This is the code I have:
Code from form A:
..............................
<rich:spacer width="10" />
<a:commandLink action="#{clipList.loadClipsByOrder(_currentorder)}" ajaxSingle="true"
reRender="orderDetails">
<s:graphicImage value="/img/show.gif" />
</a:commandLink>
................................
Code from form B:
................
<h:form style="width:910px" id="orderDetails" border="0" cellspacing="0" cellpadding="0" rendered="#{clipList.orderFilter}">
<h:outputText value="No clips for that order" rendered="#{empty clipList.resultList}"/>
<rich:panel style="width: 910px; margin:0; padding:0" rendered="#{not empy clipList.resultList}">
................................................
Code from my bean:
public class ClipList extends ExtendedEntityQuery<Clip> {
private static final long serialVersionUID = 6725812087867495437L;
private static final String EJBQL = "select clip from Clip clip";
private static final String[] RESTRICTIONS = { "lower(clip.name) like concat(lower(#{clipList.clip.name}),'%')", "clip.order = #{clipList.clip.order}", "clip.status = #{clipList.clip.status}" };
private Clip clip = new Clip();
private Boolean orderFilter = Boolean.FALSE;
...........................................
clipList.orderFilter is a flag from my bean that is activaded when the user clicks on the Form A link, it is false by default.
I thought the use of this flag would be the solution but I had no results. I read a related topic in this forum (http://community.jboss.org/thread/148735?tstart=0 ) but the way it was solved doesnt work for me.
Thanks for your help!