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

Reply via email to