I can't Reset Form inside Modal panel
srikannan_89 May 28, 2012 7:29 AM*****************************************************************************
<rich:modalPanel id="generateLetterPanel" width="950" height="750" style="position:fixed;top:50px;left:140px;" showWhenRendered="true" rendered="#{flowScope.displayModal}">
<f:facet name="header">
<h:panelGroup>
<h:outputText value="Correspondence Generation"></h:outputText>
</h:panelGroup>
</f:facet>
<f:facet name="controls">
<h:form>
<h:panelGroup>
<h:commandButton value="X" styleClass="groovybutton" action="corrClose" id="hidelink" />
<rich:componentControl for="panel" attachTo="hidelink" operation="hide" event="onclick"/>
</h:panelGroup>
</h:form>
</f:facet>
<h:form id="lettersForm">
<!-- autosized="false" zindex="50"-->
<h:selectOneListbox id="sol" style="height:150px;width:750px;position:absolute" value="#{flowScope.clbCorrespondence.letterType}" title="select one option" disabled="${flowScope.disableOption}">
<c:forEach items="#{flowScope.letterTypes}" var="current">
<f:selectItem id="si1" itemLabel="#{current.propertyValue}" itemValue="#{current.propertyKey}" />
</c:forEach>
<a4j:support event="onchange" reRender="additionalDetailsPanel" action="rende" ajaxSingle="true" />
</h:selectOneListbox>
<h:outputText value="${flowScope.clbCorrespondence.letterType} Letter Type has been selected" style="font-size:125%;font-family:Verdana;color:green" rendered="${flowScope.clbCorrespondence.letterType != null}"/>
<rich:spacer height="300"/>
<a4j:outputPanel id="additionalDetailsPanel" style="border:1px">
<h:panelGrid columns="3" border="0" cellpadding="5px" height="1000" width="800">
<h:panelGroup>
<h:outputText value="To Select different Letter Click on Clear Selected Document Button" style="font-size:150%;font-family:Verdana;color:blue" rendered="${flowScope.disableOption}"/><br/>
</a4j:outputPanel>
<h:inputText value="" id="tes1"/>
<rich:spacer height="60"/>
<h:commandButton value="Cancel" action="corrCancel" class="groovybutton2" onclick="clear_form_elements()"/><rich:spacer width="100"/>
<h:commandButton value="OK" action="corrOk" class="groovybutton2"/><rich:spacer width="100"/>
<h:commandButton value="Clear Selected Document" action="corrClearSelectedDocument" class="groovybutton2" style="align:right" immediate="true"/>
</h:form>
</rich:modalPanel>
*******************************************************************************
function clear_form_elements() {
$('#soll').val('');
}
****************************************************
Im trying to reset the value for SelectOneListBox, when i click the Cancel Button. This is my xhtml & JQuery.. this Jquery is working fine for plain HTML code..
Help me to solve this
Thanks in advance