voyent
Messages posted by: philip.breau  XML
Profile for philip.breau -> Messages posted by philip.breau [2988] Go to Page: 1, 2, 3  ...  198, 199, 200 Next 
Author Message
If you want to try that out, you can override the js function in your page like so:
Code:
 <script type="text/javascript">
 mobi.panelAutoCenter = function(clientId){
 ...
 }
 


The code, as is, seems ok to me though. Are those numbers above correct? Is the content height really 670px? Another version you might try is using the approach of 50% and adjusting the margin by the content dimensions:

Code:
 contentElement.style.top = contentElement.style.left = "50%";
 contentElement.style.marginTop = "-" + (contentHeight/2) + "px";
 contentElement.style.marginLeft = "-" + (contentWidth/2) + "px";
 //set position to absolute when content is larger than viewport to allow for scrolling 
 contentElement.style.position = windowHeight - contentHeight > 0 ? "fixed" : "absolute";
 
You won't be able to override the CSS by adding another style to the page as the popup styles are added inline. So those will always have precedence. You'll need to debug the mobi.panelAutoCenter() function to see why the popup placement calculation is being miscalculated on your page. Step through that function in the JS debugger and note the values of windowWidth, windowHeight, scrollTop, and contentHeight.

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

Thanks,
Philip
I've updated the inputText component allow double values for the step attribute. You can try this in the latest snapshot build.

Thanks,
Philip
In my own testing I don't see any issue with binding the locale. Did you mean "en_AU" for Australia?

http://www.oracle.com/technetwork/java/javase/locales-137662.html

If you're having trouble with inadvertant validation, you might try using <mobi:ajax>. You should still be able to just just one form. Try something like:

Code:
 <h:form>
   <mobi:dateSpinner id="startDate"
         locale="en_AU">
     <mobi:ajax execute="@this" render="@this"/>
     <f:convertDateTime type="date" pattern="dd-MM-yyyy"/>
   </mobi:dateSpinner> 
   <mobi:dateSpinner id="endDate"
         locale="en_AU">
     <mobi:ajax execute="@this" render="@this"/>
     <f:convertDateTime type="date" pattern="dd-MM-yyyy"/>
   </mobi:dateSpinner> 
 </h:form>
 


One other issue that you want to be wary about is how useNative can affect the date pattern in browsers. When you set useNative to true, it means the browser can use it's own date component, and also it's own date format. Which makes it difficult to predict the date pattern that you expect to convert. Since you have useNative set to true here, make sure that browser is sending the expected format.

Thanks,
Philip
What locale values are you using?
Is this error message coming from the browser (if so, which browser) or the server? Looking at our API for this, I see that the step attribute is an integer, which prevents stepping in increments less than 1. I've opened the following jira to fix this.

http://jira.icesoft.org/browse/MOBI-1120

Can you post the rendered HTML snippet for the input element?
Check to see if it's not a validation or some other error that's short circuiting the lifecycle and preventing navigation. Try adding immediate="true" to the commandButton.

Code:
 <h:commandLink action="#{employeeAction.nextPage}" 
     immediate="true" value="test1">
  </h:commandLink>
 
Hi,
It's likely a problem with your page markup. The ViewManager component expects the <mobi:viewManager> tag to be a child of the body element. So you should have something like:

Code:
 <html>
     <h:head>..</h:head>
     <h:body>
         <mobi:viewManager>
              <mobi:view>
                   <h:form>...</h:form>
              </mobi:view>
         </mobi:viewManager>
     </h:body>
 </html>
 
Hi,
You can grab the latest weekly snapshot build here:

http://res.icesoft.org/snapshots/icemobile/

Thanks,
Philip
Hi,
Thanks for the feedback. We'll update the tutorial asap. I think you're just missing the push registration aspect here. It looks like you're correctly making the push, and you're using a PortableRenderer initialized to a final variable so that it can be seen inside your thread. That's all good. But you have to register views or sessions to be included in a push group. You can do this programmatically through the PushRenderer api, or simply add the following tag to your page:

Code:
 <icecore:push group="MyGroup"/>
 


http://www.icesoft.org/wiki/display/ICE/push

You might also want to initialize to initialize things and get the reference to the PortableRenderer in a @PostConstruct method instead of a constructor to make sure things are initialized.

Thanks,
Philip
The geolocation coordinates are automatically retrieved from the browser when the page loads, so you have to load the page first before you have them. Once they're loaded in the browser, you can make an ajax call back to server. Currently you'll have to do this yourself, but I think adding a new feature to the mobi:geolocation tag to automatically update the server on when the coordinates are updated would be good.

http://jira.icesoft.org/browse/MOBI-1085

For now just try something like this:
Code:
 <h:form id="geoForm">
    <mobi:geolocation id="geo"
              latitude="#{bean.latitude}"
              longitude="#{bean.longitude}" />
    <mobi:commandButton id="btn" style="display:none"/>
    <h:outputScript>
         document.querySelector("#geoForm:geo_locHidden").addEventListener("change", function(){
                 document.querySelector("#geoForm:btn").click();
         }, false);
    </h:outputScript>
 </h:form>
 


Thanks,
Philip
What scope is the item that you're adding? You should only need to call PushRenderer.addCurrentSession() once for any user. It may take a few seconds for the push long polling and hear beat to be set up after this, so you might want to call addCurrentSession() for each user as soon as their session is initialized. Check the network traffic and see if there are any repeated calls to listen.push (which is the push heartbeat).

Thanks,
Philip
Hi,
There are no specific plugin features to bind entities with ICEmobile or ICEfaces components, but I don't think they're really necessary. You can find plugins for both Eclipse and NetBeans that support integration with JPA and EJB3. And the ICEfaces and ICEmobile plugins support component and attribute binding. Since ICEfaces and ICEmobile are both based on standard JSF, after that it's really just a matter of injecting the entity manager into a bean, querying your entities in a property, and binding the property to a UI component.

The last 10 minutes or so of this webinar goes into creating a data-driven ICEfaces app with JPA:

http://www.youtube.com/watch?v=pxsjfB7IKVs#t=2416

I've attached the sample app.

Hope this helps.

Thanks,
Philip
There are probably other details you need to take care of when using jQuery and ICEfaces together (such as re-initializing jQuery handlers after an ICEfaces DOM update), but I think your selector above might not be right. Try removing the space between iceCmdBtn and Qbutton.

Code:
 $('.iceCmdBtn.Qbutton')...
 
 
Profile for philip.breau -> Messages posted by philip.breau [2988] Go to Page: 1, 2, 3  ...  198, 199, 200 Next 
Go to:   
Powered by JForum 2.1.7ice © JForum Team