How can I save the state of a repeat control?

前端 未结 1 439
我在风中等你
我在风中等你 2021-01-07 09:26

I have a repeat control generated based on a view.
I\'d like to save the state of the repeat control when a user navigates to a document and returns.
I have tried th

相关标签:
1条回答
  • 2021-01-07 10:20

    I dont know if the xe:pagerSaveState should work with the repeat control. I always use the xe:pagerSaveState in combination with a View/DataView/ForumView. But when useing a reapeat i do something like this to get my state back:

    When opening the 'EditYourDocument.xsp' XPage write the first element of the xp:repeat control to a scope like:

    sessionScope.put('first',getComponent("repeat1").first);
    context.redirectToPage("editDocument.xsp");
    

    and add this code to your repteat:

    first="#{javascript:return (sessionScope.first != null)?sessionScope.first:0;}">
    

    when comming back to your view from any other site your view should display to the right page and data.

    0 讨论(0)
提交回复
热议问题