users@javaserverfaces.java.net

RE: Re: A question about using the same JSP file to add and update data.

From: Todd Patrick <Todd.Patrick_at_dtn.com>
Date: Wed, 10 Jan 2007 11:12:51 -0600

Roger:

That is the correct presumption.

Hmmm, I would had thought there might had been something that cleared
the Application object cache or state or something similar without
having to re-initialize the backing bean properties again.

I may be way off track here...

Thank you for the suggestion.

--Todd

 

-----Original Message-----
From: Roger.Kitain_at_Sun.COM [mailto:Roger.Kitain_at_Sun.COM]
Sent: Wednesday, January 10, 2007 11:01 AM
To: users_at_javaserverfaces.dev.java.net
Subject: Re: A question about using the same JSP file to add and update
data.

Hello Todd -

I presume you want the fields to appear blank when you are ready to
update?
In your action handler for the update button, you could re-initialize
the backing bean properties before the page is rendered again.


Todd Patrick wrote:

>JSF 1.1
>
>I have a single JSP file.
>
>What I would like to do is use the same JSP file to add *AND* update
>data in the same database table.
>
>I have all of the h:inputText elements' value attributes bind to the
>related backing bean properties. The backing bean scope is set to
>request.
>
>JSP <--> Backing Bean
>
>What is happening; the JSP page is used for adding data.
>
>When I go back to the page, through a different h:commandButton action,
>to update the data, the user's value entered in the h:inputText
elements
>to add data are still present instead of the values from the backing
>bean.
>
>Is there something I need to do to clear the context or cache of these
>elements?
>
>Thanks,
>
>--Todd
>
>-----------------------------------------
>NOTICE: This email message is for the sole use of the intended
>recipient(s) and may contain confidential and privileged
>information. Any unauthorized use, disclosure or distribution is
>prohibited. If you are not the intended recipient, please contact
>the sender by reply email and destroy all copies of the original
>message.
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe_at_javaserverfaces.dev.java.net
>For additional commands, e-mail:
users-help_at_javaserverfaces.dev.java.net
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_javaserverfaces.dev.java.net
For additional commands, e-mail: users-help_at_javaserverfaces.dev.java.net