Bean related

Hi,
I have 2 queries wrt to Bean usage in JSPDynPage.
1. I am trying a very simple example which goes as follows:
Dynpage:
public void doProcessBeforeOutput() throws PageException {
      testbeanclass4 testBean4 = new testbeanclass4();
      ((IPortalComponentRequest)getRequest()).getServletRequest().setAttribute("testBean4", testBean4);     
      testBean4.setName("abcd");
      this.setJspName("jsp4.jsp");
JSP:
<%@ taglib uri= "tagLib" prefix="hbj" %>
<hbj:content id="myContext" >
  <hbj:page title="PageTitle">
   <hbj:form id="myFormId" >
<jsp:useBean id="testBean4" scope="application" class="com.sap.jspdynpage.jsp4.testbeanclass4" />  
    <hbj:textView
     id="temp"
     >
     <%
     temp.setText(testBean4.getName());
     %>
    </hbj:textView>
   </hbj:form>
  </hbj:page>
</hbj:content>
Bean:
package com.sap.jspdynpage.jsp4;
import java.io.Serializable;
public class testbeanclass4 implements Serializable {
     String name;
     public String getName(){
          return name;
     public void setName(String name){
          this.name = name;
But i am unable to get what i want... i am getting blank field!!
Any pointers to where am i going wrong..
PortalApp.xml has been correctly framed!!
2. What is the use of bean model in list boxes or tables? Does it act as an arrray of objects which can be populated into the table/listbox?
I have read the help.sap.com doc on Bean Model, still some kind of clarity is missing.
Points will be awarded!!
Regards,
Dev

Hi,
Sorry,I missed seeing your second query.
Basically a listbox or a table is a complex component containing many elements, unlike a button or an input field.
You might understand the mvc model.Now the view part is what you see on the page.The model part is your business logic/comes from the bean.You can basically create the by writing the business logic in a bean.This bean will populate the data in the table or listbox.But inorder to do that you will have to instantiate the model for the component.Then you will write methods that can be used to populate data or do specific actions or delegate events to methods/event handlers in the controllers.
The following link should give you the idea.
http://help.sap.com/saphelp_nw04s/helpdata/en/26/f79241e9129f09e10000000a155106/frameset.htm
And this document will give you an example of using model,and clarify your many doubts on beans for htmlb.
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/cefed690-0201-0010-8480-9c5c6504b89e
Regards,
Harish
(Please award points for helpful answers)
Message was edited by: HARISH SUBRAMANIAN
Message was edited by: HARISH SUBRAMANIAN
Message was edited by: HARISH SUBRAMANIAN

Similar Messages

  • Confuse..where are the java files(bean) related to JSP in Portal??

    Hi..
    Can anybody plz help me..
    I already deploy the new JPDK Jan 2003.
    It's works fine in the Portal.
    Just, i don't understand, where they put the java files(bean) related?
    For example..the Lottery (lotto.jsp)
    it called this bean..
    "<jsp:usebean id = "picker" class = "oracle.portal.sample.devguide.lottery.LottoPicker" scope = "page" />"
    but, when i searched in the Server, i cannot find this LottoPicker.java.....
    Pls help me, it is urgent..

    Hi,
    All the bean files are in samplev2.jar at %OC4J_HOME%/j2ee/home/applications/jpdk/jpdk/WEB-INF/lib. If you extract the zip you will see all the class files for samples in JPDK.
    btw, as per J2EE container specification, the default location for any java class file (i.e. '.class' files) is WEB-INF/lib (packaged as a jar) or inside WEB-INF/classes as individial class files (with their complete package structure)
    Regards,
    Abhinav

  • O/R tool generates invalid ejb-jar.xml for 1-n cmp bean-to-bean relations

    TopLink generates:
    <ejb-relation>
    <ejb-relation-name>Parent-Child</ejb-relation-name>
    <ejb-relationship-role>
    <ejb-relationship-role-name>Parent-has-childs</ejb-relationship-role-name>
    <multiplicity>One</multiplicity>
    <relationship-role-source>
    <ejb-name>Parent</ejb-name>
    </relationship-role-source>
    <cmr-field>
    <cmr-field-name>childs</cmr-field-name>
    </cmr-field>
    </ejb-relationship-role>
    <ejb-relationship-role>
    <ejb-relationship-role-name>child-owned-by-Parent</ejb-relationship-role-name>
    <multiplicity>Many</multiplicity>
    <cascade-delete></cascade-delete>
    <relationship-role-source>
    <ejb-name>Child</ejb-name>
    </relationship-role-source>
    </ejb-relationship-role>
    </ejb-relation>
    what's wrong?
    it's missing the following tag:
    '<cmr-field-type>java.util.Collection</cmr-field-type>'
    which should be in the <cmr-field> element after the <cmr-field-name>.
    I cannot get the UI tool to add this tag, whenever I manually add it to the ejb-jar.xml it gets removed the next time I generate the ejb-jar.xml. Additionally, if I try to update the project from the ejb-jar.xml, the O/R tool loses ALL my mappings for entity beans.
    Expected questions:
    TopLink 9.0.3
    WebLogic 7.0.1
    CMP 2.0
    JDK 1.3.1_03
    Yes the getter/setter are defined (on the local interface and bean)
    FYI,
    Andrew

    This should take care of it
    <ejb-jar>
    <enterprise-beans>
    <entity>
    <ejb-name>IDMaster</ejb-name>
    <home>maxateev.mondial.brg.idmaster.IDMasterHome</home>
    <remote>maxateev.mondial.brg.idmaster.IDMaster</remote>
    <local-home>maxateev.mondial.brg.idmaster.IDMasterLocalHome</local-home>
    <local>maxateev.mondial.brg.idmaster.IDMasterLocal</local>
    <ejb-class>maxateev.mondial.brg.idmaster.IDMasterEJB</ejb-class>
    <persistence-type>Container</persistence-type>
    <ejb-local-ref>
    <ejb-ref-name>ejb/IDMasterLocalHome</ejb-ref-name>
    <ejb-ref-type>Entity</ejb-ref-type>
    <local-home>maxateev.mondial.brg.idmaster.IDMasterLocalHome</local-home>
    <local>maxateev.mondial.brg.idmaster.IDMasterLocal</local>
    </ejb-local-ref>
    <prim-key-class>java.lang.String</prim-key-class>
    <reentrant>False</reentrant>
    <cmp-version>2.x</cmp-version>
    <abstract-schema-name>IDMaster</abstract-schema-name>
    <cmp-field>
    <field-name>idPrefix</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>idValue</field-name>
    </cmp-field>
    <primkey-field>idPrefix</primkey-field>
    <ejb-local-ref>
    <ejb-ref-name>ejb/IDMasterLocalHome</ejb-ref-name>
    <ejb-ref-type>Entity</ejb-ref-type>
    <local-home>maxateev.mondial.brg.idmaster.IDMasterLocalHome</local-home>
    <local>maxateev.mondial.brg.idmaster.IDMasterLocal</local>
    </ejb-local-ref>
    <query>
    <query-method>
    <method-name>findAllIDMasters</method-name>
    <method-params/>
    </query-method>
    <ejb-ql><![CDATA[SELECT OBJECT (f) FROM IDMaster as f]]></ejb-ql>
    </query>
    </entity>
    </enterprise-beans>
    <assembly-descriptor>
    <container-transaction>
    <method>
    <ejb-name>IDMaster</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    </ejb-jar>

  • WebLogic hangs around after shutdown process appears to complete - Message Driven Bean related

    On my current project we have some Ant scripts that automatically
    start and stop WebLogic. The stop script equates to (not exactly but
    close enough):
    java weblogic.Admin -url localhost:8001 -password password -username
    username SHUTDOWN
    WebLogic is start and shutdown for each system module. All modules
    use the exact same script for these two actions. Some of the modules
    use Message Driven Beans and consequently, since these use JMS, a
    JMSxxx.dat file is generated in the jms_store directory. As part of
    the cleanup process the jms_store directory and all files in it are to
    be deleted AFTER WebLogic shuts down.
    The shutdown process works fine in all cases where JMS is not used and
    in all cases where JMS IS used but there are NO message driven beans.
    However, when there is a message driven bean the server does not shut
    down in a timely manner, sometimes not at all (no error messages are
    produced), and the JMSxx.dat file
    remains locked. Consequently, all of the tests run via the ant script
    for modules come to a grinding halt (i.e. environment could not be
    cleaned so further tests would be skewed).
    Can anyone shed some light on a definitive order of events during
    WebLogic's shutdown process? What is the best way to test for the
    server being up? I know there is a ping utility for weblogic - should
    this be used or should a connection to a JNDI or JMS listening port do
    the trick? Any other ideas would be welcome.
    Thanks in advance,
    Mark

    On my current project we have some Ant scripts that automatically
    start and stop WebLogic. The stop script equates to (not exactly but
    close enough):
    java weblogic.Admin -url localhost:8001 -password password -username
    username SHUTDOWN
    WebLogic is start and shutdown for each system module. All modules
    use the exact same script for these two actions. Some of the modules
    use Message Driven Beans and consequently, since these use JMS, a
    JMSxxx.dat file is generated in the jms_store directory. As part of
    the cleanup process the jms_store directory and all files in it are to
    be deleted AFTER WebLogic shuts down.
    The shutdown process works fine in all cases where JMS is not used and
    in all cases where JMS IS used but there are NO message driven beans.
    However, when there is a message driven bean the server does not shut
    down in a timely manner, sometimes not at all (no error messages are
    produced), and the JMSxx.dat file
    remains locked. Consequently, all of the tests run via the ant script
    for modules come to a grinding halt (i.e. environment could not be
    cleaned so further tests would be skewed).
    Can anyone shed some light on a definitive order of events during
    WebLogic's shutdown process? What is the best way to test for the
    server being up? I know there is a ping utility for weblogic - should
    this be used or should a connection to a JNDI or JMS listening port do
    the trick? Any other ideas would be welcome.
    Thanks in advance,
    Mark

  • How to get bean information in EJB 3.0

    Hi all
    Can anyone tell how we can get the beans , I mean ejb beans related information deployed in the Netweaver AS programatically...  I am using EJB 3.0.
    thanks
    Rafi.

    Hi Rafi,
    Currently you can't do this programatically, the information is only available in the SAP NetWeaver Administrator. You could of course try JMX / MBeans but bear in mind that this is not officially supported and may be changed in the future.
    Check also my reply in this [thread|parsing ejb-jar.xml using jaxb;.
    HTH!
    \-- Vladimir

  • Mismatch between the bean code and generated code

    Hello all,
    I am running WL7.0Sp2 on Winnt4.0Sp6 connecting to Oracle 8.17. I have been running
    my app on this server for a while (all my beans deployed ok, WL started up fine,
    no problems). From last week, all of a sudden, I am getting the error attached
    when I am trying to deploy just one bean (?). The weird thing is it deploys fine
    in every other env. except fine (so I am guessing something must have gone awry
    in my class path) but I cant figure this out?
    Any ideas? suggestions?
    Thanks
    Sury
    [deploy_error.txt]

    To be sure, I'd recompile the jar and also make sure that
    none of the Bean related interfaces are reachable from the
    server's CLASSPATH.

  • Rolling back the transaction from stateful session bean

    Hi,
    How can I mark the transaction to be rolled back in a stateful session bean implementation?.
    Should I call setRollbackOnly method or throw a RemoteException or throw an EJBException, etc.?
    the configuration is :
    OC4J 9.0.4
    Stateful session bean
    Related method has transaction attribute - "Required"
    thanks & regards.
    ps : I couldn't find a related topic even if this has been discussed before (too many topics). if so, excuses.
    Erdem.

    Tried using Bean managed transactions but with the same result. Given below is the sample code.
    UserTransaction uts = null;
    try {
    uts = (UserTransaction)(ctx.getUserTransaction());
    uts.begin();
    Connection con = null;
    con = getCountConnection();
    PreparedStatement ps = con.prepareStatement(sqlselectUserId);
    ps.executeUpdate();
    PreparedStatement ps1 = con.prepareStatement(sqlselectUserDetails);
    ps1.executeUpdate();
    uts.commit();
    catch(SQLException e) {
         uts.rollback();

  • Bean issues in Forms 6i

    Hi,
    I have Bean related samples and jar files which creating button on runtime and it works perfectly in 10g but not in 6i.
    When i run 10g it running on browser, that time some java console loaded into taskpane.
    When i run 6i (run on client/server) nothing will come (button).
    When i try run 6i (run for web) im getting following error. Please help me how to resolve this issue.
    Frm-99999: Error 18114 occurred. See the Release Notes file (relnotes) from information about this error.
    kanish

    Please let me know if you got any resolution for the issue.
    Wasim

  • Exception occuring while trying to deploy the Entity Bean

    Unable to deploy EJB: com_poc_RetirementPlanHome from frameworkproofofconcept_weblogic.jar:
    There is a mismatch between the bean code and generated code.com_poc_RetirementPlanHome
    .      Please rerun ejbc on the bean code.The error was java.lang.NoSuchFieldException
         at java.lang.Class.getField0(Native Method)
         at java.lang.Class.getDeclaredField(Class.java:1108)
         at weblogic.ejb20.deployer.ClientDrivenBeanInfoImpl.setMDField(ClientDrivenBeanInfoImpl.java:651)
         at weblogic.ejb20.deployer.ClientDrivenBeanInfoImpl.setMethodDescriptors(ClientDrivenBeanInfoImpl.java:723)
         at weblogic.ejb20.deployer.ClientDrivenBeanInfoImpl.deploy(ClientDrivenBeanInfoImpl.java:823)
         at weblogic.ejb20.deployer.Deployer.deployDescriptor(Deployer.java:1294)
         at weblogic.ejb20.deployer.Deployer.deploy(Deployer.java:996)
         at weblogic.j2ee.EJBComponent.deploy(EJBComponent.java:31)
         at weblogic.j2ee.Application.deploy(Application.java:258)
         at weblogic.j2ee.J2EEService.deployApplication(J2EEService.java:190)
         at weblogic.management.mbeans.custom.Application.setLocalDeployed(Application.java:366)
         at weblogic.management.mbeans.custom.Application.setDeployed(Application.java:300)
         at java.lang.reflect.Method.invoke(Native Method)
         at weblogic.management.internal.DynamicMBeanImpl.invokeSetter(DynamicMBeanImpl.java:1401)
         at weblogic.management.internal.DynamicMBeanImpl.setAttribute(DynamicMBeanImpl.java:894)
         at weblogic.management.internal.DynamicMBeanImpl.setAttribute(DynamicMBeanImpl.java:847)
         at weblogic.management.internal.ConfigurationMBeanImpl.setAttribute(ConfigurationMBeanImpl.java:296)
         at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:1358)
         at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:1333)
         at weblogic.management.internal.ConfigurationMBeanImpl.updateConfigMBeans(ConfigurationMBeanImpl.java:393)
         at weblogic.management.internal.ConfigurationMBeanImpl.setAttribute(ConfigurationMBeanImpl.java:299)
         at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:1358)
         at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:1333)
         at weblogic.management.internal.MBeanProxy.setAttribute(MBeanProxy.java:322)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:204)
         at $Proxy8.setDeployed(Unknown Source)
         at java.lang.reflect.Method.invoke(Native Method)
         at weblogic.management.console.info.MBeanAttribute.doSet(MBeanAttribute.java:84)
         at weblogic.management.console.actions.mbean.DoEditMBeanAction.perform(DoEditMBeanAction.java:135)
         at weblogic.management.console.actions.internal.ActionServlet.doAction(ActionServlet.java:171)
         at weblogic.management.console.actions.internal.ActionServlet.doPost(ActionServlet.java:85)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:265)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2546)
         at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2260)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
         at weblogic.ejb20.deployer.Deployer.deploy(Deployer.java:1068)
         at weblogic.j2ee.EJBComponent.deploy(EJBComponent.java:31)
         at weblogic.j2ee.Application.deploy(Application.java:258)
         at weblogic.j2ee.J2EEService.deployApplication(J2EEService.java:190)
         at weblogic.management.mbeans.custom.Application.setLocalDeployed(Application.java:366)
         at weblogic.management.mbeans.custom.Application.setDeployed(Application.java:300)
         at java.lang.reflect.Method.invoke(Native Method)
         at weblogic.management.internal.DynamicMBeanImpl.invokeSetter(DynamicMBeanImpl.java:1401)
         at weblogic.management.internal.DynamicMBeanImpl.setAttribute(DynamicMBeanImpl.java:894)
         at weblogic.management.internal.DynamicMBeanImpl.setAttribute(DynamicMBeanImpl.java:847)
         at weblogic.management.internal.ConfigurationMBeanImpl.setAttribute(ConfigurationMBeanImpl.java:296)
         at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:1358)
         at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:1333)
         at weblogic.management.internal.ConfigurationMBeanImpl.updateConfigMBeans(ConfigurationMBeanImpl.java:393)
         at weblogic.management.internal.ConfigurationMBeanImpl.setAttribute(ConfigurationMBeanImpl.java:299)
         at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:1358)
         at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:1333)
         at weblogic.management.internal.MBeanProxy.setAttribute(MBeanProxy.java:322)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:204)
         at $Proxy8.setDeployed(Unknown Source)
         at java.lang.reflect.Method.invoke(Native Method)
         at weblogic.management.console.info.MBeanAttribute.doSet(MBeanAttribute.java:84)
         at weblogic.management.console.actions.mbean.DoEditMBeanAction.perform(DoEditMBeanAction.java:135)
         at weblogic.management.console.actions.internal.ActionServlet.doAction(ActionServlet.java:171)
         at weblogic.management.console.actions.internal.ActionServlet.doPost(ActionServlet.java:85)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:265)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2546)
         at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2260)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)

    To be sure, I'd recompile the jar and also make sure that
    none of the Bean related interfaces are reachable from the
    server's CLASSPATH.

  • Is CMR methods necessary in CMP Entity Beans?

    I refer to the J2EE 1.3.1 SDK CMP Customer application sample.
    I looked thru the CMP sample source code from the J2EE 1.3.1 SDK under /j2sdkee1.3.1/doc/sample and found that for every relationship the CustomerBean has with another Bean, there has to be some CMR methods.
    In this case, Customer has a:
    public abstract void addAddress(LocalAddress address)
    public abstract void addSubscription(LocalAddress)
    For the other That I understand. It's like specifying the foreign key for the record, so to speak.
    So for every foreign key field in other Beans (tables), does CustomerBean need a CMR method (get/set)? So if CustomerBean has 20 other tables using the CustomerID as a foreign key, does that imply that CustomerBean will have at least 20 CMR methods so that other Beans can add themselves and connect to CustomerBean?
    Another thing I noticed is that for Beans with foreign key(s) (sorry for including database terms, perhaps just called reference now in J2EE), they all link up to the other Beans (tables) in ejbPostCreate by adding themselves to the Bean Collection.

    IMHO you don't have to map every relationship
    (at DB level) when you declare CMR fields
    at EJB level.
    You have to answer at this question:
    "When I load/find an Entity Bean, I need, at the same time,
    to load Bean related to the Entity Bean ?".
    If the answer is YES then you'll declare a CMR
    field to express the relatiosnhip.
    Moreno

  • Autoincrement columns in CMP entity beans?

    Does anybody know what the best way to deal with MS SQL Server "identity"
    and "UID" columns is when using CMP entity beans in WLS6.0? This ugly
    little problem crops up in every app server. You would think it would be
    addressed in a more graceful manner!

    IMHO you don't have to map every relationship
    (at DB level) when you declare CMR fields
    at EJB level.
    You have to answer at this question:
    "When I load/find an Entity Bean, I need, at the same time,
    to load Bean related to the Entity Bean ?".
    If the answer is YES then you'll declare a CMR
    field to express the relatiosnhip.
    Moreno

  • Dynamic bean call in JSF - is it possible?

    Is there a way to make a method call on a backing bean that is only known at runtime?
    For example, in the code below:
    <h:commandButton value="Click" action="#{bean.foo}" />
    public class Bean
        public String foo()
            // Execute action
            return "navigation";
    }the call to bean in +<h:commandButton>+ is static. But what if I only know which
    backing bean I'll call at runtime? I would like something like this:
    <h:commandButton value="Click" action="#{(systemBean.beanName).foo}" />
    public class SystemBean
        public String getBeanName()
            if (some test)
                return "bean1";
            else
                return "bean2";
    }Is there a way to do this or a workaround?
    Thank you.
    Marcos

    Marcos_AntonioPS wrote:
    It's the case for bookmarked URLs Take a look for PrettyFaces.
    and a way to let the application developer
    do an action when a page loads and to know if it is a postback or not. If it had this
    last feature I wouldn't be with the problem that I am now. In ASP.NET the Page class
    (which all other pages derive) has the OnLoad method which is called everytime your
    page loads. In Java you have the constructor for that. Or if initialization is to be done after setting the managed properties, then use a method annotated with @PostConstruct.
    There you can check the IsPostBack property to find if it is a postback
    or not.You can use ResponseStateManager#isPostBack() for that.
    My problem is that I have to navigate to other page but at the same time execute an
    action (call a method) in the page that I'm going to. The first problem (navigate) is
    simple to solve, but not the second.As said: use the constructor or @PostConstruct.
    This is my situation: I have a +<h:selectOneMenu>+ in a page with many options. The user
    will select an option and click on a button. The action property of the button points
    to a method. In the method I'll check what the option was and return a String to the
    next page. So the navigation problem is solved. But I also need to call a method in the
    backing bean related to the page that will be called for the page to reset its values
    to start to collect new data from the user.I don´t fully get the picture, but this at least sounds like that the bean is been put in the session scope instead of the request scope.
    JSF doesn´t make things complicated. Your way of thinking and designing is complicated.

  • Adf faces: execute bean method after table is loaded

    Hi,
    How can I execute a method after an adf table is rendered on the page?
    This is what I want to do:
    I have a master/detail:
    - the master part contains a list of materials
    - the details contains a list of customers and volumes depending on the selected material.
    I tried to add totals on the details table:
    - I created an output text in the footer-facet of the colums containing volumes
    - I created a binding of the detail table to a CoreTable.
    - I created a method in a managed bean related to this CoreTable binding, so I can browse to all rows in the table and calculate the sum.
    - I then set the value of the output text to the total calculated in the managed bean.
    the problem is that I don't know how to execute the calculate procedure after the data in the detail table exists.
    What I tried:
    - call the calculate procedure in the setCoreTable method. --> at this point, there is no data in the table and this results in a nullPointerException when the pages is loaded.
    - call the calculate procedure on the valueChangeListener of the material list --> this doesn't work because totals are calculated for the previous details set.
    - I tried to add the call in one of the table listeners but I cannot find a listener that is executed after data is loaded in the table...
    for testing purpose only, I added a button: calculateTotals that calculates the totals. This works correctly.

    Hi,
    if you use page fragments exposed in an ADF region, you have two options I see
    1. Use a method call activity to call the managed bean
    2. Use a hidden UI component that references the setter/getter exposed in a managed bean and just use this as an indication for the page fragment being loaded
    Keragala

  • Exposing local entity beans to web tier?

    Hello all,
    I have a question concerning basic design issues with EJB and the JSP presentation
    layer. Currently, I have designed a system using all local component interfaces
    of EJB 2.0. I currently have the following architecture in place:
    EJB --> Servlets (WebWork Actions) --> JSP
    I'm utilizing the session facade design pattern where the business logic in encapsulated
    in session beans, which internally access the entity beans, etc. However, I am
    doing something of the following:
    sessionBean.getUserAccounts() which returns a Collection of actual UserAcountLocal's.
    I then am passing this collection off to the JSP just to cycle through each entity
    bean and display the data via its getXXX() methods. No modifications to the entity
    beans are being done directly in the Actions/JSPs, rather they are modified through
    methods of the session beans. Now I know that there is the concept of DTO (Data
    transfer objects), which send the data from the particular entity bean to a regular
    java bean for presentation. I know that DTO's increase performance if one is using
    remote interfaces, because there is less network traffic that occurs via that
    transport method. However, I know that WebLogic performs excellent caching of
    entity beans, so that multiple invocations of get() methods on entity beans will
    not make a trip to the database each and every time the get() method is called.
    So, my question is: Is it "safe" to continue with the current way I am designing/coding
    the system? I just find it a bit tedious to create value objects for each and
    every entity bean, if I know that I will not be calling setXXX() methods from
    within the presentation layer. Also, with EJB 2.0 and the introduction of local
    component interfaces, it seems that issues regarding limiting the amount of network
    traffic don't seem to be so relevant. Any suggestions/tips are appreciated. :-)
    Best regards,
    Ryan LeCompte
    [email protected]
    http://www.louisiana.edu/~rml7669

    use dtos
    the main reason is that if you call a getXXX() method on a local or remote
    interface from your servlet then that bean is retrieved again (as the
    servlet is outside the transaction involved in the initial retrieval)
    For example if you retrieve 100 users and want to display them in a html
    table with the user id, first name and lastname then there end up being more
    than 300 SQL statements executed (this is unless your ejbs are readonly)
    If you have a tool (like sql server profiler) that traces sql statements i
    recommend you use it to see the staggering amount of sql statements that are
    being executed by your current code - then DTOs will look much more
    appealing (it worked for me) :).
    I would also recommend using dtos when performing updates. Basically work
    towards your servlets never directly accessing anything entity bean related.
    Some people extend this further and have the DTO as the single argument in
    the create method of an entity bean - I havent done this yet myself but it
    looks like a good idea to me.
    "Ryan LeCompte" <[email protected]> wrote in message
    news:[email protected]...
    >
    Hello all,
    I have a question concerning basic design issues with EJB and the JSPpresentation
    layer. Currently, I have designed a system using all local componentinterfaces
    of EJB 2.0. I currently have the following architecture in place:
    EJB --> Servlets (WebWork Actions) --> JSP
    I'm utilizing the session facade design pattern where the business logicin encapsulated
    in session beans, which internally access the entity beans, etc. However,I am
    doing something of the following:
    sessionBean.getUserAccounts() which returns a Collection of actualUserAcountLocal's.
    I then am passing this collection off to the JSP just to cycle througheach entity
    bean and display the data via its getXXX() methods. No modifications tothe entity
    beans are being done directly in the Actions/JSPs, rather they aremodified through
    methods of the session beans. Now I know that there is the concept of DTO(Data
    transfer objects), which send the data from the particular entity bean toa regular
    java bean for presentation. I know that DTO's increase performance if oneis using
    remote interfaces, because there is less network traffic that occurs viathat
    transport method. However, I know that WebLogic performs excellent cachingof
    entity beans, so that multiple invocations of get() methods on entitybeans will
    not make a trip to the database each and every time the get() method iscalled.
    So, my question is: Is it "safe" to continue with the current way I amdesigning/coding
    the system? I just find it a bit tedious to create value objects for eachand
    every entity bean, if I know that I will not be calling setXXX() methodsfrom
    within the presentation layer. Also, with EJB 2.0 and the introduction oflocal
    component interfaces, it seems that issues regarding limiting the amountof network
    traffic don't seem to be so relevant. Any suggestions/tips areappreciated. :-)
    >
    Best regards,
    Ryan LeCompte
    [email protected]
    http://www.louisiana.edu/~rml7669

  • WLS 9.2 using XmlBeans error

    Using WLS 9.2 MP1 and attempting to use XmlBean derived classes from a bean called from a JSP.
              Using XmlBeans v2.3.0.
              Server is WebLogic Server 9.2 MP1 Sun Jan 7 00:56:31 EST 2007 883308
              JSP version is 2.0
              Servlet API is 2.4
              An exception is thrown :
                        javax.servlet.jsp.el.ELException
                   at javelin.jsp.el.ArrayRefEvaluator.evaluateBeanType(ArrayRefEvaluator.java:252)
                   at javelin.jsp.el.ArrayRefEvaluator.evaluate(ArrayRefEvaluator.java:49)
                   at javelin.jsp.el.ELNode$RefExpression.evaluate(ELNode.java:492)
                   at javelin.jsp.el.ExpressionEvaluatorImpl$ELExpression.evaluate(ExpressionEvaluatorImpl.java:186)
                   at javelin.jsp.el.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:124)
                   at javelin.jsp.el.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:104)
                   at jsp_servlet._order.__composeorder3._jsp__tag1(__composeorder3.java:229)
                   at jsp_servlet._order.__composeorder3._jspService(__composeorder3.java:205)
                   at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
                   at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:223)
                   at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
                   at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
                   at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
                   at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3245)
                   at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
                   at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
                   at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2003)
                   at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1909)
                   at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1359)
                   at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
                   at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
                        This corresponds to the declaration of the root document within the bean e.g.
              ======== JSP code extract ===========
                        <%@ include file="/html/doctypes/StrictDoctype.html" %>
              <%@ taglib uri="utilTLD" prefix="util" %>
              <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
              <%@ taglib uri="http://java.sun.com/jsp/jstl/xml" prefix="x" %>
              <%@ page import="com.web.order.*" %>
              <%@ page language="java" session="false" %>
              <jsp:useBean id="composeXmlBean" scope="request" class="com.web.order.composeXmlBean">
              <jsp:setProperty name="composeXmlBean" property="*"/>
              </jsp:useBean>
              <c:set scope="page" var="xml" value="${composeXmlBean.myXmlString}"/>
                        ============End Jsp code =======
              ========Java code extract =======
                        public class ComposeXmlBean {
                   public Document getMyXmlString() {
                             // Use XML Beans to construct the XML String
                         DDServiceDocument rootDoc = DDServiceDocument.Factory.newInstance();
                        ========End Java code ===========
              Anyone have any ideas about what could be causing this error. I have used XmlBeans without problem in WLS 8.1. Is this a WLS9.2 problem caused by Javelin ?
              regards,
              Chris

    Chris,
              Firstly, I think your pasted jsp's line below is not correct:
              <jsp:useBean id="composeXmlBean" scope="request"
              class="com.web.order.composeXmlBean">
              Should it be <jsp:useBean id="composeXmlBean" scope="request"
              class="com.web.order.ComposeXmlBean"> ?
              I tried to reprodcue your issues locally, but fails (my testcase works fine)
              since I have not your customerized classes.
              My codes are listed below:
              1) Bean codes:
              package com.web.order;
              public class ComposeXmlBean {
              public String getMyXmlString() {
              return "100";
              public void setMyXmlString(String setV) {
              return;
              2) JSP codes:
              <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
              <%@ taglib uri="http://java.sun.com/jsp/jstl/xml" prefix="x" %>
              <%@ page import="com.web.order.*" %>
              <%@ page language="java" session="false" %>
              <jsp:useBean id="composeXmlBean" scope="request"
              class="com.web.order.ComposeXmlBean">
              <jsp:setProperty name="composeXmlBean" property="*"/>
              </jsp:useBean>
              <c:set scope="page" var="xml" value="${composeXmlBean.myXmlString}"/>
              My sugegstions:
              1) is it a XML bean related issue?
              can you remove XML releated logic to verify whether JSP compiler could
              support this kind of EL ( "${composeXmlBean.myXmlString}") correctly?
              2) If possible, can you pasted a reproducer here(a .war)?
              3) As for WLS8.1, which only support JSP1.2 and dose not support JSP2.0's
              EL, while your failed points is at EL: "${composeXmlBean.myXmlString}" in
              fact, I think your testcases are different during these two tests(WLS 8.1
              and WLS 9.2), Or that EL dose not work at all in WLS8.1. Can you help to
              clarify this?
              Regards
              Leon
              <Chris Thorp> wrote in message news:[email protected]...
              Using WLS 9.2 MP1 and attempting to use XmlBean derived classes from a bean
              called from a JSP.
              Using XmlBeans v2.3.0.
              Server is WebLogic Server 9.2 MP1 Sun Jan 7 00:56:31 EST 2007 883308
              JSP version is 2.0
              Servlet API is 2.4
              An exception is thrown :
                        javax.servlet.jsp.el.ELException
              at
              javelin.jsp.el.ArrayRefEvaluator.evaluateBeanType(ArrayRefEvaluator.java:252)
              at javelin.jsp.el.ArrayRefEvaluator.evaluate(ArrayRefEvaluator.java:49)
              at javelin.jsp.el.ELNode$RefExpression.evaluate(ELNode.java:492)
              at
              javelin.jsp.el.ExpressionEvaluatorImpl$ELExpression.evaluate(ExpressionEvaluatorImpl.java:186)
              at
              javelin.jsp.el.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:124)
              at
              javelin.jsp.el.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:104)
              at jsp_servlet._order.__composeorder3._jsp__tag1(__composeorder3.java:229)
              at jsp_servlet._order.__composeorder3._jspService(__composeorder3.java:205)
              at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
              at
              weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:223)
              at
              weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
              at
              weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
              at
              weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
              at
              weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3245)
              at
              weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
              at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
              at
              weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2003)
              at
              weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1909)
              at
              weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1359)
              at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
              at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
                        This corresponds to the declaration of the root document within the bean
              e.g.
              ======== JSP code extract ===========
                        <%@ include file="/html/doctypes/StrictDoctype.html" %>
              <%@ taglib uri="utilTLD" prefix="util" %>
              <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
              <%@ taglib uri="http://java.sun.com/jsp/jstl/xml" prefix="x" %>
              <%@ page import="com.web.order.*" %>
              <%@ page language="java" session="false" %>
              <jsp:useBean id="composeXmlBean" scope="request"
              class="com.web.order.composeXmlBean">
              <jsp:setProperty name="composeXmlBean" property="*"/>
              </jsp:useBean>
              <c:set scope="page" var="xml" value="${composeXmlBean.myXmlString}"/>
                        ============End Jsp code =======
              ========Java code extract =======
                        public class ComposeXmlBean {
              public Document getMyXmlString() {
                             // Use XML Beans to construct the XML String
                    DDServiceDocument rootDoc =
              DDServiceDocument.Factory.newInstance();
                        ========End Java code ===========
              Anyone have any ideas about what could be causing this error. I have used
              XmlBeans without problem in WLS 8.1. Is this a WLS9.2 problem caused by
              Javelin ?
              regards,
              Chris

Maybe you are looking for

  • Kernel panic at start up

    Tiger freezed while usage, I shut it down and tried to reboot Tiger (10.4.3), but now kernel panic appears every time I start my mac with "... ... hanging here" message log. I already tried to repair permissions with disk utility in tier installation

  • Use Server Cert in Managed server not working

    I am using WebLogic 10.3.3 for a managed server with a jks keystore and jrockit cacert as the Custom Identity and Java Standard Trust. I have the FQDN as the alias for the server in the keystore. Under Advanced, I have checked Use Server Cert so outg

  • Creating an Incremental Unique Key in Transfer Rules Routine

    Hello Experts, In my Infosource, I have created a routine in the transfer rules on my infoobject.  I am trying to load my data from a flat file and create a unique key by autonumbering a field in my infosource/datatarget.  I am new to ABAP and can no

  • PDF copy of the disordered

    Problems found in the copy of data from PDF format to move data into Microsoft Word disordered. The data stored changes to the average of all the left. There is a solution?

  • Sort Mail Inbox Search by From?

    In the past Mail versions, when you searched mail in the Inbox, it would show you who SENT the message. Mountain Lion Mail shows me who it was sent TO. That's funny because it's always me, obviously, it's my inbox. Anyway to set it back to showing me