How to initialize wdContext?

Hi Everybody,
I am trying to build a basic adobe interactive form in web dynpro for java in nwds.
I created component, window, view and then inserted interactive form as child in view.
then I created the context for the view and then fill the form with the elements of the view.
And finally I created action for form submition.
My problem is when I try to implement the action with the following code snippet, I am getting the error called <b>wdContext might not initialize.</b>
Code:
String name = <b>wdContext</b>.currentTraveDataElement().getEmployeeName();
String costcenter = wdContext.currentTraveDataElement().getCostCenter();
String city = wdContext.currentTraveDataElement().getDestinationCity();
String country =
wdContext.currentTraveDataElement().getDestinationCountry();
wdThis.wdGetAPI().getComponent().getMessageManager().reportSuccess(
"Form submitted: Name="
+ name
+ " costcenter="
+ costcenter
+ " city="
+ city
+ " country="
+ country);
Please help me out.
Thanks in advance,
regards,
Suresh.

Is the cardinality of the node is 1:1  ?
Try displaying any valueattribute in some other testnode which is not binded to interactive form ..
set some value in wdInit()
and print after a button click.
Try to test whether u r able to get value...
or,,
Map the node to component controller ..
after the buttonclick
try to retrive the component controller element and print it...
Cheers
Swathi
Do offer pts:-)

Similar Messages

  • How to initialize a Type Object??

    Hi,
    I have a procedure as below, which has type t_r_rep_data and a table having this type as record, but when I called this procedure, it has ORA-06530 error: Reference to uninitialized composite. Can you tell me how to initialize a type Object?
    Also, is it this the right way to insert a type record into the table, or can I just just INSERT statement?
    Many thanks
    PROCEDURE add_row
    ( in_row_type_ind CHAR,
    in_ordering VARCHAR2
    ,in_record_type VARCHAR2
    ,in_level1_value VARCHAR2
    ,in_level1_description VARCHAR2
    ,in_level2_value VARCHAR2
    ,in_level2_description VARCHAR2
    ,in_level3_value VARCHAR2
    ,in_level3_description VARCHAR2
    ,in_level4_value VARCHAR2
    ,in_level4_description VARCHAR2
    ,in_amount_as_of_date1 NUMBER
    ,in_amount_as_of_date2 NUMBER
    ,io_table IN OUT t_ntr_rep_data
    IS
    l_row_count NUMBER;
    l_row t_r_rep_data;
    BEGIN
    -- ??? not sure where and how to do the initialization bit
    l_row.row_type_ind := NULL;
    l_row.ordering := NULL;
    l_row.record_type := NULL;
    l_row.level1_value := NULL;
    l_row.level1_description := NULL;
    l_row.level2_value := NULL;
    l_row.level2_description := NULL;
    l_row.level3_value := NULL;
    l_row.level3_description := NULL;
    l_row.level4_value := NULL;
    l_row.level4_description := NULL;
    l_row.amount_as_of_date1 := 0;
    l_row.amount_as_of_date2 := 0;
    SELECT COUNT(*)
    INTO l_row_count
    FROM (TABLE(CAST(io_table AS t_ntr_rep_data)));
    l_row.row_type_ind := in_row_type_ind;
    l_row.ordering := in_ordering;
    l_row.record_type := in_record_type;
    l_row.level1_value := in_level1_value;
    l_row.level1_description := in_level1_description;
    l_row.level2_value := in_level2_value;
    l_row.level2_description := in_level2_description;
    l_row.level3_value := in_level3_value;
    l_row.level3_description := in_level3_description;
    l_row.level4_value := in_level4_value;
    l_row.level4_description := in_level4_description;
    l_row.amount_as_of_date1 := in_amount_as_of_date1;
    l_row.amount_as_of_date2 := in_amount_as_of_date2;
    io_table(l_row_count+1) := l_row;
    END;
    --------------------------------------------------

    Simply write a stud which queries the Oracle Dictionary tables which will return Object Type
    Based on the object_name and User_name

  • How to Initialize a workflow from Application using CIS

    Hi,
    I am new to the (Stellent) UCM, And could not find a way to initialize a workflow from CIS, Someone's help is greatly appreciated.
    All i can find in forums about the workflow with in the Stellent Interface. But No one talking about how to initialize or call a workflow and use it from the application perspective.
    Your help is greatly appreciated.
    Thanks In Advance.

    CIS is one of the UCM Java API sets that you can use to connect WCI with the content server - it is on the WCI side of the fence, technically, but help can be found all over.
    If you call the checkin service - typically I use CHECKIN_UNIVERSAL, which is also the service that gets invoked by the ISCSDocumentCheckinAPI checkinFileStream(...) service. If the metadata matches something that triggers the workflow, you will have an item in the workflow queue.
    Be warned - from what I understand, the CPS portlets used a checkin API that does not trigger workflow, even if there is a matching criteria.

  • H:inputText ; How To initialize value Property from back/bean method?

    Hello Guys at Sun Forums.
    I am a newbie at using JSF. and I'm having a bit of a Problem.
    I don't know how to initialize the value property of a h:inputText from a method inside a backing bean that returns a String data type.
    My Method inside the Backing bean is this:
    public String getLastDate()
            Connection con = null;
            Statement stmt = null;
            ResultSet rs = null;
            Date DateCapt = null;
            String DateConv= null;
            try{
                Class.forName("com.sybase.jdbc2.jdbc.SybDrive").newInstance();
                con = DriverManager.getConnection("jdbc:sybase:Tds:localhost/BAN_PRO_SNP", "xxxx", "xxxx");
                if(!con.isClosed()){
                    stmt = con.createStatement();
                    stmt.executeQuery ("SELECT TOP 1 CONVERT(VARCHAR(10), fec_parametro, 103) fec_parametro FROM snp_sei_parametros" +
                    "     WHERE cod_parametro = 'FECHA'" +
                    "     ORDER BY fec_parametro DESC");
                    rs = stmt.getResultSet();
                    while (rs.next())
                                DateCapt = rs.getDate("fec_parametro");
                rs.close();  
                stmt.close(); 
            catch (Exception ex)
                        System.out.println("COULD NOT LOAD THE DRIVER!!!!");
                        System.out.println(ex);
                    DateConv = String.valueOf(DateCapt).toString();
        return DateConv;
    }As you can see the Method returns a String data type, and all I want to know is how put that returned String as the initial value of a h:inputText. when the jsf-jsp page loads.
    Please Help Me.

    You should be able to do
       <h:inputText value="#{bean.lastDate}"/>Where 'bean' is the managed bean name containing
    the method getLastDate().
    When the view is rendered, the getter (getLastDate())
    will be called to display whatever value is returned.

  • How to initialize an adf component before a page loads

    Hi all
    I use JDeveloper 11.1.2.2.0
    I have two pages:
    first page has a link to a second page
    <af:document title="first.jspx" id="d1">
      <af:form id="f1">
        <af:commandLink text="Page 2" id="cl1" action="goToSecondPage" actionListener="#{Bean.handleLinkActionEvent}"/>
      </af:form>
    </af:document>and the second page has an inputText component:
    <af:document title="second.jspx" id="d1">
      <af:form id="f1">
        <af:inputText label="Text" id="it1" binding="#{Bean.inputText}" readOnly="true"/>
      </af:form>
    </af:document>First I load first.jspx and than I click the link. This event is handled in handleLinkActionEvent() method, in which I want to set a value to the inputText component of the second page. But I can't do it, because as expected I get NullPointerException.
    So the question is how to initialize an adf component before a page loads?
    Evgeny Michuk
    Edited by: Evgeny Michuk on Oct 4, 2012 11:30 PM

    Thanks a lot for your replies and links, it gives me some new knowledges.
    I got your approach and achieved the aim for the described situation with tag <f:setPropertyActionListener>:
    <af:commandLink text="Page 2" id="cl1" action="goToSecondPage"
                           actionListener="#{Bean.handleLinkActionEvent}" binding="#{Bean.firstPageLink}">
      <f:setPropertyActionListener target="#{pageFlowScope.text}" value="Hello, World!"/>
    </af:commandLink>and for the inputText component I set the value:
    <af:inputText label="Text" id="it1"  binding="#{Bean.inputText}"
                                  readOnly="true" value="#{pageFlowScope.text}"/>I used request scoped managed bean and it is shared for both pages.
    I understand that I can set a value of some attribute for managed bean
    and use it to set a value for inputText component of the second page,
    but as I understand it is almost the same way as usage of tag <f:setPropertyActionListener>.
    In my real situation on the second page I have a dynamic table, and it's field is read only.
    Structure of this table depends on a link clicked on the first page.
    So I define components for table columns in runtime, it may be outputText, inputDate, goLink and some others.
    And I have to get table through the UIComponent binding to set columns.
    Certainly I can define all needed components for all columns
    and render it according to the column types
    <af:table value="#{Bean.collectionModel}" var="row" id="t1" binding="#{Bean.mainTable}">
       <af:forEach items="#{Bean.columnDescriptionList}" var="column">
          <af:column headerText="#{column.caption}" id="c1">
             <af:outputText value="#{row[column.fieldName]}" id="ot1" rendered="#{column.type == '1'}"/>
             <af:inputDate value="#{row[column.fieldName]}" id="ot2" rendered="#{column.type == '2'}"/>
             <af:selectBooleanCheckbox id="sbc1" selected="#{row[column.fieldName] == '1'}" rendered="#{column.type == 'n'}"/>
          </af:column>
       </af:forEach>
    </af:table>but I think it is not very good.
    Have you any idea?
    P.S. I hope I clearly explained my situation =)
    Evgeny Michuk

  • How to initialize the jndi context?

    Hello!
    install the j2ee sdk 1.4 on a server that has the ip address 211.83.144.48.
    then I deploy a EJB ,but I want to call the method from another pc.
    The problem is that how I initialize the jndi context? How can get the url for "Context.PROVIDER_URL"?
    thks.

    You need to look document of the application server that u are using.
    Because this depends on application servers.

  • How to initialize the array of hashmap???

    how to initialize the array of hashmap??

    What do you mean by "the array of hashmap"?

  • How to initialize the Sample app in Planning 11.1.2.2

    Hi,
    After creating the sample application in Planning 11.1.2.2, how to initialize it.

    log into the application, Administration > Application > Manage applications
    Select the application, click Action > Initialization.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • How to initialize the new internal hard disk in LapTop ?

    Folks,
    Hello.
    My LapTop model is HP Pavilion dv4-2045dx entertainment notebook whose host operating system is Windows 7.
    Because the current hard disk capacity is not enough, I need to replace it with a new hard disk with bigger capacity.
    After take out the old hard disk and install "750 GB 7200 rpm Western Digital Scorpio Black 9 mm internal hard drive" into my LapTop, how to initialize the new hard disk ? What is the host Operating System for the new hard disk ?

    Please see the answer in your other thread.
    Which external hard drive supports Oracle Linux 5 on top of VMPlayer ?

  • How to initialize Button Array at "declaration"?

    How to initialize Button Array at "declaration"?
    Button[] b = new Button[2];
    b[0] = "label" ?
    b[1] = "label" ?
    Again,please at declaration not using setText within main program.

    main...
    Button[] btts = {new Button(...),new Button(...), ...)
    that shold be it
                                                                                                                                                                                   

  • How to initialize variable? (ArrayList String [])

    How to initialize this variable correctly, without getting a type safety warning?
    ArrayList<String>[] var = ?
    Thanks & Best regards,
    Kristian
    Message was edited by:
    Kriskra

    I need to use an array in this case... Thanks for
    your advice anyway...And the answer still is arrays and generics don't mix so your request is impossible without ignoring the warning.
    Try@SuppressWarnings("unchecked")
    ArrayList<String>[] var = new ArrayList[10];

  • How to initialize a field-symbols?

    I have field-symbols structure <wa1>, <wa2>.
    1. Supposed <wa1> has been assined value already, how can I copy content of <wa1> to <wa2>?
    2. How to initialize <wa2>?
    Thanks!

    Hi,
    Check this example..
    field-symbols: <fs1>, <fs2>.
    data: v_var1(10), v_var2(10).
    v_var1 = 'ABC'.
    v_var2 = 'DEF'.
    assign v_var1 to <fs1>.
    assign v_var2 to <fs2>.
    write: / 'BEFORE...'.
    write: / '<FS1> - ', <FS1>.
    write: / '<FS2> - ', <FS2>.
    <FS1> = <FS2>.
    write: / 'AFTER...'.
    write: / '<FS1> - ', <FS1>.
    write: / '<FS2> - ', <FS2>.
    CLEAR: <FS2>.
    write: / 'AFTER CLEAR...'.
    write: / '<FS1> - ', <FS1>.
    write: / '<FS2> - ', <FS2>.
    Thanks,
    Naren

  • How to initialize delta for a new data target

    Hi
    I have an ODS from which there are several other targets getting updated thru an export datasource. The delta initialization happend some 6 months back. I now have a new ODS into which i need to load the data from the original  ODS. How can i initialise the delta to my new target without changing the delta initialization of the other targets and continue the delta for all of them together?
    can i use the same initialization for my new target??
    If i do a full update and then a initialise w/o data transfer, will the further delta bring the data from the correct point, is there a possiblity of data loss??
    Regards,
    Sujai

    Hi Ajay,
    the steps are as follows.
    1 delete the initialization. open infopackage >> menu scheduler >> Initialization options for source systems >> delete the request thats there.
    2. Now go to the Update tab of the infopack >> select option Initialize Delta process >> check the option initialize without Data transfer
    3. Goto Schedule tab and start the job.
    here the data targets will be all the targets the infopack loads.
    4. Create a new infopack
    5. goto Data targets tab >> select data targets >> put a check on your new ODS/Cube
    6. Goto Update tab >> select the option Full update
    7. goto menu Scheduler >> select Repair full request >> put a check on Indicate request as Repair Request >> hit OK
    8. Goto schedule tab >> start the job.
    9. Continue with the existing Delta infopack that was load the old ODS/Cubes  and make sure your new ODS/Cube is also cheked for the delta.
    Regards
    Sujai

  • How to Initialize Container Element in BPM..No Payload found

    Hi All,
    How do we initialize a container element in BPM if that container element is a message Interface.
    I am doing exception handling in BPM, so whenever a exception occurs i need to send a mail.
    So in the exception box i have a transformation step and a send step.
    In the transformation step what will be my source message?
    How do i initialize that source message?
    What i have done right now is created a dummy interface(abs) for source and then mapped with the target abs interface.
    When i execute the schenario,in the monitor i find in the Transformation step the following error
    <i>No payload found.</i>
    Regards,
    Sumit

    Hi Pinto,
    I too agreee. Lemme try to explain witha example.
    In my first transformation, MI_MAIL_TEMP_ABS is there along with 3 other interfaces. Each one is getting mapped i can see that in monitoring.
    Now in the exception branch in transformation step,
    i am mapping MI_MAIL_TEMP_ABS to MI_MAIL_ABS.
    Now in the send step im giving MI_MAIL_ABS as the interface name.
    Do you see anything wrong with this?
    <i>>>>>>>>Did you try to do outbound interface -> inbound interface mapping in the exception branch? Just to try to make your scenario work. Then you can investigate further on why the abs message is not being carried away.</i>
    Which outbound interface & inbound are you talking about?
    Regards,
    Sumit
    Message was edited by: Sumit Khetawat

  • How to initialize Datamining Model in process chain ?

    Hello all,
    I need to launch an APD for datamining analysis but i need to initialize the model before each data loading.
    The only way to initialize the model is to write an abap program ?
    No standard process, report or transaction to schedule this step using a process chain ?
    Thanks
    Christophe

    The solution is to use a specific ABAP program using the method RESET_MODEL_RESULTS
    You'll find BW-APD How to Reset a Data Mining Model" in the wiki
    Christophe

Maybe you are looking for

  • Application running slow in ver 1.5, 1.6 but not in 1.4

    We have a application that was running very slow when we used any version sun java instead of MS java in IE6 SP2. I removed MS Java from IE and installed Sun java 1.4.2_16 and the applications starts in under 10sec's. But we had to test the other ver

  • Osx 10.7.5 files wont upload

    My desktop files are grayed out and I cannot upload them.  How do I un-gray them?

  • HT1766 where can i see when the last back up occured on my iPhone?

    I know I can see the last back up that took place if I have my phone ... but is there a place to see when the last back up happened when I don't have access to my phone?

  • Tab folder problem

    Hi folks, We are dynamically building tab folders in a couple of windows and find that the vertical height of the folder is always much taller than each of the tabs within. It looks like the more tabs you add in, the taller the entire folder gets. Th

  • Migrating mobile home folders

    What would be the best way to permanently migrate a network user's home folder(and account information) to a laptop? Thanks