myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Helmut Swaczinna (JIRA)" <>
Subject [jira] Commented: (TOBAGO-807) Allow script tag not only at page level
Date Fri, 23 Oct 2009 10:01:59 GMT


Helmut Swaczinna commented on TOBAGO-807:

I've found out the difference between the example and my app. I've got a script tag at page
level also. After that you can use a script tag at every level. But I've no idea why.

Try this:

  <tc:page height="200" width="300" label="Tobago Hello World Faclets">
    <f:facet name="layout">
      <tc:gridLayout rows="fixed;fixed;fixed;1*"/>
    <tc:out value="Hello World!"/>
    <tx:date id="test" label="Label"/>
    <ui:debug hotkey="m"/>
    <tc:button label="Go on" action="next" />
    <tc:button label="Confirmation Messages" action="#{messages.messages}" />

Maybe you can debug this.

> Allow script tag not only at page level
> ---------------------------------------
>                 Key: TOBAGO-807
>                 URL:
>             Project: MyFaces Tobago
>          Issue Type: Improvement
>          Components: Facelets
>    Affects Versions: 1.0.23
>         Environment: Facelets, all
>            Reporter: Helmut Swaczinna
>            Assignee: Udo Schnurpfeil
> With jsp you can put a tc:script in any other tag, with facelets only in tc:page. This
is a serious restriction when you define custom facelet tags.
> To solve this restriction I modified the ScriptHandler class:
>   public void apply(FaceletContext faceletContext, UIComponent parent)
>       throws IOException, FacesException, ELException {
>     UIPage page = ComponentUtil.findPage(faceletContext.getFacesContext(), parent);
>     if (page != null) {
> ...
>     } else {
>       throw new TagException(tag, "The ScriptTag cannot find UIPage. "
>           + "Check you have defined the ScriptTag inside of the PageTag!");
>     }

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message