The stattement  ""+A_Page.class doesn't generate only the class name, un
also prepends "class " ,
A_Page.class.getName() did the work.


2010/2/11 WarnerJan Veldhuis <[email protected]>

>  You call Page.setStateful(false).  It will be checked every request.
>
>
>
>
> On 02/11/2010 11:12 AM, Marco Gattei wrote:
>
> Is it possible to programatically remove a stateful page from user session
> ? *
> *I'm using a stateful page to implement an object creation form.
> When user request a new object creation i want to remove the stateful page
> to make sure that
> the page for object creation (A_Page) it ic recreated form scratch:
>
> I tried this portion of code,
>
>  public boolean onNewClick()
>    {
>
> //      getContext().removeSessionAttribute( ""+A_Page.class);
>
>
>        getContext().setSessionAttribute( ""+A_Page.class ,null);
>
>        A_Page dest = (A_Page) getContext().createPage(A_PageA_Page.class);
>
>        setForward(dest);
>        return false;
>    }
>
>
> but create page is still getting page from HttpSession .....
>
> What i'm doing wrong ?
> Maybe ""+A_Page.class ins't the correct name in session map of the page ?
>
> thanks
>
> --
> Marco
>
>


-- 
Marco

Reply via email to