Oh, one more comment on this feature... if you don't include the #{} in
an output value, it will default to #{requestScope.<your variable>}. So
you can do:
myHandler(output="foo");
And then in your page:
<h:outputText value="#{foo}" />
Although I discourage implicit EL references like #{foo} and would
instead encourage you to do "#{requestScope.foo}" for better readability
of your code.
Ken
Ken Paulsen wrote:
>
> Hi everyone,
>
> FYI, I changed (fixed?) the way handler's output mappings are
> specified. Before, in order to map an output value from a handler,
> you had to do:
>
> handlerName(output1=>$pageSession{foo});
>
> Where "output1" is the published name of the output for the handler
> (handlerName). Where "pageSession" was the "scope" and "foo" was the
> key withing that scope to save the output value.
>
> Standard EL provides a much better way to bind values, so now you can
> write:
>
> handlerName(output1="#{pageSession.foo}");
>
> This should be a more familiar syntax, and now allows managed beans,
> or other EL-accessible object to be "bound" to a handler. Also, as a
> consequence of making this change, if you have an input and output
> parameter with the same name in your handler, you can treat this as an
> in-out parameter:
>
> inc(value="#{requestScope.myInt}");
>
> If "value" is both an input and output, the above should pass in
> current value of "myInt" and then set it when the handler is
> complete. The downside to this change is that input & output values
> share the same namespace in this case, as a result, I have modified
> all JSFT handlers which had the same input/output parameter names to
> have different names -- if you used one of these handlers, this change
> will break your pages. To fix this, change the old output parameter,
> to "value" (which is what I set the new name to). FYI, as always, you
> can check the "info.jsf" page (http://localhost:8080/yourapp/info.jsf)
> to see all the information (including input/output parameters) of all
> handlers.
>
> This change is available if you build from CVS... I'll push a new
> version of JSFT w/i the next day or two.
>
> Ken
>