cancel
Showing results for 
Search instead for 
Did you mean: 

Navigation to other screen

Former Member
0 Kudos

Hi All,

I am working on a WD application where the layout contains a table structure. One of the coloumns in the table is a hyperlink.

Now my requirement is when the hyperlink is clicked a separate window should open which i am able to get, but on clicking the other coloumns of the table it should navigate to a third screen. Now when i am clicking on the other coloumns it simply reamins in the same screen.How can i achieve this?

please help.

Regards.

Accepted Solutions (0)

Answers (2)

Answers (2)

siarhei_pisarenka3
Active Contributor
0 Kudos

Hi Becky

If I understand you right the problem is the new opened window. It must not be reusable, right? Tell me please how you open the windows.

BR, Siarhei

Abhinav_Sharma
Contributor
0 Kudos

Hi,

If I understood you correctly, you want to navigate to third view if user selects any column other than hyperlink one. To do so:

1) Create an action and put fireplug code in that.

2) Bind the action with the onLeadSelect of Table that you created.

Now if you click on any other colum, onLeadSelection gets called and you will be navigated to third view.

Hope it works.

Abhinav

Former Member
0 Kudos

Hi Abhinav,

Here is the code i am using:

public void onActionOnLeadSelect(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )

{

//@@begin onActionOnLeadSelect(ServerEvent)

/**

  • if the link is enabled perform action else navigate to next screen

*/

if(wdContext.currentI_Search_1BElement().getVa_enable()==true)

{

// wdThis.wdFirePlugToViewAndModify(wdContext.currentI_Search_1BElement().getPrueflos(),wdContext.currentI_Search_1BElement().getInsp_Date());

}

else

{

try

{

wdThis.wdFirePlugToViewAndModify(wdContext.currentI_Search_1BElement().getPrueflos(),wdContext.currentI_Search_1BElement().getInsp_Date());

}

catch (RuntimeException e)

{

// TODO Auto-generated catch block

wdComponentAPI.getMessageManager().reportException("Exception: "+e.getMessage(),false);

}

}

//@@end

}

So, here now the record is identified according to whether the link is enabled or not as can be seen in the if condition. What condition should i add to check if the link is enabled then also it should navigate to next screen on clicking other coloumns.

Regards.

Former Member
0 Kudos

Hi,

Could you please clarify whether the hyperlink will be enabled always or in some situation? and also provide the action code of the hyperlink.

Regards,

Saravanan K

Former Member
0 Kudos

Hi,

No, the hyperlink will be enabled only in some records. The records where the link is disabled is working fine. Only where its enabled we are facing the problem. On clicking the hyperlink if its enabled, it should open a pdf file and if disbaled it should open the same next screen.

Edited by: Becky Joseph on Dec 23, 2009 8:24 AM

gill367
Active Contributor
0 Kudos

HI

Could you please post the code that you have written for hyperlink action.

Regards,

Sarbjeet

Former Member
0 Kudos

That makes no sense to me. If the link is disabled, you cannot (and should not) trigger an action when it is clicked (especially not via a side effect like lead-selection change).

Armin

Former Member
0 Kudos

Actually, we have many records in the table. Some table will have the hyperlink enabled and some wont according to some condition.

Now what i want is, in the record where the link is enabled, on clicking the link a new window should open which we are getting already, but on clicking the other coloumns of the record which are of normal text view type it should navigate to the next screen.

Presently on clicking the other coloumns nothing is happening and it remains on the same screen itself.

gill367
Active Contributor
0 Kudos

HI Becky,

What if the user clicks on a record where link is not enabled what you want to do in that case.

Regards,

sarbjeet

Former Member
0 Kudos

In that case it is navigating to the same second screen.

if(wdContext.currentI_Search_1BElement().getVa_enable()==true)

{

}

else

{

try

{

wdThis.wdFirePlugToViewAndModify(wdContext.currentI_Search_1BElement().getPrueflos(),wdContext.currentI_Search_1BElement().getInsp_Date());

}

catch (RuntimeException e)

{

}

}