incubator-adffaces-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d sanders <dsanders1...@yahoo.com>
Subject Re: page component and global buttons
Date Wed, 01 Nov 2006 03:42:39 GMT
This works around the global buttons issue, but there
does seem to be a bug in the action handling. 
Clicking on a menu item sends me to the same/current
page.

David


--- Matt Cooper <matt.faces@gmail.com> wrote:

> Hi David,
> 
> It appears that navigationPane does support
> stamping.   There might be a
> small bug with its handling of action but it may be
> worth trying the
> stamping approach in your app in case I'm just
> seeing a setup issue on my
> end.
> 
> Regards,
> Matt
> 
> On 10/31/06, Matt Cooper <matt.faces@gmail.com>
> wrote:
> >
> > By "page template" I meant like a jspx page that
> could be re-used over an
> > over (sort of like page templates in word
> processing programs).
> >
> > For now, I think for now you really want to take a
> use the panelPage
> > component.  It has a facet for each of the
> navigation levels ( e.g.
> > navigationGlobal, navigation1, etc. ...and
> location for breadCrumbs).
> > Inside of those facet, you'll put a navigationPane
> and specify level="1",
> > etc. so that it will consume a particular level of
> the Menu Model, e.g.
> > something along the lines of:
> >
> > <?xml version='1.0' encoding='utf-8'?>
> > <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
> >           xmlns:f=" http://java.sun.com/jsf/core"
> >          
> xmlns:t="http://myfaces.apache.org/trinidad"
> >           version=" 1.2">
> >   <jsp:directive.page
> contentType="text/html;charset=utf-8"/>
> >   <f:view>
> >     <t:document>
> >       <t:form>
> >         <t:panelPage>
> >           <f:facet name="branding">
> >             <t:panelGroupLayout
> layout="horizontal">
> >               <t:icon name="logo"/>
> >               <t:outputText value="Toy Store"/>
> >             </t:panelGroupLayout>
> >           </f:facet>
> >           <f:facet name="navigationGlobal">
> >             <t:navigationPane
> >               var="node"
> >               value="#{menuModel.model}"
> >               level="0"
> >               hint="buttons">
> >               <f:facet name="nodeStamp">
> >                 <t:commandNavigationItem
> >                   text="#{ node.label}"
> >                   action="#{node.getOutcome}"
> >                  
> rendered="#{node.type=='global'}"/>
> >               </f:facet>
> >             </t:navigationPane>
> >           </f:facet>
> >           <f:facet name="navigation1">
> >             <t:navigationPane
> >               var="node"
> >               value="#{menuModel.model}"
> >               level="0"
> >               hint="buttons">
> >               <f:facet name="nodeStamp">
> >                 <t:commandNavigationItem
> >                   text="#{node.label}"
> >                   action="#{ node.getOutcome}"
> >                  
> rendered="#{node.type!='global'}"/>
> >               </f:facet>
> >             </t:navigationPane>
> >           </f:facet>
> >           ...
> >         </t:panelPage>
> >       </t:form>
> >     </t:document>
> >   </f:view>
> > </jsp:root>
> >
> > However, there is one problem with this... today,
> the navigationPane
> > doesn't fully support stamped
> commandNavigationItem components, instead, it
> > only supports indexed children like this:
> >
> > <?xml version='1.0' encoding='utf-8'?>
> > <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
> >           xmlns:f=" http://java.sun.com/jsf/core"
> >          
> xmlns:t="http://myfaces.apache.org/trinidad"
> >           version="1.2">
> >   <jsp:directive.page
> contentType="text/html;charset=utf-8"/>
> >   <f:view>
> >     <t:document>
> >       <t:form>
> >         <t:panelPage>
> >           <f:facet name="branding">
> >             <t:panelGroupLayout
> layout="horizontal">
> >               <t:icon name="logo"/>
> >               <t:outputText value="Toy Store"/>
> >             </t:panelGroupLayout>
> >           </f:facet>
> >           <f:facet name="navigationGlobal">
> >             <t:navigationPane
> >               hint="buttons">
> >               <t:commandNavigationItem
> >                 text="Global 1"
> >                 action="global1"/>
> >               <t:commandNavigationItem
> >                 text="Global 2"
> >                 action="global2"/>
> >             </t:navigationPane>
> >           </f:facet>
> >           <f:facet name="navigation1">
> >             <t:navigationPane
> >               hint="buttons">
> >               <t:commandNavigationItem
> >                 text="Primary 1"
> >                 action="primary1"/>
> >               <t:commandNavigationItem
> >                 text="Primary 2"
> >                 action="primary2"/>
> >             </t:navigationPane>
> >           </f:facet>
> >           <t:outputText value="Hello world"/>
> >         </t:panelPage>
> >       </t:form>
> >     </t:document>
> >   </f:view>
> > </jsp:root>
> >
> > Unfortunately, it appears that there isn't an easy
> solution for what you
> > are looking for right now until navigationPane is
> enhanced to support
> > stamping.
> >
> > Regards,
> > Matt
> >
> > On 10/31/06, d sanders <dsanders1234@yahoo.com>
> wrote:
> > >
> > > Hi,
> > >
> > > Thanks for the info.  One option might be to
> make the
> > > global buttons defined using a separate facet
> and then
> > > have the nodeStamp facet represent the tabs as
> the
> > > root of the navigation tree.
> > >
> > > What do you mean by 'page template'?  Is this a
> > > component or just a standard way of using
> individual
> > > components together?
> > >
> > > David
> > >
> > >
> > > --- Matt Cooper <matt.faces@gmail.com> wrote:
> > >
> > > > Hi David,
> > > >
> > > > I believe there were two reasons for this. 
> The
> > > > first being complexity:
> > > > since the model is in a tree structure, the
> default
> > > > layout should keep the
> > > > that tree structure.  The second is that the
> page
> > > > component is not very
> > > > flexible.  Instead, a page template solution
> would
> > > > be much better because it
> > > > would be much more flexible and thus could
> allow
> > > > page developers to emulate
> > > > the consumption of the MenuModel so that it
> matches
> > > > the ADF Faces
> > > > 10.1.3format (through EL bindings on the
> rendered
> > > > attribute,
> > > > e.g. rendered="#{node.type=='global'}" or
> > > > rendered=#{node.type!='global'})
> > > > or whatever special format they want.  I
> expect 
=== message truncated ===


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Mime
View raw message