Support for Ajax based redirects, and modal view states.
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
|
||||
<web:flow-executor id="flowExecutor" flow-registry="flowRegistry">
|
||||
<web:flow-execution-attributes>
|
||||
<web:alwaysRedirectOnPause value="false"/>
|
||||
<web:alwaysRedirectOnPause value="true"/>
|
||||
</web:flow-execution-attributes>
|
||||
<web:flow-execution-listeners>
|
||||
<web:listener ref="jpaFlowExecutionListener" criteria="*"/>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<h2>Hotel Results</h2>
|
||||
<p>
|
||||
<b>Search Criteria:</b> #{searchCriteria}<br/>
|
||||
<sf:commandLink value="Edit Criteria" onclick="dijit.byId('dialog1').show();" action="changeSearch" renderIds="hotelSearchFragment"/>
|
||||
<sf:commandLink value="Edit Criteria" action="changeSearch" renderIds="hotelSearchFragment"/>
|
||||
</p>
|
||||
<h:outputText id="noHotelsTxt" value="No Hotels Found" rendered="#{hotels.rowCount==0}"/>
|
||||
<h:dataTable id="hotels" styleClass="summary" value="#{hotels}" var="hotel" rendered="#{hotels.rowCount > 0}">
|
||||
@@ -36,7 +36,7 @@
|
||||
<h:column>
|
||||
<f:facet name="header">Action</f:facet>
|
||||
<!-- @TODO - THIS LINK DOES NOT WORK ON MYFACES 1.2.0 WHEN AJAX IS ENABLED BECAUSE THEY HAVE NOT IMPLEMENTED UIData.invokeOnComponent -->
|
||||
<sf:commandLink id="viewHotelLink" value="View Hotel" ajaxEnabled="false" action="selectHotel"/>
|
||||
<sf:commandLink id="viewHotelLink" value="View Hotel" action="selectHotel"/>
|
||||
</h:column>
|
||||
</h:dataTable>
|
||||
<div class="next">
|
||||
@@ -51,12 +51,5 @@
|
||||
</div>
|
||||
</div>
|
||||
</h:form>
|
||||
<script type="text/javascript">
|
||||
dojo.require("dijit.Dialog");
|
||||
dojo.require("dojo.parser");
|
||||
</script>
|
||||
<div dojoType="dijit.Dialog" id="dialog1" title="First Dialog">
|
||||
<div id="hotelSearch"> </div>
|
||||
</div>
|
||||
</ui:define>
|
||||
</ui:composition>
|
||||
@@ -33,7 +33,7 @@
|
||||
</h:selectOneMenu>
|
||||
</div>
|
||||
<div class="searchButton">
|
||||
<sf:commandButton id="findHotels" value="Find Hotels" ajaxEnabled="false" actionListener="#{searchCriteria.findHotelsListener}" action="findHotels"/>
|
||||
<sf:commandButton id="findHotels" value="Find Hotels" processIds="*" actionListener="#{searchCriteria.findHotelsListener}" action="findHotels"/>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
@@ -25,7 +25,12 @@
|
||||
<action method="findHotels" bean="mainActions" />
|
||||
</render-actions>
|
||||
<transition on="selectHotel" to="displayHotel"/>
|
||||
<transition on="changeSearch" to="displayMain"/>
|
||||
<transition on="changeSearch" to="editSearchPopup"/>
|
||||
</view-state>
|
||||
|
||||
<view-state id="editSearchPopup" view="main.xhtml">
|
||||
<attribute name="modal" value="true" type="java.lang.Boolean"/>
|
||||
<transition on="findHotels" to="findHotels" />
|
||||
</view-state>
|
||||
|
||||
<view-state id="displayHotel" view="hotelDetails.xhtml">
|
||||
|
||||
Reference in New Issue
Block a user