• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

facelets and custom tags

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm using custom tags in a facelets/jsf project, and can't figure out how to get eclipse to recognize my custom tags. For example if I type <h: then control space the jsf tags show up with code complete. I've got my custom tag working and defined in the custum-taglib.xml, but can't figure out this last step.

meine jsf page:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html 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:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich"
xmlns:c="http://java.sun.com/jstl/core"
xmlns:myTag="http://www.mywork.net/jsf">

<body>
<ui:composition template="template.xhtml">
<ui:define name="faceletHeader">
<title>Dialog</title>
</ui:define>
<ui:define name="faceletContent">
<div id="menue">
<myTag:myDropDownMenu
value="Datei" menuItem1_Value="masterDetails_01" menuItem1_bean="#{dataTableScrollerBean}" menuItem1_action="gruss"
menuItem2_Value="masterDetails_02" menuItem2_bean="#{dataTableScrollerBean}" menuItem2_action="gruss2"
menuItem3_Value="abmelden" menuItem3_bean="#{dataTableScrollerBean}" menuItem3_action="logout" />

</div>

<h:form id="form04">

<myTag:myBaum />

</h:form>
</ui:define>
</ui:composition>
</body>
</html>

my custom.taglib.xml :

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE facelet-taglib PUBLIC "-//Sun Microsystems, Inc.//DTD Facelet Taglib 1.0//EN" "facelet-taglib_1_0.dtd">
<facelet-taglib>
<namespace>http://www.mywork.net/jsf</namespace>;
<tag>
<tag-name>myButton</tag-name>
<source>MyButton.xhtml</source>
</tag>
<tag>
<tag-name>myBaum</tag-name>
<source>MyBaum.xhtml</source>
</tag>
<tag>
<tag-name>myDropDownMenu</tag-name>
<source>MyDropDownMenu.xhtml</source>
</tag>
<tag>
<tag-name>MasterDetails</tag-name>
<source>MasterDetails.xhtml</source>
</tag>
</facelet-taglib>
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic