A bean referencing another beans anonymous method.

Hey,
I have a situation that goes as follows:
public interface Contract {
void doWork();
public class ClassB {
int var1,var2;
void method2() {
ClassA a = new ClassA();
a.method1(new Contract() {
public void doWork() {
var1 = 1;
var2 = var1 + 3;
System.out.println(var2);
public class ClassA {
void method1(Contract ct) {
ct.doWork();
If I am using these classes as a UI Beans in a container and then when classA tries to call the method doWork() implemented in ClassB as above and by the time ClassA tires to invoke the method if ClassB is destroyed what would happen to the variables accessed by it ? Would that result in a runtime error or is there a security mechanism employed by java ?

There is a mechanism employed by java... it's called garbage collection.
The instance of a holds a reference to an instance of the anomyous implementation of Contract... so it can't be garbage collected... the anomyous implementation being an inner class holds an implicit reference to it's outer class... so it is also safe from hungry GC.
Is that clear enough?... I haven't explained it very well, coz I'm linguistically challenged... but read it through three times and it might come clear.
Cheers. Keith.

Similar Messages

  • Validating a method object whether it is a bean class method

    I have a class that is loaded dynamically using URLClassLoader. It is required to validate whether it is a valid bean class' method. i.e. if it is set method, it should start with <set>xxx and if it is get method, it should be like <get>xxx or <is>xxx. I dont want to make it with if conditions and I believe there should be a way to validate if that class satisfies java bean naming specification ( for class/method). Any help is much appreciated.

    kajbj  wrote:
    How would you be able to verify that? Beans can have other methods as well. Well.. in my case, I want to ensure that that does not contain "other methods" and only getters/setters. It should be just a bean and nothing more. There could be cases when a setter method is written like "setTablename" ( note: camel case missing).
    I prefer to use this one.
    public class Bean {
        String tableName;
        public String getTableName() {
            return tableName;
        public void setTableName(String tableName) {
            this.tableName = tableName;
    try {
         BeanInfo info = Introspector.getBeanInfo( Bean.class );
         PropertyDescriptor[] pd  = info.getPropertyDescriptors();
         for (int i=0;i<pd.length;i++) {
              System.out.println( pd.getName() +","+pd[i].getReadMethod());
    if(pd[i].getReadMethod()==null) {
    throw new Exception("Not a bean");
    } catch (Exception e) {
    e.printStackTrace();
    }This code works well, when 1. members not in camel case,
    2. methods not in camel case. But when it comes to method , it throws exception for public String getTablename() {
    return tableName;
    }But it doesnt throw exception for public String gettableName() {
    return tableName;
    } I predicted exception here. Correct me If I am wrong.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Dynamic Calc referencing another Dynamic Calc

    Hi,
    I found a problem today in a Dynamic Calc member formula.
    Member A has in formula: B;
    Member B has in formula: C + D;
    Both members are Dynamic Calc and while member B shows the correct result, member A shows nothing in forms. If I switch the formula of member A to C + D; then it shows results.
    Is there any problem of Dynamic Calc members referencing another Dynamic Calc members?
    Thank you

    or change the position of member A/member B in the outline.^^^Exactly, Essbase is calculating the dimension top to bottom and if A needs B, it needs to be after B or as Andre stated, you need to stick a two-pass on A. I prefer not to use two-pass unless i need to as it can FUBAR my YTD and variance calcs. It's just easier to have it work in the "right" order.
    Regards,
    Cameron Lackpour

  • USe a Bean Function (Method, Prop ) from another Bean

    Sorry for the Vocabulary I'm just a beginer,
    I have Two Beans BeanA and BeanB
    In BeanA I Try to Call a Method from BeanB what do I need to Declare, Import ....
    The Beans are in the same Package in the Classes Folder of my WebServer (Iplanet)
    Thanks for your help

    Sorry for the Vocabulary I'm just a beginer,
    I have Two Beans BeanA and BeanB
    In BeanA I Try to Call a Method from BeanB what do I
    need to Declare, Import ....
    The Beans are in the same Package in the Classes
    Folder of my WebServer (Iplanet)
    Thanks for your helpHi hoanet
    You can write
    import package.BeanB;
    and try
    Rambee

  • CMP bean : 'create' method fails - SQL Syntax error

    I'm using SilverStream 3.7.3 server on Win 2K.
    In a CMP entity bean, call to any create method ( default using primary key or with any other list of parameters ) fails , giving this error :
    javax.ejb.CreateException: [Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement.
    <<no stack trace available>>
    I've doubly checked for mismatch between types of database columns & parameters passed, but there is no difference. ( Another BMP bean uses same types and it's working perfectly )
    Interestingly, the 'finder' & other business methods are working without any problem.
    Any idea about cause of this error / options to solve / get around the prob?
    TIA,
    Subodh

    Hi,
    See if you can get SilverStream to give you the JDBC statements it is sending to Access. If SilverStream can't do that, try using P6Spy to get hold of the JDBC. Once you have the SQL, you should be able to figure out where the prolbem is... and if you can do anything about it.
    Does access actually accept any form of Standard SQL?
    Daniel.

  • Creating Session Bean Facade Methods Off EJB QL

    Hello,
    I'm trying to follow the documentation for creating a Session Bean that has facade methods for various Entity Beans. When I add a named query:
    @NamedQuery(name = "Debtor.findDebtorById", query = "select o from Debtor o where o.debtorId = ?1")
    I end up with the following facade method:
    /** <code>select object(o) from Debtor o where o.DEBTOR_ID = ?1</code> */
    public List<Debtor> queryDebtorFindDebtorById(Object p1) {
    return em.createNamedQuery("Debtor.findDebtorById").setParameter(0, p1).getResultList();
    I see two issues here:
    1) The type of the input parameter is supposed to be a long, as the Entity Bean field looks like:
    @Id
    @Column(name="DEBTOR_ID", nullable = false)
    private Long debtorId;
    2) The parameter being set is '0' instead of '1'.
    Is there a known issue with generating this code in JDev? Or am I doing something wrong?

    another strange problem.
    i have an APplication server added ( JBOSS ).
    when i create deployment profile (EAR ) application server is showed in the ComboBox .
    But when i create Java Test Client for some EJB and when i check " Connect Remote Application server" there is 2 comboboxes
    J2EE Application
    App Server Connection.
    first combo is ok there is EJB applicaiton
    Secound is empty .. but i Have App Server.
    Another think is that when i create EJB 3.0 its BAD to see J2EE app it must be J EE 5 app or just Java EE app

  • Jsp bean property method dilemma

    Hi all,
    I'm just starting using bean and trying to convert old jsp in MVC model using beans. I expose the problem:
    a simple internal search engine ask with a form to enter the some parameter. I want to use this parameter to compose my query to the db.
    Now I use this code in my jsp to make the query:
    boolean firstTime = true;
    Hashtable hshTable = new Hashtable(10);
    Enumeration enumParam = request.getParameterNames();
    while (enumParam.hasMoreElements())
      String name = (String)enumParam.nextElement();
       String sValore = request.getParameter(name);
       if (!sValore.equals(""))
        hshTable.put(name, new String(sValore));
    Enumeration enumHshTable = hshTable.keys();
    while (enumHshTable.hasMoreElements())
      String str_SelectStatement = "SELECT * FROM myTable";
      /*If isn't my first time don't add WHERE but AND*/
      if (firstTime)
       str_SelectStatement += " WHERE (";
       firstTime = false;
      else
       str_SelectStatement +=" AND (";
      String sKey = (String)enumHshTable.nextElement();
       str_SelectStatement += sKey + " LIKE '" + (String)hshTable.get(sKey) + "%')";
    }In this way I compose a smart query like this:
    SELECT * FROM myTable WHERE param1 LIKE 'param1Value' AND param2 LIKE 'param2Value' AND........
    How to convert it in a bean model?
    If I make n setXxxx() getXxxx() I loss in reuse of code.
    If I make personalized setXxxx() for the param1 how can I access to the name of the current method?
    I need this to compose my query. I can retrive the param1Value but not the current name (param1) of the parameter.
    import java.sql.*;
    import java.io.*;
    public class DbBean
    String Param1;
    ResultSet r = null;
    boolean firstTime = true;
    String str_SelectStatement = "SELECT * FROM myTable";
    public DbBean()
      super();
    public String getParam1() throws SQLException
      this.Param1 = r.getString("Param1")!=null?r.getString("Param1"):"";
      return this.Param1;
    public void setParam1(String param1Value)
      if (firstTime)
       str_SelectStatement += " WHERE (";
       firstTime = false;
      else
       str_SelectStatement +=" AND (";
    str_SelectStatement += NameOfTheMethod... + " LIKE '" + param1Value;
      this.Param1= newValue;
    }How can I take the NameOfTheMethod... Param1?
    I search around and I read that you can access to the Method name in the stack trace in an other method. But I can't belive this is THE way. It is no suitable.
    Any suggestion will be greatly appreciated.
    Thank you

    Hiya Ejmade,
    First of all: you're missing the concept of the MVC (Model - View - Controller) model. There are two (2) versions out there, with the currently pending (no. 2) going like this:
    from a resource, a JSP page acquires a java bean, encapsulating the data. Via set/get methods of the bean, you create content on the JSP page
    If you wanted to comprise your search engine like this, you would first have to create a file search.jsp (can be .html at this point) which would call a SearchServlet. This servlet would perform a query, encapsulate the data in some object (let's say java.sql.ResultSet) and then forward control to a JSP page, including the object. The page would acquire the object (through the session context, for instance), extract data, and make it available on the site.
    But that's not what's puzzleing you. You would like to know which method created the database query string so you could adapt that very string. This can be done with the class introspection API, reflection. It's quite complex, you'll need to read about it in a tutorial, try:
    http://java.sun.com/tutorial
    The reflection API has quite a lot of overhead and it, honestly speaking, does not have to be used here. Instead, try this:
    public class DBean {
    Hashtable queryParamters;
    public DBean(Hashtable queryParameters) {
      this.queryParameters = queryParameters;
    public String generateSQLCode() {
      StringBuffer call = new StringBuffer("SELECT * FROM myTable WHERE ");
      for (Enumeration e = queryParameters.keys(); e.hasMoreElements();) {
       String key = (String)e.nextElement();
       call.append(key + " LIKE " + (String)queryParameters.get(key));
      return(call.toString());
    }This code should generate the string for you (with minor adjusments). Btw, I noticed some basic mistakes in the code (calling the Object() constructor, for instance, which is not neccessary). Do pick up a good java book ..
    Hope this helps,
    -ike, .si

  • Problem with dsp:setvalue bean="FH.method" value="Submit"/ !

    Hi ATG'ers,
    instead of this (which WORKS):
    <dsp:setvalue bean="ShoppingCartModifier.moveToConfirmationSuccessURL" value="../checkout/checkoutReviewPlaceOrder.jsp"/>
    <dsp:setvalue bean="ShoppingCartModifier.moveToConfirmationErrorURL" value="../checkout/checkoutPayment.jsp"/>
    <dsp:form name="moveToConfirmationForm" action="testWebPaymentConfirmation_EUR.jsp" method="post">
         <dsp:input bean="ShoppingCartModifier.moveToConfirmationSuccessURL" type="hidden"/>                          
         <dsp:input bean="ShoppingCartModifier.moveToConfirmationErrorURL" type="hidden"/>
         <dsp:input bean="ShoppingCartModifier.moveToConfirmation" priority="-100" value="Submit" type="hidden"/>
    </dsp:form>
    <script type="text/javascript">
         document.moveToConfirmationForm.submit();                                   
    </script>
    I want to use this (because I've been told I can't use javascript to submit this form) :
    <dsp:setvalue bean="ShoppingCartModifier.moveToConfirmationSuccessURL" value="../checkout/checkoutReviewPlaceOrder.jsp"/>
    <dsp:setvalue bean="ShoppingCartModifier.moveToConfirmationErrorURL" value="../checkout/checkoutPayment.jsp"/>
    <dsp:setvalue bean="ShoppingCartModifier.moveToConfirmation" value="Submit"/>
    But when I do it, it goes into the handle (pre and post) as expected but it DOES NOT redirect to "../checkout/checkoutReviewPlaceOrder.jsp", the moveToConfirmationSuccessURL.
    It just seems to hang and not redirect there.
    Can someone tell me why or if this is even actually possible?
    Regards,
    Dan
    PS please note there will be other values too but i didn't include these just to make it simple to read but I hope you get the idea :)
    Edited by: 881389 on 24-Aug-2011 11:35

    <dsp:form name="moveToConfirmationForm" action="testWebPaymentConfirmation_EUR.jsp" method="post">
    <dsp:input bean="ShoppingCartModifier.moveToConfirmationSuccessURL" value="../checkout/checkoutReviewPlaceOrder.jsp" type="hidden"/>
    <dsp:input bean="ShoppingCartModifier.moveToConfirmationErrorURL" value="../checkout/checkoutPayment.jsp" type="hidden"/>
    <dsp:input bean="ShoppingCartModifier.moveToConfirmation" value="" type="hidden"/>
    a href="#" class="button" onclick="javascript:moveToConfirmation();">
    Move to Confirmation
    </a
    </dsp:form>
    <script type="text/javascript">
    function moveToConfirmation() {
    window.document.addToCartForm["/atg/commerce/order/purchase/ShoppingCartModifier.moveToConfirmation"].value="submit";
    document.moveToConfirmationForm.submit();
    </script>
    Can you try this, use your movetoconfirmation button instead of anchor tag.
    Thanks,
    Suresh
    Edited by: Suresh Repalle on Aug 25, 2011 12:09 PM
    Edited by: Suresh Repalle on Aug 25, 2011 12:12 PM
    Edited by: Suresh Repalle on Aug 25, 2011 12:15 PM

  • Backing Bean Validation Method error

    Hi all,
    I've an ADF JSF User Registration Form and I want to set my server-side validation to confirm passwords entered by the user using the validator attribute bound to customized validation logic sitting in a method my backing bean. I've tried quite a few cracks at this but I still seem to get a java.lang.NullPointerException error when the method is invoked.
    The relevant method in my Backing Bean looks like this:
    public void comparePassword(FacesContext facesContext, UIComponent uiComponent, Object newValue) {
    //Get the new value that is passed passed from the Confirm Password field
    String confirmPassword = (String)newValue;
    //Get the password that has already been entered
    String password = (String)getLoginPasswordText().getValue();
    //Compare passwords and raise validation error message
    if (!password.equals(confirmPassword)){
    throw new ValidatorException(new FacesMessage
    (FacesMessage.SEVERITY_ERROR,
    "Passwords need to be the same",
    "Password values should be the same"));
    The getters and setters for the components are also in the bean and the gettLoginPasswordText() returns the original password input text field (the one that I want to compare it to).
    Is there something that I've missed here?
    Cheers

    Thanks Frank.
    I now understand a bit more about value binding. But unfortunately I need a little more help (from anyone) on this one. I've tried quite a few things and I think the problem stems from the fact that the validation code doesn't seem to pickup the value entered in the comparison field - at least in the way that I've coded it. Here's a more complete example of what I'm trying to overcome:
    I've got two input text components:
    <af:inputText required="true" simple="true"
    id="loginPasswordText"
    immediate="true"
    value="#{backing_UserRegistration.password1}">
    </af:inputText>
    <af:inputText required="true" simple="true"
    id="loginConfirmPasswordText"
    immediate="true"
    validator="#{backing_UserRegistration.comparePassword}"
    value="#{backing_UserRegistration.password2}">
    </af:inputText>
    I've setup the relevant accessors as in the following:
    String password1 = "";
    public String getPassword1(){
    return password1;
    String password2 = "";
    public String getPassword2(){
    return password2;
    And my validation now code looks like this:
    public void comparePassword(FacesContext context, UIComponent toValidate, Object value) {
    if (!Password2.equals(Password1)) {
    FacesMessage msg = new FacesMessage("summary message", " detailed message");
    msg.setSeverity(FacesMessage.SEVERITY_INFO);
    ValidatorException e = new ValidatorException(msg);
    throw e;
    I've tested the validation code on a standalone basis ie passing in a new variable as part of the method ie.
    String word = (String) value;
    if (word.equals("tom"))....
    The validator and message fires OK, so I know the problem lies with picking up the entered values for password1 and password2. I know the values are there because I can "see" them on screen and they are recognized by standalone validators and the bean has a session scope.
    Ideas anyone?
    Thanks

  • Regarding stateless bean create() method problem

    hi every body,
    I am Learning EJB now for this i created one StatelessBean with a eho functionality with jsp. it is working good for the first time but when i am trying to run that jsp once again it shows the following error in server console
    11:32:13,090 ERROR [LogInterceptor] EJBException in method: public abstract beans.StatelessRemote beans.StatelessHome.create() throws javax.ejb.CreateException,java.rmi.RemoteException:
    javax.ejb.EJBException: Invalid invocation, check your deployment packaging, method=public abstract beans.StatelessRemote beans.StatelessHome.create() throws javax.ejb.CreateException,java.rmi.RemoteException
    i am using Netbeans and J2EE 1.4 version and using Jboss 4.2.2.GA
    please help me in this regard
    yours,
    -sat-

    Bean :::::::::::::
    package beans;
    import javax.ejb.SessionBean;
    import javax.ejb.SessionContext;
    public class StatelessBean implements SessionBean {
    SessionContext context;
    // The public business method. This must be coded in the
    // remote interface also.
    public String getEchoString(String clientString) {
    return (clientString.toUpperCase() + " - from session bean");
    // Standard ejb methods
    public void ejbActivate() {
    System.out.println("ejb activate called");}
    public void ejbPassivate() {
    System.out.println("ejb passivate called");}
    public void ejbRemove() {
    System.out.println("ejb remove called");}
    public void ejbCreate() {
    System.out.println("ejb create called");}
    public void setSessionContext(SessionContext context) {
    System.out.println("setSessionContext called");
    this.context=context;
    Home interface::::::::::::::::::::::::::
    package beans;
    import java.rmi.RemoteException;
    import javax.ejb.EJBHome;
    import javax.ejb.CreateException;
    public interface StatelessHome extends EJBHome {
    // The create() method for the SimpleSession bean
    public StatelessRemote create()
    throws CreateException, RemoteException;
    Remote interface::::::::::::
    package beans;
    import java.rmi.RemoteException;
    import javax.ejb.EJBObject;
    public interface StatelessRemote extends EJBObject {
    // The public business method on the SimpleSession bean
    public String getEchoString(String clientString)
    throws RemoteException;
    client ie.. index.jsp
    <%@ page import="java.util.*,java.io.*,java.lang.*" %>
    <%@ page import="beans.*,javax.naming.InitialContext,javax.naming.Context,javax.rmi.PortableRemoteObject" %>
    <%--
    Document : index
    Created on : Dec 2, 2008, 11:33:10 AM
    Author : sathish.kumar
    --%>
    <%@page contentType="text/html" pageEncoding="UTF-8"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>JSP Page</title>
    </head>
    <body>
    <%
    Properties pro=new Properties();
    StatelessHome home;
    StatelessRemote simpleSession;
    String result=new String();
    try {
    // Get a naming context
    pro.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
    pro.put(Context.URL_PKG_PREFIXES,"org.jboss.naming:org.jnp.interfaces");     
    pro.put(Context.PROVIDER_URL,"localhost:1099");
    InitialContext JContext = new InitialContext(pro);
    System.out.println("context::::::::::::::>"+JContext);
    // Get a reference to the SimpleSession JNDI entry
    Object ref =JContext.lookup("StatelessBean");
    // Get a reference from this to the Bean's Home interface
    home = (StatelessHome)PortableRemoteObject.narrow(ref, StatelessHome.class);
    // Create a SimpleSession object from the Home interface
    simpleSession = home.create();
    // Loop through the words
    for (int i = 0; i < 10; i++) {
    String returnedString = simpleSession.getEchoString("hello"+i+"::>>");
    System.out.println("sent string: " +"hello"+i+"::>>" +
    ", received string: " + returnedString);
    result+=returnedString;
    } catch(Exception e) {
    e.printStackTrace();
    %><form name="my" method=post>
    <h2>Hello World!<hr><br><%= result%><hr></h2></form>
    </body>
    </html>

  • Does CMP bean finder method supports "LIKE" sql?

    I put something like this in the orion-ejb-jar.xml file:
    <finder-method partial="false" query="select * from EMP where $ename like $1 AND $job like $2">
    </finder-method>
    If I put in exact value like 'ADAMS' or 'CLERK', it works fine. But if I put in 'A%' or 'CL%', it does not work. I know the record is there and the same sql does return a row in sql-plus.
    Appreciate any help.
    Adam

    I put something like this in the orion-ejb-jar.xml file:
    <finder-method partial="false" query="select * from EMP where $ename like $1 AND $job like $2">
    </finder-method>
    If I put in exact value like 'ADAMS' or 'CLERK', it works fine. But if I put in 'A%' or 'CL%', it does not work. I know the record is there and the same sql does return a row in sql-plus.
    Appreciate any help.
    Adam gday Adam -
    I don't think there is anything in the persistence manager that will prevent this from working as you want.
    Can I ask what version of OC4J you are using?
    I'm not sure from your email if you are you specifying the fields in the finder method by surrounding them with SQL style quotes as in 'A%'? You shouldn't need to do that if you are.
    I just tested it out with a simple client and entity bean based on the employee table, which I created in about 30 seconds with the new JDeveloper CMP Entity Bean Wizard, using the create from existing table option.
    I added a finder method that looks like the following:
    Collection findByEnameAndJob(String ename, String job) throws RemoteException, FinderException;
    And then changed the SQL in the finder dialog (or orion-ejb-jar.xml) for the finder to be
    <finder-method partial="False" query="select * from emp where $ename like $1 and $job like $2">
    <method>
    <ejb-name>Emp</ejb-name>
    <method-name>findByEnameAndJob</method-name>
    <method-params>
    <method-param>java.lang.String</method-param>
    <method-param>java.lang.String</method-param>
    </method-params>
    </method>
    </finder-method>
    The client code then looked for employees with a name starting with the letter A and whose job started with the letters CL as follows:
    Collection coll = empHome.findByEnameAndJob("A%","CL%");
    System.out.println("*** There were : " + coll.size() + " records returned ***");
    Iterator iter = coll.iterator();
    while (iter.hasNext())
    emp = (Emp)iter.next();
    System.out.println("empno = " + emp.getEmpno());
    System.out.println("ename = " + emp.getEname());
    When the client was run, this was the resulting output:
    *** There were : 1 records returned ***
    empno = 7876
    ename = ADAMS
    job = CLERK
    mgr = 7788
    hiredate = 1987-05-23 00:00:00.0
    sal = 1100
    comm = 0
    deptno = 20
    If you want to find all the entries that have a job that starts with CL you can even use the same finder method like:
    Collection coll = empHome.findByEnameAndJob("%","CL%");
    This results in the output
    *** There were : 4 records returned ***
    empno = 7369
    ename = SMITH
    job = CLERK
    mgr = 7902
    hiredate = 1980-12-17 00:00:00.0
    sal = 800
    comm = 0
    deptno = 20
    empno = 7876
    ename = ADAMS
    job = CLERK
    mgr = 7788
    hiredate = 1987-05-23 00:00:00.0
    sal = 1100
    comm = 0
    deptno = 20
    empno = 7900
    ename = JAMES
    job = CLERK
    mgr = 7698
    hiredate = 1981-12-03 00:00:00.0
    sal = 950
    comm = 0
    deptno = 30
    empno = 7934
    ename = MILLER
    job = CLERK
    mgr = 7782
    hiredate = 1982-01-23 00:00:00.0
    sal = 1300
    comm = 0
    deptno = 10
    I can send you the packaged EAR file if you want to try this simple example for yourself - or you I would even encourage you to grab JDeveloper 9i and see how it easy it makes it to build and test the example I was just working with.
    cheers!
    -steve

  • Different timeout between bean and method

    I have to set on the same bean a different timeout between the bean und one method.
    I set in the weblogic-ejb-jar.xml <trans-timeout-seconds> to 39 sec But I will
    set the timeout for a method in this bean to 120 sec. How con I set this timeout?

    I don't know if this is yourproblem, but you have unbalanced quotes on the line
    name=""object1">I didn't know that javascript could talk to java like this. Please tell me where I can read more about this.

  • How to pass bean from method invoked through remoteobject back to client

    hi all
    I have developed  a UI in which if u enter ur id in the next page it will populate details about u from database.But when i click the submit button it goes to the server side method and also gets returned to the result handler of that button but i hav returned the data as a bean .But i am not sure of how to use that bean in the client side to populate the page with the details............
    kindly help me out.......very urgent.......

    Hi All,
    One way to solve this problem is using the #{requestScope.varName} instead of ="#{backing_bean.getValue('Q13') .
    Now i need to create a HashMap and Store the values in it..
    Are there any other ways to do this?
    Thanks
    Sateesh

  • What is execution order of  backing bean default methods ?

    Hi
    Thank you for reading my post.
    what is execution order of backing bean methods like :
    constructor . init , preproccess , prerender .. ?
    thanks

    Hi
    Thank you for reading my post.
    what is execution order of backing bean methods like
    constructor . init , preproccess , prerender .. ?So far, so good. That is the order. However, preprocess is only called on postback and prerender is only called if the page is going to be rendered.
    To learn about these methods and when/how they are called.
    http://developers.sun.com/prodtech/javatools/jscreator/reference/fi/2/event-life-cycle.html
    http://blogs.sun.com/roller/page/dashboy?entry=java_studio_creator_lifecycle_q1
    http://blogs.sun.com/roller/page/divas?entry=about_a_page_s_lifecycle

  • How to call session bean's method in JSP

    Hi All,
    I am working on a JSF web application by using sun studio creator.
    The first page have a button, the onClick javascript is as following, which bring up a alert box showing user login name.
    In JSP file, how can I call session bean's setUserName(String name) function (which I would like to store this UserName). So the following pages can use this information.
    If I can not do it this way, is there any other way to do it?
    Thanks in advance.
    var net = new ActiveXObject("wscript.network");
    alert(net.UserName);
    In managed-beans.xml
    <managed-bean>
    <managed-bean-name>BasicInfo</managed-bean-name>
    <managed-bean-class>treepractice.BasicInfo</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
    </managed-bean>

    You can find more information/details/examples at their own website.
    On the other hand, do you realize that that ActiveX stuff is IE proprietary? And that it is a browser configuration whether to allow them or not? And that this configuration is in IE7 defaulted to an (annoying) warning box before execution which is just bad for the user experience?
    With other words, forget that ActiveX garbage. Alternatives are Applets (not recommended) or Java Web Start (recommended).

Maybe you are looking for

  • How to create a private forum in Office 365 SharePoint for customers?

    Hi,  I am implementing a SharePoint Office 365 solution for a client but one of their requirements is sharing regularly updated info with only 20 customers. The idea is to share info with just the customers in a private forum basically to receive fee

  • Importing existing folders and sub folders of photos into photoshop organiser 9

    I have over 10,000 photos nicely organised in folders and sub folders in Bridge CS3 and want to migrate over to photoshop elements and use their organiser so I have everything in one place. However, when I try to import the photos, it brings them in

  • Link to Two js files same page

    I need to link to two js files on the same page. How do I get them to both work? one is for a togler.js and the othe for a menu .js <script src="../js/togler.js" type="text/javascript"></script> <script type="text/javascript" src="../js/p7exp.js"></s

  • G/L Account - Material Assignment

    Hi, I am assigning material to my project and i use project stock...I select proc indicator Preq+Res for WBS..in this case whenever I assign material, G/L account is not automatically picked, it always asks for G/L account. Please tell me how to make

  • Processing Status in Travel Request ESS

    Dear all Gurus, I am implementing travel request approval process on ESS/MSS. After employee submits an travel request via ESS the processing status is set to have 'Released for Approval' status. Once manager approves the travel requests via MSS proc