This is exciting. One more question: What if you wanted to write your own command component? How would you trigger an action with sendFormPost?
On 6/15/07, Adam Winer <[EMAIL PROTECTED]> wrote:
The XmlHttpRequest code has landed! Give the latest 1.0.2-SNAPSHOT a try. The method you want is currently: TrPage.getInstance().sendFormPost(theForm, params, headerParams); ... though that probably will change in a few ways before the final release of 1.0.2. -- Adam On 6/15/07, noah <[EMAIL PROTECTED]> wrote: > On 6/14/07, Adam Winer <[EMAIL PROTECTED]> wrote: > > There's no publicly supported way to fire a PPR request now, > > but there will be once the XmlHttpRequest code is merged in. > > > > -- Adam > > > > Huzah! That will be good for us component developers :) > > If you're looking for a temporary hack that will almost certainly > break on upgrade, I've been using _submitPartialChange. > > Here's what the java(script)doc says: > * @param form The form to submit. This can either be the name of the form > * in the current <code>document</code>, the index of the form > * in the current <code>document</code> or the form itself. > * @param doValidate boolean value specifying whether validation should > * occur before the form is submitted. (As per a common Javascript > * idiom, it is acceptable to pass true/false as well as 0/1). If > * this parameter is ommitted, it defaults to true. > * @param parameters a single Javascript object that specifies > * all the additional key-value pairs to submit. There must be > * pre-existing <input type="hidden"> elements as targets > * for each of these parameters > > You'll have to combine that with server side code like: > > RequestContext.getCurrentInstance().addPartialTarget( componentToRefresh ); > > A slightly more robust hack might be to have a display:none > tr:commandButton with partialSubmit set to true and then grab the DOM > node and call click(). Then you could use partialTriggers and such. I > haven't tried it, and this certainly isn't a sanctioned or supported > hack :) I am not a commiter. > > > > > > > On 6/14/07, Renzo Tomaselli <[EMAIL PROTECTED]> wrote: > > > Hi, I'm looking for a method to trigger PPR upon setting certain > > > conditions on client operations. > > > I have a multipanel page, where one panel contains an iframe for > > > rendering a blob through browser plugins. > > > Users are allowed to swap, minimize and restore panels through js, thus > > > these operations are purely client-bound. > > > When the Adobe plugin is involved to manage iframe contents (both on IE > > > and FF), the iframe area is not refreshed after its panel is restored or > > > swapped. > > > Don't ask me why. > > > Thus I need to force a refresh, and this would be much better if > > > partial, e.g. concerning only that panel. > > > How can I trigger it from js ? > > > Thanks -- Renzo > > > > > > > > >

