cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with button in htmlb

Former Member
0 Kudos

Hi all

I have a listbox,dropdownlistbox and an add button.When I click on add button,depending on my selection of item in dropdownlistbox, I have to add the selected data in the listbox. When I click on add button, page is getting reloaded (since it is calling the doProcessBeforeOutput() and the original jsp is getting loaded).So my dropdownlistbox has the default selection and value is not getting added in the listbox.I face the same problem with delete button also. Can anyone help me with this problem?

Thanks in advance

Regards

Harini S

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Harini,

The "normal" sequence you should use in a dynpage is:

2. In <b>doProcessAfterInput</b>, save the values entered by the user in the context/session.

Use ((DropdownListBox)this.getComponentByName("myDropDown")).getSelection() to get the value.

2. In your <b>event handler</b>, use the values saved in the context/session.

3. In <b>doProcessBeforeOutput</b>, after creating a component, put the old value (saved in the context/session) back in it.

For diffrences between IPortalComponentContext and IPortalComponentSession and more, see:

http://www.ajvic.net/irj/portalapps/com.sap.portal.pdk.htmlb.htmlbmanuals/docs/dynpage-01.html

Hope that helps,

Yoav.

Answers (0)