cancel
Showing results for 
Search instead for 
Did you mean: 

Popup Window with Save Button

Former Member
0 Kudos

Hi,

I have a situation where there is popup window which contains 3 parameters. The first two parameters are the OVS for the user called "My Subsitute" and "My coder", and the last parameter is a check box called "Active Substitution". There are two buttons "Save" and "Cancel".

After selecting the first two fields of OVS, a user will check a check box. Then he/she will click on "Save" button. The popup window will disappear, and the OVS values will be stored in a context. There is no table for the OVS values to fill.

Could someone provide me how to code this? I would really appreciate your help.

Regards,

-Napadol

Accepted Solutions (1)

Accepted Solutions (1)

former_member751941
Active Contributor
0 Kudos

Hi Napadol,

Chech this thread Page no. 3

Regards,

Mithu

Former Member
0 Kudos

Hi Mithu,

Thanks for your response, but that was not what I am looking for. I did that part already, but now I want to code the "Save" button.

A user clicks on "My Settings" button from the web browser, and a popup window shows up. This popup window contains three fields; My substitute input field (OVS), My coder input field OVS), and a check box, and two buttons "Save" and "Cancel".

A user selects My substitute, My coder, and clicks a check box. Then a user clicks on "Save" button to save the values of those three fields. I would like to know how to implement the "Save" button.

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

{

//@@begin onActionSave(ServerEvent)

//@@end

}

If anyone can tell me how to code this part, I would really appreciate that.

Regards,

-Napadol

Former Member
0 Kudos

Hi Napadol:

I've worked on ur requirement. Its simple do the following:

I hope U've these:

2 Views: Base View (1), PupUp view(2)

2 Windows:Base Window (1), PupUp Window(2)

Steps:

1> In BaseView > Context > create the 3 attributes of your rqmt

2> In PopUpView > Context > create the 3 attributes and map them to layout elements, and another set of 3 attributes(ex: <b>attribS1, attribS2, attribS3</b>) to save the data.

3> In Component Controller > create the same noof of attributes that you want to Save.

4> Map the attributes from BaseView > Component Controller > PopUpView (to <b>attribS1/2/3</b>)

5> In PopUpView > onActionSave > save(setX()) the entered values into the <b>attribS1/2/3</b>.

6> this will basically saves the values in both the Views. if you want to test you can display the values in BaseView with the mapped data.

Hope this helps you, if you want the code do let me know.

Tnx,

MS

Former Member
0 Kudos

Hi, MS

Thank you so much for your response, and that's really helpful idea. I have done most of the steps already which I have 3 attributes; Coder_Id, Subs_Id, and Active_Subs (boolean) because this one is a checkbox. Then I set all of them to Xuser.

The one issue that I'm dealing with now is after a user selects a coder, a substitute, checks the active subs, and clicks on "Save". The window disappears, but when a user clicks on the button "My Settings" to bring up a popup window again, it didn't store the coder's name and the substitute's name on the textfield of the window. I don't how to code this part. I have Update attribute to update the Xuser as well.

Regards,

-Don

Former Member
0 Kudos

Hi Napadol:

If i'm not wrong, 'My Setting' stores user specific details, correct? And when u click on it you want the data to be displayed in the same UI fileds which you've stored before??

Tnx,

MS.

Former Member
0 Kudos

Hi MS,

That's correct! The first time you click on "My Settings", the popup window shows up. Then you use the first OVS search to find the coder, the second OVS search to find the subsitute, click on a checkbox for "Active Substitution", and then click on "Save" button to store the coder and the substitute. The popup window is closed after that.

Then you click on "My Settings" again, and you should see the names of the coder and the substitute that you selected displayed on the popup window in the first two fields. I cannot get the names displayed right now. Any idea?

Regards,

-Don

Former Member
0 Kudos

Hi Napadol:

In that case, in my first post i've asked you to setX() to the additional attributes(atribS1/2/3_ at step 5. Instead of this use setX() to the actual attributes that are used to map the UI elements. So you can forget about the additional attributes.

This will surely solve your problem, but this operation is only for that partucular session. Hope this will sovled your problem, if not let me know the issues u've faced.

Tnx,

MS

Answers (0)