Use selectItem to update inputtext value

I read through many posting in this forum regarding on how to use valuechangelistener in the selectonemenu tag to update an inputtext value through selectItem's value. Unfortunately, it didn't solve the problem I am facing.
In a form on my JSP page, I have a list of InputText and some which has validator. I have a selectonemenu that renders out when the validator see that the value of the inputtext box is not specific enough. And this selectonemenu will show up all possible value that it could be. By selecting the selectItem it will replace the value of the InputText box.
Possible solution was to push the valuechenageevent to happen in the UPDATE_MODEL_VALUES but the problem is when i submit the form, the lifecycle sees the validation error in the other InputText since i have not input anything in (if i did that) and will skip that phase, thus causing the value of the selectItem not able to replace the value of the inputtext box.
Another way i did was to add the immediate attribute in the selectonemenu, this does update the inputText however the value of the other inputtext i have previously input will disappear which I think it happend becuase using immediate attribute will skip UPDATE_MODEL_VALUES phase again.
I will descript the work flow of my JSP page.
1. the form will populate a list of InputText and I enter the value in
2. I will then hit the commandbutton which will trigger the validation
3. on one of the validator it will render out a selectonemenu
4. selectonemenu tag has valuechangelistener attribute which will update the inputtext value with the selectItem value which i have selected.
Here is my JSP.
<f:view>
<h:form >
<h:dataTable binding="#{myBean.table }" value="#{myBean.list}" var="bean" >
<h:column>
<h:inputText value="#{bean.input2 }" />
<h:inputText id="Value" required="true" validator="#{myBean.validateInput }" value="#{bean.input }">
<f:validateLength minimum="1" maximum="500"/>
</h:inputText>
<h:message for="Value"/>
<h:selectOneMenu valueChangeListener="#{myBean.processValueChange}" value="#{bean.input }" onchange="javascript:form.submit();" rendered="#{myBean.nameList != null}" >
<f:selectItems value="#{myBean.nameList}" />
</h:selectOneMenu>
</h:column>
</h:dataTable>
<h:commandButton value="add" action="#{myBean.add}" />
</h:form>
</f:view>
I am thinking of maybe having commandbutton to submit form using onclick but don't know how that works out exactly or having individual form for every index of the datatable column. But then again i don't know how it would react to the outter forum that includes the whole datatable.
Please can someone help me out and tell me how to overcome the problem when validator is in use for the InputText. I have been trying to figure this out for days!!!!

hey.. I've read your post a couple of times and can't understand what your trying to do.. could you leave out what you think you need to do and just write what you want it to do? that might be why noone has replied?!!?

Similar Messages

  • Access InputText Value in Declarative Component

    Hi,
    I have created a declarative component that contains an inputText component:
    <af:inputText label="#{attrs.ucitLabelText}" id="dc_it1" contentStyle="text-transform:uppercase;" converter="StringAsUppercase"/>
    When I use the declarative component on a page, is there any way to easily access the value of its inputText through the page backing bean? The declarative component is bound to the page, but what method can I use to access the inputText value?
    Thanks,
    Brad

    Thanks.
    I also figured out that I can simply do the following:
    When creating the declarative component...
    - Add an attribute to the declarative component (let's call it "inputValue")
    - Assign the inputValue attribute to the inputText value.
    When using the declarative component on a page...
    - Create a String property in the page's backing bean
    - Assign that property to the declarative component's inputValue attribute
    Then I can access the backing bean property to get the inputText value.
    Brad

  • Using DMA to update values in an array

    Good afternoon, 
    I've been running into a few problems with my vi, and I'd like to give a bit of the background information before I ask my questions. I'm using Labview 8.5 and the NI USB-6009 DAQ. I want to use an encoder to control values that are being written to a file for DMA. I found that I couldn't use the encoder as an external clock since the 6009 DAQ doesn't have this capability. So I've been trying to go a differenet route by using a case structure with a True/false statement to allow me to input values from a simulated signal into a write vi (each time the encoder pulses, a value from the simulated signal should be inputed into the write data storage vi). From there, I want to then read those values and put them into an array. So the plan is to have a 10 element array that reads in values from the storage file (just like in FIFO for FPGA). As I continue reading values, the oldest value of the 10 element array will leave the array and be replaced by a new value. 
     Now here come the questions, I'm using the Write/Read data storage vi's and I keep getting errors. First, if I'm wanting to use DMA to read these values am I using the correct vi's, or is there a different route? Also, once I read these values into the array how would I be able to constantly update the array in a descending order from begining to end of the stored values? 
    I'm posting my most recent vi that I've been editing. Also, in advance, thank you!
    -tjm
    Attachments:
    Using Encoder as an analog input 10_9_13 - Copy - Copy.vi ‏390 KB

    Thank you for your reply.
    First, I'm ultimately trying to use the array as input into a visual display for a meter (to display the mean of the array). I've been successful (in the past) with inputting into an array by not using DMA and using the Sort 1D Array point by point vi. The only problem is the timing mechanism with the encoder, and you are correct with stating that there is uncertainty with the encoder when trying to retrieve values from the input signal (sine wave). I thought about going down the route of using the encoder as a counter (since I am able to see the counter increase by a single digit with each pulse).
    My question would then be how to control the case structure with a counter input? 
    I'm posting both my setup with the Sort 1D Array Point by Point and the simple vi for the encoder as a counter. My idea is to try to merge the two and have the counter control the case structure. 
    Is there a way I can do this? 
    Attachments:
    Sort 1D Array Pt by Pt.vi ‏189 KB
    Using Encoder as a counter input 10_9_13.vi ‏123 KB

  • To update conditiontype values using change BAPI of sales order

    Hi Gurus,
    i am using the standard bapi 'BAPI_SALESORDER_CHANGE' and i am passing the values for the conditiontypes as follows.......
    vbeln is my sales order number..
    wa_conditions_in-itm_number = '00010'.
    wa_conditions_in-cond_count = '01'.
    wa_conditions_in-cond_type = 'ZCUS'.
    wa_conditions_in-applicatio = 'V'.
    wa_conditions_in-cond_value =  '1000.00'.
    wa_conditions_in-currency = 'INR'.
    wa_conditions_in-cond_p_unt = '1'.
    wa_conditions_inx-itm_number = '00010'.
    wa_conditions_inx-cond_count = '01'.
    wa_conditions_inx-cond_type = 'ZCUS'.
    wa_conditions_inx-updateflag = 'U'.
    wa_conditions_inx-cond_value = 'X'.
    wa_conditions_inx-currency = 'X'.
    wa_conditions_inx-cond_p_unt = 'X'.
        APPEND wa_conditions_in TO conditions_in.
        APPEND wa_conditions_inx TO conditions_inx.
    CLEAR : order_header_in, order_header_inx.
    order_header_in1-purch_no_c = 'Order'.
    order_header_inx1-purch_no_c = 'X'.
    order_header_in1-purch_no_s = 'Order'.
    order_header_inx1-purch_no_s = 'X'.
    order_header_inx1-updateflag = 'U'.
    CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
      EXPORTING
        salesdocument               = vbeln
        order_header_in             = order_header_in1
        order_header_inx            = order_header_inx1
      SIMULATION                  =
      BEHAVE_WHEN_ERROR           = ' '
      INT_NUMBER_ASSIGNMENT       = ' '
      LOGIC_SWITCH                =
      TABLES
        return                      = return
       conditions_in               = conditions_in
       conditions_inx              = conditions_inx
      EXTENSIONIN                 =
    while executing in the order it is not updating the value for the condition type 'ZCUS' and it is inserting as new record.
    Please help me in this regard.
    Thanks & Regards,
    R.P.Sastry

    HI,
    Take the below sample code. for example and try to use like that.
    REPORT ZTEST_BAPI .
    Data: salesd like BAPIVBELN-VBELN.
    data: it_BAPISDH1 type BAPISDH1.
    data: it_BAPISDH1X type BAPISDH1X.
    data: it_BAPIPARNR type BAPIPARNR occurs 0 with header line.
    data: it_BAPIRET2 type BAPIRET2 occurs 0 with header line.
    data: it_BAPIPARNRC type BAPIPARNRC occurs 0 with header line.
    data: it_BAPISDITMX type BAPISDITMX occurs 0 with header line.
    data: it_BAPISDITM type standard table of BAPISDITM with header line.
    constants: c_bp(2) type c value 'BP'.
    it_BAPISDH1X-UPDATEFLAG = 'U'.
    it_BAPISDH1X-SALES_ORG = 'X'.
    it_BAPISDH1X-DISTR_CHAN = 'X'.
    it_BAPISDH1X-DIVISION = 'X'.
    it_BAPISDH1X-PURCH_NO_C = 'X'.
    it_BAPISDH1X-CUST_GROUP = 'X'.
    it_BAPISDH1-SALES_ORG = '1000'.
    it_BAPISDH1-DISTR_CHAN = '01'.
    it_BAPISDH1-DIVISION = '00'.
    it_BAPISDH1-PURCH_NO_C = 'Test1'.
    it_BAPIPARNR-PARTN_ROLE = 'RE'.
    it_BAPIPARNR-PARTN_NUMB = '0000000171'.
    it_BAPIPARNR-ITM_NUMBER = '00000'.
    append it_BAPIPARNR.
    it_BAPIPARNR-PARTN_ROLE = 'RE'.
    it_BAPIPARNR-PARTN_NUMB = '0000000179'.
    it_BAPIPARNR-ITM_NUMBER = '000000'.
    append it_BAPIPARNR.
    it_BAPIPARNRC-DOCUMENT = '000000375'.
    it_BAPIPARNRC-ITM_NUMBER = '000000'.
    it_BAPIPARNRC-UPDATEFLAG = 'U'.
    it_BAPIPARNRC-PARTN_ROLE = 'WE'.
    it_BAPIPARNRC-P_NUMB_OLD = '0000000171'.
    it_BAPIPARNRC-P_NUMB_NEW = '0000000179'.
    it_BAPIPARNRC-ADDRESS = '26324'.
    it_BAPIPARNRC-ADDR_LINK = '0000000003'.
    it_BAPIPARNRC-REFOBJTYPE = 'BUS2032'.
    it_BAPIPARNRC-REFOBJKEY = '000000375'.
    append it_BAPIPARNRC.
    data PARTNERADDRESSES like BAPIADDR1 occurs 0 with header line.
    PARTNERADDRESSES-ADDR_NO = '0000000003'.
    PARTNERADDRESSES-NAME = 'Test Cust'.
    PARTNERADDRESSES-STREET = '222nd AVE'.
    PARTNERADDRESSES-NAME_2 = 'NEW Bldg A2'.
    PARTNERADDRESSES-CITY = 'MILPITAS'.
    PARTNERADDRESSES-REGION = 'CA'.
    PARTNERADDRESSES-POSTL_COD1 = '950351'.
    PARTNERADDRESSES-COUNTRY = 'IN'.
    PARTNERADDRESSES-LANGU = 'E'.
    APPEND PARTNERADDRESSES. CLEAR PARTNERADDRESSES.
    it_BAPISDITMX-ITM_NUMBER = '00010'.
    it_BAPISDITMX-UPDATEFLAG = 'U'.
    it_BAPISDITMX-MATERIAL = 'X'.
    it_BAPISDITMX-CUST_GROUP = 'X'.
    append it_BAPISDITMX.
    it_BAPISDITM-ITM_NUMBER = '00010'.
    it_BAPISDITM-MATERIAL = '946'.
    append it_BAPISDITM.
    break-point.
    salesd = '0000000375'.
    call function 'BAPI_SALESORDER_CHANGE'
    exporting
    salesdocument = salesd
    ORDER_HEADER_IN = it_BAPISDH1
    order_header_inx = it_BAPISDH1X
    SIMULATION =
    BEHAVE_WHEN_ERROR = ' '
    INT_NUMBER_ASSIGNMENT = ' '
    LOGIC_SWITCH =
    tables
    ORDER_ITEM_IN = it_BAPISDITM
    ORDER_ITEM_INX = it_BAPISDITMX
    PARTNERS = it_BAPIPARNR
    return = it_BAPIRET2
    PARTNERCHANGES = it_BAPIPARNRC
    PARTNERADDRESSES = PARTNERADDRESSES
    ORDER_CFGS_REF =
    ORDER_CFGS_INST =
    ORDER_CFGS_PART_OF =
    ORDER_CFGS_VALUE =
    ORDER_CFGS_BLOB =
    ORDER_CFGS_VK =
    ORDER_CFGS_REFINST =
    SCHEDULE_LINES =
    SCHEDULE_LINESX =
    ORDER_TEXT =
    ORDER_KEYS =
    CONDITIONS_IN =
    CONDITIONS_INX =
    EXTENSIONIN =
    If sy-subrc = 0. CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
    WAIT =
    IMPORTING
    RETURN =
    . endif.
    You need to sepaeately use the *Update* and *Change*  and *Insert* flags while filling the data
    Thanks!
    Edited by: Mr. M on Jan 9, 2009 6:23 PM

  • How to update field values in a database table using module pool prg?

    hi
    how to update field values in a database table using module pool prg?
    we created a customized table, and we put 2 push buttons in screen painter update and display.
    but update is not working?
    data is enter into screen fields and to internal table, but it is not updated in database table.
    thanks in adv
    vidya

    HI,
    we already used the update statement. but its not working.
    plz check this.
    *& Module Pool       ZCUST_CALL_REC
    PROGRAM  ZCUST_CALL_REC.
    TABLES: ZCUST_CALL_REC,ZREMARKS.
    data:  v_kun_low like ZCUST_CALL_REC-kunnr ,
           v_kun_high like ZCUST_CALL_REC-kunnr,
           v_bud_low like ZCUST_CALL_REC-budat,
           v_bud_high like ZCUST_CALL_REC-budat.
    ranges r_kunnr for ZCUST_CALL_REC-kunnr  .
    ranges r_budat for zcust_call_rec-budat.
    DATA: ITAB TYPE STANDARD TABLE OF ZCUST_CALL_REC WITH HEADER LINE,
          JTAB TYPE STANDARD TABLE OF ZREMARKS WITH HEADER LINE.
    *data:begin of itab occurs 0,
        MANDT LIKE ZCUST_CALL_REC-MANDT,
        kunnr like ZCUST_CALL_REC-kunnr,
        budat like ZCUST_CALL_REC-budat,
        code like ZCUST_CALL_REC-code,
        remarks like ZCUST_CALL_REC-remarks,
        end of itab.
    *data:begin of Jtab occurs 0,
        MANDT LIKE ZCUST_CALL_REC-MANDT,
        kunnr like ZCUST_CALL_REC-kunnr,
        budat like ZCUST_CALL_REC-budat,
        code like ZCUST_CALL_REC-code,
        remarks like ZCUST_CALL_REC-remarks,
        end of Jtab.
    CONTROLS:vcontrol TYPE TABLEVIEW USING SCREEN '9001'.
    CONTROLS:vcontrol1 TYPE TABLEVIEW USING SCREEN '9002'.
    *start-of-selection.
    *&      Module  USER_COMMAND_9000  INPUT
          text
    MODULE USER_COMMAND_9000 INPUT.
    CASE sy-ucomm.
    WHEN 'BACK' OR 'EXIT' OR 'CANCEL'.
    SET SCREEN 0.
    LEAVE SCREEN.
    CLEAR sy-ucomm.
    WHEN 'ENQUIRY'.
    perform multiple_selection.
    perform append_CUSTOMER_code.
    PERFORM SELECT_DATA.
    call screen '9001'.
    WHEN 'UPDATE'.
          perform append_CUSTOMER_code.
          PERFORM SELECT_DATA.
          call screen '9002'.
          perform update on commit.
    WHEN 'DELETE'.
          perform append_CUSTOMER_code.
          PERFORM SELECT_DATA.
          call screen '9002'.
    ENDCASE.
    ENDMODULE.                 " USER_COMMAND_9000  INPUT
    *&      Module  STATUS_9000  OUTPUT
          text
    MODULE STATUS_9000 OUTPUT.
      SET PF-STATUS 'ZCUSTOMER'.
    SET TITLEBAR 'xxx'.
    ENDMODULE.                 " STATUS_9000  OUTPUT
    *&      Module  USER_COMMAND_9001  INPUT
          text
    MODULE USER_COMMAND_9001 INPUT.
    CASE sy-ucomm.
    WHEN 'BACK' OR 'EXIT' OR 'CANCEL'.
    SET SCREEN 0.
    LEAVE SCREEN.
    CLEAR sy-ucomm.
    endcase.
    ENDMODULE.                 " USER_COMMAND_9001  INPUT
    *&      Module  STATUS_9001  OUTPUT
          text
    MODULE STATUS_9001 OUTPUT.
      SET PF-STATUS 'ZCUSTOMER'.
    SET TITLEBAR 'xxx'.
    move itab-MANDT   to zcust_call_rec-MANDT.
    move itab-kunnr   to zcust_call_rec-kunnr.
    move itab-budat   to zcust_call_rec-budat.
    move itab-code    to zcust_call_rec-code.
    move itab-remarks to zcust_call_rec-remarks.
    vcontrol-lines = sy-dbcnt.
    ENDMODULE.                 " STATUS_9001  OUTPUT
    *&      Module  USER_COMMAND_9002  INPUT
          text
    module  USER_COMMAND_9002 input.
    CASE sy-ucomm.
       WHEN 'BACK' OR 'EXIT' OR 'CANCEL'.
          SET SCREEN 0.
          LEAVE SCREEN.
          CLEAR sy-ucomm.
       WHEN 'UPDATE'.
             perform move_data.
         UPDATE ZCUST_CALL_REC FROM TABLE ITAB.
            IF SY-SUBRC = 0.
               MESSAGE I000(0) WITH 'RECORDS ARE UPDATED'.
             ELSE.
               MESSAGE E001(0) WITH 'RECORDS ARE NOT UPDATED'.
            ENDIF.
      WHEN 'DELETE'.
             perform move_data.
             DELETE ZCUST_CALL_REC FROM TABLE ITAB.
              IF SY-SUBRC = 0.
               MESSAGE I000(0) WITH 'RECORDS ARE DELETED'.
             ELSE.
               MESSAGE E001(0) WITH 'RECORDS ARE NOT DELETED'.
            ENDIF.
    endcase.
    endmodule.                 " USER_COMMAND_9002  INPUT
    *&      Module  STATUS_9002  OUTPUT
          text
    module STATUS_9002 output.
      SET PF-STATUS 'ZCUSTOMER1'.
    SET TITLEBAR 'xxx'.
    endmodule.                 " STATUS_9002  OUTPUT
    *&      Module  update_table  OUTPUT
          text
    module update_table output.
         move itab-MANDT   to zcust_call_rec-MANDT.
         move itab-kunnr   to zcust_call_rec-kunnr.
         move itab-budat   to zcust_call_rec-budat.
         move itab-code    to zcust_call_rec-code.
         move itab-remarks to zcust_call_rec-remarks.
    vcontrol-lines = sy-dbcnt.
    endmodule.                 " update_table  OUTPUT
    ***Selection Data
    FORM SELECT_DATA.
    SELECT  mandt kunnr budat code remarks  FROM zcust_call_rec INTO
                            table itab
                             WHERE kunnr IN r_kunnr AND BUDAT IN R_BUDAT.
    ENDFORM.
    ****append vendor code
    FORM APPEND_CUSTOMER_CODE.
    clear r_kunnr.
    clear itab.
    clear r_budat.
    refresh r_kunnr.
    refresh itab.
    refresh r_kunnr.
    IF r_kunnr  IS INITIAL
                  AND NOT v_kun_low IS INITIAL
                   AND NOT v_kun_high IS INITIAL.
                        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
                                    EXPORTING
                                       input         = v_kun_low
                                    IMPORTING
                                       OUTPUT        = r_kunnr-low.
                       CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
                                  EXPORTING
                                      input         = v_kun_high
                                  IMPORTING
                                      OUTPUT        = r_kunnr-high.
                     r_kunnr-option = 'BT'.
                     r_kunnr-sign = 'I'.
                     append r_kunnr.
       PERFORM V_BUDAT.
    ELSEIF r_kunnr  IS INITIAL
                  AND NOT v_kun_low IS INITIAL
                   AND  v_kun_high IS INITIAL.
                        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
                                    EXPORTING
                                       input         = v_kun_low
                                    IMPORTING
                                       OUTPUT        = r_kunnr-low.
                    r_kunnr-SIGN = 'I'.
                    r_kunnr-OPTION = 'EQ'.
                    APPEND r_kunnr.
       PERFORM V_BUDAT.
    ELSEIF r_kunnr IS INITIAL
                  AND  v_kun_low IS INITIAL
                   AND NOT v_kun_high IS INITIAL.
                        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
                                    EXPORTING
                                       input         = v_kun_low
                                    IMPORTING
                                       OUTPUT        = r_kunnr-low.
                    r_kunnr-SIGN = 'I'.
                    r_kunnr-OPTION = 'EQ'.
                    APPEND r_kunnr.
          PERFORM V_BUDAT.
    ELSEIF r_kunnr IS INITIAL
                  AND  v_kun_low IS INITIAL
                   AND  v_kun_high IS INITIAL.
                        IF SY-SUBRC = 0.
                             MESSAGE I003(0) WITH 'ENTER CUSTOMER NUMBER'.
                              CALL SCREEN '9000'.
                        ENDIF.
    PERFORM V_BUDAT.
    ENDIF.
    ENDFORM.
    FORM V_BUDAT.
    IF  R_BUDAT IS INITIAL
                   AND NOT v_BUD_low IS INITIAL
                   AND NOT v_BUD_high IS INITIAL.
                     r_budat-low = v_bud_low.
                     r_budat-high = v_bud_high.
                     r_budat-option = 'BT'.
                     r_budat-sign = 'I'.
                     append r_budat.
             ELSEIF  R_BUDAT IS INITIAL
                   AND NOT v_BUD_low IS INITIAL
                   AND  v_BUD_high IS INITIAL.
                     r_budat-low = v_bud_low.
                     r_budat-high = v_bud_high.
                     r_budat-option = 'EQ'.
                     r_budat-sign = 'I'.
                     append r_budat.
             ELSEIF  R_BUDAT IS INITIAL
                   AND  v_BUD_low IS INITIAL
                   AND NOT v_BUD_high IS INITIAL.
                     r_budat-HIGH = v_bud_HIGH.
                     r_budat-option = 'EQ'.
                     r_budat-sign = 'I'.
                     append r_budat.
              ELSEIF  R_BUDAT IS INITIAL
                   AND  v_BUD_low IS INITIAL
                   AND  v_BUD_high IS INITIAL.
                   IF SY-SUBRC = 0.
                       MESSAGE I002(0) WITH 'ENTER POSTING DATE'.
                      CALL SCREEN '9000'.
                    r_budat-low = ''.
                    r_budat-option = ''.
                    r_budat-sign = ''.
                    ENDIF.
            ENDIF.
    ENDFORM.
    *&      Form  update
          text
    -->  p1        text
    <--  p2        text
    form update .
    commit work.
    endform.                    " update
    *&      Form  move_data
          text
    -->  p1        text
    <--  p2        text
    form move_data .
       clear itab.
      refresh itab.
           move-corresponding  zcust_call_rec to itab.
           MOVE ZCUST_CALL_REC-MANDT   TO ITAB-MANDT.
           MOVE ZCUST_CALL_REC-KUNNR   TO ITAB-KUNNR.
           MOVE ZCUST_CALL_REC-BUDAT   TO ITAB-BUDAT.
           MOVE ZCUST_CALL_REC-CODE    TO ITAB-CODE.
           MOVE ZCUST_CALL_REC-REMARKS TO ITAB-REMARKS.
         APPEND ITAB.
         delete itab where kunnr is initial.
    endform.                    " move_data
    thanks in adv
    vidya

  • How to update the value in xml file using transformer after setNodeValue

    Hi,
    This is my code
    I want to set update the values in xml file using transformer..
    Any one can help me
    This is my Xml file
    <?xml version="1.0" encoding="UTF-8"?>
    <place>
    <name>chennai</name>
    </place>
    Jsp Page
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%@ page import="javax.xml.parsers.DocumentBuilderFactory,
    javax.xml.parsers.DocumentBuilder,org.w3c.dom.*,org.w3c.dom.Element"
    %>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>JSP Page</title>
    </head>
    <body>
    <% String str="";
    String str1="";
    try
    DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
    DocumentBuilder db = dbf.newDocumentBuilder();
    Document doc = db.parse("http://localhost:8084/XmlApplication1/sss.xml");
    out.println("Before change");
    NodeList n11 = doc.getElementsByTagName("name");
    Node n22= n11.item(0).getFirstChild();
    str1 = n22.getNodeValue();
    out.println(str1);
    out.println("After change");
    String name = "Banglore";
    NodeList nlst = doc.getElementsByTagName("name");
    Node node= nlst.item(0).getFirstChild();
    node.setNodeValue(name);
    NodeList n1 = doc.getElementsByTagName("name");
    Node n2= n1.item(0).getFirstChild();
    str = n2.getNodeValue();
    out.println(str);
    catch(Exception e)
    out.println(e) ;
    %>
    <h1><%=str%></h1>
    <%--
    This example uses JSTL, uncomment the taglib directive above.
    To test, display the page like this: index.jsp?sayHello=true&name=Murphy
    --%>
    <%--
    <c:if test="${param.sayHello}">
    <!-- Let's welcome the user ${param.name} -->
    Hello ${param.name}!
    </c:if>
    --%>
    </body>
    </html>

    hi check this exit...
    IWO10012

  • Update Column value after current item is Approved and then publish major version using Sharepoint 2013 designer workflow

    Hi,
    We have a requirement to update a column value once the item has been approved.
    Following settings have been made in the publishing articles list:
    Require content approval for submitted items : yes
    Create major and minor (draft) versions
    Who should see draft items in this document library? :Only users who can edit items
    Require documents to be checked out before they can be edited? : yes
    I have createdatu a Sharepoint 2013 workflow to check if Approval sts of current item = 0 i.e. Approved , then check out and update the item and finally checkin the item. Everything works fine till this point except that the minor version of the item is
    checked in. Due to this the updated columns are not published to others.
    Also, I created a Sharepoint 2010 workflow to SET CONTENT APPROVAL = APPROVED and started this workflow from my list workflow above, but the item does not get checked-in and always shows "In Progress" status with comment "The item is currently
    locked for editing. Waiting for item to be checked in or for the lock to be released.".
    Please let me know where I am missing out so that once the item is approved, column value gets updated and current item is still in Approved status.
    Thanks

    Hi,
    According to your post, my understanding is that you want to update Column value after current item is Approved and then publish major version using Sharepoint 2013 designer workflow.
    You will get into this kind of Catch-22 situation trying to set the Content Approval Status in SharePoint Designer workflow:
    - You must check out the document before you can change the Content Approval Status
             - You can't change the Content Approval Status once the document in checked out
    Since you set the Require documents to be checked out before they can be edited=Yes, you will need to check out the document when run the workflow on the item. But you cannot approve a document when it is checked
    out. So the logic in workflow conflicts.
    As a workaround, you can use the Start Another Workflow action to start the normal Approval workflow on the document.  The built-in Approval workflow can work with a document that’s not checked out.
    The designer approval workflow also can work with a document that’s not checked out.
    You can create two workflow using SharePoint Designer 2013.
    First, create a SharePoint 2010 platform workflow.
    Then, create a SharePoint 2013 platform workflow.
    Then when the SharePoint 2013 platform workflow start, it will start the SharePoint 2010 platform workflow to set content approval status, then the SharePoint 2013 platform workflow will update current item value.
    More information:
    SharePoint Designer Workflow Content Approval Issue
    SharePoint 2010 Approval Workflow with Content Approval
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • How to Get and Update properties values from XML tag Using Xquery or PL Sql

    Hi
    I have this tag
    <Solicitud Pais = "1">
    How i can get Pais value?
    How i can update Pais Value?
    Y can use Xquery funtions or PL SQL for this?
    Thak's
    Angel

    How i can get Pais value? ExtractValue
    How i can update Pais Value?UpdateXML
    Y can use Xquery funtions or PL SQL for this?Yes
    Without knowing more about your requirements, where information resides, or even a version of Oracle, that is the best I'll do.

  • Using Method UPDATE_CONTRACT_OBJECT to Update Facts Value

    Hello,
    I'm using method  UPDATE_CONTRACT_OBJECT to update Fact Values.
    I want to update the content of IT_FACTS-BAPI_CTRACPSOBJECT_FACTS-VALUE_GENERIC  from the FormBundel Header SYS_FORM_BUNDEL_HEADER-PERIOD_KEY.
    After generating the funtion, my mapping is modify by the generation program to T_FACTS-BAPI_CTRACPSOBJECT_FACTS-VALUE_GENERIC = CURRENT_DATE.
    This generates an error message in the method due to existing controls in BAPI_CTRACPSOBJECT_CHANGE.
    There is any way that I could avoid the generation programme to overwrite the mapping? I just want to transfer the value of the period (4 Characters-Ex: 2014) to VALUE_GENERIC?
    Thank you in advance
    Regards
    Carlos

    Hello Tobias,
    More details here, I'm using BRFplus action UPDATE_CONTRACT_OBJECT. Working in Tax Revenue Management.
    Regards
    Carlos

  • Using ESSCMD UPDATEVARIABLE to update quoted values

    I need to use UPDATEVARIABLE on a 7.1.5 database to update a value that must be quoted, but I cannot figure out how. Does anyone out there know the correct syntax? Thanks,

    I am sorry, i should have tried to echo before posting in thread.....any way thanks for solution...
    Now i have a different question....the question i am trying to do the error handling in SCR script but looks like it's not working. here is my SCR Script. Am i doing anything wrong. Also how can i pass the return code from this SCR script to Batch script that is calling this SCR Script.
    OUTPUT 1 "C:\Errors\Upd.txt";
    logina "TEST" "user" "pwd" ;
    IFERROR "Error";
    UPDATEVARIABLE "Year" "" "" "" "\"2008\"";
    IFERROR "Error";
    :Error
    Exit;

  • Updating InputText after a validation error

    Hi everyone,
    I am having problems updating InputText after a validation error.
    Im using jdeveloper 11.1.1.1.0
    Steps without error validation works correctly
    1.-I put 3 in the component "value" (second InputText)
    2 .- validation begins, and rightly
    3 .- I put the value 1 component "optional" (first imputtext)
    4 .- Click the button "move"
    5 .- The componte "value" modify its contents appearing 1
    Steps with error validation not working properly
    1.-I put 4 in the component "value" (second InputText)
    2 .- validation begins, and it is wrong. Errror message appears
    3 .- I put the value 1 component "optional" (first imputtext)
    4 .- Click the button "move"
    5 .- The componte "value" does not alter its contents.
    Why not change its value after validation error?
    I included an example with two and a button InputText
    <af:inputText label="Optional" id="it1" autoSubmit="true" />
    <af:commandButton text="commandButton 1" id="cb1" immediate="true" actionListener="#{inputExample.move}"/>
    <af:inputText label="Value" id="it2" immediate="true" autoSubmit="true" validator="#{inputExample.validatorExample}" value="#{inputExample.targetValue}"/>
    public void validatorExample(FacesContext facesContext, UIComponent uIComponent, Object object) {
    Number number = null;
    try {
    number = new Number(object);
    } catch (SQLException e) {
    if ((number.longValue() % 2) == 0) {
    FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_ERROR, "ES PAR", "ES PAR");
    ((RichInputText)uIComponent).setValid(false);
    throw new ValidatorException(message);
    public void move(ActionEvent actionEvent) {
    FacesContext facesContext = FacesContext.getCurrentInstance();
    UIComponent x = facesContext.getViewRoot().findComponent("it1");
    RichInputText input1 = (RichInputText)x;
    String value = (String)input1.getValue();
    UIComponent x2 = facesContext.getViewRoot().findComponent("it2");
    RichInputText input2 = (RichInputText)x2;
    input2.setValue(value);
    RequestContext.getCurrentInstance().addPartialTarget(input2);
    }

    Yes but the action will be executed with invalid data.
    After validation fails the new (invalid) value is not set so when you get the value you get the previous (valid) one.
    If you want the validation just to warn the user but allow him to continue with executing actions with the new values then you should not use a validator.
    You could instead use a valueChangeListener were you can display a message to the user allowing the value to be set normaly.
    Gabriel.

  • Passing inputText value with command Button

    Hi,
    As i am new in JSF i dont know how to pass my inputtext value to backing bean with my commandbutton...
    My JSF code is.
    <h:form id="form3">
              <h:outputLabel for="" id="OL_Select_Case" value="Select Case" style="background-position: 100%; background-repeat: repeat; width: 100%; background-color: Gray"></h:outputLabel>
              <br>
              <h:inputText id="I1_Select_Case" value="#{ComplaintDetailsBean.caseNo}"></h:inputText>          
              <h:commandButton id="C1_Select_Case" value="Select Case" style="background-color: transparent;" action="/Maintanance1.faces"></h:commandButton>
              <br>
              <br>
              <h:inputText id="I2_Select_Owner"></h:inputText>
              <h:commandButton id="C2_Select_Owner" value="Select Owner" style="background-color: transparent ;"></h:commandButton>
              <br>
              <br>
              <h:selectOneMenu id="sel_owner" value="#{OwnerBean.owner}">
              <f:selectItems id="sel_item_owner" value="#{OwnerBean.perInfo}"/>          
              </h:selectOneMenu>
                <h:commandButton id="C3_Assign" value="Assign" style="background-color: transparent;" action="#{OwnerBean.getDetailThree}">
              <f:param name="caseNo_owner" value="#{ComplaintDetailsBean.caseNo}" id="caseNo_owner"/>
              </h:commandButton>
         </h:form>
         I want to pass value of inputtext "I1_Select_Case" with my commandbutton "C3_Assign" to my backing bean i.e. "OwnerBean.java"
    I have used here param tag....but its not working ....
    Plz suggest me...
    Regards.
    Shrikant.

    No its still not working.My JSF code is....
         <h:form id="form3">
              <h:outputLabel for="" id="OL_Select_Case" value="Select Case" style="background-position: 100%; background-repeat: repeat; width: 100%; background-color: Gray"></h:outputLabel>
              <br>
              <h:inputText id="I1_Select_Case" value="#{OwnerBean.comCaseNo}"></h:inputText>          
              <h:commandButton id="C1_Select_Case" value="Select Case" style="background-color: transparent;" action="/Maintanance1.faces"></h:commandButton>
              <br>
              <br>
              <h:inputText id="I2_Select_Owner"></h:inputText>
              <h:commandButton id="C2_Select_Owner" value="Select Owner" style="background-color: transparent ;"></h:commandButton>
              <br>
              <br>
              <h:selectOneMenu id="sel_owner" value="#{OwnerBean.owner}">
              <f:selectItems id="sel_item_owner" value="#{OwnerBean.perInfo}"/>          
              </h:selectOneMenu>
                <h:commandButton id="C3_Assign" value="Assign" style="background-color: transparent;" action="#{OwnerBean.getDetailThree}">
              <f:param name="caseNo_owner" value="#{OwnerBean.comCaseNo}" id="caseNo_owner"/>
              </h:commandButton>
         </h:form>
         My OwnerBean's code is:-
    public String getCaseNo() { 
    return caseNo; 
    public void setCaseNo(String caseNo) { 
    this.caseNo = caseNo; 
    public String getComCaseNo() { 
         return com.getCaseNo(); 
         public void setComCaseNo(String caseNo) { 
         com.setCaseNo(caseNo); 
    public String getDetailThree() { 
         FacesContext context = FacesContext.getCurrentInstance(); 
         HttpServletRequest myRequest = (HttpServletRequest)context.getExternalContext().getRequest(); 
         HttpSession mySession = myRequest.getSession();         
         //String caseNo = myRequest.getParameter("case_No");
         setCaseNo(myRequest.getParameter("caseNo_owner"));
         String owner2=getOwner();
         System.err.println(">>>>>>>>>>>>>>>>>BACKING BEAN ENTITYDETAILS>>>"+getComCaseNo()+"||||"+owner2);
         //javax.servlet.RequestDispatcher dispatcher = getServletContext().getRequestDispatcher("/complaintDetailsPop.faces");
         //String custName= request.getParameter("Name");
         //System.out.println("Name = "+custName);
         //request.setAttribute("Customer_Name","Irfan");
         //request.setAttribute("First_Name","Shrikant");
         //dispatcher.forward(request,response);
         //FacesContext fc = FacesContext.getCurrentInstance();
         //ServletContext sc = (ServletContext) fc.getExternalContext().getContext();
         //myRequest.getSession().setAttribute("entity_ID",entityID);
         //sc.getRequestDispatcher("/Assign_Case.faces");          
         //========---------------********************************************************----------------------------------
         return("getdetails"); 
         //String entityID = getFacesParamValue("entityIDParam"); 
         }Plz suggest me....

  • Do I really have to create object instance before jsf can update its value?

    Hello,
    I have jsp page with following fragment:
    <h:inputText value="#{myBean.obj.value}"/>
    myBean is defined as managed bean of class MyBean:
    public class MyBean {
         private MyObject obj;
         public object getObj() { return obj; }
         public void setObj(MyObject obj) { this.obj = obj; }
    MyObject is a POJO with getter and setter for property "value".
    Now, when I display this jsp page, inputText will be empty, since getter for "obj" returned null. If I enter something in this inputText and submit the page I will get:
    PropertyNotFoundException: Error testing property 'value' in bean of type null
    This exception was thrown in PROCESS_VALIDATIONS phase. As I see, JSF is expecting getter for "obj" to return MyObject instance, where instead it returns null.
    My question is: do I really have to have already created instance of object for validation to succed?
    I know that this problem is easy to solve by placing
         private MyObject obj = new MyObject();
    in class definition or similar initialization in constructor, but..
    What if "obj" is a hibernate bean, that has a full tree of other hibernate beans as properties... In this case, creating a new instance of "obj" and initializing all of it nodes, is no more "one line of code" task, but instead 20 lines of, IMHO, unnecessary code.
    So I was wondering why is JSF unable to create new instance of object whose properties is trying to update?
    Regards,
    Igor

    Thanks for reply,
    I'm aware of jsf IoC, but this does not simplify my problem.
    In my case MyObject is class used by Hibernate and can be something like:
    public class Employee {
    private String name;
    private Workgroup workGrp;
    private Residence res;
    // ... more properties, getters, setters
    public class Residence {
    private State state;
    // ... more properties, getters, setters
    So, in order to fully create Employee instance, I have to create and set its Workgroup and Residence properties, and then create and set State inside Residence...etc. Defining all hibernate classes as managed beans, and making dependancies between them cannot solve this problem.
    Since I don't want to add constructors or initializers to hibernate classes, the only solution I can come up with is to do manual creation:
    obj = new Employee();
    obj.setWorkGrp(new Workgroup());
    obj.setRes(new Residence());
    // ...etc
    and place this code in obj's getter to be executed if obj is null. This is the reason I was wondering why can't this be done by jsf automaticly?

  • Why are inputText values within a dataTable tag lost when validation fails?

    Hi, As a test, I have three fields outside of a dataTable tag and three fields inside a dataTable tag.
    I enter data into field1, field3 and all of the fields within the dataTable. Field2 is left empty and is required. I press the 'go' button which gets to the validation phase and immediately redraws the web page and says 'value is required' which is what it should do.
    What shocks me at this point is that the field values inside the datatable are lost. They are back to their original blank values.
    It like even though validation fails(the model is not updated), the datatable is redrawn using the model data which is still blank. The renderer forgets that those fields within the datatable had data typed into them.
    Is this a bug? and how do I get around it? I don't want to lose what was typed in.
    here is my example:
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    <html>
    <body>
    <f:view>
    <h:form>
    <h:panelGrid columns="2">
    <h:outputText value="field1"/><h:inputText value="#{example.field1}"/>
    <h:outputText value="field2 required"/><h:inputText required="true" value="#{example.field2}"/>
    <h:outputText value="field3"/><h:inputText value="#{example.field3}"/>
    </h:panelGrid>
    <h:panelGrid columns="1">
    <h:outputText value="dataTable"/>
    <h:outputText value="---------"/>
    <h:dataTable value="#{example.lines}" var="line">
    <h:column>
    <h:inputText value="#{line.text}"/>
    <f:facet name="header">
    <h:outputText value="column1"/>
    </f:facet>
    </h:column>
    </h:dataTable>
    <h:commandButton value="go"/>
    <h:outputText value="errors"/>
    <h:outputText value="---------"/>
    <h:messages showDetail="true"/>
    </h:panelGrid>
    </h:form>
    </f:view>
    </body>
    </html>
    package test;
    import java.util.ArrayList;
    public class Example {
         private String field1;
         private String field2;
         private String field3;
         private ArrayList lines = new ArrayList();
         public Example() {
              lines.add(new Line());
              lines.add(new Line());
              lines.add(new Line());
         public String getField1() {
              return field1;
         public void setField1(String field1) {
              this.field1 = field1;
         public String getField2() {
              return field2;
         public void setField2(String field2) {
              this.field2 = field2;
         public String getField3() {
              return field3;
         public void setField3(String field3) {
              this.field3 = field3;
         public ArrayList getLines() {
              return lines;
         public void setLines(ArrayList lines) {
              this.lines = lines;
    package test;
    public class Line {
         private String text;
         public String getText() {
              return text;
         public void setText(String text) {
              this.text = text;
    <managed-bean>
    <managed-bean-name>example</managed-bean-name>
    <managed-bean-class>test.Example</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
    </managed-bean>

    I posted about this bug a month ago and then again twice more (as recently as last week) and got zero responses. I piddled away so much time thinking I was crazy to believe this framework could have such a gaping hole in the fuselage that it was crazy. The more unsettling part too was the fact that the logging in the jsf code is so pathetic that you have no clue even with it on full that it's throwing your data away, they have unit tests in their code, including in-container tests, and they didn't have a test that turned this up? Hello? A project that has been going for this long should not have torture traps like this in it. Sorry for my negative post. To end on a positive note, I am looking forward to finding out about oracle's stuff. And Sun wonders why no one uses their stuff.
    Does the Oracle JSF implementation require OAS?

  • Get inputText value from ADF table

    Hi
    I have a read-only table and a custom column of inputText for entering values by user. My question is that how can I get inputText values row by row in backing bean?
    I founded some solutions that got values from binding, but it isn't useful for me. I should get the user entered values.
    I am so confusing than can't find any solution for this common need.
    Thanks
    Ali

    hi user,
    My question is that how can I get inputText values row by row in backing bean?
    have a listener do as like of dvohra says.if it is not work for you means.
    have DCIteratorBindings class grab the corresponding iterator then iterate row by row to get the value. but it should a persistent attribute.
    thanks

Maybe you are looking for

  • AS2 Receiver CC SSL Details

    Hi, My scenario is idoc to EDI Invoice scenario, but we are using HTTPS protocol in receiver (AS2) adapter. When we select the HTTPS protocol it is asking below SSL Certificates 1. Server Certificate (key Store) 2. Private key for client Authenticati

  • Pages Freezes when I try to edit a document

    So.. I create a new document, populate it with text and photos, mask some images, etc. I save it and email it as a PDF with no problems. When I try to open it later in pages, it seems to open as it should, but when I try to go into it to edit text, p

  • T open PDF created with Adobe X on Ipad

    Created PDFusing Adobe AcrobatX Pro in itunes library on computer transfered to ipad cannot open receiving error message that Apple does not permit downloading Acrobat Reader.

  • Colors are not applying properly

    First off, let me say that I am definitely a novice.  I'm mostly self taught- I did take some courses through the Art Institute of Pittsburgh but I had to drop out to take care of my family so I'm by no means an expert.  So forgive me if I sound like

  • Blue-ray external player?

    What Blue-Ray (BR) externel players does Apple computers like? or can i use what ever externel BR-burners PC has