cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

Using dropdown list with repeater widget

bliang-2
1-Visitor

Using dropdown list with repeater widget

The user case I am working now is: I have a infotable, which has two columns - Key and Value. I want to show the value as a dropdown list. As far as I know, the grid widget cannot support an embedded widget in a cell. So I want to implement it with a repeater widget. I have a couple questions.

  1. How can pass other parameters into the repeater mashup? I can pass infotable(key-value) to the repeater widget, but I need pass more parameters to the repeater mashup to retrieve all possible Values showing in the dropdown list.
  2. How to save the results? Once the user selecting a new value from the dropdown list, what's the best process to save the infotable (key-value)? I am using the thread as a reference (Input capable list using Repeater widget).

Thanks in advance.

10 REPLIES 10
paic
12-Amethyst
(To:bliang-2)

I think the answer to both 1 and 2 might be Mashup parameters.

You can use those to pass information from mashup to mashup and you can use it to temporarily hold values.

admin11
7-Bedrock
(To:paic)

Thank you Pai. Actually, I tried to use mash parameters between the mashups. I defined a couple of mashup parameters within the repeater mashup. In the parent mashup (holding the repeater widget), the repeater widget properties panel can show the parameters I defined in the repeater mashup. But the only input to the repeater widget is "Data". All mashup parameters only support a dropdown list to pickup which one to use from the "Data". Does this mean I have to put everything I want to pass to repeater mashup as an Infotable and pass this Infotable to the repeater widget? Such as in the following picture.

bliang-2
1-Visitor
(To:paic)

Thanks for the reply. I actually tried to use mashup parameters between mashups. I defined some parameters in the repeater mashup. In the parent mashup (which holds the repeater widget), the repeater widget properties panel only show the repeater mashup parameters as a dropdown list. The value can be selected from the dropdown (which is defined in the input "Data" in repeater widget). Does this mean I have to package all parameters I want to pass in one Infotable and pass this Infotable to the repeater widget?

paic
12-Amethyst
(To:bliang-2)

Since inside the repeater there is a mashup, you can either pass all information in, or use the information passed in to run services inside the mashup that is within the repeater to retrieve the remaining information needed.

bliang-2
1-Visitor
(To:paic)

I think there are somethings not clear to me. Let me clarify the problem I have.

There is a "child mashup" will be used inside the repeater widget. There is a "parent mashup" will hold the repeater widget.

The "child mashup" will be only used inside the repeater widget, so the "child mashup" is invisible to the "parent mashup". It means the mashup parameters defined within "child mashup" is invisible to the "parent mashup". Please correct me if I am wrong.

Now I am using session parameters to pass the parameters back and forth between the "child mashup" and "parent mashup". It works. But I prefer to use mashup parameters if I can figure out how to use it.

Thanks.

paic
12-Amethyst
(To:bliang-2)

Sorry I thought you already had this figured out.

Child mashup has mashup parameters - Use mashup parameters for display, for input into services, use Mashup Loaded to run the services.

Parent mashup has a source of data.

Repeater goes into Parent

Parent assigns the whole source of data to Repeater

Assign child mashup to Repeater

this will now add additional Properties to the Repeater which represent the Mashup Parameters of the Child Mashup

assign the field/column or ALL Data to the mashup parameters of the child in the Repeater properties

You can only send information from Parent to Child through the repeater.

bliang-2
1-Visitor
(To:paic)

It is much more clear now. If I am doing this way, all parameters "child mashup" needed must be pass to the repeater widget as one Infotable ("Data"). Then the "child mashup" uses the columns inside the infotable to display or call service. And this infotable is a one-way process. This implementation has some drawbacks for my case. Such as I have infotable which has "Key" and "Value" two columns. This infotable is retrieved from some service. But only pass these two columns to the repeater widget is not enough for the "child mashup" to display a dropdown list. So I have to create a temp infotable which has "Key", "Value" and "Parameter1", "Parameter2". And pass this temporarily created infotable to the repeater widget. The "child mashup" can use "Parameter1" and "Parameter2" to prepare a dropdown list for displaying. Once the user makes some changes to the value, there is no way to pass the new values back to the "parent mashup". If then, the session parameters may be the solution.

Thanks.

paic
12-Amethyst
(To:bliang-2)

Remember you can run whatever services you need within the Child mashup with what information you pass.

I do not see why you can't derive the content for the drop down within the child mashup.

Not sure if you remember that the repeater will render a child mashup per ROW of information passed in and assign the specific column values of that row to the mashup parameter of the child mashup in that row.

So if you are passing in 10 Keys in a table.

You get 10 Child mashups each with one of the keys as its mashup parameter value.

bliang-2
1-Visitor
(To:paic)

Maybe I didn't state my problem clearly. Here I give a simple example.

I have infotable with two columns (Key, Value) and two rows, which will pass to repeater widget. Such as:

Key1 - Value1

Key2 - Value2

in the child mashup, I want it shows as Key1 - Dropdown list(which has 10 possible values, value0, value1,... value9). To prepare the dropdown list, I have a resource service which takes Parameter1 and Parameter2 as input and a 10 rows infotable as output. So I can bind the output infotable with the dropdown list. In order to achieve this, I need to pass "Parameter1 and Parameter2" to the child mashup.  My question is how can I pass "Parameter1 and Parameter2" to the child mashup? Shall I create an infotable like:

Key1 - Value1 - Parameter1 - Parameter2

Key2 - Value2 - Parameter1 - Parameter2

and pass this infotable to the repeater widget?

Thanks.

Hi Bo Liang,

Did you get resolution of this issue?

Thanks,

Lalit

Announcements


Top Tags