jsr372-experts@javaserverfaces-spec-public.java.net

[jsr372-experts] Re: Partial Execution with Non-Ajax

From: arjan tijms <arjan.tijms_at_gmail.com>
Date: Thu, 15 Jan 2015 23:43:06 +0100

Hi,

On Thu, Jan 15, 2015 at 9:58 PM, Michael Müller
<michael.mueller_at_mueller-bruehl.de> wrote:
>> <h:commandButton execute=“@this someinput” value=“Cancel” />
>>
>> It should be easy to support by sending a parameter to the server and
>> override isPartial() in PartialViewContext.
>
> ... how do you want to send the request to the server without using Ajax?

If I understood the case correctly, I'd say just as you normally do.
The execute attribute is about what fields the server processes. For
instance suppose you have:

<h:inputText id="name" value="#{bean.name}" />
<h:inputText id="email" value="#{bean.email}" />

Now consider that in some cases you only want that "name" is
processed, and that "email" is ignored (server side). Ignored here
then means no converter or validator runs for the "email" component
and no value (if any was provided) is pushed into the model.


> Using an IFrame???
> If you send this as "normal" request, how would you handle the answer?

Again, if my understanding is correct just as you normally do. A full
response would be returned which the browser renders as it does any
response.

Kind regards,
Arjan


> Usually thw browser would display the return as (new) page. And a I
> understand your suggestion, you simply like to receive a partial answer to
> modify the existing DOM.
> IMHO you need a pice of software to receive this partial answer and to
> modify the DOM. This piece will be written using JavaScript and, voilà,
> we're using Ajax. Or I'm missing something?
>
> On the other hand, it's seems to be a nice syntax replacement for
>
> <h:commandButton value=“Cancel”>
>
> <f:ajax execute=“@this someinput”/>
> </h:commandButton>
>>
>>
>> Do I miss something?
>>
>> Regards,
>>
>> Cagatay Civici
>> PrimeFaces Lead
>> PrimeTek Informatics
>> www.primefaces.org
>>
>>
> Best,
> Michael