NEWBIE: can't run the second form created

Questions and answers for designing and implementing forms in Servoy

NEWBIE: can't run the second form created

Postby chaput.yves » Sat Jun 08, 2019 1:12 am

As the tilte says, I'm new to Servoy and this whole framework/Eclipse/database manipulation thing.
I have some basic javascript knowledge as well as HTML/CSS/MySQL (I can do a simple web page and scrap the web for some JS snippets to add functionalities)

I've been with Servoy for 2 days now. I think I get the concept but I'm still learning the basics.
So, I have created a what is needed to work in Servoy, solution, database, tables (1 table for now actually)
And I have created a form to display the records in the table. (I even managed to add a forward and back button to scroll thru)
Lotsa information in this table, 20 columns and over 2000 records.

Then, I created a 2nd form to display the data in a list form (in a spreadsheet type form)

Now, I have two forms, ClientsDetails form and ClientsList form.
Running ClientsDetails is perfect but when I try running ClientsList with any client, Web, NG or Smart, I still get the ClientsDetails form to show.
I simply cannot get that 2nd form to show.

Anyone has any idea on why?
I search the web AND the forum but it just look like I'm the only one with that problem, can't find any reference to something related to this.

Any help would be greatly appreciated.
Thanks

Yves
Happiness is a choice
chaput.yves
 
Posts: 11
Joined: Sat Jun 08, 2019 12:47 am
Location: Montreal, Quebec, Canada

Re: NEWBIE: can't run the second form created

Postby swingman » Sat Jun 08, 2019 11:09 am

Hi Yves,

one simple way of doing this is to add a button to your first form.
In the properties of the button add a method that responds to the onAction event.
Then you add something like this to the method skeleton that Servoy generates:

forms.thenameofmysecondformhere.show();

where thenameofmysecondformhere is the name of your second form,

good luck,
Christian Batchelor
Certified Servoy Developer
Batchelor Associates Ltd, London, UK
http://www.batchelorassociates.co.uk

http://www.postgresql.org - The world's most advanced open source database.
User avatar
swingman
 
Posts: 1479
Joined: Wed Oct 01, 2003 10:20 am
Location: London

Re: NEWBIE: can't run the second form created

Postby chaput.yves » Sat Jun 08, 2019 4:58 pm

Thanks for the answer Swingman.
But shouldn't I be able to run it on its own, just like I did for my first form? (Be it for design checking only)
Besides, if anything, logically, it is the second form that should call the first form.
The second form is a list of all the records while the first one is the details of one record.

I created a third form (related to a totally different table) and still, when I run it, while being the only active form in the editor window, it is the first form that comes up in the client.

Either I am missing something or this framework doesn't let you make mistakes and do something that is not perfectly in sequential order of your intended process.
I should be able to run each form independently and make sure all is up to my needs before I start putting all the pieces together.

Thanks for your time answering questions.
Happiness is a choice
chaput.yves
 
Posts: 11
Joined: Sat Jun 08, 2019 12:47 am
Location: Montreal, Quebec, Canada

Re: NEWBIE: can't run the second form created

Postby ROCLASI » Sat Jun 08, 2019 6:24 pm

Hi Yves,

On the solution node (select it in the Project Explorer) you will find in the properties pane a property to set the first form. This is automatically set with the first form you created so you need to change this to point it to the list form.

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: NEWBIE: can't run the second form created

Postby chaput.yves » Mon Jun 10, 2019 3:33 am

Hi Robert,
thanks for the answer.

I did find the solution properties and the fisrtForm line but all I can select is either one of the forms I have created or -none- (as per the attached image)
I cannot select to point directly to the Forms node, unless there is a way I'm not aware of.
So, anyway, I selected -none- and tried to run my third form, to no avail, still the first form is popping up.
I restarted Servoy Developer and still the same result.

Am I doing something wrong?
Attachments
firstForm.PNG
firstForm.PNG (37.35 KiB) Viewed 8411 times
Happiness is a choice
chaput.yves
 
Posts: 11
Joined: Sat Jun 08, 2019 12:47 am
Location: Montreal, Quebec, Canada

Re: NEWBIE: can't run the second form created

Postby chaput.yves » Fri Jun 14, 2019 3:46 pm

So?
No one has another idea how I can solve this "first form" problem?
There has to be a way.
I can't believe you guys are working this way.

Help?!?!
Happiness is a choice
chaput.yves
 
Posts: 11
Joined: Sat Jun 08, 2019 12:47 am
Location: Montreal, Quebec, Canada

Re: NEWBIE: can't run the second form created

Postby mboegem » Fri Jun 14, 2019 5:36 pm

chaput.yves wrote:I can't believe you guys are working this way.


Well... I think most applications will have a sort of landing page and a menubar (top or left)
If the users selects 'Clients' from this menu, it would most likely display the ClientsList form.
Then based on which record from the list is (double) clicked, the application will show the ClientsDetail form.

So, the solution firstForm should be set to the landing page form (call it 'home', 'main', 'dashboard'.. you name it)
If you want to be able to control your firstForm for whatever reason, you can do this by using the onSolutionOpen event and attach a function to that.
This function can contain logic and based on the outcome show a form like:
Code: Select all
forms.myConditionallyDeterminedFirstForm.controller.show()


Click the menu item should do something like this:
Code: Select all
forms.ClientsList.controller.show();


Clicking a record in client list should do a similar thing:
Code: Select all
forms.ClientsDetail.controller.show();


Hope this helps, in case you need more specific pointers we will need more information from you.
Post some sort of workflow, if possible captured as an image as a picture will tell more than a thousand words.
Marc Boegem
Solutiative / JBS Group, Partner
Servoy Specialist
• Servoy Certified Developer
• Servoy Valued Professional
• Freelance Developer

Image
User avatar
mboegem
 
Posts: 1797
Joined: Sun Oct 14, 2007 1:34 pm
Location: Amsterdam

Re: NEWBIE: can't run the second form created

Postby chaput.yves » Sat Jun 15, 2019 1:57 am

mboegem wrote:...

Hope this helps, in case you need more specific pointers we will need more information from you.
Post some sort of workflow, if possible captured as an image as a picture will tell more than a thousand words.

Thanks Marc for your answer.

Right now, I'm not even trying to program a solution, I'm just designing the forms.
As you can see in the attached image (EditScreen.png), I am simply in the edit view.
I would like to "run" each forms individually to make sure the design is proper with the actual information in each field.
In the EditScreen.png image, the sujetsDetails form is the active window.
If I launched one of the client, for example the NG Client, while the form sujetsDetails is active, I get the clientDetails form in the client, as you can see in the second screen grab, firstFormLaunched.png.

Maybe I don't understand how this software is working?
I'm a total newbie on this thing so... :?
Attachments
firstFormLaunched.PNG
firstFormLaunched.PNG (107.08 KiB) Viewed 8323 times
EditScreen.PNG
EditScreen.PNG (118.57 KiB) Viewed 8323 times
Happiness is a choice
chaput.yves
 
Posts: 11
Joined: Sat Jun 08, 2019 12:47 am
Location: Montreal, Quebec, Canada

Re: NEWBIE: can't run the second form created

Postby mboegem » Sat Jun 15, 2019 2:24 pm

Hi,

you are expecting the solution (because that's what it is, no matter how you call it at this moment), to startup with whatever form you are editing at that moment.
This is just not the way it works.
The solution will follow the rules as you set them, so if firstForm is formX, that formX will be displayed no matter what form you are editing.
It would be very strange if it didn't, because in the end you want to run your solution in the same way as it will run on any production environment.

If you want to switch between forms you can right click the form in the solution explorer and select 'Open in Debug Client'.
This will only work once you've started your solution from developer.

Still I think it would be wise to start on some simple navigation as you progress.
Attaching an onAction event to a label will make it a button, which will use a different style class and will probably be displayed in a different way.
Designing forms to make everything look perfect and not seeing the full picture doesn't work imho
Marc Boegem
Solutiative / JBS Group, Partner
Servoy Specialist
• Servoy Certified Developer
• Servoy Valued Professional
• Freelance Developer

Image
User avatar
mboegem
 
Posts: 1797
Joined: Sun Oct 14, 2007 1:34 pm
Location: Amsterdam

Re: NEWBIE: can't run the second form created

Postby chaput.yves » Sat Jun 15, 2019 4:55 pm

mboegem wrote:Hi,

you are expecting the solution (because that's what it is, no matter how you call it at this moment), to startup with whatever form you are editing at that moment.
This is just not the way it works.

I was getting that impression that I was not getting how this all works.

The solution will follow the rules as you set them, so if firstForm is formX, that formX will be displayed no matter what form you are editing.
It would be very strange if it didn't, because in the end you want to run your solution in the same way as it will run on any production environment.

Well, I guess my mind doesn't work that way.
I try to set the visuals and then set the rules.
It seems to me to be kinda procedural way of thinking the solution, no?
You gotta have the full picture of what you want laid out before you start, not "design as you go".

If you want to switch between forms you can right click the form in the solution explorer and select 'Open in Debug Client'.
This will only work once you've started your solution from developer.

You mean from the "run with client" button when you say "started your solution from developer"?

Still I think it would be wise to start on some simple navigation as you progress.
Attaching an onAction event to a label will make it a button, which will use a different style class and will probably be displayed in a different way.
Designing forms to make everything look perfect and not seeing the full picture doesn't work imho

As I said prior, I guess my mind doesn't understand it that way.
I must have more of a designer type mind than a programer type mind.

Alrighty then, I'll have to find some tutorial on the net that explains how this is all working.
I gotta wrap my mind on the whole concept of Servoy and how it works. :?
Happiness is a choice
chaput.yves
 
Posts: 11
Joined: Sat Jun 08, 2019 12:47 am
Location: Montreal, Quebec, Canada

Re: NEWBIE: can't run the second form created

Postby mboegem » Sun Jun 16, 2019 11:16 pm

chaput.yves wrote:You mean from the "run with client" button when you say "started your solution from developer"?

yes
Marc Boegem
Solutiative / JBS Group, Partner
Servoy Specialist
• Servoy Certified Developer
• Servoy Valued Professional
• Freelance Developer

Image
User avatar
mboegem
 
Posts: 1797
Joined: Sun Oct 14, 2007 1:34 pm
Location: Amsterdam

Re: NEWBIE: can't run the second form created

Postby chaput.yves » Mon Jun 17, 2019 6:59 pm

mboegem wrote:
chaput.yves wrote:You mean from the "run with client" button when you say "started your solution from developer"?

yes

Thank you
Happiness is a choice
chaput.yves
 
Posts: 11
Joined: Sat Jun 08, 2019 12:47 am
Location: Montreal, Quebec, Canada


Return to Forms

Who is online

Users browsing this forum: Bing [Bot] and 0 guests