You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Demetz Markus <ne...@webeffects.it> on 2006/01/20 13:14:35 UTC
Struts-Faces h:dataTable
Hi!
I'm trying to integrate struts-faces to my Struts applications.
In the execute(...) method I put a Collection of items ("bookList") to the
request and forward to a faces page. I wondered if in the faces page i could
do something like this:
<h:dataTable var="book" value="#{request.getAttribute('bookList'}">
<h:column>
<f:facet name="header">Title</f:facet>
<h:outputText value="#{book.title}"/>
</h:column>
<h:column>
<f:facet name="header">Author</f:facet>
<h:outputText value="#{book.author}"/>
</h:column>
<h:column>
<f:facet name="header">Available</f:facet>
<h:outputText value="#{book.available}"/>
</h:column>
</h:dataTable>
But this leads to an Assertion-Error.
Is it possible in any way to use a request attribute as an input for the
dataTable?
Thanks,
Markus
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Manipulating reques object ???? - urgent please
Posted by Dave Newton <ne...@pingsite.com>.
Sony Thomas wrote:
> Is there is any way to manipulate the value of request object. I have
> a text field in my jsp called "locationName". when I use
> "request.getParamentName("locationName") in my action, I am getting
> the value entered in my jsp. While forwarding from my action, if i
> want to reset the value of locationName to a different value - what
> should I do? How can I do ? please give me some clues???
You should do it some other way, most likely by setting an attribute, or
by using a modified value further downstream.
The parameter map is immutable: if it was mutable then they wouldn't
necessarily be the request parameters anymore.
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Manipulating reques object ???? - urgent please
Posted by David Delbecq <de...@oma.be>.
put get/set locationName in your struts form,
in your jsp use <html:text property="locationName"/>
httpservletrequest does not have a setParameter method.
Le Vendredi 20 Janvier 2006 14:47, Sony Thomas a écrit :
> Hi,
>
> Is there is any way to manipulate the value of request object. I have a
> text field in my jsp called "locationName". when I use
> "request.getParamentName("locationName") in my action, I am getting the
> value entered in my jsp. While forwarding from my action, if i want to
> reset the value
> of locationName to a different value - what should I do? How can I do ?
> please give me some clues???
>
> thanks in advance
>
>
> sony
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
--
David Delbecq
Royal Meteorological Institute of Belgium
-
Pingouins dans les champs, hiver méchant
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Manipulating reques object ???? - urgent please
Posted by Wendy Smoak <ws...@gmail.com>.
On 1/20/06, Sony Thomas <so...@genialgenetics.com> wrote:
> Is there is any way to manipulate the value of request object. I have a
> text field in my jsp called "locationName". when I use
> "request.getParamentName("locationName") in my action, I am getting the
> value entered in my jsp. While forwarding from my action, if i want to
> reset the value
> of locationName to a different value - what should I do? How can I do ?
> please give me some clues???
Since you're asking on the Struts list, the typical way to do this
would be to let the framework populate a form bean for you. Then in
the Action code you can change the form bean's property values.
form.setLocationName(...);
If you aren't using forms, you can set request _attributes_ (rather
than parameters). Try
request.setAttribute(...); . The setAttribute method is also
available for session and application scope.
--
Wendy
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Manipulating reques object ???? - urgent please
Posted by Sony Thomas <so...@genialgenetics.com>.
Hi,
Is there is any way to manipulate the value of request object. I have a
text field in my jsp called "locationName". when I use
"request.getParamentName("locationName") in my action, I am getting the
value entered in my jsp. While forwarding from my action, if i want to
reset the value
of locationName to a different value - what should I do? How can I do ?
please give me some clues???
thanks in advance
sony
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org