Retrieving column value from multiselect managed metadata column and updating metadat column in list.

I have Library having metadata column when a document is uploaded i need update another list with metadata column of
library in list.I have an event reciever to do that,Code is given below
public override void ItemUpdated(SPItemEventProperties properties)
            base.ItemUpdated(properties);
                SPList saList = properties.Web.Lists["mylist"];
                SPListItem item = saList.AddItem();
                item["Department"] = properties.ListItem["Department"].ToString();
                EventFiringEnabled = false;
                item.Update();
                EventFiringEnabled = true;   
my elements.xml file is as below
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <Receivers ListUrl="Documents">
      <Receiver>
        <Name>DocumentItemUpdated</Name>
        <Type> ItemUpdated</Type>
        <Assembly>$SharePoint.Project.AssemblyFullName$</Assembly>
        <Class>MyDocuments.Documents.Documents</Class>
        <SequenceNumber>10000</SequenceNumber>
      </Receiver>
  </Receivers>
</Elements>
but i did not see the the List column getting updated.But when i use the code to update a column of single line of text
it works fine.But when i do it for multi select metadata column in debug mode i could see its giving null value even though Library had column value.
Any pointers on how to update Multiselect metadata column programatically on itemeadding event in library to a list will
be helpful.

You need to use the TaxonomyFieldValueCollection class. The following code is from SP2010 but should still apply in SP2013. It is an example of updating multivalued taxonomy fields.
public static void SetListItemMultiMetaDataColumn(Int32 id)
using (SPSite site = new SPSite("http://basesmc2008"))
using (SPWeb web = site.OpenWeb())
TermSet termSet = null;
TaxonomySession txs = new TaxonomySession(site);
SPList list = web.Lists["Shared Documents"] as SPList;
SPListItem item = list.GetItemById(id);
TaxonomyField field = item.Fields["multimanage"] as TaxonomyField;
if (field != null)
termSet = txs.DefaultSiteCollectionTermStore.GetTermSet(field.TermSetId);
Term term = termSet.GetTerms("sts", false).FirstOrDefault();
if (field.AllowMultipleValues)
TaxonomyFieldValueCollection currentCollection = item[field.Id] as TaxonomyFieldValueCollection;
TaxonomyFieldValue tfv = new TaxonomyFieldValue(field);
tfv.TermGuid = term.Id.ToString();
tfv.Label = term.GetPath();
tfv.WssId = TaxonomyField.GetWssIdsOfTerm(site, txs.DefaultSiteCollectionTermStore.Id, termSet.Id, term.Id, false, 1).First();
currentCollection.Add(tfv);
field.SetFieldValue(item, currentCollection);
item.Update();
Blog |SharePoint Field Notes Dev Tool |
SPFastDeploy

Similar Messages

  • How to prevent editing a SharePoint site column value from document properties view of a downloaded document?

    Hi,
    We have created a SharePoint site column with below settings
    1. ShowInEditForm - False
    2. ShowInNewForm - False
    3. ShowInDisplayForm - True
    With the above definition, the site column showing only in view properties form not in New and Edit forms.  This column is added to a document library and updating this column value will be managed by event receiver code when a document is uploaded.
    Till this point, everything is working OK.
    But the issue is when we download and open a document from the above document library, under document properties the above column (with value) is visible along with other document default properties and  this column value is editable. With this issue,
    user is able to set a new value and overwrite the existing value by re-uploading the document.
    Could you please let me know how to handle this issue so that user should not be allowed to edit except viewing the value/property (read only)?
    Thanks in advance.
    Regards
    Ramesh

    You can set "ShowInFileDlg" property of field to "FALSE". Using this you will not see that field in document properties list

  • Retrieving old column values from a after delete trigger dynamically

    I have a single audit table for deletions
    and the table structure has the following columns
    1: table_name
    2: column_name
    3: column_value
    I am writing a trigger on tables for which i want to have delete audits and i am dynamicaly
    retrieving the column names but i am unable to retrieve the column value dynamically;
    I tried to use the following statement but doesn't return the column value
    sql_stmt:= 'select :1 from dual';
    execute immediate sql_stmt into col_value using
    ':old.'| |v_col_name;
    where v_col_name is the name of the column which i retrieve dynamically using the
    dbms_sql.describe_columns procedure.
    Is their any way if i can retrieve the old column values in the trigger dynamically if i already
    have the column names in variables..
    Thanks in advance.
    null

    I don't know if Kevin's tip Help Mr. Sameer, but it did help me gain access to pre-deleted row column values.
    I did discover, however, that if the columns from the about-to-be-deleted row are used as inserts into another table, Oracle serves up a nasty-gram informing the user that values from the about-to-be-deleted table are unreliable.
    I was able to circumvent this constraint by assigning the about-to-be-deleted column values to local PL/SQL varables, then perform the insert using the variable values.
    -Bill McNamee
    NHDOT
    [email protected]

  • Join to get 'Note' Column value  from CS_SR_NOTES_V - Ramya

    Hi All,
    what is the join to get the 'NOTE' column value from the CS_SR_NOTES_V while joining to the cs_incidents_all _b table.
    One join is joining with the INCIDENT_ID of CS_INCIDENTS_ALL_B
    to the INCIDENT_ID of the CS_SR_NOTES_V....but the other column 'ID' of
    CS_SR_NOTES_V is to join to which column of CS_INCIDENTS_ALL_B ??????

    APP_OBJ_CODE='SR'
    ID IS JTF_NOTE_ID
    APP_OBJ_ID IS same AS incident_id
    I don't think you need additional join apart from incident_id since view CS_SR_NOTES_V retrieves only SR notes, and an SR can have multiple notes.

  • What is odiref. function to fetch column value from data store

    Hi
    Please Provide ODI Ref Function  to fetch the column value from source/target data store
    for ex: i want to fetch deptno from dept table by using odiref function.
    Thanks
    Cnu

    Hi Cnu,
    There are no odiRef functions to get data from source/target tables. Rather you can generate such query using odiRef functions and then use such query in the source command text. The retrieved data columns can then be used int eh target side command. You can find more details t Introduction to the Substitution API - 11g Release 1 (11.1.1)
    Thanks,

  • Get column values from list of values programmatically

    hi all
    how i get column values from list of values programmatically in the
    returnPopupDataListener method

    If this answers your question , please close this thread by marking it as answered.
    Thanks

  • How To Concatenate Column Values from Multiple Rows into a Single Column?

    How do I create a SQL query that will concatenate column values from multiple rows into a single column?
    Last First Code
    Lesand Danny 1
    Lesand Danny 2
    Lesand Danny 3
    Benedi Eric 7
    Benedi Eric 14
    Result should look like:
    Last First Codes
    Lesand Danny 1,2,3
    Benedi Eric 7,14
    Thanks,
    David Johnson

    Starting with Oracle 9i
    select last, first, substr(max(sys_connect_by_path(code,',')),2) codes
    from
    (select last, first, code, row_number() over(partition by last, first order by code) rn
    from a)
    connect by last = prior last and first = prior first and prior rn = rn -1
    start with rn = 1
    group by last, first
    LAST       FIRST      CODES                                                                                                                                                                                                  
    Lesand         Danny          1,2,3
    Benedi         Eric           7,14Regards
    Dmytro

  • How Can I get multi column values from dynamic search help?

    Hi Gurus;
    I'm using dynamic search help in my program.
    I want to get multi column values from search help. But I dont know solution for this issue.
    I'm using F4IF_INT_TABLE_VALUE_REQUEST FM.
    How Can I get multi column values from dynamic search help?
    Thanks.

    Believe it or not, the same FM worked for me in a dynpro. I will try to explain here how it works in custom screen and then you can do your work for other screens or program types. I am not going to write my actual work but will explain in general.
    I have 4 fields (FLD1, FLD2, FLD3, FLD4) and i made the search based on FLD2 and when user click on a line (could be any field), then this would bring the line on to the screens.
    There are like 3 steps.
    You have your value_tab for my fields FLD1, FLD2, FLD3 and FLD4. This is just the data that we pass into the FM. (data: IT_VALTAB type table of ZVAL_TABLE)
    Next map the screen fields into an internal table (data: It_dynpfld type table of dselc ). I also have other internal tables defined  (just to keep it straight, i will be putting here) data:  It_return type standard table of ddshretval.
    Next step is to call the function module. Make sure you have values in IT_VALTAB.
    call function 'F4IF_INT_TABLE_VALUE_REQUEST'
    exporting
            retfield        = 'FLD2'
            value_org       = 'S'
          tables
            value_tab       = It_VALTAB
            return_tab      = It_return
            dynpfld_mapping = It_dynpfld
          exceptions
            parameter_error = 1
            no_values_found = 2
            others          = 3.
        if sy-subrc <> 0.
          message id sy-msgid type sy-msgty number sy-msgno
          with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        else.
          perform get_selected_fields tables It_return.
        endif.
    The code within the perform GET_SELECTED_FIELDS  - We need to map the result fields after user selects it. The code goes like this. This is step is to update the dynpro fields.
    I need a internal table as well as a work area here. like,
    data: lt_fields type table of dynpread,
            la_fields type dynpread.
      field-symbols: <fs_return> type ddshretval.
    so fill out LT_FIELDS from the IT_RETURN table
    loop at lt_return assigning <fs_return>.
        la_fields-fieldname = <fs_return>-retfield.
        la_fields-fieldvalue = <fs_return>-fieldval.
        append la_fields to lt_fields.
        clear: la_fields.
      endloop.
    Call the FM to update the dynpro
    call function 'DYNP_VALUES_UPDATE'
        exporting
          dyname               = sy-repid
          dynumb               = '1002' "This is my screen number. You could use 1000 for selection screen (hope so)
        tables
          dynpfields           = lt_fields
        exceptions
          invalid_abapworkarea = 1
          invalid_dynprofield  = 2
          invalid_dynproname   = 3
          invalid_dynpronummer = 4
          invalid_request      = 5
          no_fielddescription  = 6
          undefind_error       = 7
          others               = 8.
      if sy-subrc <> 0.
        message id sy-msgid type sy-msgty number sy-msgno
                with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      endif.
    good luck

  • How to retrieve 2 values from a table in a LOV

    Hi
    I'm pretty new to APEX. I try to retrieve two values from a table using a LOV. I have a table named DEBIT with then columns SITE, NAME and KEY
    I want to display NAME to the user in a list. When the user select an item from the list, I want to retrieve the data of the SITE and KEY column of this item in order to launch an SQL command based on this two values.
    How to retrieve thes two values whant the user chooses an item from the list ?
    I apologize for my english, being french.
    Regards.
    Christian

    Christian,
    From what I understood about your requirement, you want a 'select list with submit' which displays "NAME" and based on the value selected, you want to get the corresponding values for "SITE" and "KEY" from the table.
    <b>Step 1: Create a select list with submit, say P1_MYSELECT </b><br><br>
    Use something like this in the dynamic list of values for the select list: <br>
    SELECT NAME display_value, NAME return_value
    FROM DEBIT<br><br>
    <b>Step 2: Create a page process of type PL/SQL block. Also create 2 hidden items P1_KEY and P1_SITE. </b><br><br>
    In the PL/sQL, write something like:
    DECLARE
      v_key DEBIT.KEY%TYPE;
      v_site DEBIT.SITE%TYPE;
      CURSOR v_cur_myvals IS
              SELECT KEY, SITE
              FROM DEBIT
              WHERE NAME = :P1_MYSELECT;
    BEGIN
      OPEN v_cur_myvals;
      LOOP
              FETCH v_cur_myvals
              INTO  v_key,v_site;
              EXIT WHEN v_cur_myvals%NOTFOUND;
    :P1_KEY := v_key;   
    :P1_SITE := v_site; 
      END LOOP;
      CLOSE v_cur_myvals;
    END; <br><br>
    Then you can use these values for whatever purpose you need to.
    Hope this helps.

  • How to retrieve the values from a table if they differ in Unit of Measure

    How to retrieve the values from a table if they differ in Unit of Measure?

    If no data is read
    - Insure that you use internal code in SELECT statement, check via SE16 desactivating conversion exit on table T006A. ([ref|http://help.sap.com/saphelp_nw70/helpdata/en/2a/fa0122493111d182b70000e829fbfe/frameset.htm])
    If no quanity in result internal table
    - There is no adqntp field in the internal table, so no quantity is copied in itab ([ref|http://help.sap.com /abapdocu_70/en/ABAPINTO_CLAUSE.htm#&ABAP_ALTERNATIVE_1@1@]).
    - - Remove the CORRESPONDING, so quantity will fill the first field adqntp1.  ([ref|http://help.sap.com/abapdocu_70/en/ABENOPEN_SQL_WA.htm])
    - - Then loop at the internal table and move the quantity when necessary to the 2 other fields.
    * Fill the internal table
    SELECT msehi adqntp
      INTO TABLE internal table
      FROM lipso2
      WHERE vbeln = wrk_doc1
        AND msehi IN ('KL','K15','MT').
    * If required move the read quantity in the appropriate column.
    LOOP AT internal_table ASSIGNING <fs>.
      CASE <fs>-msehi.
        WHEN 'K15'.
          <fs>-adqnt2 = <fs>-adqnt1.
          CLEAR <fs>-adqnt1.
        WHEN 'MT'.
          <fs>-adqnt3 = <fs>-adqnt1.
          CLEAR <fs>-adqnt1.
      ENDCASE.
    ENDLOOP.
    - You could also create another table with only fields msehi and adqntp and then collect ([ref|http://help.sap.com/abapdocu_70/en/ABAPCOLLECT.htm]) the data to another table.
    Regards,
    Raymond

  • Selecting Multiples Values from Multiselect Box

    Hi
    Here is my requirement ,
    Multiselect List Box should display Simulator_Type Values
    Simulator_Type Values           Values to search for in the column simulator type
    AC - small signal                              AC
    HB - Carrier                                    HB
    SP - Linear Noise                            SP - L
    SP - s parameters                           SP - s
    TR - Transient                               TR
    DC - operational point                     DC
    ET - Envelope Transient                  ET
    SSNA                                           SSNA
    [nothing]                                      nilDepending on the values selected in the multiselect values the data has to be dipayed where the value is in the simulator type column
    For Eg : AC - small signal is selected in the :p1_simulator_type multiselect box, The data where the word AC is in simulator_type column should display
    Examples of data in the simulator_Type column:
    SIMULATOR_TYPE
    ac, dcOp, Periodic Steady-pss
    AC - small signal
    AC Small Signal, Operating Point, Periodic Steady
    AC - small signal, SSNA
    DC - operational point
    ET - Envelope Transient
    So , here if i select AC - small signal from the multiselect list box , then the data where "AC" is there in simulator_type has to be displayed , in this case the data associated with
    ac, dcOp, Periodic Steady-pss
    AC - small signal
    AC Small Signal, Operating Point, Periodic Steady
    AC - small signal, SSNA
    has to be displayed...
    currently i have the report query below which is working but only when one simulator type is selected ....
    select
    * from   DW_RFA_JOBDATA
    where  RFA_SUBMIT_TIME >= :P1_START_DATE
    and RFA_SUBMIT_TIME < :P1_END_DATE    
    AND RFA_SIMULATOR_TYPE like '%'||:P1_SIMULATOR_TYPE||'%'Could any body please let me know how do i get data when multiple values are selected...
    Please let me know any further explanation is needed for the question
    Thank you
    Edited by: priyapinky on May 5, 2010 9:26 PM
    Edited by: priyapinky on May 5, 2010 9:54 PM
    Edited by: priyapinky on May 6, 2010 8:48 AM

    Hello,
    It seems to me like you don’t really understand how multi select items work in APEX. This type of items (we are talking about multi-select list, checkbox and the shuttle item) don’t really returned multiple values. They returned a single value that contains multiple segments, each include one valid option. By default, each segment is delimited with a colon (:). In your case it means that if you chose two values from your static LOV, the returned value will look similar to “HB:DC” (or any other combination of options). Now you need to work with this value.
    The way your RFA_SIMULATOR_TYPE column build, you can’t really work with the multi-select value, as you’ll never find a match to it, as this is actually an artificial value that only exist as a result of your multi-select.
    Regarding the new query you are trying, you wrote yourself that “i am getting the data with all the simulator_type select”, and that is correct. Where in this query you are using your filter (:P1_SIMULATOR_TYPE)? This is not the way to go.
    You need to break the compound value returned by your multi-select items, and work individually with each segment. You can do that in two ways. The simple one, as I already suggested, is to add another column that will contain only the code describing the simulator (similar to the returned value of the static LOV). In this case, using the instr() function you are checking if the column value is included in your filter (it’s a revered angle – you are actually checking if the single column value is included in your filter and not if the filter included in your column).
    The second option is a bit more complicated and it involves slicing the filter itself and dynamically build your query, using the “SQL Query (PL/SQL function body returning SQL query)” report option. In this case we are going to use the APEX built-in function APEX_UTIL.STRING_TO_TABLE(). The following is a very simple code example that you’ll need to adapt to your scenario:
    declare
      q      varchar2(4000);
      filter APEX_APPLICATION_GLOBAL.VC_ARR2;
    begin
      q := 'select * from emp where ';
      filter := apex_util.string_to_table('10:20');
      for i in 1..filter.count loop
        if i = 1 then
          q := q || 'deptno = ' || filter(i);
        else
          q := q || 'or deptno = ' || filter(i);
        end if;
      end loop;
      return q;
    end;In your case the parameter for the string_to_table is your filter item, and you can use LIKE as your comparison operator.
    Regards,
    Arie.
    &diams; Please remember to mark appropriate posts as correct/helpful. For the long run, it will benefit us all.
    &diams; Forthcoming book about APEX: Oracle Application Express 3.2 – The Essentials and More

  • Has anyone retrieved a value from a system Matrix from selecting the row

    Hi everyone, I am trying to retrieve the value of a cell from the first column of a matrix depending on which row the user has highlighted.  I can access the value from specifying which row to retrieve the value from but not from the user selecting which row.   Im attempting do do this from the open items list system form which is accessed from the reports menu. 
    To retrieve the value from the first row my code is as follows:
    oMatrix = oForm.Items.Item("5").Specific
    DocNo = oMatrix.Columns.Item("1").Cells.Item(1).Specific.Value
    SBO_Application.MessageBox(DocNo)
    How do I change this code to access the value of the cell depending on which row is highlighted?
    Any help would be appreciated

    Hi Sally,
    you will get the selected row number on any event through "pVal.Row", you can get this value in a integer variable like:
    int i = pVal.Row
    and pass it in your code;
    DocNo = oMatrix.Columns.Item("1").Cells.item(i)
    or you can do same in this way also:
    you have to specify your particular cell as a edit text and get the value of that:
    oEditText=(SAPbouiCOM.EditText)oMatrix.Columns.Item("1").Cells.Item(i).Specific;
    string1 = oEditText.String;
    Hope it will help.

  • 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

  • Re: [iPlanet-JATO] Re: Retrieving all Values from a Tiled View

    Todd,
    Let me try to explain you this time. I have a text field in a TiledViewBean.
    When I display the page, the text field
    html tag is created with the name="PageDetail.rDetail[0].tbFieldName" say
    five times/rows with same name.
    The html tags look like this.
    <input type=text name="PageDetail.rDetail[0].tbFieldName" value=""
    maxlength=9 size=13>
    <input type=text name="PageDetail.rDetail[0].tbFieldName" value=""
    maxlength=9 size=13>
    <input type=text name="PageDetail.rDetail[0].tbFieldName" value=""
    maxlength=9 size=13>
    When the form is submitted, I want to get the text field values using the
    method getTbFieldName().getValues() which
    returns an array object[]. This is in case where my TiledViewBean is not
    bound and it is working fine.
    Now in case when my TiledView is bound to a model, it creates the html tags
    as follows.
    <input type=text name="PageDetail.rDetail[0].tbFieldName" value=""
    maxlength=9 size=13>
    <input type=text name="PageDetail.rDetail[1].tbFieldName" value=""
    maxlength=9 size=13>
    <input type=text name="PageDetail.rDetail[2].tbFieldName" value=""
    maxlength=9 size=13>
    Now when I say getTbFieldName().getValues() it returns only the first
    element values in the object[] and the rest of the
    values are null.
    May be we need to create a utility method do get these values from
    requestContext.
    raju.
    ----- Original Message -----
    From: Todd Fast <toddwork@c...>
    Sent: Saturday, July 07, 2001 3:52 AM
    Subject: Re: [iPlanet-JATO] Re: Retrieving all Values from a Tiled View
    Raju.--
    I wanted to know how the getValues() method works the reason being,
    when the tiled view is NOT bound to a model, it populates all the
    fields with the same name as some thing likeI'm afraid I don't understand your point--can you please clarify? Do you
    mean "value" instead of "name"?
    What are you trying to do? What behavior are you expecting but notseeing?
    >
    Without further clarification, I can say that the setValues() methodsNEVER
    populates data on multiple rows of a (dataset) model, nor does it affect
    multiple fields on the same row. Perhaps what you are seeing is theeffect
    of default values. Model that derive from DefaulModel have the ability to
    carry forward the values set on the first row to other rows in lieu ofdata
    in those other rows. This behavior is for pure convenience and can be
    turned off, and it is turned off for the SQL-based models.
    Todd
    [email protected]

    Hi,
    I wanted to know how the getValues() method works the reason being,
    when the tiled view is NOT bound to a model, it populates all the
    fields with the same name as some thing like
    PageDetail.rDetail[0].tbFieldValue
    PageDetail.rDetail[0].tbFieldValue
    in which case, the getValues() method works fine.
    But in case where the tiled view is bound to a model, it populates
    with different field names such as,
    PageDetail.rDetail[0].tbFieldValue
    PageDetail.rDetail[1].tbFieldValue
    in this case, the getValues() doesn't work. Any soultion to this?
    We are using Moko 1.1.1.
    thanks in advance,
    raju.
    --- In iPlanet-JATO@y..., "Todd Fast" <toddwork@c...> wrote:
    Does anyone know of is there a single method to get all values of a
    display
    field in a tiled view without having to iterate through all the
    values ie
    resetTileIndex() / nextTile() approach.
    ie Something that returns an Object[] or Vector just like ND returned a
    CspVector. I tried using the getValues() methods but that allways returns
    a
    single element array containing the first element.
    (I think now, that method is used for multi selecteable ListBoxes)Actually, no. We can add this in the next patch, but for now, I'd recommend
    creating a simple utility method to do the iteration on an arbitrary model
    and build the list for you.
    Todd

  • How to get iterator values from a managed bean ?

    Due to a bug in selectOneChoice i'm not able to get the label list i want to display directly from an iterator when the value binding is a managed bean.
    To solve the problem i would like to create a managed bean that contains that list and use it as the selectItems to display.
    I would like that the values in that managed bean loaded from the a data control iterator.
    My question is :
    1) is it possible to access the iterator values from a managed bean, i mean without any reference to a page definition
    2) how to do ? is it documented somewhere ? any example ?
    Thank you

    I got it also with this code:
    package view.managedBeans;
    import classification.bean.ClassificationDocument;
    import classification.castor.ClassificationLanguage;
    import java.io.FileNotFoundException;
    import java.util.ArrayList;
    import java.util.HashMap;
    import java.util.Hashtable;
    import java.util.List;
    import java.util.Locale;
    import javax.faces.context.FacesContext;
    import javax.faces.el.ValueBinding;
    import javax.faces.model.SelectItem;
    import oracle.adf.model.generic.DCGenericDataControl;
    import org.exolab.castor.xml.MarshalException;
    import org.exolab.castor.xml.ValidationException;
    public class ClassificationLanguageList {
    private java.util.List<SelectItem> supportedLanguages = new ArrayList();
    public ClassificationLanguageList() throws FileNotFoundException,
    MarshalException,
    ValidationException {
    FacesContext ctx = FacesContext.getCurrentInstance();
    ValueBinding vb = ctx.getApplication().createValueBinding("#{data.ClassificationDocumentDataControl}");
    DCGenericDataControl classificationDocumentDataControl = (DCGenericDataControl)vb.getValue(ctx);
    ClassificationDocument classificationDocument = (ClassificationDocument)classificationDocumentDataControl.getDataProvider();
    ClassificationLanguage[] classificationLanguage = classificationDocument.getClassification().getClassificationLanguageList().getClassificationLanguage();
    for (int counter = 1; counter < classificationLanguage.length; counter++) {
    SelectItem language = new SelectItem();
    language.setValue(classificationLanguage[counter].getClassificationLanguageCode());
    language.setLabel(classificationLanguage[counter].getClassificationLanguageLabel());
    supportedLanguages.add(language);
    public void setSupportedLanguages(java.util.List<SelectItem> supportedLanguages) {
    this.supportedLanguages = supportedLanguages;
    public java.util.List<SelectItem> getSupportedLanguages() {
    return supportedLanguages;
    }

Maybe you are looking for

  • Problem in posting period

    hi, we have not closed the previous period (1/2008), bcoz still some work is pending. Now we want to do goods movement for the present month(2/2008). Can anybody help in this. thanks/regards vish

  • In Lion, Time Machine seems to be perpetually running - and running slowly

    Up through Snow Leopard, Time Machine did its incremental backup every hour quickly and stopped. Since upgrading to Lion back in July, Time Machine seems be be running almost all the time - and very very very slowly. There doesn't seem to be any exes

  • Processing service request error: QuickTime Error: -50? ***?

    Hey everyone, trying to export a movie from FinalCut Pro X with compressor and when compressor gets to the end I get this error and no file Processing service request error: QuickTime Error: -50 What is going on? Final Cut Pro X version 10.0.7 Compre

  • Time limit between purchase of voucher & exam date for SCJP

    Hello folks, i plan to give my SCJP 1.5 next week. (But i did not buy the voucher as yet because I was nt sure if i wd be in the US till Sept. ) If i buy the voucher today , what are the chances that i get to schedule my test next Saturday i.e. 8/09/

  • Regarging multiple controllers

    Requirement is to have multiple MRP controller in the selection.Regenerative planning necessary to convert planned orders outside of opening period to purchase requisitions. Job to run transaction MD15. if any one had any idea please let me know