ObservableSet/Map as items for List/TableView

In quite a few cases I have a model in which underlying data has no inherent sorting - it comes as an unordered set of items. They might be added/removed/updated at random time. I would like to use Set<MyItem> or Map<Key,MyItem> and let the sorting 'sort out' the ordering, but it seems that it is not possible - all controls expect ObservableList and SortedList can be created only on top of other ObservableList.
My current workaround is to just use ObservableList as a base model and do O(n) operations for removals, but I feel wrong about having strongly-ordered collection with random order as a base.
Is there any way to create ObservableList which would present Set/Map.values+provided sorting?

Figured it out ...was too obvious ....perhaps there is a cleaner way ...
<logic:iterate id="thisuserpolicy" name="vps" scope="request" type=VerdictsPoliciesBean" >
<% String key = (String)thisuserpolicy.getVerdictName();
String mapprop = "uservalues(" + key + ")";
String [] possiblePolicies = (String [])thisuserpolicy.getPossiblePolicies();
%>
<tr >
<td >
<bean:write name="thisuserpolicy" property="verdictName" /></td>
<td>
<html:select name="antiSpamForm" property="<%= mapprop %>">
<%
String thisPolicy="";
for ( int i = 0; i < possiblePolicies.length; i++ ) {
thisPolicy = possiblePolicies;
%>
<html:option value="<%=thisPolicy%>"/>
<%
%>
</html:select>
</td>
</tr>
</logic:iterate>

Similar Messages

  • Using apex item for list of number for 'IN' clause

    Greetings,
    I have a computation that looks like this:
    select count(mr.mr_id)
    from ds_moriver mr
    where mr.approved = 0 OR mr.approved IS NULL
    and mr.mr_id NOT IN (:P62_MRID)
    I am looking to enter numbers in the NOT IN clause like '123,234,...'
    I have a text field item (P62_MRID) where the user can enter IDs for the NOT IN clause.  So for example, 13578,182.  If the user enters one number it works fine.  If the user enters 2 numbers with a comma (13578,182) then I get this error when the computation is run:
    ORA-01722: invalid number
    So substituting 13578,182 for P62_MRID the SQL statement should compute as:
    select count(mr.mr_id)
    from ds_moriver mr
    where mr.approved = 0 OR mr.approved IS NULL
    and mr.mr_id NOT IN (13578,182)
    Why am I getting the error, 'ORA-01722: invalid number'?
    Thanks in advance!
    John

    Glad to help. Don't know how long you've been using APEX, but thought I'd caution you against "going wild" with the item substitution syntax. In general, if you can do it with bind variable syntax, that's better. The use of item substitution syntax can contribute to SQL injection attacks. But, if you have suitable control over the contents of the items being substituted, the risk is mitigated. Just don't create an APEX process like this:
    begin
       &P10_TEXT_DIRECTLY_FROM_USER.
    end;
    That'll get you into trouble.

  • How to set item level permission for list item in SharePoint 2013

    Hi we had a custom List "ABC".
    List had 2 columns:
    Project Name: (P1, P2, P3, P4, P5, P6)
    Project Leads: (PL1, PL2, PL3, PL4, PL5, PL6).
    All project Leads can have permission to edit only their Project (P1, P2, P3) like
    PL1 can edit P1
    PL2 Can edit P2.....
    But my Question is how to restrict PL2 cannot have permission to edit P1
    is it possible to set permission for this through OOTB in SharePoint 2013.
    Any help will be appreciated......

    Hi
    check this similar post
    http://social.technet.microsoft.com/Forums/ro-RO/e1ea3655-0c6f-4b3d-a336-c42e8eb54c09/rights-to-edit-own-items-for-list-residing-on-publishing-site?forum=sharepointdevelopmentprevious
    Romeo Donca, Orange Romania (MCSE, MCITP, CCNA) Please Mark As Answer if my post solves your problem or Vote As Helpful if the post has been helpful for you.

  • Workflow for list item cancels

    Hello!
    I create item in PWA list via timer procedure (c#).
    I have a workflow configured in SPD on item creation.
    In timer code I open a web from definet user, so item in list creates without any problem (author - this definite user), but workflow stops immediately with error:
    RequestorId: 47da81b9-1361-8e8e-2f05-c8376aa8939c. Details: System.ApplicationException: HTTP 401 {"x-ms-diagnostics":["3001000;reason=\"There has been an error authenticating the request.\";category=\"invalid_client\""],"SPRequestGuid":["47da81b9-1361-8e8e-2f05-c8376aa8939c"],"request-id":["47da81b9-1361-8e8e-2f05-c8376aa8939c"],"X-FRAME-OPTIONS":["SAMEORIGIN"],"SPRequestDuration":["29"],"SPIisLatency":["1"],"Cache-Control":["private"],"WWW-Authenticate":["Bearer
    realm=\"2185ffaf-5b35-41d5-89ac-85ba7fd54a3a\",client_id=\"00000003-0000-0ff1-ce00-000000000000\",trusted_issuers=\"00000005-0000-0000-c000-000000000000@*,[email protected]7fd54a3a\"","NTLM"],"X-AspNet-Version":["4.0.30319"],"X-Powered-By":["ASP.NET"],"X-Content-Type-Options":["nosniff"],"X-MS-InvokeApp":["1;
    RequireReadOnly"],"MicrosoftSharePointTeamServices":["15.0.0.4420"],"Date":["Fri, 12 Sep 2014 08:01:33 GMT"]} {"error_description":"The server was unable to process the request due to an ...
    When I run code with elevated privileges, workflow runs without error, but from system account (it looks like this, because workflow can't create Project from item and it creates tasks as Workflow, not as "Workflow from user").
    User profiles servises are running, I can find profile for user in central admin and c I can run full sync.
    I also have restarted IIS for1000s times...
    Help me please, how can I run workflow from specific user (I gave him even app admin permissions, but it still doesn't work)?
    From LOGS:
    The set of claims could not be mapped to a single user identity. Exception 3001002...
    The registered mappered failed to resolve to one identity claim...
    STS Call Claims Saml: Problem getting output claims identity...

    Hello!
    I have found solution.
    I have study dozen forums and sites about SP and this one
    http://stackoverflow.com/questions/6382583/use-credentials-to-interact-with-the-client-object-model-of-sharepoint gave me an idea.
    I had to rewrite my code. I set 
    using (ClientContext context = new ClientContext("http://yourserver/")) {
    context.Credentials = new NetworkCredential("user", "password", "domain");//here my code for list item creation}
    instead of 
    SPSite spsite = new SPSite(siteUrl, spusertoken);
    SPWeb web = spsite.OpenWeb();
    // and so on
    So, now SP has no problem with fiding initiator profile and workflows starts correctly automatically after an item was created.
    Maybe this solution could save somebody's day.
    Kate.

  • Report on delivery data in item level for list of po

    Dear all
             How to take Report on delivery data in item level for list of po
    regards
    M.Chandra mohan

    You can check any of the standard reports like ME2M with the selection variant as "PO where GR exists"

  • How to implement tooltip for the list items for the particular column in sharepoint 2013

    Hi,
    I had created a list, How to implement tooltip for the list items for the particular column in SharePoint 2013.
    Any help will be appreciated

    We can use JavaScript or JQuery to show the tooltips. Refer to the following similar thread.
    http://social.technet.microsoft.com/forums/en/sharepointdevelopmentprevious/thread/1dac3ae0-c9ce-419d-b6dd-08dd48284324
    http://stackoverflow.com/questions/3366515/small-description-window-on-mouse-hover-on-hyperlink
    http://spjsblog.com/2012/02/12/list-view-preview-item-on-hover-sharepoint-2010/

  • Unable to find mapping Interface columns for Service Items in Sales Order

    Hi All,
    I have a requirement to create a service item for a Sales Order through Interface tables. Once the oe_headers_iface_all and oe_lines_iface_all tables are populated, order import program is run to populate the data into the base tables.
    I am unable to figure out the interface mapping columns for the base table columns namely,
    (oe_order_lines_all table)
    service_ref_order_type
    service_ref_order_numbe
    service_ref_line_number
    service_ref_shipment_number
    Also, the above mentioned base table columns are mandatory and not able to create a Service item through Order import.
    When checked in the front end, per record history these columns are taken from oe_order_lines_v, however when checked in the query of this view am unable to trace the above four columns.
    Any help will be greatly appreciated.
    Thanks,
    Jay

    This does not appear to be connected with the subject of this forum, which is [Oracle Application Express|http://apex.oracle.com/i/index.html].
    Taking a wild guess, this might have something to do with [eBusiness Suite|http://forums.oracle.com/forums/category.jspa?categoryID=3]?

  • Capturing Detail Items for a Related List in a New Item Form

    I have a simple (ha!) requirement to capture Purchase Requests with the individual line items being captured in a separate List.  I have been using InfoPath, but will consider ANY solution at this point.
    If I have an Edit Item Form, I can have a Data View (LIst View Web part) that will display all related items in my Details List (using a filter on the Parent ID).  I can even add a Data Form Web Part below this to allow for the entry of a single itme
    at a time, and make the lookup field of the new item default to the ID of the parent item.
    All well and good for the Edit Item.  But if I want to do the same on my New Item Form, I am up the proverbial without a paddle because I do not have access to the ID of the Parent List Item (that is still being captured).
    So, using any of the standard SharePoint technologies (except Visual Studio), how can I create a New Item Form, in which I can enter items for a related details List and see those detail items already entered, all while capturing the original form?

    Hi Mike,
    According to your description, my understanding is that you want to get the details of the related items in New Item form.
    I recommend to edit the new item form in InfoPath and use repeating table to display the related items based on the value in the lookup column.
    Here are the detailed steps:
    Edit the new item form(listB for example) in InfoPath and then add the related list(listA for example) including all the details you need as external data source to the form.
    Choose the secondary data source added in step1 in Fields panel and then expand dataFields, then right click d:SharePointListItem_RW and select Repeating Table to insert the secondary data source added in step1 as repeating table to the form.
    Right click d:SharePointListItem_RW in the Fields panel and select Rules, then click New and select Formatting in Rules panel.
    Click None under Condition in Rules panel, then select ID field in the repeating table in the first box, select is not equal to in the second box, then choose Select a field or group in the third box and select Main under Fields, then click the lookup field
    in the form and then click OK.
    Select Hide this control under Formatting in Rules panel.
    Thanks,
    Victoria
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Victoria Xia
    TechNet Community Support

  • Retrieve permision levels for all items in list programatically

    Hi all,
    I need to retrieve all permission levels for all items in a list programatically using client object model in sharepoint 2010.Please send me the code sample.
    Regards,
    Praveen

    Hi Praveen,
    This blog has the code that you are looking for -
    http://www.learningsharepoint.com/2010/07/27/programatically-get-permissions-for-list-and-item-client-object-model-sharepoint-2010/
    or this forum for an idea -
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/6b16b407-203b-4c5b-9605-713904e9b22e/sharepoint-2010-how-to-get-a-list-of-permissions-for-each-individual-user?forum=sharepointadminprevious
    Hope this helps!
    MCITP: SharePoint 2010 Administrator
    MCTS - MOSS 2007 Configuring, .NET 2.0
    | SharePoint Architect | Evangelist |
    http://www.sharepointdeveloper.in/
    http://ramakrishnaraja.blogspot.com/

  • Create Multiple tasks for Single Item in List using state machine workflow in sharepoint

    Hi,
    I want to create multiple create tasks for Single Item in List based on Assigned to column using state machine Workflow through visual studio
    Here Assigned to column allows multiple users. so i have to create task for every user based on column .
    I'm trying for this but i didn't got any solution
    Please provide solution for this.

    Hi,
    According to your post, my understanding is that you wanted to allow multiple users to approve.
    There are some articles about creating parallel tasks in state machine workflow, you can have a look at them.
    http://www.codeproject.com/Articles/477849/Create-Parallel-Task-in-State-Machine-Workflow-in
    http://msdn.microsoft.com/en-us/library/office/hh128697(v=office.14).aspx
    http://social.technet.microsoft.com/Forums/office/en-US/b16ee858-4360-479a-a686-4ee35b7be9db/sharepoint-2010-workflow-creating-multiple-tasks?forum=sharepointdevelopmentprevious
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • How to map import process for items

    Dear All,
    can anyone guide me how to map import process for items for our customer
    what i understand is this process in B one
    Raise PO
    GRPO
    Landed Cost
    AP Invoice
    I want to know whether this is correct. Also in this process their are clearing agents who perform the formalities at customs office and then raise bill to client for the same

    Hi,
    The process looks correct.  For cost related to clearing agents who perform the formalities at customs office, use landed cost.
    Thanks,
    Gordon

  • Procurement for kit item without listing its child components in PO

    Hi Experts,
                Could any one explain me how to get the solution for below scenario
    The purchase order will be placed for kit item and which has list of child components (For example 4 to 5 components). The child components may not be listed in PO. During goods receipt against the PO, how to track the child components into GR and child components may be recorded as staggered delivery. 
    Regards,
        Ramprakash

    Hi,
    The purchase order will be placed for kit item and which has list of child components (For example 4 to 5 components). The child components may not be listed in PO. During goods receipt against the PO, how to track the child components into GR and child components may be recorded as staggered delivery.
    every item there should be in PO line item for goods receipt
    we can not used BOM in PO
    Regards
    Kailas Ugale

  • Reg: visual attribute for list item

    hi frs,
    i have created a listitem i have used
    APP_ITEM_PROPERTY2.SET_PROPERTY('list4',VISUAL_ATTRIBUTE, 'color');
    in keylistval Trigger.
    when i select one particular item in the list it should have background color mentioned in the VISUAL_ATTRIBUTE 'color'.
    but what is happening is when i select one particular item visual attribute is set to all items in list.
    why it is so?
    how can i solve this problem.
    any one help pls.
    Thanks
    Rajesh

    1- I have three list box on the form as well so whether post-text-item works over therei have no issues with this and it is working fine in my forms list box
    2- and i have 3 datablock among which 2nd and thid datablock is multirecord datablock where i set current record visual attribute so what is the behaviour @ run time either current record Visual attribute override current item VA or it works fine
    it is working perfectly in multi record also..you need to remember in post text trigger use the same visual attribute used for current record visual attribute

  • FRM-30351: No list elements defined for list item.

    Hello!
    i have a list_item with name NOMBRE and in a NEW_FORM_INSTANCE trigger i have the following pl/sql block to populate it:
    declare
         grp_producto recordgroup := find_group('RECORD_PRODUCTO');
         lst_item item := find_item('PRODUCTO.NOMBRE');
         status number;
    begin
         status := populate_group(grp_producto);
         clear_list(lst_item);
         populate_list(lst_item,grp_producto);
    end;
    when i run the form, this message appear
    FRM-30351: No list elements defined for list item.
    List NOMBRE
    and the list appear without elements
    ...can somebody explain me the solution or if i have to do another thing to populate the list?
    Thanks

    Hi Duncan!
    i rewrote the manually code and agregate the clear_list function that i think you refer with "Make sure that the block is empty before you do this". This work the first time but in the next time a change that i do in the database isn't reflected in the list, i think that my cursor mantain the old information, well, can you indicate me some way to clear the cursor or something similar? or explain me another solution?
    thanks so much!
    declare
    nombre_producto soportebwv2.producto.nombre%type;
    lst_item item;
    i number:=1;
    CURSOR cur IS
    select nombre
    from soportebwv2.producto;
    begin
    lst_item:= find_item('PRODUCTO.NOMBRE');
    clear_list(lst_item);
    open cur;
    loop
    fetch cur into nombre_producto;
    exit when cur%NOTFOUND;
    add_list_element(lst_item, i, nombre_producto, nombre_producto);
    i:=i+1;
    end loop;
    close cur;
    end;

  • No list elements defined for list item.

    hi master
    when i use list item and run then give this error
    FRM-30351: No list elements defined for list item.
    List PRODUCT_NO
    Created form file MODULE1.fmx

    Try posting your question to Forms

Maybe you are looking for