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

[jira] Created: (TRINIDAD-85) "icon" attribute on commandButton does not work

"icon" attribute on commandButton does not work
-----------------------------------------------

                 Key: TRINIDAD-85
                 URL: https://issues.apache.org/jira/browse/TRINIDAD-85
             Project: MyFaces Trinidad
          Issue Type: Bug
         Environment: PDA
            Reporter: Piyush Hari


commandButton can be rendered as an icon using  "icon" attribute for PDA browsers : PIE, IE Mobile and BlackBerry. For ex : 

<tr:commandButton icon="http://www.google.com/intl/en_ALL/images/logo.gif"   
action="guide.breadCrumbs"/> 
 
It produces the following HTML Mark-up : 
 
<input type="image" 
onclick="submitForm('_idJsp1',1,{source:'_idJsp6'});return false;" 
class="x6l" src="http://www.google.com/intl/en_ALL/images/logo.gif"> 
 
The button renders as a link and when a user clicks on it, it is expected to call the ACTION function. The bug is that the same page (commandButton.jspx) renders in case of supported Mobile Browsers instead of rendering the ACTION page.

Issue 
------- 
 
IE Mobile, PIE or BB do NOT support onclick event handler in an input of type 
"image". The online help on MS is conflicting though and it says that onclick 
is indeed supported for devices running PocketPC 2002 and Smartphone 2002 
software or later. 

http://msdn2.microsoft.com/en-us/library/bb159852.aspx 
 
As a result, though the input type image submits to the form according to the 
"action" attribute of the form it does not call onclick. Thus, the same page 
is displayed. 

Solution
-----------
render the following HTML for PDAs:
 <A href="#" onclick="<onclick>"  >
<img src="Buttons/LOCATE.gif">
</A> 

if the "disabled" attribute is set, render it as just a static image :
<img src="Buttons/LOCATE.gif">

 



 


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


[jira] Updated: (TRINIDAD-85) "icon" attribute on commandButton does not work

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

Adam Winer updated TRINIDAD-85:
-------------------------------

       Resolution: Fixed
    Fix Version/s: 1.0.2-core
         Assignee: Adam Winer
           Status: Resolved  (was: Patch Available)

Fixed, thanks for the patch.   (I needed to fix the logic for disabled buttons, which in the patch started an "img" and ended an "a".)

> "icon" attribute on commandButton does not work
> -----------------------------------------------
>
>                 Key: TRINIDAD-85
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-85
>             Project: MyFaces Trinidad
>          Issue Type: Bug
>         Environment: PDA
>            Reporter: Piyush Hari
>            Assignee: Adam Winer
>             Fix For: 1.0.2-core
>
>         Attachments: patch_Aug03_07_16_01_commandButtonWithIconPDA.patch, patch_Jun29_07_18_02_commandButtonWithIconPDA.patch
>
>
> commandButton can be rendered as an icon using  "icon" attribute for PDA browsers : PIE, IE Mobile and BlackBerry. For ex : 
> <tr:commandButton icon="http://www.google.com/intl/en_ALL/images/logo.gif"   
> action="guide.breadCrumbs"/> 
>  
> It produces the following HTML Mark-up : 
>  
> <input type="image" 
> onclick="submitForm('_idJsp1',1,{source:'_idJsp6'});return false;" 
> class="x6l" src="http://www.google.com/intl/en_ALL/images/logo.gif"> 
>  
> The button renders as a link and when a user clicks on it, it is expected to call the ACTION function. The bug is that the same page (commandButton.jspx) renders in case of supported Mobile Browsers instead of rendering the ACTION page.
> Issue 
> ------- 
>  
> IE Mobile, PIE or BB do NOT support onclick event handler in an input of type 
> "image". The online help on MS is conflicting though and it says that onclick 
> is indeed supported for devices running PocketPC 2002 and Smartphone 2002 
> software or later. 
> http://msdn2.microsoft.com/en-us/library/bb159852.aspx 
>  
> As a result, though the input type image submits to the form according to the 
> "action" attribute of the form it does not call onclick. Thus, the same page 
> is displayed. 
> Solution
> -----------
> render the following HTML for PDAs:
>  <A href="#" onclick="<onclick>"  >
> <img src="Buttons/LOCATE.gif">
> </A> 
> if the "disabled" attribute is set, render it as just a static image :
> <img src="Buttons/LOCATE.gif">
>  
>  

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


[jira] Updated: (TRINIDAD-85) "icon" attribute on commandButton does not work

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

Piyush Hari updated TRINIDAD-85:
--------------------------------

    Status: Patch Available  (was: Open)

> "icon" attribute on commandButton does not work
> -----------------------------------------------
>
>                 Key: TRINIDAD-85
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-85
>             Project: MyFaces Trinidad
>          Issue Type: Bug
>         Environment: PDA
>            Reporter: Piyush Hari
>         Attachments: patch_Jun29_07_18_02_commandButtonWithIconPDA.patch
>
>
> commandButton can be rendered as an icon using  "icon" attribute for PDA browsers : PIE, IE Mobile and BlackBerry. For ex : 
> <tr:commandButton icon="http://www.google.com/intl/en_ALL/images/logo.gif"   
> action="guide.breadCrumbs"/> 
>  
> It produces the following HTML Mark-up : 
>  
> <input type="image" 
> onclick="submitForm('_idJsp1',1,{source:'_idJsp6'});return false;" 
> class="x6l" src="http://www.google.com/intl/en_ALL/images/logo.gif"> 
>  
> The button renders as a link and when a user clicks on it, it is expected to call the ACTION function. The bug is that the same page (commandButton.jspx) renders in case of supported Mobile Browsers instead of rendering the ACTION page.
> Issue 
> ------- 
>  
> IE Mobile, PIE or BB do NOT support onclick event handler in an input of type 
> "image". The online help on MS is conflicting though and it says that onclick 
> is indeed supported for devices running PocketPC 2002 and Smartphone 2002 
> software or later. 
> http://msdn2.microsoft.com/en-us/library/bb159852.aspx 
>  
> As a result, though the input type image submits to the form according to the 
> "action" attribute of the form it does not call onclick. Thus, the same page 
> is displayed. 
> Solution
> -----------
> render the following HTML for PDAs:
>  <A href="#" onclick="<onclick>"  >
> <img src="Buttons/LOCATE.gif">
> </A> 
> if the "disabled" attribute is set, render it as just a static image :
> <img src="Buttons/LOCATE.gif">
>  
>  

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


[jira] Commented: (TRINIDAD-85) "icon" attribute on commandButton does not work

Posted by "Adam Winer (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TRINIDAD-85?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12513018 ] 

Adam Winer commented on TRINIDAD-85:
------------------------------------

I'm not fond of the isPDA() check.  Please add an agent flag, defaulting
to true, and set it to false for the relevant platforms.  I also see a lot
of non-two-space whitespace here.

> "icon" attribute on commandButton does not work
> -----------------------------------------------
>
>                 Key: TRINIDAD-85
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-85
>             Project: MyFaces Trinidad
>          Issue Type: Bug
>         Environment: PDA
>            Reporter: Piyush Hari
>         Attachments: patch_Jun29_07_18_02_commandButtonWithIconPDA.patch
>
>
> commandButton can be rendered as an icon using  "icon" attribute for PDA browsers : PIE, IE Mobile and BlackBerry. For ex : 
> <tr:commandButton icon="http://www.google.com/intl/en_ALL/images/logo.gif"   
> action="guide.breadCrumbs"/> 
>  
> It produces the following HTML Mark-up : 
>  
> <input type="image" 
> onclick="submitForm('_idJsp1',1,{source:'_idJsp6'});return false;" 
> class="x6l" src="http://www.google.com/intl/en_ALL/images/logo.gif"> 
>  
> The button renders as a link and when a user clicks on it, it is expected to call the ACTION function. The bug is that the same page (commandButton.jspx) renders in case of supported Mobile Browsers instead of rendering the ACTION page.
> Issue 
> ------- 
>  
> IE Mobile, PIE or BB do NOT support onclick event handler in an input of type 
> "image". The online help on MS is conflicting though and it says that onclick 
> is indeed supported for devices running PocketPC 2002 and Smartphone 2002 
> software or later. 
> http://msdn2.microsoft.com/en-us/library/bb159852.aspx 
>  
> As a result, though the input type image submits to the form according to the 
> "action" attribute of the form it does not call onclick. Thus, the same page 
> is displayed. 
> Solution
> -----------
> render the following HTML for PDAs:
>  <A href="#" onclick="<onclick>"  >
> <img src="Buttons/LOCATE.gif">
> </A> 
> if the "disabled" attribute is set, render it as just a static image :
> <img src="Buttons/LOCATE.gif">
>  
>  

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