You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Milo van der Zee (JIRA)" <de...@myfaces.apache.org> on 2007/02/05 15:42:06 UTC

[jira] Created: (TOMAHAWK-879) InputSuggestAjax does not use the "style" option

InputSuggestAjax does not use the "style" option
------------------------------------------------

                 Key: TOMAHAWK-879
                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-879
             Project: MyFaces Tomahawk
          Issue Type: New Feature
          Components: InputSuggestAjax
    Affects Versions: 1.1.5-SNAPSHOT
         Environment: Windows XP, Tomcat 5.5.20
            Reporter: Milo van der Zee
            Priority: Minor


The tag like: 

====================================
<s:inputSuggestAjax suggestedItemsMethod="#{inputSuggest.getSuggestItems}" 
	                          value="#{inputSuggest.selectedValue}"
	                          charset="utf-8"
	                          style="width: 200px;"
	                          autoComplete="off"
	                          />
====================================

did not work as expected. It did NOT use the "style". By applying the following patch it will work.

====================================
InputSuggestAjaxRenderer.java:
...
        }

        out.startElement(HTML.DIV_ELEM, component);
        out.writeAttribute(HTML.ID_ATTR, clientId , null);
        if(inputSuggestAjax.getStyle() != null) {
            out.writeAttribute(HTML.STYLE_ATTR, inputSuggestAjax.getStyle(), null);
        }
        out.endElement(HTML.DIV_ELEM);

        String inputSuggestComponentVar = DojoUtils.calculateWidgetVarName(clientId);
...
====================================

Or do I just not know how the InputSuggestAjax should be used and was this possible all along? (I know how to use a containing DIV to simulate part of this but that makes HTML dirty)

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


[jira] Commented: (TOMAHAWK-879) InputSuggestAjax does not use the "style" option

Posted by "Milo van der Zee (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TOMAHAWK-879?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12472198 ] 

Milo van der Zee commented on TOMAHAWK-879:
-------------------------------------------

I obviously mean 
<style>
  field1.dojo... {
    width: 200px !important;
  }
</style>
<div class="field1"><inputSuggestAjax ...></div>

(sorrie, could not find how to edit a post)

> InputSuggestAjax does not use the "style" option
> ------------------------------------------------
>
>                 Key: TOMAHAWK-879
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-879
>             Project: MyFaces Tomahawk
>          Issue Type: New Feature
>          Components: InputSuggestAjax
>    Affects Versions: 1.1.5-SNAPSHOT
>         Environment: Windows XP, Tomcat 5.5.20
>            Reporter: Milo van der Zee
>         Assigned To: Gerald Müllan
>            Priority: Minor
>             Fix For: 1.1.5-SNAPSHOT
>
>         Attachments: InputSuggestAjaxRenderer.java
>
>
> The tag like: 
> ====================================
> <s:inputSuggestAjax suggestedItemsMethod="#{inputSuggest.getSuggestItems}" 
> 	                          value="#{inputSuggest.selectedValue}"
> 	                          charset="utf-8"
> 	                          style="width: 200px;"
> 	                          autoComplete="off"
> 	                          />
> ====================================
> did not work as expected. It did NOT use the "style". By applying the following patch it will work.
> ====================================
> InputSuggestAjaxRenderer.java:
> ...
>         }
>         out.startElement(HTML.DIV_ELEM, component);
>         out.writeAttribute(HTML.ID_ATTR, clientId , null);
>         if(inputSuggestAjax.getStyle() != null) {
>             out.writeAttribute(HTML.STYLE_ATTR, inputSuggestAjax.getStyle(), null);
>         }
>         out.endElement(HTML.DIV_ELEM);
>         String inputSuggestComponentVar = DojoUtils.calculateWidgetVarName(clientId);
> ...
> ====================================
> Or do I just not know how the InputSuggestAjax should be used and was this possible all along? (I know how to use a containing DIV to simulate part of this but that makes HTML dirty)

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


[jira] Commented: (TOMAHAWK-879) InputSuggestAjax does not use the "style" option

Posted by "Werner Punz (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TOMAHAWK-879?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12470250 ] 

Werner Punz commented on TOMAHAWK-879:
--------------------------------------

Well the style only makes partially sense in case of the dojo widgets, dojo has its own mechanisms,
you have to add the attributes differently.


> InputSuggestAjax does not use the "style" option
> ------------------------------------------------
>
>                 Key: TOMAHAWK-879
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-879
>             Project: MyFaces Tomahawk
>          Issue Type: New Feature
>          Components: InputSuggestAjax
>    Affects Versions: 1.1.5-SNAPSHOT
>         Environment: Windows XP, Tomcat 5.5.20
>            Reporter: Milo van der Zee
>            Priority: Minor
>         Attachments: InputSuggestAjaxRenderer.java
>
>
> The tag like: 
> ====================================
> <s:inputSuggestAjax suggestedItemsMethod="#{inputSuggest.getSuggestItems}" 
> 	                          value="#{inputSuggest.selectedValue}"
> 	                          charset="utf-8"
> 	                          style="width: 200px;"
> 	                          autoComplete="off"
> 	                          />
> ====================================
> did not work as expected. It did NOT use the "style". By applying the following patch it will work.
> ====================================
> InputSuggestAjaxRenderer.java:
> ...
>         }
>         out.startElement(HTML.DIV_ELEM, component);
>         out.writeAttribute(HTML.ID_ATTR, clientId , null);
>         if(inputSuggestAjax.getStyle() != null) {
>             out.writeAttribute(HTML.STYLE_ATTR, inputSuggestAjax.getStyle(), null);
>         }
>         out.endElement(HTML.DIV_ELEM);
>         String inputSuggestComponentVar = DojoUtils.calculateWidgetVarName(clientId);
> ...
> ====================================
> Or do I just not know how the InputSuggestAjax should be used and was this possible all along? (I know how to use a containing DIV to simulate part of this but that makes HTML dirty)

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


[jira] Commented: (TOMAHAWK-879) InputSuggestAjax does not use the "style" option

Posted by "Milo van der Zee (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TOMAHAWK-879?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12472216 ] 

Milo van der Zee commented on TOMAHAWK-879:
-------------------------------------------

yes, but that changes the style for every instance. Most of the time I like to be able to set the width of individual input fields.

PS: thanks for adding the patch to your code.

> InputSuggestAjax does not use the "style" option
> ------------------------------------------------
>
>                 Key: TOMAHAWK-879
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-879
>             Project: MyFaces Tomahawk
>          Issue Type: New Feature
>          Components: InputSuggestAjax
>    Affects Versions: 1.1.5-SNAPSHOT
>         Environment: Windows XP, Tomcat 5.5.20
>            Reporter: Milo van der Zee
>         Assigned To: Gerald Müllan
>            Priority: Minor
>             Fix For: 1.1.5-SNAPSHOT
>
>         Attachments: InputSuggestAjaxRenderer.java
>
>
> The tag like: 
> ====================================
> <s:inputSuggestAjax suggestedItemsMethod="#{inputSuggest.getSuggestItems}" 
> 	                          value="#{inputSuggest.selectedValue}"
> 	                          charset="utf-8"
> 	                          style="width: 200px;"
> 	                          autoComplete="off"
> 	                          />
> ====================================
> did not work as expected. It did NOT use the "style". By applying the following patch it will work.
> ====================================
> InputSuggestAjaxRenderer.java:
> ...
>         }
>         out.startElement(HTML.DIV_ELEM, component);
>         out.writeAttribute(HTML.ID_ATTR, clientId , null);
>         if(inputSuggestAjax.getStyle() != null) {
>             out.writeAttribute(HTML.STYLE_ATTR, inputSuggestAjax.getStyle(), null);
>         }
>         out.endElement(HTML.DIV_ELEM);
>         String inputSuggestComponentVar = DojoUtils.calculateWidgetVarName(clientId);
> ...
> ====================================
> Or do I just not know how the InputSuggestAjax should be used and was this possible all along? (I know how to use a containing DIV to simulate part of this but that makes HTML dirty)

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


[jira] Commented: (TOMAHAWK-879) InputSuggestAjax does not use the "style" option

Posted by "Milo van der Zee (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TOMAHAWK-879?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12471097 ] 

Milo van der Zee commented on TOMAHAWK-879:
-------------------------------------------

Hello Werner, what do you mean? The style is perfectly propagated to the dojo widget (the "INPUT" tag part of the widget). Especially for the width this is very useful to have. This is probably what you mean with "partially". But nevertheless the style is useful and does cost almost nothing in coding. So I hope it will be included in the main version. Makes my patching a bit easier.


> InputSuggestAjax does not use the "style" option
> ------------------------------------------------
>
>                 Key: TOMAHAWK-879
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-879
>             Project: MyFaces Tomahawk
>          Issue Type: New Feature
>          Components: InputSuggestAjax
>    Affects Versions: 1.1.5-SNAPSHOT
>         Environment: Windows XP, Tomcat 5.5.20
>            Reporter: Milo van der Zee
>            Priority: Minor
>         Attachments: InputSuggestAjaxRenderer.java
>
>
> The tag like: 
> ====================================
> <s:inputSuggestAjax suggestedItemsMethod="#{inputSuggest.getSuggestItems}" 
> 	                          value="#{inputSuggest.selectedValue}"
> 	                          charset="utf-8"
> 	                          style="width: 200px;"
> 	                          autoComplete="off"
> 	                          />
> ====================================
> did not work as expected. It did NOT use the "style". By applying the following patch it will work.
> ====================================
> InputSuggestAjaxRenderer.java:
> ...
>         }
>         out.startElement(HTML.DIV_ELEM, component);
>         out.writeAttribute(HTML.ID_ATTR, clientId , null);
>         if(inputSuggestAjax.getStyle() != null) {
>             out.writeAttribute(HTML.STYLE_ATTR, inputSuggestAjax.getStyle(), null);
>         }
>         out.endElement(HTML.DIV_ELEM);
>         String inputSuggestComponentVar = DojoUtils.calculateWidgetVarName(clientId);
> ...
> ====================================
> Or do I just not know how the InputSuggestAjax should be used and was this possible all along? (I know how to use a containing DIV to simulate part of this but that makes HTML dirty)

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


[jira] Updated: (TOMAHAWK-879) InputSuggestAjax does not use the "style" option

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

Milo van der Zee updated TOMAHAWK-879:
--------------------------------------

    Status: Patch Available  (was: Open)

> InputSuggestAjax does not use the "style" option
> ------------------------------------------------
>
>                 Key: TOMAHAWK-879
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-879
>             Project: MyFaces Tomahawk
>          Issue Type: New Feature
>          Components: InputSuggestAjax
>    Affects Versions: 1.1.5-SNAPSHOT
>         Environment: Windows XP, Tomcat 5.5.20
>            Reporter: Milo van der Zee
>            Priority: Minor
>
> The tag like: 
> ====================================
> <s:inputSuggestAjax suggestedItemsMethod="#{inputSuggest.getSuggestItems}" 
> 	                          value="#{inputSuggest.selectedValue}"
> 	                          charset="utf-8"
> 	                          style="width: 200px;"
> 	                          autoComplete="off"
> 	                          />
> ====================================
> did not work as expected. It did NOT use the "style". By applying the following patch it will work.
> ====================================
> InputSuggestAjaxRenderer.java:
> ...
>         }
>         out.startElement(HTML.DIV_ELEM, component);
>         out.writeAttribute(HTML.ID_ATTR, clientId , null);
>         if(inputSuggestAjax.getStyle() != null) {
>             out.writeAttribute(HTML.STYLE_ATTR, inputSuggestAjax.getStyle(), null);
>         }
>         out.endElement(HTML.DIV_ELEM);
>         String inputSuggestComponentVar = DojoUtils.calculateWidgetVarName(clientId);
> ...
> ====================================
> Or do I just not know how the InputSuggestAjax should be used and was this possible all along? (I know how to use a containing DIV to simulate part of this but that makes HTML dirty)

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


[jira] Commented: (TOMAHAWK-879) InputSuggestAjax does not use the "style" option

Posted by "Gerald Müllan (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TOMAHAWK-879?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12472199 ] 

Gerald Müllan commented on TOMAHAWK-879:
----------------------------------------

body .dojoComboBox {
        width:300px;
}

This sould do the work (among with other style attributes)

> InputSuggestAjax does not use the "style" option
> ------------------------------------------------
>
>                 Key: TOMAHAWK-879
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-879
>             Project: MyFaces Tomahawk
>          Issue Type: New Feature
>          Components: InputSuggestAjax
>    Affects Versions: 1.1.5-SNAPSHOT
>         Environment: Windows XP, Tomcat 5.5.20
>            Reporter: Milo van der Zee
>         Assigned To: Gerald Müllan
>            Priority: Minor
>             Fix For: 1.1.5-SNAPSHOT
>
>         Attachments: InputSuggestAjaxRenderer.java
>
>
> The tag like: 
> ====================================
> <s:inputSuggestAjax suggestedItemsMethod="#{inputSuggest.getSuggestItems}" 
> 	                          value="#{inputSuggest.selectedValue}"
> 	                          charset="utf-8"
> 	                          style="width: 200px;"
> 	                          autoComplete="off"
> 	                          />
> ====================================
> did not work as expected. It did NOT use the "style". By applying the following patch it will work.
> ====================================
> InputSuggestAjaxRenderer.java:
> ...
>         }
>         out.startElement(HTML.DIV_ELEM, component);
>         out.writeAttribute(HTML.ID_ATTR, clientId , null);
>         if(inputSuggestAjax.getStyle() != null) {
>             out.writeAttribute(HTML.STYLE_ATTR, inputSuggestAjax.getStyle(), null);
>         }
>         out.endElement(HTML.DIV_ELEM);
>         String inputSuggestComponentVar = DojoUtils.calculateWidgetVarName(clientId);
> ...
> ====================================
> Or do I just not know how the InputSuggestAjax should be used and was this possible all along? (I know how to use a containing DIV to simulate part of this but that makes HTML dirty)

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


[jira] Commented: (TOMAHAWK-879) InputSuggestAjax does not use the "style" option

Posted by "Milo van der Zee (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TOMAHAWK-879?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12472195 ] 

Milo van der Zee commented on TOMAHAWK-879:
-------------------------------------------

I understand that it can be done with the dojo stylesheet but then it is hard to simply set the properties of every input field to a different value. There is no id and including the <inputSuggestAjax> tag in a div for the style is not desirable. Or do I really mis something. I'm not that experienced with HTML...

<div style="width: 200px;"><inputSuggestAjax ...></div>
This results in an unwanted new-line for the input tag.


> InputSuggestAjax does not use the "style" option
> ------------------------------------------------
>
>                 Key: TOMAHAWK-879
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-879
>             Project: MyFaces Tomahawk
>          Issue Type: New Feature
>          Components: InputSuggestAjax
>    Affects Versions: 1.1.5-SNAPSHOT
>         Environment: Windows XP, Tomcat 5.5.20
>            Reporter: Milo van der Zee
>         Assigned To: Gerald Müllan
>            Priority: Minor
>             Fix For: 1.1.5-SNAPSHOT
>
>         Attachments: InputSuggestAjaxRenderer.java
>
>
> The tag like: 
> ====================================
> <s:inputSuggestAjax suggestedItemsMethod="#{inputSuggest.getSuggestItems}" 
> 	                          value="#{inputSuggest.selectedValue}"
> 	                          charset="utf-8"
> 	                          style="width: 200px;"
> 	                          autoComplete="off"
> 	                          />
> ====================================
> did not work as expected. It did NOT use the "style". By applying the following patch it will work.
> ====================================
> InputSuggestAjaxRenderer.java:
> ...
>         }
>         out.startElement(HTML.DIV_ELEM, component);
>         out.writeAttribute(HTML.ID_ATTR, clientId , null);
>         if(inputSuggestAjax.getStyle() != null) {
>             out.writeAttribute(HTML.STYLE_ATTR, inputSuggestAjax.getStyle(), null);
>         }
>         out.endElement(HTML.DIV_ELEM);
>         String inputSuggestComponentVar = DojoUtils.calculateWidgetVarName(clientId);
> ...
> ====================================
> Or do I just not know how the InputSuggestAjax should be used and was this possible all along? (I know how to use a containing DIV to simulate part of this but that makes HTML dirty)

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


[jira] Updated: (TOMAHAWK-879) InputSuggestAjax does not use the "style" option

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

Gerald Müllan updated TOMAHAWK-879:
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 1.1.5-SNAPSHOT
           Status: Resolved  (was: Patch Available)

I have added this along with the styleClass to the div which will be replaced by the widget. However, styling of the widget should be done like it is mentioned in:

http://wiki.apache.org/myfaces/InputSuggestAjax

(also in case of the width)

> InputSuggestAjax does not use the "style" option
> ------------------------------------------------
>
>                 Key: TOMAHAWK-879
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-879
>             Project: MyFaces Tomahawk
>          Issue Type: New Feature
>          Components: InputSuggestAjax
>    Affects Versions: 1.1.5-SNAPSHOT
>         Environment: Windows XP, Tomcat 5.5.20
>            Reporter: Milo van der Zee
>         Assigned To: Gerald Müllan
>            Priority: Minor
>             Fix For: 1.1.5-SNAPSHOT
>
>         Attachments: InputSuggestAjaxRenderer.java
>
>
> The tag like: 
> ====================================
> <s:inputSuggestAjax suggestedItemsMethod="#{inputSuggest.getSuggestItems}" 
> 	                          value="#{inputSuggest.selectedValue}"
> 	                          charset="utf-8"
> 	                          style="width: 200px;"
> 	                          autoComplete="off"
> 	                          />
> ====================================
> did not work as expected. It did NOT use the "style". By applying the following patch it will work.
> ====================================
> InputSuggestAjaxRenderer.java:
> ...
>         }
>         out.startElement(HTML.DIV_ELEM, component);
>         out.writeAttribute(HTML.ID_ATTR, clientId , null);
>         if(inputSuggestAjax.getStyle() != null) {
>             out.writeAttribute(HTML.STYLE_ATTR, inputSuggestAjax.getStyle(), null);
>         }
>         out.endElement(HTML.DIV_ELEM);
>         String inputSuggestComponentVar = DojoUtils.calculateWidgetVarName(clientId);
> ...
> ====================================
> Or do I just not know how the InputSuggestAjax should be used and was this possible all along? (I know how to use a containing DIV to simulate part of this but that makes HTML dirty)

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