On Feb 1, 2008 3:06 PM, Walter Mourão <[EMAIL PROTECTED]> wrote: > I see... > by the way: is this the correct way to know when a specific component > started the PPR ?
for monitoring? yeah, use similar custom JS, or just add the <tr:statusIndicator> component -M > > > -- > Walter Mourão > http://arcadian.com.br > http://waltermourao.com.br > > 2008/2/1, Matthias Wessendorf <[EMAIL PROTECTED]>: > > > not really. > > > > in case you do a ppr submit, u could use this: > > function loader(state) > > { > > var busy = state == TrRequestQueue.STATE_BUSY; > > var div = document.getElementById("load"); > > div.style.display = busy ? "inline" : "none"; > > if(!busy) > > { > > > TrPage.getInstance().getRequestQueue().removeStateChangeListener(loader); > > } > > } > > function addListener() > > { > > var requestQueue = TrPage.getInstance().getRequestQueue(); > > requestQueue.addStateChangeListener(loader); > > } > > > > the link/button: > > <tr:commandLink id="delete" partialSubmit="true" > > onclick="addListener();" ......> > > > > On Jan 31, 2008 11:57 PM, Richard Yee <[EMAIL PROTECTED]> wrote: > > > Everyone, > > > I am showing a "Loading...." message when the user submits a form in my > > > MyFaces/Trinidad application by having an onclick handler set the > 'display' > > > style to be 'inline' for my a tr:outputText tag. This works fine unless > > > there is a validation error on the page for a required field. In this > case, > > > the JavaScript code for Trinidad detects the empty field and the page is > not > > > submitted. My "Loading..." message is still displayed however. Is there > a > > > way to hook into the Trinidad JavaScript validation code so that I can > have > > > one of my JavaScript functions set the display style back to none in > this > > > case? > > > > > > Thanks, > > > > > > Richard > > > > > > > > > > > -- > > Matthias Wessendorf > > > > further stuff: > > blog: http://matthiaswessendorf.wordpress.com/ > > sessions: http://www.slideshare.net/mwessendorf > > mail: matzew-at-apache-dot-org > > > > > > -- Matthias Wessendorf further stuff: blog: http://matthiaswessendorf.wordpress.com/ sessions: http://www.slideshare.net/mwessendorf mail: matzew-at-apache-dot-org

