Cannot set selectOneChoice value during reload (value auto become null)

Dear all,
I have a problem that getting null value in the SelectOneChoice field in a table binded to
a view object. If I change that SelectOneChoice to inputText, it works perfectly. The details
of the situation is described as follows:
I've binded a view objects with 8 attributes to a af:table, then I manually change
2 of the inputText fields inside 'Column' fields of the table to inputlistofvalue and
selectOneChoice. The code is as follow:
<af:column sortProperty="#{bindings.OpenBalanceVO1.hints.AcNo.name}"
sortable="false"
headerText="#{bindings.OpenBalanceVO1.hints.AcNo.label}"
id="c1" width="180"
inlineStyle="font-family:'Times New Roman', 'Arial Black', times, Serif; font-size:medium;">
     <af:inputListOfValues value="#{row.bindings.AcNo.inputValue}"
          label="#{bindings.OpenBalanceVO1.hints.AcNo.label}"
          required="#{bindings.OpenBalanceVO1.hints.AcNo.mandatory}"
          columns="#{bindings.OpenBalanceVO1.hints.AcNo.displayWidth}"
          maximumLength="#{bindings.OpenBalanceVO1.hints.AcNo.precision}"
          shortDesc="#{bindings.OpenBalanceVO1.hints.AcNo.tooltip}"
          id="it1"
          model="#{bindings.AcNo2.listOfValuesModel}"
          autoSubmit="false"
          returnPopupListener="#{backingBeanScope.backing_ImportOpenBalance.returnListener}">
          <f:validator binding="#{row.bindings.AcNo.validator}"/>
     </af:inputListOfValues>
</af:column>
<af:column sortProperty="#{bindings.OpenBalanceVO1.hints.CurrencyCode.name}"
     sortable="false"
     headerText="#{bindings.OpenBalanceVO1.hints.CurrencyCode.label}"
     id="c2">
     <af:selectOneChoice value="#{row.bindings.CurrencyCode.inputValue}"
          label="#{bindings.OpenBalanceVO1.hints.CurrencyCode.label}"
          shortDesc="#{bindings.OpenBalanceVO1.hints.CurrencyCode.tooltip}"
          id="it2" autoSubmit="false"
          partialTriggers="cb1 cb2">
          <f:selectItems value="#{loginInfo.activeCurrencies}" id="currenciesList"/>
     </af:selectOneChoice>
</af:column>
And I have binded the returnPopupListener to returnListerner event handler to automatically
set the Currency field (2nd field) after the user chose the Account field (1st field) from
the input list of value:
public void returnListener(ReturnPopupEvent returnPopupEvent) {
     RichInputListOfValues lovField = (RichInputListOfValues)returnPopupEvent.getSource();
     ListOfValuesModel lovModel = lovField.getModel();
     CollectionModel collectionModel = lovModel.getTableModel().getCollectionModel();
     JUCtrlHierBinding treeBinding = (JUCtrlHierBinding)collectionModel.getWrappedData();
     RowKeySet rks = (RowKeySet)returnPopupEvent.getReturnValue();
     List tableRowKey = (List)rks.iterator().next();
     DCIteratorBinding dciter = treeBinding.getDCIteratorBinding();
     Key key = (Key)tableRowKey.get(0);
     Row row = dciter.findRowByKeyString(key.toStringFormat(true));
     DCBindingContainer bc = getBindingContainer();
     DCIteratorBinding it2 = bc.findIteratorBinding("OpenBalanceVO1Iterator");
     OpenBalanceVOImpl viewObject = (OpenBalanceVOImpl)it2.getViewObject();
     FacesContext fctx = FacesContext.getCurrentInstance();
     ExpressionFactory elFactory = fctx.getApplication().getExpressionFactory();
     ValueExpression ve = elFactory.createValueExpression(fctx.getELContext(), "#{loginInfo}", LoginInfo.class);
     LoginInfo loginInfo = (LoginInfo)ve.getValue(fctx.getELContext());
     System.out.println("Return place: search date:" + loginInfo.getSearchDate());
     Row newRow = viewObject.createRow();
     String selectedAcNo = row.getAttribute("AcNo").toString();
     String selectedCurrency = row.getAttribute("CurrencyCode").toString();
     newRow.setAttribute("AcNo", selectedAcNo);
     newRow.setAttribute("CurrencyCode",selectedCurrency);
     newRow.setAttribute("OpenBal", 300);
     newRow.setAttribute("AvailBal", 200);
     newRow.setAttribute("CreateDate", new Date());
     newRow.setAttribute("EffectiveDate", loginInfo.getSearchDate());
     newRow.setAttribute("LockStatus", "N");
     viewObject.insertRowAtRangeIndex(rowIndex, newRow);
The problem occurs when I use a 'createInsert' button to create a new row in the table,
and then choose a value from the inputListOfValues. The new row refresh and get the value
I chose in the first column in the new row. But the second column (currency field) is left
as empty (null value). If I change the second column frmo selectOneChoice to inputText,
the correct Currency value (e.g. "HKD" or "USD") can be shown. So I wonder if there is any
additional tricks in order to set the selectOneChoice value during refresh.
Additionally I have tried to check the state of the view object attributes during the refresh
lifecycle and found that the following reload method (else place) is being reached 3 times after I click
the 'ok' button in the popup up in the inputListOfValue.
public void beforePhase(PagePhaseEvent event) {
     //System.out.println("i am here inside backing bean : before phrase 1 phrase ID:" + event.getPhaseId());
     if (event.getPhaseId() == Lifecycle.PREPARE_MODEL_ID) {
          if (!isPostback()) {
          } else {
               System.out.println("Post Back on Page Load!");
               DCIteratorBinding it2 = bc.findIteratorBinding("OpenBalanceVO1Iterator");
               OpenBalanceVOImpl viewObject = (OpenBalanceVOImpl)it2.getViewObject();
               RowSetIterator iterator = viewObject.createRowSetIterator(null);
               iterator.reset();
               while (iterator.hasNext()) {
                    //Row row = viewObject.getCurrentRow();
                    Row row = iterator.next();
                    System.out.print("Account:" + row.getAttribute("AcNo"));
                    System.out.print(",AvailBal:" + row.getAttribute("AvailBal"));
                    System.out.print(",OpenBal:" + row.getAttribute("OpenBal"));
                    System.out.print(",CurrencyCode:" + row.getAttribute("CurrencyCode"));
                    System.out.print(",EffectiveDate:" + row.getAttribute("EffectiveDate"));
                    System.out.print(",UserCreate:" + row.getAttribute("UserCreate"));
                    System.out.println("");
                    if (row.getAttribute("UserCreate").toString().equals("<current user>")) {
                         System.out.println("Match <current user> in preload");
                         //row.setAttribute("CurrencyCode", "USD");
               System.out.println("end of reload");
During the 1st time, the CurrencyCode field was set currently, but then in the 2nd and 3rd
times, it's value suddenly changed to 'null'. If I use inputText, all the 3 times currencyCode
field is showing correctly without the null issue.
Anyone can kindly give me some hints? Thanks a lot!!!

Dear all,
I have a problem that getting null value in the SelectOneChoice field in a table binded to
a view object. If I change that SelectOneChoice to inputText, it works perfectly. The details
of the situation is described as follows:
I've binded a view objects with 8 attributes to a af:table, then I manually change
2 of the inputText fields inside 'Column' fields of the table to inputlistofvalue and
selectOneChoice. The code is as follow:
<af:column sortProperty="#{bindings.OpenBalanceVO1.hints.AcNo.name}"
sortable="false"
headerText="#{bindings.OpenBalanceVO1.hints.AcNo.label}"
id="c1" width="180"
inlineStyle="font-family:'Times New Roman', 'Arial Black', times, Serif; font-size:medium;">
     <af:inputListOfValues value="#{row.bindings.AcNo.inputValue}"
          label="#{bindings.OpenBalanceVO1.hints.AcNo.label}"
          required="#{bindings.OpenBalanceVO1.hints.AcNo.mandatory}"
          columns="#{bindings.OpenBalanceVO1.hints.AcNo.displayWidth}"
          maximumLength="#{bindings.OpenBalanceVO1.hints.AcNo.precision}"
          shortDesc="#{bindings.OpenBalanceVO1.hints.AcNo.tooltip}"
          id="it1"
          model="#{bindings.AcNo2.listOfValuesModel}"
          autoSubmit="false"
          returnPopupListener="#{backingBeanScope.backing_ImportOpenBalance.returnListener}">
          <f:validator binding="#{row.bindings.AcNo.validator}"/>
     </af:inputListOfValues>
</af:column>
<af:column sortProperty="#{bindings.OpenBalanceVO1.hints.CurrencyCode.name}"
     sortable="false"
     headerText="#{bindings.OpenBalanceVO1.hints.CurrencyCode.label}"
     id="c2">
     <af:selectOneChoice value="#{row.bindings.CurrencyCode.inputValue}"
          label="#{bindings.OpenBalanceVO1.hints.CurrencyCode.label}"
          shortDesc="#{bindings.OpenBalanceVO1.hints.CurrencyCode.tooltip}"
          id="it2" autoSubmit="false"
          partialTriggers="cb1 cb2">
          <f:selectItems value="#{loginInfo.activeCurrencies}" id="currenciesList"/>
     </af:selectOneChoice>
</af:column>
And I have binded the returnPopupListener to returnListerner event handler to automatically
set the Currency field (2nd field) after the user chose the Account field (1st field) from
the input list of value:
public void returnListener(ReturnPopupEvent returnPopupEvent) {
     RichInputListOfValues lovField = (RichInputListOfValues)returnPopupEvent.getSource();
     ListOfValuesModel lovModel = lovField.getModel();
     CollectionModel collectionModel = lovModel.getTableModel().getCollectionModel();
     JUCtrlHierBinding treeBinding = (JUCtrlHierBinding)collectionModel.getWrappedData();
     RowKeySet rks = (RowKeySet)returnPopupEvent.getReturnValue();
     List tableRowKey = (List)rks.iterator().next();
     DCIteratorBinding dciter = treeBinding.getDCIteratorBinding();
     Key key = (Key)tableRowKey.get(0);
     Row row = dciter.findRowByKeyString(key.toStringFormat(true));
     DCBindingContainer bc = getBindingContainer();
     DCIteratorBinding it2 = bc.findIteratorBinding("OpenBalanceVO1Iterator");
     OpenBalanceVOImpl viewObject = (OpenBalanceVOImpl)it2.getViewObject();
     FacesContext fctx = FacesContext.getCurrentInstance();
     ExpressionFactory elFactory = fctx.getApplication().getExpressionFactory();
     ValueExpression ve = elFactory.createValueExpression(fctx.getELContext(), "#{loginInfo}", LoginInfo.class);
     LoginInfo loginInfo = (LoginInfo)ve.getValue(fctx.getELContext());
     System.out.println("Return place: search date:" + loginInfo.getSearchDate());
     Row newRow = viewObject.createRow();
     String selectedAcNo = row.getAttribute("AcNo").toString();
     String selectedCurrency = row.getAttribute("CurrencyCode").toString();
     newRow.setAttribute("AcNo", selectedAcNo);
     newRow.setAttribute("CurrencyCode",selectedCurrency);
     newRow.setAttribute("OpenBal", 300);
     newRow.setAttribute("AvailBal", 200);
     newRow.setAttribute("CreateDate", new Date());
     newRow.setAttribute("EffectiveDate", loginInfo.getSearchDate());
     newRow.setAttribute("LockStatus", "N");
     viewObject.insertRowAtRangeIndex(rowIndex, newRow);
The problem occurs when I use a 'createInsert' button to create a new row in the table,
and then choose a value from the inputListOfValues. The new row refresh and get the value
I chose in the first column in the new row. But the second column (currency field) is left
as empty (null value). If I change the second column frmo selectOneChoice to inputText,
the correct Currency value (e.g. "HKD" or "USD") can be shown. So I wonder if there is any
additional tricks in order to set the selectOneChoice value during refresh.
Additionally I have tried to check the state of the view object attributes during the refresh
lifecycle and found that the following reload method (else place) is being reached 3 times after I click
the 'ok' button in the popup up in the inputListOfValue.
public void beforePhase(PagePhaseEvent event) {
     //System.out.println("i am here inside backing bean : before phrase 1 phrase ID:" + event.getPhaseId());
     if (event.getPhaseId() == Lifecycle.PREPARE_MODEL_ID) {
          if (!isPostback()) {
          } else {
               System.out.println("Post Back on Page Load!");
               DCIteratorBinding it2 = bc.findIteratorBinding("OpenBalanceVO1Iterator");
               OpenBalanceVOImpl viewObject = (OpenBalanceVOImpl)it2.getViewObject();
               RowSetIterator iterator = viewObject.createRowSetIterator(null);
               iterator.reset();
               while (iterator.hasNext()) {
                    //Row row = viewObject.getCurrentRow();
                    Row row = iterator.next();
                    System.out.print("Account:" + row.getAttribute("AcNo"));
                    System.out.print(",AvailBal:" + row.getAttribute("AvailBal"));
                    System.out.print(",OpenBal:" + row.getAttribute("OpenBal"));
                    System.out.print(",CurrencyCode:" + row.getAttribute("CurrencyCode"));
                    System.out.print(",EffectiveDate:" + row.getAttribute("EffectiveDate"));
                    System.out.print(",UserCreate:" + row.getAttribute("UserCreate"));
                    System.out.println("");
                    if (row.getAttribute("UserCreate").toString().equals("<current user>")) {
                         System.out.println("Match <current user> in preload");
                         //row.setAttribute("CurrencyCode", "USD");
               System.out.println("end of reload");
During the 1st time, the CurrencyCode field was set currently, but then in the 2nd and 3rd
times, it's value suddenly changed to 'null'. If I use inputText, all the 3 times currencyCode
field is showing correctly without the null issue.
Anyone can kindly give me some hints? Thanks a lot!!!

Similar Messages

  • Dropdown values becoming null after deployment

    Iam using jdev 10.1.3.4 and oc4j 10.1.3.4 server.
    we have a ADF table in a page in the application with three dropdowns. when i run the page in jdev the values are getting populated correctly for every record.But After deployment, for some records the values in the dropdowns are becoming null. we have 85 records in our Database for which only 5 records have this problem after deployment. But this works fine in local server.
    Any help will be appreciated.
    Thanks,
    Lakshmi.

    Thank you very much for answering...
    I can't send all the code because it needs plenty of files to run. I'll just describe the "critical" parts of it:
    - my main class extends JPanel and implements ActionListener + FocusListener + ListSelectionListener
    - the JTable is declared by private JTable myTable = null;
    - the table is inited by a call to a private void method, with the followind code:
       myTable = new JTable(cellData,colNames);
       myTable.setName("my_table");
       myTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
       //... - the table is then put in a scroll pane:
       sTable = new JScrollPane(myTable);and the scroll pane put in the NORTH of a JPanel.
    - I put a listener on the table by:
       myTable.getSelectionModel().addListSelectionListener(this);Here is the most part of the misfuntionning code... the table goes well until the listener generates events... then the myTable instance becomes NULL.
    Thanks in advance for thinking about the problem's causes,
    Cheers.

  • [svn:fx-trunk] 9127: Fixes bug in Slider animation where we would set the actual value during the animation , ignoring any snapInterval setting.

    Revision: 9127
    Author:   [email protected]
    Date:     2009-08-05 17:25:39 -0700 (Wed, 05 Aug 2009)
    Log Message:
    Fixes bug in Slider animation where we would set the actual value during the animation, ignoring any snapInterval setting. The fix uses the pendingValue property to hold the animated value, which makes the slider look correct, but no actual value update is sent until the animation completes.
    QE notes: None
    Doc notes: None
    Bugs: SDK-21776
    Reviewer: Hans
    Tests run: checkintests, Mustella (gumbo/components/Slider)
    Is noteworthy for integration: No
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-21776
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/Slider.as

    Revision: 9127
    Author:   [email protected]
    Date:     2009-08-05 17:25:39 -0700 (Wed, 05 Aug 2009)
    Log Message:
    Fixes bug in Slider animation where we would set the actual value during the animation, ignoring any snapInterval setting. The fix uses the pendingValue property to hold the animated value, which makes the slider look correct, but no actual value update is sent until the animation completes.
    QE notes: None
    Doc notes: None
    Bugs: SDK-21776
    Reviewer: Hans
    Tests run: checkintests, Mustella (gumbo/components/Slider)
    Is noteworthy for integration: No
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-21776
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/Slider.as

  • Cannot set Skillbuilder SuperLOV value

    Hello,
    i have a superlov item, P1_CODE which i am trying to set it's value from javascript.
    $s('P1_CODE', 'AA.001');
    The Enterable field is set to Enterable - Not restricted to LOV but i cannot set the field as it remains null. I can select from the popup list or enter directly a value.
    If i use the same code on a e.g. TextBox it works fine.
    I'm using Apex 4.2.3 and SuperLOV 2.0.2
    Teo
    Thank you.

    It does work. Don't forget that the superlov is built as a fieldset which contains a hidden item ( = return value) and the text item ( = display value). Calling either $s or apex.item.setValue with one value will set the return value of the item.
    JavaScript APIs: apex.item.setValue
    JavaScript APIs: $s
    $s(pNd, pValue, pDisplayValue, pSuppressChangeEvent)
    You can see it working as expected by inspecting the html. When you want to set the display value as well as the return value, then simply provide a third parameter.
    eg
    $s("P18_SLOV", "JAMES", "7900")
    Now, also be aware that the superlov has some interesting methods available, as seen in the documentation:
    The getValuesByReturn and setValuesByReturn methods can be used to programmatically fetch return values and set the item using the return values. getValuesByReturn will return a JSON object with the results from the fetch. setValuesByReturn goes a step further using the return values to set the display and return values for the item. Example(s):
    $('#P1_ITEM_NAME').apex_super_lov('getValuesByReturn', '101');
    $('#P1_ITEM_NAME').apex_super_lov('setValuesByReturn', '999');

  • Cannot add new items to a value list in AW database

    I have a database which I have been using for many years. One of the fields is a value list. I just went to add another item to the list, and no matter what I do, the Create button is grayed out. I have another value list in the same database that works fine.
    There are currently 170 items in the value list that is causin the problem, but I didn't think that there was a limit to the number of items that can be is a value list. (At least there is nothing in the AW technical specifications to indicate thin. I duplicated the existing database, deleted about 20 items from the list, then saved the file, and reopened it, and still cannot add new items to that value list. Does anyone know what might be causing the problem?

    Oops
    I read too fast.
    Here is a short script which may help.
    Replace the pop-up item by a text one and edit the property myList in my script to fit your needs.
    Select the field to fill and run the script.
    Then choose an item in the displaid list. It will be pasted in the selected field.
    This trick would give you to work with a "no limit" list of items.
    -- [SCRIPT DB fillFieldFromAlist ]
    Assuming that
    the front document is a database one
    and that a text field is selected,
    run the script to select an item in a list
    and paste it in the field.
    Yvan KOENIG, Vallauris (FRANCE)
    le 19 mars 2007
    property MyList : {"item 1", ¬
    "item 2", ¬
    "item 3", ¬
    "item 4", ¬
    "item 5", ¬
    "item 6", ¬
    "item 7", ¬
    "item 8", ¬
    (* edit the list to fit your needs *)
    tell application "AppleWorks 6"
    activate
    tell document 1
    set laClasse to (get class of selection)
    if laClasse is not field then return (* the selection is not a field *)
    set myItem to choose from list MyList
    if myItem is false then return
    set the clipboard to myItem's item 1
    select menu item 7 of menu 3 (*
    Tout sélectionner •• Select All *)
    paste
    end tell -- document 1
    end tell -- AppleWorks
    -- [/SCRIPT]
    Yvan KOENIG (from FRANCE lundi 19 mars 2007 16:44:53)

  • Error: Set type Z contains multiple-value attributes

    Hi forum,
    I have a problem when i try to assign a set type with the same value but diferent name on another set type to the same product category.
    This is the detail of the error but i dont know where i have to set this indicator:
    If you set this indicator for a particular hierarchy, all categories and set types in this hierarchy are created in the PME.
    This gives you the following extended maintenance options at category level:
    You can assign set types with multiple-value attributes
    You can restrict value ranges and maintain default values for attributes of customer set types.
    Any sugerence about this?
    Regards and thanks in advance,
    Mon

    Hi Nelson,
    I create two set types, the description is not the problem. I have discover that when i try to assign these attributes in the same set type or in other appears this error.
    The set types have the same values. For example:
    zcountry1. Values: sp - spain. fr - france.
    zcountry2. Values: sp - spain. fr - france.
    When i try to configurate the comm_hierarchy in my category appears this error:
    Set type zcountry2 contains multiple-value attributes.
    Diagnosis
    The set type ZGAME5 contains multiple-value attributes. It cannot be assigned to the category as extended maintenance has not been activated.
    Procedure
    Multiple-value attributes are stored in the PME. If you want to use the set type ZGAME5, you must set the Extended Maintenance Options indicator for the hierarchy.
    Extended Maintenance Is Possible for the Hierarchy
    Definition
    If you set this indicator for a particular hierarchy, all categories and set types in this hierarchy are created in the PME.
    This gives you the following extended maintenance options at category level:
    You can assign set types with multiple-value attributes
    You can restrict value ranges and maintain default values for attributes of customer set types.
    Where is this indicator¿? in R3?
    So, these are the steps...can anybody help to me?
    Regards and thanks in advance.

  • Reason to set MaxErrorCount along with Propogate value for Excel Files

    Hi,
    I had an ETL earlier which processed CSV files from a folder. The requirement was to load the error files into a Rejected folder but continue to process all the files from the source Folder. This requirement was satisfied by setting the value of the
    system variable "Propogate" in EventHandler section for DataFlowTask to "false".
    MaxErrorCount value for the ForEach Loop is having its default value as "1".
    When tested, it was working perfectly fine
    Now currently there is an Excel file as source having same requirement as above. But even when then variable "Propogate" was set to "false" as above, the execution was getting stopped when an error file was found.
    Later I found the below link :
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/0065b5c2-f633-4cbf-81f9-031d1ed25555/how-to-skip-wrong-excel-files-ignore-errors-on-ssis-foreach-task
    As mentioned in the link, I have done below changes
    1)Set MaxErrorCount for ForEachLoop to 1000
    2)"Propogate" variable is set to false
    Now this is working perfectly fine.
    Can you please let me know why did the setting of "Propogate" worked for CSV but did not work for Excel. For Excel files why was an additional setting for MaxErrorCount  was required.
    It would be very much helpful if I can get a detail information on the above
    Thanks,
    Raksha
    Raksha

    Hi Raksha,
    In you SSIS package, setting the Propagate system variable to False of the Event Handler prevents the Data Flow Task (DFT) propagating its failure to its parent container. For the ValidateMetadata property of a Data Flow Task Component, it doesn’t only affect
    the DFT at design time but also at runtime. During the Validation phase, a component is supposed to check to make sure that the cached metadata in the package is still in sync with the underlying table/view/query. If there is a mismatch, the component returns
    a special status (VS_NEEDSNEWMETADATA). When this happens at design-time, SSIS triggers a metadata refresh by calling ReinitializeMetadata(). At runtime, this results in an error.
    In your scenario, by setting the ValidateMetadata property to false, the error of the DFT is avoided, hence, you don’t need to set the MaxErrorCount to a value more than 1.
    For more information about how ValidateMetadate property works, please see Matt’s answer in the following thread:
    http://stackoverflow.com/questions/3297097/validateexternalmetadata-property-what-exactly-does-this-do 
    Regards,
    Mike Yin
    TechNet Community Support

  • Setting Acroform field properties (not values) by importing FDF?

    Am I crazy or is there a way to set "hard-to-set-field-properties-unless-you-use-javascript" by importing an FDF document. Currently, when we are programatically adding fields to an AcroForm (some of our customers still require AcroForms) we can't set certain field properties because the API doesn't expose those properties for some reason. I think I remember reading that you can import an FDF file to set field properties (not field values). Is this true?
    Thanks

    This is a list of some of the properties that a fellow developer gave me that had to be set by executing javascript within Acrobat:
    fillColor
    borderStyle
    strokeColor
    lineWidth
    doNotScroll
    We aren't setting these properties during the end-user experience. We just need to do it programmatically during the design phase.
    I was wondering if we could import an FDF to set these properties. Heck, even better it would be great if we could import an FDF to create and position fields and set all of there properties. Is any of this possible?

  • The updated row cannot be refreshed because its key values are unset ERROR

    Hi
    Doing commit operation with adf business components on mysql database. The moment i have inserted a new record into the table i need to get the value of the primary key column for that inserted row.How to get the value of the primary key column.i set refresh on insert and refresh on update properties in the corresponding EO. then iam getting The updated row cannot be refreshed because its key values are unset or modified by database triggers. error.Suggest how to resolve this error and how to achieve this functionality.
    Thanks
    Satya

    Here the primary key column is auto_increment column in database table.

  • Dynamically set a value based on value selected from LOV

    Apex 4.2
    I'm having trouble creating a dynamic action to set a value. I've used dynamic actions to hide and show regions but for some reason cannot set a value.
    I have a select list  --> P101_LIST. Source Type is 'Database Column'. Source value or expression is 'person_id' The query is as follows:
    Select first_name, person_id
    From Persons
    I have a display value --> P101_DISPLAY. Source Type is 'Static Assignment'. Source value or expression I left blank.
    I would like for every time the user selects a name from P101_LIST, the P101_DISPLAY item gets updated to show the corresponding value(person_id).
    Because there are other page items / information on the page, I would prefer this to not submit / update the page. Wouldn't want other page items / information getting updated.
    Any help on this matter would be greatly appreciated. Thanks in advance.

    Hi,
    Create a DA:
    - event onChange P101_LIST
    - Action: PL/SQL
    - PL/SQL code:
    :P101_DISPLAY := :P101_LIST;
    Items to submit: P101_LIST
    Item to return: P101_DISPLAY
    And done.
    Regards,
    Joni

  • Stsadm Export "This constraint cannot be enabled as not all values have corresponding parent"

    I am trying to export a sharepoint site using the command "stsadm -o export -url http://prefix.domain.com/sites/sitename -includeusersecurity -filename c:\sitename"
    I have already done this on about 30 other sites.  This site is failing on export with the following message.
    [11/9/2009 3:39:39 PM]: FatalError: This constraint cannot be enabled as not all values have corresponding parent values.
    at System.Data.ConstraintCollection.AddForeignKeyConstraint(ForeignKeyConstraint constraint)
    at System.Data.ConstraintCollection.Add(Constraint constraint, Boolean addUniqueWhenAddingForeign)
    at System.Data.DataRelationCollection.DataSetRelationCollection.AddCore(DataRelation relation)
    at System.Data.DataRelationCollection.Add(DataRelation relation)
    at System.Data.DataRelationCollection.Add(String name, DataColumn[] parentColumns, DataColumn[] childColumns)
    at Microsoft.SharePoint.Deployment.ListItemObjectHelper.GetNextBatch()
    at Microsoft.SharePoint.Deployment.ObjectHelper.RetrieveDataFromDatabase(ExportObject exportObject)
    at Microsoft.SharePoint.Deployment.ListItemObjectHelper.RetrieveData(ExportObject exportObject)
    at Microsoft.SharePoint.Deployment.ExportObjectManager.GetObjectData(ExportObject exportObject)
    at Microsoft.SharePoint.Deployment.ExportObjectManager.MoveNext()
    at Microsoft.SharePoint.Deployment.ExportObjectManager.ExportObjectEnumerator.MoveNext()
    at Microsoft.SharePoint.Deployment.SPExport.SerializeObjects()
    at Microsoft.SharePoint.Deployment.SPExport.Run()
    I checked the SharePoint logs and the error message in there is the exact same.  Nothing is in the windows application error logs.
    I looked at what it was trying to do before the error and it failed on a task list.  I tried deleting the task list and trying again and it bombed on a document library next.
    I did some googling and found a hotfix http://support.microsoft.com/kb/955594 I tried to install it, but I have SP2 installed and therefore it said that the expected version was off.  Im assuming since I have SP2 and that hotfix is dated in 08 that it should be included in SP2 anyways.
    Does anyone have an idea on what is going on and how to fix it?  I am trying to migrate this sub site to a new server and set it up as a new site collection.

    Good you caught that ... somethings would have shut down at the 90day mark...
    Would you humor me and tell me what this does.. Note I changed the order of a few things, added a .bak to the filename and also added versions. 
    If this errors would go into the Windows Event Viewer and look for anything SharePoint related, then look at security logs and see if there are any errors. 
    stsadm -o export -url http://prefix.domain.com/sites/sitename -includeusersecurity -filename c:\sitename.bak  -includeusersecurity –versions 4
    Kris Wagner, MCITP, MCTS
    Twitter @sharepointkris
    Blog: http://sharepointkris.com

  • How can I set a variable number of values in a SQL IN clause?

    Hi,
    How can I set a variable number of values in a SQL IN clause without having to change the text of the SQL statement each time?
    I read the link http://radio.weblogs.com/0118231/2003/06/18.html. as steve wrote.
    SELECT *
    FROM EMP
    WHERE ENAME IN (?)
    But we need the steps not to create type in the system and would there be any other solution if we would like to use variable number of values in a SQL IN clause ?
    We are using JDeveloper 10.1.3.2 with Oracle Database 10.1.3.2
    Thanks
    Raj

    Hi,
    can you please explain why the solution from steve is not the right solution for you.
    regards
    Peter

  • How to set to-mode to Fixed Value and give a date in RSDV transaction

    Hi
             I am working in BI7.0 environment. I am deploying HR Reporting Project. I need to load data to HR Info Cube 0PAPA_C02, to do this I need to maintain validity slice (RSDV transaction) for the Info Cube. After first load I need to set "to-mode-'Fixed Value'" and give a date such as 31.12.9999.
            Can anyone please let me know the steps on how to set- to mode to Fixed Value in RSDV.
    Thanks

    Here's the basic steps to follow:
    1) Go to tcode RSDV, enter the InfoCube name (0PAPA_C02) and Execute.
    2) If there is data already in the InfoCube you will get a validity table with default validty dates from 0CALDAY.
    3) Click on the Display/Change button so that you're in change mode and edit the validity date to be 31.12.9999.
    4) In the To-Mode column, set the value to 'F' for fixed.
    5) Put the fixed date value (31.12.9999 in your example) in Fixed to time.
    6) Click on Save.

  • How to set Value Attribute (under valu node) at run time

    Hi,
    This is my View context.
    wbsElement (Value Attribute of Type String)
    This is my Component Controller Context.
    Project_info  (Value node)->Wbs_Info (Value Node)-WBS(Value Attribute).
    Initially I want to set some dummy values to wbsElement(view attribute),sothat I can show that in drop downby key.
    On selecting of wbsElement I want to pass the selected value to component controllers ValueAttribute - WBS (this Value attribute is under 2 nodes-see the structure I've given).
    I tried this way which is not working fine.
        IWDNodeElement element = wdContext.createWBSElement();
         wdContext.nodeWBS().addElement(element);
        wdContext.currentWBSElement().setWBS(wbsElement);
    Can anyone tell me which is the correct way to do this?
    This is very urgent.plz help me in this.Thankx in advance.
    Regards,
    Karthick

    Hi Karthick,
       try this code.
    IPublic<compcontrolllername>.IWbc_infoElement  obj  =         wdThis.wdGet<Componentcontrollername>Controller().wdGetContext().createWbc_infoeElement();
    obj.setWBS(wdcontest.currentContestElement.getwbsElement());
    wdThis.wdGet<Componentcontrollername>Controller().wdGetContext().nodeWbc_infoElement().addelement(obj);
    set the cardinality of Project_info to 1:n or 1:1
    test this one
    if you find any problem let em know
    regars
    Naidu

  • Name cannot begin with the '\"' character, hexadecimal value 0x22

    I am trying to create Calculated Column in SharePoint Document Library using Client Object Model.
    However getting following error while executing FieldSchema:
    Name cannot begin with the '\"' character, hexadecimal value 0x22
    Code:
     var calculated = "Calculated";
     var displayName = "Effective Date";
     var internalName = "Effective Date";
     var formula = "=IF(ISBLANK(Col_DocumentEffectiveDate),\"\",TEXT(Col_DocumentEffectiveDate,\"DD-Mmm-YYYY\"))";
     List lib = clientContext.Web.Lists.GetByTitle(docLibName);
     clientContext.Load(lib);
     clientContext.ExecuteQuery();
    string fieldSchema = "<Field Type=\"" + calculated + "\" DisplayName=\"" + displayName + "\" Name=\"" +internalName+ "\" Formula=\"" + formula + "\"
    />";
    lib.Fields.AddFieldAsXml(fieldSchema, true, AddFieldOptions.AddFieldInternalNameHint);
    clientContext.ExecuteQuery();
    Code does't work if i replace quotation marks("\) in Formula with "&quot;"
    Could someone help with issue?

    Hi,
    I suggest you take the code below which works in my environment to do the test again:
    ClientContext clientContext = new ClientContext("http://sp/");
    List list = clientContext.Web.Lists.GetByTitle("List2");
    FieldCollection fields = list.Fields;
    clientContext.Load(fields);
    clientContext.ExecuteQuery();
    var displayName = "Cal2";
    var formula = "=IF(ISBLANK([Created]), \"\" , TEXT([Created], \"DD-Mmm-YYYY\"))";
    var fieldSchema = "<Field Type='Calculated' DisplayName='" + displayName + "' ResultType='Text'><Formula>" + formula + "</Formula></Field>";
    fields.AddFieldAsXml(fieldSchema, true, AddFieldOptions.DefaultValue);
    clientContext.ExecuteQuery();
    Feel free to reply if the issue still exists.
    Best regards
    Patrick Liang
    TechNet Community Support

Maybe you are looking for

  • Lousy Performance of Mac Pro X1900 XT in Leopard

    Being the paranoid person I am, I installed Leopard to an external FW 800 drive to test it. Immediately, the window drawing in Leopard did not seem as snappy to me as it did in Tiger. Then, I pulled up iTunes, to check what version of iTunes comes wi

  • Normal operating temp for ms 7548 mobo

    I have a msi mobo thats running 100c all the time,two case fans,new 550 power supply,and replaced all bad caps  on the board (had a pro do it). Doesnt move,just stays at 98-100c. Checked temp on Speccy,everything else is running in the low 20s. Any h

  • UCCX CAD Report Data Source?

    I have a situation where I want to hide some information from the report that the agents can see from thier CAD. I know how to create custom Historical reports and also how to manipulate the Stored Procedures for those but I want make a minor change

  • How to Use a Picklist with a HTML form

    I use the HTMl Web Bean Edit Form. I want to add a text box in the second cell of the table instead of creating a new row. Furhter How can I specify a Picklist which fetches data from a view object on the same form. null

  • I just installed RH 10 and it doesn't work

    Hello, I apologize for my poor english. I used to run RH 6 and it worked very well for the past 6 years. My compagny purchased RH 10 a few days ago. I installed RH 10 and after running a few seconds, it shuts without any message. Just a nice shutdown