Initialize all context values at one shot

Hi,
Is there a way i can initialize all the context values of a view. I mean when i click "Reset" all the values should be cleared at one shot instead of setting each value attribute to space.

Hi Aditya,
Whether you use wdContext.invalidate() or wdContext.reset(), all the elements of the entire context will be deleted and hence the table will be disbaled since it's datasource node has no elements. Each row of a table corresponds to an element in it's datasource node. If you create n elements for the node, those many rows will be enabled. So when you remove all the elements of the node, all the rows of the table will also be disbaled. So you have two options here:
1) After removing the elements, create as many of them as required with the default values.
2) Instead of removing the elments, explicitly access each attribute and set it's value to null or space. It will involve just a for loop:
IPrivate<View_name>.I<node_name>Element elmt;
for(int i=0;i<wdContext.node<node_name>().size();i++)
elmt = wdContext. node<node_name>().get<node_name>ElementAt(i);
elmt.set<parameter1>("");
elmt.set<parameter2>("");
Hope this helps,
Best Regards,
Nibu.
(Please take care to close your solved problem's threads by awarding appropriate points . If you haven't got a solution for your problems, please update the forum on their status. Kindly consider awarding points for helpful answers on SDN !)

Similar Messages

  • How to get all the values in one column of a JTable

    How to get all the values in one column of a JTable as a Collection of String.
    I don;t want to write a for loop to say getValueAt(row, 1) eg for 2nd column.

    I don;t want to write a for loop to say getValueAt(row, 1) eg for 2nd column. You could always write a custom TableModel that stores the data in the format you want it. It would probably be about 50 lines of code. Or you could write a loop in 3 lines of code. I'll let you decide which approach you want to take.

  • How to open All *.fmb files at one shot in Form Builder

    I have 20 *.fmb files i need to open all at one shot in form builder ......Please tell me how to do that
    Edited by: user10365515 on May 1, 2010 4:05 AM

    So, just go to that directory select that 20 files and double click or hit enter it will open in one form builder session.
    Note: You can not open from Form Builder.

  • How to close all background apps at one shot?

    Can any one answer this question??

    Read the article you linked to at whenwillapple.com... a more detailed explanation than I had seen anywhere else… thanks.
    @Parshwanath: So if you still want to close everything, it is possible from the hidden dock (double-click home button) to hold an icon until a _red_ 'X' appears next to each one, and then tap the 'X' to manually close it. You can't close them all at once, but you can quickly go down the row until you have them all. Of course you will have to once again open an app to have it appear in the hidden dock to be able to use 'fast app switching'.
    This technique is only useful if you really need to reclaim whatever little bit of memory a sleeping app occupies while waiting to be called up. I don't remember where I found this tip - just that it came from a discussion on how to free up memory, which, given the management built into iOS4, I didn't think was necessary, but I did find it helpful in making an older game behave properly on the occasions it became obstreperous. FWIW - this is on an original iPad (OS4.3.3) and I don't know if the iPad2 is different - don't think so.

  • All column value into one

    SELECT
    CONTROLLER_MODEL_NUMBER_1,
    SERIAL_NUMBER_1,
    CONTROLLER_MODEL_NUMBER_2,
    SERIAL_NUMBER_2,
    CONTROLLER_MODEL_NUMBER_3,
    SERIAL_NUMBER_3,
    CONTROLLER_MODEL_NUMBER_4,
    SERIAL_NUMBER_4,
    CONTROLLER_MODEL_NUMBER_5,
    SERIAL_NUMBER_5
    FROM controller
    I need to get above query as two columns as controller_model and serial_number all the controler_model_number_1 to 5 must come under controller_model similary serial_number as well
    I am currently using union to get into one but this is affecting the performance please suggest me an alternative way
    Thanks
    Sudhir

    Hi,
    Thank you so much this actually worked for me but only issue i found was not able add the cross join please check the below code
    Select
    distinct
    'Parature' "Source",
    NULL "Distibutor",
    reseller_name "Reseller",
    NULL "Reseller City",
    NULL "Reseller State",
    A.Country "Reseller Country",
    DECODE (a.state, 'APAC', 'APAC', 'EMEA', 'EMEA', NULL, 'Unknown', 'US' ) "Reseller Theater",
    NULL "Customer Name",
    NULL "Customer City",
    NULL "Customer State",
    NULL "Customer Country",
    NULL "Customer Theater",
    NULL "Sales Book Date",
    NULL "Ship Date",
    c.sales_order_number "Sales Order Number",
    C.Po_Number "PO Number",
    c.contract_id "Contract ID",
    product_name "Support Name",
    TO_DATE (c.contract_purchase_date) "Start Date",
    TO_DATE (c.contract_expiration_date) "Expire Date",
    NULL "Header Status",
    NULL "Line Status",
    NULL "Line Type",
    NULL "Termination Reason",
    Null "Location_id",
    Null "Product_id",
    DECODE(rn,1,controller_model_number_1,
    2,CONTROLLER_MODEL_NUMBER_2,
    3,CONTROLLER_MODEL_NUMBER_3,
    4,CONTROLLER_MODEL_NUMBER_4
    ) as CONTROLLER_MODEL_NUMBER
    ,DECODE(rn,1,TRIM (UPPER (serial_number_1)),
    2,TRIM (UPPER (serial_number_2)),
    3,TRIM (UPPER (serial_number_3)),
    4,TRIM (UPPER (serial_number_4))
    ) AS SERIAL_NUMBER
    From Edb_Assets C,
    Edb_Accounts A,
    (Select Rownum Rn From Dual Connect By Rownum <= 4)
    where C.Amid = A.Amid(+)
    AND (
    ( controller_model_number_1 != 'NULL'
    AND Serial_Number_1 != 'NULL'
    OR
    ( controller_model_number_2 != 'NULL'
    AND Serial_Number_2 != 'NULL'
    OR
    ( controller_model_number_3 != 'NULL'
    AND Serial_Number_3 != 'NULL'
    OR
    ( controller_model_number_4 != 'NULL'
    AND Serial_Number_4 != 'NULL'
    OR
    ( controller_model_number_5 != 'NULL'
    AND Serial_Number_5 != 'NULL'
    and c.sales_order_number = '1000179'
    order by c.sales_order_number
    The above query works perfect but one extra null row is getting populated because of not adding the cross join . Please help me in adding the cross join
    Thanks
    Sudhir

  • All Quarter values in One column!

    Hi Experts
      I have a column which calculates quarterly Q1,Q2,Q3 & Q4  using selections & on top selections, KF is calculated .
    Can you tell how can I display for Quarters in column & also the column must change according to quarter ..the user enter in the selection variable screen..
    Thanks
    BI Learner/

    Say it is like this..
    Period           Quarter
    01                   Q1
    02                   Q1
    03                  Q2
    04                  Q2
    05                  Q2
    06                  Q3
    07                   Q3
    08                  Q3
    09                  Q4
    10                   Q4
    11                   Q4
    12                   Q4
    It will accumulate the quarterly values for the period user enter to calculate next qtr forecast.
    Thanks

  • Fetch the characteristic of multiple  BATCHs in one shot

    Dear Expert,
    I am facing performance issue in custom report and on analysis i have found that this because of  calling the function module 'CLAF_CLASSIFICATION_OF_OBJECTS' in loop to get batch characteristics .
    Report is calling the function module  more than 60,000 to get batch characteristics.
    Is there any function module, BAPI or any class to get the all batch characteristics in one shot instead of calling individual batch .
    Thanks & Regards,
    Arun

    Directly fetch characteristic values from AUSP table instead of using FM in Loop.
    Thanks,
    Anmol.

  • Greying out multiple fileds in one shot?

    Hello,
    I am developing a interactive form (visitor info form) with webdynpro ABAP.
    In the initial screen of my_webdynpro, there are couple of radio buttons, US, Europe, Asia.
    If user selects US radio button: I have to greyout & readOnly the below 4 input text fields (pls. note these input fields are SCATTERED all around the FORM at different positions, subforms, pages, corners)
    VISITOR.Page_1.Subform_1.TextField_4.fillColor = "192,192,192"
    VISITOR.Page_1.Subform_6.TextField_17.fillColor = "192,192,192"
    VISITOR.Page_4.Subform_13.TextField_24.fillColor = "192,192,192"
    VISITOR.Page_5.Subform_21.TextField_31.fillColor = "192,192,192"
    If user selects Europe radio button: I have to greyout & readOnly the below 3 input text fields
    VISITOR.Page_2.Subform_23.TextField_21.fillColor = "192,192,192"
    VISITOR.Page_4.Subform_35.TextField_37.fillColor = "192,192,192"
    VISITOR.Page_5.Subform_39.TextField_41.fillColor = "192,192,192"
    I can achive my requirement, by writing the below code at input text field LEVEL
    if (this.rawValue == "US")
    then
    VISITOR.Page_1.Subform_1.TextField_4.fillColor = "192,192,192"
    endif
    As its tediuos, code redennecy, I want to do all US stuff (greying out all 4 fields) IN ONE SHOT, pls let me know is there any option for me, i guess GROUPing will not work for me?
    Thank you

    Hi,
    First of all, instead of greying out the fields, you could make them Read Only in this way..
    TextField1.access = "readOnly";
    To make them editable again, you could use
    TextField1.access = "open";
    As for your current problem, I think there is some amount of code that has to be repeated..
    But I have small solution in mind. Maybe it would be useful.
    1) Create 3 hidden text fields - one each for the radio button value.. (US, Europe, Asia etc)
    2) As soon as the radio button is selected, set the corresponding hidden text field to readOnly or open accordingly..
    3) In each of the text fields's 'Calculate' event , write the following script.
    this.access = Hiddenfield_US.access;
    Regards, Amith

  • Hide views in MM01 for all material type in one time

    Hi,
    I have a requirement to hide the views for all material type at at time.
    i tried with OMS2 , it is allowing me to do for one matrial type.
    could any one tell me how to hide the views for all material type in one short.
    Thanks in adv..

    Hi Rakesh,
    Up to my knowledge it is not possible to do view setting for all material type in one shot simply because it is material type dependent.
    If trying to change fields in material master then use OMS9. This also material type linked to field reference group. And we can change the setting of field selection group in one shot. This will affect the material types linked to it.
    Hope it helps
    sBk

  • Deletion in one shot.

    Hi Guys,
    i hava requirement after a condtion check ...if it becomes true ..i have to delete all the rows from that table.
    can any body suggest me the statement which do this..
    i got syntax from documentation like this.
    To DELETE all the lines..
    where condition must use a itab which is empty..
    then u r able to delete all the lines in one shot..
    But i need a simple soltuion.
    any body help me plz.
    i appreciate ur help in advance.

    strange....
    read this...
    DELETE dbtab - cond
    Syntax
    ... WHERE sql_cond.
    Effect
    The WHERE addition uses a logical expression sql_cond to specify which rows in the database table are deleted. The same applies to the logical expression sql_cond as for the WHERE condition of the SELECT statement. If there is no row in the database that satisfies the WHERE condition, no row is deleted and sy-subrc is set to 4. <b>If no WHERE condition is specified, all rows are deleted.</b>
    Note
    As of Release 6.10, specifying the WHERE condition is optional. Prior to Release 6.10, you had to specify the WHERE condition in this variant of the DELETE statement and you could not use dynamic logical expressions.

  • How to pass all values from one node element to created node element?

    Hi
    I have model node element under which there are 7 values, and I've created value node element and trying to pass the values from the model node Element to this value node element. But instead of passing all the values its listing only one value.
    How do we rectify this problem!!!
    Thanks in Advance
    Srikant

    Hi Anil
    I've created the node named: TableNode
    and the name of the node from which i want to get the data is : Li_Required_Node
    the Node Structure is
    Context
      |_ Zs_Quantity_Input
         |_Output
           |_Node_Required_Node
              |_Schddt
      |_TableNode
        |_CmpDate
    The Schddt has some 7 values
    The code Snippet is as follows:
    IPublicPricesComp.ITableNodeElement nodeElement;
    IPublicPricesComp.ILi_Required_NodeElement scheduleElement;
    int counter3Max = wdContext.ILi_Required_Node().size();
    for( int counter3= 0 ; counter3 < counter3Max ;counter3++ )
    nodeElement = wdContext.createTableNodeElement();
                             scheduleElement = wdContext.nodeZs_Quantity_Input().nodeOutput_Contract_Qty().nodeLi_Required_Node().getLi_Required_NodeElementAt(counter3);
    nodeElement.setCmpDate(scheduleElement.getSchddt());
    wdContext.nodeTableNode().addElement(nodeElement);               
    On writing the above code and then binding the node to a table column only one value getting displayed
    Where can be the error?
    Thanks in Advance
    Srikant

  • Get All the values of a List Row in one call?

    I am using workflow 2013 from SharePoint Designer for SharePoint online
    I need to get all the values of a row in a list. Is there a way to do this in one call from SharePoint farm to the Workflow Manager?
    Thanks
    Farida

    Hi,
    According to your post, my understanding is that you wanted to get the values of a item in a list using the SharePoint Designer.
    We can use the “Call HTTP Web Service” action to achieve it.
    I had create a sample workflow to get the first row of a list as below, you can have a look at it.
    Note: I had a custom column called “CSing”.
    Result:
    For more information:http://sergeluca.wordpress.com/2013/04/09/calling-the-sharepoint-2013-rest-api-from-a-sharepoint-designer-workflow/
    Thanks,
    Jason
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Jason Guo
    TechNet Community Support

  • Close all the open Application in one-shot ?

    Is there are any way to close all the open application in one shot in ipad rather than double-click the home button and close the apps one by one.

    In principle, I agree with you...
    But it appears that reality is not perfect. I observed on iPhone 3 that memory could be pretty clogged from time to time and I needed to restart it to free up memory and get it back to original speed again. It all depends on which apps you are running. Some appears to eat more memory than others. On iPhone 4, it appears to be less of a problem and I have seen that later iOS releases also makes this less of a problem. I only have a first generation iPad, but I have seen that later iOS releases have improved memory handling significantly there as well. However, it appears to be a good idea to reboot the device after a week or two just to flush the memory. I can't prove this theory scientifically, but I do see a difference in memory usage when doing this.
    The reason I actually tried "Process Killer" was a tip that it addressed the problems many of us encountered with the first iOS 5 release: frequent crashes and slow performance. After the pretty quickly released iOS 5 update, that wes pretty much solved, but occasionally killing processes actually helped me at that point, It made both my devices more stable.
    The original question was about battery performance, there I don't think that the amount of processes running is the key. A much better way of getting more out of your battery is shutting off location services in apps where they are not really needed. I would guess that turning off push notofications for as many apps as possible helps as well.
    Also, turn off the Personal Hotspot on iPhone when it's not needed!

  • Delete all rows on VO at one shot

    Hi,
    I have a VO based on an EO. Now once I get a VO I could see that there are 2 methods:
    1. removeCurrentRow()
    2. remove()
    removeCurrentRow() would delete the current row and also the related row of the table associated with the EO.
    Is remove() the methods to remove all the rows linked to the VO or is there any other method. what does remove() do if not deleting the rows at one shot.
    Thanks,
    Kalyan.

    <p>
    Use this method in your Application Module:
    </p>
    <p>
    <strong><font face="courier new,courier" size="2">public void removeAllRows(){</font></strong>
    </p>
    <p>
    <strong><font face="courier new,courier" size="2">   ViewObject vo = getYourViewObject();</font></strong>
    </p>
    <p>
    <strong><font face="courier new,courier" size="2">   vo.executeQuery();</font></strong>
    </p>
    <p>
    <strong><font face="courier new,courier" size="2">   while(vo.hasNext()){</font></strong>
    </p>
    <p>
    <strong><font face="courier new,courier" size="2">       Row r = vo.next();</font></strong>
    </p>
    <p>
    <strong><font face="courier new,courier" size="2">       r.remove();
    </font></strong>
    </p>
    <p>
    <strong><font face="courier new,courier" size="2">   } </font></strong>
    </p>
    <p>
    <strong><font face="courier new,courier" size="2">   getDBTransaction().commit;
    </font></strong>
    </p>
    <p>
    <strong><font face="courier new,courier" size="2">}</font></strong>
    </p>
    <p>
    Kuba
    </p>

  • How to get value from one context node to otehr contect conde in diff views

    Hello Guru's
    We have a rek which is of getting the value from one context node to other context node,
    for example there is Total value in BT111H_OPPT/ITEMLIST (One context node) we need to have the same Total value in the in BT111H_OPPT/DETAILS (other context node) automatically
    Inputs are highly appricated.......

    Hello,
    Thanks for your Reply
    But my rek is i want to get value from different views
    eg BT111H_oppt/itemslist(contex node - BTADMINI) field net value to BT111h_opp/Details(Context node - BTopporth)
    for this which method should i use to chive this.
    Thanks..

Maybe you are looking for