Problem maintaining required state of selectOne component

Hi,
I have a set of components for which input is required, but the user can choose not to provide input by checking a checkbox.
The problem is if I select to skip input and then hit next, then back, then next again the selectOne component appears to have forgotten that it is not required. However, the inputText field behaves as desired.
Any ideas?
// testRequired.jsp
<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Test Required</title>
<script type="text/javascript" language="JavaScript">
function disableFieldById(fieldName) {
     if (document.getElementById(fieldName) == null) return;
    document.getElementById(fieldName).disabled = true;
    document.getElementById(fieldName).style.background = "#D5D2CB";
    document.getElementById(fieldName).value = "";
function enableFieldById(fieldName) {
     if (document.getElementById(fieldName) == null) return;
    document.getElementById(fieldName).disabled = false;
    document.getElementById(fieldName).style.background = "#FFFFFF";
    </script>
</head>
<body onLoad="processPage();">
<script type="text/javascript" language="JavaScript">
function processPage() {
     updateFields();
function updateFields() {
    if (document.getElementById("testRequiredForm:textOK").checked) {
        disableFieldById("testRequiredForm:testText");
        disableFieldById("testRequiredForm:testSelect");
    } else {      
        enableFieldById("testRequiredForm:testText");
        enableFieldById("testRequiredForm:testSelect");
</script>
<f:view>
     <h:form id="testRequiredForm">
          <h:panelGrid id="grid" columns="2">
               <h:selectBooleanCheckbox id="textOK" value="#{testBean.ok}"
                    immediate="true" onclick="updateFields();"
                    binding="#{testUI.booleanSelect}"
                    valueChangeListener="#{testUI.statusChanged}">
               </h:selectBooleanCheckbox>
               <h:outputText value="Skip input" />
               <h:inputText id="testText" required="true" value="#{testBean.text}"
                    binding="#{testUI.textInput}" />
               <h:message for="testText" />
               <h:selectOneMenu id="testSelect" required="true"
                    value="#{testBean.select}"
                    binding="#{testUI.selectInput}">
                    <f:selectItem itemValue="" itemLabel="" />
                    <f:selectItem itemValue="A" itemLabel="First" />
                    <f:selectItem itemValue="B" itemLabel="Second" />
               </h:selectOneMenu>
               <h:message for="testSelect" />
          </h:panelGrid>
          <f:verbatim>
               <br>
               <br>
          </f:verbatim>
          <h:commandButton type="submit" value="next" action="next" />
     </h:form>
</f:view>
</body>
</html>
// testRequiredNext.jsp
<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Test Required Next</title>
</head>
<body>
<f:view>
     <f:verbatim>
          Second page.
     </f:verbatim>
     <h:form>
     <h:commandButton type="submit" value="back" action="back" />
     </h:form>
</f:view>
</body>
</html>
// beans
// TestBean
public class TestBean {
    private boolean ok;
    private String text;
    private String select;
    public boolean isOk() {
        return ok;
    public void setOk(boolean ok) {
        this.ok = ok;
    public String getText() {
        return text;
    public void setText(String text) {
        this.text = text;
    public String getSelect() {
        return select;
    public void setSelect(String select) {
        this.select = select;
// TestUI
public class TestUI {
    private UISelectBoolean booleanSelect;
    private UIInput textInput;
    private UISelectOne selectInput;
    private boolean status;
    public void statusChanged(ValueChangeEvent event) {
        status = ((Boolean) event.getNewValue()).booleanValue();
        setRequired();
        if (isStatus()) {
            setComponentValues();
         * Update the checkbox manually as we're skipping the Update Model stage
         * (see FacesContext.getCurrentInstance().renderResponse(); below).
        booleanSelect.setValue(event.getNewValue());
    protected void setComponentValues() {
        textInput.setValue("");
        textInput.setSubmittedValue(null);
        selectInput.setValue("");
        selectInput.setSubmittedValue(null);
    protected void setRequired() {
        textInput.setRequired(!isStatus());
        selectInput.setRequired(!isStatus());
    public UISelectBoolean getBooleanSelect() {
        return booleanSelect;
    public void setBooleanSelect(UISelectBoolean booleanSelect) {
        this.booleanSelect = booleanSelect;
    public UIInput getTextInput() {
        return textInput;
    public void setTextInput(UIInput textInput) {
        this.textInput = textInput;
    public boolean isStatus() {
        return status;
    public void setStatus(boolean status) {
        this.status = status;
    public UISelectOne getSelectInput() {
        return selectInput;
    public void setSelectInput(UISelectOne selectInput) {
        this.selectInput = selectInput;
}

Actually, my JavaScript was obscruing the problem. The problem occurs for any type of UI component, not just selectOne's.
Why won't my component remember its required attribute that I set?
When you select "Skip input", hit next, then back, then next again it thinks the field is required again.
Here is a simpler example:
// testRequired.jsp
<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Test Required</title>
</head>
<body>
<f:view>
     <h:form id="testRequiredForm">
          <h:panelGrid id="grid" columns="2">
               <h:selectBooleanCheckbox id="textOK" value="#{testBean.ok}"
                    immediate="true"
                    binding="#{testUI.booleanSelect}"
                    valueChangeListener="#{testUI.statusChanged}">
               </h:selectBooleanCheckbox>
               <h:outputText value="Skip input" />
               <h:inputText id="testText" value="#{testBean.text}"
                    binding="#{testUI.textInput}" />
               <h:message for="testText" />
          </h:panelGrid>
          <f:verbatim>
               <br>
               <br>
          </f:verbatim>
          <h:commandButton type="submit" value="next" action="next" />
     </h:form>
</f:view>
</body>
</html>
// testRequiredNext.jsp
<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Test Required Next</title>
</head>
<body>
<f:view>
     <f:verbatim>
          Second page.
     </f:verbatim>
     <h:form>
     <h:commandButton type="submit" value="back" action="back" />
     </h:form>
</f:view>
</body>
</html>
// TestBean
public class TestBean {
    private boolean ok;
    private String text;
    private String select;
    public boolean isOk() {
        return ok;
    public void setOk(boolean ok) {
        this.ok = ok;
    public String getText() {
        return text;
    public void setText(String text) {
        this.text = text;
    public String getSelect() {
        return select;
    public void setSelect(String select) {
        this.select = select;
// TestUI
public class TestUI {
    private UISelectBoolean booleanSelect;
    private UIInput textInput;
    private UISelectOne selectInput;
    private boolean status;
    public void statusChanged(ValueChangeEvent event) {
        status = ((Boolean) event.getNewValue()).booleanValue();
        setRequired();
        if (isStatus()) {
            setComponentValues();
         * Update the checkbox manually as we're skipping the Update Model stage
         * (see FacesContext.getCurrentInstance().renderResponse(); below).
        booleanSelect.setValue(event.getNewValue());
    protected void setComponentValues() {
        textInput.setValue("");
        textInput.setSubmittedValue(null);
    protected void setRequired() {
        textInput.setRequired(!isStatus());
    public UISelectBoolean getBooleanSelect() {
        return booleanSelect;
    public void setBooleanSelect(UISelectBoolean booleanSelect) {
        this.booleanSelect = booleanSelect;
    public UIInput getTextInput() {
        return textInput;
    public void setTextInput(UIInput textInput) {
        textInput.setRequired(true);
        this.textInput = textInput;
    public boolean isStatus() {
        return status;
    public void setStatus(boolean status) {
        this.status = status;
    public UISelectOne getSelectInput() {
        return selectInput;
    public void setSelectInput(UISelectOne selectInput) {
        this.selectInput = selectInput;
}

Similar Messages

  • Problem with READ Statement in the field routine of the Transformation

    Hi,
    I have problem with read statement with binary search in the field routine of the transformation.
    read statement is working well when i was checked in the debugging mode, it's not working properly for the bulk load in the background. below are the steps i have implemented in my requirement.
    1. I selected the record from the lookuo DSO into one internal table for all entried in source_packeage.
    2.i have read same internal table in the field routine for each source_package entry and i am setting the flag for that field .
    Code in the start routine
    select source accno end_dt acctp from zcam_o11
    into table it_zcam
    for all entries in source_package
    where source = source_package-source
         and accno = source_package-accno.
    if sy-subrc = 0.
    delete it_zcam where acctp <> 3.
    delete it_zcam where end_dt initial.
    sort it_zcam by surce accno.
    endif.
    field routine code:
    read table it_zcam with key source = source_package-source
                                                 accno  = source_package-accno
                                                 binary search
                                                 transportin no fields.
    if sy-subrc = 0.
    RESULT  = 'Y'.
    else.
    RESULT = 'N'.
    endif.
    this piece of code exist in the other model there its working fine.when comes to my code it's not working properly, but when i debug the transformation it's working fine for those accno.
    the problem is when i do full load the code is not working properly and populating the wrong value in the RESULT field.
    this field i am using in the report filter.
    please let me know if anybody has the soluton or reason for this strage behaviour.
    thanks,
    Rahim.

    i suppose the below is not the actual code. active table of dso would be /bic/azcam_o1100...
    1. is the key of zcam_o11 source and accno ?
    2. you need to get the sortout of if endif (see code below)
    select source accno end_dt acctp from zcam_o11
    into table it_zcam
    for all entries in source_package
    where source = source_package-source
    and accno = source_package-accno.
    if sy-subrc = 0.
    delete it_zcam where acctp 3.
    delete it_zcam where end_dt initial.
    endif.
    sort it_zcam by surce accno.
    field routine code:
    read table it_zcam with key source = source_package-source
    accno = source_package-accno
    binary search
    transportin no fields.
    if sy-subrc = 0.
    RESULT = 'Y'.
    else.
    RESULT = 'N'.
    endif.

  • Maintain folder state in struts in a JSP

    Hi
    I had a requirement of displaying a group of folders in very large numbers in the corresponding Folder hierarchies in a JSP. I acheived it using Ajax calls. This is the set of steps we have adopted
    1. When ever a user clicks a Open/Close/add file/delete file/add folder/delete folder to a folder, using Ajax we retrieved the whole result set into a XML, applied some styles to it(XSLT) and finally we make them displayed in the jsp using object. innerHTML = processResponse()method in Ajax.
    2. while we dispay this entire Library tree in the JSP, we maintain the state of the folders in a map(Which contains the folder id's which are in expanded state) and that map is being attached to a session and thus we store the each FolderInfo and finally display the tree using XSLT.
    3. I notice the state is always getting disturbed every time I perform the above mentioned actions, I see the entire tree with all the folders in expanded state(as the default value of the isExpand variable of the FolderInfo object is true.). Is this the correct way of preserving the Library Tree's state. If not so , please suggest an improvements of the existing process or an alternative one.
    This process involves the role of map in the session across alll teh DAO and business layers and finally to the Presentaion layer.
    Thanks

    Yes, there are two ways (at least) to do that:
    1. Map<String, ClientData> where String is the result of RemoteServer.getClientHost(). Use this in the case where there is only one instance of your remote object.
    2. Allocate a remote object instance per client. I call this the Remote Session pattern. You make it so that the thing you look up in the Registry is really a factory, and your clients call a method on the factory to get their own instance, which is basically a remote session.

  • Capture ERFMG - Requirement quantity for a component

    Hi All,
    I have a requirement where in i need to capture the requirement quantity for a component(ERFMG).
    The problem is the value exists only at runtime in the following structure MDPM.
    I am writing the code in an exit   EXIT_SAPMM06E_013 where in i cannot capture this value from this structure.It is not storing in a database table also . how can i get this value  ?
    Kindly help.
    Priya.

    Hi,
    Thank you for your post!
    It is exactly what I have done but as I above mentioned:
    Subsequent problem
    The system schedules the dates correctly on the component level, but re-schedules the dates for the project the day you schedule and erase the complete old scheduling dates except for the activities with constraints.
    If I have an "old" scheduled project and I add some new components anywhere in the complete project structure additional needs. I go then to the project definition level and schedule the complete project. My result is that on project definition and WBS elements no changes but on all activities (without confirmation) the system put the start date the day which I re-schedule the project.
    That what I want  to avoid and let the initial planned schedule date on activity level the same as before re-scheduling the project.
    Do you have any further advices?
    Thank you in advance for your input
    Best regards

  • Maintain Jtable state!

    Hi,
    In my software I browse a lot of files, csv & xls files and load them onto JTable. Each jtable is in different JInternalFrame, now the problem is when I refine the data. How am I suppose to treat each Jtable as different and maintain its state?
    Eg. If there are two files FileA and FileB opened, and I want to add 5 to each value in FileA and add 8 in FileB then how do I do that simultaneously. The logic for calculating will be the same for both but they should be opening different panes for each and the calculation command is not given together they are given separately in their frames simultaneously by right clicking on the jtable

    Create a loop and updated each table separately.
    Other than that you question is too vague to give a better reply.

  • Hpqdirec.exe has stopped working; "This program requires a missing Windows component"

    Anytime I try to access the HP solution center I get a message pop-up. It is from Windows & says:  "This program requires a missing Windows component. "  "This  program requires  flash.ocx, which is no longer included in this version of Windows." How do i fix this????

    Dear Customer,
    Welcome and Thank you for posting your query on HP Support Forum
    It looks like you are facing issues with regards to one of the Windows component which is missing
    We will surely assist you with this issue
    Please click on the below shown link to find the steps involved in resolving the issue
    http://tinyurl.com/khb65xv
    You can Check your warranty Here to verify the status if required 
    Hope this helps, for any further queries reply to the post and feel free to join us again
    **Click the KUDOS star on left to say Thanks**
    Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem.
    Thank You,
    K N R K
    Although I am an HP employee, I am speaking for myself and not for HP

  • Problems maintaining network connectivity in hotels

    I have a problem maintaining internet connectivity when I use hotel WiFi services where you have to "login" first via the web browser. I don't have a problem with the WiFi per se and I have no problems with initial connectivity -- I can login and browse the Web without problems. But if my MacBook goes to sleep, I can't browse, get email, etc when it wakes up.
    I don't have this problem at home - only when I travel to places where I have to first "login". This has been happening consistently since I got the MacBook 10 months ago and at various hotel chains around the country. Also when I have another laptop with me ( Windows ) I don't see this problem. Sometimes on the Windows machine I have to "login" again after it wakes up but I never have this opportunity on my MacBook -- the browser just hangs there, "loading" indefinitely.
    The only way I've found to fix this is to reboot my MacBook. I've tried Googling for a solution or even anybody else who has this problem and I've turned up nothing! I am really the only person having this problem?!? LOL...

    Unfortunately this is a fact of life with these types of hotel systems. Live with it or set your Mac to "Computer never sleep" when you are traveling and that occurs.

  • TS3074 im can u please help me out this issue im trying to install iTunes  in windows 7 some error showing " windows installer package problem DLL require to complete this installation" this message showing.

    im can u please help me out this issue im trying to install iTunes  in windows 7 some error showing " windows installer package problem DLL require to complete this installation" this message showing.

    Try the following user tip:
    " ... A DLL required for this installation to complete could not be run ..." error messages when installing iTunes for Windows

  • Problem in Update Statement

    I got some problem in update statement.Can anybody discuss with me regarding my problem? Below is the occured problem.
    //all the declaration like Connection, ResultSet are declared, setting the ODBC path and so on steps have been set up before this method. When compile it, no error, when I start to run my program, the program�s interface is shown, but the following error was appearred and data cannot be updated, can anybody tell me where is my mistake?
    //ERROR:SQL Error in update statement:java.sql.SQLException [Microsoft][ODBC][ODBC Microsoft Access Driver] Syntax Error in UPDATE statement.
    //emp_overview is the table name
    // last_name, first_name, office_phone�.is the attributes of the table
    //this method had declare in the interface class already
    public String updateData (String idd, String ln, String fn, String op,
                   String oe, String hp, String ps, String ss)
                   throws java.rmi.RemoteException
         {//begin of this method
              String result ="";
              try
              Statement statement = connection.createStatement();
              String sql = "UPDATE emp_overview SET" +
              "last_name=' "+ln+
              " ', first_name=' "+fn+
              " ', office_phone=' "+op+
              " ', office_ext=' "+oe+
              " ', home_phone=' "+hp+
              " ', primary_skill=' "+ps+
              " ', secondary_skill=' "+ss+
              " ' WHERE id="+idd;
              statement.executeUpdate(sql);
              statement.close();
              catch (java.sql.SQLException e)
         System.out.println("SQL Error in update statement: "+e);
              //throw a RemoteException with the exception
              //embedded for the client to receive
         throw new java.rmi.RemoteException("Error in Updating exist row into DB", e);
              return result;
         }//end of this method

    Hi Kevin,
    According to the code you have posted, it looks like you are missing a space between "SET" and "last_name". I suggest you add the following line of code:
    System.out.println(sql);
    before the invocation of "executeUpdate()".
    I also suggest you add the following line of code:
    e.printStackTrace();in your "catch" block.
    Hope this helps.
    Good Luck,
    Avi.

  • Problem in Update statement using Execute Immediate

    Hi All,
    I am facing problem in update statement.
    I am creating dynamic sql and use "execute immediate" statement to execute a update statement.
    But it is not updating any thing there in the table.
    I have created a query like :
    update_query='Update '|| Table_Name ||' t set t.process_status =''Y'' where t.tid=:A';
    Execute immediate update_query using V_Id;
    commit;
    But it is not updating the table.
    I have a question , is execute immediate only does insert and delete?
    Thanks
    Ashok

    SQL> select * from t;
                     TID P
                     101 N
    SQL> declare
      2     V_Id          number := 101;
      3     Table_Name    varchar2(30) := 'T';
      4     update_query  varchar2(1000);
      5  begin
      6     update_query := 'Update '|| Table_Name ||' t set t.process_status =''Y'' where t.tid=:A';
      7     Execute immediate update_query using V_Id;
      8     commit;
      9  end;
    10  /
    PL/SQL procedure successfully completed.
    SQL> select * from t;
                     TID P
                     101 Y                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Problem in UPDATE statement In Multiple Record Block

    Hi Friends,
    I have problem in update Statement for updating the record in multiple record data Block.
    I have two data Block the master block is single Record block and the 2nd data block is Multiple Record data Block.
    I am inserting the fields like category,and post_no for partiular job in single data block
    Now in second Multiple Record Data Block,i am inserting the multiple record for above fileds like no. of employees work in the position
    There is no problem in INSERT Statement as it is inerting all record But whenever i want to update particular Record (in Multiple Block) of employee for that category and Post_no
    then its updating all the record.
    my code is Bellow,
    IF v_count 0 THEN
    LOOP
    IF :SYSTEM.last_record 'TRUE' THEN
    UPDATE post_history
    SET idcode = :POST_HISTORY_MULTIPLE.idcode,
    joining_post_dt = :POST_HISTORY_MULTIPLE.joining_post_dt,
    leaving_post_dt = :POST_HISTORY_MULTIPLE.leaving_post_dt,
    entry_gp_stage = :POST_HISTORY_MULTIPLE.entry_gp_stage
    WHERE post_no = :POST_HISTORY_SINGLE.post_no
    AND category = :POST_HISTORY_SINGLE.category
    AND roster_no = :POST_HISTORY_SINGLE.roster_no;
    AND idcode = :POST_HISTORY_MULTIPLE.idcode;
    IF SQL%NOTFOUND THEN
    INSERT INTO post_history(post_no,roster_no,category,idcode,joining_post_dt,leaving_post_dt,entry_gp_stage)
    VALUES(g_post_no, g_roster_no, g_category, :POST_HISTORY_MULTIPLE.idcode, :POST_HISTORY_MULTIPLE.joining_post_dt,
    :POST_HISTORY_MULTIPLE.leaving_post_dt,:POST_HISTORY_MULTIPLE.entry_gp_stage);
    END IF;
    next_record;
    ELSIF :SYSTEM.last_record = 'TRUE' THEN
    UPDATE post_history
    SET idcode = :POST_HISTORY_MULTIPLE.idcode,
    joining_post_dt = :POST_HISTORY_MULTIPLE.joining_post_dt,
    leaving_post_dt = :POST_HISTORY_MULTIPLE.leaving_post_dt,
    entry_gp_stage = :POST_HISTORY_MULTIPLE.entry_gp_stage
    WHERE post_no = :POST_HISTORY_SINGLE.post_no
    AND category = :POST_HISTORY_SINGLE.category
    AND roster_no = :POST_HISTORY_SINGLE.roster_no;
    AND idcode = :POST_HISTORY_MULTIPLE.idcode;
    IF SQL%NOTFOUND THEN
    INSERT INTO post_history(post_no,roster_no,category,idcode,joining_post_dt,leaving_post_dt,entry_gp_stage)
    VALUES (g_post_no,g_roster_no,g_category,:POST_HISTORY_MULTIPLE.idcode,
    :POST_HISTORY_MULTIPLE.joining_post_dt,:POST_HISTORY_MULTIPLE.leaving_post_dt,:POST_HISTORY_MULTIPLE.entry_gp_stage);
    END IF;
    EXIT;
    END IF;
    END LOOP;
    SET_ALERT_PROPERTY('user_alert',ALERT_MESSAGE_TEXT, 'Record Updated successfuly' );
    v_button_no := SHOW_ALERT('user_alert');
    FORMS_DDL('COMMIT');
    CLEAR_FORM(no_validate);
    Please Guide me
    Thanks in advence

    As you do a loop over all the records in the block, of course every record is updated.
    Also, what you do is not the way is intended to be used. In general, you base a block on a table,then there is no need at all for writing INSERT's or UPDATE's. Forms also know's then, which records to be updated and which not.

  • Problem In Update Statement In Multiple Record Data Block

    Hi Friends,
    I have problem in update Statement for updating the record in multiple record data Block.
    I have two data Block the master block is single Record block and the 2nd data block is Multiple Record data Block.
    I am inserting the fields like category,and post_no for partiular job in single data block
    Now in second Multiple Record Data Block,i am inserting the multiple record for above fileds like no. of employees work in the position
    There is no problem in INSERT Statement as it is inerting all record But whenever i want to update particular Record (in Multiple Block) of employee for that category and Post_no
    then its updating all the record.
    my code is Bellow,
    IF v_count <> 0 THEN
    LOOP
    IF :SYSTEM.last_record <> 'TRUE' THEN
    UPDATE post_history
    SET idcode = :POST_HISTORY_MULTIPLE.idcode,
    joining_post_dt = :POST_HISTORY_MULTIPLE.joining_post_dt,
    leaving_post_dt = :POST_HISTORY_MULTIPLE.leaving_post_dt,
    entry_gp_stage = :POST_HISTORY_MULTIPLE.entry_gp_stage
    WHERE post_no = :POST_HISTORY_SINGLE.post_no
    AND category = :POST_HISTORY_SINGLE.category
    AND roster_no = :POST_HISTORY_SINGLE.roster_no;
    AND idcode = :POST_HISTORY_MULTIPLE.idcode;
    IF SQL%NOTFOUND THEN
    INSERT INTO post_history(post_no,roster_no,category,idcode,joining_post_dt,leaving_post_dt,entry_gp_stage)
    VALUES(g_post_no, g_roster_no, g_category, :POST_HISTORY_MULTIPLE.idcode, :POST_HISTORY_MULTIPLE.joining_post_dt,
    :POST_HISTORY_MULTIPLE.leaving_post_dt,:POST_HISTORY_MULTIPLE.entry_gp_stage);
    END IF;
    next_record;
    ELSIF :SYSTEM.last_record = 'TRUE' THEN
    UPDATE post_history
    SET idcode = :POST_HISTORY_MULTIPLE.idcode,
    joining_post_dt = :POST_HISTORY_MULTIPLE.joining_post_dt,
    leaving_post_dt = :POST_HISTORY_MULTIPLE.leaving_post_dt,
    entry_gp_stage = :POST_HISTORY_MULTIPLE.entry_gp_stage
    WHERE post_no = :POST_HISTORY_SINGLE.post_no
    AND category = :POST_HISTORY_SINGLE.category
    AND roster_no = :POST_HISTORY_SINGLE.roster_no;
    AND idcode = :POST_HISTORY_MULTIPLE.idcode;
    IF SQL%NOTFOUND THEN
    INSERT INTO post_history(post_no,roster_no,category,idcode,joining_post_dt,leaving_post_dt,entry_gp_stage)
         VALUES (g_post_no,g_roster_no,g_category,:POST_HISTORY_MULTIPLE.idcode,
              :POST_HISTORY_MULTIPLE.joining_post_dt,:POST_HISTORY_MULTIPLE.leaving_post_dt,:POST_HISTORY_MULTIPLE.entry_gp_stage);
    END IF;
    EXIT;
    END IF;
    END LOOP;
    SET_ALERT_PROPERTY('user_alert',ALERT_MESSAGE_TEXT, 'Record Updated successfuly' );
    v_button_no := SHOW_ALERT('user_alert');
    FORMS_DDL('COMMIT');
    CLEAR_FORM(no_validate);
    Please Guide me
    Thanks in advence

    UPDATE post_history
    SET idcode = :POST_HISTORY_MULTIPLE.idcode,
    joining_post_dt = :POST_HISTORY_MULTIPLE.joining_post_dt,
    leaving_post_dt = :POST_HISTORY_MULTIPLE.leaving_post_dt,
    entry_gp_stage = :POST_HISTORY_MULTIPLE.entry_gp_stage
    WHERE post_no = :POST_HISTORY_SINGLE.post_no
    AND category = :POST_HISTORY_SINGLE.category
    AND roster_no = :POST_HISTORY_SINGLE.roster_no;
    AND idcode = :POST_HISTORY_MULTIPLE.idcode;
    UPDATE post_history
    SET idcode = :POST_HISTORY_MULTIPLE.idcode,
    joining_post_dt = :POST_HISTORY_MULTIPLE.joining_post_dt,
    leaving_post_dt = :POST_HISTORY_MULTIPLE.leaving_post_dt,
    entry_gp_stage = :POST_HISTORY_MULTIPLE.entry_gp_stage
    WHERE post_no = :POST_HISTORY_SINGLE.post_no
    AND category = :POST_HISTORY_SINGLE.category
    AND roster_no = :POST_HISTORY_SINGLE.roster_no;
    AND idcode = :POST_HISTORY_MULTIPLE.idcode;These update statements are without where clause, so it will update all records.
    If it is specific to oracle forms then u may get better help at Forms section.

  • Error: Could not resolve s:states to a component implementation.

    So I am trying to setup states on a Flex application I'm building, but it doesn't seem to want to compile. I get this error:
    $ ./build.sh
    Loading configuration file /Applications/Adobe Flash Builder 4/sdks/4.1.0/frameworks/flex-config.xml
    uploader.mxml(24): Error: Could not resolve <s:states> to a component implementation.
        <s:states>
    Here is my build command nothing special ...
    $ cat ./build.sh
    #!/bin/bash
    mxmlc -output bin/uploader.swf src/uploader.mxml
    I have a class that extends the Spark application like so ...
    package com.uploader.controllers
        import spark.components.Application;
         dynamic public class FlashUploader extends Application
    Then in my main application mxml file I use it like so ...
    <?xml version="1.0" encoding="utf-8"?>
    <c:FlashUploader xmlns:fx="http://ns.adobe.com/mxml/2009"
        xmlns:s="library://ns.adobe.com/flex/spark"
        xmlns:mx="library://ns.adobe.com/flex/mx"
        xmlns:v="com.uploader.view"
        xmlns:c="com.uploader.controllers.*"
        minWidth="709" minHeight="400"
        skinClass="com.uploader.skins.UploaderApplicationSkin">
        <fx:Style source="styles.css" />
        <!-- states -->
        <s:states>
            <s:State name="default" />
            <s:State name="startup" />
            <s:State name="uploading" />
            <s:State name="normal" />
        </s:states>
    </c:FlashUploader>
    Now when I try to compile I get the states error. I've found several examples and even made a dummy app just using the spark application and it compiles fine. Not sure if I'm doing anything weird here but the few other flex devs I know don't seem to see anything wrong with what I'm doing that could cause this.

    When you define an object using a namespace you have to use the same namespace for its properties, so you will want to use "<c:states>" instead of "<s:states>" in this case.

  • How to maintain the state in Extn

    Dear all,
    I have created the extn using creative suite for photpshop. when i click my extn name, it will initilize everytime. e.g.if user login the extn and he/she will close the extn. Aftre that when user again hit on my extn. it will initilize, and ask for login again. how could i maintain the state in that case? Any suggestion or solution will appreciated..

    Hi,
    use a setPropertyListener to save the row key of this select item and then restore this key as the current selected key.
    Frank
    Ps.: I don't ask why you call clearForRecreate() on the iterator. I am sure you have a reason.

  • Problem with Decode statement

    Hi
    I am trying to achieve the following in my report:
    If an employee has a surname of . (dot) or a first name of . (dot), the report should not display a dot. An employee's name is made up of surname, first name and middle name which should all be concatenated together. To try to achieve this, I have the following statement in my report:
    decode(e.Surname, '.', ( LTRIM(RTRIM((INITCAP(e.FIRST_NAME)))||' '||INITCAP(e.MIDDLE_NAME)) ) ,
    e.FIRST_NAME, '.', ( LTRIM(RTRIM((INITCAP(e.Surname)))||' '||INITCAP(e.MIDDLE_NAME)) ) ,
    ( LTRIM(RTRIM((INITCAP(e.SURNAME )))||', '||INITCAP(e.FIRST_NAME)||' '||INITCAP(e.MIDDLE_NAME)) ) ) as emp_name
    FROM Employee e
    Problem: The above statement is only working for those employees with surname of . (dot). It's not working for first names of dot. How can I use the decode statement OR is there any other way of doing it without using the CASE statement?
    It seems my decode statement doesn't work with 2 different fields (surname, firstname) being tested within one decode statement.Thanks.

    Thank you so much InoL . I have used the ltrim with Replace but now have a new problem.
    Because I am joining Surname, First name and middle name together and put a comma after the Surname, the name now appears as follows:
    , Maria Ane (if Surname is a dot)
    Boiler, (if first name is a dot)
    I would like to get rid of a comma and only have comma when surname or first name does not have a dot, i.e. for those people with full names e.g. Blake, Anna Marie.
    InoL, how can I achieve this? Thanks.

Maybe you are looking for

  • IPad Not Being Detected by iTunes

    All of a sudden, iTunes has stopped recognizing my iPad when it's connected. This wasn't a problem a couple of days ago and now it is. iTunes may have been updated recently, so that may be it. The only way I can get iTunes to recognize my iPad is to

  • Can't restore from time machine after SSD upgrade

    Macbook Pro 13" mid-2009, 10.7.5 Lion I just swapped out my 160GB  HDD with a 250GB SSD on my MBP. When I booted up, I pressed Command-R to try to get into recovery mode but all it does was showing a gray folder with a question mark on it. I had prev

  • How do you cool down the iPod touch

    How and is it bad if you don't?

  • How to run a script op Indesign startup?

    Hi, I have a script that runs fine when manually running it in inDesign CC. Now i need that script to run automatically when a file is opend in InDesign. I put the script in "stratup scripts" folder. But get the error that there is no active document

  • Photo operations between iPad and PC

    I'm a PC guy who has just purchased an iPad for travel.  Here's what I want to be able to do: Take pictures with my iPhone or Canon. Move those pictures to the iPad. Edit the pictures on the iPad. Add keywords to the pictures. After the trip, move th