myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guy Bashan <guy.bas...@gmail.com>
Subject RE: managed bean with request scope
Date Fri, 03 Oct 2008 22:17:24 GMT
Ok, so that's a whole different story ;-)

I think I have already recommended some things that can be done in order to investigate...
I believe the browser simply caches the request...

When you make the call to the iframe, add a random parameter to the request. You can do it
easily in javascript,
For example when you want to reload the content of the iframe (when user press some link or
button) do something like this:
myProblematicFrame.src = "myJSPPage.jsp?bookId=" + newBookId + "&rnd=" + Math.random();

Note: I don’t remember the exact JavaScript syntax... Working too much with JSF... make
you forget JavaScript... ;-)
But I hope the idea is understood.

Let me know if it didn't work...



-----Original Message-----
From: Alex Diaz [mailto:alexware69@gmail.com] 
Sent: Saturday, October 04, 2008 12:02 AM
To: MyFaces Discussion
Subject: Re: managed bean with request scope

just in the iframe

On Fri, 03 Oct 2008 15:41:47 -0400, Guy Bashan <guy.bashan@gmail.com>  
wrote:

> Sorry, I got a little confused,
> You have this issue only in the iframe request or generally in all your  
> jsp files?
>
> -----Original Message-----
> From: Alex Diaz [mailto:alexware69@gmail.com]
> Sent: Friday, October 03, 2008 9:43 PM
> To: MyFaces Discussion
> Subject: Re: managed bean with request scope
>
> I am not using any additional frameworks, and I believe the we.xml is
> configured properly. You are right about the page refresh when I hit F5
> then it works ok, but I cannot implement a refresh because the page is
> inside an iframe
>
>
> On Fri, 03 Oct 2008 14:25:37 -0400, Guy Bashan <guy.bashan@gmail.com>
> wrote:
>
>> Are you using some additional framework like seam/spring?
>> Is your web.XML configured properly?
>> Opening a new browser session activates the constructor? Or are all you
>> beans behave like application scope beans?
>>
>> Sent from my iPhone
>>
>> On Oct 3, 2008, at 9:10 PM, "Alex Diaz" <alexware69@gmail.com> wrote:
>>
>>> I am using myfaces on apache-tomcat, every version is close o are the
>>> latets versions
>>>
>>> On Fri, 03 Oct 2008 14:00:55 -0400, Andrew Robinson
>>> <andrew.rw.robinson@gmail.com> wrote:
>>>
>>>> What is your environment (what JSF impl are you using, what version,
>>>> what 3rd party jars do you have, what is your app/web server &
>>>> version, etc)?
>>>>
>>>> -A
>>>>
>>>> On Fri, Oct 3, 2008 at 11:45 AM, Alex Diaz <alexware69@gmail.com>
>>>> wrote:
>>>>> yes it is general problem, I tried with other beans that had request
>>>>> scope
>>>>> and got the same problem
>>>>> On Fri, 03 Oct 2008 13:11:45 -0400, Guy Bashan <guy.bashan@gmail.com>
>>>>> wrote:
>>>>>
>>>>>> Did you try another bean test? Does this behavior happens in this
>>>>>> specific
>>>>>> bean, or is this a general problem?
>>>>>>
>>>>>> Sent from my iPhone
>>>>>>
>>>>>> On Oct 3, 2008, at 6:52 PM, "Alex Diaz" <alexware69@gmail.com>
 
>>>>>> wrote:
>>>>>>
>>>>>>> I am just using the the managed-bean like:
>>>>>>>  <managed-bean>
>>>>>>>      <managed-bean-name>ChangeTreeValueHelper</managed-bean-name>
>>>>>>>
>>>>>>> <managed-bean-class>beans.ChangeTreeValueHelper</managed-bean-class>
>>>>>>>      <managed-bean-scope>request</managed-bean-scope>
>>>>>>>  </managed-bean>
>>>>>>>
>>>>>>> On Fri, 03 Oct 2008 11:39:44 -0400, Andrew Robinson
>>>>>>> <andrew.rw.robinson@gmail.com> wrote:
>>>>>>>
>>>>>>>> Are you by any chance using t:saveState or something else
to pin
>>>>>>>> the
>>>>>>>> object in memory like using managed-property?
>>>>>>>>
>>>>>>>> On Thu, Oct 2, 2008 at 7:37 PM, Alex Diaz <alexware69@gmail.com>
>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>> Yes my managed bean is in the faces-config.xml and the
scope y
>>>>>>>>> set to
>>>>>>>>> request. but still have de same problem.
>>>>>>>>> Thanks
>>>>>>>>>
>>>>>>>>> On Thu, 02 Oct 2008 09:45:04 -0400, Guy Bashan
>>>>>>>>> <guy.bashan@gmail.com>
>>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>>> Beans in request scope are recreated on each request.
>>>>>>>>>> Make sure:
>>>>>>>>>> 1) Your bean is in the faces-config.xml.
>>>>>>>>>> 2) The scope is really "request".
>>>>>>>>>>
>>>>>>>>>> Guy
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> -----Original Message-----
>>>>>>>>>> From: Alex Diaz [mailto:alexware69@gmail.com]
>>>>>>>>>> Sent: Thursday, October 02, 2008 4:47 PM
>>>>>>>>>> To: users@myfaces.apache.org
>>>>>>>>>> Subject: managed bean with request scope
>>>>>>>>>>
>>>>>>>>>> Are the managed beans with request scope destroyed
after each
>>>>>>>>>> request
>>>>>>>>>> to a
>>>>>>>>>> page? If so, then why the beans constructor is not
being called
>>>>>>>>>> after
>>>>>>>>>> subsequent requests?
>>>>>>>>>>
>>>>>>>>>> Thanks.
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Using Opera's revolutionary e-mail client:
>>>>>>>>> http://www.opera.com/mail/
>>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --Using Opera's revolutionary e-mail client:
>>>>>>> http://www.opera.com/mail/
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
>>>>>
>>>
>>>
>>>
>>> --Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
>
>
>



-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/


Mime
View raw message