FacesMessage(s) have been enqueued, but may not have been displayed.why?
dhanarajar Mar 1, 2011 1:21 AMhi
validation messages are not displayed in the jsp,but in the console. please help me
this is my error
FacesMessage(s) have been enqueued, but may not have been displayed.
sourceId=stockForm:dateDecId:startDate[severity=(ERROR 2), summary=(Start Date is required), detail=(Start Date is required)]
this is my jsp
<h:form id="stockForm">
<a:outputPanel ajaxRendered="false">
<div style="display: none;"><h:messages id="error"
errorClass="error"></h:messages></div>
</a:outputPanel>
<h:panelGroup id="stockPanel">
<s:validateAll>
<rich:tabPanel switchType="client" selectedTab="#{stocksAction.defaultTab}">
<rich:tab name="general" value="general"
label="#{messages['tab.generalData'] }">
<table>
<tr>
<td class="required-field"><h:outputText
value="#{messages['rich.name'] }" /></td>
<td><s:decorate id="nameDecId">
<table cellspacing="0" cellpadding="0">
<tr>
<td><h:inputText id="nameFieldId" maxlength="50"
value="#{stocksAction.admItem.name}" label="Name"
required="true" /></td>
</tr>
<tr>
<td><s:message errorClass="error" /></td>
</tr>
</table>
</s:decorate></td>
</tr>
<tr>
<td class="required-field"><h:outputText
value="#{messages['rich.itemCode'] }" /></td>
<td><s:decorate id="CodeDecId">
<table cellspacing="0" cellpadding="0">
<tr>
<td><h:inputText id="code"
value="#{stocksAction.admItem.code}" /></td>
</tr>
<tr>
<td><s:message errorClass="error" /></td>
</tr>
<tr>
<td><a:outputPanel ajaxRendered="true">
<div style="display: block;">
<h:messages style="color:red; font-size:12px;"></h:messages>
</div>
<td width="20"><rich:spacer width="20"/></td>
</a:outputPanel></td>
</tr>
</table>
</s:decorate></td>
</tr>
<tr>
<td class="required-field"><h:outputText
value="#{messages['rich.startDate'] }" /></td>
<td><s:decorate id="dateDecId">
<table cellspacing="0" cellpadding="0">
<tr>
<td><rich:calendar id="startDate"
value="#{stocksAction.admItem.startdate}"
label="Start Date" inputStyle="width: 130px;"
required="true" /></td>
</tr>
<tr>
<td><s:message errorClass="error" /></td>
</tr>
</table>
</s:decorate></td>
</tr>
<tr>
<td class="required-field"><h:outputText
value="#{messages['rich.initialCount'] }" /></td>
<td><s:decorate id="countDecId">
<table cellspacing="0" cellpadding="0">
<tr>
<td><h:inputText id="countId"
value="#{stocksAction.admItem.initialCount}" /></td>
</tr>
<tr>
<td><s:message errorClass="error" /></td>
</tr>
</table>
</s:decorate>
</td>
</tr>
</table>
</rich:tab>
<rich:tab label="#{messages['title.officeLocations']}"
name="OfficeLocation" value="OfficeLocation">
<rich:dataTable id="officeLocList" var="office"
value="#{stocksAction.retrieveOffices()}" width="100%"
rowClasses="rich-table-oddRow,rich-table-evenRow"
columnClasses="align-left">
<rich:column width="10">
<h:selectBooleanCheckbox
value="#{stocksAction.officesForRequest[office]}" />
</rich:column>
<h:column>
<h:outputText value="#{office.city.name}" />
</h:column>
</rich:dataTable>
</rich:tab>
</rich:tabPanel>
</s:validateAll>
</h:panelGroup>
<br />
<h:panelGroup>
<a:commandButton value="#{messages['button.confirm']}"
title="#{messages['button.confirm']}"
action="#{stocksAction.confirmStocks()}" />
<h:commandButton action="#{stocksAction.can_button()}"
immediate="true" value="#{messages['button.cancel']}"
title="#{messages['button.cancel']}" />
</h:panelGroup>
</h:form>
+
validation messages are not displayed in the jsp,but in the console. please help me
this is my error
FacesMessage(s) have been enqueued, but may not have been displayed.
sourceId=stockForm:dateDecId:startDate[severity=(ERROR 2), summary=(Start Date is required), detail=(Start Date is required)]
this is my jsp
<h:form id="stockForm">
<a:outputPanel ajaxRendered="false">
<div style="display: none;"><h:messages id="error"
errorClass="error"></h:messages></div>
</a:outputPanel>
<h:panelGroup id="stockPanel">
<s:validateAll>
<rich:tabPanel switchType="client" selectedTab="#{stocksAction.defaultTab}">
<rich:tab name="general" value="general"
label="#{messages['tab.generalData'] }">
<table>
<tr>
<td class="required-field"><h:outputText
value="#{messages['rich.name'] }" /></td>
<td><s:decorate id="nameDecId">
<table cellspacing="0" cellpadding="0">
<tr>
<td><h:inputText id="nameFieldId" maxlength="50"
value="#{stocksAction.admItem.name}" label="Name"
required="true" /></td>
</tr>
<tr>
<td><s:message errorClass="error" /></td>
</tr>
</table>
</s:decorate></td>
</tr>
<tr>
<td class="required-field"><h:outputText
value="#{messages['rich.itemCode'] }" /></td>
<td><s:decorate id="CodeDecId">
<table cellspacing="0" cellpadding="0">
<tr>
<td><h:inputText id="code"
value="#{stocksAction.admItem.code}" /></td>
</tr>
<tr>
<td><s:message errorClass="error" /></td>
</tr>
<tr>
<td><a:outputPanel ajaxRendered="true">
<div style="display: block;">
<h:messages style="color:red; font-size:12px;"></h:messages>
</div>
<td width="20"><rich:spacer width="20"/></td>
</a:outputPanel></td>
</tr>
</table>
</s:decorate></td>
</tr>
<tr>
<td class="required-field"><h:outputText
value="#{messages['rich.startDate'] }" /></td>
<td><s:decorate id="dateDecId">
<table cellspacing="0" cellpadding="0">
<tr>
<td><rich:calendar id="startDate"
value="#{stocksAction.admItem.startdate}"
label="Start Date" inputStyle="width: 130px;"
required="true" /></td>
</tr>
<tr>
<td><s:message errorClass="error" /></td>
</tr>
</table>
</s:decorate></td>
</tr>
<tr>
<td class="required-field"><h:outputText
value="#{messages['rich.initialCount'] }" /></td>
<td><s:decorate id="countDecId">
<table cellspacing="0" cellpadding="0">
<tr>
<td><h:inputText id="countId"
value="#{stocksAction.admItem.initialCount}" /></td>
</tr>
<tr>
<td><s:message errorClass="error" /></td>
</tr>
</table>
</s:decorate>
</td>
</tr>
</table>
</rich:tab>
<rich:tab label="#{messages['title.officeLocations']}"
name="OfficeLocation" value="OfficeLocation">
<rich:dataTable id="officeLocList" var="office"
value="#{stocksAction.retrieveOffices()}" width="100%"
rowClasses="rich-table-oddRow,rich-table-evenRow"
columnClasses="align-left">
<rich:column width="10">
<h:selectBooleanCheckbox
value="#{stocksAction.officesForRequest[office]}" />
</rich:column>
<h:column>
<h:outputText value="#{office.city.name}" />
</h:column>
</rich:dataTable>
</rich:tab>
</rich:tabPanel>
</s:validateAll>
</h:panelGroup>
<br />
<h:panelGroup>
<a:commandButton value="#{messages['button.confirm']}"
title="#{messages['button.confirm']}"
action="#{stocksAction.confirmStocks()}" />
<h:commandButton action="#{stocksAction.can_button()}"
immediate="true" value="#{messages['button.cancel']}"
title="#{messages['button.cancel']}" />
</h:panelGroup>
</h:form>
+