Validation Using a MessageResources Class Instead of a Property File

We have a WL 8.1 portal application that performs XML-based validation as described here:
http://e-docs.bea.com/workshop/docs81/doc/en/core/index.html
It works fine. Each jpf specifies the validation error messages like this:
* @jpf:message-resources resources="Validation.Validations"
This pulls the error messages from the Validations.properties file, as expected.
We'd like to move the validation error messages out of the property file and into the WL content store.
Has anyone successfully done something similar with a portal application?
I've done some research and there are a number of examples that show how to do this with a Struts application. For example, the DBMessageResources looks like a step in the right direction.
http://sourceforge.net/project/shownotes.php?release_id=320056&group_id=49385
Modifying those files to produce ContentMessageResourcesFactory and ContentMessageResources gives us access the WL content store.
The piece that I'm missing is this:
How can we get the XML-based validation to get its messages using ContentMessageResources rather than the property files specified by the @jpf:message-resources annotation?
According to the documentation (and just to show that I made an attempt to read the fine manual), both the @jpf:message-resources annotation and the netui-data:declareBundle tag can be used to reference property files. I'm looking for instructions on getting XML-based validation to use a MessageResources class, instead.

Problem solved. Here's the solution in case someone else has a similar question in the future.
I added the following to strutsValidator-merge-config.xml and confirmed that constructors for both ContentMessageResources and ContentMessageResourcesFactory are called when the application is accessed for the first time.
<message-resources
factory="com.carlson.lss.common.util.ContentMessageResourcesFactory"
key="org.apache.struts.action.MESSAGE"
parameter="300"/>
Using a key of "org.apache.struts.action.MESSAGE" is critical to making this work. I found that tidbit here:
http://forums.bea.com/bea/click.jspa?searchID=600352721&messageID=600044412
I removed the @jpf:message-resources annotation but left the following annotation in the JPF:
* @jpf:controller nested="true" struts-merge="/WEB-INF/strutsValidator-merge-config.xml"
Triggering a validation error results in calls to the getMessage method in the ContentMessageResources class.
W^5 (which was what we wanted)

Similar Messages

  • We are currently looking for a way to link images to a design file within programs like InDesign and Illustrator using an HTML link instead of a local file.  We are hosting our images in SharePoint and need the design file to retain it's links, no matter

    We are currently looking for a way to link images to a design file within programs like InDesign and Illustrator using an HTML link instead of a local file.  We are hosting our images in SharePoint and need the design file to retain it's links, no matter who on our network opens the design file.

    The Cloud forum is not about using individual programs
    The Cloud forum is about the Cloud as a delivery & install process
    If you will start at the Forums Index https://forums.adobe.com/welcome
    You will be able to select a forum for the specific Adobe product(s) you use
    Click the "down arrow" symbol on the right (where it says All communities) to open the drop down list and scroll

  • How to let Trinidad Tag use outside css classes instead of skin?

    In my project, we asked vendor company to create the UI and css of the whole web application. We are using Trinidad in the project, trinidad use skin to customize the look and feel of the page. Since we have already had a set of css classes, we don't want to apply these css classes to the trinidad skin one by one. Is that a solution to achieve that?

    Can we now use jdk 1.5 with Studio Creator? I tried setting the AS_JAVA in
    C:\Sun\Creator\SunAppServer8\config\asenv.bat
    set AS_JAVA=C:\Program Files\Java\jdk1.5.0_04
    however in the help about still says its running 1.4
    There must be someway to use 1.5 with the new version of Creator or no?
    R
    S

  • Use of Cl_ABAP_ZIP Class to download multiple pdf file as a zip folder.

    Hi All,
    My requirement is like based on the user input multiple number of Invoices will be created as a pdf file and then a zip folder  will be downloaded which contain all those pdf files. I have developed a code for this requirement. When I am trying to unpack the zip folder I'm getting error that the folder is corrupted.
    If anybody have gone  through such a requirement, then kindly put some light.
    Thanks in advance.
    Regards,
    Sarbajit.

    Hi Sarbajit,
    please have a look at the below thread and check whether it will help.  it has part of code for unzipping the file.
    [http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/c6b79908-0a01-0010-8ca0-b77aff37726d]

  • How can i use the project code instead of project xml?

    hello
    i use the sessionbean+toplink structure,after i finish the o-r mapping by using the mapping work bench,i generate the project xml file,then in the "session.xml" file,i refer to the project xml,then i can use it from sessionbean.
    i hear that if i use the project code instead of project xml file,it will be more performant,is that true?
    otherwise,how can i use the project code instead of project xml file?i mean, in "session.xml", i can use the "<project-xml>" tag to refer to the project xml file,then in my session bean,i get the server session by read the "session.xml" file.but if i use the project code,how can i refer it from the "session.xml"?the examples that come with the toplink installation only tell me how can i use the project xml file within the session bean,it don't give me any clue about using the project code in the sesion bean,who can give me a step-by-step instruction and code snippet?
    thank you very much?

    There is a slight performance gain during session load at startup but there is no difference at runtime. The choice of which to use is dependent upon you build process. Whether it is easier to submit a new version of the class into the comile build process vs an XML file. In most cases it is just a preference of the development team.
    When you use the project-class you'll need to generate the source code and compile it into your system. Typically it is packaged with the persistent classes. You may need to configure your environment so that the class-loaders have access to these classes (same for the XML case).
    When using the project-class you simply replace the project-xml entry like this:
    <project-class>oracle.toplink.demos.employee.relational.EmployeeProject</project-class>
    The DTD for the session.xml file is found at <TOPLINK_HOME>\core\sessions_4_5.dtd. It is also in the documentation at:
    http://otn.oracle.com/docs/products/ias/doc_library/90200doc_otn/toplink.903/b10064/a-sessio.htm#634246
    Doug Clarke
    Product Manager
    Oracle9iAS TopLink

  • Questiong in using a model class

    I'm pretty new with the MVC design pattern. When using the model class, I don't know what is the more advantages of using the model class instead of using an application class.
    Moreover, in my application, there are two pages. One is used for searching screen, and the other is used for displaying a result. I try to use the model class to receive all input parameters passed by the view. Everything is fine. After users clicks a search button, a search controller will call the subcontroller which displays a result. At this point, I cannot figure out the best place where calling subcontroller should be. Right now, I put it in the do_request method; nevertheless, I have to detect the search event in this do_request method, as well. In my view, it seems strange! Are there any other solutions or examples matching my problem.

    MVC design pattern is to seperate out different logic. and at the same time keeping them as a seperate entity so that they can be used multiple times(reusability) in different controllers or so.
    yes it is posible to implement the same using application class. like we can make 1 class for mode(business logic) and one for control(class 2) and now make our application class which will inherit these two. this way it will work fine. but in this  yet we are seperating the business and control logic but we are not able to make the act as a seperate entity. the objects  of their type will be live via application class throughout the application.
    and if we make them as a different class instead of inheriting them in application class, and instatiate them whenever require, then that is MVC, that is what we are doing. we are just bypassing application class since we can directly use  class of controller type(super class CL_BSP_CONTROLLER).
    there is no such heirarchy type layering in MVC, these are like three different objects and we are making them communicate to each other so that functionality of each can be seperate out.
    hope this clears your doubt.
    there is a application like you are looking for:
    check it:
    http://help.sap.com/saphelp_erp2004/helpdata/en/12/1eeeb4245d1f4f96c989519261b0f6/frameset.htm
    it is in sap as : bsp application : TUTORIAL_4_MVC  
    it has a controller for searhing search.do
    hope this helps,
    regards,
    Hemendra

  • How to use URL class instead of Socket

    Hi all. I am developing a small inventory control system for a warehouse.
    I am suing a Java desktop application that connects to a servlet via Internet.
    I have been searching the net how to use JSSE for my application since i am new to secure sockets and JSSE.
    Since I havent implemented security In my current system yet, i am using URLConnection conn = url.openConnection(); to connect to a servlet.
    However, in a good tutorial that I found about JSSE, sockets are used directly for connection, insted of URLCOnnection. They use the code like this: SSLSocketFactory sf = sslContext.getSocketFactory();
    SSLSocket socket = (SSLSocket)sf.createSocket( host, port ); Since, using sockets is overly complex for me, I want to make use of the URLConnection class instead to keep it simple.
    Could anyone please tell me how to make use of the URLConnection class to establish secure http connection.
    by the way, the tutorial is here:
    http://www.panix.com/~mito/articles/articles/jsse/j-jsse-ltr.pdf
    thanks.

    Here you go. The following code snippet allows you post data to http URL. If you have to do the same to https URL , please let me know.
    OutputStream writeOut = null;
    HttpURLConnection appConnection = null;
    URL appUrlOpen = null;
    //data to be posted.
    String data = "This is the test message to post";
    byte[] bytesData = this.data.getBytes();
    appUrlOpen = new URL(""Your Servlet URL");
    appConnection = (HttpURLConnection) appUrlOpen.openConnection();
    appConnection.setDoOutput(true);
    appConnection.setDoInput(true);
    appConnection.setUseCaches(false);
    appConnection.setInstanceFollowRedirects(false);
    appConnection.setRequestMethod("post");
    appConnection.setRequestProperty("Content-Type","application/text");
    appConnection.setRequestProperty("Content-length", String.valueOf(bytesData.length));
    writeOut=appConnection.getOutputStream();
    writeOut.write(bytesData);
    writeOut.flush();
    writeOut.close();
    String inputLine;
    StringBuffer sb = new StringBuffer();
    reader = new BufferedReader(new InputStreamReader(appConnection.getInputStream()));
    char chars[] = new char[1024];
    int len = 0;
    //Write chunks of characters to the StringBuffer
    while ((len = reader.read(chars, 0, chars.length)) >= 0)
    sb.append(chars, 0, len);
    System.out.println("Response " + sb.toString());
    reader.close();
    sb=null;
    chars = null;
    responseBytes = null;
    ******************************************************************************************

  • When to use abstract classes instead of interfaces with extension methods in C#?

    "Abstract class" and "interface" are similar concepts, with interface being the more abstract of the two. One differentiating factor is that abstract classes provide method implementations for derived classes when needed. In C#, however,
    this differentiating factor has been reduced by the recent introduction of extension methods, which enable implementations to be provided for interface methods. Another differentiating factor is that a class can inherit only one abstract class (i.e., there
    is no multiple inheritance), but it can implement multiple interfaces. This makes interfaces less restrictive and more flexible. So, in C#, when should we use abstract classes
    instead of interfaces with extension methods?
    A notable example of the interface + extension method model is LINQ, where query functionality is provided for any type that implements IEnumerable via
    a multitude of extension methods.

    Hi
    Well I believe Interfaces have more uses in software design. You could decouple your component implementing against interfaces so that
    you have more flexibility on changing your code with less risk. Like Inversion of Control patterns where you can use interfaces and then when you decide you can change the concrete implementation that you want to use. Or other uses for interfaces is you could
    use Interceptors using interfaces (Unity
    Interceptor) to do different things where not all of these is feasible or at least as straightforward using abstract classes.
    Regards
    Aram

  • Edit Field Validation - Use of the native string.find() Lua Function

    Hi,
    I have an edit field in which I want to be validated immediately upon change.  I ONLY want to accept alphanumeric characters (a-z and 0-9).  I have tried this many ways, but have failed to get it exactly as I want it.  First I tried Sample Code A, but that line of code fails because combination strings that contain the alphanumeric characters and a special character like the pound sign (#), will validate (Example: "hello1#").  I tried Sample Code B, but that isn't 100% what I want because if you were to add a character that isn't available on the keyboard, such as the copyright symbol or the trademak symbol.  Can someone help me, please?  Thank you.
    Sample Code A:
    interface:edit_field {
                                value = bind { key = 'new_table', object = properties },
                                fill_horizontal = 1,
                                immediate = true,
                                validate = function (interface, value)
                                  if string.find(value, "[a-z%d]")  then
                                    return true, value, "good"
                                else
                                        return false, value, "failed"
                                    end
                                end
    Sample Code B:
    interface:edit_field {
                                value = bind { key = 'new_table', object = properties },
                                fill_horizontal = 1,
                                immediate = true,
                                validate = function (interface, value)
                                    if string.find(value, "[~!@#$%^&*()_+`-={}|\%[%]:\";'<>?,./]")  then
                                    return false, value, "failed"
                                else
                                        return true, value, "good"
                                    end
                                end

    wallanceM wrote:
    Hi,
    I have an edit field in which I want to be validated immediately upon change.  I ONLY want to accept alphanumeric characters (a-z and 0-9).
    Sample Code A:
    interface:edit_field {
                                value = bind { key = 'new_table', object = properties },
                                fill_horizontal = 1,
                                immediate = true,
                                validate = function (interface, value)
                                  if string.find(value, "[a-z%d]")  then
                                    return true, value, "good"
    Hi,
    Sample Code A seems the best approach to use.  Trying to detect unwanted characters would be error prone.
    I noticed you are mixing character classes and ranges in your string.find pattern.  Have you tried using the following patterns instead?
                                  if string.find(value, "[a-z0-9]")  then
    or
                                  if string.find(value, "[%l%d]")  then
    Matt

  • Not able to run validation using validation.xml & validator-rules.xml

    Hello Friends,
    I am not able to run validation using validation.xml & validator-rules.xml.
    Entire code in running prefectly but no error messages are prompted.
    Following is my code:
    File Name : struts-config.xml
    <struts-config>
    <!-- Form Beans Configuration -->
    <form-beans>
    <form-bean name="searchForm"
    type="com.solversa.SearchForm"/>
    </form-beans>
    <!-- Global Forwards Configuration -->
    <global-forwards>
    <forward name="search" path="/search.jsp"/>
    </global-forwards>
    <!-- Action Mappings Configuration -->
    <action-mappings>
    <action path="/search"
    type="com.solversa.SearchAction"
    name="searchForm"
    scope="request"
    validate="true"
    input="/search.jsp">
    </action>
    </action-mappings>
    <!-- Message Resources Configuration -->
    <message-resources
    parameter="ApplicationResources"/>
    <!-- Validator Configuration -->
    <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>
    <br> File Name : <b> validation.xml </b>
    <form-validation>
    <formset>
    <form name="searchForm">
    <field property="name" depends="minlength">
    <arg key="label.search.name" position = "0"/>
    <arg1 name="minlength" key="${var:minlength}" resource="false"/>
    <var>
    <var-name>minlength</var-name>
    <var-value>5</var-value>
    </var>
    </field>
    <field property="ssNum" depends="mask">
    <arg0 key="label.search.ssNum"/>
    <var>
    <var-name>mask</var-name>
    <var-value>^\d{3}-\d{2}-\d{4}$</var-value>
    </var>
    </field>
    </form>
    </formset>
    </form-validation>
    <br> File Name : <b> SearchForm.java </b>
    package com.jamesholmes.minihr;
    import java.util.List;
    import org.apache.struts.validator.ValidatorForm;
    public class SearchForm extends ValidatorForm
    private String name = null;
    private String ssNum = null;
    private List results = null;
    public void setName(String name) {
    this.name = name;
    public String getName() {
    return name;
    public void setSsNum(String ssNum) {
    this.ssNum = ssNum;
    public String getSsNum() {
    return ssNum;
    public void setResults(List results) {
    this.results = results;
    public List getResults() {
    return results;
    <br> File Name : <b> SearchAction.java </b>
    package com.jamesholmes.minihr;
    import java.util.ArrayList;
    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.ActionForward;
    import org.apache.struts.action.ActionMapping;
    public final class SearchAction extends Action
    public ActionForward execute(ActionMapping mapping,
    ActionForm form,
    HttpServletRequest request,
    HttpServletResponse response)
    throws Exception
    EmployeeSearchService service = new EmployeeSearchService();
    ArrayList results;
    SearchForm searchForm = (SearchForm) form;
    // Perform employee search based on what criteria was entered.
    String name = searchForm.getName();
    if (name != null && name.trim().length() > 0) {
    results = service.searchByName(name);
    } else {
    results = service.searchBySsNum(searchForm.getSsNum().trim());
    // Place search results in SearchForm for access by JSP.
    searchForm.setResults(results);
    // Forward control to this Action's input page.
    return mapping.getInputForward();
    <br> File Name : <b> EmployeeSearchService.java </b>
    package com.jamesholmes.minihr;
    import java.util.ArrayList;
    public class EmployeeSearchService
    /* Hard-coded sample data. Normally this would come from a real data
    source such as a database. */
    private static Employee[] employees =
    new Employee("Bob Davidson", "123-45-6789"),
    new Employee("Mary Williams", "987-65-4321"),
    new Employee("Jim Smith", "111-11-1111"),
    new Employee("Beverly Harris", "222-22-2222"),
    new Employee("Thomas Frank", "333-33-3333"),
    new Employee("Jim Davidson", "444-44-4444")
    // Search for employees by name.
    public ArrayList searchByName(String name) {
    ArrayList resultList = new ArrayList();
    for (int i = 0; i < employees.length; i++) {
    if (employees.getName().toUpperCase().indexOf(name.toUpperCase()) != -1) {
    resultList.add(employees[i]);
    return resultList;
    // Search for employee by social security number.
    public ArrayList searchBySsNum(String ssNum) {
    ArrayList resultList = new ArrayList();
    for (int i = 0; i < employees.length; i++) {
    if (employees[i].getSsNum().equals(ssNum)) {
    resultList.add(employees[i]);
    return resultList;
    <br> File Name : <b> Employee.java </b>
    package com.solversa;
    public class Employee
         private String name;
         private String ssNum;
         public Employee(String name, String ssNum) {
         this.name = name;
         this.ssNum = ssNum;
         public void setName(String name) {
         this.name = name;
         public String getName() {
         return name;
         public void setSsNum(String ssNum) {
         this.ssNum = ssNum;
         public String getSsNum() {
         return ssNum;
    Pls help me out.
    Not able to prompt errors.

    Hello Friends,
    I am not able to run validation using
    validation.xml & validator-rules.xml.
    Entire code in running prefectly but no error
    messages are prompted.
    Following is my code:
    File Name : struts-config.xml
    <struts-config>
    <!-- Form Beans Configuration -->
    <form-beans>
    <form-bean name="searchForm"
    type="com.solversa.SearchForm"/>
    ans>
    <!-- Global Forwards Configuration -->
    <global-forwards>
    <forward name="search" path="/search.jsp"/>
    global-forwards>
    <!-- Action Mappings Configuration -->
    <action-mappings>
    <action path="/search"
    type="com.solversa.SearchAction"
    name="searchForm"
    scope="request"
    validate="true"
    input="/search.jsp">
    tion>
    </action-mappings>
    <!-- Message Resources Configuration -->
    <message-resources
    parameter="ApplicationResources"/>
    <!-- Validator Configuration -->
    <plug-in
    className="org.apache.struts.validator.ValidatorPlugI
    ">
    <set-property property="pathnames"
    value="/WEB-INF/validator-rules.xml,
    /WEB-INF/validation.xml"/>
    >
    </struts-config>
    <br> File Name : <b> validation.xml </b>
    <form-validation>
    <formset>
    <form name="searchForm">
    <field property="name" depends="minlength">
    <arg key="label.search.name" position = "0"/>
    <arg1 name="minlength" key="${var:minlength}"
    resource="false"/>
    <var>
    <var-name>minlength</var-name>
    <var-value>5</var-value>
    </var>
    </field>
    <field property="ssNum" depends="mask">
    <arg0 key="label.search.ssNum"/>
    <var>
    <var-name>mask</var-name>
    <var-value>^\d{3}-\d{2}-\d{4}$</var-value>
    </var>
    </field>
    /form>
    </formset>
    form-validation>
    <br> File Name : <b> SearchForm.java </b>
    package com.jamesholmes.minihr;
    import java.util.List;
    import org.apache.struts.validator.ValidatorForm;
    public class SearchForm extends ValidatorForm
    private String name = null;
    private String ssNum = null;
    private List results = null;
    public void setName(String name) {
    this.name = name;
    public String getName() {
    return name;
    public void setSsNum(String ssNum) {
    this.ssNum = ssNum;
    public String getSsNum() {
    return ssNum;
    public void setResults(List results) {
    this.results = results;
    public List getResults() {
    return results;
    <br> File Name : <b> SearchAction.java </b>
    package com.jamesholmes.minihr;
    import java.util.ArrayList;
    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.ActionForward;
    import org.apache.struts.action.ActionMapping;
    public final class SearchAction extends Action
    public ActionForward execute(ActionMapping
    mapping,
    ActionForm form,
    HttpServletRequest request,
    HttpServletResponse response)
    throws Exception
    EmployeeSearchService service = new
    EmployeeSearchService();
    ArrayList results;
    SearchForm searchForm = (SearchForm) form;
    // Perform employee search based on what criteria
    was entered.
    String name = searchForm.getName();
    if (name != null && name.trim().length() > 0) {
    results = service.searchByName(name);
    else {
    results =
    service.searchBySsNum(searchForm.getSsNum().trim());
    // Place search results in SearchForm for access
    by JSP.
    searchForm.setResults(results);
    // Forward control to this Action's input page.
    return mapping.getInputForward();
    <br> File Name : <b> EmployeeSearchService.java </b>
    package com.jamesholmes.minihr;
    import java.util.ArrayList;
    public class EmployeeSearchService
    /* Hard-coded sample data. Normally this would come
    from a real data
    source such as a database. */
    ivate static Employee[] employees =
    new Employee("Bob Davidson", "123-45-6789"),
    new Employee("Mary Williams", "987-65-4321"),
    new Employee("Jim Smith", "111-11-1111"),
    new Employee("Beverly Harris", "222-22-2222"),
    new Employee("Thomas Frank", "333-33-3333"),
    new Employee("Jim Davidson", "444-44-4444")
    // Search for employees by name.
    public ArrayList searchByName(String name) {
    ArrayList resultList = new ArrayList();
    for (int i = 0; i < employees.length; i++) {
    if
    (employees.getName().toUpperCase().indexOf(name.toU
    pperCase()) != -1) {
    resultList.add(employees[i]);
    return resultList;
    // Search for employee by social security number.
    public ArrayList searchBySsNum(String ssNum) {
    ArrayList resultList = new ArrayList();
    for (int i = 0; i < employees.length; i++) {
    if (employees[i].getSsNum().equals(ssNum)) {
    resultList.add(employees[i]);
    return resultList;
    <br> File Name : <b> Employee.java </b>
    package com.solversa;
    public class Employee
         private String name;
         private String ssNum;
         public Employee(String name, String ssNum) {
         this.name = name;
         this.ssNum = ssNum;
         public void setName(String name) {
         this.name = name;
         public String getName() {
         return name;
         public void setSsNum(String ssNum) {
         this.ssNum = ssNum;
         public String getSsNum() {
         return ssNum;
    Pls help me out.
    Not able to prompt errors.
    Hi,
    Your error message are not displaying because u does not made Message-Resoucrce property file (Resource Bundle) when you make it .
    give it entry in
    struts-config.xml
    <message-resources parameter="ApplicationResources" />
    and
    define key and corresponding error message to key in this ApplicationResources i.e
    #Error Resources
    label.search.ssNum=Plz Enter correct ssNum

  • How to use inbound exit class for more than one workflow step

    Hi All,
    In Offline Workflow Approval Scenarios where the work items are sent to outlook of non sap users inbox through workitem exit of the respective workflow item. Based on the user reply from outlook email(either approve or reject) which sends an auto reply to Offline user . We configure an inbound exit class and assign the same in the SMICM transaction. Based on the code written using SAP_WAPI function modules in inbound class exit offline user gets the user approval result and performs the action in SAP.
    My question now Is how can we use this inbound exit class for all the steps of a workflow.
    For ex: In a workflow I have a decision step followed by an activity step. First I will write the work item exit for the user decision step and inbound exit code for the user decision step and offline user executed the user decision step with approve action.
    followed by that I have an activity step for that I will code a work item exit for that activity level but how can I user the same inbound exit class for the activity step as well .
    Quick reply  would be of great  help for me.
    With Best Regards,
    Veni

    For the outbound processing you have the option of replacing the workflow exit by chancing the bsp application of the extended notification (see note 1448241 solution as an example of how to do the change) and replacing the standard links with a "mailto:...".
    As far as the inbound processing, that depends on what should be done in the activity step, if for example you have a bapi which executes what the user does you can call it in the inbound class instead of the user and then the relevant wapi (complete the workitem/raise event etc.).

  • How to use the implementation class in propetty pallete

    Hi,
    I am using forms 10g....I have to insert horizontal scroll bar in text item..
    I have only class files instead of jar files ...how cani place the class file instead of jar file...
    How to use the implementation class in property palette to display the PJC
    Thanks,
    Ansaf.

    The Implementation Class must reflect the full name of the class. For instance, if the full class name is : xx.yyy.zz.class_name, then put this in the Implementation Class property of the corresponding item.
    Also, the class must be stored in the equivalent directory structure, so that, in my example: <DEV_HOME>/forms/java/xx/yyy/zz
    Francois

  • Declaring top level classes instead of subclasses

    I seem to have misunderstood something very basic.
    It's always better, where possible, to declare the top-level class instead of the sub-class, right?
    Ok, then why do I have the following problem?
    I declare, from the JavaMail API the following:
    Message theMessage = new MimeMessage(session);instead of declaring directly the subclass like this:
    MimeMessage theMessage = new MimeMessage(session);but when I use a method which is only found in the MimeMessage class I get a compile error.
    [javac] 189.           theMessage.setSubject(subject, "iso8859_1");
    [javac] <-------------------------------->
    [javac] *** Error: No match was found for method "setSubject(java.lang.String, java.lang.String)".
    Have I really misunderstood something so basic?? Surely the compiler knows that theMessage is an instance of MimeMessage??
    Any clear explanation to explain why I get this compile error would be gratefully received. I have been faithfully declaring top-level classes instead of subclasses in my code, but if the compiler doesn't let you do so, then what's the point?

    Ok, my confusion was started by an article on the
    Collection classes which stated that:
    Map theMap = new HashMap(); was better
    programming practice.
    Yep.
    But the Map class is an Interface, right? - Whereas
    Message is a normal class with subclass MimeMessage.
    I think that's where my confusion started.Well, this isn't really a class vs. interface difference. It goes to which class (or interface) is the "highest" (closest to Object) and still has all the public interface you need.
    There are cases where you'll declare a variable to be of a base class type like Message.
    You just need to get into the habit of separating the left side of the = from the right side. On the left, you put the bare minimum that completely meets your needs. You say, "I need a List" or "I need a Map" or "I need a SortedMap" (a subinterface of Map) or "I need a Message" or "I need a MimeMesage".
    Then, on the RHS =, you decide which particular class best implements the public interface that you said you need (by declaring it on the LHS). "For my Map, I'll use a HashMap." "For my Message, I'll use a MimeMessage." "For my MimeMessage, I'll use a MimeMessage".

  • Can I use multiple p class="logos" tag with the same name within the same html page?

    I was told not to use <div class> tags too many times. I was using them for text, images, to clear floats, I basically built my website using multiple <div class> tags. So if I can't use multiple <div class> tags could I use <p class> tags multiple times in the same html page?
    I have a string of logos at the bottom of my webpage which will all be using the same css characteristics for all logos. Would this be the proper way to write the code:
    HTML
    <p class="logos">Logo1<a href="...></a></p>
    <p class="logos">Logo2<a href="...></a></p>
    <p class="logos">Logo3<a href="...></a></p>
    <p class="logos">Logo4<a href="...></a></p>
    <p class="logos">Logo5<a href="...></a></p>
    <p class="logos">Logo6<a href="...></a></p>
    CSS
    .logos {
    margin-left:10px;
    Here's my website: http://www.darbymanufacturing.com/test_website/index.html - this is the website built with all div class tags
    I restarted the website in order to write the code properly so that I don't come to errors when uploading on the server like I am having with the website link above.

    Instead of writing something like this -
    <p class="logos">Logo1<a href="...></a></p>
    <p class="logos">Logo2<a href="...></a></p>
    <p class="logos">Logo3<a href="...></a></p>
    <p class="logos">Logo4<a href="...></a></p>
    <p class="logos">Logo5<a href="...></a></p>
    <p class="logos">Logo6<a href="...></a></p>
    Why not have something like this -
    <div id="logodiv">
    <p>Logo1<a href="...></a></p>
    <p>Logo2<a href="...></a></p>
    <p>Logo3<a href="...></a></p>
    <p>Logo4<a href="...></a></p>
    <p>Logo5<a href="...></a></p>
    <p>Logo6<a href="...></a></p>
    </div>
    with CSS like this -
    #logodiv p { ... }

  • Struts2 - Dynamic values in expression while doing validations using annota

    Hi,
    I am using Struts2. I am doing validations using annotations in action class.
    I have many forms having same type of fields say zip code.
    I am adding validations like below in each action class having zip code field
    @Action(value = "/saveData")
    @Validations(
         regexFields = {
              @RegexFieldValidator(fieldName = "databean.zipCode", expression = "^([1-9]{1}[0-9]{4}(-[0-9]{4})?)$", key = "errors.zipcode.format", message = "errors.zipcode.format")
    public String saveData() throws Exception {
    Now, in case if I need to change the expression for zip code validations, then I need to modify the same in each action class.
    I would like to know if there is any way to use java variable or property for expression so that i only need to change at one place (value of variable) and all actions get modified.
    I want something like below
    private static final String ZIP_CODE_FORMAT_EXPRESSION = "^([1-9]{1}[0-9]{4}(-[0-9]{4})?)$"
    @Action(value = "/saveData")
    @Validations(
         regexFields = {
              @RegexFieldValidator(fieldName = "databean.zipCode", expression = "${ZIP_CODE_FORMAT_EXPRESSION}", key = "errors.zipcode.format", message = "errors.zipcode.format")
    public String saveData() throws Exception {
    Thanks
    Krishan Babbar

    Thanks
    That is working..
    I defined my expression as constant in my another file and it is working fine....
    One more question i need to check space in expression but its not working... I tried following:
    expression = "^([a-zA-Z0-9@_.-\\s]+)$" and expression = "^([a-zA-Z0-9@_.-\\\\s]+)$"

Maybe you are looking for

  • NVidia GeForce 8600M GT, what's the deal?

    Hello to all of you, I've heard quite a bit about the problems with the graphics card in the new macbook pro (santa rosa) and I can only confirm this issue (games freeze, slow framerates, and stuff like that). This is very sad actually 'cause the rea

  • Java API for working with Pivot Tables...?

    Hi, I want to create/modify an existing pivot table in an excel sheet. Is there any open source available to work on pivot tables. I have seen few articles mentioning that POI supports updation of data, though the apache site says that it does not su

  • Problem with Iphone 6 unlock

    Hi there. I have the iPhone NJ 6 (64Gb) I got (unlock). After returning home, I put the phone to the local operator's sim card. After the first attempt, however, was a problem on the phone screen. the screen was invisible. Scratches appeared. Improvi

  • IE 11 layout issues in website

    Hello, We have a website developed with DevExpress controls. It is working fine in IE 10 and below versions. In IE 11 the layout is getting collapsed. In the page we have a grid in which we can resize the columns and has horizontal scroll bar also.In

  • Help with minesweeper program

    I am using BlueJ to make a simple minesweeper program. I am currently woring on the logic only (no GUI yet) and have just started. I am getting an error that the compiler cant find my variable 'cells' down in the method openCell. Why cant i use my va