Dynamic Bean

Hi,
According to the definition of dynamic bean, if any of the superclass implements DynamicPropertyMapper then all the subclasses will get the dynamic bean behavior.
But suppose if we do add some property to the existing definitions of Profile Object or else, then do we need to write setter/getters or not?
And suppose if we have created any new item-descriptor in the OOB Repository, then again do we need to write setter/getters, for the properties defined, or not?
Thanks in advance.
Regards,
Bhanuj Bawdhane

when you add some properties to the existing or new item descriptors, those will have dynamic behavior.
In customcatalog.xml, if you add some properties to product item descriptor then no need to create setters and getters for those because by using any job or scheduler you can update those properties.
In userprofile.xml, if you add new property like isAnonymous, then create setters and getters in class testProfile by extending Profile. This property will be set basing on the user login whether anonymous or not. Same will be applied to Order item descriptor also.

Similar Messages

  • Create "Dynamic" beans to handle dynamic form

    Hi All,
    Hope it is not too stupid question.
    JSP is all about dynamic content, a part of which can be a form that displays different fields and attributes. If I use Javabeans to handle the form, I will need different beans to go with each "configuration" of the form.
    Now let's say I have a form that can get one of three "configurations" , depanding on the parameter passed to the JSP page.
    I can create three Beans to match any type of form. (e.g., AFormBean, BFormaBean, CFromBean)
    How can I conditionally instansiate the Bean to handle the not yet known type of the Form?
    I tried to use an abstract Bean to be defined on the top of the JSP :
    <%
    Beans.AddComponentBean addComponentBean;
    %>
        <c:choose>
            <c:when test='${param.type=="DBMS"}'>
                    <jsp:useBean id="addComponentBean"            
                       class="Beans.AddDBMSBean" scope="page"/>
                    <jsp:setProperty name="addDBMSBean" property="*"/>    
            </c:when> 
            <c:when test='${param.type=="APP"}'>
                    <jsp:useBean id="addComponentBean"
                          class="Beans.AddAppBean" scope="page"/>       
                    <jsp:setProperty name="addDBMSBean" property="*"/>    
            </c:when>                 
            </c:choose>
    But that cannot be done since I get Use Bean duplicate.
    What is the right way of doing this?
    Thanks.

    How I would do this depends on my application design.
    I think I would go with a Factory type of design. I would have an 'AddBeanFactory' that decides on the specific type of the bean to create, and returns the abstract AddComponentBean. If you want to do it all in JSP, then making the factory a bean itself is usefull:
    package beans;
    import java.util.Map;
    import java.util.HashMap;
    public class AddBeanFactory {
         private String type;
         private Map parameters;
         private AddComponentBean addComponentBean;
         private static final Map<String, Class<? extends AddComponentBean>>TYPEMAP = new HashMap<String, Class<? extends AddComponentBean>>();
         static {
              TYPEMAP.put("DBMS", beans.AddDBMSBean.class);
              TYPEMAP.put("APP", beans.AddAppBean.class);
         public AddBeanFactory() {}
         public void setType(String type) { this.type = type; }
         public void setParameters(Map params) { this.parameters = params; }
         public AddComponentBean getAddComponentBean() throws InstantiationException, IllegalAccessException {
              if (addComponentBean == null) {
                   if (type==null || parameters == null){
                        throw new IllegalStateException("The Component Type and Parameters must be set prior to retrieving the ComponentBean");
                   addComponentBean = TYPEMAP.get(type).newInstance();
                   //fill bean with parameters
              return addComponentBean;
    }Then your JSP would be something like:
    <jsp:useBean id="beanFactory" class="beans.AddBeanFactory" scope="page">
        <jsp.setProperty name="beanFactory" property="type"/>
        <jsp.setProperty name="beanFactory" property="parameters" value="${request.parameterMap}"/>
    </jsp:useBean>
    <c:set var="addComponentBean" value="${beanFactory.addComponentBean}"/>

  • JMX Dynamic Bean Operations.

    With JDK 1.5, I was having "invoke" in a DynamicBean implementation which was returning a JPanel with a JTable. The JMX console renders it in a JDialog and I could view my JTable with data in it. Now i upgraded to JDK 1.6 and then i see the Object returned from the invoke method is rendered in JTextArea as toString(). So I get something like "javax.swing.JPanel[,0,0,992x773,invalid,layout=javax.swing.BoxLayout,alignmentX=0.0,alignmentY=0.0,border=,flags=9,maximumSize=,minimumSize=,preferredSize=]" in the JTextArea of JMX operation return value dialog. This is a weird behaviour.
    Can I change this behaviour and make sure the Object is just rendered in a container as such without doing a toString() on the object returned from the invoke method.
    Is there an alternate view to achieve this?
    Edited by: ramkiFromCity on Jan 11, 2008 11:55 AM

    Hi,
    thanks for the response.
    Yes I am talking about JConsole. I cant write a plugin cause that would need some client libraries to be setup in runtime. My client does not have anything but JDK. The JMX way of rendering the data from JDK 1.6 is to put the data object's toString in a JTextArea. Whereas JDK1.5 just used to drop the object returned from invoke method in a container. And the change introduced in JDK1.6 is not desirable cause there is no lighweight way of displaying the data. Why does JMX need to care about if the returned object is a UI component like JPanel or not. All it needs to be doing is just render the returned Object in a container.
    All i would like to see is the JMX bean's invoke behaviour revorted back to JDK1.5 version:), cause it was very covenient to return JTable or JTree like sophisticated UI components. And what is in JDK 1.6 is just a unneccessary change of behaviour.
    Edited by: ramkiFromCity on Jan 22, 2008 7:01 AM

  • 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.

  • How to get the modified bean classname ?

    Hi,
    We have a product that persists the beans in an object database.
    I am looking for a way a way for a client to know the name of
    the WLS implemented bean, dynamically(rather than providing it manually), so that
    it can do a query for the bean( in the database).
    Seems, like this name iss changing from one version to another.
    The dynamic bean names generated in WLS6.1 is not the same as
    those for WLS7.0. And WLS5.1 didn't have this behavior.
    Are you sure that there is no way we can find it? Maybe, someone
    from bea will know.
    Thanks,
    Gurdev

    Hi,
    Using the Context interface (listBindings()) you can get all bindings under a
    context. One can enumerate through the returned enumeration and go down the tree
    if required.
    S
    "Gurdev Parmar" <[email protected]> wrote:
    >
    Hi,
    We have a product that persists the beans in an object database.
    I am looking for a way a way for a client to know the name of
    the bean, dynamically(rather than providing it manually), so that
    it can do a query for the bean( in the database).
    Seems, like this name keeps changing from one version to another.
    The dynamic bean names generated in WLS6.1 is not the same as
    those for WLS7.0. And WLS5.1 didn't have this behavior.
    Thanks,
    Gurdev

  • How to get the modified bean name in WLS?

    Hi,
    We have a product that persists the beans in an object database.
    I am looking for a way a way for a client to know the name of
    the bean, dynamically(rather than providing it manually), so that
    it can do a query for the bean( in the database).
    Seems, like this name keeps changing from one version to another.
    The dynamic bean names generated in WLS6.1 is not the same as
    those for WLS7.0. And WLS5.1 didn't have this behavior.
    Thanks,
    Gurdev

    Hi,
    Using the Context interface (listBindings()) you can get all bindings under a
    context. One can enumerate through the returned enumeration and go down the tree
    if required.
    S
    "Gurdev Parmar" <[email protected]> wrote:
    >
    Hi,
    We have a product that persists the beans in an object database.
    I am looking for a way a way for a client to know the name of
    the bean, dynamically(rather than providing it manually), so that
    it can do a query for the bean( in the database).
    Seems, like this name keeps changing from one version to another.
    The dynamic bean names generated in WLS6.1 is not the same as
    those for WLS7.0. And WLS5.1 didn't have this behavior.
    Thanks,
    Gurdev

  • JSF and dynamic data

    Hi,
    This is not a specific question but rather a high level concept that I'm trying to figure out. I have a system that uses a lot of dynamic data that is handled and viewed in the form of Dynabeans as well as SDO data objects.
    I'm working on trying to develop reusable web widgets such as input forms based on these objects and thought of JSF right away.
    However its seems like JSF will only work with static data models because the beans and bean properties need to be specified at design time in the xml configuration files.
    Here it is: Lets say I have a dynamic java bean with dynamic properties that was created from a metadata object. Now I want to develop a single reusable JSF widget that will create an input form using the information from the metadata object and then connect the widget values to the actual dynamic data object.
    Seems like in order to do this, the properties of the dynamic data object need to be defined at runtime so that you can classify it as a managed bean so that JSF knows how to bind values from a widget to a bean.
    Does anyone have any thoughts?

    Hi.
    ValueBinding and MethodBinding work through PropertyResolver, VariableResolver
    #{aaaa.bbbb.cccc}aaaa - will be resolved with VariableResolver (root object)
    bbbb and cccc - with PropertyResolver
    Look at the description of the default realisation of VariableResolver
    You will see in which places it searches for a root object. At least it searches in the request, session and application maps. You can just put your dynamic beans in one of this maps.
    At the worst case you can substitute implementation of the VariableResolver in faces-config.xml
      <application>
         <variable-resolver>com.qqqqq.MyVariableResolver</variable-resolver>
         <property-resolver>com.qqqqq.MyPropertyResolver</property-resolver>
      </application>
    ...Good luck

  • JSF and dynamic inclusion

    Hi,
    I have the following problem, I'm trying to dynamically include a footer jsf fragment into different pages, and depending on the page it will have different properties:
    I need to do this....
    on the general pages include the footer:
    <jsp:include page="/soustitres.jsp">
    <jsp:param name="parametre1" value="#{messages['soustitre.paris']}" />
    </jsp:include>
    then in soustitres.jsp i want to use the parameter like
    <h:outputText value="#{param['parametre1']}" />
    I can't make this work.. any ideas how can i make this work.. i have tried multiple differentes things but just can't make it work, links would also be good.
    Merci!

    Hi.
    ValueBinding and MethodBinding work through PropertyResolver, VariableResolver
    #{aaaa.bbbb.cccc}aaaa - will be resolved with VariableResolver (root object)
    bbbb and cccc - with PropertyResolver
    Look at the description of the default realisation of VariableResolver
    You will see in which places it searches for a root object. At least it searches in the request, session and application maps. You can just put your dynamic beans in one of this maps.
    At the worst case you can substitute implementation of the VariableResolver in faces-config.xml
      <application>
         <variable-resolver>com.qqqqq.MyVariableResolver</variable-resolver>
         <property-resolver>com.qqqqq.MyPropertyResolver</property-resolver>
      </application>
    ...Good luck

  • JTable bean in forms

    I would like to display JTable based bean in Oracle Forms 10g but I get:
    *** VBean null PropertyManager for id = FOREGROUND
    *** VBean Got FOREGROUND = null
    *** VBean null PropertyManager for id = BACKGROUND
    *** VBean Got BACKGROUND = null
    *** VBean Setting debugMode to ALL
    *** VBean Setting beanName to plusplus.PPCalendar
    *** plusplus.PPCalendar Registering properties
    *** plusplus.PPCalendar     int pWidth
    *** plusplus.PPCalendar     int pDebugGraphicsOptions
    *** plusplus.PPCalendar     int pHeight
    *** plusplus.PPCalendar     boolean pOpaque
    *** plusplus.PPCalendar     javax.swing.InputVerifier pInputVerifier
    *** plusplus.PPCalendar     Failed to introspect class: class plusplus.PPCalendar java.lang.NullPointerExceptionPPCalendar's code:
    public class PPCalendar extends JPanel
      private JTable table;
      private DefaultTableModel model;
      private JScrollPane jsp;
    public PPCalendar() {
       super();
       model = new DefaultTableModel( new String[] [] {  {"1x1", "1x2"},  {"2x1", "2x2"}}, new String [] {"First", "Second"});
       table = new JTable(model);
       jsp = new JScrollPane(table);
       jsp.setAutoscrolls(true);
       this.add(jsp);
       this.setVisible(true);
      public void setHead(String nes) {
        String val1 = (String) model.getValueAt(0,0);
        System.out.println("val1: " + val1);
      public String getHead() {
        return (String) model.getValueAt(0,0);
      }Setting property (     fbean.set_property('tb.ptable', 1, 'head', 'Blah');) fails, but I can set properties (introspection still fails) if I try something similar with:
    package plusplus;
    //import java.awt.Panel;
    //import java.awt.Label;
    import javax.swing.JPanel;
    import javax.swing.JLabel;
    public class Simple extends JPanel  {
      private JLabel naziv = new JLabel();
      public Simple() {
        try {
          jbInit();
        } catch(Exception e) {
          e.printStackTrace();
      private void jbInit() throws Exception {
        naziv.setText("XXX");
        this.add(naziv, null);
      public void setNaziv(String tekst) {
        naziv.setText(tekst);
    }What am I doing wrong? Are there some "more advanced" swing based bean examples?
    Is there some kind of documentation on oracle.ewt.* and Dynamic Bean Manager?

    The problem is that you're extending JPanel - the issue is not your fault (or ours for that matter) it's a problem in the base JPanel class which causes a NPE when introspecting the properties that it exposes because it does not conform to the JavaBeans Spec.
    We've put a WorkAround into the FBean code in Forms 10.1.2 but for the moment you will have to extend Panel rather than JPanel and all should be ok - this should make no difference to the operation of the Bean.
    Another option would be to write a BeanInfo class for your Bean and prevent the exposure of the problem property (inputMap) that way.

  • Validator Question

    Hi i am creating an application where a user simply enters their details such as name, email etc which should be then validated using the validator. If the details are correct it should redirect the user to my Acknowledge page, however if not it will put the user back to the original part displaying error messages to re-enter their details. Now as it stands i already have the a form for the user to enter their details, enterStudentDetails.jsp, and i am trying to test that their email is not left blank but when i do leave it blank, and hit the submit button, it goes into my Acknowledge.jsp page. That is the issue i have at the moment, and i am trying use the validator to check the input on the server side to display the error message.
    enterStudentDetails.jsp
    <%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %>
    <%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %>
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%--
    The taglib directive below imports the JSTL library. If you uncomment it,
    you must also add the JSTL library to the project. The Add Library... action
    on Libraries node in Projects view can be used to add the JSTL 1.1 library.
    --%>
    <%--
    <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
    --%>
    <!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>Enter Student Details</title>
        </head>
        <body>
        <h1>Enter Student Details</h1>
        <html:form action="ValidateDetails">
            <table border="1">
                <thead>
                    <tr>
                        <td>Email :
                        <td><bean:message key="validatedetails.email" />
                        <th> <html:text property="email" size="32"/>
                        <th><html:errors property="email" />
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <td>First Name:</td>
                         <td><bean:message key="validatedetails.firstName" />
                        <td><html:text property="firstName"/></td>
                        <td><html:errors property="firstName"/></td>
                    </tr>
                    <tr>
                        <td>Last Name: </td>
                         <td><bean:message key="validatedetails.lastName" />
                        <td><html:text property="lastName"/></td>
                        <td><html:errors property="lastName"/></td>
                    </tr>
                    <tr>
                        <td> Password
                         <td><bean:message key="validatedetails.password" />
                        <td><html:password property="password"/></td>
                        <td><html:errors property="password"/></td>
                    </tr>
                    <tr>
                        <td> Confirm Password
                         <td><bean:message key="validatedetails.confirmPassword" />
                        <td><html:password property="confirmPassword"/></td>
                        <td><html:errors property="confirmPassword"/></td>
                    </tr>
                    <tr>
                        <td>Date of birth (dd/mm/yyyy):
                        <td><html:text property="dateOfBirth"/></td>
                        <td><html:errors property="dateOfBirth"/></td>
                    </tr>
                    <td><html:submit value="sign up!" />
                </tbody>
            </table>   
        </html:form>
        <%--
        This example uses JSTL, uncomment the taglib directive above.
        To test, display the page like this: index.jsp?sayHello=true&name=Murphy
        --%>
        <%--
        <c:if test="${param.sayHello}">
            <!-- Let's welcome the user ${param.name} -->
            Hello ${param.name}!
        </c:if>
        --%>
        </body>
    </html>ValidateDetails.java
    * ValidateDetails.java
    * Created on 10 April 2008, 22:00
    package com.myapp.struts;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.struts.action.Action;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionMapping;
    import org.apache.struts.action.ActionForward;
    * @author
    * @version
    public class ValidateDetails extends Action {
        /* forward name="success" path="" */
        private final static String SUCCESS = "success";
         * This is the action called from the Struts framework.
         * @param mapping The ActionMapping used to select this instance.
         * @param form The optional ActionForm bean for this request.
         * @param request The HTTP Request we are processing.
         * @param response The HTTP Response we are processing.
         * @throws java.lang.Exception
         * @return
        public ActionForward execute(ActionMapping mapping, ActionForm  form,
                HttpServletRequest request, HttpServletResponse response)
                throws Exception {
            return mapping.findForward(SUCCESS);
    }DetailsForm.java
    * DetailsForm.java
    * Created on 10 April 2008, 21:52
    package com.myapp.struts;
    import javax.servlet.http.HttpServletRequest;
    import org.apache.struts.action.ActionErrors;
    import org.apache.struts.action.ActionMapping;
    import org.apache.struts.action.ActionMessage;
    import java.text.ParseException;
    import java.text.SimpleDateFormat;
    import java.util.Date;
    * @author
    * @version
    public class DetailsForm extends org.apache.struts.validator.ValidatorForm {
       private int id;
        private String firstName;
        private String lastName;
        private String password;
        private String confirmPassword;
        private String email;
        private Date dateOfBirth;
        public int getId() {
            return id;
        public String getFirstName() {
            return firstName;
        public String getLastName() {
            return lastName;
        public String getPassword() {
            return password;
        public String getEmail() {
            return email;
        public Date getDateOfBirth() {
            return dateOfBirth;
        public String getConfirmPassword() {
            return confirmPassword;
        public void setFirstName(String s) {
            firstName = s;
        public void setLastName(String s) {
            lastName = s;
        public void setPassword(String s) {
            password = s;
        public void setEmail(String s) {
            email = s;
        public void setDateOfBirth(String s) {
            try {
                // TODO: put the date format in the resources file
                dateOfBirth = new SimpleDateFormat("dd/MM/yyyy").parse(s);
            } catch (ParseException e) {
        public void setConfirmPassword(String s) {
           confirmPassword = s;
           password = confirmPassword;
        public DetailsForm() {
            super();
            // TODO Auto-generated constructor stub
    /**  public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
            ActionErrors errors = new ActionErrors();
            if (getName() == null || getName().length() < 1) {
                errors.add("name", new ActionMessage("error.name.required"));
                // TODO: add 'error.name.required' key to your resources
            return errors;
       */struts-config.xml
    <?xml version="1.0" encoding="UTF-8" ?>
    <!DOCTYPE struts-config PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN"
    "http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd">
    <struts-config>
        <form-beans>
            <form-bean name="DetailsForm" type="com.myapp.struts.DetailsForm"/>
        </form-beans>
        <global-exceptions>
        </global-exceptions>
        <global-forwards>
            <forward name="welcome"  path="/Welcome.do"/>
        </global-forwards>
        <action-mappings>
            <action input="/enterStudentDetails.jsp"
                    validate="true"
                    name="DetailsForm"
                    path="/ValidateDetails"
                    scope="request"
                    type="com.myapp.struts.ValidateDetails">
                <forward name="success" path="/Acknowledge.jsp"/>
            </action>
            <action path="/Welcome" forward="/welcomeStruts.jsp"/>
        </action-mappings>
        <controller processorClass="org.apache.struts.tiles.TilesRequestProcessor"/>
        <message-resources parameter="com/myapp/struts/ApplicationResource"/>   
        <!-- ========================= Tiles plugin ===============================-->
        <!--
        This plugin initialize Tiles definition factory. This later can takes some
        parameters explained here after. The plugin first read parameters from
        web.xml, thenoverload them with parameters defined here. All parameters
        are optional.
        The plugin should be declared in each struts-config file.
        - definitions-config: (optional)
        Specify configuration file names. There can be several comma
        separated file names (default: ?? )
        - moduleAware: (optional - struts1.1)
        Specify if the Tiles definition factory is module aware. If true
        (default), there will be one factory for each Struts module.
        If false, there will be one common factory for all module. In this
        later case, it is still needed to declare one plugin per module.
        The factory will be initialized with parameters found in the first
        initialized plugin (generally the one associated with the default
        module).
        true : One factory per module. (default)
        false : one single shared factory for all modules
        - definitions-parser-validate: (optional)
        Specify if xml parser should validate the Tiles configuration file.
        true : validate. DTD should be specified in file header (default)
        false : no validation
        Paths found in Tiles definitions are relative to the main context.
        -->
        <plug-in className="org.apache.struts.tiles.TilesPlugin" >
            <set-property property="definitions-config" value="/WEB-INF/tiles-defs.xml" />     
            <set-property property="moduleAware" value="true" />
        </plug-in>
        <!-- ========================= Validator plugin ================================= -->
        <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
            <set-property
                property="pathnames"
                value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml"/>
        </plug-in>
    </struts-config>Application Resource file
    errors.header=
    errors.prefix=<span style="color: red">
    errors.suffix=</span>
    errors.footer=
    DetailsForm.required.email=Email must be entered
    validatedetails.email=Email
    validatedetails.firstName=First Name
    validatedetails.lastName=Last Name
    validatedetails.password=Password
    validatedetails.confirmPassword=Confirm Password
    error.email.required=Email must be entered
    errors.header=<UL>
    errors.prefix=<LI>
    errors.suffix=</LI>
    errors.footer=</UL>
    errors.invalid={0} is invalid.
    errors.maxlength={0} can not be greater than {1} characters.
    errors.minlength={0} can not be less than {1} characters.
    errors.range={0} is not in the range {1} through {2}.
    errors.required={0} is required.
    errors.byte={0} must be an byte.
    errors.date={0} is not a date.
    errors.double={0} must be an double.
    errors.float={0} must be an float.
    errors.integer={0} must be an integer.
    errors.long={0} must be an long.
    errors.short={0} must be an short.
    errors.creditcard={0} is not a valid credit card number.
    errors.email={0} is an invalid e-mail address.
    errors.cancel=Operation cancelled.
    errors.detail={0}
    errors.general=The process did not complete. Details should follow.
    errors.token=Request could not be completed. Operation is not in sequence.
    welcome.title=Struts Application
    welcome.heading=Struts Applications in Netbeans!
    welcome.message=It's easy to create Struts applications with NetBeans.validation.xml
    <?xml version="1.0" encoding="UTF-8" ?>
    <!DOCTYPE form-validation PUBLIC
    "-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.1.3//EN"
    "http://jakarta.apache.org/commons/dtds/validator_1_1_3.dtd">
    <form-validation>
        <form name="DetailsForm">
            <field
                property="email"
                depends="required,email">
                <arg key="DetailsForm.email"/>
            </field>
            <field
                property="firstName"
                depends="required">
                <arg key="error.firstName" />
            </field>
            <field
                property="lastName"
                depends="required">
                <arg key="error.lastName" />
            </field>
            <field
                property="password"
                depends="required,minlength">
                <arg key="error.password" />
                <arg1 name="minlength" key="${var:minlength}" resource="false" />
                <var>
                    <var-name>minlength</var-name>
                    <var-value>6</var-value>
                </var>
            </field>
            <field
                property="confirmPassword"
                depends="required,validwhen">
                <arg key="error.password" />
                <msg name="validwhen" key="error.password.confirm" />
                <var>
                    <var-name> test </var-name>
                    <var-value> (*this* == password) </var-value>
                </var>
            </field>
            <field
                property="dateOfBirth"
                depends="required,date">
                <arg key="Date of Birth" resource="false" />
                <var>
                    <var-name>datePatternStrict</var-name>
                    <var-value>dd/mm/yyyy</var-value>
                </var>
            </field>
        </form>
        <!--
         This is a minimal Validator form file with a couple of examples.
    -->
        <global>
            <!-- An example global constant
            <constant>
                <constant-name>postalCode</constant-name>
                <constant-value>^\d{5}\d*$</constant-value>
            </constant>
            end example-->
        </global>
        <formset>
            <!-- An example form -->
            <form name="logonForm">
                <field
                    property="username"
                    depends="required">
                    <arg key="logonForm.username"/>
                </field>
                <field
                    property="password"
                    depends="required,mask">
                    <arg key="logonForm.password"/>
                    <var>
                        <var-name>mask</var-name>
                        <var-value>^[0-9a-zA-Z]*$</var-value>
                    </var>
                </field>
            </form>
        </formset>
        <!-- An example formset for another locale -->
        <formset language="fr">
            <constant>
                <constant-name>postalCode</constant-name>
                <constant-value>^[0-9a-zA-Z]*$</constant-value>
            </constant>
            <!-- An example form -->
            <form name="logonForm">
                <field
                    property="username"
                    depends="required">
                    <arg key="logonForm.username"/>
                </field>
                <field
                    property="password"
                    depends="required,mask">
                    <arg key="logonForm.password"/>
                    <var>
                        <var-name>mask</var-name>
                        <var-value>^[0-9a-zA-Z]*$</var-value>
                    </var>
                </field>
            </form>
        </formset>
    </form-validation>Now, i have read a few articles on the subject but i am slighly confused in that in terms of creating a bean does it necessarily nead to be a dynamic bean? or can i still keep the one that i have right now for me to use validator. Can somebody provide some insight on what i would need to do because i am slighly confused.
    Thanks.

    oh, i didn't realize i could do that. I acutally already
    found a way to do it, if a whole bunch of if statments :) mhehe,
    but it works. i'lll try to do it your way :)
    another question. It seems that in my functions if i
    reference a field which is located on a different tab, it does not
    recoglize it, and i get a runtime error, unless i click on that
    tab, before clicking on the "validate" button.
    does anyone know why it's not recognizing it? do i need to
    somehow declare that field in my init()?
    Thanks!

  • Hibernate vs Atg Repository

    Hi friends,
    Can anyone tell the difference btw hibernate and ATG Repository .
    Thanks & regards,
    Dinuv

    Both are data access models. They are same in everything except that repository is weakly typed and hibernate is strongly typed. That is because repositories work on the concept of dynamic beans ( repository items), wherein you access any value of the item-descriptor using getPropertyValue() giving property name.
    Hibernate on the other hand is strongly typed, it will convert into appropriate POJO's. When you code to atg repositories, you always work on repository items and each property you access is again type casted to String or Int or Boolean, whereas in hibernate, its already taken care.
    In terms of end user, it doesn't make any difference.
    -karthik

  • Property Not Found Exception?

    Created a Managed Bean:</BR></BR>
    public class Test {
    private String myname;
    public Test() {
    public void setMyname(String myname) {
    this.myname = myname;
    public String getMyname() {
    return myname;
    </BR></BR>
    with following faces-config.xml:
    </BR></BR>
    <?xml version="1.0" encoding="windows-1252"?>
    <!DOCTYPE faces-config PUBLIC
    "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
    "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
    <faces-config xmlns="http://java.sun.com/JSF/Configuration">
    <managed-bean>
    <managed-bean-name>test</managed-bean-name>
    <managed-bean-class>Test</managed-bean-class>
    <managed-bean-scope>request</managed-bean-scope>
    <managed-property>
    <property-name>myname</property-name>
    <property-class>java.lang.String</property-class>
    </managed-property>
    </managed-bean>
    <navigation-rule>
    <from-view-id>/untitled1.jsp</from-view-id>
    <navigation-case>
    <from-outcome>success</from-outcome>
    <to-view-id>/untitled2.jsp</to-view-id>
    </navigation-case>
    </navigation-rule>
    </faces-config>
    </BR>
    </BR>
    Using the following untitled1.jsp:
    </BR>
    </BR>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <%@ page contentType="text/html;charset=windows-1252"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <f:view>
    <html>
    <head>
    <meta http-equiv="Content-Type"
    content="text/html; charset=windows-1252"/>
    <title>untitled1</title>
    </head>
    <body><h:form>
    <p>
    <h:outputText value="Enter name:"/><h:inputText value="#{requestScope.test.myname}" />
    </p>
    <p>
    <h:commandButton value="Continue" action="success"/>
    </p>
    </h:form></body>
    </html>
    </f:view>
    </BR>
    </BR>
    To invoke the following JSF - untitled2.jsp:
    </BR></BR>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <%@ page contentType="text/html;charset=windows-1252"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <f:view>
    <html>
    <head>
    <meta http-equiv="Content-Type"
    content="text/html; charset=windows-1252"/>
    <title>untitled2</title>
    </head>
    <body><h:form>
    <p>
    Output:
    </p>
    <h:outputText value="#{requestScope.test.myname}"/>
    </h:form></body>
    </html>
    </f:view>
    </BR></BR>
    Why am I getting the following error message:
    </BR></BR>
    500 Internal Server Error
    javax.faces.el.PropertyNotFoundException: Error testing property 'myname' in bean of type null     at com.sun.faces.el.PropertyResolverImpl.getType(PropertyResolverImpl.java:342)     at com.sun.faces.el.impl.ArraySuffix.getType(ArraySuffix.java:240)     at com.sun.faces.el.impl.ComplexValue.getType(ComplexValue.java:208)     at com.sun.faces.el.ValueBindingImpl.getType(ValueBindingImpl.java:345)
    </BR></BR>
    THANKS for any help - Ken
    Message was edited by:
    kecooper

    Avi - thanks for the info - ...I have found the problem as originally specificed. However it has lead to another question - consider the XML fragment below.
    <managed-bean>
    <managed-bean-name>test</managed-bean-name>
    <managed-bean-class>Test</managed-bean-class>
    <managed-bean-scope>request</managed-bean-scope>
    <managed-property>
    <property-name>myname</property-name>
    <property-class>java.lang.String</property-class>
    </managed-property>
    </managed-bean> This is/was the problem.
    If I remove the <property-class>java.lang.String</property-class> element and add a value tag for initialization of myname - all works.
    With ONLY <property-name>myname</property-name> I get the following error: javax.servlet.jsp.JspException: javax.faces.FacesException: javax.faces.FacesException: Can't instantiate class: 'uname'.
    With
          <property-name>uname</property-name>
          <property-class>java.lang.String</property-class>I get the same error.
    I had assumed that the property-class was to define the type of the managed-property? If that is there it does not work.
    I would also have guessed that the managed-bean with the managed-property would create a dynamic bean as does the DynamicActionBean in Struts?
    So, I guess two questions:
    1. How is the property-class tag used?
    2. CAn one create a 'dynamic' bean within faces-config.xml.
    I am using JDeveloper 10.1.3 which has jdk 1.5.0_05, Servlet 2.4, JSP 2.0
    Thanking you for your help

  • ProfileFormHandler

    HI
    can any one resolve my problem
    i have doubt in registration page while submiting the form that is ProfileFormHandler.value.firstName
    ProfileFormHandler.value.lastName
    how frame work will do this one here value is type of Dictonary so how it will create corresponding key and value pairs

    ATG provides a functionality called DynamicBeans where a Java object can expose properties which are determined at run-time. So if an object X is a Dynamic Bean then you can access a property like X.myProperty even if there is no getMyProperty() present in the class of object X. There are certain classes and interfaces which ATG automatically registers as DynamicBeans including: java.lang.Object, java.util.Map, atg.repository.RepositoryItem, atg.userprofiling.Profile etc. So that is why you can use some thing like <dsp:valueof bean="Profile.firstName"/> without any problem even if firstName is present as a property in the Profile object.
    Now you can register other objects as Dynamic Bean also. To make any object as a Dynamic Bean you need to register that class with an implementation of DynamicPropertyMapper interface by calling DynamicBeans.registerPropertyMapper() within a static block so that it can execute as soon as class is loaded. E.g.
    static {
        DynamicBeans.registerPropertyMapper(ProfileFormHashtable.class, new ProfileFormHashtablePropertyMapper());
    }This is the code snippet which is actually present in ProfileForm. It registers ProfileFormHashtable class as a Dynamic Bean with the ProfileFormHashtablePropertyMapper class instance to be used as DynamicPropertyMapper for doing get/set on properties that are actually not declared as bean properties of ProfileFormHashtable object.
    The "value" dictionary used in ProfileFormHandler (extends ProfileForm) is actually nothing but instance of ProfileFormHashtable object and being a dynamic bean it allows you to use ProfileFormHandler.value.firstName where firstName is the name of dynamic property used as the key for ProfileFormHandler. ProfileFormHashtablePropertyMapper implementation handles getPropertyValue() and setPropertyValue() calls to actually do the operations on underlying profile RepositoryItem using key as property name and value as the property value.

  • From Forms Product Management - New Forms Articles on OTN

    The Forms Product Management team are proud to announce that we
    have been running a number of daily features which highlight some
    of the great features of Oracle Forms. Just to keep to updated
    on these features, the current list of published articles are:
    6i Features
    The new Forms Listener Servlet Architecture
    http://otn.oracle.com/products/ias/daily/sept28.html
    Using Single Sign-On in Forms6i
    http://otn.oracle.com/products/ias/daily/oct26.html
    Forms 6i Reports Integration
    http://otn.oracle.com/products/ias/daily/oct24.html
    Forms Java Importer
    http://otn.oracle.com/products/ias/daily/oct15.html
    Oracle9iAS Forms Services: Multiple Client Platform Support
    http://otn.oracle.com/products/ias/daily/oct10.html
    Oracle9iAS Forms Services: Forms Integration with Oracle SCM
    http://otn.oracle.com/products/ias/daily/oct30.html
    9i Features
    Dynamic Bean Manager
    http://otn.oracle.com/products/ias/daily/nov07.html
    Oracle9iAS Forms Services: New Features in Release 9i
    http://otn.oracle.com/products/ias/daily/nov19.html
    We hope that this information helps keep you informed and may
    serve as a reminder to the wealth of tools to aid you in
    developing Forms application.
    As always, we appreciate your feedback on this, or any other
    matters.
    Best Regards
    Grant Ronald
    Forms Product Management

    We do not have a beta/pre-prodcution release of Forms9i
    available for download, however the production version should be
    available early in the new year.
    Regards
    Grant
    Forms Product Management

  • Timer MBean and Jconsole

    Hello,
    I'm using a javax.management.timer.Timer MBean and registering it with the local MBean server. Instead of adding notifications programmatically, I want to be able to do it from Jconsole.
    However, from Jconsole I can invoke any Timer operation (like removeNotification, etc.) except for all 4 addNotification operations, as they are all disabled.
    Is this not supported? Why are they disabled? Is there a way to enable these operations?
    I'm new to JMX and would appreciate any help.
    Thanks!

    Hi Eamonn,
    Thanks for the example! I have a follow-up question though:
    The example you gave uses a StandardMBean. Our application already has a DynamicMBean. Is it a good practice for dynamic beans to extend the timer class. Or should it only be done with standard mbeans?
    Also I've noticed that the listener that I registered and our DynamicMBean run in the same thread, so when the listener is running, the bean gets blocked and I cannot invoke any other operation. I found your blog about listeners and tried the following example but it doesn't help. How do I resolve this big issue?
    class myListener implements NotificationListener {
    private final Executor executor =
    Executors.newSingleThreadExecutor();
    public void handleNotification(Notification n, Object handback) {
    executor.execute(new Runnable() {
    public void run() {
    blockingOperation();
    My dynamic mbean looks like this:
    public class MyDynamicBean extends Timer implements DynamicMBean {
    myListener listener = new myListener();
    MBeanServer mbServer;
    public void register() {
    mbServer = MBeanServerFactory.newMBeanServer();
    ObjectName beanName = new ObjectName("MyDynamicBean");
    mbServer.registerMBean(this, beanName);
    super.start();
    mbServer.addNotificationListener(beanName, listener, null, null);
    protected Integer addNotification(String type, String message, long deltaMillis) {
    if (not registered)
    register();
    long dateMillis = System.currentTimeMillis() + deltaMillis;
    Date date = new Date(dateMillis);
    return super.addNotification(type, message, null, date);
    public void unregister() {
    if (registered) {
    ObjectName beanName = new ObjectName("MyDynamicBean");
    super.removeAllNotifications();
    m_mbServer.removeNotificationListener(beanName, m_listener);
    super.stop();
    mbServer.unregisterMBean(beanName);
    Any help is highly appreciated!
    Julia

Maybe you are looking for

  • 2.1 update bricked my phone (yes, bricked)

    opened up itunes this morning at 9AM EST to find the 2.1 update ready and waiting to be downloaded. okay, so I got it and tried to install it. set me into the endless restore/DFU loop. so far I've tried: -at least 10+ recovery attempts in DFU AND rec

  • How to open pdf files sent to my iPad by e-mail

    Just bought Create PDF for iPad. Tried to open a pdf attachment using your suggested way (open with...) on the mail menu but the option to open with Create PDF wasn't there. Can you help me with this? Cheers!

  • Naming conventions in XI !

    Hi, do we have any pdf or blog or links for the naming conventions to be followed in XI? are there any standard naming conventions suggested or set by SAP for XI? thank you, regards, Babu

  • Target has run out of memory on LM3s8962

    I'm using the LM3s8962 evaluation kit to record data from the ADC's.  I have the system set up so that I use the elemental nodes of the four adc's in a while loop, and replace the values in four different arrays.  The arrays are initialize (1x1000 el

  • IWeb can't find prior files

    Last month, I created a website with iWeb. I launched iWeb this morning to make some changes and it just shows "?" marks where content used to be. Anyone have any suggestions? I'm a long time Mac user but short time iWeb user. Thanks in advance!