Solution Model for Servoy Mobile

Home for older / inactive topics

Solution Model for Servoy Mobile

Postby pradiptab » Thu Jan 31, 2013 12:56 pm

Hi

Curious to know, if it is possible to use Solution Model, with Servoy mobile to generate the UI ? :?

Thanks
Pradipta
Mindfire Solutions
SAN Developer | Servoy Certified Developer
pradiptab
 
Posts: 59
Joined: Tue Mar 10, 2009 2:32 pm
Location: India, Orissa, Bhubaneswar

Re: Solution Model for Servoy Mobile

Postby patrick » Thu Jan 31, 2013 2:33 pm

yes it is.
Patrick Ruhsert
Servoy DACH
patrick
 
Posts: 3709
Joined: Wed Jun 11, 2003 10:33 am
Location: Munich, Germany

Re: Solution Model for Servoy Mobile

Postby pradiptab » Mon May 27, 2013 12:46 pm

Can you please add some sample code to add a button to an existing form, using Solution Model ?

Writing some thing like this don't work.

Code: Select all
   var frm = solutionModel.getForm(controller.getName());
   if (frm) {
      
      frm.newButton('New Button',12,245,20,20, null);
//      controller.recreateUI();
   }

And again there is no controller.recreateUI() method. So how to handle the stall form exception ?
Pradipta
Mindfire Solutions
SAN Developer | Servoy Certified Developer
pradiptab
 
Posts: 59
Joined: Tue Mar 10, 2009 2:32 pm
Location: India, Orissa, Bhubaneswar

Re: Solution Model for Servoy Mobile

Postby Andrei Costescu » Mon Jul 08, 2013 8:09 am

Please create a feature request for recreateUI in mobile client.
Currently you can alter an existing form, but only when it's now being shown:

Code: Select all
   history.removeForm('companies');
   var f = solutionModel.getForm('companies');
   var met = f.getMethod('myMethod');
   met.code = "function myMethod() { /* do something */ }";
   f.newButton("added with SM",0,5000,0,0,met);
   forms.companies.showMyself(); // that does a controller.show()
Andrei Costescu
Servoy
Andrei Costescu
 
Posts: 1018
Joined: Tue Jun 26, 2007 3:14 pm

Re: Solution Model for Servoy Mobile

Postby pradiptab » Mon Jul 08, 2013 10:54 am

Currently with the latest Servoy version (Version: 7.2.0 rc - build 2012), the solution model stuffs working correctly.
- Even if the form is not displayed, I can change the form using SM.
- If the form is displayed and I am changing the form using SM, still it don't trigger any stall form found exception. But strangely, it redirects to the previous displayed form.

Now, do we really need a recreateUI method, when there is no stall form exception thrown?
Pradipta
Mindfire Solutions
SAN Developer | Servoy Certified Developer
pradiptab
 
Posts: 59
Joined: Tue Mar 10, 2009 2:32 pm
Location: India, Orissa, Bhubaneswar

Re: Solution Model for Servoy Mobile

Postby ROCLASI » Mon Jul 08, 2013 11:06 am

pradiptab wrote:Currently with the latest Servoy version (Version: 7.2.0 rc - build 2012), the solution model stuffs working correctly.
- Even if the form is not displayed, I can change the form using SM.
- If the form is displayed and I am changing the form using SM, still it don't trigger any stall form found exception. But strangely, it redirects to the previous displayed form.

Now, do we really need a recreateUI method, when there is no stall form exception thrown?


I would say yes. The fact that you don't see your changes is telling.
Also the fact that you don't get an error doesn't denote good behavior in fact the absent of this error I would classify as a bug or at least a diversion of existing behavior.

Anyway, if you want to change a form that is/has been displayed you need to use recreateUI() to show the changes OR use the old way which is to destroy the form yourself and reload it.
Of course to destroy a loaded form it can't be referenced anywhere (so also not displayed). To work around that you simply show another form, then remove the form from history, destroy/revert the form and make your changes. Then show the form again.

Hope this helps.
Robert Ivens
SAN Developer / Servoy Valued Professional / Servoy Certified Developer

ROCLASI Software Solutions / JBS Group, Partner
Mastodon: @roclasi
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5438
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium

Re: Solution Model for Servoy Mobile

Postby pradiptab » Mon Jul 08, 2013 11:34 am

Thanks Robert for the clarifications. :)

Here is the feature request. SVY-4803
Pradipta
Mindfire Solutions
SAN Developer | Servoy Certified Developer
pradiptab
 
Posts: 59
Joined: Tue Mar 10, 2009 2:32 pm
Location: India, Orissa, Bhubaneswar


Return to Archive

Who is online

Users browsing this forum: No registered users and 0 guests