Skip to Content
author's profile photo Former Member
Former Member

wdContext.validate() not working!!!!!!!!!!!!!

hi

When i go from one view to other view on click of "submit" button, the 2nd view shows the detail of orders.

The problem is on click of "back" button when i go to 1st view and give the other date range and press "submit"

button again the date which was earlier fetched by 1st query remains there.

For refreshing the data i hav used following code snippet :-

SUBMIT BUTTON OF INPUT SCREEN

public

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

{

//@@begin onActionSubmit(ServerEvent)

Zimportorderspnr zimp =

new Zimportorderspnr();

Zmf002_Select_Orders_Pnr_Input zinp =

new Zmf002_Select_Orders_Pnr_Input();

IPrivateAuctionServiceFeesInDateRange.IEndElement endnode = wdContext.currentEndElement();

Date enddate = endnode.getDate();

IPrivateAuctionServiceFeesInDateRange.IStartElement startnode = wdContext.currentStartElement();

Date startdate = startnode.getDate();

IWDMessageManager msg = wdComponentAPI.getMessageManager();

if (startdate == null) {

// *************************** FOR DISPLAYING MESSAGE

msg.reportMessage(IMessagePanel.MISSING__INPUT,

null, false);

}

else {

if (enddate == null) {

enddate = startdate;

}

if (enddate.before(startdate)) {

msg.reportMessage(IMessagePanel.END__DATE,

null, false);

}

else {

zimp.setFrom_Date(startdate);

zimp.setTo_Date(enddate);

zimp.setFlag(

"D");

zimp.setVendor(wdContext.nodeIndustrykey().currentIndustrykeyElement().getLifnr());

wdContext.nodeImportorderspnr().bind(zimp);

zinp.setImportorderspnr(zimp);

wdContext.nodeZmf002_Select_Orders_Pnr_Input().bind(zinp);

wdThis.wdGetSelectOrdersPnrCustController().executeZmf002_Select_Orders_Pnr_Input();

wdThis.wdFirePlugToCumulativeService();

}

}

BACK BUTTON ON OUTPUT SCREEN

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

{

//@@begin onActionBack(ServerEvent)

wdContext.invalidate();

wdContext.clearSelection();

wdThis.wdFirePlugToAuctionServiceFeesInDateRange();

//@@end

}

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Oct 21, 2005 at 05:41 AM

    Hi Kamlesh,

    write these lines of code

    wdContext.nodeEnd().invalidate();

    wdContext.nodeStart().invalidate();

    inside the inbound plug method of the first view. i.e the inbound plug of the first view corresponding to the 'wdThis.wdFirePlugToAuctionServiceFeesInDateRange();' of the second view.

    Hope this helps,

    Best Regards,

    Nibu.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Kamlesh,

      You can pass this data from view1 to view2 through either data mapping or as plug parameters:

      1) For data mapping, create the same date nodes in the component controller & in the second view. Then you can mapp the values from the firstview to the secondview through the component controller.

      2) Define two parameters of type date in the outbound plug from view1 as well as in the inbound plug of view2. Now in the plug method of view1, set the corresponding values, which you can retrieve it in the inbound plug method of the second view.

      Hope this helps,

      Best Regards,

      Nibu.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.