When is you page disappearing?  After you click "Submit"?  You submit
is not using Ajax.  If you want to update your div when you submit the
form then you could write a function that notifies your listen topic
rather than submitting the form.

Rich



On Tue, Feb 26, 2008 at 7:22 AM, Prashant Khanal
<[EMAIL PROTECTED]> wrote:
> Hello all,
>
>  Somehow my header and footer provided by my decorator page disappears after
>  ajax call. My jsp page that makes ajax call is shown below:
>  <%@ include file="/common/taglibs.jsp"%>
>  <head>
>  <s:head theme="ajax" debug="true" />
>  <title>Demand Plan</title>
>  </head>
>  <body>
>  <s:form id="demandForm" name="demandForm" action="saveDemandPlan">
>     <li>Sequence: <s:property
>         value="%{#session.planSequence.sequenceName}" /></li>
>     <li><s:textfield key="demand.totalDemand" name="totalDemand"
>         cssClass="text large" required="true" theme="css_xhtml"
>  onchange="javascript:dojo.event.topic.publish('distributeDemandTopic');"
>  /></li>
>
>     <s:url id="distributedDemand" action="distributedDemand"/>
>     <s:div theme="ajax" href="%{distributedDemand}" formId="demandForm"
>         listenTopics="distributeDemandTopic"/>
>     <li><s:submit cssClass="button" /></li>
>  </s:form>
>  </body>
>
>  The page that is comes as an ajax response is:
>  <%@ include file="/common/taglibs.jsp" %>
>  <display:table name="selectedDemandPlans" id="selectedDemandPlan">
>             <display:column title="HierarchyLevelEntity" property="
>  hierarchyLevelEntity.entityName" />
>             <display:column title="Forecast Demand"><s:textfield
>  
> name="selectedDemandPlansMap[%{#attr.selectedDemandPlan.hierarchyLevelEntity.entityId}].forecastDemand"
>  value="%{#attr.selectedDemandPlan.forecastDemand}"
>  theme="simple"/></display:column>
>             <display:column title="% Total"><s:textfield
>  
> name="selectedDemandPlansMap[%{#attr.selectedDemandPlan.hierarchyLevelEntity.entityId}].percentageTotal"
>  value="%{#attr.selectedDemandPlan.percentageTotal}"
>  theme="simple"/></display:column>
>  </display:table>
>
>  The snippet of struts.xml that configures the action is:
>  <action name="planDemand" class="demandPlanAction">
>             <result name="success">/WEB-INF/pages/demandPlan.jsp</result>
>         </action>
>
>         <action name="distributedDemand" class="demandPlanAction"
>  method="distribute">
>             <result
>  name="success">/WEB-INF/pages/distributedDemands.jsp</result>
>         </action>
>
>  After an ajax call my header and footer disappears.
>  What can be the problem? :(
>
>  --
>  Thanks,
>  Prashant Khanal
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to