The following code does not render properly following a validation error.  
However, if one adds the id attribute to the panelGrid component, it works 
fine.  

 
  | <f:view>
  |     <h:form id="buildTagForm">
  |             <h:panelGrid columns="1">
  |                     <h:outputText id="datamsg" value="Enter data" 
styleClass="portlet-form-label" />
  |                     <h:selectOneRadio id="typeSelectOneRadio" value="4"
  |                             title="Select the element-00" rendered="true" 
required="true">
  |                             <f:selectItem itemValue="0" itemLabel="0" />
  |                             <f:selectItem itemValue="1" itemLabel="1" />
  |                             <f:selectItem itemValue="2" itemLabel="2" />
  |                     </h:selectOneRadio>
  |                     <h:message id="radioMsg" for="typeSelectOneRadio" 
showDetail="true"
  |                             fatalClass="portlet-msg-error" 
errorClass="portlet-msg-error"
  |                             warnClass="portlet-msg-alert" 
infoClass="portlet-msg-success" />
  |                     <h:commandButton id="nextBtn" action="next" value="Next"
  |                             rendered="true" 
styleClass="portlet-form-button" />
  |                     <h:commandButton id="cancelBtn" action="cancel" 
immediate="true"
  |                             value="Cancel" styleClass="portlet-form-button" 
/>
  |             </h:panelGrid>
  |     </h:form>
  | </f:view>
  | 
  | 

I have experienced simlar rendering problems with command buttons in panel 
groups when rendering following a validation error.  Again, adding an 
id="somePanelGroup" attribute fixes the problem.

Does JBoss portal require an explicit id attribute for each and every element 
in a JSF component tree?  If so, can someone explain why this is required?  Why 
does the rendering problem only arise following a validation error?  (In the 
above example, submit the form without selecting one of the radio buttons.  The 
page redisplays without its buttons.  In some cases, the radio buttons do not 
appear either upon redisplay.  Strangely, if not validation error occur, 
everthing works as one would expect).

JBPortal 2.0.1RC3/JB 4.0.3SP1


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3905828#3905828

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3905828


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to