cancel
Showing results for 
Search instead for 
Did you mean: 

how to implement back and forward button ?

Former Member
0 Kudos

Dear Experts,

My project has many components and there are reused and navigation together. I have Back and Forward button in Main Component for working history of user. I don't know how to implement it . Please give me ideas.

Thanks,

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

I think you can save the history in a list and find the target view name from this history list when user clicks back and forward button. Use the found view name to determine which navigation target should fire.

Regards,

Andy

Former Member
0 Kudos

Dear all,

Thanks for your help.

I got a lot of ideas from all you, as Andy Zhao opinion i need a list for saving history and find target view name from it. In project it has many components( more 10) and each component has many action, but Back and Forward button is only one in Main comp. How the best way to manage all action ? I mean when user clicks a action in another component which is not reused direct from Main comp, how to say action to history list at Main comp.

Thanks.

Former Member
0 Kudos

Hi

Why don't you use a drop down list to navigate between views.

Vaues of this drop down will be View names and You can fire a plug based on the selected entry.

If you application is for a process such as creating sales order, then you may want to use roadmap UI element.

Regards

Vineet

Former Member
0 Kudos

Hiii vineet vikram and everyone ,

My components are separated as MainComp -> CompA -> SubCompA... and some thing like that (SubCompA is not reused directly by MainComp) . I have only back button in MainComp. I am standing at a view in SubCompA and want to come back a view in CompA or MainComp when back button is clicked. How to get it ?

Thanks.

vijay_kumar49
Active Contributor
0 Kudos

Hi Soledad

The navigation from one view to the next is performed using an outbound and an inbound plug which are connected by a navigation link. You can thus define the sequence in which the views of a Web Dynpro application are called. The Navigation Modeler, a graphical Web Dynpro tool.

1.For an Inbound plug, a method called onPlug<plug_name> is generated by default. This method is executed when the inbound plug is called using the outbound plug of the preceding view and a navigation link. Instead of this method, you can also call an existing method or have no event handling performed.

2.For an Outbound plug, a method called wdFirePlug<plug_name> is generated by default. You can call this method in the implementation at exactly the place where you want to navigate to the next view

For Example you have 2 Views in WDJ Application

1st View having Forward Button Click on Forward Button 1st View Moves to 2nd View. and 2nd View Having Back Button. Click on Back Button 2nd View Moves to 1st View.

Go to first View. Create on Button for Forward Button. Under Forward Button u can write this code


public void onActionforward(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
{
//@@begin onActionBack(ServerEvent)
 wdThis.wdFirePlugTo2ndView();
//@@end
}

Go to 2nd View. Create on Button for Back. Under Back Button u can write this code


public void onActionBack(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
{
//@@begin onActionBack(ServerEvent)
 wdThis.wdFirePlugTo1stView();
//@@end
}

How to Develop the WDJ Application:

[ Creating Your First Web Dynpro Application|http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f64e7a90-0201-0010-e0b4-ec1f849ecd4e]

[View Structure and Design and Navigation Between Views|http://help.sap.com/saphelp_smehp1/helpdata/en/42/930334a5051d6be10000000a1553f6/content.htm]

I hope this is help full for you,

Regards

Vijay