2005/11/7, Don Tam <[EMAIL PROTECTED]>:
Hi,
Thanks. I'm quite new to faces and i've never used the component
bindings before, actually. What is the best practice for organizing this?
Should I have something like this in faces-config.xml:
<managed-bean>
<managed-bean-name>Bean</managed-bean-name>
<managed-bean-class>com.web.Bean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
<managed-property>
<property-name>tabs</property-name>
<property-class>org.apache.myfaces.custom.tabbedpane.HtmlPanelTabbedPane</property-class>
<value>#{ Bean.initTabs}</value>
</managed-property>
</managed-bean>
and then have
public HtmlPanelTabbedPane initTabs();
public HtmlPanelTabbedPane getTabs();
public void setTabs(HtmlPanelTabbedPane hptp);
?
Thanks,
Enrique Medina wrote:
> Yes, thats the idea! And always add childs using getChildren() instead
> of setParent() ;-)
>
> 2005/11/7, Don Tam < [EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>>:
>
> Hi Enrique,
>
> Thank you for your response. Does this mean I would have to generate
> whatever is in the tabs through code as well? So basically my jsp
> would
> just look like:
>
> <panelTabbedPane binding="#{Bean.stuff}">
> </panelTabbedPane>
>
> Thanks,
>
> Enrique Medina wrote:
>
> > Just bind your panelTabbedPane to a property in your backing
> bean, and
> > create the tabs dynamically from code, adding them to your property
> > using getChildren().
> >
> > 2005/11/7, Don Tam < [EMAIL PROTECTED]
> <mailto: [EMAIL PROTECTED]>
> > <mailto:[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED] >>>:
> >
> > Hi,
> >
> > Could anyone tell me how I could generate a tab for each
> item in a
> > list?
> >
> > Thanks,
> >
> > --
> > Don Tam
> > Manager, Software Development
> > (416)493-6111x143
> > [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
> <mailto:[EMAIL PROTECTED] <mailto: [EMAIL PROTECTED]>>
> >
> >
>
> --
> Don Tam
> Manager, Software Development
> (416)493-6111x143
> [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
>
>
--
Don Tam
Manager, Software Development
(416)493-6111x143
[EMAIL PROTECTED]