How to use application class reference in the controller methods of BSP

Hi,
I have created a bsp application and also created an application class and assigned it to the application class. In the application class, I have created attribute TEXT type string(public and instance parameter).
In the controller let's say main.do, I am trying to give a value to to the text by adding the following code.
application->text = 'test'.
I am getting syntax error saying field 'text' is unknown. It is not contained in one of the specified tables nor defined by DATA statement. 
Please can someone let me know how to use the application class in the coding with an example. I couldn't find how exactly this has to be reference. Please help.
Best regards
Siva

Hi,
if you are having main controller and sub-controller then you may need to use below coding to use application class reference.
*Data declaration
  DATA:  obj_cntrl        TYPE REF TO cl_bsp_controller2,
         obj_sub_cntrl   TYPE REF TO z_cl_sub_cntl,
         application TYPE REF TO z_cl_application.
*Get the controller
  CALL METHOD obj_main_cntrl->get_controller   "obj_main_cntrl is the object of main controller
    EXPORTING
      controller_id       = 'SUB'   "Controller ID
    RECEIVING
      controller_instance = obj_cntrl  .
  obj_sub_cntrl ?= obj_cntrl  .
  application ?= obj_sub_cntrl ->application.
or simply use below code in your controller method.
  application ?= me->application.
Thnaks,
Chandra

Similar Messages

  • How to use FilePermission class to change the file permission in Linux

    Hi all,
    I'm running in a issue related to changing the file permission under Linux environment. I'm using Suse 10.0 Linux and run jdk 1.5 java runtime.
    I want to create a file during execution time and change the permission of the same. I use File.createNewFile() API to create file. By default it does not have all the 3 permission (read,write,execute) for all the user ( user,owner,group). Through program I have to change the file permission ( equal to execute ,chmod 777 filename).I donot want to use runtime.exec() with chmod as the argument , since it creates a process to change the permission which may impact the performance. I want to try FilePermission class , by giving filename and permission as the argument. But it is not changing the permission . Could any one faced this problem ?
    If any body guides me, how to change the permission of the file under Linux using FilePermission class , it would be helpful.
    Thanks,
    Sankar

    How do I set the Umask prior to starting the program
    ? Could pls explain in steps.I don't think umask can help you. The mode mask prevents permission bits from being set when a file is created, but does not force any bits to be set. So if execute permission is not set explicitly when a file is created, umask will do nothing about it.
    But if you want more information about umask, see the man page for your shell script (sh, csh, etc.) or "man 2 umask".

  • How to use Object Class:orclDbServer in OID

    Not sure if i have posted in the correct forum, I am quite new to OID
    I am planning to use orclDbServer Object Class, but not sure how to use, i have searched in Google, and Oracle Documentation, there are so little information about this, there are only:
    Object Class: orclDbServer
    Description: Defines the attributes for database service entries
    Attributes: orclNetDescName, orclVersion
    Below is the ldif file i created for add one entry with object class orclDBServer:
    dn: cn=orclDBServer_test, cn=OracleContext, dc=ldapcdc, dc=lcom
    changetype: add
    objectclass: top
    objectclass: orclDBServer
    cn: orclDBServer_test
    orclNetDescName: (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST=10.182.114.121)(PORT = 1521))(CONNECT_DATA = (SERVER = DEDICATED)(SERVICE_NAME = oh112)))
    after i use below command to add this entry:
    ldapadd -h localhost -p 389 -D "cn=orcladmin" -w welcome1 -f test_add.ldif
    then use ldapsearch to search:
    ldapsearch -h localhost -p 389 -b "dc=lcom" "objectclass=orclDBServer"
    the result is like below:
    cn=orclDBServer_test, cn=OracleContext, dc=ldapcdc, dc=lcom
    cn=orclDBServer_test
    orclnetdescname=(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST=10.182.114.121)(PORT = 1521))(CONNECT_DATA = (SERVER = DEDICATED)(SERVICE_NAME = oh112)))
    objectclass=top
    objectclass=orclDBServer
    objectclass=orclService
    It seems it added a line for me:
    objectclass=orclService
    Is there anything wrong with my ldif file when i want to use orclDbServer?
    Edited by: ening on Jan 5, 2010 9:31 PM

    Hi,
    if you are having main controller and sub-controller then you may need to use below coding to use application class reference.
    *Data declaration
      DATA:  obj_cntrl        TYPE REF TO cl_bsp_controller2,
             obj_sub_cntrl   TYPE REF TO z_cl_sub_cntl,
             application TYPE REF TO z_cl_application.
    *Get the controller
      CALL METHOD obj_main_cntrl->get_controller   "obj_main_cntrl is the object of main controller
        EXPORTING
          controller_id       = 'SUB'   "Controller ID
        RECEIVING
          controller_instance = obj_cntrl  .
      obj_sub_cntrl ?= obj_cntrl  .
      application ?= obj_sub_cntrl ->application.
    or simply use below code in your controller method.
      application ?= me->application.
    Thnaks,
    Chandra

  • How to use application item in the page template

    How to use application item in the page template.
    Thanks,
    rajendra

    Hi,
    You can refer application item value in template like &MY_ITEM. (note period at end)
    http://docs.oracle.com/cd/E37097_01/doc/doc.42/e35125/concept_sub.htm
    Regards,
    Jari

  • How to use Add Query Criteria for the MySQL data Base in Netbeans ?

    How to use Add Query Criteria for the MySQL data Base in Netbeans Visual web pack.
    When the Query Criteria is add like
    SELECT ALL counselors.counselors_id, counselors.first_name, counselors.telephone,counselors.email
    FROM counselors WHERE counselors.counselors_id = ?
    when i run this Query in the Query Window
    i get a error message Box saying
    Query Processing Error Parameter metadata not available for the given statement
    if i run the Query with out Query Criteria its working fine.

    *I am glad I am not the only one who have this problem. Part of issue has been described as above, there are something more in my case.
    Whenever I try to call ****_tabRowSet.setObject(1, userDropList.getSeleted()); I got error message as shown below:*
    The Java codes are:
    public void dropDown1_processValueChange(ValueChangeEvent event) {
    Object s = this.dropDown1.getSelected();
    try {
    this.User_tabDataProvider1.setCursorRow(this.User_tabDataProvider1.findFirst("User_Tab.User_ID", s));
    this.getSessionBean1().getTrip_tabRowSet1().setObject(1, s);
    this.Trip_tabDataProvider1.refresh();
    } catch (Exception e) {
    this.log("Error: ", e);
    this.error("Error: Cannot select user"+e.getMessage());
    SQL statement for Trip_tabRowSet:
    SELECT ALL Trip_Tab.Trip_Date,
    Trip_Tab.User_ID,
    Trip_Tab.Destination
    FROM Trip_Tab
    WHERE Trip_Tab.User_ID = ?
    Error messages are shown below:
    phase(RENDER_RESPONSE 6,com.sun.faces.context.FacesContextImpl@5abf3f) threw exception: com.sun.rave.web.ui.appbase.ApplicationException: java.sql.SQLException: No value specified for parameter 1 java.sql.SQLException: No value specified for parameter 1
    com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.cleanup(ViewHandlerImpl.java:559)
    com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.afterPhase(ViewHandlerImpl.java:435)
    com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:274)
    com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:140)
    javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
    org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397)
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
    com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:240)
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:216)
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
    org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:216)
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:276)
    org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
    org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:240)
    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:179)
    org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
    com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)
    org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
    com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
    org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
    org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
    org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
    org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:239)
    com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
    com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
    com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
    com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
    com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
    com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
    com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
    tandardWrapperValve[Faces Servlet]: Servlet.service() for servlet Faces Servlet threw exception
    java.sql.SQLException: No value specified for parameter 1
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:910)
    at com.mysql.jdbc.PreparedStatement.fillSendPacket(PreparedStatement.java:1674)
    at com.mysql.jdbc.PreparedStatement.fillSendPacket(PreparedStatement.java:1622)
    at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1332)
    at com.sun.sql.rowset.internal.CachedRowSetXReader.readData(CachedRowSetXReader.java:193)
    at com.sun.sql.rowset.CachedRowSetXImpl.execute(CachedRowSetXImpl.java:979)
    at com.sun.sql.rowset.CachedRowSetXImpl.execute(CachedRowSetXImpl.java:1439)
    at com.sun.data.provider.impl.CachedRowSetDataProvider.checkExecute(CachedRowSetDataProvider.java:1274)
    at com.sun.data.provider.impl.CachedRowSetDataProvider.setCursorRow(CachedRowSetDataProvider.java:335)
    at com.sun.data.provider.impl.CachedRowSetDataProvider.setCursorIndex(CachedRowSetDataProvider.java:306)
    at com.sun.data.provider.impl.CachedRowSetDataProvider.getRowCount(CachedRowSetDataProvider.java:639)
    at com.sun.webui.jsf.component.TableRowGroup.getRowKeys(TableRowGroup.java:1236)
    at com.sun.webui.jsf.component.TableRowGroup.getFilteredRowKeys(TableRowGroup.java:820)
    at com.sun.webui.jsf.component.TableRowGroup.getRowCount(TableRowGroup.java:1179)
    at com.sun.webui.jsf.component.Table.getRowCount(Table.java:831)
    at com.sun.webui.jsf.renderkit.html.TableRenderer.renderTitle(TableRenderer.java:420)
    at com.sun.webui.jsf.renderkit.html.TableRenderer.encodeBegin(TableRenderer.java:143)
    at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:810)
    at com.sun.webui.jsf.component.Table.encodeBegin(Table.java:1280)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:881)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:889)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:889)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:889)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:889)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:889)
    at com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:271)
    at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:182)
    at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.java:285)
    at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:133)
    at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:244)
    at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:140)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
    at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
    at com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:240)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:216)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
    at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:216)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:276)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
    at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:240)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:179)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
    at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
    at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
    at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:239)
    at com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
    at com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
    at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
    at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
    at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
    at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
    at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
    Also when I tried to update my MYSQL connector / J driver to version 5.1.5 from 5.0.5 (NB 5.5.1) and 5.0.7 (NB 6.1), I could not get it work (looooong time to search some JDBC classes and with no response in the end) on both of my Netbean 5.5.1(on PC) and Netbean 6.1(on laptop) IDEs.
    Could anybody look into this issue.
    Many thanks
    Edited by: linqing on Nov 22, 2007 4:48 AM

  • How to use java classes of DC1 in DC2

    When I was trying to use a java-class from another DC, I stumbled into an error I didn't expect:
    java.lang.NoClassDefFoundError: com/company/application/utils
    This is what I did to get this far:
    1. Created an empty Web Dynpro DC (DC1), to be used as a utilities library.
    2. Added a Java class to the webdynpro project.
    3. Added the class to a public part of type compilation.
    4. Created a second Web Dynpro DC (DC2), which is supposed to consume the class from DC1.
    5. Added a DC-usage relation, so that DC1 is in DC2's used DCs. In this usage-relation built-time and run-time were checked
    5. Used DC1's class in DC2's component controller
    6. Built both DCs and deployed them
    7. Ran the application in DC2.
    When I run the application, the application dumps a stack trace at the moment that and object is created based on the class in DC1.
    Any idea how to get this working?

    Vincenzo, here is the real error message:
    java.lang.IllegalAccessError: tried to access method nl.phoqus.pataut.Guid.getGuidString()Ljava/lang/String; from class nl.phoqus.pataut.PatientAuthorization
    I have inserted a very simple GUID generator that I used in a previous project. Please find the class file below:
    package nl.phoqus.pataut;
    import java.util.Random;
    public class Guid {
         private static Guid guidFactory = new Guid();
         static Random random = new Random();
          * Allow global replacement of the GUID generator.  Applications
          * wishing to install their own GUID generators should sub-class
          * Guid, override the getGuid() method, and use this method to
          *  install their generator.
         public static void
         setGuidImpl(Guid factory) {
         guidFactory = factory;
          * Return a GUID as a string.
         public static String getString() {
         return guidFactory.getGuidString();
          * Return a GUID as a string.  This is completely arbitrary, and
          * returns the hexification of a random value followed by a
          * timestamp.
         protected String getGuidString() {
            long rand = (random.nextLong() & 0x7FFFFFFFFFFFFFFFL) | 0x4000000000000000L;
            return Long.toString(rand, 32) + Long.toString(System.currentTimeMillis()&0xFFFFFFFFFFFFFL, 32);
    I'm calling the class using the following statements from the component controller of DC2:
    Guid x = new Guid();
    String y = x.getGuidString();
    The component controller resides in package package nl.phoqus.pataut.
    Would that be the problem?

  • How can I get a reference to the Local interface of a EJB 3 session?

    Hi,
    How can I get a reference to the Local interface of a EJB 3 session?
    My session implements both the local and remote interfaces, so in my client, when I look up the remote interface using the following code, I did get a reference
              processor = (IItemProcessorRemote)initialContext.lookup(IItemProcessorRemote.class.getName());but if I also look up the local interface in th eclient using this:
    processorLocal =(IItemProcessor)initialContext.lookup(IItemProcessor.class.getName());I got errors like the following, do you know why? Thanks a lot!
    Exception in thread "main" javax.naming.NameNotFoundException: sessions.IItemProcessor not found
         at com.sun.enterprise.naming.TransientContext.doLookup(TransientContext.java:203)
         at com.sun.enterprise.naming.TransientContext.lookup(TransientContext.java:175)
         at com.sun.enterprise.naming.SerialContextProviderImpl.lookup(SerialContextProviderImpl.java:61)
         at com.sun.enterprise.naming.RemoteSerialContextProviderImpl.lookup(RemoteSerialContextProviderImpl.java:116)
         at sun.reflect.GeneratedMethodAccessor114.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:121)
         at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:650)
         at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:193)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1705)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1565)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:947)
         at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:178)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:717)
         at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:473)
         at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.doWork(SocketOrChannelConnectionImpl.java:1270)
         at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:479)

    BTW, findItemByTitle(String title) is a business method in my ItemProcessor session bean.
    public String findItemByTitle(String title) {
              AuctionItem item;
              String result = null;
              try {
                   Query query = entityManager
                             .createNativeQuery("SELECT i from AuctionItem i WHERE i.title LIKE : aTitle");
                   query.setParameter("aTitle", title);
                   item = (AuctionItem) query.getSingleResult();
                   result = item.toString();
              } catch (EntityNotFoundException notFound) {
              } catch (NonUniqueResultException nonUnique) {
              return result;
         }

  • How to use multiple classes for each form

    Hi,
    I have created two forms using screen painter and now i want to use different classes for these two forms .
    I have declared the Sbo Connection in main class i.e. Set Application ,Connection Context() but while connecting to other classes
    for executing the code for that form SAP is not connected to that class.How to use multiple classes functionality i don't able to
    do that.Please provide some sample codes for that as it will be more helpful for me to understand.
    Thanks & Regards,
    Amit

    Hi Amit,
    In fact, its more advisable to use separate classes for every form that you use.  Have one common class, say, for eg., clsMain.cs which has all the connection and connectivity to other classes, wherein, the menu event and item event of this main class, will just be calling the menu / item event of other classes.
    The individual functionality of the child classes will be called from the item / menu event of the respective classes.
    Item event in clsMain.cs will be as below.
    private void oApplication_ItemEvent(string FormUID, ref SAPbouiCOM.ItemEvent pVal, out bool BubbleEvent)
                SAPbouiCOM.Form oForm;
                BubbleEvent = true;
                try
                    if ((pVal.FormTypeEx == "My_Form1Type") && (pVal.EventType != SAPbouiCOM.BoEventTypes.et_FORM_UNLOAD))
                        oForm = oApplication.Forms.GetForm("My_FormType", pVal.FormTypeCount);
                        NameSpace.Repots.ClsForm1.ClsForm1_ItemEvent(oApplication, oCompany, oForm, ref pVal, ref BubbleEvent);
                    if ((pVal.FormTypeEx == "My_Form2Type") && (pVal.EventType != SAPbouiCOM.BoEventTypes.et_FORM_UNLOAD))
                        oForm = oApplication.Forms.GetForm("My_FormType", pVal.FormTypeCount);
                        NameSpace.Repots.ClsForm1.ClsForm2_ItemEvent(oApplication, oCompany, oForm, ref pVal, ref BubbleEvent);
    Now, in the individual classes, you can have their respective item events, which will be called from the main class, and the respective functionalities will occur.
    Hope this helps.
    Regards,
    Satish.

  • How to use application managed entity manager in EJB?

    I finish reading The EntityManager Interface in JEE tutorial.
    I know I can use container manager entity manager in EJB, but I want to explore how to use application managed entity manager in EJB.
    Can I use application managed entity manager in EJB (container management JTA transaction is used)? Where do I should close entity manager if can?
    The following is an example from JEE tutorial, but didn't find where to calose entity manager. and can I create mutiple EntityManagerFactory objects and Entity Manager objects to use them in a JTA transaction?
    @PersistenceUnit
    EntityManagerFactory emf;
    EntityManager em;
    @Resource
    UserTransaction utx;
    em = emf.createEntityManager();
    try {
      utx.begin();
      em.persist(SomeEntity);
      em.merge(AnotherEntity);
      em.remove(ThirdEntity);
      utx.commit();
    } catch (Exception e) {
      utx.rollback();

    Seems like a very poor example, the whole power of EJBs is to use Container Managed Transactions so you don't NEED to manage the transaction and the entity manager yourself. What you posted is code I would expect in a non-JEE application, or in a piece of code which requires fine-tuned transaction boundaries such as batched data importing logic.
    If I were you I'd research JPA in steps.
    a) learn about JPA as an API outside of the scope of EJBs (recommended reading: the book 'Pro JPA 2')
    b) learn about Container Managed Transactions in EJBs
    c) learn about Bean Managed Transactions in EJBs
    Right now you're rushing into c). I can understand that it raises many question marks at this point.

  • How to use outside Class in packed library plugins

    I have found the very useful article from Michael Lacasse (https://decibel.ni.com/content/docs/DOC-19176) on how to use packed library as plugins. This approach makes the most sense when you try to distribute additional code after your executable has already been installed.
    My problem is that when I try to use a class from the main code in a plugin, the plugins won't work anymore. Ideally, I would have liked the parent plugin-interface to inherit from a class used in the main code, or using the class as an input parameter of the plugin would be the next best thing.
    I got several errors, some at execution time (#1448) or at edit time ("This VI does not match other VIs in the method: connector pane terminal(s)"). I have settled to use clusters to pass data to the plugins.
    My question is: Is it possible to use a class defined in the main code in a packed-project-library, either inherited or as a parameter? If yes, do you have any example?
    Marc Dubois
    HaroTek LLC
    www.harotek.com
    Solved!
    Go to Solution.

    I should point out that it's important to use the copy THAT'S IN THE PPL, *-NOT-* the copy from your source.
    It will compile if you mix them together, but they aren't the same object, and won't share data.
    You should never refer to your source code for the class, except to build the PPL.
    (Consider using a separate project, to avoid temptation).
    Steve Bird
    Culverson Software - Elegant software that is a pleasure to use.
    Culverson.com
    Blog for (mostly LabVIEW) programmers: Tips And Tricks

  • How to use TableSorter class with DefaultTableModel

    Hi Friends
    Please tell me how to use TableSorter Class which is in the Java. Tutorials with DefaultTableModel.
    i saw in a thread there it was given that we have to pass the DefaultTableModel to the TableSorter Class.
    I tried to use like that. But i am getting Error Like Exception occurred during event dispatching:
    I am posting the part of Code where i use the DefaultTableModel
         private void displayavailablity(String selectedAuthor)
                   try
                        Vector columnNames = new Vector();
                        Vector data1 = new Vector();
                        String bname,bauthor,bcategory,bref1,bavail,bid;
                        int bref,mid,num;
                        rs = st.executeQuery("SELECT BId,BName,BAuthorName,BAuthorandPublisher,BCat FROM Books where BAuthorandPublisher='" +selectedAuthor+"'");     
                        ResultSetMetaData md= rs.getMetaData();
                        int columns =md.getColumnCount();
                        String booktblheading[]={"NUMBER","BOOK NAME","AUTHOR","CODE","CATEGORY"};
                        for(int i=1; i<= booktblheading.length;i++)
                             columnNames.addElement(booktblheading[i-1]);
                        while(rs.next())
                             Vector row = new Vector(columns);
                             for(int i=1;i<=columns;i++)
                                  row.addElement(rs.getObject(i));
                             data1.addElement(row);
                             //System.out.println("data is:"+data);
                        ((DefaultTableModel)table.getModel()).setDataVector(data1,columnNames);
                        TableSorter sorter = new TableSorter((DefaultTableModel)table.getModel());
                        rs.close();
                   catch(SQLException ex)
                        System.out.println("ERROR IS HERE");
                        ex.printStackTrace();
         }Please help me on this issue Otherwise Please give me some Sample coding to implement this sorting. with DefaultTableModel
    Thank you for your service
    Cheers
    Jofin

    I don't know about any TableSorter class, but I suppose you mean javax.swing.table.TableRowSorter.
    The TableRowSorter is to be attached to the JTable, not to the data model. Here's a cut'n'paste from the last time I used it:
    RowSorter<TableModel> sorter = new TableRowSorter<TableModel>(tableModel);
    myTable.setRowSorter(sorter);
    And heres from the JDK1.6 documentation:
    TableModel myModel = createMyTableModel();
    JTable table = new JTable(myModel);
    table.setRowSorter(new TableRowSorter(myModel));
    Check out http://java.sun.com/javase/6/docs/api/javax/swing/table/TableRowSorter.html. I find it to be good documentation.

  • How to add a DTD Reference to the payload ??

    Hi All,
    How to add a DTD Reference to the payload using graphical mapping ??
    For eg:
    Current Output
    ============
    <?xml version="1.0" encoding="UTF-8" ?>
    <dcsextractdata extractname="">
    <dataheaders>
    <dataheader>
    <record_type datatype="123" />
    <action datatype="CHAR">E</action>
    <code>FK</code>
    </dataheader>
    </dataheaders>
    </dcsextractdata>
    Required Output
    ============
    <?xml version="1.0" encoding="UTF-8" ?>
    <b><!DOCTYPE dcsextractdata SYSTEM "../lib/ftgppl.dtd"></b>
    <dcsextractdata extractname="">
    <dataheaders>
    <dataheader>
    <record_type datatype="123" />
    <action datatype="CHAR">E</action>
    <code>FK</code>
    </dataheader>
    </dataheaders>
    </dcsextractdata>
    Thanks in Advance
    Regards,
    Chemmanz

    Hi Chemmanz,
    your req of adding DTD ref cant be achieved by graphical mapping.......
    you can achieve your this req by making a J2EE adapter module and then deploying it in XI and then calling this module in your recever file comm channel...
    Thanks,
    Rajeev Gupta

  • How to use application.getRealPath()

    Hi all,
    I need to retrieve a document which is external to .war file and with in the same server location. I dont want to hard code the file location path in my jsp. Is there any other alternative by using getRealPath() method. Pl let me know how to use application.getRealPath() if it makes any sense.
    Hoping to hear from you soon :)

    Say, doc1 is in webapps1 and you want to get its real path in webapps2. For that,
    in webapps2, you can use ServletContext.getContext("/webapps1") method , to get the context of webapps1. Then from this context, you can use context.getRealPath("/doc1") method to get the location of the document doc1.
    Hope this helps.

  • How to use ArraySequence class???

    Hi ,
    I'm a beginner in programing with java.. I found some troubles with it
    the trouble is HOW TO USE ArraySequence class,
    I need to read a word from the user and broken it down and store each letter in a rank of the ArraySequence,,
    I found an example that breaks a string into words ,,But I never found
    examples that fill an ArraySequence with a built-in types like int or double or char
    Can anybody please help me??!!!!
    some functions of ArraySequence take as parameter OR return (position ) class can you please tell me what does this class do??
    SORRY FOR MY LANGUAGE ,,I'M NOT NATIVE SPEAKER

    There is no ArraySequence class in the API.

  • How to use StreamTokenizer class ?

    i want to use StreamTokenizer class in my program so that when i read from a file i want to make tokens of words present in the file, but i dont know how to use this class in my program, as i didnt find any example which shows how to use StreamTokenizer class. Can nebody knows how to use it in a program ?

    Hi,
    here's some sample code of how to use the StreamTokenizer.
    in = new StreamTokenizer(
    new BufferedReader(
    new FileReader(fname)));
    You can iterate through the file with:
    while(in.nextToken() != StreamTokenizer.TT_EOF)
    when you call nextToken() ttype is filled with the type of token, you can't test ttype for what kind of token,
    test for word:
    if (in.ttype == StreamTokenizer.TT_WORD)
    test for word:
    if (in.ttype == StreamTokenizer.TT_WORD)
    I think you can grasp the rest in javadoc

Maybe you are looking for

  • Video stretched when exported even when "letterbox" is checked

    Hi, I'm trying to export a lower quality version of one of my HD movies. I've previously been able to do this when I export using Quicktime Conversion at 640x480 with the "letterbox to preserve aspect ratio" option checked. However, I just did exactl

  • Why isn't the song Pavlove by Fall Out Boy on iTunes?

    I checked everywhere and I cant find it.

  • Kodak versus Shutterfly Print Quality

    [Thought I posted this yesterday, but can't find it; apologies if duplicative.] Although I want the convenience of creating albums and ordering prints of point-and-shoot snapshots through PE 4 from the Kodak Easy Share Gallery, after a test I noticed

  • ATV geht nicht mehr, Datum und Uhrzeit stellt sich nicht ein

    Ich bin im Studentennetzwerk der TU-Ilmenau. Bis vor einer Weile ging mein Apple-TV problemlos. Ich habe die Version 7.03. Doch dann hat sie sich aufgehangen und ich habe sie am PC wiederhergestellt (zurückgesetzt). Seit dem startet sie und es steht

  • Not propogating data captured......

    I have run the following script for bidirectional replication.... with database links server1 tyo server2 :SOULK server2 to server1 :dklr1 database name is orcl on both servers and schema name is replication connect STRMADMIN/STRMADMIN begin dbms_str