You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Guido Dubois (JIRA)" <de...@myfaces.apache.org> on 2007/10/11 19:30:50 UTC

[jira] Created: (TOBAGO-515) in facelets with binding attribute

<tx:in> in facelets with binding attribute
------------------------------------------

                 Key: TOBAGO-515
                 URL: https://issues.apache.org/jira/browse/TOBAGO-515
             Project: MyFaces Tobago
          Issue Type: Bug
          Components: Core
    Affects Versions: 1.0.12
         Environment: Facelets 1.1.13, MyFaces 1.1.6 snap (11.09.2007), Tobago 1.0.12 snap (11.10.2007)
            Reporter: Guido Dubois


...
  xmlns:tx="http://myfaces.apache.org/tobago/extension"
  xmlns:fx="http://myfaces.apache.org/tobago/facelet-extension"
...

If you have the following input field, the page rendering is broken. You get only a short demaged part of page code. If you remove the binding attribute all works fine...
...
        <tx:in id="name" value="#{counter.text}"
          binding="#{counter.textInput}" label="#{bundle.helloWorldName}"
          labelWidth="180px" validator="#{counter.stringValidator}"
          required="true" markup="bg_color" />
...

With the following input field, the page is rendered correctly, but you get a NullPointerException, if you want to use the UIInput field in a BackingBean
...
        <fx:in id="name" value="#{counter.text}"
          binding="#{counter.textInput}" label="#{bundle.helloWorldName}"
          labelWidth="180px" validator="#{counter.stringValidator}"
          required="true" markup="bg_color" />


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


[jira] Reopened: (TOBAGO-515) in facelets with binding attribute

Posted by "Guido Dubois (JIRA)" <de...@myfaces.apache.org>.
     [ https://issues.apache.org/jira/browse/TOBAGO-515?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Guido Dubois reopened TOBAGO-515:
---------------------------------


For fx:, ok.

But for tx: the page will not be rendered completely. There is only a small part of the page rendered. I think this is not in your mind...

> <tx:in> in facelets with binding attribute
> ------------------------------------------
>
>                 Key: TOBAGO-515
>                 URL: https://issues.apache.org/jira/browse/TOBAGO-515
>             Project: MyFaces Tobago
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.0.12
>         Environment: Facelets 1.1.13, MyFaces 1.1.6 snap (11.09.2007), Tobago 1.0.12 snap (11.10.2007)
>            Reporter: Guido Dubois
>         Attachments: tobago_faceletsexample.war
>
>
> ...
>   xmlns:tx="http://myfaces.apache.org/tobago/extension"
>   xmlns:fx="http://myfaces.apache.org/tobago/facelet-extension"
> ...
> If you have the following input field, the page rendering is broken. You get only a short demaged part of page code. If you remove the binding attribute all works fine...
> ...
>         <tx:in id="name" value="#{counter.text}"
>           binding="#{counter.textInput}" label="#{bundle.helloWorldName}"
>           labelWidth="180px" validator="#{counter.stringValidator}"
>           required="true" markup="bg_color" />
> ...
> With the following input field, the page is rendered correctly, but you get a NullPointerException, if you want to use the UIInput field in a BackingBean
> ...
>         <fx:in id="name" value="#{counter.text}"
>           binding="#{counter.textInput}" label="#{bundle.helloWorldName}"
>           labelWidth="180px" validator="#{counter.stringValidator}"
>           required="true" markup="bg_color" />

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


[jira] Commented: (TOBAGO-515) in facelets with binding attribute

Posted by "Bernd Bohmann (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TOBAGO-515?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12545499 ] 

Bernd Bohmann commented on TOBAGO-515:
--------------------------------------

The binding attribute for the tx variant in facelets has a different behavoir.
The binding point to a UIPanel instead of the UIInput. 
Unfortunately this difference can not changed.

The facelets-extension(tf) did not support the binding attribute. 
The facelets-extension is just a composition. See 

http://svn.apache.org/repos/asf/myfaces/tobago/trunk/extension/facelets/src/main/resources/META-INF/in.xml

But you can use the long specification of the extension:

<tc:panel>
   <f:facet name="layout">
     <tc:gridLayout columns="fixed;*"/>
   </f:facet>
   <tc:label value="#{label}" for="@auto"/>
   <tc:in value="#{value}">
     ...
   </tc:in>
 </tc:panel>   

> <tx:in> in facelets with binding attribute
> ------------------------------------------
>
>                 Key: TOBAGO-515
>                 URL: https://issues.apache.org/jira/browse/TOBAGO-515
>             Project: MyFaces Tobago
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.0.12
>         Environment: Facelets 1.1.13, MyFaces 1.1.6 snap (11.09.2007), Tobago 1.0.12 snap (11.10.2007)
>            Reporter: Guido Dubois
>         Attachments: tobago_faceletsexample.war
>
>
> ...
>   xmlns:tx="http://myfaces.apache.org/tobago/extension"
>   xmlns:fx="http://myfaces.apache.org/tobago/facelet-extension"
> ...
> If you have the following input field, the page rendering is broken. You get only a short demaged part of page code. If you remove the binding attribute all works fine...
> ...
>         <tx:in id="name" value="#{counter.text}"
>           binding="#{counter.textInput}" label="#{bundle.helloWorldName}"
>           labelWidth="180px" validator="#{counter.stringValidator}"
>           required="true" markup="bg_color" />
> ...
> With the following input field, the page is rendered correctly, but you get a NullPointerException, if you want to use the UIInput field in a BackingBean
> ...
>         <fx:in id="name" value="#{counter.text}"
>           binding="#{counter.textInput}" label="#{bundle.helloWorldName}"
>           labelWidth="180px" validator="#{counter.stringValidator}"
>           required="true" markup="bg_color" />

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


[jira] Commented: (TOBAGO-515) in facelets with binding attribute

Posted by "Guido Dubois (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TOBAGO-515?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12547075 ] 

Guido Dubois commented on TOBAGO-515:
-------------------------------------

I have tried to find an other solution. I found a way in the folowing article:

Facelets fits JSF like a glove
http://www-128.ibm.com/developerworks/java/library/j-facelets/

This way works but it is rather hard to extend such like in.xml composition definition for all attributes.

Then I remembered the suggestion from Tobias made in TOBAGO-513 concerning the the markup attribute and facelets. So I tried to define the component like this:

  xmlns:tx="http://myfaces.apache.org/tobago/facelet-extension"

        <tx:in id="compPA6" value="#{modelController.product.norm1470.compPa6}" label="#{bundle.productCompositionPA6}" labelWidth="265px">
          <f:convertNumber type="number" maxFractionDigits="2" pattern="#,##0.00" />
          <f:validateDoubleRange minimum="0.0" maximum="100.0" />

          <tc:attribute name="binding" value="#{editproductController.compInput" />
          <tc:attribute name="validator" value="#{editproductController.overAllValidator}" />

          <f:facet name="change">
            <tc:command actionListener="#{editproductController.valueChanged}">
              <tc:attribute name="renderedPartially" value=":page:panelProductComposition" />
            </tc:command>
          </f:facet>
        </tx:in>

And it works like in tobago-jsp style!
In this way you can define all attributes (markup, binding, validator, converter, ...) which are not supported in the compostion like in.xml and the way is really more easier than the first solution (Facelets fits JSF like a glove)...

> <tx:in> in facelets with binding attribute
> ------------------------------------------
>
>                 Key: TOBAGO-515
>                 URL: https://issues.apache.org/jira/browse/TOBAGO-515
>             Project: MyFaces Tobago
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.0.12
>         Environment: Facelets 1.1.13, MyFaces 1.1.6 snap (11.09.2007), Tobago 1.0.12 snap (11.10.2007)
>            Reporter: Guido Dubois
>         Attachments: tobago_faceletsexample.war
>
>
> ...
>   xmlns:tx="http://myfaces.apache.org/tobago/extension"
>   xmlns:fx="http://myfaces.apache.org/tobago/facelet-extension"
> ...
> If you have the following input field, the page rendering is broken. You get only a short demaged part of page code. If you remove the binding attribute all works fine...
> ...
>         <tx:in id="name" value="#{counter.text}"
>           binding="#{counter.textInput}" label="#{bundle.helloWorldName}"
>           labelWidth="180px" validator="#{counter.stringValidator}"
>           required="true" markup="bg_color" />
> ...
> With the following input field, the page is rendered correctly, but you get a NullPointerException, if you want to use the UIInput field in a BackingBean
> ...
>         <fx:in id="name" value="#{counter.text}"
>           binding="#{counter.textInput}" label="#{bundle.helloWorldName}"
>           labelWidth="180px" validator="#{counter.stringValidator}"
>           required="true" markup="bg_color" />

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


[jira] Commented: (TOBAGO-515) in facelets with binding attribute

Posted by "Bernd Bohmann (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TOBAGO-515?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12547109 ] 

Bernd Bohmann commented on TOBAGO-515:
--------------------------------------

Good news :-)

> <tx:in> in facelets with binding attribute
> ------------------------------------------
>
>                 Key: TOBAGO-515
>                 URL: https://issues.apache.org/jira/browse/TOBAGO-515
>             Project: MyFaces Tobago
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.0.12
>         Environment: Facelets 1.1.13, MyFaces 1.1.6 snap (11.09.2007), Tobago 1.0.12 snap (11.10.2007)
>            Reporter: Guido Dubois
>         Attachments: tobago_faceletsexample.war
>
>
> ...
>   xmlns:tx="http://myfaces.apache.org/tobago/extension"
>   xmlns:fx="http://myfaces.apache.org/tobago/facelet-extension"
> ...
> If you have the following input field, the page rendering is broken. You get only a short demaged part of page code. If you remove the binding attribute all works fine...
> ...
>         <tx:in id="name" value="#{counter.text}"
>           binding="#{counter.textInput}" label="#{bundle.helloWorldName}"
>           labelWidth="180px" validator="#{counter.stringValidator}"
>           required="true" markup="bg_color" />
> ...
> With the following input field, the page is rendered correctly, but you get a NullPointerException, if you want to use the UIInput field in a BackingBean
> ...
>         <fx:in id="name" value="#{counter.text}"
>           binding="#{counter.textInput}" label="#{bundle.helloWorldName}"
>           labelWidth="180px" validator="#{counter.stringValidator}"
>           required="true" markup="bg_color" />

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


[jira] Commented: (TOBAGO-515) in facelets with binding attribute

Posted by "Guido Dubois (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TOBAGO-515?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12545490 ] 

Guido Dubois commented on TOBAGO-515:
-------------------------------------

Have you already looked after this? I am waiting for this...

> <tx:in> in facelets with binding attribute
> ------------------------------------------
>
>                 Key: TOBAGO-515
>                 URL: https://issues.apache.org/jira/browse/TOBAGO-515
>             Project: MyFaces Tobago
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.0.12
>         Environment: Facelets 1.1.13, MyFaces 1.1.6 snap (11.09.2007), Tobago 1.0.12 snap (11.10.2007)
>            Reporter: Guido Dubois
>         Attachments: tobago_faceletsexample.war
>
>
> ...
>   xmlns:tx="http://myfaces.apache.org/tobago/extension"
>   xmlns:fx="http://myfaces.apache.org/tobago/facelet-extension"
> ...
> If you have the following input field, the page rendering is broken. You get only a short demaged part of page code. If you remove the binding attribute all works fine...
> ...
>         <tx:in id="name" value="#{counter.text}"
>           binding="#{counter.textInput}" label="#{bundle.helloWorldName}"
>           labelWidth="180px" validator="#{counter.stringValidator}"
>           required="true" markup="bg_color" />
> ...
> With the following input field, the page is rendered correctly, but you get a NullPointerException, if you want to use the UIInput field in a BackingBean
> ...
>         <fx:in id="name" value="#{counter.text}"
>           binding="#{counter.textInput}" label="#{bundle.helloWorldName}"
>           labelWidth="180px" validator="#{counter.stringValidator}"
>           required="true" markup="bg_color" />

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