Not click on the Delete button in Standard OTL OAF page popup warning message

Hello

In the page OTL Standard by removing records from its files automatically remove all without showing YES/NO pop messages.

So, I'm working on this requirement to get messages in context-click on the button.what deletion I did I extend the controller.

Popup messaging is displayed but when click the Yes button folder is not the deletion.

Thanks in advance.

Standard code:

============

' Public Sub processFormRequest (OAPageContext oapagecontext, OAWebBean oawebbean)

{

super.processRequest (oapagecontext, oawebbean);

DebugUtilities debugutilities = new DebugUtilities (oapagecontext);

debugutilities.enterMethod (Thi, "processFormRequest");

String s = oapagecontext.getParameter ("ShowTimecardSearch");

If (s! = null & & s.equals("Y"))

{

oapagecontext.putParameter ("TimecardSearchDone", "Y");

oapagecontext.redirectImmediately (oapagecontext.getCurrentUrlForRedirect (), true);

}

OAApplicationModule oaapplicationmodule = (oawebbean) oapagecontext.getApplicationModule;

String s1 = (String) oapagecontext.getSessionValue ("TimecardSearchDone");

String s2 = GlobalUtilities.getStringOrNullFromObject (oapagecontext.getParameter ("event"));

If (s2! = null & & s2.equals ("DeleteAction"))

{

Object obj = null;

If (s1! = null & & s1.equals("Y"))

obj = (TimecardSearchVOImpl) oaapplicationmodule.findViewObject ("TimecardSearchVO");

on the other

obj = (TimecardsVOImpl) oaapplicationmodule.findViewObject ("TimecardsVO");

((OAViewObjectImpl) (obj)) .reset ();

do

{

If (!) () (OAViewObjectImpl) (obj)). hasNext())

break;

Line = ((OAViewObjectImpl) (obj)) .next ();

String s5 = (String) row.getAttribute ("DeleteChecked");

If (s5! = null & & s5.equals("Y"))

{

String s7 = String.valueOf (row.getAttribute ("TimecardId"));

HXCUtilities.deleteTimecard (oaapplicationmodule, s7);

Row.Remove ();

}

} while (true);

((OAViewObjectImpl) (obj)) .setRangeStart (0);

}

======================

Code modified Contrller:

========================

' Public Sub processFormRequest (OAPageContext oapagecontext, OAWebBean oawebbean)

{

super.processRequest (oapagecontext, oawebbean);

DebugUtilities debugutilities = new DebugUtilities (oapagecontext);

debugutilities.enterMethod (Thi, "processFormRequest");

String s = oapagecontext.getParameter ("ShowTimecardSearch");

If (s! = null & & s.equals("Y"))

{

oapagecontext.putParameter ("TimecardSearchDone", "Y");

oapagecontext.redirectImmediately (oapagecontext.getCurrentUrlForRedirect (), true);

}

OAApplicationModule oaapplicationmodule = (oawebbean) oapagecontext.getApplicationModule;

String s1 = (String) oapagecontext.getSessionValue ("TimecardSearchDone");

String s2 = GlobalUtilities.getStringOrNullFromObject (oapagecontext.getParameter ("event"));

If (s2! = null & & s2.equals ("DeleteAction"))

{

oapagecontext.writeDiagnostics (Thi, "Enter in DeleteAction event param maton", 1);

OAException mainMessage = new OAException ("HXC", "HXC_TCSEARCH_DEL_CONFIRM");

oapagecontext.writeDiagnostics (Thi, "Enter in DeleteAction event param Manjunath1", 1);

Note that even if we do our Yes / No button submit a

form, yet it requires a non-null value in the yes/no constructor

URL parameters for the buttons to make, so we spend just empty

Channels for this.

DialogPage OADialogPage = new OADialogPage (OAException.WARNING,

mainMessage,

NULL,

"",

"");

oapagecontext.writeDiagnostics (Thi, "Enter in DeleteAction event param Manjunath2", 1);

Always use Applications dictionary messages of all the channels you want

display in your page.  Note that any text you have defined declaratively

in the wake of the OA is directly translatable.

String Yes = oapagecontext.getMessage ("AK", "FWK_TBX_T_YES", null);

String number = oapagecontext.getMessage ("AK", "FWK_TBX_T_NO", null);

We put this value, so the code that manages this key is

descriptive.

dialogPage.setOkButtonItemName ("DeleteYesButton");

The following configures the Yes / No buttons to several buttons, validate

and make sure that we handle the form submit the original

(the summary "employees") of the page so that we can process the 'yes '.

This controller selection button.

dialogPage.setOkButtonToPost (true);

dialogPage.setNoButtonToPost (true);

dialogPage.setPostToCallingPage (true);

Now define our yes/no labels instead of the default OK/Cancel.

dialogPage.setOkButtonLabel (yes);

dialogPage.setNoButtonLabel (no);

oapagecontext.redirectToDialogPage (dialogPage);

} else if (oapagecontext.getParameter ("DeleteYesButton")! = null)

{

oapagecontext.writeDiagnostics (Thi, "Enter in event param maton DeleteYesButton", 1);

Object obj = null;

If (s1! = null & & s1.equals("Y"))

obj = (TimecardSearchVOImpl) oaapplicationmodule.findViewObject ("TimecardSearchVO");

on the other

obj = (TimecardsVOImpl) oaapplicationmodule.findViewObject ("TimecardsVO");

((OAViewObjectImpl) (obj)) .reset ();

do

{

If (!) () (OAViewObjectImpl) (obj)). hasNext())

break;

Line = ((OAViewObjectImpl) (obj)) .next ();

String s5 = (String) row.getAttribute ("DeleteChecked");

If (s5! = null & & s5.equals("Y"))

{

String s7 = String.valueOf (row.getAttribute ("TimecardId"));

HXCUtilities.deleteTimecard (oaapplicationmodule, s7);

Row.Remove ();

}

} while (true);

((OAViewObjectImpl) (obj)) .setRangeStart (0);

}

Hello

It seems that the ViewObject request is get executed once again on his return on the Page of the dialog box.

Can you please do the following suggested changes and see what happens?

1. change the processFormRequest. Add the threshold also

dialogPage.setOkButtonItemName ("DeleteYesButton");

dialogPage.setNoButtonItemName ("DeleteNoButton");

2. change the processRequest as below:

public void processRequest(OAPageContext oapagecontext, OAWebBean oawebbean)
{
  if ((oapagecontext.getParameter("DeleteYesButton") == null) && oapagecontext.getParameter("DeleteNoButton") == null)
  {
  // Copy the entire processRequest Code here.
  }
}

Check out the link for more details below:

Advice from the Oracle Johny: OAF: OA dialogue Page works not when Diagnostics FND profile is not defined

Let us know what happens after this change.

See you soon

AJ

Tags: Oracle Applications

Similar Questions

Maybe you are looking for