Page 1 of 1

Problems with Rio client API and PF6.0

Posted: 17 Jul 2016, 20:48
by ybendek
Hello

I'm upgrading my web app to the last libraries and I'm having issues trying to use the RIO client APIs like Rio.clearMenuState().

Before it works perfectly (PF 5.3 and Rio 3.0.1) but now with the new ones (PF6.0 and Rio3.1.2) when I try to call something like Rio.clearMenuState() I have an error in console:

Code: Select all

VM2274:1 Uncaught ReferenceError: Rio is not defined

Re: Problems with Rio client API and PF6.0

Posted: 18 Jul 2016, 23:53
by mert.sincan
Please try with;

Code: Select all

PF('RioMenu').clearMenuState();

<pr:menu widgetVar="RioMenu" .... />

Re: Problems with Rio client API and PF6.0

Posted: 19 Jul 2016, 00:25
by ybendek
aragorn wrote:Please try with;

Code: Select all

PF('RioMenu').clearMenuState();

<pr:menu widgetVar="RioMenu" .... />
Then I guess, Rio API cannot be used now?

For example others like Rio.isMobile() cannot be invoked?

Re: Problems with Rio client API and PF6.0

Posted: 21 Jul 2016, 14:19
by mert.sincan
Rio API cannot be used now?
- No, we rewrote RioMenu and client widget. You can use rio menu like widget of primefaces component. Exp;

<pr:menu widgetVar="TestRioMenu" .... />

PF('TestRioMenu').clearMenuState();
PF('TestRioMenu').isMobile();
...
you can use other methods with the value of widgetVar.