SelectItem and object

Hello all,
i would like to add all users to a SelectOneMenu. This is what i do:
userlist.add(new SelectItem(user, user.getName))This works fine. All user names are rendered in the SelectBox. Now i want to choose a user fron the list and use it in my backing bean. But i get the error:
Convert error: Value ... 'null Converter'How to get the current selected value object user from the list? Regards,
ak

Hi again,
one solution for my problem is to implement a custom converter UserConverter [b]:
public class UserConverter implements Converter{
     public Object getAsObject(FacesContext context, UIComponent component, String value) {
          NaviBean navibean = (NaviBean)FacesUtils.getManagedBean(BeanNames.NAVI_BEAN);
          List <SelectItem> list = navibean.getList();
          Iterator it = list.iterator();
          User result = null;
          while (it.hasNext()){
               SelectItem sel = (SelectItem)it.next();
               if (value.equalsIgnoreCase(sel.getLabel())){
                    result = (User)sel.getValue();
                    break;
          return result;
     public String getAsString(FacesContext context, UIComponent component, Object value) {
          User user = (User)value;
          return user.getFirstname()+" "+user.getSurname();
}Is this the correct solution? This way i have to iterate through my list of SelectItems... Any other solutions? Many regards,
ak

Similar Messages

  • Communication between javascript and Objective-c in iOS.

    We wanted to have a communication between javascript and objective c code. We have already tried the below approach.
    To load fake URLs in JS and append a string which will be used as parameter to the Objective-C code and parse that URL in this delegate method:
    -(BOOL)webView(UIWebView *)webView shouldStartLoadWithRequest(NSURLRequest *)request navigationType(UIWebViewNavigationType)navigationType
    Then send the return value by calling the native method stringByEvaluatingJavaScriptFromString again with parameter callID.
    But we wanted to access Objective class object in Javascript code so that we can call it's methods from javascript code using this object.Android supports this behaviour using addJavaScriptInterface method in webview. Is it possible to have the similar approach in IOS? If not what is the best approach possible to acheive this? If we could achieve similar behaviour then we don't need to change the Jacascript code and will be reused. Please suggest the best possible solution.
    Regards,
    Karthik M.

    https://developer.apple.com/library/mac/documentation/AppleApplications/Conceptu al/SafariJSProgTopics/Tasks/ObjCFromJavaScript.html

  • System and Object privileges question

    hello everyone.
    I was really making it a priority to really understand both system and object privileges for users. I have setup a couple of 'sandboxes' at home and have done lots of testing. So far, it has gone very well in helping me understand all the security involved with Oralce (which, IMHO, is flat out awesome!).
    Anyway, a couple of quick questions.
    As a normal user, what view can I use to see what permissions I have in general? what about permissions on other schemas?
    I know I can do a:
    select * from session_privs
    which lists my session privileges.
    What other views (are they views/data dictionary?) that I can use to see what I have? Since this is a normal user, they don't have access to any of the DBA_ views.
    I'll start here for now, but being able to see everything this user has, would be fantastic.
    Cheers,
    TCG

    Sorry. should have elaborated more.
    In SQLPLUS, (logged in while logged into my Linux OS), I am working to try and get sqlplus to display the results of my query so it is easy to read. Right now, it just displays using the first 1/4 or 1/3 of the monitor screen to the left. Make sense? So it does not stretch the results out to utilize the full screen. it is hard to break down and read the results because they are "stacked" on top of each other.
    Would be nice if I could adjust sqlplus so the results are easier to read.
    HTH.
    Jason

  • How to remove file path location listings from photos and objects in Acrobat Pro 9.0 PDF?

    After converting a windows-based Powerpoint 2007 presentation to an Acrobat Pro 9.0 PDF, the file path location of all photos and objects are shown in a dialogue box when the cursor is moved over the image as seen in this screenshot below. How can I stop this from happening and remove this feature on my pdf documents? 

    I saw that referenced on a forum, but it does not seem to address the issue I am having.
    As per Adobe Acrobat X Standard * What’s new, the equivalent to the "Tools > Protection > Remove Hidden Information" utility found in Acrobat X Standard is the same as the "Document > Examine Document" feature in Acrobat Pro 9.0. Those tools seem to cover meta data, book marks, hidden text, and deleted or cropped content, but not the file path listings that appear on images and objects converted from Powerpoint presentations and other MS Office programs.
    I have reviewed the settings used while creating a pdf, and have also tried the “Advanced > Preflight tool”, but could not find anything to apply to the issue at hand.
    Thus, this issue has not been resolved, but seems like it should be an easy fix that anyone who publishes pdf documents would want to use to publish clean, professional documents without anyone seeing the file path location of every object and image shown in the document on their hard drive.

  • Reset Text Wrap and Object Placement defaults?

    Using Pages 5.5.2 (w Yosemite).
    Wondering if there's any way to set a default preference for the Text Wrap and Object Placement parameters in the Format > Arrange tab? 
    For example, more often than not I need to have Text Wrap set to "None", rather than "Automatic".  I was at least hoping that once I'd set a particular object to "None", any new objects I created or which were dragged into that same document would inherit that same Text Wrap setting (in much the same way that any new drop shadow setting becomes the new default when applying the drop shadow effect to subsequent selections). But even THAT doesn't seem to be the case with the Text Wrap & Object Placement options -- much less being able to reset a new global preference.
    Any suggestions (which still involve using Pages 5.5.2) appreciated.
    Thanks,
    John B

    just discovered a related topic: when importing images in Pages, how do I set the default object placement to "stay on page" and "no text wrap"?
    But that thread ends up going in a slightly different direction, since having to create placeholder shapes, and then duplicating (+ individually repositioning) same, for almost every time I dragged an image into a Pages doc would actually be MORE work than the current annoyance of having to reset the Text Wrap setting for most new objects.
    I just want a way to set a global preference for that adjustment -- or at least a preference to have all new objects start off with the same Text Wrap (and Object Placement) settings as the last ones used.
    Possibility?  Or Feature Request?

  • XML attributes and object types

    I want to create an XML Document of the following form
    <family>
    <parent attr1="val1">
    <child attr2="val2" attr3="val3"/>
    </parent>
    </family>
    Using object table and object type (for the child element), I am able to produce the following XML Document (with a "select * from family" query)
    <family> <!-- rowset -->
    <parent> <!-- row -->
    <attr1>val1</attr1>
    <child>
    <attr2>val2</attr2>
    <attr3>val3</attr3>
    </child>
    </parent>
    </family>
    The question is: how am I going to query these data so that the "attr" elements are mapped to attributes (using XSU only, without XSLT)?
    I have already tried the following:
    1. Using
    SELECT attr1 as "@attr1",
    f.child.attr2 "@attr2",
    f.child.attr3 "@attr3"
    FROM family f
    all the attributes are obviously appended to the "parent" element.
    2. Using nested table for "child" and the following query
    SELECT attr1 as "@attr1",
    CURSOR (
    SELECT n.child.attr2 as "@attr2", n.child.attr3 as "@attr3"
    FROM TABLE(f.child n)
    ) AS "child"
    FROM family f
    I am getting the following document
    <family>
    <parent attr1="val1">
    <child>
    <child_ROW attr2="val2" attr3="val3"/>
    </child>
    </parent>
    </family>
    Is there a smart SQL query to produce the desired document? What data types
    is it recommended to use to define my db schema (object types, nested tables...)?
    Thank you in advance
    null

    Finally, I got the desired XML format output from relational tablse using schema based XMLType views.
    Wherein I created Object Types from relational table, generated the schema for the Object type, registered the schema and finally created XMLType Views for populating the XML data from Relational Tables.
    I guess, you all might aware of my problem, where I got struck. Instead of printing the data in XML format I am successful in generating the XML format data Using the Query Select from BLABLA_Type_view* . I am able to print the number of rows, that I require which is in the fallowing format.
    Column Name
    1. SYS.XMLTYPE ----- As a row
    The view I am querying for is printing the data in a string format, where in I got to do the fallowing query
    SELECT SYS.XMLTYPE.getStringVal(OBJECT_VALUE) FROM BLABLA_Type_view. Which ultimately gave me the required data in XML format with tags.
    Thanks for every one who tried to give a try to solve, especially "mdrake"

  • Time_building_block_id and object version number

    Hello,
    could someone help me out with an explanation how the time_building_block_id and object version number to be interpreted?
    Are these independent? What actions create new ID and new ovn?
    My first idea was that one ID can have different instances in the table with different object version numbers. However I found cases belonging to the same parent buildingblock where both the id and ovn are different.
    So based on this only one of the columns could be primary.
    However for the joins both are used typically at the same time, suggesting that the two together constitutes a primary key.
    Are the DETAIL level records belonding to the same DAY level record to be treated as co-existing entries and their measure to be summarized? Or only the latest (bigger ovn?) to be considered, so it is an updated version of the record with the previous ovn?
    thanks!

    The version number in the TC Building blocks is used to identify changes to timecard building blocks. It is not the same as an object version number on a record in a table.
    OTL keeps an audit history of all changes to the timecard, at whatever level they occur. It uses this in retropay processes to identify the 'true' hours to use.
    TC Building blocks have a 'scope', for example there are building blocks at these levels:
    Timecard
    Period / Application
    Day
    Detail
    If you entered 8 hours on a new timecard for Monday 07/09/09 it would create a building block record for that date and call it version 1.
    If you later make a change to that DAY, OTL will create a new record with version 2. Say this one shows 7 hours.
    OTL can then interpret this as -8 + 7 = -1 and make the appropriate adjustment.
    Hope that helps explain it!
    Regards
    Tim

  • Scope and Objectives of making java swing scientific calculator

    I am going to write code for java swing scientific calculator..... can any body help me to write scope and objectives of this project.... please please :-(

    If this is for school work, then defining the scope is part of the problem. The only advice I will give you is that you only need to implement what the assignment specifies. It is probably intentionally vague so you can bite off way too much and not finish -- failure should teach you something too.
    I had just such an assignment in my software engineering class in college -- create a cross compiler from X to Y where X and Y where known instruction sets. That was the entire assignment -- plus the instruction sets for X and Y. My team looked at the allotted time and resources availabe and decided to do a minimal implementation.
    We where the only team to complete the assignment and all recieved A's because we accurately implemented the required solution and were able to evaluate the real problem--resource allotment--accurately.
    Each other team tried to add "extras" that would "guarantee" them an A grade. In actuallity it was just a lot more work than they could do though and it hurt them in the long run--No matter how good the work was to the point they had at the end of the semester, each student in the other teams only recieved a B or less grade in the class due to failure on that project. Resource allocation and planning--only you can do that for your team/project.

  • Problem with editing the size of artboard and objects in illustrator!

    I was using a custom size of artboard in illustrator, but I now I want to change it to A4 size for printing. However, when I change it to a A4 size artboard, the size of objects on that artboard remain unchange. As a result these objects do not fit the new size of artboard. Are there any way that I can change both the size of artboard and objects at once? Thank you!

    Probably not.  Don't suppose you have a proportion scale handy?  Alright, don't worry about it.  Give me the size of your original ( in inches ) and the size of A4 ( in inches ), I can give you the scale percentage ( you input into the scale dialog box ).  Whatever you do, keep your original file and do the enlargement on a "copy" of the original.  You already have the new artboard, not it is just a simple matter of enlarging the artwork to fit the new size.

  • Type Messages and Objects turned from white to black in PDF

    When I exported my Keynote presentation to a PDF the Type Messages and Objects turned from white to black. The display in ”Preview” is ok but in Acrobat PDF Viewer it looks black instead of white. Only happens on some slides. I could not find a reason why this happened. Seemed kind of random to me when it happened. But the error was reproducable unless I rebuild it with new silides.

    Can you get the exact wording for that error? Is it can't mount iPod?
    Also, make sure iTunes is up to date...
    iTunes
    Finally, make sure your iPod's battery is charged up.
    btabz

  • Issue with html5 panoramas and objects

    I have a problem in visualizing panoramas and objects on my website (www.dee-lay.com); all other browsers do not have this flickering problem ..is something about my mistake?

    A good place to ask advice about web development is at the MozillaZine "Web Development/Standards Evangelism" forum.
    *http://forums.mozillazine.org/viewforum.php?f=25
    The helpers at that forum are more knowledgeable about web development issues.<br>
    You need to register at the MozillaZine forum site in order to post at that forum.

  • Roles and Object queries tab not visible in MBO attribute properties

    Hi,
    We have installed the SUP Personal developer edition 2.0 on a windows 2008 server. I am trying to create a sample application for getting the list of sales orders by using the SAP BAPI. Once I have the MBO in place, I see that I cannot view the 'Roles' and 'Object Queries' tabs in the 'Attributes' section of the MBO properties.
    Does anyone know why this happens? Is it due to configuration issues? Do help me out as we're trying to get a demo working.
    Thanks & Regards,
    Vaishnavi

    Hi Vaishnavi,
    Check whether you have selected "Advanced" mode . You should be able to see it.
    Regards,
    Viju

  • How do I copy text and objects from pages to and paste into Email, objects don't show in Email

    Anyone know how I copy text and objects from pages and paste into Email, objects don't show in Email, thanks

    You can't expect Mail to support all the objects of Pages which can include anything up to charts generated from spreadsheet tables.
    Even if Mail was a superset of Pages, what would the recipients who don't have either Mail or Pages, make of it?
    Peter

  • Dense Rank and Object types (oracle 9i and 10g difference).

    Hi all,
    One of my queries in my procedure uses scalar subqueries and object types.
    The code works fine in 10g but not in 9i. Both Object types and Dense_rank used below are present in both 9i and 10g.
    The following is a part of a bigger query.. but this is what it comes down to when I zero in on the error.
    -- In both 9i and 10g...
    CREATE OR REPLACE TYPE t_audit_type as object(
       add_tms date,
       add_user_id varchar2(20),
       order member function match (t t_audit_type) return integer
    Type created.
    CREATE OR REPLACE TYPE BODY t_audit_type as
    order member function match   (t t_audit_type) return integer is
    begin
      if add_tms < t.add_tms then
         return -1;
      elsif add_tms > t.add_tms then
        return 1;
      else
        return 0;
      end if;
    end;
    end;
    Type body created.
    create table t ( x int, y date);
    insert into t values(1, sysdate);
    insert into t values(1, sysdate+1);
    commit;In Oracle 10g..
    select min(t_audit_type(x,y))
    keep (dense_rank first order by x) result
    from t;
    RESULT(ADD_TMS, ADD_USER_ID)
    T_AUDIT_TYPE('19-JAN-10', 'User2')In Oracle 9i....
    9i> select min(t_audit_type(x,y))
      2   keep (dense_rank first order by x) result
      3   from t;
    select min(t_audit_type(x,y))
    ERROR at line 1:
    ORA-03113: end-of-file on communication channelHave any of you seen this before..? The connection is always being terminated when I run this command.?!

    Thanks Dom for your reply.
    Here is the message I found in the trace file for the error.
    ksedmp: internal or fatal error
    ORA-07445: exception encountered: core dump [0000000100D72F84] [SIGSEGV] [Address not mapped to object] [0x000000018] [] []
    Current SQL statement for this session:
    select min(t_audit_type(x,y))
           keep(dense_rank first order by x)x
    from tI will look in metalink and see if this has been addressed before.
    Thanks...!

  • Differences between object and object references

    What's the differences between object and object references? To me, it seems the same, but I am sure there are differences.
    Student s = new Student("Joe",20);
    s is an object of class Student. Can we say s is an object reference of class Student?
    Please clarify. thanks!!

    Student s = new Student("Joe",20);
    s is an object of class Student. Can we say s is an
    object reference of class Student?The thing you created via "new Student()" is an object. The variable you declared via "Student s" contains a reference to that object. People say all kinds of things but I find it clearer to differentiate between variables and the objects they refer to.

Maybe you are looking for

  • PDF Submit not working in Chrome & Safari

    I have a PDF with form fields added as well as a submit button, The action on the submit button exports all fields to a page on the server as HTML. This works fine in Firefox and IE but does not work in Chrome or Safari. Is there any known workaround

  • File Adapter's Write Functionality Error

    I am using BPEL PM10.1.3.1 and getting problem for the OrderBooking tutorial File Adapter’s Write Functionality BUILD FAILED D:\JDeveloper\jdev\mywork\OrderBookworkspace\POAcknowledge\build.xml:79: A problem occured while connecting to server "localh

  • Not approved requests in IT2001 ?

    hi there, is there a way to get NOT approved (with status SENT) absence requests from ESS in infotyp 2001 ? The normal way is that the request is stored after the absence is approved. reg, Martin

  • How to make rss work

    So, I'd like to get RSS working on my iMac. When I click on an RSS logo/button, I get the message "No associated application could be found." HUH??? Any idea on how to make RSS work??? In either Safari or Mail.

  • Java 6 version 38

    Where can I locate Java 6 version 38? Tried java.com they have version 39 .