How to use the ViewRowImpl objects in JSP?

Is there anyway for me to use the ViewRowImpl objects in the JSP (so I could call the set<attribute> methods and get<attribute> methods to retrieve the attributes? Right now I am retrieving all the information I need in the application tier from the database, marshal them myself, and then return the marshaled data back to the JSP side in the presentation tier, then demarshal the data, and finally interpret the demarshaled data. I did this because I want to return everything in one single remote method call, and I know this is really ugly, but I do not know of any other way for me to retrieve all information needed by a JSP page in one single method call. Any suggestions?

I've done this in servlets.
I created an application module (with an ic.lookup() call, see the documentation) and then used the appModule to create my view.
Once you've got that you can iterate through rows and use the accessor methods.
You might need a wrapper method to get the ViewObjectImpl in your jsp...

Similar Messages

  • What is the use for lock object and how to use the lock objects

    Hi Guru's,
    I am new to ABAP .Can you please clarify the that what is the use of lock object and how to use the loct object .what is use of the Deque & Enque  function modules .

    hi ,
    below are some minfo about lock objects :
      Lock Objects
    These types of objects are used for locking the access to database records in table. This mechanism is used to enforce data integrity that is two users cannot update the same data at the same time. With lock objects you can lock table-field or whole table.
    In a system where many users can access the same data, it becomes necessary to control the access to the data. In R/3 system this access control is built-in on database tables. Developers can also lock objects over table records.
    To lock an object you need to call standard functions, which are automatically generated while defining the lock object in ABAP/4 dictionary. This locking system is independent of the locking mechanism used by the R/3 system. This mechanism also defines LUW i.e. Logical Unit of Work. Whenever an object is locked, either by in built locking mechanism or by function modules, it creates corresponding entry in global system table i.e. table is locked. The system automatically releases the lock at the end of transaction. The LUW starts when a lock entry is created in the system table and ends when the lock is released.
    Creating Lock Objects
    Lock object is an aggregated dictionary object and can be defined by using the following steps:
    o From initial data dictionary screen, enter the name for the object, Click Lock object radiobutton and then click on Create. The system displays a dialog box for Maintain Lock Objects screen
    o Enter short text as usual and the name for primary table.
    -Save
    -Select Tables option
    From this screen you can:
    Select secondary tables, if any, linked by foreign key relationship.
    Fields for the lock objects. This option allows you to select fields for objects (R/3 system allows locking up to record level). Lock object argument are not selected by user but are imposed by the system and includes all the primary keys for the table.
    1) Exclusive lock: The locked data can only be displayed or edited by a single user. A request for another exclusive lock or for a shared lock is rejected.
    2) Shared lock: More than one user can access the locked data at the same time in display mode. A request for another shared lock is accepted, even if it comes from another user. An exclusive lock is rejected.
    3) Exclusive but not cumulative: Exclusive locks can be requested several times from the same transaction and are processed successively. In contrast, exclusive but not cumulative locks can be called only once from the same transaction. All other lock requests are rejected.
    Also, last but not the least, locking the object is logical (locking with any enqueue ) .so, you have to use the lock object while trying to access from second program .
    reward if helpful ,
    Regards,
    Ranjita

  • How to use the same bean from Jsp and Servlet

    I want to use the same bean instance from both the servlet and jsp.
    for eg. if a create a bean using the jsp:useBean in servlet and if a modify some values, that values should be reflected while i access the same bean from the servlet. But instead of that the servlet is creating a new instance of the bean.
    is it possible?
    Thanks in advance

    Hi,
    When you call jsp:useBean you inform a scope (session, request, page...)
    This means the bean instance will be stored in that scope.
    So, if the informed scope is session, then, in the servlet you could get the bean instance back from the session, this way:
    HttpSession session = request.getSession();
    Bean b = (Bean) session.getAttribute("bean_id");
    Regards,
    Filipe Fedalto

  • How to use the Java objects or methods in pl/sql function as a parameter

    dear all,
    I java object passed as a parameter in pl/sql. how can i access the java objects as parameter in pl/sql function. please give a soultion to me
    mohan reddy

    I'm not sure whether this would help you.
    Have a look at this program to list files from a directory.
    CREATE GLOBAL TEMPORARY TABLE DIR_LIST
    ( FILENAME VARCHAR2(255) )
    ON COMMIT DELETE ROWS
    Table created.
    create or replace
    and compile java source named "DirList"
    as
    import java.io.*;
    import java.sql.*;
    public class DirList
    public static void getList(String directory)
    throws SQLException
    File path = new File( directory );
    String[] list = path.list();
    String element;
    for(int i = 0; i < list.length; i++)
    element = list;
    #sql { INSERT INTO DIR_LIST (FILENAME)
    VALUES (:element) };
    Java created.
    SQL>
    create or replace
    procedure get_dir_list( p_directory in varchar2 )
    as language java
    name 'DirList.getList( java.lang.String )';
    SQL> exec get_dir_list( 'C:\Bhagat' );
    PL/SQL procedure successfully completed.
    Thanks,
    Bhagat

  • Outlook Add-In Mail Item How to use the mailitem object after .send() is called on it?

    Hello,
    I am developing an outlook add-in, where I have added a custom button to "send & process" the mail item.
    I want to first send the mail - by writing 
    ((Outlook._MailItem)mailItem).Send();
    but after the mail item is sent, I am unable to process the mail item object.
    Could some one please guide, how to tackle this?
    Thanks!
    -Vinay Pugalia
    If a post answers your question, please click "Mark As Answer" on that post or
    "Vote as Helpful".
    Web : Inkey Solutions
    Blog : My Blog
    Email : Vinay Pugalia

    I get the above error in Visual Studio 2013 Ultimate when I process my mailItem in the ItemAdd event
    handler.
    Upon search, the above error seems to be related to Visual Studio but still searching to find a fix for
    it.
    In the code, I just read the Recepients of the mailItem, save the mailItem as .msg file to a physical
    location & upload the .msg file to a FTP location.
    Sorry to say, but sharing the code would not be possible due to NDA.
    Could you please guide further?
    -Vinay Pugalia
    If a post answers your question, please click "Mark As Answer" on that post or
    "Vote as Helpful".
    Web : Inkey Solutions
    Blog : My Blog
    Email : Vinay Pugalia

  • How to get the HttpServletRequest object in a jsp

    Hi,
    I am a little confused here. Am trying to use the HttpServletRequest object in my jsp. I have set up just a simple test page jsp. How can i use the HttpServletRequest object to get some information about the request for example using the method getPathInfo(). I know i can do this in a servlet and pass the value as a parameter in a doGet method. But how do i do it in a jsp. Can it be done..?
    Pls help
    Thankyou

    The request object is already created for you in JSP, as are many other things
    request - the HttpServletRequest object
    response - the HttpServletResponse object
    session - the HttpSession object
    application - the ServletContext object
    out - the JspWriter object (like PrintWriter)
    So you just use them...
    <%
    String asdf = request.getParameter("asdf");
    %>

  • How to call the BPM objects in the child JSP?

    Hi,
    We are facing some problem, we are trying to use the JSP for the UI instead of BPM Presentation.
    In the JSP we are calling the child JSP(using JSP include), we need to pass the BPM objects from child to parent JSP.
    Can any one help me on how to pass the Object between the JSP's and BPM Obejcts.
    I will explain in the Example too,
    1. We are created the BPM objects with fields
    2. Created 2 JSP's 1. Main.JSP 2. Sub.JSP
    Now we need to call the sub.jsp into main.jsp,while we calling we need to pass the sub.jsp BPM Object.
    Regards,
    Anandh P

    Hi
    When you use <% include page="test.jsp" %> you can use the same object's name in child jsp like in parent file (this is static way to include another file).
    Hope this could solve the problem. regards.

  • How to use the index method for pathpoints object in illustrator through javascripts

    hii...
    am using Illustrator CS2 using javascripts...
    how to use the index method for pathpoints object in illustrator through javascripts..

    Hi, what are you trying to do with path points?
    CarlosCanto

  • How to use the Calculated attibute in view object

    Hi,
    I have a view object query with the calculated attribute name as 'TRANCODE' in the below sql.This query works for the initial page loading.
    After the page gets loaded, there is a search section in the same page at the top.
    Here i will have to build the whereclause to the same query and retrieve the values.
    i am using jDeveloper 10.1.3.1, with adf and jHeadstart.
    Can some one tell as how to use the calculated attribute TRANCODE in whereclause?
    SELECT /*+ first_rows(10) */
    BatchCntl.FILE_CNTL_ID,
    CASE WHEN chk_bit(Entry.ENTRY_FLAGS, 2)='Y' OR Entry.ENTRY_SUBSTATUS = 'D' OR Entry.ENTRY_SUBSTATUS = 'J'
    THEN
    CASE eeh.TRAN_CODE
    WHEN '21' THEN 'C'
    WHEN '22' THEN 'C'
    WHEN '31' THEN 'C'
    WHEN '32' THEN 'C'
    WHEN '26' THEN 'D'
    WHEN '27' THEN 'D'
    WHEN '36' THEN 'D'
    WHEN '37' THEN 'D'
    ELSE eeh.TRAN_CODE
    END
    ELSE
    CASE Entry.TRAN_CODE
    WHEN '21' THEN 'C'
    WHEN '22' THEN 'C'
    WHEN '31' THEN 'C'
    WHEN '32' THEN 'C'
    WHEN '26' THEN 'D'
    WHEN '27' THEN 'D'
    WHEN '36' THEN 'D'
    WHEN '37' THEN 'D'
    ELSE Entry.TRAN_CODE
    END
    END AS TRANCODE,
    FROM Batch_Cntl BatchCntl, Entry, ENTRY_EDIT_HIST eeh
    WHERE (BatchCntl.BATCH_TYPE = 'E')
    AND (BatchCntl.BATCH_STATUS in ('A','D','R','P'))
    AND entry.in_batch_cntl_id = BatchCntl.BATCH_CNTL_ID
    and Entry.fi_rt = eeh.fi_rt (+)
    and Entry.entry_id = eeh.entry_id (+)
    AND (Entry.ENTRY_STATUS in ('A','D','R','P'))
    ORDER BY BatchCntl.BATCH_CNTL_ID, Entry.entry_id
    regards
    Raj.

    Let's say your application module is com.yourcompany.someapp.services.MyService, and let's say you authored a method like the following in the MyServiceImpl.java file:
      public void doSomething(int i, String s) {
      }and you exposed this AM custom method using the AM editor.
    BC4J design time will automatically create you the com.yourcompany.someapp.services.common.MyService interface that will look like this if you go look at the source code:
    package com.yourcompany.someapp.services.common;
    import oracle.jbo.ApplicationModule;
    public interface MyService extends ApplicationModule {
      public void doSomething(int i, String s);
    }To use your custom method from a client, just cast your ApplicationModule to your custom interface like this:
    import com.yourcompany.someapp.services.common.MyService;
      MyService mySvc = (MyService)yourAM;
      mySvc.doSomething(1,"foo");

  • Any ideas how I can insert a pdf into word, using the insert object option. However the pdf i want to insert has text and lines annotated, but once inserted the comments don't appear????  any help would be greatly appreciated.

    Any ideas how I can insert a pdf into word, using the insert object option. However the pdf i want to insert has text and lines annotated, but once inserted the comments don't appear????  any help would be greatly appreciated.

    You will need to find a forum for MS Word since that is the software that you are trying to manipulate in this.  If you think the processing/creation of the PDF plays a role then you should ask in the forum for the software that you are using to create the PDF.
    This forum is for issue regarding downloading and installing Adobe trial products, so in any circumstance, your issue does not fit in this forum.

  • How to move the anchor object in indesign cs2 using js?

    i can able to move the normal textframe and other objects but cant do this for anchor objects.
    syntex:  anchorobject.move([x value,y value],undefined,true)
    how to move the anchor objects?
    thanks
    subha

    Could it be that the anchord object in question won't move because you have it set to keep within margins which is preventing the move you're requesting? I've certainly run into that.
    I've also run into the situation where the object model thinks the anchored object is in one place when it is actually in another because of that same keep within margins option. In this case, a move will apparently not work because the move is invisible, it being completely outside of the margins -- although that only applies to relative moves, I think.
    Dave

  • How can I get the "pageContext" object in jsp page?

    Hi everyone:
    I want to get struts's DataSource object in jsp page.So I should get the PageContext object in jsp page.My code is:
    ///////////////////datatest.jsp///////////////////////////////////
         DataSource ds=(DataSource)pageContext.getAttribute(Action.DATA_SOURCE_KEY);
         conn=ds.getConnection();
              stm=conn.createStatement();
              rs=stm.executeQuery(insertsql);
    Is right?But I get the "NullPointerException" error in Tomcat.The connection pool in struts-config.xml is:
    <data-sources>
    <data-source key="mydatasource">
    <set-property property="autoCommit"
    value="false"/>
    <set-property property="description"
    value="MyWebSite Data Source Configuration"/>
    <set-property property="driverClass"
    value="org.gjt.mm.mysql.Driver"/>
    <set-property property="maxCount"
    value="4"/>
    <set-property property="minCount"
    value="2"/>
    <set-property property="password"
    value="qijiashe"/>
    <set-property property="url"
    value="jdbc:mysql://localhost:3306/myweb"/>
    <set-property property="user"
    value="lyo"/>
    </data-source>
    </data-sources>
    I can query the database in servlet.
    I think the method that I get the context is not right.Had someone get the pagecontext in jsp page?help :(

    Sorry I forgot that I had change the code:
    DataSource ds=(DataSource)pageContext.getAttribute(Action.DATA_SOURCE_KEY);
         conn=ds.getConnection();
              stm=conn.createStatement();
              rs=stm.executeQuery(insertsql);
    to the code:
    DataSource ds=(DataSource)pageContext.getAttribute("mydatasource");
         conn=ds.getConnection();
              stm=conn.createStatement();
              rs=stm.executeQuery(insertsql);
    mydatasource is the struts datasource in "struts-config.xml". I couldn't work

  • How to get the UserTransaction object in  stateless session bean

    Hi, I am using jboss server and jdk5 version and using EJB.
    My Application flow :
    JSP à Action(Struts) à Service Locator à Session bean à Entity Bean(cmp) à DB.
    I tried to get the UserTransaction object in my Action. Its my code.
    InitialContext ctx = new InitialContext();
    UserTransaction uTrans = (UserTransaction) ctx.lookup("java:comp/UserTransaction");
    After used uTrans.begin(),uTrans.commit() and uTrans. rollback () also.
    Its working fine .
    But, I used the the same code inside in my session bean its not working.
    Stateless Session Manager Bean code :
    public class SampleManagerBean implements SessionBean {
    public void ejbCreate() throws CreateException {  }
    public void ejbRemove() {  }
    public void ejbActivate() {   }
    public void ejbPassivate() {   }
    public void setSessionContext(SessionContext sessionContext) {
    this.sessionContext = sessionContext;
         public void createSample() throws EJBException
         try{
                   InitialContext ctx = new InitialContext();
                   UserTransaction ut = (UserTransaction) ctx.lookup("java:comp/UserTransaction");
              }catch(Exception e) {
              System.out.println(“ Exception === > “+e)
    Its throws the error ie: javax.naming.NameNotFoundException: UserTransaction not bound
    How to get the UserTransaction object in my session bean. Kindly give solution the above errors.
    - Thendral

    first of all, you could just use sessionContext.getUserTransaction(). however, that would only work if your bean is using bean-managed transactions. the default is container-managed transaction, in which case you cannot get a UserTransaction object. if you want to manage transactions, you need to add the TransactionManagementType.BEAN annotation to your ejb.

  • How to validate a session object in jsp?

    Hi All,
    i am facing a problem.The problem is how to validate the session object object in jsp.I have written a java script by using a defined function as setInterval and has given 5 mintues if the user is idle and will show a pop up menu before time out the session but in case of page active still this pop up menu is coming. The java script as follows.
    function SetTimer(){
         //How long before timeout (should be a few minutes before your server's timeout
         //set timer to call function to confirm update
         if(timeoutMinutes)
         timerObj = setInterval("ConfirmUpdate()",60000);
    function clearTimerFn(){
              timerCount = 0;
              clearInterval(timerObj);
              //timerObj = setInterval("ConfirmUpdate()",60000);
    function ConfirmUpdate(){
         //Ask them to extend
         if(confirm("Your session is about to expire. Press 'OK' to renew your session.")){
              //load server side page if ok
              var url = "ajaxSessionchecker.do?sessionvalidate=sessionvalid";
              LoadXMLDoc(url);
    And in jsp i am calling this js function as
    <%session=request.getSession(false);
              if(session.getLastAccessedTime()==60000){ %>
              <script type="text/JavaScript">
         clearTimerFn();
    </script>
    <%}else{
    session.setMaxInactiveInterval(-1000);} %>
    could you pls help me out?

    The reason for doing this is when ever i come to this user.jsp from account.jsp with a different account number this user.jsp is not refreshed and i still
    see the same old user.jsp for the previous account that i naviated before. Also please let me know if there is any other approach to acheive this taskDoes refreshing the page by pushing F5 solve the problem?
    If so, then the browser is caching the page, despite your attempts to stop it.

  • How to display List of objects in jsp?

    Hi,
    I have a list containing Collection of bean objects.
    Now I want to display the values in the list of objects in a jsp using JSTL.
    Any body help me how to retrieve the bean objects from the List and how can i display that values in the jsp.
    Advanced Thanks,
    Mahendra

    Have you tried to use <:forEach></c:forEach> tag available in jstl?

Maybe you are looking for

  • Blocked stock

    Hi expert, Is any way to know the blocked stock material in date wise or periodic. I want to know the blocked stock as on a particular date. Its for Auditing purpose, if any body know plz help faisal

  • Is there any way to generate table of contents in adobe for a report output

    Hi All, I need to display the output of a report in an PDF and layout needs to be developed in Adobe Print Forms. I want to know if there is a way to generate a table of contents for the output in adobe form on a particular page. Thanks...

  • Can we change the look and feel of the screen layout

    Dear All, I am new to ABAP WebDynpro, and would like to know the following with respect to ABAP WebDynpro : 1. To what extent can we change the look and feel of the screen layout ? 2. Is it possible to change the background color of the layout? 3. Is

  • Microsoft-esque problems on my Mac?

    G'day, all. Have owned my first Mac for almost a fortnight now, and am generally loving it. That having been said, I have a few issues I need to be walked through, as I still don't understand the OS well enough to intelligently explore it without pot

  • Edit option missing from SOME photos

    Several of my iPhone pictures on the camera roll do NOT have the edit option available.  Most of them do, but several do not.  I noticed that the pictures that do not have the edit option anymore are photos that I have already edited at least once in