[
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.