You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Benjamin Rosenberger (JIRA)" <ji...@apache.org> on 2012/05/10 07:46:14 UTC

[jira] [Created] (TAP5-1928) zone with formsupport renders hidden input field after first child element and breaks css-styling

Benjamin Rosenberger created TAP5-1928:
------------------------------------------

             Summary: zone with formsupport renders hidden input field after first child element and breaks css-styling
                 Key: TAP5-1928
                 URL: https://issues.apache.org/jira/browse/TAP5-1928
             Project: Tapestry 5
          Issue Type: Bug
          Components: tapestry-core
    Affects Versions: 5.3.3
            Reporter: Benjamin Rosenberger
            Priority: Trivial


when adding a zone (HiddenFieldLocationRules == RelativeElementPosition.INSIDE) around checkboxes in a form 

{code}
...
<t:zone t:id="zone">
   <div t:id="checkBox1"/><t:label for="checkBox1"/>
</t:zone>
...
{code}

the hidden-input tag will be rendered after the first child element 

{code}
<div id="zone" class="t-zone">
   <input type="checkbox" name="checkBox1_137352f1806" id="checkBox1_6" disabled="disabled"><label class="inline" for="noteWorkshop_6">Service:</label>
   <input type="hidden" name="t:formdata" value="...">
   <label>label</label>
</div>
{code}

which breaks the css selekor

{code}
input[type="checkbox"][disabled] + label {
   ...
}
{code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (TAP5-1928) zone with formsupport renders hidden input field after first child element and breaks css-styling

Posted by "Benjamin Rosenberger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-1928?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13273043#comment-13273043 ] 

Benjamin Rosenberger commented on TAP5-1928:
--------------------------------------------

the css selektor parses through the dom, finds a disabled checkbox and afterwords the hidden input-field. so the label is for css not correlated to the checkbox anymore and does not apply the correct design.  (for the +-selektor see http://www.w3.org/TR/CSS2/selector.html, point 5.1)

the inclusion of an empty div-tag was also my solution
                
> zone with formsupport renders hidden input field after first child element and breaks css-styling
> -------------------------------------------------------------------------------------------------
>
>                 Key: TAP5-1928
>                 URL: https://issues.apache.org/jira/browse/TAP5-1928
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.3.3
>            Reporter: Benjamin Rosenberger
>            Priority: Trivial
>              Labels: css, form, input, zone
>
> when adding a zone (HiddenFieldLocationRules == RelativeElementPosition.INSIDE) around checkboxes in a form 
> {code}
> ...
> <t:zone t:id="zone">
>    <div t:id="checkBox1"/><t:label for="checkBox1"/>
> </t:zone>
> ...
> {code}
> the hidden-input tag will be rendered after the first child element 
> {code}
> <div id="zone" class="t-zone">
>    <input type="checkbox" name="checkBox1_137352f1806" id="checkBox1_6" disabled="disabled"><label class="inline" for="noteWorkshop_6">Service:</label>
>    <input type="hidden" name="t:formdata" value="...">
>    <label>label</label>
> </div>
> {code}
> which breaks the css selekor
> {code}
> input[type="checkbox"][disabled] + label {
>    ...
> }
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (TAP5-1928) zone with formsupport renders hidden input field after first child element and breaks css-styling

Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-1928?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13272703#comment-13272703 ] 

Howard M. Lewis Ship commented on TAP5-1928:
--------------------------------------------

Could you expand on how the CSS selector is broken?

A workaround for this is to provide a better spot for the hidden field, by including an empty <div> before the Checkbox component.
                
> zone with formsupport renders hidden input field after first child element and breaks css-styling
> -------------------------------------------------------------------------------------------------
>
>                 Key: TAP5-1928
>                 URL: https://issues.apache.org/jira/browse/TAP5-1928
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.3.3
>            Reporter: Benjamin Rosenberger
>            Priority: Trivial
>              Labels: css, form, input, zone
>
> when adding a zone (HiddenFieldLocationRules == RelativeElementPosition.INSIDE) around checkboxes in a form 
> {code}
> ...
> <t:zone t:id="zone">
>    <div t:id="checkBox1"/><t:label for="checkBox1"/>
> </t:zone>
> ...
> {code}
> the hidden-input tag will be rendered after the first child element 
> {code}
> <div id="zone" class="t-zone">
>    <input type="checkbox" name="checkBox1_137352f1806" id="checkBox1_6" disabled="disabled"><label class="inline" for="noteWorkshop_6">Service:</label>
>    <input type="hidden" name="t:formdata" value="...">
>    <label>label</label>
> </div>
> {code}
> which breaks the css selekor
> {code}
> input[type="checkbox"][disabled] + label {
>    ...
> }
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (TAP5-1928) zone with formsupport renders hidden input field after first child element and breaks css-styling

Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-1928?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13272703#comment-13272703 ] 

Howard M. Lewis Ship commented on TAP5-1928:
--------------------------------------------

Could you expand on how the CSS selector is broken?

A workaround for this is to provide a better spot for the hidden field, by including an empty <div> before the Checkbox component.
                
> zone with formsupport renders hidden input field after first child element and breaks css-styling
> -------------------------------------------------------------------------------------------------
>
>                 Key: TAP5-1928
>                 URL: https://issues.apache.org/jira/browse/TAP5-1928
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.3.3
>            Reporter: Benjamin Rosenberger
>            Priority: Trivial
>              Labels: css, form, input, zone
>
> when adding a zone (HiddenFieldLocationRules == RelativeElementPosition.INSIDE) around checkboxes in a form 
> {code}
> ...
> <t:zone t:id="zone">
>    <div t:id="checkBox1"/><t:label for="checkBox1"/>
> </t:zone>
> ...
> {code}
> the hidden-input tag will be rendered after the first child element 
> {code}
> <div id="zone" class="t-zone">
>    <input type="checkbox" name="checkBox1_137352f1806" id="checkBox1_6" disabled="disabled"><label class="inline" for="noteWorkshop_6">Service:</label>
>    <input type="hidden" name="t:formdata" value="...">
>    <label>label</label>
> </div>
> {code}
> which breaks the css selekor
> {code}
> input[type="checkbox"][disabled] + label {
>    ...
> }
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (TAP5-1928) zone with formsupport renders hidden input field after first child element and breaks css-styling

Posted by "Benjamin Rosenberger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-1928?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13273043#comment-13273043 ] 

Benjamin Rosenberger commented on TAP5-1928:
--------------------------------------------

the css selektor parses through the dom, finds a disabled checkbox and afterwords the hidden input-field. so the label is for css not correlated to the checkbox anymore and does not apply the correct design.  (for the +-selektor see http://www.w3.org/TR/CSS2/selector.html, point 5.1)

the inclusion of an empty div-tag was also my solution
                
> zone with formsupport renders hidden input field after first child element and breaks css-styling
> -------------------------------------------------------------------------------------------------
>
>                 Key: TAP5-1928
>                 URL: https://issues.apache.org/jira/browse/TAP5-1928
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.3.3
>            Reporter: Benjamin Rosenberger
>            Priority: Trivial
>              Labels: css, form, input, zone
>
> when adding a zone (HiddenFieldLocationRules == RelativeElementPosition.INSIDE) around checkboxes in a form 
> {code}
> ...
> <t:zone t:id="zone">
>    <div t:id="checkBox1"/><t:label for="checkBox1"/>
> </t:zone>
> ...
> {code}
> the hidden-input tag will be rendered after the first child element 
> {code}
> <div id="zone" class="t-zone">
>    <input type="checkbox" name="checkBox1_137352f1806" id="checkBox1_6" disabled="disabled"><label class="inline" for="noteWorkshop_6">Service:</label>
>    <input type="hidden" name="t:formdata" value="...">
>    <label>label</label>
> </div>
> {code}
> which breaks the css selekor
> {code}
> input[type="checkbox"][disabled] + label {
>    ...
> }
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira