Next/Back buttons for datatable
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Next/Back buttons for datatable
Hi Everyone,
I am thinking about but could not find a solution for that.
I have a data table with "n" lines and a text box with the value "1". Every time I load the page it loads the data table and show me the line 1 because I bind the value of the textbox at the data table key column. Then I created a service which called "Next" which sum 1 at the textbox every time I hit the next button which trigger the service "Next" and then I have the line 2. It is working fine.
The problem is about the Back button because I cannot have a service to decrease 1 at the textbox since I cannot bind two "result" from different services.
Any ideas about how can I go down and up in data table using buttons?
Thanks in advance!
Solved! Go to Solution.
- Labels:
-
Coding
-
Design
-
Mashup-Widget
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi Pai,
Yes, it is a bit more complicated but I could solve using a property which stores the Current step.
I have a text box (not visible) which is has the current step and starts with 1. Then I have 1 property called CurrentStep and 2 Services, one increment 1 at the property and another decrease 1, respectively Next and Back Button. Then I did all the binds which is some because I have a kind of complex mashup.
The good part is that it works and your suggestion about the contextID make me think more and got this idea.
Thank you very much!
Best Regards,
Felipe Duarte
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
You should be able to use two buttons and use their contextID as the input parameter so that the service knows if next or back was clicked.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi Pai,
Thanks for the reply but I cannot bind two buttons at the same input and if I have two inputs I could not figure out the logic for that. Can you help me?
Thanks,
Felipe Duarte
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Oops I see your point, here is a simple way to approach it.
Two buttons, two services in that service you set a Session Parameter
After service completion you retrieve the session parameter value
Also you can set the datatable content to a session parameter as well potentially so you don't need to make one more round trip to retrieve the right contents for your grid.
a bit more complicated sadly :(
Perhaps someone else has a simpler way to do this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi Pai,
Yes, it is a bit more complicated but I could solve using a property which stores the Current step.
I have a text box (not visible) which is has the current step and starts with 1. Then I have 1 property called CurrentStep and 2 Services, one increment 1 at the property and another decrease 1, respectively Next and Back Button. Then I did all the binds which is some because I have a kind of complex mashup.
The good part is that it works and your suggestion about the contextID make me think more and got this idea.
Thank you very much!
Best Regards,
Felipe Duarte