voyent
DateSpinner - Retains Focus - Pattern/Locale not working  XML
Forum Index -> ICEmobile General
Author Message
bcantu

Joined: 02/Nov/2009 00:00:00
Messages: 45
Offline


I have had considerable problems associated with the validation of input fields that require the singleSubmit="true" that seem to the affect several dateSpinner fields. I have the problem that I cannot use the singleSubmit="true" on the dateSpinners because after entering the date E.G 2014-12-01 the focus remains stuck in the dateSpinner field where I entered the Date and will not shift. I can see the date value is set in the bean and no error is raised. (note: a refresh of the page releases the field focus)

This seems to contradict the fact that I have set the locale to "en_AU" where the format of the date input should be dd/MM/yyyy. I also tried to set the pattern to dd/MM/yyyy which worked but I really need the format to be driven by the locale which I set in the session bean.

So to summarise:
1) When entering the date directly into the field (NOT USING THE DATE PICKER!) the valid date is entered yyyy-MM-dd the Focus remains in the field where the date is entered and will not change/budge. (E.G. when using the tab key or clicking in another input field on the page).
2) The Locale does not influence the pattern required to be entered in the date field.

Desktop Browser - Chrom

HTML:
Code:
 ...
 <mobi:fieldsetRow>
        <h:outputLabel for="SpinnerStartDate" value="#{msg.advertiseStartDateLabel}: "/>
        <mobi:dateSpinner id="SpinnerStartDate"
                                      useNative="false"
                                      value="#{promotionBean.startDate}"
                                      locale="#{promotionBean.locale}"
                                      singleSubmit="true">
       <mobi:ajax execute="@this" render="@this"/>
       </mobi:dateSpinner>
 </mobi:fieldsetRow>
 ...
 


[Thumb - Screen Shot 2015-01-25 at 11.51.45 am.png]
 Filename Screen Shot 2015-01-25 at 11.51.45 am.png [Disk] Download
 Description
 Filesize 31 Kbytes
 Downloaded:  1008 time(s)

philip.breau


Joined: 08/May/2006 00:00:00
Messages: 2989
Offline


Can you please capture the browser logging in the Chrome dev tools console and post that?

Thanks,
Philip

.
bcantu

Joined: 02/Nov/2009 00:00:00
Messages: 45
Offline


Hi Philip
My HTML has changed to:
Code:
 <mobi:fieldsetRow>
       <h:outputLabel for="SpinnerStartDate" value="#{msg.advertiseStartDateLabel}: "/>
      <mobi:dateSpinner id="SpinnerStartDate"
                                                                       disabled="#{empty promotionBean.released ? 'false' : 'true'}" 
                                                                       useNative="false"
                                                                       value="#{promotionBean.startDate}">
          <mobi:ajax execute="@this" render="@this"/>
          <f:convertDateTime locale="#{promotionBean.languageTag}" pattern="dd/MM/yyyy"/>
     </mobi:dateSpinner>
     <h:message for="SpinnerStartDate" style="width:30%;color:red;line-height:2em;" />
 </mobi:fieldsetRow>
 


To temporarily get around the locale issue and results in the following lgged messages. I will replace this html with the previously posted html and place the logged messages after the following.

The debugger log from chrome using the new html is:

[icepush.54fd3.async-connection] Blocking connection cannot be shared among multiple web-contexts.
Initiating blocking connection for "." web-context...
icepush.uncompressed.js.xhtml?ln=ice.push&v=3_3_0_130416:637 [icepush.54fd3.async-connection] connection monitoring started within window 54fd3
icepush.uncompressed.js.xhtml?ln=ice.push&v=3_3_0_130416:637 [icepush.54fd3] bridge loaded!
2index.xhtml:3 Consider using 'dppx' units, as in CSS 'dpi' means dots-per-CSS-inch, not dots-per-physical-inch, so does not correspond to the actual 'dpi' of a screen. In media query expression: screen and (min-resolution: 300dpi)
icepush.uncompressed.js.xhtml?ln=ice.push&v=3_3_0_130416:637 [icepush.54fd3.async-connection] initialize connection within window 54fd3
icepush.uncompressed.js.xhtml?ln=ice.push&v=3_3_0_130416:630 [icepush.54fd3.async-connection] closing previous connection...
icepush.uncompressed.js.xhtml?ln=ice.push&v=3_3_0_130416:630 [icepush.54fd3.async-connection] connect...
bridge.uncompressed.js.xhtml?ln=ice.core&v=3_3_0_130416:1315 [window] persisted focus for element "CreatePromotionForm:output:0:_t171"
bridge.uncompressed.js.xhtml?ln=ice.core&v=3_3_0_130416:1315 [window] full submit to http://localhost:8080/HaystackWorks/index.xhtml
javax.faces.execute: @all
javax.faces.render: @all
javax.faces.source: CreatePromotionForm
view ID: vcetnbb4
event type: click
icepush.uncompressed.js.xhtml?ln=ice.push&v=3_3_0_130416:630 [icepush.54fd3] received back-off
icepush.uncompressed.js.xhtml?ln=ice.push&v=3_3_0_130416:637 [icepush.54fd3.async-connection] initialize connection within window 54fd3
icepush.uncompressed.js.xhtml?ln=ice.push&v=3_3_0_130416:630 [icepush.54fd3.async-connection] closing previous connection...
icepush.uncompressed.js.xhtml?ln=ice.push&v=3_3_0_130416:630 [icepush.54fd3.async-connection] connect...
jsf.js.xhtml?ln=javax.faces&stage=Development&v=3_3_0_130416:343 Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check http://xhr.spec.whatwg.org/.
bridge.uncompressed.js.xhtml?ln=ice.core&v=3_3_0_130416:1315 [window] applied updates >>
update["j_idt66_pgPnl"]: <div class="mobi-pagePanel mobi-fixed-he....
update["javax.faces.ViewState"]: -5892919428994532650:3054517532235589441....
eval: ice.applyFocus('CreatePromotionForm:outp....
extension
bridge.uncompressed.js.xhtml?ln=ice.core&v=3_3_0_130416:1315 [window] persisted focus for element "promotionDetails:SpinnerStartDate_input"
bridge.uncompressed.js.xhtml?ln=ice.core&v=3_3_0_130416:1315 [window] full submit to http://localhost:8080/HaystackWorks/index.xhtml
javax.faces.execute: promotionDetails:SpinnerStartDate
javax.faces.render: promotionDetails:SpinnerStartDate
javax.faces.source: promotionDetails:SpinnerStartDate
view ID: vcetnbb4
event type: blur
bridge.uncompressed.js.xhtml?ln=ice.core&v=3_3_0_130416:1315 [window] persisted focus for element "promotionDetails:wasPrice"
icepush.uncompressed.js.xhtml?ln=ice.push&v=3_3_0_130416:630 [icepush.54fd3] received back-off
bridge.uncompressed.js.xhtml?ln=ice.core&v=3_3_0_130416:1315 [window] applied updates >>
update["promotionDetails:SpinnerStartDate_hidden"]: <input id="promotionDetails:SpinnerStart....
update["javax.faces.ViewState"]: -5892919428994532650:3054517532235589441....
eval: ice.applyFocus('promotionDetails:Spinner....
extension
bridge.uncompressed.js.xhtml?ln=ice.core&v=3_3_0_130416:1315 [window] persisted focus for element "promotionDetails:SpinnerStartDate_input"
bridge.uncompressed.js.xhtml?ln=ice.core&v=3_3_0_130416:1315 [window] persisted focus for element "promotionDetails:SpinnerStartDate_input"
bridge.uncompressed.js.xhtml?ln=ice.core&v=3_3_0_130416:1315 [window] focused element "promotionDetails:SpinnerStartDate_input"
icepush.uncompressed.js.xhtml?ln=ice.push&v=3_3_0_130416:637 [icepush.54fd3.async-connection] initialize connection within window 54fd3
icepush.uncompressed.js.xhtml?ln=ice.push&v=3_3_0_130416:630 [icepush.54fd3.async-connection] closing previous connection...
icepush.uncompressed.js.xhtml?ln=ice.push&v=3_3_0_130416:630 [icepush.54fd3.async-connection] connect...
icepush.uncompressed.js.xhtml?ln=ice.push&v=3_3_0_130416:630 [icepush] received noop
icepush.uncompressed.js.xhtml?ln=ice.push&v=3_3_0_130416:630 [icepush.54fd3.async-connection] closing previous connection...
icepush.uncompressed.js.xhtml?ln=ice.push&v=3_3_0_130416:630 [icepush.54fd3.async-connection] connect...
bridge.uncompressed.js.xhtml?ln=ice.core&v=3_3_0_130416:1315 [window] full submit to http://localhost:8080/HaystackWorks/index.xhtml
javax.faces.execute: promotionDetails:SpinnerStartDate
javax.faces.render: promotionDetails:SpinnerStartDate
javax.faces.source: promotionDetails:SpinnerStartDate
view ID: vcetnbb4
event type: blur
icepush.uncompressed.js.xhtml?ln=ice.push&v=3_3_0_130416:630 [icepush.54fd3] received back-off
bridge.uncompressed.js.xhtml?ln=ice.core&v=3_3_0_130416:1315 [window] applied updates >>
update["promotionDetails:SpinnerStartDate_hidden"]: <input id="promotionDetails:SpinnerStart....
update["javax.faces.ViewState"]: -5892919428994532650:3054517532235589441....
eval: ice.applyFocus('promotionDetails:Spinner....
extension
icepush.uncompressed.js.xhtml?ln=ice.push&v=3_3_0_130416:637 [icepush.54fd3.async-connection] initialize connection within window 54fd3
icepush.uncompressed.js.xhtml?ln=ice.push&v=3_3_0_130416:630 [icepush.54fd3.async-connection] closing previous connection...
icepush.uncompressed.js.xhtml?ln=ice.push&v=3_3_0_130416:630 [icepush.54fd3.async-connection] connect...
icepush.uncompressed.js.xhtml?ln=ice.push&v=3_3_0_130416:630 [icepush] received noop
icepush.uncompressed.js.xhtml?ln=ice.push&v=3_3_0_130416:630 [icepush.54fd3.async-connection] closing previous connection...
icepush.uncompressed.js.xhtml?ln=ice.push&v=3_3_0_130416:630 [icepush.54fd3.async-connection] connect...
icepush.uncompressed.js.xhtml?ln=ice.push&v=3_3_0_130416:630 [icepush] received noop
icepush.uncompressed.js.xhtml?ln=ice.push&v=3_3_0_130416:630 [icepush.54fd3.async-connection] closing previous connection...
icepush.uncompressed.js.xhtml?ln=ice.push&v=3_3_0_130416:630 [icepush.54fd3.async-connection] connect...
icepush.uncompressed.js.xhtml?ln=ice.push&v=3_3_0_130416:630 [icepush] received noop
icepush.uncompressed.js.xhtml?ln=ice.push&v=3_3_0_130416:630 [icepush.54fd3.async-connection] closing previous connection...
icepush.uncompressed.js.xhtml?ln=ice.push&v=3_3_0_130416:630 [icepush.54fd3.async-connection] connect...




Using the previously posted html the chrome log produced:
[icepush.5549c.async-connection] Blocking connection cannot be shared among multiple web-contexts.
Initiating blocking connection for "." web-context...
icepush.uncompressed.js.xhtml?ln=ice.push&v=3_3_0_130416:637 [icepush.5549c.async-connection] connection monitoring started within window 5549c
icepush.uncompressed.js.xhtml?ln=ice.push&v=3_3_0_130416:637 [icepush.5549c] bridge loaded!
bridgeit.js.xhtml?ln=org.icefaces.component.util&v=3_3_0_130416:726 bridgeit storeLastPage http://localhost:8080/HaystackWorks/index.xhtml
2index.xhtml:3 Consider using 'dppx' units, as in CSS 'dpi' means dots-per-CSS-inch, not dots-per-physical-inch, so does not correspond to the actual 'dpi' of a screen. In media query expression: screen and (min-resolution: 300dpi)
bridgeit.js.xhtml?ln=org.icefaces.component.util&v=3_3_0_130416:726 bridgeit storeLastPage http://localhost:8080/HaystackWorks/index.xhtml
bridgeit.js.xhtml?ln=org.icefaces.component.util&v=3_3_0_130416:726 bridgeit storeLastPage http://localhost:8080/HaystackWorks/index.xhtml
icepush.uncompressed.js.xhtml?ln=ice.push&v=3_3_0_130416:637 [icepush.5549c.async-connection] initialize connection within window 5549c
icepush.uncompressed.js.xhtml?ln=ice.push&v=3_3_0_130416:630 [icepush.5549c.async-connection] closing previous connection...
icepush.uncompressed.js.xhtml?ln=ice.push&v=3_3_0_130416:630 [icepush.5549c.async-connection] connect...
bridge.uncompressed.js.xhtml?ln=ice.core&v=3_3_0_130416:1315 [window] persisted focus for element "promotionDetails:SpinnerStartDate_input"
icepush.uncompressed.js.xhtml?ln=ice.push&v=3_3_0_130416:630 [icepush] received noop
icepush.uncompressed.js.xhtml?ln=ice.push&v=3_3_0_130416:630 [icepush.5549c.async-connection] closing previous connection...
icepush.uncompressed.js.xhtml?ln=ice.push&v=3_3_0_130416:630 [icepush.5549c.async-connection] connect...
bridge.uncompressed.js.xhtml?ln=ice.core&v=3_3_0_130416:1315 [window] full submit to http://localhost:8080/HaystackWorks/index.xhtml
javax.faces.execute: promotionDetails:SpinnerStartDate
javax.faces.render: promotionDetails:SpinnerStartDate
javax.faces.source: promotionDetails:SpinnerStartDate
view ID: vblwb244
event type: blur
bridge.uncompressed.js.xhtml?ln=ice.core&v=3_3_0_130416:1315 [window] persisted focus for element "promotionDetails:TermsAndConditions"
icepush.uncompressed.js.xhtml?ln=ice.push&v=3_3_0_130416:630 [icepush.5549c] received back-off
bridge.uncompressed.js.xhtml?ln=ice.core&v=3_3_0_130416:1315 [window] applied updates >>
update["promotionDetails:SpinnerStartDate_input"]: <input class="mobi-input-text" id="promo....
update["promotionDetails:SpinnerStartDate_hidden"]: <input id="promotionDetails:SpinnerStart....
update["javax.faces.ViewState"]: 4974435529297074323:6678277330830035694....
eval: ice.applyFocus('promotionDetails:Spinner....
extension
bridge.uncompressed.js.xhtml?ln=ice.core&v=3_3_0_130416:1315 [window] persisted focus for element "promotionDetails:SpinnerStartDate_input"
bridge.uncompressed.js.xhtml?ln=ice.core&v=3_3_0_130416:1315 [window] persisted focus for element "promotionDetails:SpinnerStartDate_input"
bridge.uncompressed.js.xhtml?ln=ice.core&v=3_3_0_130416:1315 [window] focused element "promotionDetails:SpinnerStartDate_input"
icepush.uncompressed.js.xhtml?ln=ice.push&v=3_3_0_130416:637 [icepush.5549c.async-connection] initialize connection within window 5549c
icepush.uncompressed.js.xhtml?ln=ice.push&v=3_3_0_130416:630 [icepush.5549c.async-connection] closing previous connection...
icepush.uncompressed.js.xhtml?ln=ice.push&v=3_3_0_130416:630 [icepush.5549c.async-connection] connect...
icepush.uncompressed.js.xhtml?ln=ice.push&v=3_3_0_130416:630 [icepush] received noop
icepush.uncompressed.js.xhtml?ln=ice.push&v=3_3_0_130416:630 [icepush.5549c.async-connection] closing previous connection...
icepush.uncompressed.js.xhtml?ln=ice.push&v=3_3_0_130416:630 [icepush.5549c.async-connection] connect...
bridge.uncompressed.js.xhtml?ln=ice.core&v=3_3_0_130416:1315 [window] full submit to http://localhost:8080/HaystackWorks/index.xhtml
javax.faces.execute: promotionDetails:SpinnerStartDate
javax.faces.render: promotionDetails:SpinnerStartDate
javax.faces.source: promotionDetails:SpinnerStartDate
view ID: vblwb244
event type: blur
icepush.uncompressed.js.xhtml?ln=ice.push&v=3_3_0_130416:630 [icepush.5549c] received back-off
bridge.uncompressed.js.xhtml?ln=ice.core&v=3_3_0_130416:1315 [window] applied updates >>
update["promotionDetails:SpinnerStartDate_hidden"]: <input id="promotionDetails:SpinnerStart....
update["javax.faces.ViewState"]: 4974435529297074323:6678277330830035694....
eval: ice.applyFocus('promotionDetails:Spinner....
extension
icepush.uncompressed.js.xhtml?ln=ice.push&v=3_3_0_130416:637 [icepush.5549c.async-connection] initialize connection within window 5549c
icepush.uncompressed.js.xhtml?ln=ice.push&v=3_3_0_130416:630 [icepush.5549c.async-connection] closing previous connection...
icepush.uncompressed.js.xhtml?ln=ice.push&v=3_3_0_130416:630 [icepush.5549c.async-connection] connect...


I hope this helps
Many thanks in advance,
Bryan
 
Forum Index -> ICEmobile General
Go to:   
Powered by JForum 2.1.7ice © JForum Team