You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Cristofer Weber <cr...@gmail.com> on 2006/03/15 10:35:17 UTC

How to reference a managed bean outside JSF tags?

Hi!

I've changed a page in my app to use a tree2 component, mixing JSF, Struts
and Spring, and it's working fine. Now I need to pass a managed bean
property to a html (or Struts) input tag's value. I've tried to do this by
using this scriplet and some variations:

<f:subview id="checkBox"><f:verbatim><input type="checkbox"
name="excluirConta" value="<s:write value="#{node.identifier
}"/>"/></f:verbatim></f:subview>

<s:write> come from the struts-faces project.

This code result in the bean's identifier property value followed by a
checkBox with blank value. I prefer to mantain the checkbox rendered by HTML
(or Struts) tags because I have a lot of code in the action that process
this form.


What can I do to put the beans property value inside the checkBox?



Thanks!!


[]'s

Cristofer

Re: How to reference a managed bean outside JSF tags?

Posted by Craig McClanahan <cr...@apache.org>.
On 3/15/06, Cristofer Weber <cr...@gmail.com> wrote:
>
> Hi!
>
> I've changed a page in my app to use a tree2 component, mixing JSF, Struts
> and Spring, and it's working fine. Now I need to pass a managed bean
> property to a html (or Struts) input tag's value. I've tried to do this by
> using this scriplet and some variations:
>
> <f:subview id="checkBox"><f:verbatim><input type="checkbox"
> name="excluirConta" value="<s:write value="#{node.identifier}"/>"/></f:verbatim></f:subview>
>
>
> <s:write> come from the struts-faces project.
>
> This code result in the bean's identifier property value followed by a
> checkBox with blank value. I prefer to mantain the checkbox rendered by HTML
> (or Struts) tags because I have a lot of code in the action that process
> this form.
>
>
> What can I do to put the beans property value inside the checkBox?
>

Anything inside an <f:verbatim> tag is no longer recognized as a JSF
component tag -- it is just considered raw HTML markup that should be
rendered 'as is'.

Why are you including that?

Thanks!!
>
>
> []'s
>
> Cristofer
>

Craig