cancel
Showing results for 
Search instead for 
Did you mean: 

LinkToAction

Former Member
0 Kudos

Hi Experts,

I have following requirement. it contain 2 page only

first page LinkToAction(UI element)

second page corresponding LinkToAction description(when i click the

linkToaction it will show description in second page. similiar to all

LinkToAction UI element)

1.I have more than 50 LinkToAction(UI element) in first page.Each LinkToAction(UI element contain particular description)

2. when i click the LinkToAction(UI element) it will show description

in new page.

3.The correponding description will be showed.other description will

be hide. all description will be there in second page

how to acheive that? please help..

please give ur valuable suggestions

its very urgent.

Regards,

P.Manivannan.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Manivannan,

You need to define context in the second view of type com.sap.ide.webdynpro.uielementdefinitions.Visibility

if you have 50 UI elements then you need to define 50 context of this type and bind to the visibility property of the UI elements using

wdContext.currentContextElement().set<attributename>(WDVisibility.VISIBLE);

or

wdContext.currentContextElement().set<attributename>(WDVisibility.NONE);

But this would be tedious work.

Why don't you set the description in the single UI element dynamically at runtime.

Regards,

Murtuza

Former Member
0 Kudos

Hi murtuza,

This is my requirement. give some example.

how to do that in other way.

Regards,

P.Manivannan.

Former Member
0 Kudos

Hello,

Define a context attribute and use normal java if and else if conditions to decide the description of the link to action control.

This way you need not create 50 or any amount of context variables.

Thanks and Regards

Pradeep Bhojak

Former Member
0 Kudos

Hi pradeep,

give some sample example.for.do not create 50 context variables..

give some sxamples

Regards,

P.Manivannan

Former Member
0 Kudos

Hi Manivannan,

1. Define a context called description of type String in the component controller.

2. Map this context to both the views.

3.You can have only one UI element say textview and bind it to the context description.

4. You can set the value of the description in the first view on Action of the Link

wdContext.currentContextElement.setDescription("Description<b>1</b>");

wdContext.currentContextElement.setDescription("Description<b>2</b>");

........

wdContext.currentContextElement.setDescription("Description<b>n</b>");

After writing this line in the OnAction you can navigate to the next view and in the next view you will get the value that you have set in the first view.

Warm Regards,

Murtuza

Former Member
0 Kudos

hi Pradeep,

how to acheive this in if else condition.

still problem is not resolved..

please help

Regards,

P.Manivannan

Former Member
0 Kudos

hi pradeep,

which condition i will give... help me

Regards,

P.Manivannan

Former Member
0 Kudos

Hi ,

For n number of LinktoAction Ui element create n actions.i.e

for 1st UI element action1 and so on...

Create a context node and under that create a context attribute "Description" in component controller.Set the cardinality of that node to 1..1.

Then map those nodes to both the iviews.

On the first view,

When you click on any particular UI element particular action is called .. there onActioni..

wdContext.node<urNode>.currentURNodeElement.setDescription("ur ith Description");

Regards

Akshaya

Former Member
0 Kudos

Hello,

As you have already mentioned that you have more than 50 link to action UI element , then do the folowing

1> Create two context attributes a) called as ca_element for storing what UI element has been clicked type string b) ca_element_desciption type : description

2> on action method of each and every link to action element set ca_element to any value e.g if the first ui element's on action is caled then set the context vsariable to "one"

3> in the second view's wdDoModifyview method get the ca_element 's vaslue and then depending on what value it is set your description

I hope it helps

Pradeep

Former Member
0 Kudos

Hi,

I got a solutions,

1. I created for context attribute and bind it for description.

2. then i created corresponding action for each LinkToAction.

3. then set each action wdContext.currentContextElement().setDescription("Description");

Thanks for ur respaonse

Regards,

P.Manivannan.

Former Member
0 Kudos

Hi All,

In this requirment i created only one context attribute and finish my requirement

Regards,

P.Manivannan.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Take Value attribute define with visibility and based on condition display description

thanks,

Lohi.