cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamically calling different interactive forms in the same view

Former Member
0 Kudos

Hi All,

I have a view1 with a dropdown with 4 values and a Submit button. (which will take you 2 second view2)

view2 is with 3 trays. In the tray1 I have Inteactive UI element. When from the view1 if they select one value and click submit, I should place form1 in the first tray of the view2.

If I select different value from view1 then my tray1 should get form2. Like this for different value selected from dropdown I should dynamically fill tray1 with different forms(Interactive UI elemnts).

At any point of time I should have only one form in the tray1.

With Regards,

Ravi

Accepted Solutions (0)

Answers (1)

Answers (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

I would place a viewUIElementContainer in Tray 1 and setup separate views for each of your inner forms. You can then fire navigation plugs to control which inner view (and consequently which form) is displayed within Tray 1.

Former Member
0 Kudos

Hi Thomas,

If I want to call different template source ( I mean different forms) dynamically, is it possible? with in the same view, instead different views for each form?

Because, I want to call the same event onactionsubmit for all the forms. If I do the way you suggested, I have to have different events for all forms.

otherwise I have to declare the event in component controller . But is it possible with out declaring in component controller?

Regards,

Ravi.D

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

You can supply the tempalate name dynamically by data binding that property to a context attribute. However your problem then becomes data binding to the data of the form itself. Unless every form is designed to run with the same context interface, you have a bit of a problem.

The only other option would be to generate the interactiveForm UI element dynamically in the WDDOMODIFYVIEW using code instead of the designer. I wouldn't recommend this approach. It adds to the complexity of your component and the long term maintenance cost. Seems like a big price to pay just to share one onActionSubmit handler. I would thinkg it would be better just to but the one centralized method in the component controller and call it from the individual view event handlers.

Former Member
0 Kudos

Hi Thomas,

For supplying the template source dynamically there is no option for binding the template source to the context attribute in the InteractiveUIelement properties.

And will there be any problem in the perfromance of the webdynpro , if I create 5 interactive uielements in the same view and depending on the requirment I will show one form and rest of the forms invisible.

(For all my forms I have the same context)

Regards,

Ravi.D

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>

> Hi Thomas,

>

> For supplying the template source dynamically there is no option for binding the template source to the context attribute in the InteractiveUIelement properties.

>

Sorry, you are correct. I was looking at an internal developement system and it is bindable there, but not in the current shipping release.

> And will there be any problem in the perfromance of the webdynpro , if I create 5 interactive uielements in the same view and depending on the requirment I will show one form and rest of the forms invisible.

>

Probably. Invisible will mean that they won't have to be rendered on the client side (which helps quite a bit), but there will still be some overhead on the server side. You will have to test to see just how much this impacts your application.