You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Mamallan Uthaman (JIRA)" <de...@myfaces.apache.org> on 2010/08/13 02:40:16 UTC

[jira] Created: (MYFACES-2876) Ajax Support in Mobile Browsers

Ajax Support in Mobile Browsers
-------------------------------

                 Key: MYFACES-2876
                 URL: https://issues.apache.org/jira/browse/MYFACES-2876
             Project: MyFaces Core
          Issue Type: Bug
          Components: General
    Affects Versions: 2.0.0-beta
         Environment: Windows Mobile 6.1
            Reporter: Mamallan Uthaman


In Windows Mobile (WM) 6.1 platform, <f:ajax> is converted into a full-page submit instead of a PPR. The reason is unlike Webkit based mobile-browsers, WM 6.1 or Blackberry (BB) 4.6 offers only a limited JavaScript-DOM support, so we need to optimize MyFaces's Ajax mechanism to work around the limitations of mobile browsers. I used the sample code below for testing, and interestingly, <f:ajax> does seem to work in BB 4.6.

Facelets code:
<h:commandButton value="PPR">
  <f:ajax event="action" render="second"/>
</h:commandButton>
<h:outputText value="#{item.date.seconds}" id="second"/>

Item.Java:
import java.util.Date;

public class Item {
  Date date;

  public void setDate(Date date) {
    this.date = date;
  }

  public Date getDate() {
    return new Date();
  }
}

faces-config:
<managed-bean>
  <managed-bean-name>item</managed-bean-name>
  <managed-bean-class>Item</managed-bean-class>
  <managed-bean-scope>request</managed-bean-scope>
</managed-bean>

Also, BB 4.6 crashed when I tested <f:ajax> with Trinidad components. I suspect the reason is, though <f:ajax> does work with MyFaces components, MyFaces's Ajax mechanism is probably not robust enough to handle Trinidad components in BB 4.6. To be specific,I believe the crashed happened while executing jsf.ajax.response.


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


[jira] Issue Comment Edited: (MYFACES-2876) Ajax Support in Mobile Browsers

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

Werner Punz edited comment on MYFACES-2876 at 8/16/10 1:40 PM:
---------------------------------------------------------------

Next issue, following construct makes the winmobile browser fail

onclick="javax.faces.request(this, event, ....)"

the issue here is that ie does not pass an event object but instead relies in window event, to make the code work the follwing code has to be passe ddown
onclick="javax.faces.request(this, ('undefined' == typeof event)? window.event: event, ....)"

We probably have to fix that on the f:ajax level in the long run for now it is not that important.

ok calls into dom fuzzyFormDetection fail, not sure why, the method is not there, other classes which use the singletonExtend construct have all methods intact, has to be further investigated



      was (Author: werpu):
    Next issue, following construct makes the winmobile browser fail

onclick="javax.faces.request(this, event, ....)"

the issue here is that ie does not pass an event object but instead relies in window event, to make the code work the follwing code has to be passe ddown
onclick="javax.faces.request(this, ('undefined' == typeof event)? window.event: event, ....)"

We probably have to fix that on the f:ajax level in the long run for now it is not that important.


  
> Ajax Support in Mobile Browsers
> -------------------------------
>
>                 Key: MYFACES-2876
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2876
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: General
>    Affects Versions: 2.0.0-beta
>         Environment: Windows Mobile 6.1, Blackberry 4.7
>            Reporter: Mamallan Uthaman
>
> In Windows Mobile (WM) 6.1 platform, <f:ajax> is converted into a full-page submit instead of a PPR. The reason is unlike Webkit based mobile-browsers, WM 6.1 or Blackberry (BB) 4.7 offers only a limited JavaScript-DOM support, so we need to optimize MyFaces's Ajax mechanism to work around the limitations of mobile browsers. I used the sample code below for testing.
> Facelets code:
> <h:commandButton value="PPR">
>   <f:ajax event="action" render="second"/>
> </h:commandButton>
> <h:outputText value="#{item.date.seconds}" id="second"/>
> Item.Java:
> import java.util.Date;
> public class Item {
>   Date date;
>   public void setDate(Date date) {
>     this.date = date;
>   }
>   public Date getDate() {
>     return new Date();
>   }
> }
> faces-config:
> <managed-bean>
>   <managed-bean-name>item</managed-bean-name>
>   <managed-bean-class>Item</managed-bean-class>
>   <managed-bean-scope>request</managed-bean-scope>
> </managed-bean>
> Also, in the case of  BB 4.7 , <f:ajax> can successfully send a PPR, but PPR response is ignored. 

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


[jira] Commented: (MYFACES-2876) Ajax Support in Mobile Browsers

Posted by "Mamallan Uthaman (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-2876?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12898422#action_12898422 ] 

Mamallan Uthaman commented on MYFACES-2876:
-------------------------------------------

I'm sure Windows Mobile will need more tweaks than Blackberry. Also, I guess Windows Mobile 6.1 emulator can be installed without MSDN account.

> Ajax Support in Mobile Browsers
> -------------------------------
>
>                 Key: MYFACES-2876
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2876
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: General
>    Affects Versions: 2.0.0-beta
>         Environment: Windows Mobile 6.1, Blackberry 4.7
>            Reporter: Mamallan Uthaman
>
> In Windows Mobile (WM) 6.1 platform, <f:ajax> is converted into a full-page submit instead of a PPR. The reason is unlike Webkit based mobile-browsers, WM 6.1 or Blackberry (BB) 4.7 offers only a limited JavaScript-DOM support, so we need to optimize MyFaces's Ajax mechanism to work around the limitations of mobile browsers. I used the sample code below for testing.
> Facelets code:
> <h:commandButton value="PPR">
>   <f:ajax event="action" render="second"/>
> </h:commandButton>
> <h:outputText value="#{item.date.seconds}" id="second"/>
> Item.Java:
> import java.util.Date;
> public class Item {
>   Date date;
>   public void setDate(Date date) {
>     this.date = date;
>   }
>   public Date getDate() {
>     return new Date();
>   }
> }
> faces-config:
> <managed-bean>
>   <managed-bean-name>item</managed-bean-name>
>   <managed-bean-class>Item</managed-bean-class>
>   <managed-bean-scope>request</managed-bean-scope>
> </managed-bean>
> Also, in the case of  BB 4.7 , <f:ajax> can successfully send a PPR, but PPR response is ignored. 

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


[jira] Issue Comment Edited: (MYFACES-2876) Ajax Support in Mobile Browsers

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

Werner Punz edited comment on MYFACES-2876 at 8/13/10 4:17 PM:
---------------------------------------------------------------

I will start to help on the Blackberry support next week since Blackberry has the tools available for free on the net (In fact it was on my agenda already for 2.0.2 but I had to postpone it to fix the node leaks in ie6), I cannot help for now with the WinMobile support until Microsoft has granted me access to MSDN again, which is still pending and has been since january.
But as I said if someone wants to do it I am willing to help here.

As for WinMobile, I assume it all comes down to a missing browser vendor detection on the response or dom handling side.
(mobile browsers have not been on my agenda until recently, I wanted to fortify the code for all desktop browsers first, where we are now more solid than Mojarra is)
The full page submit you get sounds like some severe error issued somewhere.



      was (Author: werpu):
    I will start to work on the Blackberry support next week since Blackberry has the tools available for free on the net (In fact it was on my agenda already for 2.0.2 but I had to postpone it to fix the node leaks in ie6), I cannot help for now with the WinMobile support until Microsoft has granted me access to MSDN again, which is still pending and has been since january.
But as I said if someone wants to do it I am willing to help here.

As for Blackberry, I assume it all comes down to a missing browser vendor detection on the response or dom handling side.
(mobile browsers have not been on my agenda until recently, I wanted to fortify the code for all desktop browsers first, where we are now more solid than Mojarra is)

but I have to investigate further into it next week for Blackberry, my goal is to get the support for the device into 2.0.2 if time permits. 
The good news regarding Blackberry btw. is that the 4.6 browser is end of the line, the new Blackberry OS already will have a webkit based browser, and there MyFaces already works, even on the mobile editions.


  
> Ajax Support in Mobile Browsers
> -------------------------------
>
>                 Key: MYFACES-2876
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2876
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: General
>    Affects Versions: 2.0.0-beta
>         Environment: Windows Mobile 6.1, Blackberry 4.7
>            Reporter: Mamallan Uthaman
>
> In Windows Mobile (WM) 6.1 platform, <f:ajax> is converted into a full-page submit instead of a PPR. The reason is unlike Webkit based mobile-browsers, WM 6.1 or Blackberry (BB) 4.7 offers only a limited JavaScript-DOM support, so we need to optimize MyFaces's Ajax mechanism to work around the limitations of mobile browsers. I used the sample code below for testing.
> Facelets code:
> <h:commandButton value="PPR">
>   <f:ajax event="action" render="second"/>
> </h:commandButton>
> <h:outputText value="#{item.date.seconds}" id="second"/>
> Item.Java:
> import java.util.Date;
> public class Item {
>   Date date;
>   public void setDate(Date date) {
>     this.date = date;
>   }
>   public Date getDate() {
>     return new Date();
>   }
> }
> faces-config:
> <managed-bean>
>   <managed-bean-name>item</managed-bean-name>
>   <managed-bean-class>Item</managed-bean-class>
>   <managed-bean-scope>request</managed-bean-scope>
> </managed-bean>
> Also, in the case of  BB 4.7 , <f:ajax> can successfully send a PPR, but PPR response is ignored. 

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


[jira] Commented: (MYFACES-2876) Ajax Support in Mobile Browsers

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

Werner Punz commented on MYFACES-2876:
--------------------------------------

Ok so far everything runs except the viewhead and viewroot replacement, the reason there is probably the xml processing which is slightly different or partially incomplete on old blackberries.
The biggest issue I ran into was globalEval, window.eval.call or eval.call was not possible on blackberries, so I had a scoping problem
even scoping a wrapper function and then doing eval did not work out, I had to revert to the document append method like it is documented on quirksmode and like jquery uses it.
But I tried to avoid the method so far because it does not run properly on newer browsers. Chrome simply does not eval, other browsers like ie8 simply change the eval order randomly.
But having it as fallback for blackberries where it works fine is ok I guess.


> Ajax Support in Mobile Browsers
> -------------------------------
>
>                 Key: MYFACES-2876
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2876
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: General, JSR-314
>    Affects Versions: 2.0.0-beta
>         Environment: Windows Mobile 6.1, Blackberry 4.7
>            Reporter: Mamallan Uthaman
>
> In Windows Mobile (WM) 6.1 platform, <f:ajax> is converted into a full-page submit instead of a PPR. The reason is unlike Webkit based mobile-browsers, WM 6.1 or Blackberry (BB) 4.7 offers only a limited JavaScript-DOM support, so we need to optimize MyFaces's Ajax mechanism to work around the limitations of mobile browsers. I used the sample code below for testing.
> Facelets code:
> <h:commandButton value="PPR">
>   <f:ajax event="action" render="second"/>
> </h:commandButton>
> <h:outputText value="#{item.date.seconds}" id="second"/>
> Item.Java:
> import java.util.Date;
> public class Item {
>   Date date;
>   public void setDate(Date date) {
>     this.date = date;
>   }
>   public Date getDate() {
>     return new Date();
>   }
> }
> faces-config:
> <managed-bean>
>   <managed-bean-name>item</managed-bean-name>
>   <managed-bean-class>Item</managed-bean-class>
>   <managed-bean-scope>request</managed-bean-scope>
> </managed-bean>
> Also, in the case of  BB 4.7 , <f:ajax> can successfully send a PPR, but PPR response is ignored. 

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


[jira] Commented: (MYFACES-2876) Ajax Support in Mobile Browsers

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

Werner Punz commented on MYFACES-2876:
--------------------------------------

I see my work on this issue now as being done with having things working decently, if someone wants to patch the f:ajax tag go ahead...


> Ajax Support in Mobile Browsers
> -------------------------------
>
>                 Key: MYFACES-2876
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2876
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: General, JSR-314
>    Affects Versions: 2.0.0-beta
>         Environment: Windows Mobile 6.1, Blackberry 4.7
>            Reporter: Mamallan Uthaman
>
> In Windows Mobile (WM) 6.1 platform, <f:ajax> is converted into a full-page submit instead of a PPR. The reason is unlike Webkit based mobile-browsers, WM 6.1 or Blackberry (BB) 4.7 offers only a limited JavaScript-DOM support, so we need to optimize MyFaces's Ajax mechanism to work around the limitations of mobile browsers. I used the sample code below for testing.
> Facelets code:
> <h:commandButton value="PPR">
>   <f:ajax event="action" render="second"/>
> </h:commandButton>
> <h:outputText value="#{item.date.seconds}" id="second"/>
> Item.Java:
> import java.util.Date;
> public class Item {
>   Date date;
>   public void setDate(Date date) {
>     this.date = date;
>   }
>   public Date getDate() {
>     return new Date();
>   }
> }
> faces-config:
> <managed-bean>
>   <managed-bean-name>item</managed-bean-name>
>   <managed-bean-class>Item</managed-bean-class>
>   <managed-bean-scope>request</managed-bean-scope>
> </managed-bean>
> Also, in the case of  BB 4.7 , <f:ajax> can successfully send a PPR, but PPR response is ignored. 

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


[jira] Commented: (MYFACES-2876) Ajax Support in Mobile Browsers

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

Werner Punz commented on MYFACES-2876:
--------------------------------------

Ok the codebase now works with following mobile browsers
a) Webkit mobile
b) IE Mobile 6.5+
c) Opera Mobile 10
d) Blackberry 4.7.1 and 5.0 (6 could not be tested but I assume it works due to having webkit mobile support)

Note while the javascripts work with Winmobile the ajax tag does not due to sending following request
jsf.ajax.request(this, event, ...)
this is a valid javascript but falsly throws an object error on ie mobile, the correclty issued command would be
jsf.ajax.request(this, ('undefined' != typeof event)? event: null, ...)

following also might work
jsf.ajax.request(this, window.event || event, ...)

I cannot fix that from my side and I am not sure if a fix on the java level will not break the tck, but I assume Trinidad is not affected by it anway by reusing the jsf.js javascripts on its own code.



> Ajax Support in Mobile Browsers
> -------------------------------
>
>                 Key: MYFACES-2876
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2876
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: General, JSR-314
>    Affects Versions: 2.0.0-beta
>         Environment: Windows Mobile 6.1, Blackberry 4.7
>            Reporter: Mamallan Uthaman
>
> In Windows Mobile (WM) 6.1 platform, <f:ajax> is converted into a full-page submit instead of a PPR. The reason is unlike Webkit based mobile-browsers, WM 6.1 or Blackberry (BB) 4.7 offers only a limited JavaScript-DOM support, so we need to optimize MyFaces's Ajax mechanism to work around the limitations of mobile browsers. I used the sample code below for testing.
> Facelets code:
> <h:commandButton value="PPR">
>   <f:ajax event="action" render="second"/>
> </h:commandButton>
> <h:outputText value="#{item.date.seconds}" id="second"/>
> Item.Java:
> import java.util.Date;
> public class Item {
>   Date date;
>   public void setDate(Date date) {
>     this.date = date;
>   }
>   public Date getDate() {
>     return new Date();
>   }
> }
> faces-config:
> <managed-bean>
>   <managed-bean-name>item</managed-bean-name>
>   <managed-bean-class>Item</managed-bean-class>
>   <managed-bean-scope>request</managed-bean-scope>
> </managed-bean>
> Also, in the case of  BB 4.7 , <f:ajax> can successfully send a PPR, but PPR response is ignored. 

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


[jira] Commented: (MYFACES-2876) Ajax Support in Mobile Browsers

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

Werner Punz commented on MYFACES-2876:
--------------------------------------

Hi I am willing to help here, but since Microsoft has left me hanging dry with the MSDN account in the air for the last half year I do not have access to the dev tools. Just drop me the patches and I am merge them in and I am willing to assist with the code as well.

Werner


> Ajax Support in Mobile Browsers
> -------------------------------
>
>                 Key: MYFACES-2876
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2876
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: General
>    Affects Versions: 2.0.0-beta
>         Environment: Windows Mobile 6.1, Blackberry 4.7
>            Reporter: Mamallan Uthaman
>
> In Windows Mobile (WM) 6.1 platform, <f:ajax> is converted into a full-page submit instead of a PPR. The reason is unlike Webkit based mobile-browsers, WM 6.1 or Blackberry (BB) 4.7 offers only a limited JavaScript-DOM support, so we need to optimize MyFaces's Ajax mechanism to work around the limitations of mobile browsers. I used the sample code below for testing.
> Facelets code:
> <h:commandButton value="PPR">
>   <f:ajax event="action" render="second"/>
> </h:commandButton>
> <h:outputText value="#{item.date.seconds}" id="second"/>
> Item.Java:
> import java.util.Date;
> public class Item {
>   Date date;
>   public void setDate(Date date) {
>     this.date = date;
>   }
>   public Date getDate() {
>     return new Date();
>   }
> }
> faces-config:
> <managed-bean>
>   <managed-bean-name>item</managed-bean-name>
>   <managed-bean-class>Item</managed-bean-class>
>   <managed-bean-scope>request</managed-bean-scope>
> </managed-bean>
> Also, in the case of  BB 4.7 , <f:ajax> can successfully send a PPR, but PPR response is ignored. 

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


[jira] Commented: (MYFACES-2876) Ajax Support in Mobile Browsers

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

Werner Punz commented on MYFACES-2876:
--------------------------------------

Ok I have finally managed to install the device emulator for WinMobile6 and I will put my findings here.
The good news is, the entire inheritance and delegation part runs out of the box.

The bad news is, IE Mobile does not allow innerHTML on detached dom nodes.
This is inheritly evil because I use this techniques to bypass some IE bugs in the first case dealing with swallowing script tags if innerHTML is applied.

Outside of that as it seems there is no setAttribute, while IE6 has provided it for some settings.

So what we have here is a classical chicken and egg situation we have a fix for IE which was just introduced because IE again had a bug in an area which breaks in another version of IE.

My personal guess is we have to deal with WinMobile 6 in a separate way than with IE6 standalone in this area.
(the entire outer HTML part is affacted in Dom.JS)

So the first step probably will be to alter the browser detection code to check if it is winmobile 6 or plai ie6

> Ajax Support in Mobile Browsers
> -------------------------------
>
>                 Key: MYFACES-2876
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2876
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: General
>    Affects Versions: 2.0.0-beta
>         Environment: Windows Mobile 6.1, Blackberry 4.7
>            Reporter: Mamallan Uthaman
>
> In Windows Mobile (WM) 6.1 platform, <f:ajax> is converted into a full-page submit instead of a PPR. The reason is unlike Webkit based mobile-browsers, WM 6.1 or Blackberry (BB) 4.7 offers only a limited JavaScript-DOM support, so we need to optimize MyFaces's Ajax mechanism to work around the limitations of mobile browsers. I used the sample code below for testing.
> Facelets code:
> <h:commandButton value="PPR">
>   <f:ajax event="action" render="second"/>
> </h:commandButton>
> <h:outputText value="#{item.date.seconds}" id="second"/>
> Item.Java:
> import java.util.Date;
> public class Item {
>   Date date;
>   public void setDate(Date date) {
>     this.date = date;
>   }
>   public Date getDate() {
>     return new Date();
>   }
> }
> faces-config:
> <managed-bean>
>   <managed-bean-name>item</managed-bean-name>
>   <managed-bean-class>Item</managed-bean-class>
>   <managed-bean-scope>request</managed-bean-scope>
> </managed-bean>
> Also, in the case of  BB 4.7 , <f:ajax> can successfully send a PPR, but PPR response is ignored. 

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


[jira] Commented: (MYFACES-2876) Ajax Support in Mobile Browsers

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

Werner Punz commented on MYFACES-2876:
--------------------------------------

Btw. regarding Blackberries, I only can go down to version 5 so far, I have not been able to get a version 4.7 emulator up and running so that it connects to the net and loads pages. No run no support from my side, sorry.


> Ajax Support in Mobile Browsers
> -------------------------------
>
>                 Key: MYFACES-2876
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2876
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: General, JSR-314
>    Affects Versions: 2.0.0-beta
>         Environment: Windows Mobile 6.1, Blackberry 4.7
>            Reporter: Mamallan Uthaman
>
> In Windows Mobile (WM) 6.1 platform, <f:ajax> is converted into a full-page submit instead of a PPR. The reason is unlike Webkit based mobile-browsers, WM 6.1 or Blackberry (BB) 4.7 offers only a limited JavaScript-DOM support, so we need to optimize MyFaces's Ajax mechanism to work around the limitations of mobile browsers. I used the sample code below for testing.
> Facelets code:
> <h:commandButton value="PPR">
>   <f:ajax event="action" render="second"/>
> </h:commandButton>
> <h:outputText value="#{item.date.seconds}" id="second"/>
> Item.Java:
> import java.util.Date;
> public class Item {
>   Date date;
>   public void setDate(Date date) {
>     this.date = date;
>   }
>   public Date getDate() {
>     return new Date();
>   }
> }
> faces-config:
> <managed-bean>
>   <managed-bean-name>item</managed-bean-name>
>   <managed-bean-class>Item</managed-bean-class>
>   <managed-bean-scope>request</managed-bean-scope>
> </managed-bean>
> Also, in the case of  BB 4.7 , <f:ajax> can successfully send a PPR, but PPR response is ignored. 

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


[jira] Commented: (MYFACES-2876) Ajax Support in Mobile Browsers

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

Werner Punz commented on MYFACES-2876:
--------------------------------------

Next issue, following construct makes the winmobile browser fail

onclick="javax.faces.request(this, event, ....)"

the issue here is that ie does not pass an event object but instead relies in window event, to make the code work the follwing code has to be passe ddown
onclick="javax.faces.request(this, ('undefined' == typeof event)? window.event: event, ....)"

We probably have to fix that on the f:ajax level in the long run for now it is not that important.



> Ajax Support in Mobile Browsers
> -------------------------------
>
>                 Key: MYFACES-2876
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2876
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: General
>    Affects Versions: 2.0.0-beta
>         Environment: Windows Mobile 6.1, Blackberry 4.7
>            Reporter: Mamallan Uthaman
>
> In Windows Mobile (WM) 6.1 platform, <f:ajax> is converted into a full-page submit instead of a PPR. The reason is unlike Webkit based mobile-browsers, WM 6.1 or Blackberry (BB) 4.7 offers only a limited JavaScript-DOM support, so we need to optimize MyFaces's Ajax mechanism to work around the limitations of mobile browsers. I used the sample code below for testing.
> Facelets code:
> <h:commandButton value="PPR">
>   <f:ajax event="action" render="second"/>
> </h:commandButton>
> <h:outputText value="#{item.date.seconds}" id="second"/>
> Item.Java:
> import java.util.Date;
> public class Item {
>   Date date;
>   public void setDate(Date date) {
>     this.date = date;
>   }
>   public Date getDate() {
>     return new Date();
>   }
> }
> faces-config:
> <managed-bean>
>   <managed-bean-name>item</managed-bean-name>
>   <managed-bean-class>Item</managed-bean-class>
>   <managed-bean-scope>request</managed-bean-scope>
> </managed-bean>
> Also, in the case of  BB 4.7 , <f:ajax> can successfully send a PPR, but PPR response is ignored. 

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


[jira] Issue Comment Edited: (MYFACES-2876) Ajax Support in Mobile Browsers

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

Werner Punz edited comment on MYFACES-2876 at 8/17/10 3:51 PM:
---------------------------------------------------------------

ok the reason why the removeChilds did not work simply was that the delete childNode caused an objectError on ieMobile, fixed that.

Now update, insertbefore work, insertAfter fails it pushes the new node at the bottom of the divs instead of pushing it after the updated element.

                    


      was (Author: werpu):
    ok the reason why the removeChilds did not work simply was that the delete childNode caused an objectError on ieMobile, fixed that.


                    

  
> Ajax Support in Mobile Browsers
> -------------------------------
>
>                 Key: MYFACES-2876
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2876
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: General
>    Affects Versions: 2.0.0-beta
>         Environment: Windows Mobile 6.1, Blackberry 4.7
>            Reporter: Mamallan Uthaman
>
> In Windows Mobile (WM) 6.1 platform, <f:ajax> is converted into a full-page submit instead of a PPR. The reason is unlike Webkit based mobile-browsers, WM 6.1 or Blackberry (BB) 4.7 offers only a limited JavaScript-DOM support, so we need to optimize MyFaces's Ajax mechanism to work around the limitations of mobile browsers. I used the sample code below for testing.
> Facelets code:
> <h:commandButton value="PPR">
>   <f:ajax event="action" render="second"/>
> </h:commandButton>
> <h:outputText value="#{item.date.seconds}" id="second"/>
> Item.Java:
> import java.util.Date;
> public class Item {
>   Date date;
>   public void setDate(Date date) {
>     this.date = date;
>   }
>   public Date getDate() {
>     return new Date();
>   }
> }
> faces-config:
> <managed-bean>
>   <managed-bean-name>item</managed-bean-name>
>   <managed-bean-class>Item</managed-bean-class>
>   <managed-bean-scope>request</managed-bean-scope>
> </managed-bean>
> Also, in the case of  BB 4.7 , <f:ajax> can successfully send a PPR, but PPR response is ignored. 

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


[jira] Commented: (MYFACES-2876) Ajax Support in Mobile Browsers

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

Werner Punz commented on MYFACES-2876:
--------------------------------------

Ok now to basic blackberry 5 support, it came down to changing the global eval slightly and pushing the
namespace resolution to the method ie uses, the basic protocol testcases except for the viewroot handling now work, but there are still borderline testcases which fail, those will be investigated separately.



> Ajax Support in Mobile Browsers
> -------------------------------
>
>                 Key: MYFACES-2876
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2876
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: General, JSR-314
>    Affects Versions: 2.0.0-beta
>         Environment: Windows Mobile 6.1, Blackberry 4.7
>            Reporter: Mamallan Uthaman
>
> In Windows Mobile (WM) 6.1 platform, <f:ajax> is converted into a full-page submit instead of a PPR. The reason is unlike Webkit based mobile-browsers, WM 6.1 or Blackberry (BB) 4.7 offers only a limited JavaScript-DOM support, so we need to optimize MyFaces's Ajax mechanism to work around the limitations of mobile browsers. I used the sample code below for testing.
> Facelets code:
> <h:commandButton value="PPR">
>   <f:ajax event="action" render="second"/>
> </h:commandButton>
> <h:outputText value="#{item.date.seconds}" id="second"/>
> Item.Java:
> import java.util.Date;
> public class Item {
>   Date date;
>   public void setDate(Date date) {
>     this.date = date;
>   }
>   public Date getDate() {
>     return new Date();
>   }
> }
> faces-config:
> <managed-bean>
>   <managed-bean-name>item</managed-bean-name>
>   <managed-bean-class>Item</managed-bean-class>
>   <managed-bean-scope>request</managed-bean-scope>
> </managed-bean>
> Also, in the case of  BB 4.7 , <f:ajax> can successfully send a PPR, but PPR response is ignored. 

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


[jira] Issue Comment Edited: (MYFACES-2876) Ajax Support in Mobile Browsers

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

Werner Punz edited comment on MYFACES-2876 at 8/16/10 10:46 AM:
----------------------------------------------------------------

Ok I have finally managed to install the device emulator for WinMobile6 and I will put my findings here.
The good news is, the entire inheritance and delegation part runs out of the box.

The bad news is, IE Mobile does not allow innerHTML on detached dom nodes.
This is inheritly evil because I use this techniques to bypass some IE bugs in the first case dealing with swallowing script tags if innerHTML is applied.

Outside of that as it seems there is no setAttribute, while IE6 has provided it for some settings.

So what we have here is a classical chicken and egg situation we have a fix for IE which was just introduced because IE again had a bug in an area which breaks in another version of IE.

My personal guess is we have to deal with WinMobile 6 in a separate way than with IE6 standalone in this area.
(the entire outer HTML part is affacted in Dom.JS)

So the first step probably will be to alter the browser detection code to check if it is winmobile 6 or plain ie6

--Done winmobile detection code added to Runtime.js also the ExtLang logger now works which should make things easier

      was (Author: werpu):
    Ok I have finally managed to install the device emulator for WinMobile6 and I will put my findings here.
The good news is, the entire inheritance and delegation part runs out of the box.

The bad news is, IE Mobile does not allow innerHTML on detached dom nodes.
This is inheritly evil because I use this techniques to bypass some IE bugs in the first case dealing with swallowing script tags if innerHTML is applied.

Outside of that as it seems there is no setAttribute, while IE6 has provided it for some settings.

So what we have here is a classical chicken and egg situation we have a fix for IE which was just introduced because IE again had a bug in an area which breaks in another version of IE.

My personal guess is we have to deal with WinMobile 6 in a separate way than with IE6 standalone in this area.
(the entire outer HTML part is affacted in Dom.JS)

So the first step probably will be to alter the browser detection code to check if it is winmobile 6 or plai ie6
  
> Ajax Support in Mobile Browsers
> -------------------------------
>
>                 Key: MYFACES-2876
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2876
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: General
>    Affects Versions: 2.0.0-beta
>         Environment: Windows Mobile 6.1, Blackberry 4.7
>            Reporter: Mamallan Uthaman
>
> In Windows Mobile (WM) 6.1 platform, <f:ajax> is converted into a full-page submit instead of a PPR. The reason is unlike Webkit based mobile-browsers, WM 6.1 or Blackberry (BB) 4.7 offers only a limited JavaScript-DOM support, so we need to optimize MyFaces's Ajax mechanism to work around the limitations of mobile browsers. I used the sample code below for testing.
> Facelets code:
> <h:commandButton value="PPR">
>   <f:ajax event="action" render="second"/>
> </h:commandButton>
> <h:outputText value="#{item.date.seconds}" id="second"/>
> Item.Java:
> import java.util.Date;
> public class Item {
>   Date date;
>   public void setDate(Date date) {
>     this.date = date;
>   }
>   public Date getDate() {
>     return new Date();
>   }
> }
> faces-config:
> <managed-bean>
>   <managed-bean-name>item</managed-bean-name>
>   <managed-bean-class>Item</managed-bean-class>
>   <managed-bean-scope>request</managed-bean-scope>
> </managed-bean>
> Also, in the case of  BB 4.7 , <f:ajax> can successfully send a PPR, but PPR response is ignored. 

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


[jira] Resolved: (MYFACES-2876) Ajax Support in Mobile Browsers

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

Werner Punz resolved MYFACES-2876.
----------------------------------

    Fix Version/s: 2.0.2-SNAPSHOT
       Resolution: Fixed

Done I am closing this now, the f:ajax fix is still under discussion, but for now I guess we wont need it, since the browser will be hardly used for ajax anyway and who really wants to support it has to do it manually.


> Ajax Support in Mobile Browsers
> -------------------------------
>
>                 Key: MYFACES-2876
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2876
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: General, JSR-314
>    Affects Versions: 2.0.0-beta
>         Environment: Windows Mobile 6.1, Blackberry 4.7
>            Reporter: Mamallan Uthaman
>             Fix For: 2.0.2-SNAPSHOT
>
>
> In Windows Mobile (WM) 6.1 platform, <f:ajax> is converted into a full-page submit instead of a PPR. The reason is unlike Webkit based mobile-browsers, WM 6.1 or Blackberry (BB) 4.7 offers only a limited JavaScript-DOM support, so we need to optimize MyFaces's Ajax mechanism to work around the limitations of mobile browsers. I used the sample code below for testing.
> Facelets code:
> <h:commandButton value="PPR">
>   <f:ajax event="action" render="second"/>
> </h:commandButton>
> <h:outputText value="#{item.date.seconds}" id="second"/>
> Item.Java:
> import java.util.Date;
> public class Item {
>   Date date;
>   public void setDate(Date date) {
>     this.date = date;
>   }
>   public Date getDate() {
>     return new Date();
>   }
> }
> faces-config:
> <managed-bean>
>   <managed-bean-name>item</managed-bean-name>
>   <managed-bean-class>Item</managed-bean-class>
>   <managed-bean-scope>request</managed-bean-scope>
> </managed-bean>
> Also, in the case of  BB 4.7 , <f:ajax> can successfully send a PPR, but PPR response is ignored. 

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


[jira] Issue Comment Edited: (MYFACES-2876) Ajax Support in Mobile Browsers

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

Werner Punz edited comment on MYFACES-2876 at 8/17/10 2:48 AM:
---------------------------------------------------------------

Next issue, following construct makes the winmobile browser fail

onclick="javax.faces.request(this, event, ....)"

the issue here is that ie does not pass an event object but instead relies in window event, to make the code work the follwing code has to be passe ddown
onclick="javax.faces.request(this, ('undefined' == typeof event)? window.event: event, ....)"

We probably have to fix that on the f:ajax level in the long run for now it is not that important.

ok calls into dom fuzzyFormDetection fail, not sure why, the method is not there, other classes which use the singletonExtend construct have all methods intact, has to be further investigated
Ok the issue was the onload handler in the dom constructor for the auto eval detection, seems like winMobile hates onload, since this is the only handler we have I can live with not having it for winmobile.

Seems like after the onload handler the ajax request is triggered properly, my eval testcase which is the simplest one not doing any heavy dom modifications now is running through.
I wont commit the code today anymore, maybe by the end of the week, I want to get this as far as possible first.

The ie dom garbage collection code as well fails on mobile ie, has yet to be investigated why. Nevetheless by cleaning out this part I was able to get an eval and update through, insert before and after still fails. 




      was (Author: werpu):
    Next issue, following construct makes the winmobile browser fail

onclick="javax.faces.request(this, event, ....)"

the issue here is that ie does not pass an event object but instead relies in window event, to make the code work the follwing code has to be passe ddown
onclick="javax.faces.request(this, ('undefined' == typeof event)? window.event: event, ....)"

We probably have to fix that on the f:ajax level in the long run for now it is not that important.

ok calls into dom fuzzyFormDetection fail, not sure why, the method is not there, other classes which use the singletonExtend construct have all methods intact, has to be further investigated
Ok the issue was the onload handler in the dom constructor for the auto eval detection, seems like winMobile hates onload, since this is the only handler we have I can live with not having it for winmobile.

Seems like after the onload handler the ajax request is triggered properly, my eval testcase which is the simplest one not doing any heavy dom modifications now is running through.
I wont commit the code today anymore, maybe by the end of the week, I want to get this as far as possible first.




  
> Ajax Support in Mobile Browsers
> -------------------------------
>
>                 Key: MYFACES-2876
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2876
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: General
>    Affects Versions: 2.0.0-beta
>         Environment: Windows Mobile 6.1, Blackberry 4.7
>            Reporter: Mamallan Uthaman
>
> In Windows Mobile (WM) 6.1 platform, <f:ajax> is converted into a full-page submit instead of a PPR. The reason is unlike Webkit based mobile-browsers, WM 6.1 or Blackberry (BB) 4.7 offers only a limited JavaScript-DOM support, so we need to optimize MyFaces's Ajax mechanism to work around the limitations of mobile browsers. I used the sample code below for testing.
> Facelets code:
> <h:commandButton value="PPR">
>   <f:ajax event="action" render="second"/>
> </h:commandButton>
> <h:outputText value="#{item.date.seconds}" id="second"/>
> Item.Java:
> import java.util.Date;
> public class Item {
>   Date date;
>   public void setDate(Date date) {
>     this.date = date;
>   }
>   public Date getDate() {
>     return new Date();
>   }
> }
> faces-config:
> <managed-bean>
>   <managed-bean-name>item</managed-bean-name>
>   <managed-bean-class>Item</managed-bean-class>
>   <managed-bean-scope>request</managed-bean-scope>
> </managed-bean>
> Also, in the case of  BB 4.7 , <f:ajax> can successfully send a PPR, but PPR response is ignored. 

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


[jira] Commented: (MYFACES-2876) Ajax Support in Mobile Browsers

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

Werner Punz commented on MYFACES-2876:
--------------------------------------

ok the reason why the removeChilds did not work simply was that the delete childNode caused an objectError on ieMobile, fixed that.


                    


> Ajax Support in Mobile Browsers
> -------------------------------
>
>                 Key: MYFACES-2876
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2876
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: General
>    Affects Versions: 2.0.0-beta
>         Environment: Windows Mobile 6.1, Blackberry 4.7
>            Reporter: Mamallan Uthaman
>
> In Windows Mobile (WM) 6.1 platform, <f:ajax> is converted into a full-page submit instead of a PPR. The reason is unlike Webkit based mobile-browsers, WM 6.1 or Blackberry (BB) 4.7 offers only a limited JavaScript-DOM support, so we need to optimize MyFaces's Ajax mechanism to work around the limitations of mobile browsers. I used the sample code below for testing.
> Facelets code:
> <h:commandButton value="PPR">
>   <f:ajax event="action" render="second"/>
> </h:commandButton>
> <h:outputText value="#{item.date.seconds}" id="second"/>
> Item.Java:
> import java.util.Date;
> public class Item {
>   Date date;
>   public void setDate(Date date) {
>     this.date = date;
>   }
>   public Date getDate() {
>     return new Date();
>   }
> }
> faces-config:
> <managed-bean>
>   <managed-bean-name>item</managed-bean-name>
>   <managed-bean-class>Item</managed-bean-class>
>   <managed-bean-scope>request</managed-bean-scope>
> </managed-bean>
> Also, in the case of  BB 4.7 , <f:ajax> can successfully send a PPR, but PPR response is ignored. 

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


[jira] Issue Comment Edited: (MYFACES-2876) Ajax Support in Mobile Browsers

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

Werner Punz edited comment on MYFACES-2876 at 8/16/10 1:57 PM:
---------------------------------------------------------------

Next issue, following construct makes the winmobile browser fail

onclick="javax.faces.request(this, event, ....)"

the issue here is that ie does not pass an event object but instead relies in window event, to make the code work the follwing code has to be passe ddown
onclick="javax.faces.request(this, ('undefined' == typeof event)? window.event: event, ....)"

We probably have to fix that on the f:ajax level in the long run for now it is not that important.

ok calls into dom fuzzyFormDetection fail, not sure why, the method is not there, other classes which use the singletonExtend construct have all methods intact, has to be further investigated
Ok the issue was the onload handler in the dom constructor for the auto eval detection, seems like winMobile hates onload, since this is the only handler we have I can live with not having it for winmobile.




      was (Author: werpu):
    Next issue, following construct makes the winmobile browser fail

onclick="javax.faces.request(this, event, ....)"

the issue here is that ie does not pass an event object but instead relies in window event, to make the code work the follwing code has to be passe ddown
onclick="javax.faces.request(this, ('undefined' == typeof event)? window.event: event, ....)"

We probably have to fix that on the f:ajax level in the long run for now it is not that important.

ok calls into dom fuzzyFormDetection fail, not sure why, the method is not there, other classes which use the singletonExtend construct have all methods intact, has to be further investigated


  
> Ajax Support in Mobile Browsers
> -------------------------------
>
>                 Key: MYFACES-2876
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2876
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: General
>    Affects Versions: 2.0.0-beta
>         Environment: Windows Mobile 6.1, Blackberry 4.7
>            Reporter: Mamallan Uthaman
>
> In Windows Mobile (WM) 6.1 platform, <f:ajax> is converted into a full-page submit instead of a PPR. The reason is unlike Webkit based mobile-browsers, WM 6.1 or Blackberry (BB) 4.7 offers only a limited JavaScript-DOM support, so we need to optimize MyFaces's Ajax mechanism to work around the limitations of mobile browsers. I used the sample code below for testing.
> Facelets code:
> <h:commandButton value="PPR">
>   <f:ajax event="action" render="second"/>
> </h:commandButton>
> <h:outputText value="#{item.date.seconds}" id="second"/>
> Item.Java:
> import java.util.Date;
> public class Item {
>   Date date;
>   public void setDate(Date date) {
>     this.date = date;
>   }
>   public Date getDate() {
>     return new Date();
>   }
> }
> faces-config:
> <managed-bean>
>   <managed-bean-name>item</managed-bean-name>
>   <managed-bean-class>Item</managed-bean-class>
>   <managed-bean-scope>request</managed-bean-scope>
> </managed-bean>
> Also, in the case of  BB 4.7 , <f:ajax> can successfully send a PPR, but PPR response is ignored. 

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


[jira] Issue Comment Edited: (MYFACES-2876) Ajax Support in Mobile Browsers

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

Werner Punz edited comment on MYFACES-2876 at 9/10/10 2:41 AM:
---------------------------------------------------------------

Ok now to basic blackberry 5 support, it came down to changing the global eval slightly and pushing the
namespace resolution to the method ie uses, the basic protocol testcases except for the viewroot handling now work, but there are still borderline testcases which fail, those will be investigated separately.

Also the globalEval must be done via the document appendix method jquery uses and quirksmode.org proposes, however this method should only be applied as last resort if everything else fails (window.eval.call(null respectively window.eval.call(window.. ) because it simply is a hack and breaks on newer browsers like chrome.
In case of blackberry we have to use it unfortunately.

      was (Author: werpu):
    Ok now to basic blackberry 5 support, it came down to changing the global eval slightly and pushing the
namespace resolution to the method ie uses, the basic protocol testcases except for the viewroot handling now work, but there are still borderline testcases which fail, those will be investigated separately.


  
> Ajax Support in Mobile Browsers
> -------------------------------
>
>                 Key: MYFACES-2876
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2876
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: General, JSR-314
>    Affects Versions: 2.0.0-beta
>         Environment: Windows Mobile 6.1, Blackberry 4.7
>            Reporter: Mamallan Uthaman
>             Fix For: 2.0.2-SNAPSHOT
>
>
> In Windows Mobile (WM) 6.1 platform, <f:ajax> is converted into a full-page submit instead of a PPR. The reason is unlike Webkit based mobile-browsers, WM 6.1 or Blackberry (BB) 4.7 offers only a limited JavaScript-DOM support, so we need to optimize MyFaces's Ajax mechanism to work around the limitations of mobile browsers. I used the sample code below for testing.
> Facelets code:
> <h:commandButton value="PPR">
>   <f:ajax event="action" render="second"/>
> </h:commandButton>
> <h:outputText value="#{item.date.seconds}" id="second"/>
> Item.Java:
> import java.util.Date;
> public class Item {
>   Date date;
>   public void setDate(Date date) {
>     this.date = date;
>   }
>   public Date getDate() {
>     return new Date();
>   }
> }
> faces-config:
> <managed-bean>
>   <managed-bean-name>item</managed-bean-name>
>   <managed-bean-class>Item</managed-bean-class>
>   <managed-bean-scope>request</managed-bean-scope>
> </managed-bean>
> Also, in the case of  BB 4.7 , <f:ajax> can successfully send a PPR, but PPR response is ignored. 

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


[jira] Commented: (MYFACES-2876) Ajax Support in Mobile Browsers

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

Werner Punz commented on MYFACES-2876:
--------------------------------------

I will start to work on the Blackberry support next week since Blackberry has the tools available for free on the net (In fact it was on my agenda already for 2.0.2 but I had to postpone it to fix the node leaks in ie6), I cannot help for now with the WinMobile support until Microsoft has granted me access to MSDN again, which is still pending and has been since january.
But as I said if someone wants to do it I am willing to help here.

As for Blackberry, I assume it all comes down to a missing browser vendor detection on the response or dom handling side.
(mobile browsers have not been on my agenda until recently, I wanted to fortify the code for all desktop browsers first, where we are now more solid than Mojarra is)

but I have to investigate further into it next week for Blackberry, my goal is to get the support for the device into 2.0.2 if time permits. 
The good news regarding Blackberry btw. is that the 4.6 browser is end of the line, the new Blackberry OS already will have a webkit based browser, and there MyFaces already works, even on the mobile editions.



> Ajax Support in Mobile Browsers
> -------------------------------
>
>                 Key: MYFACES-2876
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2876
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: General
>    Affects Versions: 2.0.0-beta
>         Environment: Windows Mobile 6.1, Blackberry 4.7
>            Reporter: Mamallan Uthaman
>
> In Windows Mobile (WM) 6.1 platform, <f:ajax> is converted into a full-page submit instead of a PPR. The reason is unlike Webkit based mobile-browsers, WM 6.1 or Blackberry (BB) 4.7 offers only a limited JavaScript-DOM support, so we need to optimize MyFaces's Ajax mechanism to work around the limitations of mobile browsers. I used the sample code below for testing.
> Facelets code:
> <h:commandButton value="PPR">
>   <f:ajax event="action" render="second"/>
> </h:commandButton>
> <h:outputText value="#{item.date.seconds}" id="second"/>
> Item.Java:
> import java.util.Date;
> public class Item {
>   Date date;
>   public void setDate(Date date) {
>     this.date = date;
>   }
>   public Date getDate() {
>     return new Date();
>   }
> }
> faces-config:
> <managed-bean>
>   <managed-bean-name>item</managed-bean-name>
>   <managed-bean-class>Item</managed-bean-class>
>   <managed-bean-scope>request</managed-bean-scope>
> </managed-bean>
> Also, in the case of  BB 4.7 , <f:ajax> can successfully send a PPR, but PPR response is ignored. 

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


[jira] Issue Comment Edited: (MYFACES-2876) Ajax Support in Mobile Browsers

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

Werner Punz edited comment on MYFACES-2876 at 9/10/10 2:43 AM:
---------------------------------------------------------------

Ok so far everything runs except the viewhead and viewroot replacement, the reason there is probably the xml processing which is slightly different or partially incomplete on old blackberries.
The biggest issue I ran into was globalEval, window.eval.call or eval.call was not possible on blackberries, so I had a scoping problem

(Appendix: It turned out the xml processing while working choked on more complex documents, I added a html based method which is slightly slower but worked for head and body replacement
by using shadow nodes which were not appended and innerHTML)

even scoping a wrapper function and then doing eval did not work out, I had to revert to the document append method like it is documented on quirksmode and like jquery uses it.
(Appendix see comment above where I added it as well, this is vital because literally any other global eval method fails)

But I tried to avoid the method so far because it does not run properly on newer browsers. Chrome simply does not eval, other browsers like ie8 simply change the eval order randomly.
But having it as fallback for blackberries where it works fine is ok I guess.


      was (Author: werpu):
    Ok so far everything runs except the viewhead and viewroot replacement, the reason there is probably the xml processing which is slightly different or partially incomplete on old blackberries.
The biggest issue I ran into was globalEval, window.eval.call or eval.call was not possible on blackberries, so I had a scoping problem
even scoping a wrapper function and then doing eval did not work out, I had to revert to the document append method like it is documented on quirksmode and like jquery uses it.
But I tried to avoid the method so far because it does not run properly on newer browsers. Chrome simply does not eval, other browsers like ie8 simply change the eval order randomly.
But having it as fallback for blackberries where it works fine is ok I guess.

  
> Ajax Support in Mobile Browsers
> -------------------------------
>
>                 Key: MYFACES-2876
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2876
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: General, JSR-314
>    Affects Versions: 2.0.0-beta
>         Environment: Windows Mobile 6.1, Blackberry 4.7
>            Reporter: Mamallan Uthaman
>             Fix For: 2.0.2-SNAPSHOT
>
>
> In Windows Mobile (WM) 6.1 platform, <f:ajax> is converted into a full-page submit instead of a PPR. The reason is unlike Webkit based mobile-browsers, WM 6.1 or Blackberry (BB) 4.7 offers only a limited JavaScript-DOM support, so we need to optimize MyFaces's Ajax mechanism to work around the limitations of mobile browsers. I used the sample code below for testing.
> Facelets code:
> <h:commandButton value="PPR">
>   <f:ajax event="action" render="second"/>
> </h:commandButton>
> <h:outputText value="#{item.date.seconds}" id="second"/>
> Item.Java:
> import java.util.Date;
> public class Item {
>   Date date;
>   public void setDate(Date date) {
>     this.date = date;
>   }
>   public Date getDate() {
>     return new Date();
>   }
> }
> faces-config:
> <managed-bean>
>   <managed-bean-name>item</managed-bean-name>
>   <managed-bean-class>Item</managed-bean-class>
>   <managed-bean-scope>request</managed-bean-scope>
> </managed-bean>
> Also, in the case of  BB 4.7 , <f:ajax> can successfully send a PPR, but PPR response is ignored. 

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


[jira] Issue Comment Edited: (MYFACES-2876) Ajax Support in Mobile Browsers

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

Werner Punz edited comment on MYFACES-2876 at 8/17/10 4:07 PM:
---------------------------------------------------------------

ok the reason why the removeChilds did not work simply was that the delete childNode caused an objectError on ieMobile, fixed that.

Now update, insertbefore work, insertAfter fails it pushes the new node at the bottom of the divs instead of pushing it after the updated element.

                    
node.hasChildNodes() does not work, we have to do it the hard way via undefined check and length check

The reason for insertafter positioning the elements wrongly is following code
 nodeHolder = document.createElement("div");
            parentNode = afterNode.parentNode;
            parentNode.insertBefore(nodeHolder, afterNode.nextSibling);

the problem here is that IEMobile interpretes the nextSibling wrong and delivers a totally wrong position, the insertBefore then causes internally an appendChild.
Now this is not fixable on my part, but since the insertAfter is not really used we can live with it. IE Mobile 7 will fix this I assume, since it is based on a blend of IE7 and 8.


      was (Author: werpu):
    ok the reason why the removeChilds did not work simply was that the delete childNode caused an objectError on ieMobile, fixed that.

Now update, insertbefore work, insertAfter fails it pushes the new node at the bottom of the divs instead of pushing it after the updated element.

                    

  
> Ajax Support in Mobile Browsers
> -------------------------------
>
>                 Key: MYFACES-2876
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2876
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: General
>    Affects Versions: 2.0.0-beta
>         Environment: Windows Mobile 6.1, Blackberry 4.7
>            Reporter: Mamallan Uthaman
>
> In Windows Mobile (WM) 6.1 platform, <f:ajax> is converted into a full-page submit instead of a PPR. The reason is unlike Webkit based mobile-browsers, WM 6.1 or Blackberry (BB) 4.7 offers only a limited JavaScript-DOM support, so we need to optimize MyFaces's Ajax mechanism to work around the limitations of mobile browsers. I used the sample code below for testing.
> Facelets code:
> <h:commandButton value="PPR">
>   <f:ajax event="action" render="second"/>
> </h:commandButton>
> <h:outputText value="#{item.date.seconds}" id="second"/>
> Item.Java:
> import java.util.Date;
> public class Item {
>   Date date;
>   public void setDate(Date date) {
>     this.date = date;
>   }
>   public Date getDate() {
>     return new Date();
>   }
> }
> faces-config:
> <managed-bean>
>   <managed-bean-name>item</managed-bean-name>
>   <managed-bean-class>Item</managed-bean-class>
>   <managed-bean-scope>request</managed-bean-scope>
> </managed-bean>
> Also, in the case of  BB 4.7 , <f:ajax> can successfully send a PPR, but PPR response is ignored. 

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


[jira] Commented: (MYFACES-2876) Ajax Support in Mobile Browsers

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

Werner Punz commented on MYFACES-2876:
--------------------------------------

I finally got the 4.7.1 emulator running, using winxp and installing the (on win7 non working) mds server did the trick.
The code works, So I can close the chapter blackberry for now.


> Ajax Support in Mobile Browsers
> -------------------------------
>
>                 Key: MYFACES-2876
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2876
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: General, JSR-314
>    Affects Versions: 2.0.0-beta
>         Environment: Windows Mobile 6.1, Blackberry 4.7
>            Reporter: Mamallan Uthaman
>
> In Windows Mobile (WM) 6.1 platform, <f:ajax> is converted into a full-page submit instead of a PPR. The reason is unlike Webkit based mobile-browsers, WM 6.1 or Blackberry (BB) 4.7 offers only a limited JavaScript-DOM support, so we need to optimize MyFaces's Ajax mechanism to work around the limitations of mobile browsers. I used the sample code below for testing.
> Facelets code:
> <h:commandButton value="PPR">
>   <f:ajax event="action" render="second"/>
> </h:commandButton>
> <h:outputText value="#{item.date.seconds}" id="second"/>
> Item.Java:
> import java.util.Date;
> public class Item {
>   Date date;
>   public void setDate(Date date) {
>     this.date = date;
>   }
>   public Date getDate() {
>     return new Date();
>   }
> }
> faces-config:
> <managed-bean>
>   <managed-bean-name>item</managed-bean-name>
>   <managed-bean-class>Item</managed-bean-class>
>   <managed-bean-scope>request</managed-bean-scope>
> </managed-bean>
> Also, in the case of  BB 4.7 , <f:ajax> can successfully send a PPR, but PPR response is ignored. 

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


[jira] Issue Comment Edited: (MYFACES-2876) Ajax Support in Mobile Browsers

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

Werner Punz edited comment on MYFACES-2876 at 8/16/10 3:09 PM:
---------------------------------------------------------------

Next issue, following construct makes the winmobile browser fail

onclick="javax.faces.request(this, event, ....)"

the issue here is that ie does not pass an event object but instead relies in window event, to make the code work the follwing code has to be passe ddown
onclick="javax.faces.request(this, ('undefined' == typeof event)? window.event: event, ....)"

We probably have to fix that on the f:ajax level in the long run for now it is not that important.

ok calls into dom fuzzyFormDetection fail, not sure why, the method is not there, other classes which use the singletonExtend construct have all methods intact, has to be further investigated
Ok the issue was the onload handler in the dom constructor for the auto eval detection, seems like winMobile hates onload, since this is the only handler we have I can live with not having it for winmobile.

Seems like after the onload handler the ajax request is triggered properly, my eval testcase which is the simplest one not doing any heavy dom modifications now is running through.
I wont commit the code today anymore, maybe by the end of the week, I want to get this as far as possible first.





      was (Author: werpu):
    Next issue, following construct makes the winmobile browser fail

onclick="javax.faces.request(this, event, ....)"

the issue here is that ie does not pass an event object but instead relies in window event, to make the code work the follwing code has to be passe ddown
onclick="javax.faces.request(this, ('undefined' == typeof event)? window.event: event, ....)"

We probably have to fix that on the f:ajax level in the long run for now it is not that important.

ok calls into dom fuzzyFormDetection fail, not sure why, the method is not there, other classes which use the singletonExtend construct have all methods intact, has to be further investigated
Ok the issue was the onload handler in the dom constructor for the auto eval detection, seems like winMobile hates onload, since this is the only handler we have I can live with not having it for winmobile.



  
> Ajax Support in Mobile Browsers
> -------------------------------
>
>                 Key: MYFACES-2876
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2876
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: General
>    Affects Versions: 2.0.0-beta
>         Environment: Windows Mobile 6.1, Blackberry 4.7
>            Reporter: Mamallan Uthaman
>
> In Windows Mobile (WM) 6.1 platform, <f:ajax> is converted into a full-page submit instead of a PPR. The reason is unlike Webkit based mobile-browsers, WM 6.1 or Blackberry (BB) 4.7 offers only a limited JavaScript-DOM support, so we need to optimize MyFaces's Ajax mechanism to work around the limitations of mobile browsers. I used the sample code below for testing.
> Facelets code:
> <h:commandButton value="PPR">
>   <f:ajax event="action" render="second"/>
> </h:commandButton>
> <h:outputText value="#{item.date.seconds}" id="second"/>
> Item.Java:
> import java.util.Date;
> public class Item {
>   Date date;
>   public void setDate(Date date) {
>     this.date = date;
>   }
>   public Date getDate() {
>     return new Date();
>   }
> }
> faces-config:
> <managed-bean>
>   <managed-bean-name>item</managed-bean-name>
>   <managed-bean-class>Item</managed-bean-class>
>   <managed-bean-scope>request</managed-bean-scope>
> </managed-bean>
> Also, in the case of  BB 4.7 , <f:ajax> can successfully send a PPR, but PPR response is ignored. 

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