Getting an object using madataService.getItem()

i can't get an item using
maDataService.getItem({itemId:valueId})
i'm using Flex and Hibernate ,i can get collection using
maDataService.fill() but i don't know what's wrong with getItem().
what can be wrong ?
thx

userList is a collection of Strings, yes?
<c:set var="user" scope="session">${userList[2]}</c:set>This sets user equal to a member of that list, a string.
first name: <c:out value="${user.firstName}"/>You're calling user.firstName - there is no firstName member of string...
If you want to send a bunch of strings to your view and do the same thing with all of them, put them in a list and iterate over them.
If you want to send data on a bunch of users and do the same thing with each group of information, I'd recommend creating a class to represent the data for each user, sending a list of those to your view, and iterating over them.
If you just want to send firstName, lastName, middleName, anotherName to the view and do different things with each of them, don't pack them in a list - just send them as standalone strings and do what you will.
Hope this helps!
- Kyle

Similar Messages

  • Need to get IRole object using Roles Display Name

    Hi,
    I need to get IRole object using Roles Display Name. I had the below code in EP 2004 SP12 and it works. But the same code dont work in EP 2004s SP13
    user = request.getUser();
    profile = request.getComponentContext().getProfile();     
    String strRoles = profile.getProperty("Roles");
    String strRole[] = strRoles.split(",");
    IRoleFactory roleFactory = UMFactory.getRoleFactory();
    String roleUniqueId = null;
    int i = 0;
    boolean flagRedirect = false;
    for(i = 0; i < strRole.length; i++){
         try
              com.sap.security.api.IRole role = roleFactory.getRoleByUniqueName(strRole<i>);
              roleUniqueId = role.getUniqueID();
              if(!user.isMemberOfRole(roleUniqueId, true))
                   continue;
              flagRedirect = true;                    
              break;
         catch(UMException ex)
         catch(IOException ex)
    if(!flagRedirect){
    Where property Roles will have comma separated roles display names like "com.ABC.ortho_reports,com.ABC.lawns_ortho_reports,com.ABC.executive_reports"
    Please advise.

    Thanks Mrudula for the response. Sorry for the delay in responding.
    I get UMEException with the message "Role with uniqueName com.ABC.general not found"
    But it works fine if i specify Role unique role (like pcd:portal_content/com.abc.Marketing_Workbench/com.abc.Roles/com.abc.general).
    We are in the process of upgrading Portal environment from EP6.0 SP12 to EP7.0 SP13. Above scenario works fine in the older environment.

  • Get all object using RandomAccessFile

    hi friends,
    i have one log file and this log file contain some object. and i am used Serializable Interface.
    i know basically object are not readable format, but consider log file(logInfo.log) contain some object like:
    12 javasun
    20 sunjava
    38 java
    96 sun
    like wise
    am using RandomAccessFile class and this my
    raf.writeInt(baos.size());
    raf.write(baos.toByteArray());
    raf.seek(0);
    int a = 0;
    while(true)
    a = raf.readInt();
    System.out.println("The pointer Value : " + a);
    byte[] b = new byte[a+4];
    int x=(int)raf.getFilePointer();
    System.out.println("file Pointer : " + x);
    raf.read(b,x,a);
    ByteArrayInputStream bais = new ByteArrayInputStream(b,x,a);
    ObjectInputStream ois = new ObjectInputStream(bais);
    Record rec = (Record)ois.readObject(); //here record is object
    System.out.println("The object : "+rec.getAttributes());
    using this code i got below result
    12 javasun
    but i can't get all object from the file(logInfo.log)
    how can i get all object? help me!!!...
    Thank You

    ok, sir
    i tried and i got all object from the file. Thank
    you,
    and,
    if i need last two object from file(logInfo.log)
    like
    38 java
    96 sun
    how can i get? please give some clue or code
    Thank youSince you don't have a set size for the objects, then you will have to read through the entire file always keeping the last two objects, and as soon as the read fails return them.
    As I said in your first thread, however, you would be much better off writing the objects with a set size (i.e. calling ByteArrayOutputStream(size) with a single max size rather than ByteArrayOutputStream( ) ) as you would then be able to use seek adding 4 (for the int) to size and multiplying by the position of the recordset you want to read (0 for the first). You would then, also be able to overwrite records and the such (which is the usually one of the main reasons for using something like RandomAccessFile, i.e. creating a Flat DB-Like File).
    Edit:
    And you would probably lose the int, then anyway (when using a set size), as it wouldn't be needed.

  • Core Data: Get Managed Object by unique part of the objectID

    In my Core Data application, I need to get the pointers to different managed objects whose CoreData objectIDs end with the number I provide. e.g.:
    Get the Person object whose objectID ends with unique number 317. The whole ID is:
    <x-coredata://A3EDF6C1-229D-4658-A04E-598ADF1C749A/Person/p317>
    or I need to get Department object, which ends with 5; again full ID is:
    <x-coredata://A3EDF6C1-229D-4658-A04E-598ADF1C749A/Department/p5>
    These numbers are actually primary keys in the SQLite database's tables and I can see them if I open the database directly with sqlite3, and I can of course select the records using SQL query;
    *but I can not figure out how to get these objects using CoreData. I guess I should create the NSPredicate for the fetch request; but I don't know how to write the predicate which will give me the exact object based on the unique part of the objectID*
    As I understand, objectIDs are not object's "normal" attributes.
    Please help. Thanks in advance.

    etresoft wrote:
    DavidMan wrote:
    *but I can not figure out how to get these objects using CoreData. I guess I should create the NSPredicate for the fetch request; but I don't know how to write the predicate which will give me the exact object based on the unique part of the objectID*
    I think you are supposed to consider the entire ID to be unique. You can retrieve the associated object using "objectWithID:" from NSManagedObjectContext.
    The problem is that I am parsing the text from another application and I have only the "unique part" at hand and not the whole objectID. So, I need to cope with that.
    What I see is that the IDs of every entity start with the same text, e.g. here are the IDs of two different entities:
    <x-coredata://A3EDF6C1-229D-4658-A04E-598ADF1C749A/Person/p317>
    <x-coredata://A3EDF6C1-229D-4658-A04E-598ADF1C749A/Department/p5>
    As you see, the difference is only in the end, after the entity names "Paper" and "Department". But this is my case and I am not completely sure that this will hold true for EVERY future installation on any system for every entity.
    *Question: will the part like <x-coredata://A3EDF6C1-229D-4658-A04E-598ADF1C749A be constant for the particular installation, for every entity/object?*
    If YES, then I will:
    - after getting any/first object, extract the non-unique part, i.e. <x-coredata...749A which is the same for every object in this particular installation on this particular computer
    - get the unique part, i.e. /Person/p317, /Person/p23, /Department/p5 etc.
    - synthesize the "real ID" by appending these two strings
    - ask managedObjectContext to return the object with this ID
    - continue with the acquired object
    How does it sound? Will this work on other computers?
    P.S. FYI: the coredata of this program has only one store i.e. all the data are stored in single sqlite file.

  • How to get list of custom objects used in abap report program?

    Hi friends,
    I have a requirement in which I have to scan the entire abap report and retrieve list of custom objects used in it for example custom tables, data elements, structures, table types etc,. Is there any provision in SAP like fuction modules to do this functionality?  As of now I am coding everything manually where so many possibilities are there for all kinds of objects. Provide your answers and suggestions...
    Thanks,
    Nastera

    Hi,
    The best way to do this is environment analysis. Follow the steps:
    1. Open se38, type in the program name (don't click on on display/change or create button, stay on first screen only)
    2. Click on environment analysis button (hot key SHIFT+F4)
    3. It will throw a pop-up, which will ask for type of object you want to see, which are linked /used by this program. select all (or may be if you are only interested in Tables, then select table only)
    4. Hit 'Enter'
    You will get the full list of all objects used in this report program. Just note down the one which starts with Z or Y and that's it.
    Cheers,
    Anid

  • How can i get the value stored in the session object using its sessionid

    how can i get the value stored in the session object using its sessionid by running stand alone java application

    myforum wrote:
    how can i get the value stored in the session object using its sessionid by running stand alone java applicationThis does not seem to make sense! You need at least to give a lot more detail of what you are doing.

  • How to get the "where used" of a portal object.

    Hi folks!
    I'm coding a program to get the list of the portal objects where a specific portal object (an iView  for example) is used. I found the method getWhereUsedList from IPcdContext but I'm getting some errors.
    Is this the best/correct way to get a "where used list"?
    Does anyone have an example of how to use this method correctly?
    Thanks in advance.
    Geraldo.

    Hi Tanja, thank you very much for your attention.
    Following your tips I figured out that the error was occurring during the casting and not during the getWhereUsedList method call. Now, I'm casting to Object. I'd like to cast to a more proper class. During my tests I got an error that showed me that the cast should be to a PcdGlSearchResult class. I couldn't find any javadoc for this class and when I changed the cast to this class I started to get a execution class load  error. Please let me know if you have any advice regarding the casting.
    private void getWhereUsed1(IPortalComponentRequest request, String id, StringBuffer sb) {
    InitialContext iCtx = null;
    Object objectId = null;
    String tString = null;
    Hashtable env = null;
    IPcdContext result = null;
                         env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY, IPcdContext.PCD_INITIAL_CONTEXT_FACTORY);
    env.put(Context.SECURITY_PRINCIPAL, request.getUser());
    env.put(Constants.REQUESTED_ASPECT, IPcdAttribute.PERSISTENCY_ASPECT);
    try {
    iCtx = new InitialContext(env);
    result = (IPcdContext) iCtx.lookup(id);
    for (NamingEnumeration ne = result.getWhereUsedList(""); ne.hasMoreElements();) {
    objectId = (Object) ne.nextElement();
    tString = objectId.toString();
    sb.append(tString + CR);
    } catch (Exception e) {
    StackTraceElement[] elements = e.getStackTrace();
    for (int i = 0; i < elements.length; i++)
    sb.append(elements<i> + CR);

  • Trying to get a handle to an object using CVI_ActiveApp, but it opens a new CVI everytime it runs. Is there a way to get a handle to an object without it opening up a new CVI?

    I'm trying to get a handle to an object using CVI_ActiveApp. It works, but it opens a new CVI application when it is run using the command line. Is it possible to get a handle to an object without a new CVI application opening up?

    Hi,
    In the help documentation for the CVI_ActiveApp function, it states:
    "If the server application is already running, this function may or may not start another copy of the application. This is determined by the server application."
    http://zone.ni.com/reference/en-XX/help/370051P-01/cvi/usermanual/actxappactiveapp/
    I don't believe you have control over whether or not a second instance is started.
    Regards,
    Lindsey W. | Applications Engineer | National Instruments

  • How to get al object's type used inside a function group

    Hello There,
    I want to create a program to get all the objects used inside a Function group, for example all the data structure type (not the field name of fieds ortable name used in import/export but their data types) used in import/export/table parameters of Function group or Function module inside that FG. I also want to know all the field types/function module/class/method etc used inside a FG.
    The main purpose is to create a program to know if a function group uses a object from a particular software component. we have a requirement in our project for example all the standard objects used in a program should belong to only sap_basis /sap_abap/sap_appl software component.
    I realy appreciate any help on the same.
    Mani

    Goto se80, provide the function group, double click on the object name, click on the main program button and get the function pool name. Now place this function pool name in se38 , go to menu utilities->environment analysis. You will get the list. If you would like to do this via custom program then see through debugging mode and check what is coded.
    Kesav

  • What SWO1 object uses by std. SAP to send email if OB IDOC get fails?

    Hello,
    We have SWO1 object IDOCAPPL in SWETYPECOU and we can use it to send an emaill to user's inbox, if IDOC get fails at all.
    But, this object is ONLY for inbound IDOCs.
    Am looking for similar object(SWO1) but my IDOCs are outbound, pls. let me know what object i can use from SWETYPECOU table to trigger email if my IDOC get fails? Here IDOC and FM are custom ones.
    or pls. let me know What SWO1 object uses by standard SAP to trigger email if outbound IDOC get fails (sales orders)?
    Thank you

    Changed requirements

  • How can i add custom attributes to a new Class Object using the API ?

    Hello everyone,
    Here is my problem. I just created a subclass of Document using the API (not XML), by creating a ClassObjectDefinition and a ClassObject. Here is the code :
    // doc is an instance of Document
    ClassObject co = doc.getClassObject();
    ClassObjectDefinition cod = new ClassObjectDefinition(ifsSession);
    cod.setSuperclass(co);
    cod.setSuperclassName(co.getName());
    cod.setName("MYDocument");
    ClassObject c = (ClassObject)ifsSession.createSchemaObject(cod);
    Everything seems to be OK since i can see the new class when i use ifsmgr. But my question is : how can i add custom attributes to this new class ? Here is what i tried :
    AttributeDefinition value = new AttributeDefinition(ifsSession);
    value.setAttribute("FOO", AttributeValue.newAttributeValue("bar"));
    c.addAttribute(value);
    But i got the following error message :
    oracle.ifs.common.IfsException: IFS-30002: Unable to create new LibraryObject
    java.sql.SQLException: ORA-01400: impossible d'insirer NULL dans ("IFSSYS"."ODM_ATTRIBUTE"."DATATYPE")
    oracle.ifs.server.S_LibraryObjectData oracle.ifs.beans.LibrarySession.DMNewSchemaObject(oracle.ifs.server.S_LibraryObjectDefinition)
    oracle.ifs.beans.SchemaObject oracle.ifs.beans.LibrarySession.NewSchemaObject(oracle.ifs.beans.SchemaObjectDefinition)
    oracle.ifs.beans.SchemaObject oracle.ifs.beans.LibrarySession.createSchemaObject(oracle.ifs.beans.SchemaObjectDefinition)
    void fr.sword.ifs.GestionDocument.IFSDocument.createDocument(java.lang.String)
    void fr.sword.ifs.GestionDocument.IFSDocument.main(java.lang.String[])
    So, what am i doing wrong ?
    More generally, are we restricted in the types of the attributes ? (for example, would it be possible to add an attribute that would be an inputStream ? Or an object that i have already created ?).
    Any help would be appreciated. Thanks in advance.
    Guillaume
    PS : i'm using Oracle iFS 1.1.9 on NT4 SP6 and Oracle 8.1.7
    null

    Hi Guillaume,
    you're welcome. Don't know exactly, but assume that ATTRIBUTEDATATYPE_UNKNOWN
    is used to check for erronous cases only
    and it shouldn't be used otherwise.
    Creating your own objects could be simply done via
    ClassObject ifsClassObject;
    DocumentDefinition ifsDocDef = new DocumentDefinition(ifsSession);
    // get class object for my very own document
    ifsClassObject = ClassObject.getClassObjectFromLabel(ifsSession, "MYDOCUMENT");
    // set the class for the document i'd like to create
    ifsDocDef.setClassObject(ifsClassObject);
    // set attributes and content for the document...
    ifsDocDef.setAttribute("MYFOO_ATTRIBUTE",....);
    ifsDocDef.setContent("This is the content of my document");
    // create the document...
    PublicObject doc = ifsSession.createPublicObject(ifsDocDef);
    null

  • Could not get schema Object:java.sql.SQLSyntaxErrorException ora-904

    All of a sudden I get
    Could not get schema Object:java.sql.SQLSyntaxErrorException: ORA-00904: "SYS"."O"."NAME": ongeldige ID
    when doing anything in the tables tree in the connections pane
    The only thing I set recently is pga_aggregate_target
    Environment
    Oracle 11.2.0.1
    OS Windows Vista Ultimate sp2
    Sql developer 2.1.1.64.39 with its own JDK
    As the download links on OTN are broken I can not upgrade, and I'd rather not work in command line sqlplus.
    Help!!!
    Sybrand Bakker
    Senior Oracle DBA

    My copy of sqldeveloper isn't located in that directory. Would that matter?
    In the mean time I have disabled filtering the tables node. Opening the tables node doesn't result in exceptions anymore.
    Now, when I click on any table in that node I get 4 identical ora-904 error messages for sys.o.name for any table.
    Apparently it is querying either the all_objects view and it thinks it is querying sys.obj$.
    I didn't yet enable sql_trace for the session, I'm more or less giving up on sqldeveloper. I can not use the space bar in any datagrid, sqldeveloper has always been extreemly unresponsive when navigating the schema browser (as opposed to Toad), etc, etc. Too bad I bought Sue Harpers book, but I think I will be de-installing sqldeveloper soon.
    Sybrand Bakker
    Senior Oracle DBA

  • Web Dynpro Java : Failed to get deployable object part info for component

    Currently we have a web dynpro java project which connects to the ABAP backend with Web Services. Everything seems fine, and when we transport to the production server via NWDI, we have the following error. Everytime we try to access the application , the error is occurred.
    com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: Failed to get deployable object part info for component com.sie.attachmentcomp.AttachmentComp
        at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.getComponentDeploymentDescription(ClientComponent.java:784)
        at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.createComponent(ClientComponent.java:934)
        at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.createComponent(ClientComponent.java:177)
        at com.sap.tc.webdynpro.progmodel.components.ComponentUsage.createComponentInternal(ComponentUsage.java:149)
        at com.sap.tc.webdynpro.progmodel.components.ComponentUsage.createComponent(ComponentUsage.java:116)
    It is working properly in our development , and testing environment. Only production has this error. And one weird thing is that this particular error occurred only sometimes to some user. For example; I could not access to the application with this error yesterday but my friend can access. Today, I can access in the morning but my friend cannot. For another friend , Yesterday he can access by using IE but not by Firefox. But today Firefox is fine but not with IE. It seems crazy.
    For more information, in our J2EE engine for the production server, we have 3 server nodes (clusters). And we are not sure it is the source of the problem. Is there any solution , and any way to know from the application that we are on which server?
    We also go and check from the Content Administrator in Web Dynpro Console. Under our project name, in the list of Components, sometimes we can see AttachmentComp but sometimes not.
    Please help us as our project is about to go-live next week.
    Thanks,
    Yu

    Hi Meenge,
    Please check below document for finding root cause for "Failed to start deployable object part info for <development component> and application <application name>"
    http://help.sap.com/saphelp_nwce711core/helpdata/en/44/7716e1633a12d1e10000000a422035/frameset.htm
    OR http://help.sap.com/saphelp_nw04/helpdata/EN/f4/1a1041a0f6f16fe10000000a1550b0/frameset.htm
    Hope it helps
    Regards
    Arun

  • Get JSF objects in a Filter Class

    Hi! I have a problem with my JSF application. As the most of the web applications I have a login at the begining and I place a Listener - Filter classes for catching the session timeout to returning the user to the login page. All this works OK. The problem it´s to validate that the user only has 1 session open at the time, when the user begin session I change a flag into it's database row, and when the user logout the flags change again to false (both actions (login and logout) was fired by the user clicking it's respective buttons), this works fine, but I want to change the data flag in the database row with the timeout Filter classes after pass 1 minute. My Filter class it's like this:
        public void doFilter(ServletRequest request,ServletResponse response, FilterChain filterChain) throws IOException,ServletException {
            if ((request instanceof HttpServletRequest) && (response instanceof HttpServletResponse)) {
                HttpServletRequest httpServletRequest = (HttpServletRequest) request;
                HttpServletResponse httpServletResponse = (HttpServletResponse) response;                      
                if (!StringUtils.contains(httpServletRequest.getRequestURI(), "welcomeJSF.jsp")) {                                
                    if((httpServletRequest.getRequestedSessionId() != null) && !httpServletRequest.isRequestedSessionIdValid()){
                         /* 1 */               
                           FacesContext context = FacesContext.getCurrentInstance();
                             User user = (User) context.getExternalContext().getSessionMap().get("simpleUser");
                             UserDAO conn = new UserDAO();
                             List users = conn.findByNumber(new Long(user.getNumber()));
                             persistence.User userDB = (persistence.User) users.get(0);
                             userDB.setUse(false);
                             Transaction tx = conn.getSession().beginTransaction();
                             conn.save(userDB);
                             tx.commit();
                             conn.getSession().close();                                     
                             /* 2 */                     
                        String timeoutUrl = httpServletRequest.getContextPath()+ "/faces/" + "welcomeJSF.jsp";
                        System.out.println("Session is not invalid. Redirecting to login page. ");
                        httpServletResponse.sendRedirect(timeoutUrl);
                        return;
            filterChain.doFilter(request, response);
        }When I comment from 1 to 2 works fine, but if I want to get the context.getExternalContext().getSessionMap().get("simpleUser") i get this error:
    java.lang.NullPointerException
         at validadores.SessionTimeoutFilter.doFilter(SessionTimeoutFilter.java:53)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
         at java.lang.Thread.run(Thread.java:619)This is because I'm working in a diferent conexts? How can I get Jsf objects from ServletRequest? or to pass getExternalContext().getSessionMap() to the filter class? Any ideas to change the database when the session timeouts if I'm using hibernate?
    Thanks for your time and help!

    correction :
    MyObjectProxy extends ObjectProxy{
         override callProperty(
              // your dyna logic
    and expose new MyObjectProxy(dynaInstance)

  • Help to get text objects in ABAP

    Hi guys!
    I've created my first report program and need some help to get text objects into the report. The program combines the tables KNA1, LIKP, LIPS, VBAK, VBAP and VBKD to create a deliverylist which we import as excel info a shipping service. The issue at hand is that our website allows customers to change the ship-to party's address when creating an order. The adress are not updated to KNA1, but are comitted as a text on the ship-to on the delivery itself.
    The text I need in the report is RV50A-TXTWE.
    Can you help me get going on how to add this from the delivery?
    Thanks a lot!

    Your problem is that its a structure.  Structures are filled in a program and no longer exist after the program is closed.  They are temporary data.  It will have been moved to tables somewhere most likely.  The next step is to debug / trace through the code to find out what was done with it.
    What program were you using that created the structure?
    Neal

Maybe you are looking for

  • Can you share tags with other workstations on a network.

    We are using Photoshop Element to tag photos at my work.  How do I allow other users on other computers to see the tags I have given pictures.  We are all on a network that can see the same picture folder.  We have our own license of the program at e

  • Webdynpro and eventing from team viewer

    Hi. We are trying to add new fields to the MSS "General Data" iView (com.sap.pct.hcm.eeprofilegeneraldata.par) and are considering the following approaches: 1.) Write additional java code to retrieve the data we need and display it on the iview. 2.)

  • Date format disappears after 3 or 4 executions

    Hi My requirement is that i have to set my "current date" format as yyMMdd, setting this format is fine. It executes also normally with  the desired output. After executing 3 or 4 times, the target format of my date ,ie yyMMdd disapears and hence the

  • A good photo application for my mac

    When I had a PC, I used Picasa and Microsoft Photo Editor. Now I have no photo application to use for my mac. I don't really like the way iPhoto is organized, so I was wondering if anyone had any suggestions for good photo apps, besides iPhoto.

  • My headphone jack is only playing things from one earphone.

    So I had a pair of headphones plugged into my iMac (acutally it's my school's. Oops). I had a sweater with a lining on the back of my chair as I was working, and at one point, I pulled the lining out of the sweater so I could put it on. This created