Migrating Struts/ADF 10.1.2 = 10.1.3, model validation not called

As said in thread
reportErrors(PageLifecycleContext ctx) not called
Old Struts 10.1.2 can remain as is and will work in JDev 10.1.3.
For some unexplained reason in my new account registration action, the entity validation method doesn't get called after migration?
This jsp and action are similar to the toyStore new account creation,
10.1.3 trace extract:
as you see prepareToCreateNewAccount
06/07/08 20:20:38 com.photoswing.webview.actions.AccountRegisterAction.prepareModel webAccountAM call to prepareToCreateNewAccount
06/07/08 20:20:38 com.photoswing.model.site.AccountInSiteImpl.create BEGIN
06/07/08 20:20:38 com.photoswing.webview.actions.AccountRegisterAction.prepareModel END
06/07/08 20:20:38 com.photoswing.webview.actions.AccountRegisterAction.processUpdateModel BEGIN
06/07/08 20:20:38 com.photoswing.webview.actions.AccountRegisterAction.processUpdateModel actionForm: oracle.adf.controller.v2.struts.forms.BindingContainerActionForm
06/07/08 20:20:38 com.photoswing.webview.actions.AccountRegisterAction.processUpdateModel curLogin:
06/07/08 20:20:38 com.photoswing.webview.actions.AccountRegisterAction.validateModelUpdates BEGIN skipCycle: false
06/07/08 20:20:38 com.photoswing.webview.actions.AccountRegisterAction.validateModelUpdates mystr: null
06/07/08 20:20:38 com.photoswing.webview.actions.AccountRegisterAction.validateModelUpdates call to super.validateModelUpdates
06/07/08 20:20:38 com.photoswing.webview.actions.AccountRegisterAction.validateModelUpdates after call to super.validateModelUpdates, this.hasErrors(ctx): false
JDev 10.1.2 extract:
06/07/08 20:41:45 com.photoswing.model.site.AccountInSiteImpl.create BEGIN
06/07/08 20:41:45 com.photoswing.webview.actions.AccountRegisterAction.prepareModel END
06/07/08 20:41:45 com.photoswing.webview.actions.AccountRegisterAction.processUpdateModel actionForm: oracle.adf.controller.struts.forms.BindingContainerActionForm
06/07/08 20:41:45 com.photoswing.webview.actions.AccountRegisterAction.processUpdateModel curLogin:
06/07/08 20:41:45 com.photoswing.webview.actions.AccountRegisterAction.validateModelUpdates BEGIN skipCycle: false
06/07/08 20:41:45 com.photoswing.webview.actions.AccountRegisterAction.validateModelUpdates mystr: null
06/07/08 20:41:45 com.photoswing.webview.actions.AccountRegisterAction.validateModelUpdates call to super.validateModelUpdates
06/07/08 20:41:45 com.photoswing.model.site.AccountInSiteImpl.validateEntity BEGIN
etc ...
Thank you for giving me a clue.
Fred

I traced my program, the action form has all the pending values entered in the jsp page but the View Row isn't updated?
extract of pending values:
06/07/09 12:05:47 com.photoswing.webview.actions.AccountRegisterAction.processUpdateModel actionForm, key: Email, value: [email protected]
06/07/09 12:05:47 com.photoswing.webview.actions.AccountRegisterAction.processUpdateModel actionForm, key: FirstNameLatin, value: aaaxxx
For your info:
Service update 4 was installed.
The navigation event to the review page is not a commit action.
My trace shows that:
-my prepareToCreateNewAccount is called when the jsp is first accessed (no event handling)
- after activating next button:
- no new call to prepareToCreateNewAccount => ok
- processUpdateModel is called
- the ActionForm gets filled => ok
- validateModelUpdates is called
but VO row (based on one Entity) and Entity set and validation methods are not called?
My page def has only one iterator?
Question when and where does the framework copy ActionForm values to underlying VO?
I noticed that there were new ActionForm classes:
oracle.adf.controller.v2.struts.forms.BindingContainerActionForm
Do they work with
<set-property property="v1ActionClass"
value="com.photoswing.webview.actions.AccountRegisterAction"/>
I need a clue!
I'm lost!
Regards
Fred

Similar Messages

  • Struts/ADF/Toplink conversion from 10.1.2 to 10.1.3

    Hi. We have a J2EE application based on Struts/ADF/Toplink.
    We just let the JDeveloper migrate the whole application itself.
    We solved a few minor problems, but now we have the greater one:
    - we have in domain classes some getX...(), setX...() methods, intended for example
    for getting attributes of nested objects or for conversion from String to Date.
    In older version, when you had some getXSomeAtr() method in domain class, the attribute
    XSomeAttr was automatically generated into Data Control.
    In newer version it's not! If you want the attribute to be in data control, you must
    have an private attribute XSomeAtr declared in domain class.
    Example - we have these attibutes (first two has their own getters and setters and are
    mapped in toplink, the third is unmapped)
         private Date datum;
    private String nazev;
    private String XDatumAsDate;
    and methods
    public String getXDatumAsDate() {
    return OurUtils.dateToStringAsDate(getDatum());
    public void setXDatumAsDate(String datum) throws ParseException{
    Date d = OurUtils.StringToDateAsDate(datum);
    setDatum(d);
    And the form look like this
    <html:text property="XDatumAsDate" .../>
    <html:text property="nazev"     .../>
    Reading is ok, but attempt to modify date in input field ends with
    "JBO-35009: Setting attribute for XDatumAsDate in object methodRSICollection failed"
    Are we doing something wrong ? We just need to have the date entering under our control and
    be able to enter dates in various formats.
    Thanks in advance for any comments.

    I compared the both old and new data control xml files and found the difference. The previous attribute descriptor has IsUpdateable="true" but the new has IsUpdateable="0".
    Manually changing won't help - data control generation of any class regenerates all data controls and puts back IsUpdateable="0". I'm stuck now.

  • Migration of  ADF 10g application to ADF 11g(Portlet Customization Error)

    Hi,
    Currently we are doing a migration of ADF/Webcenter 10g appication to 11g(11.1.1.6) and in the current 10g application portlet is used which contains the file based content and can be customized using a specific role say(admin).
    We have almost done the migration using the Jdeveloper 11.1.1.6 and most of the pages along with the portlet content are coming similar to the 10g look and feel but whenever we want to do portlet customization using the specific role we are getting the below exception. The content is file based system and the details of the versions are as below
    10g Environment:
    OC4J version. Oracle Containers for J2EE 10g (10.1.3.5.0)
    JDK version- java version "1.5.0_06"
    Webcenter and it’s version : Webcenter 10g(10.1.3.5.0)
    ADF version. Oracle ADF 10g
    Jdeveloper 10.1.3.3.0
    11g Environment: Currently I am using Jdeveloper 11.1.1.6 with Integrated weblogic server
    webcenter extension used: oracle.webcenter.framework_bundle/oracle.webcenter.customization_bundle
    Error which I am getting during portlet customization:
    [2013-02-20T14:47:42.162+05:30] [DefaultServer] [ERROR] [] [oracle.portlet.binding] [tid: [ACTIVE].ExecuteThread: '14' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: portaladmin] [ecid: 39e706a46ad531be:31f43ddc:13cf6ad5231:-8000-0000000000000386,0] [APP:TEST_DEV#V2.0] An error has occured for Portlet Binding portlet3.[[
    java.lang.NullPointerException
    at oracle.adfinternal.model.portlet.binding.PortletModelImpl.getRequireIframe(PortletModelImpl.java:907)
    at oracle.adfinternal.model.portlet.binding.ActivityPortletModelWrapper.getRequireIframe(ActivityPortletModelWrapper.java:71)
    at oracle.adf.model.portlet.binding.PortletBinding.prepareRenderPhase(PortletBinding.java:455)
    at oracle.adf.model.portlet.binding.PortletBinding._refresh(PortletBinding.java:377)
    at oracle.adf.model.portlet.binding.PortletBinding.refresh(PortletBinding.java:969)
    at oracle.adf.model.binding.DCBindingContainer.internalRefreshControl(DCBindingContainer.java:3273)
    at oracle.adf.model.binding.DCBindingContainer.refresh(DCBindingContainer.java:2876)
    at oracle.adf.controller.v2.lifecycle.PageLifecycleImpl.prepareRender(PageLifecycleImpl.java:561)
    at oracle.adf.controller.faces.lifecycle.FacesPageLifecycle.prepareRender(FacesPageLifecycle.java:82)
    at oracle.adf.controller.v2.lifecycle.Lifecycle$9.execute(Lifecycle.java:224)
    at oracle.adfinternal.controller.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:197)
    at oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener.access$1000(ADFPhaseListener.java:23)
    at oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener$5.before(ADFPhaseListener.java:402)
    at oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener.beforePhase(ADFPhaseListener.java:64)
    at oracle.adfinternal.controller.faces.lifecycle.ADFLifecyclePhaseListener.beforePhase(ADFLifecyclePhaseListener.java:44)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:352)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:222)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
    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.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
    at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
    at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.portlet.client.adapter.adf.ADFPortletFilter.doFilter(ADFPortletFilter.java:32)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.webcenter.framework.events.dispatcher.EventDispatcherFilter.doFilter(EventDispatcherFilter.java:44)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.wcps.client.PersonalizationFilter.doFilter(PersonalizationFilter.java:75)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.webcenter.content.integration.servlets.ContentServletFilter.doFilter(ContentServletFilter.java:168)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:179)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.webcenter.lifecycle.filter.LifecycleLockFilter.doFilter(LifecycleLockFilter.java:151)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
    at java.security.AccessController.doPrivileged(Native Method)
    at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
    at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
    at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
    at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
    at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    Any hellp or suggestion will be helpful for me to resolve this issue.
    Thanks in Advance
    Chetan

    Hi,
    given its a WebCenter question, you want to post it to the Webcenter forum: WebCenter Portal
    Frank

  • 10g Struts/ADF: Problem with updating a DataAction

    We have a web application (JSP/Struts/ADF) that we developed using the 10g (build 1542) Struts Page Flow designer. It is a great tool for building the application the first time but when we go to change something, DataActions end up being ignored when the application is run.
    Here is the scenario:
    We have SQL-based VOs which require a paramter at run-time. We use a Struts DataAction to bind the VO SQL query through a custom method in the App Module (AM). This works fine the first time that we create it and run it.
    The problem comes when we want to change the custom method (which was already associated with a DataAction) in the AM and then rebuild and run the app, it looks like the DataAction is not there and we get an error on the DataPage (that the DataAction forwards to) which says that "not all variables bound". We have printlns in the custom method so we know when it is accessed and in the scenario that I pose here, the custom method is not called.
    This has also occurred when we had a DataPage forward to another DataPage and then later we added a DataAction in between. The application continued to forward from the DataPage to the DataPage completely ignoring the DataAction that we added and that can be seen on the Struts diagram.
    The only way that we have been able to work around this issue is to delete the Data Action and the DataPage from the struts diagram and then recreate them under a different name. This seems like it is a bug and I wonder if anyone else has experienced this?
    Is this a known bug which will be fixed in the production release?
    Thanks, Les

    This seems to be related to Bug# 3537056.
    Please contact Worldwide Support and register that you are running into this bug. Unfortunately, the bug doesn't list a workaround at present.
    Once you have correctly set SelectMethod=Cursor and passed the -Djbo.sql92.locktrailer=null runtime parameter to avoid using the FOR UPDATE clause, you hit an issue when the UPDATE statement is issued that our developers are looking into.

  • Struts/ADF Iterator problem - how to prevent iterator from executing?

    HI
    I've a problem with a iterator which I would like NOT to execute before I order it! This is a basic Struts/ADF app developed in JDeveloper 9052 and I really don't understand why this iterator is executed!
    My binding definition file for the page contains 2 iterators, let say iterator A and B. Each iterator is bound to a different viewobject. Viewobject bound to iterator A i straightforward, but viewobject bound to iterator B has 3 bind variables - and then I don't want iterator B to execute before i have specified values for those, but I can't hold it back!
    The bindingcontainer is forced into FindMode to prevent any iterator to execute in the first place - then I thought that I would be completely in control. This works fine, until I need to execute iterator A without executing B or any other iterator. I've overridden the prepareModel() method, to accomplish this:
    protected void prepareModel(DataActionContext ctx) throws Exception {
    DCBindingContainer con = ctx.getBindingContainer();
    JUCtrlActionBinding action = (JUCtrlActionBinding)con.findCtrlBinding("ExecuteA");
    action.invoke();
    But, executing iterator A this way, also automatically executes iterator B somehow, which causes a classic JBO-27122 (not all variable bound...). If I remove the code for manually executing iterator A, I get no error, because no iterator is fired at all then. But how do I only execute one iterator in the binding container???
    To demonstrate, my JSP page only has this content:
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
    <html:errors/>
    Regards
    Jacob

    I don't think you can stop that.
    What I usually do to prevent result show up is to add additional condition with bind variable to programmatically make it selecting no row. vo is something like
    select aField
    from someTable
    where .....
    and :toSearch = 'Y'
    the bind variable :toSearch will be default to 'N'

  • Database Constraint Error Handling on create/edit (Struts ADF)

    Hi,
    In our project we use Struts ADF (JDeveloper 10.1.3) technology. And we're facing the following trouble with it.
    If we try to create a record that violates say Unique constraint in the database, then during commit procedure of the AppModule's Transaction an exception occurs.
    We handle this exception with our extension of DCErrorHandlerImpl. And we have to do the rollback action because the Transaction became invalid and we cannot do the commit since there was an error.
    But unfortunately appModule.getTransaction().rollback(); forces ViewObj to loose all of the newly created rows. Because of this, after pressing submit with the same (violating) data once more our edit form shows the first row in a rowset.
    Are there any ideas about what we may be doing wrong?
    Any standard approaches on database constraint error handling?
    The "before/after commit/rollback" approach is very effort-consuming because we have a lot of views in our app and tracking all of them may become a nightmare in future.
    Thanks in advance.
    Regards,
    Larry

    Hi Steve!
    I'm using Postgree.
    Here is StackTrace
    06/06/27 09:52:24 Commit
    oracle.jbo.DMLException: JBO-26041: Failed to post data to database during "Insert": SQL Statement "INSERT INTO public.test_tb(id,name,org_code) VALUES (?,?,?)".
         at oracle.jbo.server.BaseSQLBuilderImpl.doEntityDML(BaseSQLBuilderImpl.java:481)
         at oracle.jbo.server.EntityImpl.doDML(EntityImpl.java:5731)
         at com.yukon.adf.postgre.entities.PostgreEntityImpl.doDML(PostgreEntityImpl.java:22)
         at com.yukon.adf.postgre.entities.PostgreSequenceEntityImpl.doDML(PostgreSequenceEntityImpl.java:58)
         at oracle.jbo.server.EntityImpl.postChanges(EntityImpl.java:4531)
         at oracle.jbo.server.DBTransactionImpl.doPostTransactionListeners(DBTransactionImpl.java:2993)
         at oracle.jbo.server.DBTransactionImpl.postChanges(DBTransactionImpl.java:2804)
         at oracle.jbo.server.DBTransactionImpl.commitInternal(DBTransactionImpl.java:1968)
         at oracle.jbo.server.DBTransactionImpl.commit(DBTransactionImpl.java:2170)
         at view.actions.ListTestPageController.onCommit(ListTestPageController.java:32)
         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 oracle.adf.controller.v2.lifecycle.PageController.invokeEventMethod(PageController.java:110)
         at oracle.adf.controller.v2.lifecycle.PageLifecycleImpl.handleEvent(PageLifecycleImpl.java:950)
         at oracle.adf.controller.v2.struts.lifecycle.StrutsPageLifecycle.handleEvent(StrutsPageLifecycle.java:238)
         at oracle.adf.controller.v2.lifecycle.PageLifecycleImpl.processComponentEvents(PageLifecycleImpl.java:322)
         at oracle.adf.controller.v2.lifecycle.PageController.processComponentEvents(PageController.java:54)
         at oracle.adf.controller.v2.lifecycle.Lifecycle$3.execute(Lifecycle.java:275)
         at oracle.adf.controller.v2.lifecycle.Lifecycle.executePhase(Lifecycle.java:116)
         at oracle.adf.controller.v2.lifecycle.LifecycleProcessor.execute(LifecycleProcessor.java:100)
         at oracle.adf.controller.v2.struts.actions.DataAction.execute(DataAction.java:123)
         at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1485)
         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:527)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:332)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:629)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:376)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:870)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451)
         at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:218)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:119)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:230)
         at oracle.oc4j.network.ServerSocketAcceptHandler.access$800(ServerSocketAcceptHandler.java:33)
         at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:831)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    ## Detail 0 ##
    java.sql.SQLException: ERROR: current transaction is aborted, commands ignored until end of transaction block
         at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1471)
         at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1256)
         at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:175)
         at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:389)
         at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:330)
         at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:282)
         at oracle.jbo.server.BaseSQLBuilderImpl.doEntityDML(BaseSQLBuilderImpl.java:352)
         at oracle.jbo.server.EntityImpl.doDML(EntityImpl.java:5731)
         at com.yukon.adf.postgre.entities.PostgreEntityImpl.doDML(PostgreEntityImpl.java:22)
         at com.yukon.adf.postgre.entities.PostgreSequenceEntityImpl.doDML(PostgreSequenceEntityImpl.java:58)
         at oracle.jbo.server.EntityImpl.postChanges(EntityImpl.java:4531)
         at oracle.jbo.server.DBTransactionImpl.doPostTransactionListeners(DBTransactionImpl.java:2993)
         at oracle.jbo.server.DBTransactionImpl.postChanges(DBTransactionImpl.java:2804)
         at oracle.jbo.server.DBTransactionImpl.commitInternal(DBTransactionImpl.java:1968)
         at oracle.jbo.server.DBTransactionImpl.commit(DBTransactionImpl.java:2170)
         at view.actions.ListTestPageController.onCommit(ListTestPageController.java:32)
         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 oracle.adf.controller.v2.lifecycle.PageController.invokeEventMethod(PageController.java:110)
         at oracle.adf.controller.v2.lifecycle.PageLifecycleImpl.handleEvent(PageLifecycleImpl.java:950)
         at oracle.adf.controller.v2.struts.lifecycle.StrutsPageLifecycle.handleEvent(StrutsPageLifecycle.java:238)
         at oracle.adf.controller.v2.lifecycle.PageLifecycleImpl.processComponentEvents(PageLifecycleImpl.java:322)
         at oracle.adf.controller.v2.lifecycle.PageController.processComponentEvents(PageController.java:54)
         at oracle.adf.controller.v2.lifecycle.Lifecycle$3.execute(Lifecycle.java:275)
         at oracle.adf.controller.v2.lifecycle.Lifecycle.executePhase(Lifecycle.java:116)
         at oracle.adf.controller.v2.lifecycle.LifecycleProcessor.execute(LifecycleProcessor.java:100)
         at oracle.adf.controller.v2.struts.actions.DataAction.execute(DataAction.java:123)
         at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1485)
         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:527)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:332)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:629)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:376)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:870)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451)
         at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:218)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:119)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:230)
         at oracle.oc4j.network.ServerSocketAcceptHandler.access$800(ServerSocketAcceptHandler.java:33)
         at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:831)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)

  • UIX, Struts, ADF and JSP

    Hi guys. My manager asked me to spell out these different strategies and I fell quite short of an adequate summary. I was wondering if someone could breifly define the following technologies and perhaps explain why you would use them. Additionally, we are embarking on a new project and are unsure of which technology to base it on (we will create a BC4J layer). It is a web application which may end up serving many anonymous users.
    UIX
    STRUTS
    ADF
    JSP (as used in JDev9.0.3.3 - Create a complete JSP application).
    Thank you in advance for your time and consideration!
    ~Rob Lundeen

    Here is a quick one:
    Oracle ADF - A framework for building J2EE applications. Based on the Model-View-Controller architecture. Offers flexability in choosing implementation for the different layers.
    STRUTS - a popular open source controller for managing the flow of Web applications when using the MVC architecture. Used as the controller for Oracle ADF based applications.
    JSP - One way to build your Web user interfaces or View layer in Oracle ADF.
    UIX - Another way to build the View layer for your application. Provides a set of rich HTML component and built-in functionality. Uses a declarative approach to building the page. Will evolve to become a JSF implementation.
    BC4J - Now renamed to Oracle ADF Business Components - one of the way to implement the data source (or Business services) layer in Oracle ADF applications. Other ways include EJBs, Web Services, TopLink, or simple Javabeans.
    I hope this helps,
    Shay,
    Oracle.

  • Database constraints and Struts ADF

    I have a struts ADF project and wish to pick up unique constraint violations from the database(only the database)
    How and where to i trap these violations

    The toy store demo has two java classes called
    toystoreDBtransactionfactory & toystoreDBtransactionimpl.
    These are used to overide the default functionality of
    DBtransaction and DBtransactionimpl. The configuration
    manager (right click your bc4j application module) allows you to set the database transactionfactory class to the overriden classes. The toystore routines basically capture the databse constraints and reformat the messag einto something more meaningful.
    When i run the bc4j tester the changed routines function correctly for example when doing an insert.
    With a struts jsp program a similar insert doesn't trigger the changed routines so i just get the database error comiing back to the screen.

  • HT4927 When i upgraded from 9.2.3 to 9.3.1 I had migration issues, where most my photos ended up in a restored event called restored photos. But then they don't come up in faces anymore. So can i upgrade to 9.3.2 and then just rebuild my photo library ?

    When i upgraded from 9.2.3 to 9.3.1 I had migration issues, where most my photos ended up in a restored event called restored photos. But then they don't come up in faces anymore. So can i upgrade to 9.3.2 and then just rebuild my photo library ? I want to upgrade to mountain lion. But concered about my photo library. So I restored my whole computer back to an earlier date, becuase I couldn't figure out how to restore just my photo library. Advice?

    Best way is to restore your backup from before the problem, rebuild it and update it again
    LN

  • Struts Validation not working

    As far as I can tell I can't see anything wrong with my validation on struts, but if I put nothing into a required field it doesn't report an error. Any ideas? Below is the offending code:
    First Validation.xml
    <form-validation>
        <formset>
            <form name="User">
                <field property="email"
                        depends="required,email">
                    <arg0 key="user.email"/>
                </field>
            </form>
        </formset>
    </form-validation>Next my struts-config.xml:
    <form-bean name="User" type="org.apache.struts.validator.DynaValidatorForm">
             <form-property name="userName" type="java.lang.String"/>
             <form-property name="password" type="java.lang.String"/>
             <form-property name="firstName" type="java.lang.String"/>
             <form-property name="lastName" type="java.lang.String"/>
             <form-property name="email" type="java.lang.String"/>
    </form-bean>next the jsp code:
    <html:form action="/profile?action=save">
    <html:errors/><BR><BR>
    <tr>
         <td align="left" valign="top"><font face="Arial, Helvetica" size="2">Email:</font></td>
         <td></td>
         <td align="left"><html:text property="email" size="35" maxlength="255" /><br><font size="1"><i>(Your name @ your company web site address)</i></font></td>
    </tr>
    </form>And my Action code:
              else if (action.equals("save")){
                   errors = form.validate(mapping, request);
                   if ((errors == null) || (errors.isEmpty())){
                        //Save Item goes here
                        return (mapping.findForward("Profile"));
                   else {
                        saveErrors(request, errors);
                        return (mapping.findForward("show"));
              }And my validator-rules.xml (it is the default one that comes with struts, but I included it just in case)
    <form-validation>
       <global>
          <validator name="required"
                classname="org.apache.struts.validator.FieldChecks"
                   method="validateRequired"
             methodParams="java.lang.Object,
                           org.apache.commons.validator.ValidatorAction,
                           org.apache.commons.validator.Field,
                           org.apache.struts.action.ActionErrors,
                           javax.servlet.http.HttpServletRequest"
                      msg="errors.required">
             <javascript><![CDATA[
                function validateRequired(form) {
                    var isValid = true;
                    var focusField = null;
                    var i = 0;
                    var fields = new Array();
                    oRequired = new required();
                    for (x in oRequired) {
                         var field = form[oRequired[x][0]];
                        if (field.type == 'text' ||
                            field.type == 'textarea' ||
                            field.type == 'file' ||
                            field.type == 'select-one' ||
                            field.type == 'radio' ||
                            field.type == 'password') {
                            var value = '';
                                  // get field's value
                                  if (field.type == "select-one") {
                                       var si = field.selectedIndex;
                                       if (si >= 0) {
                                            value = field.options[si].value;
                                  } else {
                                       value = field.value;
                            if (trim(value).length == 0) {
                                 if (i == 0) {
                                     focusField = field;
                                 fields[i++] = oRequired[x][1];
                                 isValid = false;
                    if (fields.length > 0) {
                       focusField.focus();
                       alert(fields.join('\n'));
                    return isValid;
                // Trim whitespace from left and right sides of s.
                function trim(s) {
                    return s.replace( /^\s*/, "" ).replace( /\s*$/, "" );
                ]]>
             </javascript>
          </validator>
          <validator name="requiredif"
                     classname="org.apache.struts.validator.FieldChecks"
                     method="validateRequiredIf"
                     methodParams="java.lang.Object,
                                   org.apache.commons.validator.ValidatorAction,
                                   org.apache.commons.validator.Field,
                                   org.apache.struts.action.ActionErrors,
                                   org.apache.commons.validator.Validator,
                                   javax.servlet.http.HttpServletRequest"
                     msg="errors.required">
          </validator>
          <validator name="minlength"
                classname="org.apache.struts.validator.FieldChecks"
                   method="validateMinLength"
             methodParams="java.lang.Object,
                           org.apache.commons.validator.ValidatorAction,
                           org.apache.commons.validator.Field,
                           org.apache.struts.action.ActionErrors,
                           javax.servlet.http.HttpServletRequest"
                  depends=""
                      msg="errors.minlength">
             <javascript><![CDATA[
                function validateMinLength(form) {
                    var isValid = true;
                    var focusField = null;
                    var i = 0;
                    var fields = new Array();
                    oMinLength = new minlength();
                    for (x in oMinLength) {
                        var field = form[oMinLength[x][0]];
                        if (field.type == 'text' ||
                            field.type == 'textarea') {
                            var iMin = parseInt(oMinLength[x][2]("minlength"));
                            if ((trim(field.value).length > 0) && (field.value.length < iMin)) {
                                if (i == 0) {
                                    focusField = field;
                                fields[i++] = oMinLength[x][1];
                                isValid = false;
                    if (fields.length > 0) {
                       focusField.focus();
                       alert(fields.join('\n'));
                    return isValid;
                }]]>
             </javascript>
          </validator>
          <validator name="maxlength"
                classname="org.apache.struts.validator.FieldChecks"
                   method="validateMaxLength"
             methodParams="java.lang.Object,
                           org.apache.commons.validator.ValidatorAction,
                           org.apache.commons.validator.Field,
                           org.apache.struts.action.ActionErrors,
                           javax.servlet.http.HttpServletRequest"
                  depends=""
                      msg="errors.maxlength">
             <javascript><![CDATA[
                function validateMaxLength(form) {
                    var isValid = true;
                    var focusField = null;
                    var i = 0;
                    var fields = new Array();
                    oMaxLength = new maxlength();
                    for (x in oMaxLength) {
                        var field = form[oMaxLength[x][0]];
                        if (field.type == 'text' ||
                            field.type == 'textarea') {
                            var iMax = parseInt(oMaxLength[x][2]("maxlength"));
                            if (field.value.length > iMax) {
                                if (i == 0) {
                                    focusField = field;
                                fields[i++] = oMaxLength[x][1];
                                isValid = false;
                    if (fields.length > 0) {
                       focusField.focus();
                       alert(fields.join('\n'));
                    return isValid;
                }]]>
             </javascript>
          </validator>
          <validator name="mask"
                classname="org.apache.struts.validator.FieldChecks"
                   method="validateMask"
             methodParams="java.lang.Object,
                           org.apache.commons.validator.ValidatorAction,
                           org.apache.commons.validator.Field,
                           org.apache.struts.action.ActionErrors,
                           javax.servlet.http.HttpServletRequest"
                  depends=""
                      msg="errors.invalid">
             <javascript><![CDATA[
                function validateMask(form) {
                    var isValid = true;
                    var focusField = null;
                    var i = 0;
                    var fields = new Array();
                    oMasked = new mask();
                    for (x in oMasked) {
                        var field = form[oMasked[x][0]];
                        if ((field.type == 'text' ||
                             field.type == 'textarea') &&
                             (field.value.length > 0)) {
                            if (!matchPattern(field.value, oMasked[x][2]("mask"))) {
                                if (i == 0) {
                                    focusField = field;
                                fields[i++] = oMasked[x][1];
                                isValid = false;
                    if (fields.length > 0) {
                       focusField.focus();
                       alert(fields.join('\n'));
                    return isValid;
                function matchPattern(value, mask) {
                   return mask.exec(value);
                }]]>
             </javascript>
          </validator>
          <validator name="byte"
                classname="org.apache.struts.validator.FieldChecks"
                   method="validateByte"
             methodParams="java.lang.Object,
                           org.apache.commons.validator.ValidatorAction,
                           org.apache.commons.validator.Field,
                           org.apache.struts.action.ActionErrors,
                           javax.servlet.http.HttpServletRequest"
                  depends=""
                      msg="errors.byte"
           jsFunctionName="ByteValidations">
             <javascript><![CDATA[
                function validateByte(form) {
                    var bValid = true;
                    var focusField = null;
                    var i = 0;
                    var fields = new Array();
                    oByte = new ByteValidations();
                    for (x in oByte) {
                         var field = form[oByte[x][0]];
                        if (field.type == 'text' ||
                            field.type == 'textarea' ||
                            field.type == 'select-one' ||
                                  field.type == 'radio') {
                                  var value = '';
                                  // get field's value
                                  if (field.type == "select-one") {
                                       var si = field.selectedIndex;
                                       if (si >= 0) {
                                            value = field.options[si].value;
                                  } else {
                                       value = field.value;
                            if (value.length > 0) {
                                if (!isAllDigits(value)) {
                                    bValid = false;
                                    if (i == 0) {
                                        focusField = field;
                                    fields[i++] = oByte[x][1];
                                } else {
                                     var iValue = parseInt(value);
                                     if (isNaN(iValue) || !(iValue >= -128 && iValue <= 127)) {
                                         if (i == 0) {
                                             focusField = field;
                                         fields[i++] = oByte[x][1];
                                         bValid = false;
                    if (fields.length > 0) {
                       focusField.focus();
                       alert(fields.join('\n'));
                    return bValid;
                }]]>
             </javascript>
          </validator>
          <validator name="short"
                classname="org.apache.struts.validator.FieldChecks"
                   method="validateShort"
             methodParams="java.lang.Object,
                           org.apache.commons.validator.ValidatorAction,
                           org.apache.commons.validator.Field,
                           org.apache.struts.action.ActionErrors,
                           javax.servlet.http.HttpServletRequest"
                  depends=""
                      msg="errors.short"
           jsFunctionName="ShortValidations">
             <javascript><![CDATA[
                function validateShort(form) {
                    var bValid = true;
                    var focusField = null;
                    var i = 0;
                    var fields = new Array();
                    oShort = new ShortValidations();
                    for (x in oShort) {
                         var field = form[oShort[x][0]];
                        if (field.type == 'text' ||
                            field.type == 'textarea' ||
                            field.type == 'select-one' ||
                            field.type == 'radio') {
                            var value = '';
                                  // get field's value
                                  if (field.type == "select-one") {
                                       var si = field.selectedIndex;
                                       if (si >= 0) {
                                            value = field.options[si].value;
                                  } else {
                                       value = field.value;
                            if (value.length > 0) {
                                if (!isAllDigits(value)) {
                                    bValid = false;
                                    if (i == 0) {
                                        focusField = field;
                                    fields[i++] = oShort[x][1];
                                } else {
                                     var iValue = parseInt(value);
                                     if (isNaN(iValue) || !(iValue >= -32768 && iValue <= 32767)) {
                                         if (i == 0) {
                                             focusField = field;
                                         fields[i++] = oShort[x][1];
                                         bValid = false;
                    if (fields.length > 0) {
                       focusField.focus();
                       alert(fields.join('\n'));
                    return bValid;
                }]]>
             </javascript>
          </validator>
          <validator name="integer"
                classname="org.apache.struts.validator.FieldChecks"
                   method="validateInteger"
             methodParams="java.lang.Object,
                           org.apache.commons.validator.ValidatorAction,
                           org.apache.commons.validator.Field,
                           org.apache.struts.action.ActionErrors,
                           javax.servlet.http.HttpServletRequest"
                  depends=""
                      msg="errors.integer"
           jsFunctionName="IntegerValidations">
             <javascript><![CDATA[
                function validateInteger(form) {
                    var bValid = true;
                    var focusField = null;
                    var i = 0;
                    var fields = new Array();
                    oInteger = new IntegerValidations();
                    for (x in oInteger) {
                         var field = form[oInteger[x][0]];
                        if (field.type == 'text' ||
                            field.type == 'textarea' ||
                            field.type == 'select-one' ||
                            field.type == 'radio') {
                            var value = '';
                                  // get field's value
                                  if (field.type == "select-one") {
                                       var si = field.selectedIndex;
                                      if (si >= 0) {
                                           value = field.options[si].value;
                                  } else {
                                       value = field.value;
                            if (value.length > 0) {
                                if (!isAllDigits(value)) {
                                    bValid = false;
                                    if (i == 0) {
                                         focusField = field;
                                          fields[i++] = oInteger[x][1];
                                } else {
                                     var iValue = parseInt(value);
                                     if (isNaN(iValue) || !(iValue >= -2147483648 && iValue <= 2147483647)) {
                                         if (i == 0) {
                                             focusField = field;
                                         fields[i++] = oInteger[x][1];
                                         bValid = false;
                    if (fields.length > 0) {
                       focusField.focus();
                       alert(fields.join('\n'));
                    return bValid;
                function isAllDigits(argvalue) {
                    argvalue = argvalue.toString();
                    var validChars = "0123456789";
                    var startFrom = 0;
                    if (argvalue.substring(0, 2) == "0x") {
                       validChars = "0123456789abcdefABCDEF";
                       startFrom = 2;
                    } else if (argvalue.charAt(0) == "0") {
                       validChars = "01234567";
                       startFrom = 1;
                    } else if (argvalue.charAt(0) == "-") {
                        startFrom = 1;
                    for (var n = startFrom; n < argvalue.length; n++) {
                        if (validChars.indexOf(argvalue.substring(n, n+1)) == -1) return false;
                    return true;
                }]]>
             </javascript>
          </validator>
          <validator name="long"
                classname="org.apache.struts.validator.FieldChecks"
                   method="validateLong"
             methodParams="java.lang.Object,
                           org.apache.commons.validator.ValidatorAction,
                           org.apache.commons.validator.Field,
                           org.apache.struts.action.ActionErrors,
                           javax.servlet.http.HttpServletRequest"
                  depends=""
                      msg="errors.long"/>
          <validator name="float"
                classname="org.apache.struts.validator.FieldChecks"
                   method="validateFloat"
             methodParams="java.lang.Object,
                           org.apache.commons.validator.ValidatorAction,
                           org.apache.commons.validator.Field,
                           org.apache.struts.action.ActionErrors,
                           javax.servlet.http.HttpServletRequest"
                  depends=""
                      msg="errors.float"
           jsFunctionName="FloatValidations">
             <javascript><![CDATA[
                function validateFloat(form) {
                    var bValid = true;
                    var focusField = null;
                    var i = 0;
                    var fields = new Array();
                    oFloat = new FloatValidations();
                    for (x in oFloat) {
                         var field = form[oFloat[x][0]];
                        if (field.type == 'text' ||
                            field.type == 'textarea' ||
                            field.type == 'select-one' ||
                            field.type == 'radio') {
                             var value = '';
                                  // get field's value
                                  if (field.type == "select-one") {
                                       var si = field.selectedIndex;
                                       if (si >= 0) {
                                           value = field.options[si].value;
                                  } else {
                                       value = field.value;
                            if (value.length > 0) {
                                // remove '.' before checking digits
                                var tempArray = value.split('.');
                                var joinedString= tempArray.join('');
                                if (!isAllDigits(joinedString)) {
                                    bValid = false;
                                    if (i == 0) {
                                        focusField = field;
                                    fields[i++] = oFloat[x][1];
                                } else {
                                     var iValue = parseFloat(value);
                                     if (isNaN(iValue)) {
                                         if (i == 0) {
                                             focusField = field;
                                         fields[i++] = oFloat[x][1];
                                         bValid = false;
                    if (fields.length > 0) {
                       focusField.focus();
                       alert(fields.join('\n'));
                    return bValid;
                }]]>
             </javascript>
          </validator>
          <validator name="double"
                classname="org.apache.struts.validator.FieldChecks"
                   method="validateDouble"
             methodParams="java.lang.Object,
                           org.apache.commons.validator.ValidatorAction,
                           org.apache.commons.validator.Field,
                           org.apache.struts.action.ActionErrors,
                           javax.servlet.http.HttpServletRequest"
                  depends=""
                      msg="errors.double"/>
          <validator name="date"
                classname="org.apache.struts.validator.FieldChecks"
                   method="validateDate"
             methodParams="java.lang.Object,
                           org.apache.commons.validator.ValidatorAction,
                           org.apache.commons.validator.Field,
                           org.apache.struts.action.ActionErrors,
                           javax.servlet.http.HttpServletRequest"
                  depends=""
                      msg="errors.date"
           jsFunctionName="DateValidations">
             <javascript><![CDATA[
                function validateDate(form) {
                   var bValid = true;
                   var focusField = null;
                   var i = 0;
                   var fields = new Array();
                   oDate = new DateValidations();
                   for (x in oDate) {
                       var value = form[oDate[x][0]].value;
                       var datePattern = oDate[x][2]("datePatternStrict");
                       if ((form[oDate[x][0]].type == 'text' ||
                            form[oDate[x][0]].type == 'textarea') &&
                           (value.length > 0) &&
                           (datePattern.length > 0)) {
                         var MONTH = "MM";
                         var DAY = "dd";
                         var YEAR = "yyyy";
                         var orderMonth = datePattern.indexOf(MONTH);
                         var orderDay = datePattern.indexOf(DAY);
                         var orderYear = datePattern.indexOf(YEAR);
                         if ((orderDay < orderYear && orderDay > orderMonth)) {
                             var iDelim1 = orderMonth + MONTH.length;
                             var iDelim2 = orderDay + DAY.length;
                             var delim1 = datePattern.substring(iDelim1, iDelim1 + 1);
                             var delim2 = datePattern.substring(iDelim2, iDelim2 + 1);
                             if (iDelim1 == orderDay && iDelim2 == orderYear) {
                                dateRegexp = new RegExp("^(\\d{2})(\\d{2})(\\d{4})$");
                             } else if (iDelim1 == orderDay) {
                                dateRegexp = new RegExp("^(\\d{2})(\\d{2})[" + delim2 + "](\\d{4})$");
                             } else if (iDelim2 == orderYear) {
                                dateRegexp = new RegExp("^(\\d{2})[" + delim1 + "](\\d{2})(\\d{4})$");
                             } else {
                                dateRegexp = new RegExp("^(\\d{2})[" + delim1 + "](\\d{2})[" + delim2 + "](\\d{4})$");
                             var matched = dateRegexp.exec(value);
                             if(matched != null) {
                                if (!isValidDate(matched[2], matched[1], matched[3])) {
                                   if (i == 0) {
                                       focusField = form[oDate[x][0]];
                                   fields[i++] = oDate[x][1];
                                   bValid =  false;
                             } else {
                                if (i == 0) {
                                    focusField = form[oDate[x][0]];
                                fields[i++] = oDate[x][1];
                                bValid =  false;
                         } else if ((orderMonth < orderYear && orderMonth > orderDay)) {
                             var iDelim1 = orderDay + DAY.length;
                             var iDelim2 = orderMonth + MONTH.length;
                             var delim1 = datePattern.substring(iDelim1, iDelim1 + 1);
                             var delim2 = datePattern.substring(iDelim2, iDelim2 + 1);
                             if (iDelim1 == orderMonth && iDelim2 == orderYear) {
                                 dateRegexp = new RegExp("^(\\d{2})(\\d{2})(\\d{4})$");
                             } else if (iDelim1 == orderMonth) {
                                 dateRegexp = new RegExp("^(\\d{2})(\\d{2})[" + delim2 + "](\\d{4})$");
                             } else if (iDelim2 == orderYear) {
                                 dateRegexp = new RegExp("^(\\d{2})[" + delim1 + "](\\d{2})(\\d{4})$");
                             } else {
                                 dateRegexp = new RegExp("^(\\d{2})[" + delim1 + "](\\d{2})[" + delim2 + "](\\d{4})$");
                             var matched = dateRegexp.exec(value);
                             if(matched != null) {
                                 if (!isValidDate(matched[1], matched[2], matched[3])) {
                                     if (i == 0) {
                                         focusField = form[oDate[x][0]];
                                     fields[i++] = oDate[x][1];
                                     bValid =  false;
                             } else {
                                 if (i == 0) {
                                     focusField = form[oDate[x][0]];
                                 fields[i++] = oDate[x][1];
                                 bValid =  false;
                         } else if ((orderMonth > orderYear && orderMonth < orderDay)) {
                             var iDelim1 = orderYear + YEAR.length;
                             var iDelim2 = orderMonth + MONTH.length;
                             var delim1 = datePattern.substring(iDelim1, iDelim1 + 1);
                             var delim2 = datePattern.substring(iDelim2, iDelim2 + 1);
                             if (iDelim1 == orderMonth && iDelim2 == orderDay) {
                                 dateRegexp = new RegExp("^(\\d{4})(\\d{2})(\\d{2})$");
                             } else if (iDelim1 == orderMonth) {
                                 dateRegexp = new RegExp("^(\\d{4})(\\d{2})[" + delim2 + "](\\d{2})$");
                             } else if (iDelim2 == orderDay) {
                                 dateRegexp = new RegExp("^(\\d{4})[" + delim1 + "](\\d{2})(\\d{2})$");
                             } else {
                                 dateRegexp = new RegExp("^(\\d{4})[" + delim1 + "](\\d{2})[" + delim2 + "](\\d{2})$");
                             var matched = dateRegexp.exec(value);
                             if(matched != null) {
                                 if (!isValidDate(matched[3], matched[2], matched[1])) {
                                     if (i == 0) {
                                         focusField = form[oDate[x][0]];
                                      fields[i++] = oDate[x][1];
                                      bValid =  false;
                              } else {
                                  if (i == 0) {
                                      focusField = form[oDate[x][0]];
                                  fields[i++] = oDate[x][1];
                                  bValid =  false;
                         } else {
                             if (i == 0) {
                                 focusField = form[oDate[x][0]];
                             fields[i++] = oDate[x][1];
                             bValid =  false;
                   if (fields.length > 0) {
                      focusField.focus();
                      alert(fields.join('\n'));
                   return bValid;
             function isValidDate(day, month, year) {
                 if (month < 1 || month > 12) {
                        return false;
                    if (day < 1 || day > 31) {
                        return false;
                    if ((month == 4 || month == 6 || month == 9 || month == 11) &&
                        (day == 31)) {
                        return false;
                    if (month == 2) {
                        var leap = (year % 4 == 0 &&
                                   (year % 100 != 0 || year % 400 == 0));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         

    Next my struts-config.xml:That's all? What about an <action-mappings> section
    which specifies the action URIs and whether or not
    validation is turned on for specific ones?Whoops, sorry I forgot to put my action, although you just made me figure out the answer. I forgot I have 2 versions of the bean, one called Profile and one Called User, and I was trying to test the validation on the Profile bean while I was specifying the User bean :)

  • Client Side Javascript Validation not Working in Struts 1.x version

    hi,
    I'm following the steps provioded in the below link for Javascript Client side validation but still it is not working.I'm struggling to get this work.
    [http://www.visualbuilder.com/jsp/struts/tutorial2/pageorder/9/|http://www.visualbuilder.com/jsp/struts/tutorial2/pageorder/9/]
    "The framework automatically generates the browser specific JavaScript and validate the data only at the client side."From the above statement i undertstand that framework itself generates the javascript function for validating the field mentioned in validations.xml file so that we dont have to explicitly write a javascript function for
    validating the fields
    (or)
    Do we need to call an explicit function
    Please need help on this.
    I have followed all the steps mentioned on the above link but Client Side Javascript Validation not Working in Struts 1.x version....
    Thanks and Regards,
    Deepak

    Hi,
    Please find my steps below....still getting an error.
    2> which version of commons-validation.jar needs to be downloaded ...Link please
        downloaded the latest commons-validation.jar and placed in lib.refreshed the project,and did a build.
        3> which DTD name to be specified in "validator-rules.xml" which is in accordance to commons-validator.jar file.
    validator-rules.xml ::
    <!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.xml:
    <!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">
    i did as u said and im gettiong the below errorNov 5, 2009 4:33:08 PM org.apache.struts.validator.ValidatorPlugIn initResources
    SEVERE: Invalid byte 2 of 2-byte UTF-8 sequence.
    org.apache.commons.digester.xmlrules.XmlLoadException: Invalid byte 2 of 2-byte UTF-8 sequence.
         at org.apache.commons.digester.xmlrules.FromXmlRuleSet.addRuleInstances(FromXmlRuleSet.java:139)
         at org.apache.commons.digester.Digester.addRuleSet(Digester.java:1610)
         at org.apache.commons.digester.xmlrules.DigesterLoader.createDigester(DigesterLoader.java:89)
         at org.apache.commons.validator.ValidatorResourcesInitializer.initialize(ValidatorResourcesInitializer.java:122)
         at org.apache.struts.validator.ValidatorPlugIn.initResources(ValidatorPlugIn.java:238)
         at org.apache.struts.validator.ValidatorPlugIn.init(ValidatorPlugIn.java:181)
         at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:1036)
         at org.apache.struts.action.ActionServlet.init(ActionServlet.java:455)
         at javax.servlet.GenericServlet.init(GenericServlet.java:212)
         at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1139)
         at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:966)
         at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3996)
         at org.apache.catalina.core.StandardContext.start(StandardContext.java:4266)
         at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
         at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
         at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
         at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:927)
         at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:890)
         at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
         at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1150)
         at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
         at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
         at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
         at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
         at org.apache.catalina.core.StandardService.start(StandardService.java:448)
         at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
         at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
    Need help forum members.....
    Please reply to my question 1  which has been asked before as belowDo i need to write explicit javascript function for validation in Struts (or) struts generates the javascript function by itself.??? Please explain with an example....
    Edited by: Deepak_A_L on Nov 5, 2009 4:37 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Live Migration in OVM 3.0.2 should have an interruption or not?

    Live Migration in OVM 3.0.2 should have an interruption or not?
    I mean: I have 2 OVM Servers 3.0.2 & FibreChannel Storage
    I installed a Oracle Linux 5.6 x64 in paravirtualized Mode
    When I do a Live Migration the Virtual Machine changes in seconds to the other server with the lock image. Meanwhile I ping to the machine & Im inside the command line.
    Communication interrupt like 10 seconds or sometimes more & command line does not work for the same time
    Is that correct?
    Greetings
    Alex Dávila

    alex davila wrote:
    Right now Iam testing connectivity & when I do live migration the interruption is minimal, just 1 ping lost
    I don't know why yesterday delay secondsYou might want to talk to your networking guys to make sure that PORTFAST is enabled (if you have Cisco switches) or that you have rapid STP configured. Keep in mind that we switch the MAC address of the guest from one physical server to another. The delay you saw was your network noticing and re-routing packets to the new location.

  • ADF Model Validation using JPA/EJB stack.

    Hi,
    We are evaluating 11g and are interested in implementing using a JPA/EJB3.0/Toplink - EJB Session Bean - ADF bindings - ADF Faces RC stack.
    Looking at the declarative validation rule framework, I am trying to determine whether I can define domain model validation rules that can be propagated up through to the ADF faces RC layer. We have looked previously, at the ADF BC framework and note that it can be done there, but we wish to use a pure EJB/JPA solution.
    I can see how validation rules can be declared at the page bindings layer in the pageDef file, and this all works. However, these same validation rules applied to the Structure Definition <entitybeanname>.xml file, do not propagate up through the ADF binding layer, although the xsd of the structure definition file does appear to support it. The documentation I have read is somewhat ambigious as to whether this is possible.
    Basically, it would be nice to have some form of domain attribute validation that can be defined against the entity bean attributes that is available in the service and UI layer ala Hibernate Validator etc...
    Anyone, got any suggestions?
    regards,
    andy

    I'm not sure I understand what the "ADF own transaction operation" is. Could you explain?
    If you have to write your own persist method, what's the proper way to go about doing this? Is there a tutorial to be found somewhere? What I have now has been created by following the tutorial linked above, I haven't modified the code yet. Looking at the code I found this:
    jTable1.setModel((TableModel)panelBinding.bindUIControl("tableNameFindAll",jTable1));
    Where tableNameFindAll is related to a named query TableName.FindAll.
    There seems to be a data structure named "UpdateableCollection" which provides the operations such as 'create', 'next', 'first', etc. Would a subclass of this be the proper place to put a 'commit' function? I'm assuming through the bind control I could gain access to either this UpdateableCollection or the list of entities (List<tableName>) then I suppose I could go through this list and persist the new ones. But I think this doesn't fit with the paradigm as these are data control operations not interface operations. So I'm wondering where should I put the 'commit' operation (which should both add new data and merge the updated data) and how do I bind it to the interface? I just couldn't find a tutorial explaining all of this, but perhaps it's out there.
    Thanks.

  • Adf faces table and applet in jsf page navSubmit not working in IE

    Hi
    I have a jsf page with adf faces table and applet , previous / next navigation is not working for my table when i add the applet to the same page , it is working in firefox but not in IE .
    I have no clue what to change , can any one help. below is the sample code for my jsf page
    Best regards
    Srinivas
    Code follows, not sure how to format the code here
    <h:form>
    <af:panelPage title="Test Adf faces table and applet">
    <af:panelHeader text="Orders">
    <af:table value="#{bindings.Orders.collectionModel}" var="row"
    rows="#{bindings.Orders.rangeSize}"
    first="#{bindings.Orders.rangeStart}"
    emptyText="#{bindings.Orders.viewable ? 'No rows yet.' : 'Access Denied.'}"
    id="orders" >
    <af:column sortProperty="order"
    headerText="#{bindings.Orders.labels.order}">
    <af:commandLink text="#{row.order}"
    id="orderNumber"
    onclick="showOrder(#{row.order})"
    disabled="false"/>
    </af:column>
                   </af:table>
    </af:panelHeader>
    <af:objectSpacer width="10" height="10"/>
    <af:panelBox>
    <f:verbatim>
    <div id="appletDiv">
                        <applet here />
                        </div>
    </f:verbatim>
    </af:panelBox>
    </af:panelHorizontal>
    </af:panelPage>
    </h:form>

    Sorry about the format, it looked okay when i previewed it , now it looks like terrible

  • HT4796 I am having trouble completing the the migration assistant process. My PC (Vista windows, 64 bit), will not go to the step where I enter a passcode from my MAC. Any suggestions?

    I am having trouble completing the the migration assistant process. My PC (Vista windows, 64 bit), will not go to the step where I enter a passcode from my MAC. Any suggestions?

    Did you ever resolve the iCloud problem.I am in the same position and its driving me mad!!! If you have a link to an solution I would appreciate it.

Maybe you are looking for

  • How to batch delete iMessage messages on Desktop (Macbookpro)

    Hey guys, I was wondering if there is a better method to delete the messages than deleting one by one the message in the iMessage panel... thanks very much for your help Jeff Chaine

  • Move a big file from a mac system to a windows 8 laptop usb usb flash drive

    Hello i am using a 32 gb flash drive to copy a 10gb file from mac os x to my flash drive. Then i want to insert that flash drive to my windows 8 pc and store it there. I cant use a network connection to transfer files because i dont have a ethernet c

  • Oracle SQL Developer 1,1 patch 1 nls_comp

    Hi, Does anyone know if the "nls_comp=ANSI" bug is fixed in patch 1? I have checked the bugs page, but it is not mentioned there. I am reluctant to download and try it out because the initial release crashed our development server. Thanks Mike

  • Tables not importing to the repository in OBIEE 11g

    Hi friends, Soon after giving OCI connection, im trying to import five tables from my user, soon after selecting the table and giving import. The import dialog box is opening and it is keep on importing and it is not stopping at all, due to that the

  • Adobe Captivate 7 without admin rights

    Adobe recommends that, in order to use Adobe Captivate 7, the user must run as administrator. They suggest right-clicking the application and selecting "Run as administrator". If Captivate is run without the administrator permissions, the program beh