Hi - Even I am having difficulty in getting popup working; the flow just goes to full page display.
I am using Spring MVC 2.5.3, webflow 2.0.8 and displaytag 1.2 without tiles.
If anyone has working example to trigger popup in jsp, can you please help me?
I am trying to display the popup from the href link. Please see below for the configurations I have done to load dojo.
1. Added resource servlet to web.xml
Code:
<!-- To allow the loading of Dojo resources within the jar bundle -->
<servlet>
<servlet-name>Resource Servlet</servlet-name>
<servlet-class>
org.springframework.js.resource.ResourceServlet
</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Resource Servlet</servlet-name>
<url-pattern>/resources/*</url-pattern>
</servlet-mapping>
2. flow definition file
Code:
<!-- By default, the first state is the start state. -->
<view-state id="agencySearch" model="principalData"
view="agency/principal_account_details">
<on-entry>
<evaluate
expression="agencySearchDetailsAction.accountDetails(flowRequestContext)" />
</on-entry>
<transition on="editBond" to="bonds" />
<transition on="addBond" to="bonds" />
<transition on="bondComments" to="comments" />
<transition on="removeBond" to="agencySearch">
<set name="flowScope.bondId"
value="requestParameters.bondId" type="java.lang.String" />
<set name="flowScope.action"
value="requestParameters.action" type="java.lang.String" />
<evaluate
expression="agencySearchDetailsAction.processBonds(flowRequestContext)" />
</transition>
<transition on="back" to="searchResults" />
</view-state>
<!--comments popup -->
<view-state id="comments" view="agency/commentsPopUp" model="commentsData"
popup="true">
<on-entry>
<set name="flowScope.id" value="requestParameters.id"
type="java.lang.String" />
<set name="flowScope.type"
value="requestParameters.type" type="java.lang.String" />
</on-entry>
<on-render>
<evaluate
expression="agencySearchDetailsAction.processComments(flowRequestContext,'get')" />
</on-render>
<transition on="addComment" to="agencySearch">
<evaluate
expression="agencySearchDetailsAction.processComments(flowRequestContext,'add')" />
</transition>
</view-state>
3. My jsp page: the bondLink is a wrapper class which returns the link based on some condition. Highlighted in red is the sample example of the href link
<a href="companyAccountFlow.do?_flowExecutionKey=e1s1 &_eventId=bondComments&type=Bond&id=112" id="commentsLnk">comments\n</a>
Code:
<head>
<style type="text/css" media="screen">
@import url("<c:url value="/resources/dojo/resources/dojo.css"/>");
@import url("<c:url value="/resources/dijit/themes/tundra/tundra.css"/>");
</style>
<script type="text/javascript"
src="<c:url value="/resources/dojo/dojo.js"/>"></script>
<script type="text/javascript"
src="<c:url value="/resources/spring/Spring.js" />"> </script>
<script type="text/javascript"
src="<c:url value="/resources/spring/Spring-Dojo.js" />"></script>
</head>
<display:column property="bondLinks" title="" media="html"
class="customer" headerClass="customer" />
<script type="text/javascript">
Spring.addDecoration(new Spring.AjaxEventDecoration({
elementId: "commentsLnk",
event: "onclick",
popup: true,
params: {fragments: "commentsPopUp"}
}));
When I click on the link, the popup is not triggered instead navigates to full page display. I am not sure what I missed, I really appreciate if any one can help me.