aspose file tools*
The moose likes JSF and the fly likes Problem encountered in JSF Frame work Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Problem encountered in JSF Frame work " Watch "Problem encountered in JSF Frame work " New topic
Author

Problem encountered in JSF Frame work

kabir agarwal
Greenhorn

Joined: Aug 26, 2008
Posts: 6
Hi every one ,

I would like to inform you that I am facing a problem for clearing the data for JSF Components . Here is a example .

Lets say we have screen 1 , screen 2 and screen 3 . we can navigate to screen 1 thru Screen 2 and Screen 3 . but the look and feel of screen will be changed depending on which screen you are coming. to be more specific while coming from screen 2 , we want the default behaviour of screen but while coming from screen 3 we want some specific behaviour .. disabling , hiding and making some fields mandatory etc ...


The Problrm happns when you come thru screen 3 and make it specific .. again if you want to come to screen 1 , it is not initializing JSF componets again .. it is using data from the previous screen's (Coming from Screen 3 what ever changes you made ) ...

can some body help me out to figure out this ??

Thanks in adavance

Regards
Kabir
Jerwin Louise Uy
Ranch Hand

Joined: Oct 27, 2007
Posts: 75
Originally posted by kabir agarwal:
Hi every one ,

I would like to inform you that I am facing a problem for clearing the data for JSF Components . Here is a example .

Lets say we have screen 1 , screen 2 and screen 3 . we can navigate to screen 1 thru Screen 2 and Screen 3 . but the look and feel of screen will be changed depending on which screen you are coming. to be more specific while coming from screen 2 , we want the default behaviour of screen but while coming from screen 3 we want some specific behaviour .. disabling , hiding and making some fields mandatory etc ...


The Problrm happns when you come thru screen 3 and make it specific .. again if you want to come to screen 1 , it is not initializing JSF componets again .. it is using data from the previous screen's (Coming from Screen 3 what ever changes you made ) ...

can some body help me out to figure out this ??

Thanks in adavance

Regards
Kabir


It would help if you provide the code of the managed beans for each screen and their corresponding scopes.

Regards.


Uy Jerwin Louise Vergara
Junior Developer / Research and Development at Incuventure Partners Corporation
email: jerwin.uy@incuventure.net
kabir agarwal
Greenhorn

Joined: Aug 26, 2008
Posts: 6
It would help if you provide the code of the managed beans for each screen and their corresponding scopes.

Regards.
=======================================================================

Here is d code :

<managed-bean>
<managed-bean-name>CTDR0008Fragment</managed-bean-name>
<managed-bean-class>ctd.CTDR0008Fragment</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
<managed-bean>
<managed-bean-name>CTDR0007Fragment</managed-bean-name>
<managed-bean-class>ctd.CTDR0007Fragment</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>

Another common template is d menu.jspf

Now Menu has d hyper links for both CTDR008 as well as CTDR0007 and it will always be displayed . The problem triggers when we go through menu to CTDR0008 . after londing CTDR0008 , we click on a hyperlink which goes to CTDR0007. during the action of CTDR0008's hyperlink we are setting a flag in session and based on that we are enabling disabling components in CTDR0007 .

The problem happns it work fine when you go thru CTDR0008 to CTDR0007 . now after doing that again you try to reach CTDR0007 through menu .. it is still retaining the state of componets and not intiliazing it fresly .

Please let me know if need any more details.

Regards
Kabir
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem encountered in JSF Frame work