Struts Conditional Validations

Hi All,
I am doing client side validation using struts frame work (struts 1.3).I wrote validations for a jsp
JSP
It’s having 2 radio buttons, 2 DIV.Based on the user selection I am showing DIV.
Logic:
If(radio== BusinesslegalEntityDIV)
Then show BusinesslegalEntityDIV
Else If(radio== IndividuallegalEntityDIV)
Then show IndividuallegalEntityDIV
<html:radio name="LookUpSearchForm" property="lookByIndOrBusiness"  value="BusinesslegalEntityDIV"    onclick="javascript:showDiv(this.value);">
</html:radio>
<html:radio name="LookUpSearchForm" property="lookByIndOrBusiness"  value="IndividuallegalEntityDIV"  onclick="javascript:showDiv(this.value);">
</html:radio> 
<div style="display: none"  id="IndividuallegalEntityDIV">
        <html:text property="UserlastName" size="33" maxlength="25"/>
</div>
<div style="display: none"  id=" BusinesslegalEntityDIV ">
        <html:text property="BusinessEntityName" size="33" maxlength="25"/>
</div>Validations.xml
<form      name="LookUpSearchForm">
<field property=" UserlastName " depends="validwhen">
<arg key="UserlastName"/>
      <var>
              <var-name>test</var-name>
              <var-value>((lookByIndOrBusiness=="IndividuallegalEntityDIV") and (*this* == null))</var-value>
         </var>
</field>
<field property="businessEntityName" depends="validwhen">  
             <arg key="businessEntityName"/>
                    <var>  
                     <var-name>test</var-name>  
                     <var-value>((lookByIndOrBusiness== "BusinesslegalEntityDIV") and (*this* == null))</var-value>
                     </var>                          
            </field>
</form>If I Selects Radio BusinesslegalEntityDIV then its asks for UserlastName,similarly if I select radio IndividuallegalEntityDIV then its asks for businessEntityName.Which I don’t want.

See
http://htmldb.oracle.com/pls/otn/f?p=24317:219
Put onKeyUp="Check(this)" in the Tabular Form Element attributes box for the COMM field.
Put the following script in the Region header
<script type="text/javascript">
function Check(pComm)
var comm=pComm.value;
var sal=pComm.parentNode.previousSibling.getElementsByTagName('input')[0].value;
if (Number(comm)>Number(sal)) {
  alert('Commission cannot be greater than salary!');
  pComm.focus();
</script>Enter a number like 3000 in the COMM field on the first row, you will get the alert box. Be sure to click OK on the Alert box and not hit Enter. :-)
But I agree 100% with Chris, these kind of data validations need to be enforced on the server as well as the client. If some other front-end is written on the same tables, you don't want to compromise data integrity if that front-end "forgets" to enforce this business rule.
Hope this helps.
Message was edited by:
Vikas

Similar Messages

  • Conditional Validation using Spry

    When are we going to see things like conditional validations in DW using spry?
    I am by no means a developer and enjoy using DW for its simplicity but I have a situation at the moment wherby I need to make a text box required if a checkbox group or radio button group is ticked and on top of this I also need to make another textbox required if any of a number of groups are answered 'yes'
    If anyone has any help they can give me to achieve my goal I would be very grateful.
    Also if anyone from Adobe has an answer to my opening question then that would be great
    Thanks

    blandad1976 wrote:
    When are we going to see things like conditional validations in DW using spry?
    I am by no means a developer and enjoy using DW for its simplicity but I have a situation at the moment wherby I need to make a text box required if a checkbox group or radio button group is ticked and on top of this I also need to make another textbox required if any of a number of groups are answered 'yes'
    If anyone has any help they can give me to achieve my goal I would be very grateful.
    Also if anyone from Adobe has an answer to my opening question then that would be great
    Thanks
    Seek and ye shall find!  See here http://forums.adobe.com/message/2978837#2978837
    Gramps

  • Struts automatic Validator issue

    Hi,
    I am new to struts. I was trying to use the automatic validation for my application. I guess I have followed all the steps mentioned in the help documents from struts. Still I ma getting the following error while starting the JBoss server. Could anyone tell me what could be the reason?
    If I am not wrong, the issue might be with commos-validator.jar or any other jar file? If so please let me know the correct version & the URL to download the same.
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)
    at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:150)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
    at org.apache.catalina.core.StandardContext.init(StandardContext.java:5005)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)
    at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:150)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
    at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeployInternal(TomcatDeployer.java:274)
    at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeploy(TomcatDeployer.java:91)
    at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:357)
    at org.jboss.web.WebModule.startModule(WebModule.java:68)
    at org.jboss.web.WebModule.startService(WebModule.java:46)
    at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:272)
    at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:222)
    at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
    at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:897)
    at $Proxy0.start(Unknown Source)
    at org.jboss.system.ServiceController.start(ServiceController.java:418)
    at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
    at $Proxy28.start(Unknown Source)
    at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:394)
    at org.jboss.deployment.MainDeployer.start(MainDeployer.java:964)
    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:775)
    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:738)
    at sun.reflect.GeneratedMethodAccessor48.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
    at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:121)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
    at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
    at $Proxy8.deploy(Unknown Source)
    at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:325)
    at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:501)
    at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:204)
    at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:277)
    at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:272)
    at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:222)
    at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
    at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:897)
    at $Proxy0.start(Unknown Source)
    at org.jboss.system.ServiceController.start(ServiceController.java:418)
    at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
    at $Proxy4.start(Unknown Source)
    at org.jboss.deployment.SARDeployer.start(SARDeployer.java:273)
    at org.jboss.deployment.MainDeployer.start(MainDeployer.java:964)
    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:775)
    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:738)
    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:722)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
    at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:121)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
    at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
    at $Proxy5.deploy(Unknown Source)
    at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:434)
    at org.jboss.system.server.ServerImpl.start(ServerImpl.java:315)
    at org.jboss.Main.boot(Main.java:195)
    at org.jboss.Main$1.run(Main.java:463)
    at java.lang.Thread.run(Thread.java:595)
    :24,643 INFO [[fs]] Marking servlet action as unavailable
    :24,643 ERROR [[fs]] Servlet /fs threw load() exception
    .servlet.UnavailableException: Cannot load a validator resource from '/org/apache/struts/validator/validator-rules.xml, /WEB-INF/validation.xml'
    at org.apache.struts.validator.ValidatorPlugIn.init(ValidatorPlugIn.java:174)
    at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:839)
    at org.apache.struts.action.ActionServlet.init(ActionServlet.java:332)
    at javax.servlet.GenericServlet.init(GenericServlet.java:211)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1091)
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:925)
    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3857)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4118)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)
    at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:150)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
    at org.apache.catalina.core.StandardContext.init(StandardContext.java:5005)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)
    at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:150)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
    at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeployInternal(TomcatDeployer.java:274)
    at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeploy(TomcatDeployer.java:91)
    at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:357)
    at org.jboss.web.WebModule.startModule(WebModule.java:68)
    at org.jboss.web.WebModule.startService(WebModule.java:46)
    at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:272)
    at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:222)
    at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
    at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:897)
    at $Proxy0.start(Unknown Source)
    at org.jboss.system.ServiceController.start(ServiceController.java:418)
    at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
    at $Proxy28.start(Unknown Source)
    at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:394)
    at org.jboss.deployment.MainDeployer.start(MainDeployer.java:964)
    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:775)
    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:738)
    at sun.reflect.GeneratedMethodAccessor48.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
    at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:121)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
    at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
    at $Proxy8.deploy(Unknown Source)
    at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:325)
    at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:501)
    at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:204)
    at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:277)
    at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:272)
    at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:222)
    at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
    at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:897)
    at $Proxy0.start(Unknown Source)
    at org.jboss.system.ServiceController.start(ServiceController.java:418)
    at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
    at $Proxy4.start(Unknown Source)
    at org.jboss.deployment.SARDeployer.start(SARDeployer.java:273)
    at org.jboss.deployment.MainDeployer.start(MainDeployer.java:964)
    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:775)
    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:738)
    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:722)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
    at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:121)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
    at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
    at $Proxy5.deploy(Unknown Source)
    at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:434)
    at org.jboss.system.server.ServerImpl.start(ServerImpl.java:315)
    at org.jboss.Main.boot(Main.java:195)
    at org.jboss.Main$1.run(Main.java:463)
    at java.lang.Thread.run(Thread.java:595)
    :24,690 INFO [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=file:/D:/HSI/JBoss/jboss-4.0.2/server/default/deploy/jmx-console.war/
    :24,941 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-0.0.0.0-8080
    :25,066 INFO [ChannelSocket] JK: ajp13 listening on /0.0.0.0:8009
    :25,082 INFO [JkMain] Jk running ID=0 time=0/32 config=null
    :25,082 INFO [Server] JBoss (MX MicroKernel) [4.0.2 (build: CVSTag=JBoss_4_0_2 date=200505022023)] Started in 1m:12s:965ms
    Regards
    prasanth

    You should use the jars provided on the struts framework homepage. A nice tutorial about validation in struts can be find here: http://courses.coreservlets.com/Course-Materials/pdf/struts/09-Struts-Automatic-Validation.pdf
    Check that tutorial to see if you've done everithing well.
    Message was edited by:
    grigo

  • Join condition validation error in owb 10gR2

    Hi friends,
    When I tried to validate the join condition in the mapping im getting the below error like
    an error occurred during expression validation, bad expression return type
    When I googled for the above error, I got the below link mentioning like a bug for that join condition validation problem
    https://forums.oracle.com/thread/717194
    In which it is mentioned like a BugNo: 7417869 for that issue.
    Is there any fix for that bug??
    Thanks in advance.
    Brgds,
    Mini

    Dear Allan,
    Happy to get reply from you and sorry for my late reply as im been stuck with other work
    Like you said, I downloaded the required patch 4898608 for the validation bug in mapping with owb 10.2.0.4. By viewing the readme.txt file of the patch I followed the below steps like
    Set the ORACLE_HOME environment variable to point to the OWB Home
    Add $ORACLE_HOME/OPatch  in the PATH
    Stopped the runtime service using the supplied SQL*PLUS script stop_service.sql as a rep_owner
          OWB_HOME/rtp/sql/stop_service.sql
    After the above three steps I applied the opatch like below in cmd prompt
    C:\orahome\10gR3_1\OPatch>opatch version
    Invoking OPatch 10.2.0.4.9
    OPatch Version: 10.2.0.4.9
    OPatch succeeded.
    C:\OraHome_1\OPatch>opatch apply
    Invoking OPatch 10.2.0.4.9
    Oracle Interim Patch Installer version 10.2.0.4.9
    Copyright (c) 2009, Oracle Corporation.  All rights reserved.
    Oracle Home       : C:\OraHome_1
    Central Inventory : C:\Program Files (x86)\Oracle\Inventory
       from           : n/a
    OPatch version    : 10.2.0.4.9
    OUI version       : 10.2.0.1.0
    OUI location      : C:\OraHome_1\oui
    Log file location : C:\OraHome_1\cfgtoollogs\opatch\opatch2013-06-24_18-14-27PM.
    log
    Patch history file: C:\OraHome_1\cfgtoollogs\opatch\opatch_history.txt
    Failed to load the patch object.  Possible causes are:
      The specified path is not an interim Patch shiphome
      Meta-data files are missing from the patch area
      Patch location = C:\OraHome_1\OPatch
      Details = PatchObject constructor: Input file "C:\OraHome_1\OPatch\etc\config\
    actions" or "C:\OraHome_1\OPatch\etc\config\inventory" does not exist.
    ApplySession failed: PatchObject constructor: Input file "C:\OraHome_1\OPatch\et
    c\config\actions" or "C:\OraHome_1\OPatch\etc\config\inventory" does not exist.
    System intact, OPatch will not attempt to restore the system
    OPatch failed with error code = 73
    C:\OraHome_1\OPatch>
    Im not sure why the above error is occuring, kindly help me with that error.
    Thanks in advance.
    Brgds,
    Mini

  • Conditional Validation using JSLink

    I have a User field and a Choice field in a list.  When the Choice field has the option "A" selected I want the User field to be mandatory.  Validation formulas in lists cannot use User field data types so this is not an option.  Is
    JSLink the way to go?  If so how would I implement conditional validation?  I can find examples of simple regex validation but nothing that helps to do conditional validation.
    Caroline

    Hi,
    According to your post, my understanding is that you want to set the User field automatically when the Choice field select a value.
    We can use jQuery to achieve it. Using jQuery .Change() method to monitor the choice, then set the value for the User field.
    The following articles for your reference:
    http://runnable.com/Ue9c4krQF7VjAAAP/how-to-get-selected-option-using-jquery
    http://jasonscript.wordpress.com/2013/08/07/javascript-and-working-with-the-sharepoint-2013-people-picker/
    Thanks,
    Dennis Guo
    TechNet Community Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Dennis Guo
    TechNet Community Support

  • Conditional validation for drop down list

    Hi all,
    I have been working on getting the conditional validation for drop down list to work but no luck. Here is my situation. I have a page with 'time' and 'source' drop down which contains a list of values along with null value. I have two buttons 'save' and 'close'. when a User clicks on 'Save' button, no checking should occur and the values filled in the form should be stored into the database. When a user clicks on 'Close' button, validation should occur and messages should be displayed saying 'values should be filled' . After the user fills each drop down list and hits close button, changes should be saved to the database. I used the technique posted by Jayashri and wrote the validation code in 'Close button action method'
    Here is my code
    public String btnClose_action() {
    // TODO: Replace with your code
    try {
    if (ddlTime.getSelected() == null || ddlTime.getSelected().equals("")) {
    FacesMessage message3 = new FacesMessage("Please select a value");
    message3.setSeverity(FacesMessage.SEVERITY_ERROR);
    getFacesContext().addMessage(ddlTime.getClientId(getFacesContext()), message3);
    return null;
    if (ddlSourceReq.getSelected() == null || ddlSourceReq.getSelected().equals("")) {
    FacesMessage message4 = new FacesMessage("Please select a value");
    message4.setSeverity(FacesMessage.SEVERITY_ERROR);
    getFacesContext().addMessage(ddlSourceReq.getClientId(getFacesContext()), message4);
    return null;
    sendMail("close");
    } catch (Exception ex) {
    return null;
    public String btnSave_action() {
    // TODO: Process the button click action. Return value is a navigation
    // case name where null will return to the same page.
    sendMail("save");
    return null;
    I did not set the 'required' property of both the drop downs and I dont have any message components in the page. How do I get this to work. Please help.
    Thanks,
    S

    Hi,
    Try this
    HTP.p('
    function validate_form_fields()
    var validation = true;
    if (document.forms[0].fld_1.options[document.forms[0].fld_1.selectedIndex] == null )
    validation = false;
    alert("Selection of FLD1 is mandatory.");
    if (document.forms[0].fld_2.options[document.forms[0].fld_2.selectedIndex] == null )
    validation = false;
    alert("Selection of FLD 2 is mandatory.");
    return validation;
    ');If the above does not work, it could be the definition of the your fld_1 select - options. Looks like they allow null values, and if null is not the first option then selectIndex = 0 will be a not null option by default.
    Moreover, the below has redundant condition as ==0 and &lt; 1 amount to the same thing. selectIndex cannot be negative.
    if ((document.forms[0].fld_1.selectedIndex == 0 ) || (document.forms[0].fld_1.selectedIndex < 1 ))Regards,

  • Struts 2 validation for HTML tags

    Hi,
    I am doing Struts2 validation with validation.xml for HTML tags. Here i am doing a binding between a form (bean) and the respective field in JSP and validation.xml. The validation error messages are populated without any problem but the value entered in the respective text field for HTML tags is not persisted. This problem does not occur if you use Struts 2 tags in JSP. Here is a snippet of what i am doing:-
    JSP:-
    <input:text name="accountForm.firstName" size="12" maxlength="20" />
    Action:-
    class AccountAction {
    private AccountForm accountForm;
    public void setAccountForm (AccountForm accountForm) {
    this. accountForm = accountForm;
    public String insertAccount () throws ApplicationException {
    // To get the account details from the JSP
    String first Name = accountForm.getFirstName ();
    action-validation.xml:-
    <validators>
    <field name="accountBean.firstName">
    <field-validator type="requiredstring">
    <param name="trim">true</param>
    <message> First Name is required.</message>
    </field-validator>
    </field>
    <validators>
    Whether it is possible to persist the value with HTML tags with Struts 2 validation? or i need to go with Struts 2 tags in JSP. Please shed some light in to it.
    Thanks,
    JavaCrazyLover

    FYI
    I am using spring framework with struts2 UI
    ..pls
    do the needful..
    Thanks in advance
    -Satish

  • Mass change Condition valid to dates into Info record

    Hi,
    is there any mass changes for condition validity to dates into purchase info record?????
    i have check into MEMASSIN, there is field for conditions valid to Date,
    Pl. guide .
    Regards,
    Devendra

    Hi,
    It is not possible to  change validity date using MEMASSIN - Mass Maintenance t code.
    You need to create LSMW with recording method to achieve this. we are doing the same.
    It is very easy. And take care that while recording select the validity button and click executive to record the do not double click on the validity tab.
    Reg

  • MM rebate condition validity

    Hi,
    I have the scenario whereby a vendor give a rebate, for a selected period.  within that perios they may grant additional rebate  ie agreement over 1 year - but for august they give higher rebate value.  how can i set this up ?  Im using A002 condition but i cant enter condition validity periods.
    any help appreciated.  No vague answers please.
    cheers
    Graham

    Amy,
    Do you mean to say, you can see the rebate conditions in the item conditions of the invoice before it was released to accounting  and after releasing to accounting they disappeared from the item conditions ?
      I'm sure it shouldn't happen. If it disappears it should disappear irrespective of the release to accounting.
    Analyze the pricing at the item condition level why the rebate conditions doesn't show up.
    If it didn't' work please let me understand your problem..
    Regards,
    Aj.

  • ME47 price = 0 in overview when condition valid in future

    Hi Expert,
    I have a quotation with item 10 and 20 with the same material. When I update item 10 price with 1 and item 20 price with 2, the item 20 price will change to zero and gray. The info record also can not see any update in item 20. infoUpdate is "C".
    Item
    Material #
    Price
    Date from
    Date to
    10
    A
    1
    2015/5/5
    2015/5/6
    20
    A
    2
    2015/5/7
    2015/5/31
    I also checked below notes are implement in my system.
    586030 - ME47: price = 0 in overview when condition valid in future
    360746 - ME47: Update conditions in the info record
    428245 - ME47: Maintaining conditions, SAPSQL_ARRAY_INSERT_DUPREC
    Thanks,
    Leon

    You system is behaving correctly.
    You can see the net price = 0 at overview level, but you can see the original price at details condition level.
    You second line item's condition record is not valid for today's date, that's because it is showing 0 for overview screen. I hope your RFQ document date = 05.05.2015.
    For first line item, your condition record has validity = 05.05.2015 to 06.05.2015. (which is valid for today's date)
    For second line item, your condition record has validity = 07.05.2015 to 31.05.2015 (which is not valid for today's date)
    Change the valid from of the second line item = 05.05.2015, then you can see the price at overview screen.

  • Struts and validation question ?

    hi,
    i am using the struts framework for my application, i have a simple jsp logon page (username, password)
    i have defined a validtion.xml file
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <!DOCTYPE form-validation PUBLIC
              "-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.0//EN"
              "http://jakarta.apache.org/commons/dtds/validator_1_0.dtd">
    <!--
        Validation Rules for the Struts Example Web Application
        $Id: validation.xml,v 1.8 2003/05/25 22:51:20 dgraham Exp $
    -->
    <form-validation>
        <!-- ========== Default Language Form Definitions ===================== -->
        <formset>
            <form name="logonForm">
                <field property="username"
                        depends="required, minlength,maxlength">
                    <arg0   key="prompt.username"/>
                    <arg1   key="${var:minlength}" name="minlength"
                       resource="false"/>
                    <arg2   key="${var:maxlength}" name="maxlength"
                       resource="false"/>
                    <var>
                        <var-name>maxlength</var-name>
                        <var-value>16</var-value>
                    </var>
                    <var>
                        <var-name>minlength</var-name>
                        <var-value>3</var-value>
                    </var>
                </field>
                <field property="password"
                        depends="required, minlength,maxlength">
                    <arg0   key="prompt.password"/>
                    <arg1   key="${var:minlength}" name="minlength"
                       resource="false"/>
                    <arg2   key="${var:maxlength}" name="maxlength"
                       resource="false"/>
                    <var>
                        <var-name>maxlength</var-name>
                        <var-value>16</var-value>
                    </var>
                    <var>
                        <var-name>minlength</var-name>
                        <var-value>3</var-value>
                    </var>
                </field>
            </form>
            <form name="registrationForm">
                <field property="fromAddress"
                        depends="required,email">
                    <arg0   key="prompt.fromAddress"/>
                </field>
                <field property="fullName"
                        depends="required">
                  <arg0     key="prompt.fullName"/>
                </field>
                <field property="replyToAddress"
                        depends="email">
                    <arg0   key="prompt.replyToAddress"/>
                </field>
                <field property="username"
                        depends="required">
                  <arg0     key="prompt.username"/>
                </field>
            </form>
        </formset>
    </form-validation>i have also the validation-rules.xml file provided by the struts lib.
    i would like to force the content of 'username' property to be alphabetic.
    i guess i have to create my own element
    <validator name="alphabeticString"...> inside the validation-rules.xml file, but i am newbie in javascript programming.
    i have tree question.
    1) why the validation code inside the validator element is written in javascript since it's not going to be executed at client side???
    2)can i use java instead ? (to code teh validation ...)
    3)has anyone got a code to solve this problem ?
    thanks for your help

    i would like to force the content of 'username' property to be alphabetic.
    i guess i have to create my own element
    <validator name="alphabeticString"...> inside the validation-rules.xml file,
    but i am newbie in javascript programming.Not for something that simple... there's a validator rule called mask, which takes a regular expression as an argument, so if you want only a-z: "[a-zA-Z]*" should work.
    1) why the validation code inside the validator element is written in javascript since it's not going to be executed at client side???It is validated on the client, or can be. You have to include the javascript with the html:javascript tag library tag and specify the form name. Then you need to put the onsubmit="return validateFormName();" attribute in the form tag. If JS isn't supported, it'll still default back to the server side validation.
    2)can i use java instead ? (to code teh validation ...)Don't include the JS stuff.

  • Use of application Item with conditional validation

    Apex 3.2
    On a form, I have two lists :
    - Items TYPE contains A B C and D.
    - Item MANAGEMENT contains NULL, 1, 2 and 3.
    I want to validate that MANAGEMENT is not null only when the value in TYPE are A, B or C.
    I am using the condition "Value of Item in Expression 1 Is Contained within Colon Delimited List in Expression 2"
    I dont want to hard code these values (A B C) so I put them in an Application Item (I also need them somewhere else).
    If I use my application Item in the condition, the validation is not performed (I dont see it listed in debug mode.). If I use the real values (A B C), its working.
    Here's what I put in the Exp2 when using the application item :
    F126_CONST_BUSINESS_CASE:F126_CONST_PROJ_NON_PLANIFIE:F126_CONST_PROJ_PLANIFIE
    I also tried with the form v('F126_CONST_BUSINESS_CASE'): ...
    Any Idea ?
    Thanks in advance.

    Hi Amelie,
    You should consider centralizing your validations inside a package. It will make your code much more readable. In many cases, you won't have to modify your application to modify a validation.
    If your validations are required across different pages, consider having a main package or build package a package for each module (page or page groups).
    The following condition for a validation is easier to understand than "Value of Item in Expression 1 Is Contained within Colon Delimited List in Expression 2".
    Condition Type PL/SQL Expression:
    p1_valdt_pkg.is_item_mangm_mandt(:P1_ITEM_TYPE,:P1_ITEM_MANAGEMENT)
    create or replace function is_item_mangm_mandt (pva_item_type in varchar2,
    pva_item_mangm in varchar2)
    return boolean is
    vbo_valdt boolean default true;
    vva_const_business_case varchar2 (30) default v ('F126_CONST_BUSINESS_CASE');
    vva_const_proj_non_planifie varchar2 (30) default v ('F126_CONST_PROJ_NON_PLANIFIE');
    vva_const_proj_planifie varchar2 (30) default v ('F126_CONST_PROJ_PLANIFIE');
    begin
    if pva_item_mangm is null
    and pva_item_type in (vva_const_business_case, vva_const_proj_non_planifie, vva_const_proj_planifie) then
    vbo_valdt := false;
    end if;
    return vbo_valdt;
    exception
    when others then
    return false;
    end;
    Louis-Guillaume Carrier-Bédard
    My Blog: http://www.lgcarrier.com
    Twitter: http://www.twitter.com/lgcarrier
    APEX Québec: http://www.apexquebec.com
    APEXFramework: http://www.apexframework.com

  • Purchase Info record conditions Validity Period

    Hi,
    In the Inforecord ME12/ME13 the conditions are displayed with validity period which are shown in ascending order.
    Example
    23.10.2008 to 31.10.2008
    01.11.2008 to 30.06.2009
    01.07.2009 to 31.10.2009
    01.11.2009 to 31.12.9999
    The required display or change is in the decending order in Inforecord Conditions
    01.11.2009 to 31.12.9999
    01.07.2009 to 31.10.2009
    01.11.2008 to 30.06.2009
    23.10.2008 to 31.10.2008
    What are the setting required to get the output as above in the decending order?
    Regards,
    Vengat

    Hi,
    SAP  Standard for the infor record is the Ascending Order
    The old validity period will be displayed and in the end the  latest validity period is displayed
    Go to the  program  SAPMM06I
    with the help of ABAP Technical just check whether it is possible to change
    I think it is not possible .
    Please check
    Regards
    Ganesh

  • Trans ME31K:Defaulting item condition validity to contract validity date

    Hello Experts,
    I have a request from my client which is as follows :
    On transaction ME31K (Create Contract), at header I can enter a start date and an end date for the validity of my contract.
    Program name : SAPMM06E
    FIELD-NAMES : EKKO-KDATB & EKKO-KDATE
    The users want the same date range to appear at item level for the conditions :
    Select a new created Item > Conditions.
    Program name :SAPMV13A
    FIELD NAMES : RV13A-DATAB & RV13A-DATBI
    Because, the transaction is changing the program name, it is very difficult for us to replicate the dates at the item's condition level.
    Can you please suggest any idea to implement this solution ?
    Thanks & Regards,
    Mahesh
    Edited by: Maheshsingh Sharma Jhoomuck on Oct 5, 2009 4:52 PM
    Edited by: Maheshsingh Sharma Jhoomuck on Oct 5, 2009 4:53 PM

    Hi raghavendra sai !
    Thanks for the answer.
    But actually, my client wants  'from date' of the items conditions to be defaulted to the date that he indicated on the contract's validity date at header (from date - EKKO-KDATB).
    A contract can be created with a validity interval that starts from a past date.

  • Client side validation in struts using validation framework

    Hi ,
    am new to struts.....
    I want to validate a simple login page using struts validation framework...
    For that i created,
    login.jsp ( contains html:errors and html:javascript and onsubmit)
    LoginForm extends ValidatorForm
    LoginAction
    resource bundles
    validation.xml ( required, minlength and maxlength rules for both fields)
    struts-config.xml ( configured action mapping and form beans)
    whats my problem is....
    i will get error messages through server side validation...
    i cant able to get the error messages using javascript i.e alert messages.
    i seen the page resource in that all javascript functins are inserted.
    on seeing the javascript error console... it shows
    formName has no properties...............
    exactly at this line
    oRequired = eval('new ' + formName.value + '_required()'); //function validateRequired(form)

    Thanks for your valuable reply.....
    Ya of course what you said was correct....
    I got error messages while submitting the form without any value....
    error messages are displayed using the <html:errors/> tag (server side validation ).
    But it fails to show the alert messages for those errors ( client side validation).
    i inserted the <html:javascript formName="form bean name" /> tag in the bottom of my login jsp.....
    on seeing the error console, it shows formName has no properties.
    Could anybody help me to sort out this problem........

Maybe you are looking for

  • PDF Import error "doesn't contain a 'Art' crop type"

    I am creating Proceedings for a conference that consists of research papers. Most of these papers are exported to PDF from some flavor or LaTeX. I need to import these PDFs into InDesign. Most of the time, this works fine, but this particular batch o

  • 7.0.2 quits when ipod plugged in....???

    I just purchased a new shuffle, since my old one died a quick death. Upon mounting it, it forced me to download the new 7.0.2 version of itunes. I did. Now, when I open itunes, it prompts me EVERY TIME to agree with the licensing agreement AND the en

  • Help plz cause our prof won't help us

    ok, due to the fact that our professor Java feels himself way to god to give us (my class and I) an answer I post it here. //It's in Dutch but you should figure it out. class Kaart private final String[] color = {"zwarte","witte"}; private final Stri

  • Should I update my 2007 Macbook to Lion?

    I have an old MacBook, specs here: 2.16 GHz Intel Core 2 Duo, 1 GB 667 MHz DDR2 SDRAM I really want to update to iCloud, but need to update to Lion first if I am going to do that. Will my computer slow down significantly? I have seen messages indicat

  • Why i can't enter into the Apple net

    What  happen about  the Apple net? I can't enter into it now.