简体   繁体   中英

Is seam page action normally executed as an initial request or on a postback?

I implemented some page action on one of my view..it appears that when i load or access the page/view.. the method on my component get executed every time..IS this normal behavior in seam or i am missing something...


I already solved my problem..What i am trying to accomplish is a initial request when a page is requested either by typing the page URL of the page in the address bar or from a result of a bookmark. In SEAM it is achieved via they call page action.You declare page action in component descriptor or the component.xml...

<page view-id="/list.xhtml">
    <action execute="#{conpoentName.componentMethod}" on-postback="false"/>

If the attribute on-postback is not stated..what happen is a continues call to component method when i tried to access the page..it's like having a infinite call..

Anybody knows what is happening in the background?..Its seams related to postback..

Yes it is normal behavior. Take a look at Seam FAQ JSF Postback You want to perform an action when a page is initially loaded, if you don't want that action executed on repeated access you use the Postback attribute, or put some logic in the execute method to prevent it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM