You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by Maria Kaval <MA...@oracle.com> on 2009/03/24 19:42:46 UTC

[Trinidad] New API: RequestContext isInternalViewRequest

We would like to add a new API for Trinidad, as discussed in https://issues.apache.org/jira/browse/TRINIDAD-1432

 

Internal views are viewIds that may be requested by a client and are handled internal to the web application, without necessarily dispatching to a resource like a JSP. An internal view handler is implemented by extending the org.apache.myfaces.trinidad.render.InternalView abstract class. 

Certain controllers keep track of the viewId of the currently displayed view in a window. When a request is received on the server the controller checks to see if the requested viewId is different from the last known viewId for that window. If the viewIds are different then the controller recognizes this situation as a navigation and releases any state it had for the previous view. 

The problem is internal views doesn't always result in display of a new view in window, i.e. in navigation. Instead, they may just request some logic be executed or that a new window be opened. 

In order to prevent incorrectly triggering the controller's navigation detection, the controller needs to be able to determine if the current View Root is an internal view or not. The proposed API is thus: 

RequestContext 
{ 
  /** 
   * Determines whether the current View Root is an internal view 
   * @param context Faces context 
   * @return true if the current View Root is an internal view, false otherwise 
   */ 
  public abstract boolean isInternalViewRequest(FacesContext context); 
}

 

Are there objections or other suggestions on how to achieve this, or is the new API acceptable?

 

Thanks, Maria

 

Maria Kaval
Software Development Director
ADF View Run Time
Oracle Corporation
tel: (650) 506 2045  cell: (650) 430 1888
mailto:maria.kaval@oracle.com | web: HYPERLINK "http://www.oracle.com/"www.oracle.com 

 

Re: [Trinidad] New API: RequestContext isInternalViewRequest

Posted by Simon Lessard <si...@gmail.com>.
+1, sounds reasonable.

On Tue, Mar 24, 2009 at 3:52 PM, Matthias Wessendorf <ma...@apache.org>wrote:

> +1
>
> On Tue, Mar 24, 2009 at 7:42 PM, Maria Kaval <MA...@oracle.com>
> wrote:
> > We would like to add a new API for Trinidad, as discussed in
> > https://issues.apache.org/jira/browse/TRINIDAD-1432
> >
> >
> >
> > Internal views are viewIds that may be requested by a client and are
> handled
> > internal to the web application, without necessarily dispatching to a
> > resource like a JSP. An internal view handler is implemented by extending
> > the org.apache.myfaces.trinidad.render.InternalView abstract class.
> >
> > Certain controllers keep track of the viewId of the currently displayed
> view
> > in a window. When a request is received on the server the controller
> checks
> > to see if the requested viewId is different from the last known viewId
> for
> > that window. If the viewIds are different then the controller recognizes
> > this situation as a navigation and releases any state it had for the
> > previous view.
> >
> > The problem is internal views doesn't always result in display of a new
> view
> > in window, i.e. in navigation. Instead, they may just request some logic
> be
> > executed or that a new window be opened.
> >
> > In order to prevent incorrectly triggering the controller's navigation
> > detection, the controller needs to be able to determine if the current
> View
> > Root is an internal view or not. The proposed API is thus:
> >
> > RequestContext
> > {
> >   /**
> >    * Determines whether the current View Root is an internal view
> >    * @param context Faces context
> >    * @return true if the current View Root is an internal view, false
> > otherwise
> >    */
> >   public abstract boolean isInternalViewRequest(FacesContext context);
> > }
> >
> >
> >
> > Are there objections or other suggestions on how to achieve this, or is
> the
> > new API acceptable?
> >
> >
> >
> > Thanks, Maria
> >
> >
> >
> > Maria Kaval
> > Software Development Director
> > ADF View Run Time
> > Oracle Corporation
> > tel: (650) 506 2045  cell: (650) 430 1888
> > mailto:maria.kaval@oracle.com | web: www.oracle.com
> >
> >
>
>
>
> --
> Matthias Wessendorf
>
> blog: http://matthiaswessendorf.wordpress.com/
> sessions: http://www.slideshare.net/mwessendorf
> twitter: http://twitter.com/mwessendorf
>

Re: [Trinidad] New API: RequestContext isInternalViewRequest

Posted by Matthias Wessendorf <ma...@apache.org>.
+1

On Tue, Mar 24, 2009 at 7:42 PM, Maria Kaval <MA...@oracle.com> wrote:
> We would like to add a new API for Trinidad, as discussed in
> https://issues.apache.org/jira/browse/TRINIDAD-1432
>
>
>
> Internal views are viewIds that may be requested by a client and are handled
> internal to the web application, without necessarily dispatching to a
> resource like a JSP. An internal view handler is implemented by extending
> the org.apache.myfaces.trinidad.render.InternalView abstract class.
>
> Certain controllers keep track of the viewId of the currently displayed view
> in a window. When a request is received on the server the controller checks
> to see if the requested viewId is different from the last known viewId for
> that window. If the viewIds are different then the controller recognizes
> this situation as a navigation and releases any state it had for the
> previous view.
>
> The problem is internal views doesn't always result in display of a new view
> in window, i.e. in navigation. Instead, they may just request some logic be
> executed or that a new window be opened.
>
> In order to prevent incorrectly triggering the controller's navigation
> detection, the controller needs to be able to determine if the current View
> Root is an internal view or not. The proposed API is thus:
>
> RequestContext
> {
>   /**
>    * Determines whether the current View Root is an internal view
>    * @param context Faces context
>    * @return true if the current View Root is an internal view, false
> otherwise
>    */
>   public abstract boolean isInternalViewRequest(FacesContext context);
> }
>
>
>
> Are there objections or other suggestions on how to achieve this, or is the
> new API acceptable?
>
>
>
> Thanks, Maria
>
>
>
> Maria Kaval
> Software Development Director
> ADF View Run Time
> Oracle Corporation
> tel: (650) 506 2045  cell: (650) 430 1888
> mailto:maria.kaval@oracle.com | web: www.oracle.com
>
>



-- 
Matthias Wessendorf

blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
twitter: http://twitter.com/mwessendorf

Re: [Trinidad] New API: RequestContext isInternalViewRequest

Posted by Gabrielle Crawford <ga...@oracle.com>.
I plan to commit this tomorrow (3-26-09), so if people could let me know 
of any objections ASAP.

Thanks,

Gabrielle

Jeanne Waldman wrote:
> +1
>
> Maria Kaval wrote, On 3/24/2009 11:42 AM PT:
>>
>> We would like to add a new API for Trinidad, as discussed in 
>> https://issues.apache.org/jira/browse/TRINIDAD-1432
>>
>>  
>>
>> Internal views are viewIds that may be requested by a client and are 
>> handled internal to the web application, without necessarily 
>> dispatching to a resource like a JSP. An internal view handler is 
>> implemented by extending the 
>> org.apache.myfaces.trinidad.render.InternalView abstract class.
>>
>> Certain controllers keep track of the viewId of the currently 
>> displayed view in a window. When a request is received on the server 
>> the controller checks to see if the requested viewId is different 
>> from the last known viewId for that window. If the viewIds are 
>> different then the controller recognizes this situation as a 
>> navigation and releases any state it had for the previous view.
>>
>> The problem is internal views doesn't always result in display of a 
>> new view in window, i.e. in navigation. Instead, they may just 
>> request some logic be executed or that a new window be opened.
>>
>> In order to prevent incorrectly triggering the controller's 
>> navigation detection, the controller needs to be able to determine if 
>> the current View Root is an internal view or not. The proposed API is 
>> thus:
>>
>> RequestContext
>> {
>>   /**
>>    * Determines whether the current View Root is an internal view
>>    * @param context Faces context
>>    * @return true if the current View Root is an internal view, false 
>> otherwise
>>    */
>>   public abstract boolean isInternalViewRequest(FacesContext context);
>> }
>>
>>  
>>
>> Are there objections or other suggestions on how to achieve this, or 
>> is the new API acceptable?
>>
>>  
>>
>> Thanks, Maria
>>
>>  
>>
>> *Maria Kaval*
>> Software Development Director
>> ADF View Run Time
>> Oracle Corporation
>> tel: (650) 506 2045  cell: (650) 430 1888
>> mailto:maria.kaval@oracle.com | web:_ _www.oracle.com 
>> <http://www.oracle.com/>
>>
>>  
>>