You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by Apache Wiki <wi...@apache.org> on 2007/10/02 15:37:39 UTC

[Myfaces Wiki] Update of "Use Facelets with Tomahawk" by Zied

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Myfaces Wiki" for change notification.

The following page has been changed by Zied:
http://wiki.apache.org/myfaces/Use_Facelets_with_Tomahawk

------------------------------------------------------------------------------
      <tag>
          <tag-name>commandButton</tag-name>
          <component>
-             <component-type>org.apache.myfaces.HtmlCommandButton</component-type>   
+             <component-type>org.apache.myfaces.HtmlCommandButton</component-type>
          </component>
      </tag>
      <tag>
@@ -73, +73 @@

          <tag-name>commandNavigation</tag-name>
          <component>
              <component-type>org.apache.myfaces.HtmlCommandNavigation</component-type>
-             <renderer-type>org.apache.myfaces.Navigation</renderer-type>
+             <renderer-type>javax.faces.Link</renderer-type>
-         </component>
-     </tag>
-     <tag>
-         <tag-name>commandNavigation2</tag-name>
-         <component>
-             <component-type>org.apache.myfaces.HtmlCommandNavigationItem</component-type>
-             <renderer-type>org.apache.myfaces.NavigationMenu</renderer-type>
          </component>
      </tag>
      <tag>
@@ -112, +105 @@

          </component>
      </tag>
      <tag>
+         <tag-name>dojoInitializer</tag-name>
+         <component>
+             <component-type>org.apache.myfaces.DojoInitializer</component-type>
+             <renderer-type>org.apache.myfaces.DojoInitializerRenderer</renderer-type>
+         </component>
+     </tag>
+     <tag>
          <tag-name>div</tag-name>
          <component>
              <component-type>org.apache.myfaces.Div</component-type>
          </component>
-     </tag>
-     <tag>
- 	<tag-name>document</tag-name>
- 	<component>
- 	    <component-type>org.apache.myfaces.Document</component-type>
- 	</component>
-     </tag>
-     <tag>
- 	<tag-name>documentBody</tag-name>
- 	<component>
- 	    <component-type>org.apache.myfaces.DocumentBody</component-type>
- 	</component>
-     </tag>
-     <tag>
- 	<tag-name>documentHead</tag-name>
- 	<component>
- 	    <component-type>org.apache.myfaces.DocumentHead</component-type>
- 	</component>
      </tag>
      <tag>
          <tag-name>graphicImage</tag-name>
@@ -182, +164 @@

              <component-type>org.apache.myfaces.InputHtml</component-type>
              <renderer-type>org.apache.myfaces.InputHtml</renderer-type>
          </component>
-     </tag>    
+     </tag>
      <tag>
          <tag-name>inputSecret</tag-name>
          <component>
@@ -212, +194 @@

          </component>
      </tag>
      <tag>
+         <tag-name>message</tag-name>
+         <component>
+             <component-type>org.apache.myfaces.HtmlMessage</component-type>
+             <renderer-type>org.apache.myfaces.Message</renderer-type>
+         </component>
+     </tag>
+     <tag>
+         <tag-name>messages</tag-name>
+         <component>
+             <component-type>org.apache.myfaces.HtmlMessages</component-type>
+             <renderer-type>org.apache.myfaces.Messages</renderer-type>
+         </component>
+     </tag>
+     <tag>
          <tag-name>jscookMenu</tag-name>
- 		<!--
- 		<![CDATA[
- Requires "<input type="hidden" name="jscook_action" />" to be manually added to the form
- 		]]>
- 		-->
          <component>
              <component-type>org.apache.myfaces.JSCookMenu</component-type>
              <renderer-type>org.apache.myfaces.JSCookMenu</renderer-type>
          </component>
      </tag>
      <tag>
-         <tag-name>message</tag-name>
-         <component>
-             <component-type>org.apache.myfaces.HtmlMessage</component-type>
-             <renderer-type>org.apache.myfaces.Message</renderer-type>
-         </component>
-     </tag>
-     <tag>
-         <tag-name>messages</tag-name>
-         <component>
-             <component-type>org.apache.myfaces.HtmlMessages</component-type>
-             <renderer-type>org.apache.myfaces.Messages</renderer-type>
-         </component>
-     </tag>
-     <tag>
          <tag-name>navigationMenuItem</tag-name>
          <component>
              <component-type>org.apache.myfaces.NavigationMenuItem</component-type>
@@ -246, +223 @@

      <tag>
          <tag-name>navigationMenuItems</tag-name>
          <component>
- 	    <component-type>javax.faces.SelectItems</component-type>
+             <component-type>javax.faces.SelectItems</component-type>
          </component>
      </tag>
      <tag>
@@ -254, +231 @@

          <component>
              <component-type>org.apache.myfaces.HtmlNewspaperTable</component-type>
              <renderer-type>org.apache.myfaces.HtmlNewspaperTable</renderer-type>
-         </component>                
+         </component>
      </tag>
      <tag>
          <tag-name>outputText</tag-name>
@@ -264, +241 @@

          </component>
      </tag>
      <tag>
-         <tag-name>panelGrid</tag-name>
-         <component>
-             <component-type>org.apache.myfaces.HtmlPanelGrid</component-type>
-             <renderer-type>org.apache.myfaces.Grid</renderer-type>
-         </component>
-     </tag>
-     <tag>
-         <tag-name>panelGroup</tag-name>
-         <component>
-             <component-type>org.apache.myfaces.HtmlPanelGroup</component-type>
-             <renderer-type>org.apache.myfaces.Group</renderer-type>
-         </component>
-     </tag>
-     <tag>
          <tag-name>panelNavigation</tag-name>
          <component>
              <component-type>org.apache.myfaces.HtmlPanelNavigation</component-type>
@@ -306, +269 @@

          </component>
      </tag>
      <tag>
+         <tag-name>panelStack</tag-name>
+         <component>
+             <component-type>org.apache.myfaces.HtmlPanelStack</component-type>
+         </component>
+     </tag>
+     <tag>
          <tag-name>popup</tag-name>
          <component>
              <component-type>org.apache.myfaces.HtmlPopup</component-type>
@@ -318, +287 @@

              <component-type>org.apache.myfaces.HtmlRadio</component-type>
              <renderer-type>org.apache.myfaces.Radio</renderer-type>
          </component>
-     </tag> 
+     </tag>
      <tag>
          <tag-name>saveState</tag-name>
          <component>
              <component-type>org.apache.myfaces.SaveState</component-type>
-         </component>
-     </tag>
-     <tag>
-         <tag-name>schedule</tag-name>
-         <component>
-             <component-type>org.apache.myfaces.Schedule</component-type>
          </component>
      </tag>
      <tag>
@@ -393, +356 @@

              <component-type>org.apache.myfaces.HtmlSelectOneRadio</component-type>
              <renderer-type>org.apache.myfaces.Radio</renderer-type>
          </component>
-     </tag> 
+     </tag>
+     <tag>
+         <tag-name>schedule</tag-name>
+         <component>
+             <component-type>org.apache.myfaces.Schedule</component-type>
+             <renderer-type>org.apache.myfaces.Schedule</renderer-type>
+         </component>
+     </tag>	
      <tag>
          <tag-name>stylesheet</tag-name>
          <component>
              <component-type>org.apache.myfaces.Stylesheet</component-type>
          </component>
      </tag>
-     <!-- Note that "tree" will not work as-is.  Tree either needs a facelets 
+     <!-- Note that "tree" will not work as-is.  Tree either needs a facelets
           TagHandler, or a refactoring of
           org.apache.myfaces.custom.tree.taglib.TreeTag
           and org.apache.myfaces.custom.tree.HtmlTree
@@ -425, +395 @@

              <component-type>org.apache.myfaces.HtmlTreeColumn</component-type>
          </component>
      </tag>
-     <!--
-         <tag-name>updateActionListener</tag-name> requires a Facelets TagHandler.   Use the functionality-equivalent JSF 1.2 f:setPropertyActionListener instead.  f:setPropertyActionListener has been backported as of facelets 1.1.11.  Note that the jsf-comp updateActionListener does not handle setting values on ui:include parameters while setPropertyActionListener will correctly propagate these values.
-     -->
+     <tag>
+         <tag-name>updateActionListener</tag-name>
+         <handler-class>com.google.code.tomahawk.facelets.UpdateActionListenerTagHandler</handler-class>
+     </tag>
+     <tag>
+         <tag-name>document</tag-name>
+         <component>
+             <component-type>org.apache.myfaces.Document</component-type>
+         </component>
+     </tag>
+     <tag>
+         <tag-name>documentHead</tag-name>
+         <component>
+             <component-type>org.apache.myfaces.DocumentHead</component-type>
+         </component>
+     </tag>
+     <tag>
+         <tag-name>documentBody</tag-name>
+         <component>
+             <component-type>org.apache.myfaces.DocumentBody</component-type>
+         </component>
+     </tag>
+ 
      <tag>
          <tag-name>validateEmail</tag-name>
          <validator>
@@ -447, +437 @@

          </validator>
      </tag>
  
- </facelet-taglib>
+ </facelet-taglib>}}}
- }}}
  
  Here's a code snippet of how you would then use an inputDate control from the MyFaces extensions library in your facelet .xhtml file:
  

Re: [Myfaces Wiki] Update of "Use Facelets with Tomahawk" by Zied

Posted by Mike Kienenberger <mk...@gmail.com>.
Zied,

I've glanced at the HtmlCommandNavigationTag for jsp, and the renderer
type matches "org.apache.myfaces.Navigation", which was what was there
before you changed it to "javax.faces.Link".   Why do you think it
needs to be changed?

On 10/16/07, Mike Kienenberger <mk...@gmail.com> wrote:
[...]
> As far as I can tell, this is fixing a bug in the renderer-type for
> commandNavigation
[...]
> >           <tag-name>commandNavigation</tag-name>
> >           <component>
> >               <component-type>org.apache.myfaces.HtmlCommandNavigation</component-type>
> > -             <renderer-type>org.apache.myfaces.Navigation</renderer-type>
> > +             <renderer-type>javax.faces.Link</renderer-type>
> > -         </component>
> > -     </tag>
[...]

Re: [Myfaces Wiki] Update of "Use Facelets with Tomahawk" by Zied

Posted by Mike Kienenberger <mk...@gmail.com>.
Zied,

Thanks for taking the time to update this page.

However, some of the information you've removed or changed should not
have been changed.

For example,  with facelets, you should not use
UpdateActionListenerTagHandler, but instead use
setPropertyActionListener.   Not only is this "forward-compatible",
but at least one other attempt to write an updateActionListener
resulted in incorrect compatibility with facelets, as the original
comment below states.   If you would like to provide an alternate
UpdateActionListenerTagHandler, please leave the original comment in,
and test your tag handler to be sure it really works as well as
setPropertyActionListener.   Honestly, though, if it's just a matter
of "name" compatiblity, you're still better off defining
updateActionListener to point to a subclass of the
setPropertyActionListener handler which using aliases for the
attribute names.

-     <!--
-         <tag-name>updateActionListener</tag-name> requires a
Facelets TagHandler.   Use the functionality-equivalent JSF 1.2
f:setPropertyActionListener instead.  f:setPropertyActionListener has
been backported as of facelets 1.1.11.  Note that the jsf-comp
updateActionListener does not handle setting values on ui:include
parameters while setPropertyActionListener will correctly propagate
these values.
-     -->
+     <tag>
+         <tag-name>updateActionListener</tag-name>
+         <handler-class>com.google.code.tomahawk.facelets.UpdateActionListenerTagHandler</handler-class>
+     </tag>


Also, there are no instructions on where to find the code for the tag
handler you've defined.

Furthermore, you seem to have arbitrarily moved around some of the
definitions for no apparent reason.  Please leave the entries in
alphabetical order.

Because of all of this, I'm going to revert your changes, and add in
what useful changes you've made.

As far as I can tell, this is fixing a bug in the renderer-type for
commandNavigation, adding a definition for dojoInitializer, adding a
definition for panelStack, and adding a renderer-type for schedule.

 In the future, please make changes incrementally and use wiki
comments to describe changes you've made.   If at all possible, do not
make whitespaces/formatting changes at the same time as functionality
changes.


On 10/2/07, Apache Wiki <wi...@apache.org> wrote:
> Dear Wiki user,
>
> You have subscribed to a wiki page or wiki category on "Myfaces Wiki" for change notification.
>
> The following page has been changed by Zied:
> http://wiki.apache.org/myfaces/Use_Facelets_with_Tomahawk
>
> ------------------------------------------------------------------------------
>       <tag>
>           <tag-name>commandButton</tag-name>
>           <component>
> -             <component-type>org.apache.myfaces.HtmlCommandButton</component-type>
> +             <component-type>org.apache.myfaces.HtmlCommandButton</component-type>
>           </component>
>       </tag>
>       <tag>
> @@ -73, +73 @@
>
>           <tag-name>commandNavigation</tag-name>
>           <component>
>               <component-type>org.apache.myfaces.HtmlCommandNavigation</component-type>
> -             <renderer-type>org.apache.myfaces.Navigation</renderer-type>
> +             <renderer-type>javax.faces.Link</renderer-type>
> -         </component>
> -     </tag>
> -     <tag>
> -         <tag-name>commandNavigation2</tag-name>
> -         <component>
> -             <component-type>org.apache.myfaces.HtmlCommandNavigationItem</component-type>
> -             <renderer-type>org.apache.myfaces.NavigationMenu</renderer-type>
>           </component>
>       </tag>
>       <tag>
> @@ -112, +105 @@
>
>           </component>
>       </tag>
>       <tag>
> +         <tag-name>dojoInitializer</tag-name>
> +         <component>
> +             <component-type>org.apache.myfaces.DojoInitializer</component-type>
> +             <renderer-type>org.apache.myfaces.DojoInitializerRenderer</renderer-type>
> +         </component>
> +     </tag>
> +     <tag>
>           <tag-name>div</tag-name>
>           <component>
>               <component-type>org.apache.myfaces.Div</component-type>
>           </component>
> -     </tag>
> -     <tag>
> -       <tag-name>document</tag-name>
> -       <component>
> -           <component-type>org.apache.myfaces.Document</component-type>
> -       </component>
> -     </tag>
> -     <tag>
> -       <tag-name>documentBody</tag-name>
> -       <component>
> -           <component-type>org.apache.myfaces.DocumentBody</component-type>
> -       </component>
> -     </tag>
> -     <tag>
> -       <tag-name>documentHead</tag-name>
> -       <component>
> -           <component-type>org.apache.myfaces.DocumentHead</component-type>
> -       </component>
>       </tag>
>       <tag>
>           <tag-name>graphicImage</tag-name>
> @@ -182, +164 @@
>
>               <component-type>org.apache.myfaces.InputHtml</component-type>
>               <renderer-type>org.apache.myfaces.InputHtml</renderer-type>
>           </component>
> -     </tag>
> +     </tag>
>       <tag>
>           <tag-name>inputSecret</tag-name>
>           <component>
> @@ -212, +194 @@
>
>           </component>
>       </tag>
>       <tag>
> +         <tag-name>message</tag-name>
> +         <component>
> +             <component-type>org.apache.myfaces.HtmlMessage</component-type>
> +             <renderer-type>org.apache.myfaces.Message</renderer-type>
> +         </component>
> +     </tag>
> +     <tag>
> +         <tag-name>messages</tag-name>
> +         <component>
> +             <component-type>org.apache.myfaces.HtmlMessages</component-type>
> +             <renderer-type>org.apache.myfaces.Messages</renderer-type>
> +         </component>
> +     </tag>
> +     <tag>
>           <tag-name>jscookMenu</tag-name>
> -               <!--
> -               <![CDATA[
> - Requires "<input type="hidden" name="jscook_action" />" to be manually added to the form
> -               ]]>
> -               -->
>           <component>
>               <component-type>org.apache.myfaces.JSCookMenu</component-type>
>               <renderer-type>org.apache.myfaces.JSCookMenu</renderer-type>
>           </component>
>       </tag>
>       <tag>
> -         <tag-name>message</tag-name>
> -         <component>
> -             <component-type>org.apache.myfaces.HtmlMessage</component-type>
> -             <renderer-type>org.apache.myfaces.Message</renderer-type>
> -         </component>
> -     </tag>
> -     <tag>
> -         <tag-name>messages</tag-name>
> -         <component>
> -             <component-type>org.apache.myfaces.HtmlMessages</component-type>
> -             <renderer-type>org.apache.myfaces.Messages</renderer-type>
> -         </component>
> -     </tag>
> -     <tag>
>           <tag-name>navigationMenuItem</tag-name>
>           <component>
>               <component-type>org.apache.myfaces.NavigationMenuItem</component-type>
> @@ -246, +223 @@
>
>       <tag>
>           <tag-name>navigationMenuItems</tag-name>
>           <component>
> -           <component-type>javax.faces.SelectItems</component-type>
> +             <component-type>javax.faces.SelectItems</component-type>
>           </component>
>       </tag>
>       <tag>
> @@ -254, +231 @@
>
>           <component>
>               <component-type>org.apache.myfaces.HtmlNewspaperTable</component-type>
>               <renderer-type>org.apache.myfaces.HtmlNewspaperTable</renderer-type>
> -         </component>
> +         </component>
>       </tag>
>       <tag>
>           <tag-name>outputText</tag-name>
> @@ -264, +241 @@
>
>           </component>
>       </tag>
>       <tag>
> -         <tag-name>panelGrid</tag-name>
> -         <component>
> -             <component-type>org.apache.myfaces.HtmlPanelGrid</component-type>
> -             <renderer-type>org.apache.myfaces.Grid</renderer-type>
> -         </component>
> -     </tag>
> -     <tag>
> -         <tag-name>panelGroup</tag-name>
> -         <component>
> -             <component-type>org.apache.myfaces.HtmlPanelGroup</component-type>
> -             <renderer-type>org.apache.myfaces.Group</renderer-type>
> -         </component>
> -     </tag>
> -     <tag>
>           <tag-name>panelNavigation</tag-name>
>           <component>
>               <component-type>org.apache.myfaces.HtmlPanelNavigation</component-type>
> @@ -306, +269 @@
>
>           </component>
>       </tag>
>       <tag>
> +         <tag-name>panelStack</tag-name>
> +         <component>
> +             <component-type>org.apache.myfaces.HtmlPanelStack</component-type>
> +         </component>
> +     </tag>
> +     <tag>
>           <tag-name>popup</tag-name>
>           <component>
>               <component-type>org.apache.myfaces.HtmlPopup</component-type>
> @@ -318, +287 @@
>
>               <component-type>org.apache.myfaces.HtmlRadio</component-type>
>               <renderer-type>org.apache.myfaces.Radio</renderer-type>
>           </component>
> -     </tag>
> +     </tag>
>       <tag>
>           <tag-name>saveState</tag-name>
>           <component>
>               <component-type>org.apache.myfaces.SaveState</component-type>
> -         </component>
> -     </tag>
> -     <tag>
> -         <tag-name>schedule</tag-name>
> -         <component>
> -             <component-type>org.apache.myfaces.Schedule</component-type>
>           </component>
>       </tag>
>       <tag>
> @@ -393, +356 @@
>
>               <component-type>org.apache.myfaces.HtmlSelectOneRadio</component-type>
>               <renderer-type>org.apache.myfaces.Radio</renderer-type>
>           </component>
> -     </tag>
> +     </tag>
> +     <tag>
> +         <tag-name>schedule</tag-name>
> +         <component>
> +             <component-type>org.apache.myfaces.Schedule</component-type>
> +             <renderer-type>org.apache.myfaces.Schedule</renderer-type>
> +         </component>
> +     </tag>
>       <tag>
>           <tag-name>stylesheet</tag-name>
>           <component>
>               <component-type>org.apache.myfaces.Stylesheet</component-type>
>           </component>
>       </tag>
> -     <!-- Note that "tree" will not work as-is.  Tree either needs a facelets
> +     <!-- Note that "tree" will not work as-is.  Tree either needs a facelets
>            TagHandler, or a refactoring of
>            org.apache.myfaces.custom.tree.taglib.TreeTag
>            and org.apache.myfaces.custom.tree.HtmlTree
> @@ -425, +395 @@
>
>               <component-type>org.apache.myfaces.HtmlTreeColumn</component-type>
>           </component>
>       </tag>
> -     <!--
> -         <tag-name>updateActionListener</tag-name> requires a Facelets TagHandler.   Use the functionality-equivalent JSF 1.2 f:setPropertyActionListener instead.  f:setPropertyActionListener has been backported as of facelets 1.1.11.  Note that the jsf-comp updateActionListener does not handle setting values on ui:include parameters while setPropertyActionListener will correctly propagate these values.
> -     -->
> +     <tag>
> +         <tag-name>updateActionListener</tag-name>
> +         <handler-class>com.google.code.tomahawk.facelets.UpdateActionListenerTagHandler</handler-class>
> +     </tag>
> +     <tag>
> +         <tag-name>document</tag-name>
> +         <component>
> +             <component-type>org.apache.myfaces.Document</component-type>
> +         </component>
> +     </tag>
> +     <tag>
> +         <tag-name>documentHead</tag-name>
> +         <component>
> +             <component-type>org.apache.myfaces.DocumentHead</component-type>
> +         </component>
> +     </tag>
> +     <tag>
> +         <tag-name>documentBody</tag-name>
> +         <component>
> +             <component-type>org.apache.myfaces.DocumentBody</component-type>
> +         </component>
> +     </tag>
> +
>       <tag>
>           <tag-name>validateEmail</tag-name>
>           <validator>
> @@ -447, +437 @@
>
>           </validator>
>       </tag>
>
> - </facelet-taglib>
> + </facelet-taglib>}}}
> - }}}
>
>   Here's a code snippet of how you would then use an inputDate control from the MyFaces extensions library in your facelet .xhtml file:
>
>