show rich:modalpanel after request
anicapil Feb 1, 2011 6:51 AM<a4j:commandButton id="sendButton"
value="#{messages.button_send_to_countries}"
action="#{productListManager.validateBeforeSendToCountries}"
styleClass="rich-button"
reRender="selectcountries_panel"
oncomplete="Richfaces.showModalPanel('selectcountries_panel')"/>
<!--rich:componentControl for="selectcountries_panel" attachTo="sendButton"
operation="show"
event="oncomplete"/-->
</td>
</tr>
</tbody>
</table>
</a4j:region>
</a4j:form>
<rich:modalPanel id="selectcountries_panel" width="445" height="255">
<f:facet name="header">
<h:panelGroup>
<h:outputText value="#{messages.page_title_select_countries}"/>
</h:panelGroup>
</f:facet>
<f:facet name="controls">
<h:panelGroup>
<h:graphicImage value="/images/close_modal_panel.png" styleClass="hidelink" id="hidelink"/>
<rich:componentControl for="selectcountries_panel" attachTo="hidelink" operation="hide"
event="onclick"/>
</h:panelGroup>
</f:facet>
<a4j:form id="selectCountries_form">
<div class="label"
style="float: left; padding-left: 8px; width: 270px;">#{messages.label_availableCountries}</div>
<div class="label">#{messages.label_selectedCountries}</div>
<rich:pickList id="countriesShuttle"
value="#{productListManager.selectedCountryCodes}"
required="true"
requiredMessage="#{messages.error_select_production_countries}"
copyControlLabel="#{messages.label_add_selected_button_title}"
copyAllControlLabel="#{messages.label_add_all_button_title}"
removeControlLabel="#{messages.label_remove_selected_button_title}"
removeAllControlLabel="#{messages.label_remove_all_button_title}">
<f:selectItems value="#{productListManager.availableCountriesSelectItems}"/>
</rich:pickList>
<table>
<tr>
<td colspan="2">
<rich:message for="countriesShuttle" errorClass="errorMessage"/>
</td>
</tr>
</table>
<table width="405">
<tr>
<td> </td>
<td align="right" width="100%">
<a4j:commandButton id="sendToCountriesButton" styleClass="rich-button"
value="#{messages.button_send_to_countries}"
action="#{productListManager.sendToCountries}"/>
</td>
<td align="right" width="100%">
<a4j:commandButton id="canel_panel" styleClass="rich-button"
value="#{messages.button_cancel}">
<rich:componentControl for="selectcountries_panel" attachTo="canel_panel"
operation="hide"
event="onclick"/>
</a4j:commandButton>
</td>
</tr>
</table>
</a4j:form>
</rich:modalPanel>
Hi!
if action returns null, i want to display rich:pickList. Any clue how can i fix it?Thanks.
*My action method return facemessages or null.