Hi all,

On my page I have a table which contains a panelPopup to add data to this
table.  The panelPopup has an action and an actionListener of my backing
bean.  This results in a full reload of my page (and repositioning to the
top of my page).  I want to avoid a repositioning...  How can I do this?

My jsp looks like this:
<tr:table id="calculationOverviewTable"
binding="#{calculationOverviewActions.overviewTable}"
        value="#{calculationOverviewActions.overview.dataModel}" var="row"
varStatus="rowStatus" width="100%" 
        autoSubmit="true" summary="Calculation Overview" >
        <tr:column>
                <f:facet name="header">
                        <tr:outputText value="Date"/>
                </f:facet>
                <tr:outputText value="#{row.date}" converter="DateConverter"/>
        </tr:column>
        <tr:column>
                <f:facet name="header">
                        <tr:outputText value="Results" />
                </f:facet>
                <tr:panelFormLayout>
                        <tr:table id="results" value="#{row.results}" 
var="result"
rendered="#{row.results != null}">
                                <tr:column>
                                        <tr:outputText 
value="#{result.type.id}" shortDesc="#{result.type}"/>
                                </tr:column>
                                <tr:column>
                                        <tr:outputText 
value="#{result.valueString}"/>
                                </tr:column>                                    
                        </tr:table>
                        
                        <tr:panelPopup 
onclick="setCurrentSelectedShift('#{row.shiftId}');"
text="Add absence" 
                                                        
title="#{text['calculationOverview.addAbsenceTitle']}
#{row.dateStringForTitle}  " modal="true" position="relative">
                                <tr:selectOneChoice label="AbsenceType"
value="#{calculationOverviewActions.currentSelectedAbsenceType}"
required="yes" immediate="true">
                                        <f:selectItems 
value="#{calculationOverviewActions.absenceTypes}" />
                                </tr:selectOneChoice>                           
        
                                <tr:selectOneRadio
value="#{calculationOverviewActions.currentSelectedAbsenceDuration}"
required="yes" immediate="true">
                                                        <f:selectItems 
value="#{calculationOverviewActions.absenceDurations}"
/>
                                </tr:selectOneRadio>
                                <tr:commandButton text="Submit" id="submitBtn"  
                                                                        
action="#{calculationOverviewActions.createAbsence}" 
                                                                
actionListener="#{calculationOverviewActions.createAbsenceActionListener}"
/>                                      
                                <tr:commandButton text="Cancel" id="cancelBtn" 
immediate="true"
action="#{calculationOverviewActions.cancel}"/>
                        </tr:panelPopup>
                </tr:panelFormLayout>
        </tr:column>                            
</tr:table>


And the actions in my backingBean look like this:
    public Event createAbsence()
    {
        return success();
    }

    public void createAbsenceActionListener(final ActionEvent event)
    {
        this.pspManager.updateBalance(this.currentSelectedShiftId,
getAbsenceType(), getAbsenceDuration());

        setOverviewData(OverviewType.ALL);
                
                this.absenceTypes = new ArrayList<SelectItem>();
        this.absenceTypes.add(new SelectItem("VAC", "Holiday"));
        this.absenceTypes.add(new SelectItem("SICK"", "Sick"));
                
        this.absenceDurations = new ArrayList<SelectItem>();
        this.absenceDurations.add(new SelectItem("DAY", "Full day"));
        this.absenceDurations.add(new SelectItem("HALF", "Half day"));

                EmployeeListModel empModel = new 
EmployeeListModel(this.employeeManager);
        getRequest().setAttribute("employees", empModel);
                
                this.overview = getOverviewModel();
    }
-- 
View this message in context: 
http://www.nabble.com/-TRINIDAD--Avoid-full-reload-of-page-tp18086524p18086524.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.

Reply via email to