Hi,

<managed-bean>
       <managed-bean-name>barcaBean</managed-bean-name>
       <managed-bean-class>com.fc.barcelona.BarcaBean</managed-bean-class>
       <managed-bean-scope>request</managed-bean-scope>
       <managed-property>
           <property-name>playerId</property-name>
           <value>#{param.playerId}</value>
       </managed-property>
</managed-bean>

Example:
playerDetail.jsf?playerId=10

So when there is request param called playerId in the request parameter map,
it'll be used automatically to set the playerId property of barcaBean
assuming there are references to barcaBean in the playerDetail.jsf page.

Cagatay

On 5/14/07, Todd Nine <[EMAIL PROTECTED]> wrote:

Perhaps I should be more clear, my last post didn't make much sense.  I've
been using EL (obviously since I have JSF pages), but I'm not sure how to
bind to bean values using simple HTTP named params.

Thanks,
Todd

On 5/14/07, Todd Nine <[EMAIL PROTECTED]> wrote:
>
> I've never heard of EL before, and I'm having trouble finding it on the
> wiki.  Thanks for your input, can you please point me in the direction of
> the documentation?
>
> Thanks,
> Todd
>
> On 5/10/07, Scott O'Bryan <[EMAIL PROTECTED]> wrote:
> >
> > Use use el in your faces-config to bind the request parameters to
> > managed properties on your managed beans.  This won't CALL your code,
> > but when you retrieve the beans to render your page, the managed
> > properties should be set for you.
> >
> > Scott
> >
> > [EMAIL PROTECTED] wrote:
> > >
> > > How would one's code be called to manipulate this managed bean when
> > > such a request comes through? Is the only way with a PhaseListener?
> > >
> > >
> > >
> > >
> > >
> > > *"Scott O'Bryan" <[EMAIL PROTECTED]>*
> > >
> > > 05/10/2007 03:06 PM
> > > Please respond to
> > > "MyFaces Discussion" < [email protected]>
> > >
> > >
> > >
> > > To
> > >       MyFaces Discussion < [email protected]>
> > > cc
> > >
> > > Subject
> > >       Re: Calling JSF page from html page
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > Using request parameters, you could also create a managed property
> > in a
> > > managed bean in your FacesConfig.  Use EL to bind the request
> > property
> > > to your bean.  Your bean would then be able to generate the results
> > > needed  for the bindings on your page.   :)  It removes the need to
> > do
> > > anything too fancy...
> > >
> > > Andrew Robinson wrote:
> > > > I don't think that this is not the best way of doing this. The
> > > > UICommand may not decide to decode the way you think it will. What
> > I
> > > > would recommend doing is using request parameters. In an on-load
> > style
> > > > method of your page, check for the existence of that request
> > parameter
> > > > and execute your method.
> > > >
> > > > Or you can create a custom servlet to do this. See
> > > > http://wiki.apache.org/myfaces/InvokingJsfPagesWithStandardUrls
> > > >
> > > > Also, a view will only decode and go through the lifecycle if the
> > view
> > > > was already created. In your attempt, there is no view to
> > deserialize
> > > > for the page, and thus no decode and then no actions and the
> > submitted
> > > > values will be thrown out.
> > > >
> > > > Using a servlet or on-load method I really think is the right way
> > to go.
> > > >
> > > > As for on-load functionality check out JBoss-Seam jsf-comp on-load
> > or
> > > > the shale view handler.
> > > >
> > > > On 5/10/07, Todd Nine <[EMAIL PROTECTED] > wrote:
> > > >> Hi all,
> > > >>   I'm trying to call a JSF application from a plain HTML form on
> > a
> > > >> different
> > > >> subdomain (and server).  Its a search so I only have 1 input
> > field.
> > > >> I have
> > > >> include the code below.  I need to call the method
> > "performSearch" on
> > > >> the
> > > >> bean that's associated with my searchResults.jsf page.  It
> > renders
> > > >> the page,
> > > >> but never invokes the method.  What do I need in my form to do
> > this?
> > > >>
> > > >> <script type="text/javascript">
> > > >>     function clearForm(textField) {
> > > >>     textField.value = "";
> > > >>     }
> > > >> </script>
> > > >>
> > > >> <div class="searcher">
> > > >> <p>Search</p>
> > > >> <form name="frmSearch" action="searchResults.jsf" method="post"
> > > >> enctype="application/x-www-form-urlencoded">
> > > >>     <input id="searchTerms" name="searchTerms" type="text"
> > > >> value="Search"
> > > >> onclick="clearForm(this);" class="searchInput"
> > > >> onfocus="clearForm(this);" />
> > > >>     <input id="performSearch" name="performSearch" type="image"
> > > >> src="images/btn_go.jpg"  style="align:right;" class="go_btn" />
> > > >>
> > > >> </form>
> > > >>  </div>
> > > >>
> > > >
> > >
> > >
> > >
> > > _________________________
> > >
> > > CONFIDENTIALITY NOTICE
> > >
> > > The information contained in this e-mail message is intended only
> > for
> > > the exclusive use of the individual or entity named above and may
> > > contain information that is privileged, confidential or exempt from
> > > disclosure under applicable law. If the reader of this message is
> > not
> > > the intended recipient, or the employee or agent responsible for
> > > delivery of the message to the intended recipient, you are hereby
> > > notified that any dissemination, distribution or copying of this
> > > communication is strictly prohibited. If you have received this
> > > communication in error, please notify the sender immediately by
> > e-mail
> > > and delete the material from any computer.  Thank you.
> >
> >
>

Reply via email to