Instead of mySession().browser() you should preferably use browser() that 
ERXComponent provides. That's a little bit shorter and works also for 
sessionless pages.

jw


Am 22.05.2013 um 12:35 schrieb Raymond NANEON <rnan...@me.com>:

> Hi List,
> 
> I want to check the device or platform on which my app running, to activate 
> or not some options. Does it exist a component which does it well?
> 
> I try WOConditional and test this example : 
> 
> in Html
> 
>       <webobject name = "platform">
>         <webobject name = "nav">mobileOption</webobject>
>       </webobject>
> 
> in woD
> 
> platform : WOConditional {
>     condition = platform;
> }
> 
> in Java :
> 
> public boolean platform() {
>         return mySession().browser().isIPad()
>                 || mySession().browser().isIPhone()
>                 || mySession().browser().isUnknownPlatform();
> }
> 
> This example don't activate mobileOption when I run my app on my iPhone.
> 
> Thanks for help
> Envoyé depuis iCloud



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to