10 Replies Latest reply on Sep 27, 2007 5:29 PM by Sanjeev Koppal

    a4J:function for subview rendered= not working

    Sanjeev Koppal Newbie

      I just started using Ajax4JSF from yesterday.
      I am using JSF -Facelets
      I tried an example from http://livedemo.exadel.com/richfaces-demo/richfaces/
      it works fine
      But when i try to integate the a4j components to my code it doesn't seem to work
      i have to rerender the subview also the subview have the rendered attribute.
      I also tried a4J:commandLink that doesn't seem to work either.
      I am trying to implement something like expand and collapse
      similar to the examples code where on click of viewsource the source is visible and on hide source its hidden.
      Any Help is highly apprreciated.
      The Code snippet is below...

      <h:commandLink style="text-decoration:none;font-weight:normal;border:0" onclick="expand('${activityBean.expanded}','onActivity')" >
      <img src="${!activityBean.expanded?'../images/arrow_right.gif':'../images/arrow_down.gif'}"
      border="0"/>
      </h:commandLink>
      <span class="marked" onmouseover="updateName('true','onActivity')" onmouseout="updateName('false','onactivityFalse')" >${activityBean.name}
      </h3>
      <f:subview id="subview_act" rendered="${activityBean.expanded}">
      <h:outputText id="showname3" value="Expanded Value: ${popupBean.visible}">
      </h:outputText>

      ${activityBean.description} <c:forEach items="${activityBean.taskRiskSummaryBean}"
      var="taskrisk">
      <c:forEach items="${taskrisk.taskList}" var="task">
      <c:if test="${riskTypeId==task.riskTypeId}">

      ${task.taskName} ${task.taskDesc} ${task.taskDetailsAsString}

      </c:if>
      </c:forEach>
      </c:forEach>

      </f:subview>

      <a4j:form >
      <a4j:jsFunction name="expand" reRender="subview_act">
      <a4j:actionparam name="param1" assignTo="#{activityBean.expanded}" />
      </a4j:jsFunction>

      </a4j:form>