Hi Alex,
-- Thanks for your information regarding the custom property used to specify the custom resources. For now, I'm trying to put my code in the form definition. Once it works, I'll create a new separate file for it. However, I'm facing a problem to access the second element of the repeated grid. I'm able to populate the first element of the repeated grid easily. Here's the code to do so: <xf:action class="fr-set-control-value-action"> <xf:var name="control-name" value="'control-3'"/> <xf:var name="control-value" value="/json/proposal/_[.]/lastname"/> </xf:action> The control-3 is inside the repeated grid. I have got the following questions: How to access the repeated grid instance? When I have two identical rows in the repeated grid, the Main Instance of the form contains two entries of the repeated grid. However, I don't see any identifier to distinguish both grid. Is there any method to get the count of the number of elements in JSON Array that is returned by the HTTP service. - Kush You received this message because you are subscribed to the Google Groups "Orbeon Forms" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. |
Administrator
|
Hi Kush,
The `<xf:action class="fr-set-control-value-action">` and ` <xf:var>` are just encoding what you enter in the in the Actions dialog. I recommend you set your action to store what the service returns in a dataset, then write XForms code that uses that dataset to populate the repeated grid based on what you have in the dataset. For now, you can have the code run upon some button you add to the form being pressed. Later you'll want to have it run right away right after the action runs. You'll let me know if this helps. Alex ----- -- Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet -- Sent from: http://discuss.orbeon.com/ -- You received this message because you are subscribed to the Google Groups "Orbeon Forms" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Hi Alex,
-- I'm progressing on this task. I've saved the response of the Action to a dataset. Currently, I'm trying to populate the grid on a button click (a trigger, in terms of XForms ;)) as you've mentioned in the previous reply. I've also understood how the actual form definition is constructed based on UI actions and is utilized to produce the Orbeon web form. As per my understanding, the final result is to simply add the elements of grid-x-iteration(with values) to the main instance of fr-form-instance after the button is clicked. In the <xh:body> the form will be superbly created from the main instance. It's beautiful to see that other than the main instance rest of the code is never updated. The data would be stored in a dataset and can be retrieved using the fr:dataset() function. <xf:insert> and <xf:repeat> are the helping friends to achieve this. I've gone through the syntax of both of them and tried to add an element to the main instance. I'm confronting with the following: Where to place the <xf:insert> in order to add the grid-x-iteration elements? I tried it placing in the <xf:trigger> element itself in the <xh:body> What is the value of the context attribute of the <xf:insert> element? I see that the rest of the controls are referenced using the bind attribute. How to specify the values from the dataset to the grid controls? Right now I'm just using the empty instance of the grid-2-template. This resource was used to understand the insert and repeat elements. Kush On Sunday, May 20, 2018 at 4:27:25 AM UTC+5:30, Alessandro Vernet wrote: Hi Kush, You received this message because you are subscribed to the Google Groups "Orbeon Forms" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. |
I've attached the source file of the form with my custom code and put a few comments.
-- On Friday, May 25, 2018 at 5:12:05 PM UTC+5:30, [hidden email] wrote:
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. grid_custom.xml (12K) Download Attachment |
This is sample data returned to Orbeon:
--
On Friday, May 25, 2018 at 5:18:13 PM UTC+5:30, [hidden email] wrote:
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. |
In reply to this post by Alessandro Vernet
Hi Alex,
-- Can you please reply to my questions? Thanks, Kush On Sunday, May 20, 2018 at 4:27:25 AM UTC+5:30, Alessandro Vernet wrote: Hi Kush, You received this message because you are subscribed to the Google Groups "Orbeon Forms" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. |
Administrator
|
Just a quick note for those who would find this thread: since this was
getting quite specific, we've taken it offline with Kush. Alex ----- -- Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet -- Sent from: http://discuss.orbeon.com/ -- You received this message because you are subscribed to the Google Groups "Orbeon Forms" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Free forum by Nabble | Edit this page |