You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by William Noto <wn...@auto-roi.com> on 2006/07/26 15:45:38 UTC

Instead of <%=getValue%>

I'm trying to use some javascript that will call one of the properties of a
managed bean.

 

I'd like to do something to the effect of:

 

var campaignArray = #{campaignForm.campaignArray};

 

but the HTML source shows that the expression was never evaluated.

 

Long ago I would have written:

 

var var = <%=Obj.getWhatever()%>

 

but I'm supposed to avoid the <% %> right?

 

 

 

 


Re: Instead of <%=getValue%>

Posted by Cosma Colanicchia <co...@gmail.com>.
I suggest you to take a look at facelets, it allows using EL
expression anywhere in the page.. then you could just do:

var campaignArray = #{campaignForm.campaignArray};


Cosma

2006/7/26, Andrew Robinson <an...@gmail.com>:
> "var campaignArray = #{campaignForm.campaignArray};" is valid in JSP
> 2.1 or Facelets only. For JSP (not facelets) use:
>
> var campaignArray = <t:outputText value="#{campaignForm.campaignArray}" />;
>
> On 7/26/06, William Noto <wn...@auto-roi.com> wrote:
> >
> >
> >
> >
> > I'm trying to use some javascript that will call one of the properties of a
> > managed bean.
> >
> >
> >
> > I'd like to do something to the effect of:
> >
> >
> >
> > var campaignArray = #{campaignForm.campaignArray};
> >
> >
> >
> > but the HTML source shows that the expression was never evaluated.
> >
> >
> >
> > Long ago I would have written:
> >
> >
> >
> > var var = <%=Obj.getWhatever()%>
> >
> >
> >
> > but I'm supposed to avoid the <% %> right?
> >
> >
> >
> >
> >
> >
> >
> >
>

Re: Instead of <%=getValue%>

Posted by Andrew Robinson <an...@gmail.com>.
"var campaignArray = #{campaignForm.campaignArray};" is valid in JSP
2.1 or Facelets only. For JSP (not facelets) use:

var campaignArray = <t:outputText value="#{campaignForm.campaignArray}" />;

On 7/26/06, William Noto <wn...@auto-roi.com> wrote:
>
>
>
>
> I'm trying to use some javascript that will call one of the properties of a
> managed bean.
>
>
>
> I'd like to do something to the effect of:
>
>
>
> var campaignArray = #{campaignForm.campaignArray};
>
>
>
> but the HTML source shows that the expression was never evaluated.
>
>
>
> Long ago I would have written:
>
>
>
> var var = <%=Obj.getWhatever()%>
>
>
>
> but I'm supposed to avoid the <% %> right?
>
>
>
>
>
>
>
>