PS Validations - Using a subset of a field not allowed?

Dear All,
We are in ECC 6.0 and I am trying to create a PS Validation to check between
Project Profile vs PROJ-PSPID :1-1: (1st character of the Project Number)
However I am getting GGB520 error : "Conditions cannot be edited with the formula editor". This leads me to OSS Note 167634. However It is not clear how to achieve a validation by using subset of a field. The corrections are not valid for ECC 6.0 and earlier in ECC 5.0, I have done such validations successfully. 
Can you  please clarify, what should I do? We don't want to go to user exit validation route.
Thanks,
Regards,
Davit

Hi Davit,
I had put something like same validation in my one project ans it is working . this validation will restrict the project code of a certain project profile in a certain range.
same way we can put the validation of project code validation with project profile.
Prerequisite
PROJ-PROFL = 'Project Profile Code '
Check
( (PROJ-PSPID : 3-6 : >= ' 1000 ' ) AND (PROJ-PSPID : 3-6 : <= ' 1999 ' ) )
Message
Project Code is not in defined range.
rgds
Rajesh

Similar Messages

  • During the validation of budgets, should be warnings that not allow the rec

    Hi All,
    During the validation of budgets, should be warnings that not allow the record, if any required fields unfilled. It´s possible to maintain a pop-up message?
    Can anyone help me Pls.? Thanks

    Hi,
    This needs to be done through native excel functionality. You can do this using the data validation.
    Hope this helps.

  • As a new Macbook Pro user I was saddened to find that the feature of using keywords in iPhoto '11 does not allow showing same under each photo.  I understand this was available in earlier versions.  Any comments?

    As a new Macbook Pro user I was saddened to find that the feature of using keywords in iPhoto '11 does not allow showing same under each photo.  I understand this was available in earlier versions.  Any comments?

    Against TOU which you "agreed" to in order to post in these user to user forums.  If you want to "suggest" something to Apple, do so in the Product Feedback area.

  • Use of non-migratable database link not allowed in OSB

    Hi All,
    I have a procedure in which tables are invoked using Database links.
    Now I have created a business service which uses this procedure. However I am getting below error
    The invocation resulted in an error: Invoke JCA outbound service failed with application error, exception: com.bea.wli.sb.transports.jca.JCATransportException: oracle.tip.adapter.sa.api.JCABindingException: oracle.tip.adapter.sa.impl.fw.ext.org.collaxa.thirdparty.apache.wsif.WSIFException: servicebus:/WSDL/E2xInterface_V1/WSDL/GetEWOStatus [ GetEWOStatus_ptt::GetEWOStatus(InputParameters,OutputParameters) ] - WSIF JCA Execute of operation 'GetEWOStatus' failed due to: Stored procedure invocation error.
    Error while trying to prepare and execute the SP_GETEWOSTATUS API.
    An error occurred while preparing and executing the SP_GETEWOSTATUS API. Cause: java.sql.SQLException: ORA-00604: error occurred at recursive SQL level 1
    ORA-24777: use of non-migratable database link not allowed
    can we use dblink in procedure while accessing through business service. Please let me know.
    Thanks
    Chandana

    hello gurus . i have same problem on my stored procedure what is a non xa datasource. how can i create on my weblogic server

  • Use of non-migratable database link not allowed ERROR

    Hello,
    We have a notification process (on disabled user) in OIM that needs to connect to a schema in another instance to check some information before the notification is sent out.
    We have OIM in an instance A and the other schema lives in the instance B. We created a database link from A to B, some synonyms, and grant the right permissions for OIM to select the tables in the schema on instance B.
    We can login to OIM using SQL Developer and execute the query without any problems.
    However, when the query is executed in the Disable User process task, we got the error:
    java.sql.SQLException: ORA-24777: use of non-migratable database link not allowed
    We tried to create a view in OIM that is similar to the one that lives in the schema in instance B. However, the same error exists.
    How can we work around this error?
    Thanks

    with all the info you have put here all I can say is : (with some help from google ;-) )
    ORA-24777: use of non-migratable database link not allowed
    Cause: The transaction, which needs to be migratable between sessions, tried to access a remote database from a non-multi threaded server process.
    Action: Perform the work in the local database or open a connection to the remote database from the client. If multi threaded server option is installed, connect to the Oracle instance through the dispatcher.

  • Use of non-migratable database link not allowed - weblogic

    Can somebody help me with this error?
    The application use an entity bean for a view that use a dblink for accesing a table from another oracle database.
    Thank you.
    javax.ejb.EJBException: EJB Exception: ; nested exception is:
         Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.0.2.v20100323-r6872): org.eclipse.persistence.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: ORA-24777: use of non-migratable database link not allowed
    Error Code: 24777
         at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.unwrapRemoteException(RemoteBusinessIntfProxy.java:120)
         at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.invoke(RemoteBusinessIntfProxy.java:102)
         at $Proxy190.queryVCommentMonitoring(Unknown Source)
         at ro.uct.capone.viewcontroller.Utils.getStatus(Utils.java:36)
         at ro.uct.capone.viewcontroller.forms.WatchListForm.validate(WatchListForm.java:114)
         at org.apache.struts.action.RequestProcessor.processValidate(RequestProcessor.java:942)
         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:255)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
         at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:330)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.doIt(WebAppServletContext.java:3684)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3650)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2268)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2174)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1446)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Caused by: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.0.2.v20100323-r6872): org.eclipse.persistence.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: ORA-24777: use of non-migratable database link not allowed

    I've gotten past this by creating the dblink as SHARED.
    The SQL is
    CREATE SHARED DATABASE LINK "yourlink"
    CONNECT TO "dbuser" IDENTIFIED BY "dbuserpassword"
    AUTHENTICATED BY "dbuser" IDENTIFIED BY "dbuserpassword"
    USING 'databasename';
    note the quote character use.
    You can also use SQL Developer to adjust this.
    This does depend on shared database connections between your db's.

  • Blank username field not allowed in authentication...

    Hi, a ihave a problem with built-in internet browser in N80.
    I need access some routers and access point by web interface, and one or other use blank username (only password is entered) to access it.
    But login popup from N80 web browser doesn't allow to enter just password (OK button get unavailable).
    Any idea to solve this ?
    thanks

    Hi Rowdy
    Thanks for your reply.
    My Problem I am defining one  serialized item and then try to create GRPO for that item it gives the Error "(OITM) Blank strings are not allowed in row(in unique field).
    But the GRPO was created non serialized items. I Checked all the UDF and also i entered all the Values in the GRPO Screens.
    I can't able to find out the error. Can you pls give some idea abt this.
    Regards
    SenthilKumbar

  • I have been using my iphone and it will not allow me to reset my security qeustions and i have not gotten a email on how to reset it yet please help

    i have asked to have my security qeustions reset but have not gotten a email from them yet

    If it hasn't arrived after a few hours and isn't in a spam filter, you need to contact Apple. Click here, phone them, and ask for the Account Security team, or fill out and submit this form.
    (91624)

  • Windows 10 9926 Bug Search field not allow text do not allow me to type anything in search box and wont allow to click start menu

    Seems everything else is fine.
    But I cant click the search box it just marks the Search the web and Windows  but wont allow me to type anything.
    And the same for the start menu if I click the windows icon in lower left corner nothing happens.
    Please someone help

    Hi,
    Generally speaking, this problem can be caused by system store componments lost or corrupt. Dism command below should be helpful to resolve this problem:
    DISM /Online /Cleanup-Image /RestoreHealth
    Roger Lu
    TechNet Community Support
    SFC /scannow & DISM are broken in 9926 they do not normally complete making things e en more difficult to diagnose.
    Wanikiya and Dyami--Team Zigzag

  • HTTP Error 405 - The HTTP verb used to access this page is not .....

    Goodmorning,
    I've installed BO XI R3 SP4 on a 2k3-server with IIS 6.0. I wanted to configurate the SSO. After changing the web.config file and restart of the IIS , I get the following error :
    HTTP Error 405 - The HTTP verb used to access this page is not allowed.
    Internet Information Services (IIS)
    The frame where you normally are using for authentication has this error, the frame around is normal.
    Hope someony can help, thx in advance

    I can't fin a upload button , so the file in plain text gepasted
    Hope it is readable :
    #Software: Microsoft Internet Information Services 6.0
    #Version: 1.0
    #Date: 2012-02-29 12:19:21
    #Fields: date time s-sitename s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) sc-status sc-substatus sc-win32-status
    2012-02-29 12:19:21 W3SVC1 10.13.0.119 GET /InfoViewApp/logon.aspx - 80 - 10.13.0.119 Mozilla/4.0(compatible;MSIE7.0;WindowsNT5.2;Trident/4.0;.NETCLR1.1.4322;.NETCLR2.0.50727;.NETCLR3.0.4506.2152;.NETCLR+3.5.30729) 200 0 0
    2012-02-29 12:19:21 W3SVC1 10.13.0.119 GET /InfoViewApp/res/schema.blue/default.css.ashx - 80 - 10.13.0.119 Mozilla/4.0(compatible;MSIE7.0;WindowsNT5.2;Trident/4.0;.NETCLR1.1.4322;.NETCLR2.0.50727;.NETCLR3.0.4506.2152;.NETCLR+3.5.30729) 200 0 0
    2012-02-29 12:19:21 W3SVC1 10.13.0.119 GET /InfoViewApp/js/utils.js.ashx - 80 - 10.13.0.119 Mozilla/4.0(compatible;MSIE7.0;WindowsNT5.2;Trident/4.0;.NETCLR1.1.4322;.NETCLR2.0.50727;.NETCLR3.0.4506.2152;.NETCLR+3.5.30729) 200 0 0
    2012-02-29 12:19:21 W3SVC1 10.13.0.119 GET /InfoViewApp/js/helpSystem.js.ashx - 80 - 10.13.0.119 Mozilla/4.0(compatible;MSIE7.0;WindowsNT5.2;Trident/4.0;.NETCLR1.1.4322;.NETCLR2.0.50727;.NETCLR3.0.4506.2152;.NETCLR+3.5.30729) 200 0 0
    2012-02-29 12:19:21 W3SVC1 10.13.0.119 GET /InfoViewApp/common/appService.aspx service=skinning&resource=img&img=img.banner.logon.pattern 80 - 10.13.0.119 Mozilla/4.0(compatible;MSIE7.0;WindowsNT5.2;Trident/4.0;.NETCLR1.1.4322;.NETCLR2.0.50727;.NETCLR3.0.4506.2152;.NETCLR+3.5.30729) 200 0 0
    2012-02-29 12:19:21 W3SVC1 10.13.0.119 GET /InfoViewApp/listing/blank.aspx - 80 - 10.13.0.119 Mozilla/4.0(compatible;MSIE7.0;WindowsNT5.2;Trident/4.0;.NETCLR1.1.4322;.NETCLR2.0.50727;.NETCLR3.0.4506.2152;.NETCLR+3.5.30729) 200 0 0
    2012-02-29 12:19:21 W3SVC1 10.13.0.119 GET /InfoViewApp/common/appService.aspx service=skinning&resource=img&img=img.banner.logo 80 - 10.13.0.119 Mozilla/4.0(compatible;MSIE7.0;WindowsNT5.2;Trident/4.0;.NETCLR1.1.4322;.NETCLR2.0.50727;.NETCLR3.0.4506.2152;.NETCLR+3.5.30729) 200 0 0
    2012-02-29 12:19:21 W3SVC1 10.13.0.119 GET /InfoViewApp/logon/logon.aspx parameter=logonService 80 - 10.13.0.119 Mozilla/4.0(compatible;MSIE7.0;WindowsNT5.2;Trident/4.0;.NETCLR1.1.4322;.NETCLR2.0.50727;.NETCLR3.0.4506.2152;.NETCLR+3.5.30729) 200 0 0
    2012-02-29 12:19:21 W3SVC1 10.13.0.119 POST /PlatformServices/Shared/Logon/Logon.aspx - 80 - 10.13.0.119 Mozilla/4.0(compatible;MSIE7.0;WindowsNT5.2;Trident/4.0;.NETCLR1.1.4322;.NETCLR2.0.50727;.NETCLR3.0.4506.2152;.NETCLR+3.5.30729) 405 0 1
    2012-02-29 12:32:05 W3SVC1 127.0.0.1 GET /InfoViewApp/logon.aspx - 80 - 127.0.0.1 Mozilla/4.0(compatible;MSIE8.0;WindowsNT5.2;Trident/4.0;.NETCLR1.1.4322;.NETCLR2.0.50727;.NETCLR3.0.4506.2152;.NETCLR+3.5.30729) 200 0 0
    2012-02-29 12:32:05 W3SVC1 127.0.0.1 GET /InfoViewApp/res/schema.blue/default.css.ashx - 80 - 127.0.0.1 Mozilla/4.0(compatible;MSIE8.0;WindowsNT5.2;Trident/4.0;.NETCLR1.1.4322;.NETCLR2.0.50727;.NETCLR3.0.4506.2152;.NETCLR+3.5.30729) 200 0 0
    2012-02-29 12:32:05 W3SVC1 127.0.0.1 GET /InfoViewApp/js/utils.js.ashx - 80 - 127.0.0.1 Mozilla/4.0(compatible;MSIE8.0;WindowsNT5.2;Trident/4.0;.NETCLR1.1.4322;.NETCLR2.0.50727;.NETCLR3.0.4506.2152;.NETCLR+3.5.30729) 200 0 0
    2012-02-29 12:32:05 W3SVC1 127.0.0.1 GET /InfoViewApp/js/helpSystem.js.ashx - 80 - 127.0.0.1 Mozilla/4.0(compatible;MSIE8.0;WindowsNT5.2;Trident/4.0;.NETCLR1.1.4322;.NETCLR2.0.50727;.NETCLR3.0.4506.2152;.NETCLR+3.5.30729) 200 0 0
    2012-02-29 12:32:05 W3SVC1 127.0.0.1 GET /InfoViewApp/listing/blank.aspx - 80 - 127.0.0.1 Mozilla/4.0(compatible;MSIE8.0;WindowsNT5.2;Trident/4.0;.NETCLR1.1.4322;.NETCLR2.0.50727;.NETCLR3.0.4506.2152;.NETCLR+3.5.30729) 200 0 0
    2012-02-29 12:32:05 W3SVC1 127.0.0.1 GET /InfoViewApp/common/appService.aspx service=skinning&resource=img&img=img.banner.logon.pattern 80 - 127.0.0.1 Mozilla/4.0(compatible;MSIE8.0;WindowsNT5.2;Trident/4.0;.NETCLR1.1.4322;.NETCLR2.0.50727;.NETCLR3.0.4506.2152;.NETCLR+3.5.30729) 200 0 0
    2012-02-29 12:32:05 W3SVC1 127.0.0.1 GET /InfoViewApp/common/appService.aspx service=skinning&resource=img&img=img.banner.logo 80 - 127.0.0.1 Mozilla/4.0(compatible;MSIE8.0;WindowsNT5.2;Trident/4.0;.NETCLR1.1.4322;.NETCLR2.0.50727;.NETCLR3.0.4506.2152;.NETCLR+3.5.30729) 200 0 0
    2012-02-29 12:32:05 W3SVC1 127.0.0.1 GET /InfoViewApp/logon/logon.aspx parameter=logonService 80 - 127.0.0.1 Mozilla/4.0(compatible;MSIE8.0;WindowsNT5.2;Trident/4.0;.NETCLR1.1.4322;.NETCLR2.0.50727;.NETCLR3.0.4506.2152;.NETCLR+3.5.30729) 200 0 0
    2012-02-29 12:32:05 W3SVC1 127.0.0.1 POST /PlatformServices/Shared/Logon/Logon.aspx - 80 - 127.0.0.1 Mozilla/4.0(compatible;MSIE8.0;WindowsNT5.2;Trident/4.0;.NETCLR1.1.4322;.NETCLR2.0.50727;.NETCLR3.0.4506.2152;.NETCLR+3.5.30729) 405 0 1
    2012-02-29 12:33:17 W3SVC1 10.13.0.119 OPTIONS /c$ - 80 - 10.13.8.13 Microsoft-WebDAV-MiniRedir/6.1.7601 200 0 0
    2012-02-29 12:33:17 W3SVC1 10.13.0.119 PROPFIND /c$ - 80 - 10.13.8.13 Microsoft-WebDAV-MiniRedir/6.1.7601 501 0 0
    2012-02-29 12:33:17 W3SVC1 10.13.0.119 PROPFIND /c$ - 80 - 10.13.8.13 Microsoft-WebDAV-MiniRedir/6.1.7601 501 0 0
    2012-02-29 12:33:17 W3SVC1 10.13.0.119 PROPFIND /c$ - 80 - 10.13.8.13 Microsoft-WebDAV-MiniRedir/6.1.7601 501 0 0
    2012-02-29 12:33:17 W3SVC1 10.13.0.119 PROPFIND /c$ - 80 - 10.13.8.13 Microsoft-WebDAV-MiniRedir/6.1.7601 501 0 0
    Thx in advance for your reply

  • OXS server 3 with mavericks, it will not load up the assistant with open directory and will not allow me to use old open directory it was not a clean install just upgrade. any help or advise appreciated as i really need the server.

    OXS server 3 with mavericks, it will not load up the assistant with open directory and will not allow me to use old opeopen directory and will not allow me to use old open directory it was not a clean install just upgrade. any help or advise appreciated as i really need the server.

    I wonder if the disk being referred to is actually your iPod which is not plugged in. Maybe something has stuck thinking the iPod should be there.
    Try completely removing all the iTunes related programs according to this method.
    http://support.apple.com/kb/HT1923
    Restart you PC and see if startup improves.
    If it doesn't improve you need to consider the possibility that there is something else going on.
    If The problem goes away, hopefully a fresh install will be OK.

  • How do I clear a form text field during validation using JavaScript?

    I am just learning JavaScript and the Acrobat API.  I have a form created in adobe acrobat 9 standard (starting from an existing form in MS Excel).  There is a text field for a Social Security Number.  I have a custom format script and keystroke script and a custom validation script. I would like to add to the existing validation script, that if what is entered doesn't match the validation test, then clear out the field as in erase all the characters that were typed into the field.  I want this to happen no matter what.  So even if someone filled in a valid SSN number and then moved to the next field, but then went back to the SSN field and decided to change their entry and this new entry was "invalid" then clear out the field (do not revert to what was typed in the field originally, even though it was considered valid by the script).  (There is currently no default value for this field.)  Thank you inadvance for you help on this.
    Here is the current validation script:
    // only run when field not blank
    if (event.value != "")
    // RegExp for validation #########
    var re = /^(\d{3})(\d{2})(\d{4})$/
    if(re.test(event.value) == false)
    app.alert("Enter a 9-digit Social Security number with no spaces or special characters (e.g., 555555555). It will be converted to the format 555-55-5555.")
         //Here is where I've tried adding all of these lines, but none of them will clear out what is in the field
              //this.resetForm([event.target.name]);
              //event.target.value == "";
              //getField("SSN 1").value = getField("SSN 1").defaultValue;
              //getField("SSN 1").value == "";
              //event.rc = false;
    And incase these are somehow affecting it, here are the other scripts being processed on this field:
    Keystroke script:
    var input=event.value;
    var chars=input.length;
    if( event.willCommit || chars==8 )this.getField("Name 1").setFocus();
    Format script:
    var re = /^(\d{3})(\d{2})(\d{4})$/
    if(re.test(event.value) == true)
    // add "-"
    event.value = RegExp.$1 + "-" + RegExp.$2 + "-" + RegExp.$3;

    Thank you very much.  I did try that before, but I was using event.value == "";  I guess in this case I'm assigning the value of "", not making the value equal "".

  • 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

  • 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]+)$"

  • Pre-validation using JavaScript cannot work in JSF?

    Sometimes we need to do pre-validation using JavaScript in some senarios that data need be entered and validated at client site before it reaches to Web Application Server. Remind that JSF is a server validation. Creator seems not to allow Developers to do pre-validation using JavaScript for any editable input fields in form. I will illustrate an example and hope anyone can help me to solve it out.
    Assume that if we write the a new web page that allows User enters Name and Phone. The pre-validation function called test() is written in JavaScript for validating field Phone. For simplicity, the below HTML/JavaScript without nested in table is a simple one for HTML form.
    <html>
    <body>
    <script language="JavaScript">
    function test(){
         if (form1.phone.value == "")
              alert("Please enter phone number in digits.");
              return false;
    </script>
    <form name=form1>
    <input id="phone" type="text" size=20><Br>
    <input id="name" type="text" size=20><Br>
    <input type="submit" id="submit" onclick="test()" value="Submit">
    </form>
    </body>
    </html>
    Now, we consider using Java Studio Creator to generate the same form as describing above. The script is shown below:
    <?xml version="1.0"?>
    <jsp:root version="1.2" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page">
    <jsp:directive.page contentType="text/html;charset=UTF-8"/>
    <f:view>
    <html>
    <head>
    <title>testForm Title</title>
    </head>
    <body rave-layout="grid">
    <h:form binding="#{testForm.form1}" id="form1">
    <h:inputText binding="#{testForm.textField1}" id="phone" style="position: absolute; left: 192px; top: 96px; width: 168px; height: 23px"/>
    <h:inputText binding="#{testForm.textField2}" id="name" style="position: absolute; left: 192px; top: 144px; width: 168px; height: 23px"/>
    <h:commandButton binding="#{testForm.button1}" id="submit" style="position: absolute; left: 192px; top: 216px" value="Submit"/>
    </h:form>
    </body>
    </html>
    </f:view>
    </jsp:root>
    After running Script that Creator created, the HTML is generated and reduced (for simplicity) as follows:
    <f:view>
    <html>
    <body rave-layout="grid">
    <form action="/rave/rave" id="form1" method="post">
    <input id="form1:Phone" type="text"></input>
    <input id="form1:name" type="text"></input>
    <input id="form1:button1" value="Submit" onClick="test()"></input>
    </body>
    </html>
    </f:view>
    Take a look carefully at <input> elements. We see the syntax for naming for each "input" element that there is a semi colon added between form1 and phone or form1 and name. This syntax is generated from built-in JSF components. Hence, I rewrite the test() JavaScript function to match with the naming that Creator generated as follows:
    <script language="JavaScript">
    function test(){
         if (form1.form1:Phone.value == "")
              alert("Please enter phone number in digits.");
              return false;
    </script>
    Clearly, this JavaScript cannot be worked because of a semi column that Creator has named it.
    I have tried to work arround for this but cannot find a solution except changing the name such as: from <input id="form1:phone" ...> to <input id="form1_phone" ..>. But I could not change or modify the scripts because it is generated from JSF components when running it under browser.
    I guess to solve this problem, the naming for elements in form should be reconsidered in the next release of Java Studio Creator.

    Hi Marie,
    I currently sucess in client pre-validation using JSF. I found a way to do it.
    Please take a look of how javascript has been added in the following scripts:
    <?xml version="1.0" encoding="UTF-8"?>
    <jsp:root version="1.2" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page">
    <jsp:directive.page contentType="text/html;charset=UTF-8"/>
    <f:view>
    <html lang="en-US" xml:lang="en-US">
    <head>
    <meta content="no-cache" http-equiv="Cache-Control"/>
    <meta content="no-cache" http-equiv="Pragma"/>
    <title>login Title</title>
    </head>
    <body style="-rave-layout: grid">
    <h:form binding="#{login.form1}" id="form1">
    <h:outputLabel binding="#{login.componentLabel1}" for="componentLabel1" id="componentLabel1" style="position: absolute; left: 216px; top: 72px">
    <h:outputText binding="#{login.componentLabel1Text}" id="componentLabel1Text" value="Application System Name"/>
    </h:outputLabel>
    <h:panelGrid binding="#{login.gridPanel1}" columns="3" id="gridPanel1" style="position: absolute; left: 72px; top: 168px; width: 504px; height: 100px">
    <h:outputLabel binding="#{login.componentLabel2}" for="componentLabel2" id="componentLabel2">
    <h:outputText binding="#{login.componentLabel2Text}" id="componentLabel2Text" value="User Name: "/>
    </h:outputLabel>
    <h:inputText binding="#{login.textField1}" id="textField1" onclick="" style="width: 149px; height: 22px"/>
    <h:outputText binding="#{login.outputText1}" id="outputText1"/>
    <h:outputLabel binding="#{login.componentLabel3}" for="componentLabel3" id="componentLabel3">
    <h:outputText binding="#{login.componentLabel3Text}" id="componentLabel3Text" value="Password: "/>
    </h:outputLabel>
    <h:inputSecret binding="#{login.textField2}" id="textField2" style="width: 147px; height: 22px"/>
    <h:outputText binding="#{login.outputText2}" id="outputText2"/>
    <h:outputLabel binding="#{login.componentLabel4}" for="componentLabel4" id="componentLabel4">
    <h:outputText binding="#{login.componentLabel4Text}" id="componentLabel4Text"/>
    </h:outputLabel>
    <h:commandButton action="#{login.ok_action}" binding="#{login.button1}" id="button1" onclick="return checkUserIdentity(this.form)"
    style="width: 90px; height: 25px" value="OK"/>
    <h:outputLabel binding="#{login.componentLabel5}" for="componentLabel5" id="componentLabel5">
    <h:outputText binding="#{login.componentLabel5Text}" id="componentLabel5Text"/>
    </h:outputLabel>
    </h:panelGrid>
    </h:form>
    </body>
    <script type="text/javascript">
    function checkUserIdentity(form){
    var userName = form["form1:textField1"].value;
    var userPassword = form["form1:textField2"].value;
    if (userName == "") {
    alert("Please enter User Name.");
    form["form1:textField1"].focus();
    return false;
    if (userPassword == "" ){
    alert("Please enter password.");
    form["form1:textField2"].focus();
    return false;
    form.submit();
    return true;
    </script>
    </html>
    </f:view>
    </jsp:root>
    The key for getting data value from Form based on Javascripts is var userName = form["form1:textField1"].value;
    Thanks,
    VTT_

Maybe you are looking for

  • JVM error while reserving big byte array

    Hi all, I've encountered a strange problem while trying to unzip a big file (~100MB): I have to work with it in memory so I load it into byte array - this never caused any troubles until I tried to unpack a file of such big size - more detailed inves

  • GRR1-Report painter balance sheet for non leading ledger

    Hi Experts, I want to create a balance sheet for non leading ledger group using GRR1 report painter functionality. i have created also however in general selection i have selected non leading ledger under ledger characteristics. and when i am trying

  • Set up time capsule with PC using ethernet

    Hi, I have a Time Capsule which I want to use as a wireless router. I have two PCs - a desktop without a wireless card, and a laptop with one. My internet connection requires a SecureID password, so whenever it disconnects (for any reason) I have to

  • Apple TV Static Noise?

    I picked up a cheap LCD TV for the bedroom and connected up my Apple TV with £20 HDMI cable i picked up from Tesco. The problem is i get this static/buzzing sound coming through the TV whenever the Apple TV is in use. So re-connected the Apple TV via

  • Using RTTI to identify subclasses

    Hello, here is my dilemma: Class B inherits from Class A.  Classes C and D inherit from Class B. I need to test if object O is an instance of Class A or any of its subclasses (ie Class A, B, C or D).  Using the method GET_RELATIVE_NAME is not suitabl