I have 3 tabs where all the content is initially built prior to displaying the "record format" for the first time.
I had added a tab response field and coded the RPG so it knew what tab it was on when it executed some bit of work off one of the tabs. (so I could return to the same tab it was on when it executed the item it was processing).
What I want to do, is be able to click on a tab without going back to the server, but when I execute some item on any of the tabs (that requires server action), I want to be able to return to the tab that the user was on when they performed the action/task.
Is it as simple as adding script to the onclick event, or will that mess up the "tab response" value and cause issues when I try to return to the same tab that an action was performed on?
(I hope the above makes sense)
Thanks
Tabs - server response vs. client side
-
- Profound User
- Posts: 83
- Joined: Sun Oct 03, 2010 8:45 am
- First Name: Mike
- Last Name: Geldert
- Company Name: Stonriver
- Country: Angola
- Contact:
- Rob
- Profound Logic Staff Member
- Posts: 135
- Joined: Fri Jan 04, 2008 12:12 pm
- First Name: Rob
- Last Name: Ferguson
- Company Name: Profound Logic Software
- Contact:
Re: Tabs - server response vs. client side
There is a tab property called active tab. Bind this to a numeric field. If you set this field using RPG before the screen is displayed, you can control which tab will be displayed (the first tab is 0, the second is 1 etc). When a response is sent back to your RPG program, this field will also contain the number of the active tab.
Using this field, RPG can read and set the required tab on the tab panel.
Using this field, RPG can read and set the required tab on the tab panel.
-
- Profound User
- Posts: 83
- Joined: Sun Oct 03, 2010 8:45 am
- First Name: Mike
- Last Name: Geldert
- Company Name: Stonriver
- Country: Angola
- Contact:
Re: Tabs - server response vs. client side
Thanks! That works well. Is there also a way when clicking a tab, NOT to return to the server, but instead simply display the the tab that was clicked on? (client side)?
- Rob
- Profound Logic Staff Member
- Posts: 135
- Joined: Fri Jan 04, 2008 12:12 pm
- First Name: Rob
- Last Name: Ferguson
- Company Name: Profound Logic Software
- Contact:
Re: Tabs - server response vs. client side
Yes. In fact this is how a tab panel is used in most cases. Clicking on a tab will only send a response to the server if the tab response property has an indicator bound to it.
If you want the tab panel to operate entirely on the client side, don't bind an indicator to this property (or unbind it: there is an unbind field button on the bind dialog).
If you want the tab panel to operate entirely on the client side, don't bind an indicator to this property (or unbind it: there is an unbind field button on the bind dialog).
-
- Profound User
- Posts: 83
- Joined: Sun Oct 03, 2010 8:45 am
- First Name: Mike
- Last Name: Geldert
- Company Name: Stonriver
- Country: Angola
- Contact:
Re: Tabs - server response vs. client side
Good deal! I've give this a try.
Thanks
Thanks
Who is online
Users browsing this forum: No registered users and 4 guests