on 09-12-2007 3:34 PM
Hello Friends,
I am calling a bapi in wdmodifyview, and want what surprise me the data is not modifying even I used the node.invalidate after executing the bapi ?
Any idea what can be done more to refresh the node ?
Regards,
( if its helps I can paste my code here )...
okey, I debugged the application and I must say the node is refreshed, but the input field with f4 help did not refreshed,
So now let me talk in a bit details: Actually I have an input field with f4 help which shows various variant. The user deletes one variant, the control comes to my wdmodifyview, there I call again the bapi ( which deliver me the new records ) everything fine, but still the deleted variant is visible in input field ( which actually did not come back even after the bapi call ) so my question is how I can refresh the input field f4 help....
Regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
If I get it correctly, the user chooses a variant to be deleted from the value help of the input field. Then on some action you delete this variant, make a BAPI call and populate again.
Since it loads the same page again, because of the statefulness of WD, you see the selected variant still in the input field. If this is the case, you can simply set the text property of the input field UI element to empty string inside wdDoModifyView() like this:
//Do this after you have completed all the BAPI calls and everything...
IWDInputField fld = (IWDInputField) view.getElement("<id of input field>");
fld.setValue("");
Regards,
Satyajit.
Hi,
Ok so now the question is how have you built the value help? If it is a static DropDownByIndex then you have to delete the element at lead selection of the context node bound to the dropdown.
If the values come from the BAPI, then you will have to invalidate the context node bound to the dropdowns and then rebuild it again by adding the elements.
Regards,
Satyajit.
<b>
If the values come from the BAPI, then you will have to invalidate the context node bound to the dropdowns and then rebuild it again by adding the elements.</b>
This is what I am doing, my code for creating the input help is in wdmodifyview, and it call the bapi, and fill the f4 help, so next time same method executes, everything is newly created, bapi call fetch the new records, but it display the same old resutl....
if it help I can paste me code...
Regards,
Code of wdmodify:
//@@begin wdDoModifyView
view.resetView();
IWDAttributeInfo attribute_var = wdContext.getNodeInfo().getAttribute("varname");
ISimpleTypeModifiable fileName_var = attribute_var.getModifiableSimpleType();
Zport_Get_Variant_Input variant_input = new Zport_Get_Variant_Input();
wdContext.nodeZport_Get_Variant_Input().bind(variant_input);
try {
variant_input.setClient(WDClientUser.getCurrentUser().getSAPUser().getJobTitle());
variant_input.setPuser(WDClientUser.getCurrentUser().getSAPUser().getUniqueName().toUpperCase());
variant_input.setRpttype(wdContext.currentContextElement().getReportType() );
variant_input.setTabname(wdContext.currentContextElement().getFileName() );
wdContext.nodeZport_Get_Variant_Input().currentZport_Get_Variant_InputElement().modelObject().execute();
wdContext.nodeVartab().invalidate();
wdContext.nodeOutput_variant().invalidate();
} catch ( Exception e) {
}
fileName_var.setFieldLabel("varname");
IModifiableSimpleValueSet valueSet2 = fileName_var.getSVServices().getModifiableSimpleValueSet();
// IWDInputField fld = (IWDInputField) view.getElement("Variant");
// fld.setValue("");
for (int i = 0; i < wdContext.nodeVartab().size(); i++) {
valueSet2.put(wdContext.nodeVartab().getVartabElementAt(i).getVarname(), "Variant: " + wdContext.nodeVartab().getVartabElementAt(i).getVarname());
}
//valueSet2.sort(true, true , true);
if (firstTime)
{
if (wdContext.currentContextElement().getCSRflag().equalsIgnoreCase("X"))
{
IWDInputField clt = (IWDInputField) view.getElement("Client");
clt.setReadOnly(false);
}
}
//@@end
Regards,
User | Count |
---|---|
94 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.