You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Michael Rimov (JIRA)" <de...@myfaces.apache.org> on 2005/11/10 18:01:03 UTC

[jira] Created: (MYFACES-807) Allow t:htmlTag to support an attributes string.

Allow t:htmlTag to support an attributes string.
------------------------------------------------

         Key: MYFACES-807
         URL: http://issues.apache.org/jira/browse/MYFACES-807
     Project: MyFaces
        Type: Wish
  Components: Tomahawk  
    Versions: 1.1.0    
    Reporter: Michael Rimov
    Priority: Minor


I would really like to see <t:htmlTag> to allow html attributes to be passed into the html tag.

A concrete example:

<td colspan="2">
Hello World
</td>   

Would Ideally (to me) be converted to:

<t:htmlTag value="td" attributes="colspan='2'">
   <h:outputText value="Hello World"/>
</t:htmlTag>

Thanks! :)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (TOMAHAWK-64) Allow t:htmlTag to support an attributes string.

Posted by "Christian Kaltepoth (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TOMAHAWK-64?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12611509#action_12611509 ] 

Christian Kaltepoth commented on TOMAHAWK-64:
---------------------------------------------

This was necessary to access the <f:param> child components.

I'm using HtmlComponentUtils.getParamterMap() that iterates over all child components.
In my test setup (core-1.1 with JSP) this map only contained values when the component
rendered its children.

I thought this is expected behavior at least when using JSP. The javadocs of UIComponentBase say: 
"When this is true [getRendersChildren()]: This component's encodeBegin method will only be 
called after all the child components have been created and added to this component."

See:
http://myfaces.apache.org/core12/myfaces-api/apidocs/javax/faces/component/UIComponentBase.html#getRendersChildren()

Or do I misunderstand something here?

> Allow t:htmlTag to support an attributes string.
> ------------------------------------------------
>
>                 Key: TOMAHAWK-64
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-64
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: Html Tag
>            Reporter: Michael Rimov
>            Assignee: Leonardo Uribe
>            Priority: Minor
>             Fix For: 1.1.7-SNAPSHOT
>
>         Attachments: htmltag_param_feature.patch
>
>
> I would really like to see <t:htmlTag> to allow html attributes to be passed into the html tag.
> A concrete example:
> <td colspan="2">
> Hello World
> </td>   
> Would Ideally (to me) be converted to:
> <t:htmlTag value="td" attributes="colspan='2'">
>    <h:outputText value="Hello World"/>
> </t:htmlTag>
> Thanks! :)

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


[jira] Commented: (TOMAHAWK-64) Allow t:htmlTag to support an attributes string.

Posted by "Martin Marinschek (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TOMAHAWK-64?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12611515#action_12611515 ] 

Martin Marinschek commented on TOMAHAWK-64:
-------------------------------------------

Sure, it was a dumb question from my side - you are absolutely right. I don't see how we can solve this and still provide backward-compatibility, and in JSF 1.2, this tag is not relevant anymore, so we should probably not apply this patch at all.

regards,

Martin

> Allow t:htmlTag to support an attributes string.
> ------------------------------------------------
>
>                 Key: TOMAHAWK-64
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-64
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: Html Tag
>            Reporter: Michael Rimov
>            Assignee: Leonardo Uribe
>            Priority: Minor
>             Fix For: 1.1.7-SNAPSHOT
>
>         Attachments: htmltag_param_feature.patch
>
>
> I would really like to see <t:htmlTag> to allow html attributes to be passed into the html tag.
> A concrete example:
> <td colspan="2">
> Hello World
> </td>   
> Would Ideally (to me) be converted to:
> <t:htmlTag value="td" attributes="colspan='2'">
>    <h:outputText value="Hello World"/>
> </t:htmlTag>
> Thanks! :)

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


[jira] Commented: (TOMAHAWK-64) Allow t:htmlTag to support an attributes string.

Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TOMAHAWK-64?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12607375#action_12607375 ] 

Leonardo Uribe commented on TOMAHAWK-64:
----------------------------------------

The problem is related to 1.1 spec. On 1.2 each html chunk is surrounded automatically with f:verbatim tag. On 1.1 you have to do this in order to warrant proper rendering.

The result is that the code provided works well on 1.2 but not on 1.1

I cannot include on tomahawk core but I can include it as a new feature on tomahawk core12.

> Allow t:htmlTag to support an attributes string.
> ------------------------------------------------
>
>                 Key: TOMAHAWK-64
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-64
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: Html Tag
>            Reporter: Michael Rimov
>            Priority: Minor
>         Attachments: htmltag_param_feature.patch
>
>
> I would really like to see <t:htmlTag> to allow html attributes to be passed into the html tag.
> A concrete example:
> <td colspan="2">
> Hello World
> </td>   
> Would Ideally (to me) be converted to:
> <t:htmlTag value="td" attributes="colspan='2'">
>    <h:outputText value="Hello World"/>
> </t:htmlTag>
> Thanks! :)

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


[jira] Commented: (TOMAHAWK-64) Allow t:htmlTag to support an attributes string.

Posted by "Martin Marinschek (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TOMAHAWK-64?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12611487#action_12611487 ] 

Martin Marinschek commented on TOMAHAWK-64:
-------------------------------------------

Hi Christian,

but why did you change the component to render its children? For rendering attributes, you would not have had to do this.

regards,

Martin

> Allow t:htmlTag to support an attributes string.
> ------------------------------------------------
>
>                 Key: TOMAHAWK-64
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-64
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: Html Tag
>            Reporter: Michael Rimov
>            Assignee: Leonardo Uribe
>            Priority: Minor
>             Fix For: 1.1.7-SNAPSHOT
>
>         Attachments: htmltag_param_feature.patch
>
>
> I would really like to see <t:htmlTag> to allow html attributes to be passed into the html tag.
> A concrete example:
> <td colspan="2">
> Hello World
> </td>   
> Would Ideally (to me) be converted to:
> <t:htmlTag value="td" attributes="colspan='2'">
>    <h:outputText value="Hello World"/>
> </t:htmlTag>
> Thanks! :)

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


[jira] Commented: (TOMAHAWK-64) Allow t:htmlTag to support an attributes string.

Posted by "Vytautas Jakutis (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/TOMAHAWK-64?page=comments#action_12423286 ] 
            
Vytautas Jakutis commented on TOMAHAWK-64:
------------------------------------------

Hullo, 
I just though that it would be far more nice to use f:param for attributes.

P.S. Pleeease, implement this, I need such a feature badly :)

> Allow t:htmlTag to support an attributes string.
> ------------------------------------------------
>
>                 Key: TOMAHAWK-64
>                 URL: http://issues.apache.org/jira/browse/TOMAHAWK-64
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: Html Tag
>            Reporter: Michael Rimov
>            Priority: Minor
>
> I would really like to see <t:htmlTag> to allow html attributes to be passed into the html tag.
> A concrete example:
> <td colspan="2">
> Hello World
> </td>   
> Would Ideally (to me) be converted to:
> <t:htmlTag value="td" attributes="colspan='2'">
>    <h:outputText value="Hello World"/>
> </t:htmlTag>
> Thanks! :)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (TOMAHAWK-64) Allow t:htmlTag to support an attributes string.

Posted by "Christian Kaltepoth (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TOMAHAWK-64?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12611521#action_12611521 ] 

Christian Kaltepoth commented on TOMAHAWK-64:
---------------------------------------------

I agree that breaking backward-compatibility is a deal-breaker in this case.
Unfortunately I did not realize the consequences of changing the rending 
behavior of the component when I wrote the patch.

> Allow t:htmlTag to support an attributes string.
> ------------------------------------------------
>
>                 Key: TOMAHAWK-64
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-64
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: Html Tag
>            Reporter: Michael Rimov
>            Assignee: Leonardo Uribe
>            Priority: Minor
>             Fix For: 1.1.7-SNAPSHOT
>
>         Attachments: htmltag_param_feature.patch
>
>
> I would really like to see <t:htmlTag> to allow html attributes to be passed into the html tag.
> A concrete example:
> <td colspan="2">
> Hello World
> </td>   
> Would Ideally (to me) be converted to:
> <t:htmlTag value="td" attributes="colspan='2'">
>    <h:outputText value="Hello World"/>
> </t:htmlTag>
> Thanks! :)

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


[jira] Commented: (TOMAHAWK-64) Allow t:htmlTag to support an attributes string.

Posted by "Christian Kaltepoth (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TOMAHAWK-64?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12607496#action_12607496 ] 

Christian Kaltepoth commented on TOMAHAWK-64:
---------------------------------------------

Thank you very much for looking into the patch and applying it to tomahawk12.
I'm sorry I didn't notice the problem of the broken example in htmlTag.jsp
with core11.

One last question just to clear things up: I am aware of the problem with
HTML code and f:verbatim tags in the 1.1 spec. So it seems to me, that the
original code in htmlTag.jsp isn't correct:

<t:htmlTag value="h1"><b>h1</b> tag.</t:htmlTag>

As HTML code has to be surrounded by a f:verbatim tag, this code should look like this:

<t:htmlTag value="h1"><f:verbatim><b>h1</b> tag.</f:verbatim></t:htmlTag>

In this case my code works without issues. The version without f:verbatim tags
seems to break, because the component was modified to render the children itself.

Unfortunately the patch would certainly break existing JSF 1.1 pages that were build
according to the old example.


> Allow t:htmlTag to support an attributes string.
> ------------------------------------------------
>
>                 Key: TOMAHAWK-64
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-64
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: Html Tag
>            Reporter: Michael Rimov
>            Assignee: Leonardo Uribe
>            Priority: Minor
>             Fix For: 1.1.7-SNAPSHOT
>
>         Attachments: htmltag_param_feature.patch
>
>
> I would really like to see <t:htmlTag> to allow html attributes to be passed into the html tag.
> A concrete example:
> <td colspan="2">
> Hello World
> </td>   
> Would Ideally (to me) be converted to:
> <t:htmlTag value="td" attributes="colspan='2'">
>    <h:outputText value="Hello World"/>
> </t:htmlTag>
> Thanks! :)

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


[jira] Commented: (TOMAHAWK-64) Allow t:htmlTag to support an attributes string.

Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TOMAHAWK-64?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12607353#action_12607353 ] 

Leonardo Uribe commented on TOMAHAWK-64:
----------------------------------------

The patch has  a problem

It render this:

    <b>h1</b> tag.<h1></h1>
    <b>h2</b> tag.<h2></h2>
    <b>p</b> tag.<p></p>

    <b>i</b> tag.<i></i>

code:

    <t:htmlTag value="h1"><b>h1</b> tag.</t:htmlTag>
    <t:htmlTag value="h2"><b>h2</b> tag.</t:htmlTag>
    <t:htmlTag value="p"><b>p</b> tag.</t:htmlTag>
    <t:htmlTag value="i"><b>i</b> tag.</t:htmlTag>

I'll take a look to see what is missing.

> Allow t:htmlTag to support an attributes string.
> ------------------------------------------------
>
>                 Key: TOMAHAWK-64
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-64
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: Html Tag
>            Reporter: Michael Rimov
>            Priority: Minor
>         Attachments: htmltag_param_feature.patch
>
>
> I would really like to see <t:htmlTag> to allow html attributes to be passed into the html tag.
> A concrete example:
> <td colspan="2">
> Hello World
> </td>   
> Would Ideally (to me) be converted to:
> <t:htmlTag value="td" attributes="colspan='2'">
>    <h:outputText value="Hello World"/>
> </t:htmlTag>
> Thanks! :)

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


[jira] Commented: (TOMAHAWK-64) Allow t:htmlTag to support an attributes string.

Posted by "Matthias Weßendorf (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/TOMAHAWK-64?page=comments#action_12423503 ] 
            
Matthias Weßendorf commented on TOMAHAWK-64:
--------------------------------------------

Hi Vytautas Jakutis ,

if you like to see such a feature, go ahead and develop it.
The jira here is the place for providing the patch.

A developer of tomahawk is a longer way :)
You need to be active on the mailing list and provide several patches/fixes.

HTH,
Matthias

> Allow t:htmlTag to support an attributes string.
> ------------------------------------------------
>
>                 Key: TOMAHAWK-64
>                 URL: http://issues.apache.org/jira/browse/TOMAHAWK-64
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: Html Tag
>            Reporter: Michael Rimov
>            Priority: Minor
>
> I would really like to see <t:htmlTag> to allow html attributes to be passed into the html tag.
> A concrete example:
> <td colspan="2">
> Hello World
> </td>   
> Would Ideally (to me) be converted to:
> <t:htmlTag value="td" attributes="colspan='2'">
>    <h:outputText value="Hello World"/>
> </t:htmlTag>
> Thanks! :)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Updated: (TOMAHAWK-64) Allow t:htmlTag to support an attributes string.

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

Lutz Ulruch updated TOMAHAWK-64:
--------------------------------

    Status: Patch Available  (was: Open)

> Allow t:htmlTag to support an attributes string.
> ------------------------------------------------
>
>                 Key: TOMAHAWK-64
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-64
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: Html Tag
>            Reporter: Michael Rimov
>            Priority: Minor
>
> I would really like to see <t:htmlTag> to allow html attributes to be passed into the html tag.
> A concrete example:
> <td colspan="2">
> Hello World
> </td>   
> Would Ideally (to me) be converted to:
> <t:htmlTag value="td" attributes="colspan='2'">
>    <h:outputText value="Hello World"/>
> </t:htmlTag>
> Thanks! :)

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


[jira] Commented: (TOMAHAWK-64) Allow t:htmlTag to support an attributes string.

Posted by "Christian Kaltepoth (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TOMAHAWK-64?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12607301#action_12607301 ] 

Christian Kaltepoth commented on TOMAHAWK-64:
---------------------------------------------

I think Vytauta's idea of nested <f:param> tags for <t:htmlTag> can be very
useful for people working with legacy JSF 1.1 w/ JSP applications.
And I also think, that the number of voters for this issue proves this. :-)

I implemented this feature and attached a patch against current tomahawk trunk.
The patch also includes updated documentation and a small example for 
myfaces-example-simple.

> Allow t:htmlTag to support an attributes string.
> ------------------------------------------------
>
>                 Key: TOMAHAWK-64
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-64
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: Html Tag
>            Reporter: Michael Rimov
>            Priority: Minor
>         Attachments: htmltag_param_feature.patch
>
>
> I would really like to see <t:htmlTag> to allow html attributes to be passed into the html tag.
> A concrete example:
> <td colspan="2">
> Hello World
> </td>   
> Would Ideally (to me) be converted to:
> <t:htmlTag value="td" attributes="colspan='2'">
>    <h:outputText value="Hello World"/>
> </t:htmlTag>
> Thanks! :)

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


[jira] Commented: (TOMAHAWK-64) Allow t:htmlTag to support an attributes string.

Posted by "Vytautas Jakutis (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/TOMAHAWK-64?page=comments#action_12423287 ] 
            
Vytautas Jakutis commented on TOMAHAWK-64:
------------------------------------------

My use case:

<t:document>
   <t:documentHead>
      <t:htmlTag value="link">
         <f:param name="rel" value="stylesheet"/>
         <f:param name="type" value="text/css"/>
         <f:param name="href" value="#{request.contextPath}/resources/main.css"/>
      </t:htmlTag>
      <t:htmlTag value="title">
         <tiles:getAsString name="title" />
      </t:htmlTag>
   </t:documentHead>
   <t:documentBody>
   ...
   </t:documentBody>
</t:document>

P.S. Or should I become a developer of Tomahawk, and implement myself?

> Allow t:htmlTag to support an attributes string.
> ------------------------------------------------
>
>                 Key: TOMAHAWK-64
>                 URL: http://issues.apache.org/jira/browse/TOMAHAWK-64
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: Html Tag
>            Reporter: Michael Rimov
>            Priority: Minor
>
> I would really like to see <t:htmlTag> to allow html attributes to be passed into the html tag.
> A concrete example:
> <td colspan="2">
> Hello World
> </td>   
> Would Ideally (to me) be converted to:
> <t:htmlTag value="td" attributes="colspan='2'">
>    <h:outputText value="Hello World"/>
> </t:htmlTag>
> Thanks! :)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira