myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wendy Chou" <citr...@gmail.com>
Subject Re: Tag not recognized error when trying to use tomahawk tag t:tabChangeListener
Date Sun, 27 Aug 2006 00:41:16 GMT
I got it to work! I implemented a facelets TagHandler and took the code from
the existing JSP tag and adapted it to the facelets tag. Thank you so much!!




On 8/26/06, Mike Kienenberger <mkienenb@gmail.com> wrote:
>
> You need to define tabChangeListener in your tomahawk taglib.xml file.
> I'm not sure if there's a standard component behind that, or simply a
> JSP tag.   If it's a JSP tag, you'll have to write a facelets tag
> handler for it or get one from someone else who's written one.
>
> tomahawk.tld is NOT used by facelets.   That file is only used with JSP.
>
>
> On 8/26/06, Wendy Chou < citress@gmail.com> wrote:
> > I am trying to use tomahawk's TabChangeListener with PanelTabbedPane,
> but
> > when I add the tabChangeListener tag in the body of the
> <t:panelTabbedPane
> > /> , I get an error: "<t:tabChangeListener> Tag Library supports
> namespace:
> > http://myfaces.apache.org/tomahawk, but no tag was defined
> > for name: tabChangeListener". What kind of configuration do I have to do
> to
> > use that tag?
> >
> > Here is my xhtml source:
> >
> > <ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui=
> > " http://java.sun.com/jsf/facelets "
> > xmlns:h="http://java.sun.com/jsf/html"
> >  xmlns:f=" http://java.sun.com/jsf/core"
> > xmlns:c=" http://java.sun.com/jstl/core
> > "
> >  xmlns:t=" http://myfaces.apache.org/tomahawk" xmlns:fn="
> > http://java.sun.com/jsp/jstl/functions"
> > xmlns:fr=" http://myproject.com/test/jsf">
> >
> > <t:panelTabbedPane selectedIndex=
> > "#{coverageDisplay.startIndex}" serverSideTabSwitch="#{true}">
> >  <t:panelTab label="#{lbls.vehCovDetailsTab1}"
> >  rendered="#{ vehiclesBean.vehicles.rowCount > 0}" >
> >  <fr:vehCovSummTab />
> >  </t:panelTab>
> >  <t:panelTab label=
> > "#{lbls.vehCovDetailsTab2}" rendered="#{vehiclesBean.vehicles.rowCount >
> 3}"
> > >
> >  <fr:vehCovSummTab />
> >  </t:panelTab>
> >  <t:panelTab label=
> > "#{lbls.vehCovDetailsTab3}" rendered="#{vehiclesBean.vehicles.rowCount >
> 6}"
> > >
> >  <fr:vehCovSummTab />
> >  </t:panelTab>
> >
> >
> >  <t:tabChangeListener type="myproject.MyTabChangeListener" />
> > </t:panelTabbedPane>
> >
> >
> >
> > My tomahawk.taglib.xml :
> >
> >  <tag>
> >  <tag-name>panelTabbedPane</tag-name>
> >  <component>
> > <component-type>org.apache.myfaces.HtmlPanelTabbedPane </component-type>
> >
> >  <renderer-type>org.apache.myfaces.TabbedPane</renderer-type>
> >  </component>
> >  </tag>
> >
> >
> >
> > My tomahawk.tld:
> >
> >  <!-- panelTabbedPane -->
> >  <tag>
> >  <name>panelTabbedPane</name>
> > <tag-class>org.apache.myfaces.custom.tabbedpane.HtmlPanelTabbedPaneTag
> </tag-class>
> >
> >  <body-content>JSP</body-content>
> >  <!-- UIPanel attributes -->
> >  <!-- UIComponent attributes -->
> >  <attribute>
> >  <name>id</name>
> >
> >  <required>false</required>
> >  <rtexprvalue>false</rtexprvalue>
> >  <type>java.lang.String</type>
> >  <description>Every component may have an unique id. Automatically
> created
> > if omitted.</description>
> >  </attribute>
> >  <attribute>
> >  <name>rendered</name>
> >  <required>false</required>
> >
> >  <rtexprvalue>false</rtexprvalue>
> >  <type> java.lang.String</type>
> >  <description>If false, this component will not be
> rendered.</description>
> >
> >  </attribute>
> >  <attribute>
> >  <name>binding</name>
> >  <required>false</required>
> >  <rtexprvalue>false</rtexprvalue>
> >
> >  <type>java.lang.String</type>
> >  <description>Component binding.</description>
> >  </attribute>
> >
> >
> >  <!-- HTML 4.0 universal attributes -->
> >
> >  <attribute><name>dir</name> <required>false</required>
> > <rtexprvalue>false</rtexprvalue></attribute>
> >  <attribute><name>lang</name> <required>false</required>
> > <rtexprvalue>false</rtexprvalue></attribute>
> >
> >  <attribute><name>style</name> <required>false</required>
> > <rtexprvalue>false</rtexprvalue></attribute>
> >  <attribute><name>title</name> <required>false</required>
> > <rtexprvalue>false</rtexprvalue></attribute>
> >
> >  <attribute>
> >  <name>styleClass</name>
> >  <required>false</required>
> >  <rtexprvalue>false</rtexprvalue>
> >  <description>Corresponds to the HTML
> > class attribute.</description>
> >  </attribute>
> >
> >  <!-- HTML 4.0 event-handler attributes -->
> >  <attribute><name>onclick</name> <required>false</required>
> > <rtexprvalue>false</rtexprvalue></attribute>
> >
> >  <attribute><name>ondblclick</name>
> > <required>false</required>
> > <rtexprvalue>false</rtexprvalue></attribute>
> > <attribute><name>onmousedown</name><required>false</required>
> > <rtexprvalue>false</rtexprvalue></attribute>
> >
> >  <attribute><name>onmouseup</name>
> > <required>false</required>
> > <rtexprvalue>false</rtexprvalue></attribute>
> > <attribute><name>onmouseover</name><required>false</required>
> > <rtexprvalue>false</rtexprvalue></attribute>
> >
> > <attribute><name>onmousemove</name><required>false</required>
> > <rtexprvalue>false</rtexprvalue></attribute>
> >  <attribute><name>onmouseout</name>
> > <required>false</required>
> > <rtexprvalue>false</rtexprvalue></attribute>
> >
> >  <attribute><name>onkeypress</name>
> > <required>false</required>
> > <rtexprvalue>false</rtexprvalue></attribute>
> >  <attribute><name>onkeydown</name>
> > <required>false</required>
> > <rtexprvalue>false</rtexprvalue></attribute>
> >
> >  <attribute><name>onkeyup</name> <required>false</required>
> > <rtexprvalue>false</rtexprvalue></attribute>
> >
> >  <!-- HTML 4.0 table attributes -->
> >
> >  <attribute><name>align</name> <required>false</required>
> > <rtexprvalue>false</rtexprvalue></attribute>
> >  <attribute><name>border</name> <required>false</required>
> > <rtexprvalue>false</rtexprvalue></attribute>
> >
> >  <attribute><name>bgcolor</name> <required>false</required>
> > <rtexprvalue>false</rtexprvalue></attribute>
> >  <attribute><name>cellpadding</name>
> > <required>false</required>
> > <rtexprvalue>false</rtexprvalue></attribute>
> >
> >  <attribute><name>cellspacing</name>
> > <required>false</required>
> > <rtexprvalue>false</rtexprvalue></attribute>
> >  <attribute><name>datafld</name> <required>false</required>
> > <rtexprvalue>false</rtexprvalue></attribute>
> >
> >  <attribute><name>datasrc</name> <required>false</required>
> > <rtexprvalue>false</rtexprvalue></attribute>
> >  <attribute><name>dataformatas</name>
> > <required>false</required>
> > <rtexprvalue>false</rtexprvalue></attribute>
> >
> >  <attribute><name>frame</name> <required>false</required>
> > <rtexprvalue>false</rtexprvalue></attribute>
> >  <attribute><name>rules</name> <required>false</required>
> > <rtexprvalue>false</rtexprvalue></attribute>
> >
> >  <attribute><name>summary</name> <required>false</required>
> > <rtexprvalue>false</rtexprvalue></attribute>
> >  <attribute><name>width</name> <required>false</required>
> > <rtexprvalue>false</rtexprvalue></attribute>
> >
> >
> >  <!-- MyFaces extension: user role attributes -->
> >  <attribute>
> >  <name>enabledOnUserRole</name>
> >  <required>false</required>
> >  <rtexprvalue>false</rtexprvalue>
> >
> >  <description>
> >  If user is in given role, this component will be rendered
> >  normally. If not, no hyperlink is rendered but all nested
> >
> >  tags (=body) are rendered.
> >  </description>
> >  </attribute>
> >  <attribute>
> >  <name>visibleOnUserRole</name>
> >  <required>false</required>
> >
> >  <rtexprvalue>false</rtexprvalue>
> >  <description>
> >  If user is in given role, this component will be rendered
> >  normally. If not, nothing is rendered and the body of
> > this tag
> >  will be skipped.
> >  </description>
> >  </attribute>
> >
> >  <attribute>
> >  <name>selectedIndex</name>
> >
> >  <required>false</required>
> >  <rtexprvalue>false</rtexprvalue>
> >  <description>
> >  Index of tab that is selected by default.
> >  </description>
> >
> >  </attribute>
> >  <attribute>
> >  <name>activeTabStyleClass</name>
> >  <required>false</required>
> >  <rtexprvalue>false</rtexprvalue>
> >
> >  <description>
> >  Style class of the active tab cell.
> >  </description>
> >  </attribute>
> >  <attribute>
> >
> >  <name>inactiveTabStyleClass</name>
> >  <required>false</required>
> >  <rtexprvalue>false</rtexprvalue>
> >  <description>
> >  Style
> > class of the inactive tab cells.
> >  </description>
> >  </attribute>
> >  <attribute>
> >  <name>disabledTabStyleClass</name>
> >
> >  <required>false</required>
> >  <rtexprvalue>false</rtexprvalue>
> >  <description>
> >  Style class of the disabled tab cells.
> >
> >  </description>
> >  </attribute>
> >  <attribute>
> >  <name>activeSubStyleClass</name>
> >  <required>false</required>
> >  <rtexprvalue>false</rtexprvalue>
> >
> >  <description>
> >  Style class of the active tab sub cell.
> >  </description>
> >  </attribute>
> >  <attribute>
> >
> >  <name>inactiveSubStyleClass</name>
> >  <required>false</required>
> >  <rtexprvalue>false</rtexprvalue>
> >  <description>
> >  Style
> > class of the inactive tab sub cells.
> >  </description>
> >  </attribute>
> >  <attribute>
> >  <name>tabContentStyleClass</name>
> >
> >  <required>false</required>
> >  <rtexprvalue>false</rtexprvalue>
> >  <description>
> >  Style class of the active tab content cell.
> >
> >  </description>
> >  </attribute>
> >  </tag>
> >
> >  <!-- tab change listener -->
> >  <tag>
> >  <name>tabChangeListener</name>
> >  <tag-class>
> > org.apache.myfaces.custom.tabbedpane.TabChangeListenerTag</tag-class>
> >  <body-content>empty</body-content>
> >  <attribute>
> >  <name>type</name>
> >  <required>true</required>
> >
> >  <rtexprvalue>false</rtexprvalue>
> >  </attribute>
> >  </tag>
> >
>

Mime
View raw message