You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@click.apache.org by "Stefax (JIRA)" <ji...@apache.org> on 2009/11/11 16:37:39 UTC

[jira] Created: (CLK-595) Can't apply to TextField label the same style as the one assigned to the Control

Can't apply to TextField label the same style as the one assigned to the Control
--------------------------------------------------------------------------------

                 Key: CLK-595
                 URL: https://issues.apache.org/jira/browse/CLK-595
             Project: Click
          Issue Type: Bug
          Components: core
    Affects Versions: 2.1.0 RC1
         Environment: tomcat on linux
            Reporter: Stefax


I need to set the same margin-bottom to the TextFiled and its label, but when I call the method setStyle("margin-bottom", "20px") of the TextField, it does not set the same margin/style to its label; for the java code:
TextField cld = new TextField("cld", "My Text Field: ");
 cld.setSize(20);
cld.setRequired(false);
cld.setStyle("margin-bottom", "20px");            
form.add(cld);

the resultant html code (generated putting $form in the html) is:

<td class="fields" align="left"><label for="form_cld">My Text Field: </label>&#160;</td>
<td align="left"><input type="text" name="cld" id="form_cld" value="" size="20" style="margin-bottom:20px;"/></td>

As you can see the style is applied to the intput text, but not to its label.

This generate a very ugly page, where all the label are rendered not near the fields they refer to.



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


[jira] Commented: (CLK-595) Can't apply to TextField label the same style as the one assigned to the Control

Posted by "Stefax (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CLK-595?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12776953#action_12776953 ] 

Stefax commented on CLK-595:
----------------------------

Excuse me, I only see now that you have still changed the type to new feature... :)


> Can't apply to TextField label the same style as the one assigned to the Control
> --------------------------------------------------------------------------------
>
>                 Key: CLK-595
>                 URL: https://issues.apache.org/jira/browse/CLK-595
>             Project: Click
>          Issue Type: New Feature
>          Components: core
>    Affects Versions: 2.1.0 RC1
>         Environment: tomcat on linux
>            Reporter: Stefax
>             Fix For: 2.2.0
>
>
> I need to set the same margin-bottom to the TextFiled and its label, but when I call the method setStyle("margin-bottom", "20px") of the TextField, it does not set the same margin/style to its label; for the java code:
> TextField cld = new TextField("cld", "My Text Field: ");
>  cld.setSize(20);
> cld.setRequired(false);
> cld.setStyle("margin-bottom", "20px");            
> form.add(cld);
> the resultant html code (generated putting $form in the html) is:
> <td class="fields" align="left"><label for="form_cld">My Text Field: </label>&#160;</td>
> <td align="left"><input type="text" name="cld" id="form_cld" value="" size="20" style="margin-bottom:20px;"/></td>
> As you can see the style is applied to the intput text, but not to its label.
> This generate a very ugly page, where all the label are rendered not near the fields they refer to.

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


[jira] Reopened: (CLK-595) Can't apply to TextField label the same style as the one assigned to the Control

Posted by "Bob Schellink (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CLK-595?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bob Schellink reopened CLK-595:
-------------------------------


> Can't apply to TextField label the same style as the one assigned to the Control
> --------------------------------------------------------------------------------
>
>                 Key: CLK-595
>                 URL: https://issues.apache.org/jira/browse/CLK-595
>             Project: Click
>          Issue Type: New Feature
>          Components: core
>    Affects Versions: 2.1.0 RC1
>         Environment: tomcat on linux
>            Reporter: Stefax
>             Fix For: 2.2.0
>
>
> I need to set the same margin-bottom to the TextFiled and its label, but when I call the method setStyle("margin-bottom", "20px") of the TextField, it does not set the same margin/style to its label; for the java code:
> TextField cld = new TextField("cld", "My Text Field: ");
>  cld.setSize(20);
> cld.setRequired(false);
> cld.setStyle("margin-bottom", "20px");            
> form.add(cld);
> the resultant html code (generated putting $form in the html) is:
> <td class="fields" align="left"><label for="form_cld">My Text Field: </label>&#160;</td>
> <td align="left"><input type="text" name="cld" id="form_cld" value="" size="20" style="margin-bottom:20px;"/></td>
> As you can see the style is applied to the intput text, but not to its label.
> This generate a very ugly page, where all the label are rendered not near the fields they refer to.

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


[jira] Commented: (CLK-595) Can't apply to TextField label the same style as the one assigned to the Control

Posted by "Stefax (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CLK-595?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12776948#action_12776948 ] 

Stefax commented on CLK-595:
----------------------------

Perfect! Have I to resubmit this issue as a new Feature request?
Thanks for your help!

> Can't apply to TextField label the same style as the one assigned to the Control
> --------------------------------------------------------------------------------
>
>                 Key: CLK-595
>                 URL: https://issues.apache.org/jira/browse/CLK-595
>             Project: Click
>          Issue Type: New Feature
>          Components: core
>    Affects Versions: 2.1.0 RC1
>         Environment: tomcat on linux
>            Reporter: Stefax
>             Fix For: 2.2.0
>
>
> I need to set the same margin-bottom to the TextFiled and its label, but when I call the method setStyle("margin-bottom", "20px") of the TextField, it does not set the same margin/style to its label; for the java code:
> TextField cld = new TextField("cld", "My Text Field: ");
>  cld.setSize(20);
> cld.setRequired(false);
> cld.setStyle("margin-bottom", "20px");            
> form.add(cld);
> the resultant html code (generated putting $form in the html) is:
> <td class="fields" align="left"><label for="form_cld">My Text Field: </label>&#160;</td>
> <td align="left"><input type="text" name="cld" id="form_cld" value="" size="20" style="margin-bottom:20px;"/></td>
> As you can see the style is applied to the intput text, but not to its label.
> This generate a very ugly page, where all the label are rendered not near the fields they refer to.

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


[jira] Closed: (CLK-595) Can't apply to TextField label the same style as the one assigned to the Control

Posted by "Bob Schellink (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CLK-595?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bob Schellink closed CLK-595.
-----------------------------

    Resolution: Won't Fix

This is not a bug. The Label is set by the Form and does not apply the Field styles to the label. 

If you need fine grain control you can style the field and label using CSS selectors or if that doesn't work, use manual layout or a custom Form.

> Can't apply to TextField label the same style as the one assigned to the Control
> --------------------------------------------------------------------------------
>
>                 Key: CLK-595
>                 URL: https://issues.apache.org/jira/browse/CLK-595
>             Project: Click
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 2.1.0 RC1
>         Environment: tomcat on linux
>            Reporter: Stefax
>
> I need to set the same margin-bottom to the TextFiled and its label, but when I call the method setStyle("margin-bottom", "20px") of the TextField, it does not set the same margin/style to its label; for the java code:
> TextField cld = new TextField("cld", "My Text Field: ");
>  cld.setSize(20);
> cld.setRequired(false);
> cld.setStyle("margin-bottom", "20px");            
> form.add(cld);
> the resultant html code (generated putting $form in the html) is:
> <td class="fields" align="left"><label for="form_cld">My Text Field: </label>&#160;</td>
> <td align="left"><input type="text" name="cld" id="form_cld" value="" size="20" style="margin-bottom:20px;"/></td>
> As you can see the style is applied to the intput text, but not to its label.
> This generate a very ugly page, where all the label are rendered not near the fields they refer to.

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


[jira] Commented: (CLK-595) Can't apply to TextField label the same style as the one assigned to the Control

Posted by "Bob Schellink (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CLK-595?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12776952#action_12776952 ] 

Bob Schellink commented on CLK-595:
-----------------------------------

No need, I've already updated the status.

> Can't apply to TextField label the same style as the one assigned to the Control
> --------------------------------------------------------------------------------
>
>                 Key: CLK-595
>                 URL: https://issues.apache.org/jira/browse/CLK-595
>             Project: Click
>          Issue Type: New Feature
>          Components: core
>    Affects Versions: 2.1.0 RC1
>         Environment: tomcat on linux
>            Reporter: Stefax
>             Fix For: 2.2.0
>
>
> I need to set the same margin-bottom to the TextFiled and its label, but when I call the method setStyle("margin-bottom", "20px") of the TextField, it does not set the same margin/style to its label; for the java code:
> TextField cld = new TextField("cld", "My Text Field: ");
>  cld.setSize(20);
> cld.setRequired(false);
> cld.setStyle("margin-bottom", "20px");            
> form.add(cld);
> the resultant html code (generated putting $form in the html) is:
> <td class="fields" align="left"><label for="form_cld">My Text Field: </label>&#160;</td>
> <td align="left"><input type="text" name="cld" id="form_cld" value="" size="20" style="margin-bottom:20px;"/></td>
> As you can see the style is applied to the intput text, but not to its label.
> This generate a very ugly page, where all the label are rendered not near the fields they refer to.

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


[jira] Updated: (CLK-595) Can't apply to TextField label the same style as the one assigned to the Control

Posted by "Bob Schellink (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CLK-595?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bob Schellink updated CLK-595:
------------------------------

    Fix Version/s: 2.2.0
       Issue Type: New Feature  (was: Bug)

Ok, instead of filing this as a bug, lets make it a new feature: add setLabelStyle / setLabelStyleClass methods on Field.

> Can't apply to TextField label the same style as the one assigned to the Control
> --------------------------------------------------------------------------------
>
>                 Key: CLK-595
>                 URL: https://issues.apache.org/jira/browse/CLK-595
>             Project: Click
>          Issue Type: New Feature
>          Components: core
>    Affects Versions: 2.1.0 RC1
>         Environment: tomcat on linux
>            Reporter: Stefax
>             Fix For: 2.2.0
>
>
> I need to set the same margin-bottom to the TextFiled and its label, but when I call the method setStyle("margin-bottom", "20px") of the TextField, it does not set the same margin/style to its label; for the java code:
> TextField cld = new TextField("cld", "My Text Field: ");
>  cld.setSize(20);
> cld.setRequired(false);
> cld.setStyle("margin-bottom", "20px");            
> form.add(cld);
> the resultant html code (generated putting $form in the html) is:
> <td class="fields" align="left"><label for="form_cld">My Text Field: </label>&#160;</td>
> <td align="left"><input type="text" name="cld" id="form_cld" value="" size="20" style="margin-bottom:20px;"/></td>
> As you can see the style is applied to the intput text, but not to its label.
> This generate a very ugly page, where all the label are rendered not near the fields they refer to.

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


[jira] Commented: (CLK-595) Can't apply to TextField label the same style as the one assigned to the Control

Posted by "Stefax (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CLK-595?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12776936#action_12776936 ] 

Stefax commented on CLK-595:
----------------------------

Styling margin is something usual and would be nice that the label associated to a field inherit that settings.
I think that would be useful if the field itself can set the style of its label with a method like setLabelStyle as the one of the form.
Thinking that all the label in the form must have the same style (form.setLabelStyle()) is a questionable choice, not convenient for web programming.
I like click framework and I find it very easy to use, so I hope that we can find a solution convenient for the users and the developers.

> Can't apply to TextField label the same style as the one assigned to the Control
> --------------------------------------------------------------------------------
>
>                 Key: CLK-595
>                 URL: https://issues.apache.org/jira/browse/CLK-595
>             Project: Click
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 2.1.0 RC1
>         Environment: tomcat on linux
>            Reporter: Stefax
>
> I need to set the same margin-bottom to the TextFiled and its label, but when I call the method setStyle("margin-bottom", "20px") of the TextField, it does not set the same margin/style to its label; for the java code:
> TextField cld = new TextField("cld", "My Text Field: ");
>  cld.setSize(20);
> cld.setRequired(false);
> cld.setStyle("margin-bottom", "20px");            
> form.add(cld);
> the resultant html code (generated putting $form in the html) is:
> <td class="fields" align="left"><label for="form_cld">My Text Field: </label>&#160;</td>
> <td align="left"><input type="text" name="cld" id="form_cld" value="" size="20" style="margin-bottom:20px;"/></td>
> As you can see the style is applied to the intput text, but not to its label.
> This generate a very ugly page, where all the label are rendered not near the fields they refer to.

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