Validator expected behaviour

Hi,
I have been using validators to validate my form items and I have a question in the expected behaviour of the Validator object.
Validators have a "required" property and from my knowledge it's only used at two locations:
private function validateRequired(value:Object):ValidationResult
and
    public function validate(
                        value:Object = null,
                        suppressEvents:Boolean = false):ValidationResultEvent
        if (value == null)
            value = getValueFromSource();  
        // if required flag is true and there is no value
        // we need to generate a required field error
        if (isRealValue(value) || required)
            return processValidation(value, suppressEvents);
        else
            // Just return valid
            return new ValidationResultEvent(ValidationResultEvent.VALID);
As we can see, in the validate(...) function, processValidation(...) will be called as long as isRealValue(value) is held true. All isRealValue is
    protected function isRealValue(value:Object):Boolean
        return (value != null);
So if I had a field with text = "" validation still occurs.
This behaviour is still be acceptable but it raises the question whether "required" is needed in the function and what significance does it have?
I am not entirely sure whether this should be a bug. I hoping someone on the Flex SDK team will be able to answer my question.
Thanks.

Hi Frank
I've recorded this following ScreenToaster session to show you the behaviour under Firefox. It's a standard search form dragged straight from the data control window. I haven't modified the columns attr at all, each component column is bound #{bindings.<fieldname>.hints.displayWidth}.
Note when the Find button is pressed the fields change size to set defined width, then after the Execute button is pressed they go back to their dynamic sizes (presumably coming from the binding):
http://www.screentoaster.com/watch/stWUtSQUVLRl1XRlpVXVta
Let me know if you can't access the ScreenToaster video, it's my first try in publlishing a video via it.
Cheers,
CM.

Similar Messages

  • Test case: unusual locking problem or expected behaviour?

    I have tried the following test case on both 9.0.1 and 10.2.0. The problem I am seeing here is that a table receives an exclusive lock that doesn't get trapped by a FOR UPDATE NOWAIT condition.
    Test case setup
    create table x (
    f1 number not null,
    f2 varchar2(100) );
    create table y (
    f1 number not null,
    f2 number not null,
    f3 number,
    f4 varchar2(100) );
    alter table x add constraint pk_x
    primary key (f1);
    alter table y add constraint pk_y
    primary key (f1);
    /*** This is a self-referential integrity check ****/
    alter table y add constraint fk_y
    foreign key (f3)
    references y ( f1 );
    create or replace trigger trig_y
    before insert on y
    for each row
    begin
    update x
    set f2 = 'trig test ' || to_char(sysdate,'ddmmyyyy hhmiss')
    where f1 = :new.f2;
    end;
    insert into x values (1,'test 1');
    insert into x values (2,'test 2');
    insert into x values (3,'test 3');
    insert into y values (2,2,2,'y test 2');
    insert into y values (3,3,3,'y test 3');
    commit;
    Test case actions
    This requires 3 independent sessions to be started.
    * SESSION 1 *
    select * from x
    where f1 = 1
    for update nowait;
    * SESSION 2 *
    insert into y values (1,1,1,'test');
    -- This session waits because of the trigger that is attempting to update the
    -- same row that is locked in session 1.
    * SESSION 3 *
    select *
    from y
    where f1 = 2
    for update of f1 nowait;
    -- The row lock succeeds.
    -- Now update the primary key column in Y.
    update y
    set f1 = 2
    where f1 = 2;
    -- This update statement waits because of a lock. Why is this as the row
    -- has been successfully locked by the FOR UPDATE?
    -- Remove the foreign key constraint from table Y and try again. This time
    -- the update will not wait but will complete successfully.
    Is this expected behaviour, or a bug in self-referential integrity checks, or in
    all foreign keys? The reason this came about in our application is because FORMS attempts to update every column on a block regardless of whether all values in the block have changed. This includes the primary key columns.
    We have worked around this issue for now by setting the 'update changed columns only' property on blocks in the forms.

    No. All you are doing there is stating your intention of later updating the selected locked rows.
    You may not even update any rows, if the program logic decides that way. Your actual update is the only case where the validation of foreign key will be applied. It cannot be done at the time of doing FOR UPDATE select, since the database does not know what new value is going to be when you do update so it is not possible to check.
    Also, note that yoru statement did NOT fail. It was just rying to validate your foreign key, and in that process wants to make sure no one else makes the changes. The statement was waiting for resource to be free, it DID NOT FAIL (no error was raised).

  • Expected behaviour?: input controls change size with iterator in findMode

    Hi all
    I'm trying to work out if the following is expected behaviour with the JDev 11g ADF Faces RC input components or a bug, before lodging a support request.
    I've noticed that fields resize themselves based on the parent bound iterator being in find mode (as separate to the default execute (show) mode). This causes all sorts of havoc with page layout when switching between the 2 modes.
    To demonstrate the code I have a simple inputText control with a hardcoded column size, and a Find commandButton:
    <af:inputText value="#{bindings.Status.inputValue}"
       label="#{bindings.Status.hints.label}" columns="20"
       maximumLength="#{bindings.Status.hints.precision}" shortDesc="#{bindings.Status.hints.tooltip}"
       disabled="true">
      <f:validator binding="#{bindings.Status.validator}"/>
    </af:inputText>
    <af:commandButton actionListener="#{bindings.Find.execute}" text="Find" disabled="#{!bindings.Find.enabled}"/>There's nothing unusual about the bindings for these components:
    <?xml version="1.0" encoding="UTF-8" ?>
    <pageDefinition xmlns="http://xmlns.oracle.com/adfm/uimodel" version="11.1.1.51.88" id="untitled1PageDef"
                    Package="view.pageDefs">
      <parameters/>
      <executables>
        <iterator Binds="TableView1" RangeSize="25" DataControl="AppModuleDataControl"
                  id="TableView1Iterator"/>
      </executables>
      <bindings>
        <attributeValues IterBinding="TableView1Iterator" id="Status">
          <AttrNames>
            <Item Value="Status"/>
          </AttrNames>
        </attributeValues>
        <action IterBinding="TableView1Iterator" id="Find" RequiresUpdateModel="true" Action="iteratorFind"/>
        ...and so on...Before I press the Find button (ie. Execute/show mode), the inputText renders 20 columns in width as expected, but in Find mode the field changes size.
    Is this expected behaviour or a bug? Alternatively can we influence the field's size in find mode (as the column attribute seems to be ignored), as I'd like to make it the same as the execute/result mode, so my page doesn't resize.
    Cheers,
    CM.

    Hi Frank
    I've recorded this following ScreenToaster session to show you the behaviour under Firefox. It's a standard search form dragged straight from the data control window. I haven't modified the columns attr at all, each component column is bound #{bindings.<fieldname>.hints.displayWidth}.
    Note when the Find button is pressed the fields change size to set defined width, then after the Execute button is pressed they go back to their dynamic sizes (presumably coming from the binding):
    http://www.screentoaster.com/watch/stWUtSQUVLRl1XRlpVXVta
    Let me know if you can't access the ScreenToaster video, it's my first try in publlishing a video via it.
    Cheers,
    CM.

  • URGENT:Expected behaviour when two buttons are clicked on a page?

    Hello,
    I have developed a search page. In the search results region, I have option to delete and update a record. What is the expected behaviour if I first click on the delete icon of one record and then click on the update icon of another record?
    I am getting an error page starting with the following line : oracle.apps.fnd.framework.OAException: java.lang.NullPointerException.
    Could anyone guide me about how I can correct this situation?
    In Dev guide, I saw the section 'PPR Event Queuing'. They have mentioned the below lines in this section :
    Note: To disable this feature, set the value of the profile FND_PPR_EVENT_QUEUE_DISABLED to Y. In this
    case, when a PPR event fires, all subsequent events on the page are ignored.
    Is it possible to set the profile FND_PPR_EVENT_QUEUE_DISABLED to Y in the PR of the search page? Or should I set the profile value through front end for the responsibility for which I'll be adding this search page?
    Thanks,
    Anju

    I had looked through the error message but I couldnt find anything related to the coding I have done.
    I have pasted the entire error message below:
    Exception Details.
    oracle.apps.fnd.framework.OAException: java.lang.NullPointerException
         at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:891)
         at oracle.apps.fnd.framework.webui.OAPageBean.releaseRootApplicationModule(OAPageBean.java:5448)
         at oracle.apps.fnd.framework.webui.OAPageContextImpl.performReleaseApplicationModule(OAPageContextImpl.java:2491)
         at oracle.apps.fnd.framework.webui.OAPageContextImpl.performReleaseRootApplicationModule(OAPageContextImpl.java:2439)
         at oracle.apps.fnd.framework.webui.OAPageBean.performReleaseApplicationModules(OAPageBean.java:4151)
         at oracle.apps.fnd.framework.webui.OAPageBean.finalizeRequest(OAPageBean.java:3926)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:552)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:423)
         at OA.jspService(OA.jsp:40)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
         at java.lang.Thread.run(Thread.java:534)
    ## Detail 0 ##
    java.lang.NullPointerException
         at com.evermind.server.http.EvermindHttpServletRequest.getSession(EvermindHttpServletRequest.java:2343)
         at oracle.apps.fnd.framework.webui.OAHttpSessionCookieImpl.deleteValue(OAHttpSessionCookieImpl.java:825)
         at oracle.apps.fnd.framework.webui.OAHttpSessionCookieImpl.releaseApplicationModule(OAHttpSessionCookieImpl.java:526)
         at oracle.jbo.common.ampool.SessionCookieImpl.releaseApplicationModule(SessionCookieImpl.java:584)
         at oracle.apps.fnd.framework.webui.OAPageBean.releaseRootApplicationModule(OAPageBean.java:5439)
         at oracle.apps.fnd.framework.webui.OAPageContextImpl.performReleaseApplicationModule(OAPageContextImpl.java:2491)
         at oracle.apps.fnd.framework.webui.OAPageContextImpl.performReleaseRootApplicationModule(OAPageContextImpl.java:2439)
         at oracle.apps.fnd.framework.webui.OAPageBean.performReleaseApplicationModules(OAPageBean.java:4151)
         at oracle.apps.fnd.framework.webui.OAPageBean.finalizeRequest(OAPageBean.java:3926)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:552)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:423)
         at OA.jspService(OA.jsp:40)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
         at java.lang.Thread.run(Thread.java:534)
    java.lang.NullPointerException
         at com.evermind.server.http.EvermindHttpServletRequest.getSession(EvermindHttpServletRequest.java:2343)
         at oracle.apps.fnd.framework.webui.OAHttpSessionCookieImpl.deleteValue(OAHttpSessionCookieImpl.java:825)
         at oracle.apps.fnd.framework.webui.OAHttpSessionCookieImpl.releaseApplicationModule(OAHttpSessionCookieImpl.java:526)
         at oracle.jbo.common.ampool.SessionCookieImpl.releaseApplicationModule(SessionCookieImpl.java:584)
         at oracle.apps.fnd.framework.webui.OAPageBean.releaseRootApplicationModule(OAPageBean.java:5439)
         at oracle.apps.fnd.framework.webui.OAPageContextImpl.performReleaseApplicationModule(OAPageContextImpl.java:2491)
         at oracle.apps.fnd.framework.webui.OAPageContextImpl.performReleaseRootApplicationModule(OAPageContextImpl.java:2439)
         at oracle.apps.fnd.framework.webui.OAPageBean.performReleaseApplicationModules(OAPageBean.java:4151)
         at oracle.apps.fnd.framework.webui.OAPageBean.finalizeRequest(OAPageBean.java:3926)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:552)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:423)
         at OA.jspService(OA.jsp:40)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
         at java.lang.Thread.run(Thread.java:534)

  • When i placed a AccessKey to Submit Button (Eg: AccessKey="S"), and pressed Shift + Alt + S, the focus is going to Submit button and as well as Submit operation is also performed. Is this the expected behaviour in FireFox for AccessKeys

    When i placed a AccessKey to Submit Button (Eg: AccessKey="S"), and pressed Shift + Alt + S, the focus is going to Submit button and as well as Submit operation is also performed. Is this the expected behaviour in FireFox for AccessKeys

    What were you expecting when using an accesskey?
    I use that also on this forum to submit my posts:
    <pre><nowiki><input accesskey="s" class="btn btn-important" value="Post Reply" type="submit">
    </nowiki></pre>

  • JMS Clustering : Load Balancing expected Behaviour

    Hi All,
              I have a Cluster with a 2 managed servers A and B . ConnectionFactory is deployed to the cluster and Server B hosts JMS Server.Destinations on the JMS Server are not distributed, but the JNDI Names of the same are replicated across the cluster.Both Load Balancing and server affinity are enabled on the connectionFactory(I hope these attributes are required only if the destinations are distributed).
              An application containing MDBs and EJBs are deployed to the cluster and onMessage MDB looks up for a Facade and makes calls on it.An external java client sets up the initialContext based on the cluster address and starts sending messages to the destination
              What should be the expected behaviour in this scenario ?According to my understanding,
              -Eventhough, the connectionFactory is deployed across the cluster, since the physical destinations are available only in the weblogic server hosting the JMS Server(Server B), the actual message handling(MDB invocation) would be done only here.
              -When the MDBs are invoked on serverB, it would performs a lookup for the Facade.Because of the colocation optimisation, the replica aware stub used would be the one in ServerB and henceforth all the method processing should be done on Server B.
              Is this correct ? But this would also mean that no load balancing would happen because of the colocation optimisation ? Do i need to use a distributed destination to enable load balancing in this scenario ?
              Any help would be greatly appreciated..
              thanks,
              Josh

    Hi All,
              I have a Cluster with a 2 managed servers A and B . ConnectionFactory is deployed to the cluster and Server B hosts JMS Server.Destinations on the JMS Server are not distributed, but the JNDI Names of the same are replicated across the cluster.Both Load Balancing and server affinity are enabled on the connectionFactory(I hope these attributes are required only if the destinations are distributed).
              An application containing MDBs and EJBs are deployed to the cluster and onMessage MDB looks up for a Facade and makes calls on it.An external java client sets up the initialContext based on the cluster address and starts sending messages to the destination
              What should be the expected behaviour in this scenario ?According to my understanding,
              -Eventhough, the connectionFactory is deployed across the cluster, since the physical destinations are available only in the weblogic server hosting the JMS Server(Server B), the actual message handling(MDB invocation) would be done only here.
              -When the MDBs are invoked on serverB, it would performs a lookup for the Facade.Because of the colocation optimisation, the replica aware stub used would be the one in ServerB and henceforth all the method processing should be done on Server B.
              Is this correct ? But this would also mean that no load balancing would happen because of the colocation optimisation ? Do i need to use a distributed destination to enable load balancing in this scenario ?
              Any help would be greatly appreciated..
              thanks,
              Josh

  • XSD validation: wrong behaviour for mixed=false

    Based on XSD report.xsd demo file, I experienced mixed="false" attribute of complex type.
    <element name="purchaseReport">
    <complexType mixed="false">
    Such an attribute forbids text nodes in purchaseReport elements.
    So such XML data should be rejected by XSDSetSchema tool:
    <purchaseReport
    xmlns="http://www.example.com/Report"
    xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.example.com/Report report.xsd"
    period="P3M" periodEnding="1999-12-31">
    invalidchar
    <regions>
    However it passes Oracle schema validation, which is not expected.
    It is rejected by XMLSpy, which is expected.
    I didn't find such a bug report.
    Does someone has a clue?
    Tx,
    François Loison

    Hi Mark,
    Thanks for your response for the confirmation of the bug.
    Before we created this thread, we tested our case in Stylus Studio using the following XSD Validators:
    - Saxonica 9.4.0.6
    - Saxonica 9.4.0.6 for XSD 1.1
    - Xalan Java 2.7.0
    - .NET Framework XML Parser
    - Xerces-J Validator 2.11.0 for XSD 1.1
    All of them worked properly for the XML and XSD in question.
    By the way, on the subject of the Oracle XML DB and XSD 1.1, any plans to support it?
    Oracle 12c ?!
    We will open an SR and provide it here. So you will be able to open a bug for this issue.

  • Entity validation strange behaviour

    I have a number of method validators against an entity.
    The validators fire for incorrect data entered on the associated screen and once the data is fixed the user is presented with a second screen. All is fine so far ...
    Until the user hits the back button to go back to the first screen. For some reason even though the user enters invalid data the method validators don't fire !!!. Very confusing.
    Does anyone know of any reasons why this should occur ?
    Many Thanks,
    Richard

    Hi,
    I added a page-link to my second page as suggested. Using this method(instead of back button) causes the validation in the first screen to re-fire.
    The previously entered values in the first screen are gone as its a new request.
    I use code from your toystore to pre-create a record in the initializeModelForPage step. This fires when the link is clicked, and part of that code deletes the last entry from the entity cache. Therefore I'm not too surprised this works. As part of this project it has been stated that the users should be able to navigate through the browsers buttons, so I'm still abit stuck. Any suggestions ?
    What i've done for now is to remove my validation from BC4J to my struts actions.
    But because new values aren't recorded in the entity after a back button I also have to manually set the bindings for each screen field in my struts action.
    I'm not an expert in the adf / struts frame work so I could just be missing something.
    On a related point(assuming that i use entity validation) the following happens.
    On my first screen I enter valid data , and then move to my second. I leave the screen in an invalid date before pressing the browsers back button. I then can't get past the first screen as it is still validating the errors in the second screen. Shay mention that I should be using a cancel button in the second screen to navigate back to the first. This is a public user application and I know that the back button will be pressed(its not good web design to remove/disable it anyway).
    Any suggestions.
    It seems that I can't get the ADF framework to work well with wizards and perhaps its best to just use struts for the validation and at the end of the wizard just call a database package to do the DML ?
    Sorry but one last point - to do with the refresh button.
    All my wizards use page forwards to move between screens and I know this can cause oddities with a refresh. What I have noticed is that when even refreshing the first page of my wizard(after leaving it in an invalid state) the screen doesn't change the errors are still there. I would have though the refresh would request a new refreshed page without the struts action errors. I even noticed that a refresh can cause a struts action related to a submit button to re-fire ? Why does this happen as it can cause a big mess.
    Even re-entering the url in the same browser window doesn't cause the screen to properly refresh. The initializeModelForPage steps also do not fire when a refresh happens. I did notice that if I went to a different website and then re-entered the url that the page displayed more as expected and I think the initializeModelForPage step ran.
    I'm sure alot of this is due to the fact that I don't really understand the framework, and thus would be grateful if you could explain why all the above happens. Is it what you would expect to happen ?
    Many Thanks for your time and assistance.
    Richard

  • Exception Handling in bounded taskflows - expected behaviour

    Hi,
    I'm currently reviewing exception handling in bounded task flows and some things does not seems to be very clear for me.
    (q1) Does it make sense that a bounded task flow calls a method (via a method activity) defined on the page definition of another page (outside of the BTF) by using a #{data.xxxmyPageDef.myMethodName.execute} EL expression?
    (q2) Is is correct to expect the application to execute the method marked as ExceptionHandler in the taskflow, whenever an exception occurs?
    (q3) I created 5 different scenarios where I call a service method which throws an exception, from within a page fragment of the BTF.
    (q3 – sc1) Call a service method through the binding layer of the current page (by using #{bindings.xxx.execute})
    Result: A dialog containing the exception message appears.
    This is what I expected. Althought, the exception handler method does not seems to be invoked.(q3 – sc2) Call a service method through a task flow method activity using #{bindings.xxx.execute}
    Result: A dialog containing the exception message appears.
    This is what I expected. Althought, the exception handler method does not seems to be invoked.(q3 – sc3) Call a service method through a task flow method activity using #{data.myPageFragementPagedef.xxx.execute} (accessing the pageDef of the page fragment)
    Result: Nothing happens.
    This is not what I expected. Although, the exception handler method does nog seems to be invoked, I expect the ADF Error Handler to create a FacesMessage.(q3 – sc4) Call a service method through a task flow method activity using #{data.myPageContainingThePageFragmentPageDef.xxx.execute} (accessing the page containing the BTF region)
    Result: Nothing happens.
    This is not what I expected. Although, the exception handler method does nog seems to be invoked, I expect the ADF Error Handler to create a FacesMessage. (q3 – sc5) Call a service method through a task flow method activity using #{data.aPageOutsideTheBTFPageDef.xxx.execute} (accessing a page outside the BTW)
    Result: Nothing happens.
    This is not what I expected. Although, the exception handler method does nog seems to be invoked, I expect the ADF Error Handler to create a FacesMessage. (q4) How can it be possible that – without an exception handler – exceptions occur when calling method activities, without the exceptions being translated to FacesMessages?
    Thanks in advance,
    Koen Verhulst
    JDeveloper 11.1.1.4

    Koen,
    +(q1) Does it make sense that a bounded task flow calls a method (via a method activity) defined on the page definition of another page (outside of the BTF) by using a #{data.xxxmyPageDef.myMethodName.execute} EL expression?+
    No. Exceptions should be handled locally.
    +(q2) Is is correct to expect the application to execute the method marked as ExceptionHandler in the taskflow, whenever an exception occurs?+
    Only for exceptions that are before Render Response. The Render Response Phase is not handled in ADFc. So exceptions that occur in managed beans may fall through
    +(q3) I created 5 different scenarios where I call a service method which throws an exception, from within a page fragment of the BTF.+
    +(q3 – sc1) Call a service method through the binding layer of the current page (by using #{bindings.xxx.execute}) Result: A dialog containing the exception message appears.+
    This is what I expected. Althought, the exception handler method does not seems to be invoked.
    The binding layer has an error handler you can override in the DataBinings.cpx file
    +(q3 – sc2) Call a service method through a task flow method activity using #{bindings.xxx.execute}+
    Result: A dialog containing the exception message appears.
    This is what I expected. Althought, the exception handler method does not seems to be invoked.
    Again, you use the binding layer to invoke the service
    +(q3 – sc3) Call a service method through a task flow method activity using #{data.myPageFragementPagedef.xxx.execute} (accessing the pageDef of the page fragment)+
    Result: Nothing happens.
    This is not what I expected. Although, the exception handler method does nog seems to be invoked, I expect the ADF Error Handler to create a FacesMessage.
    Never use such a call. Its bad practice as there is no guarantee the container you reference is active. Always have the method call activity have its own binding defined when accessing a method call activity. I know there are lots of example floating aroundthat you #{data ...} and many are from 10.1.3. This should be avoided alltogether though
    +(q3 – sc4) Call a service method through a task flow method activity using #{data.myPageContainingThePageFragmentPageDef.xxx.execute} (accessing the page containing the BTF region)+
    Result: Nothing happens.
    This is not what I expected. Although, the exception handler method does not seems to be invoked, I expect the ADF Error Handler to create a FacesMessage.
    Again, this is not a proper use of the ADF framework.
    +(q3 – sc5) Call a service method through a task flow method activity using #{data.aPageOutsideTheBTFPageDef.xxx.execute} (accessing a page outside the BTW)+
    Result: Nothing happens. This is not what I expected. Although, the exception handler method does nog seems to be invoked, I expect the ADF Error Handler to create a FacesMessage.
    accessing a page outside the BTW (!!!) This should ring a worst practices alarm on your laptop (obviously doesn't do it either)
    +(q4) How can it be possible that – without an exception handler – exceptions occur when calling method activities, without the exceptions being translated to FacesMessages?+
    Exceptions are not handled in a single place but stacked. The business service raises an exception and passes it to the binding layer if not handled. The binding layer handles the exception and if it can't passes it to ADFc. ADFc can handle this exception if it is not during Render Response.
    Bottom line: There is no single point of exception handling. So as a recommendation for best practices
    - Catch and handle exceptions as close as possible to their origins
    - If things can go wrong, thy will - use try/catch blocks in managed beans
    - Use an exception handling activity in all bounded task flows. In the case of task flow call activities being used exceptions can bubble up to the caller. However, this would take users out of their current application context
    - Exceptions not handled in ADFc can be intercepted by overriding the application task flow exception handler (used by the exception handler activities). This would give you a chance e.g. to handle issues during Render Response
    - Never fight the framework, never bend the framework: Don't use out of scope access to page definitions and resources. Exception handling is not a replacement for bad code practices (sorry for saying this, its not meant to be rude) :-)
    Though I don't have a qualified numbers of bugs open for exception handling in ADF between 11.1.1.4 and now (and some that are open), but there are issues reported in this area. If there is something that really feels wrong, please go ahead and file a bug and provide a test case for development to have a look. The Render Response issue, for example is something we are aware of and that is in discussion (afaik knows, there is a change in exception handling in JSF 2 that may have an impact to what we can do in ADFc).
    thanks
    Frank

  • RequestDispatcher -  What is the expected behaviour defined by the spec

    Hello,
    I just try to understand the servlet specification correctly.
    I don't understand what should happen when I try to access an not-existent resource by means of the RequestDispatcher.
    That's the way my source code looks:
    RequestDispatcher rd = servletRequest.getRequestDispatcher(jspName);
    try {
    if (rd != null) rd.include(origRQ, desc.getResponse());
    } catch (Exception e) { e.printStackTrace(); } I see following possibilities:
    1.
    The RequestDispatcher is not null and invoking the method include
    on the RequestDispatcher will lead to a 404 Http error.
    2.
    The RequestDispatcher is not null and invoking the method include
    or forward on the RequestDispatcher will lead to a ServletException (the
    root exception of this is a FileNotFoundException)
    3.
    The requestDispatcher is null
    I don't see anything about this in the servlet specification.
    Maybe I just don't find it. What should be the behaviour defined
    by the servlet spec.
    Any help appreciated.
    Many thanks in advance.

    Thanks for your answers.
    So this means this behaviour differs from servlet container to servlet container and it is not determined by the specification. I asked this
    question mainly, because I observed different behaviour for two different servlet container and I wanted to clarify which behaviour
    is the correct one.
    In ServletExec I got back a 404 error. In Iona's servlet engine I got
    back a ServletExecption (root cause is a FileNotFoundException).

  • ASA 5585-X multiple bridge-groups expected behaviour

    Hi all,
    suppose a deploy of an asa5585-x in transparent mode made by two bridge-groups (2 interfaces each).
    Now suppose that a new traffic flow in direction north-south traverses the bvi1. What's the expected behavior if the traffic going back (south-north) will traverse the bvi2? Will be that traffic correctly recognized as part of the flow previously detected?
    Regards.
    A.M.

    Discovered today that the 'fix' I mention above is more of a workaround, because when I initiated a manual failover for one of the failover groups, the alerts returned. And the failover status was again on Normal (Waiting) for a couple of monitored logical interfaces.
    I was able to workaround the problem as described above.

  • HT2513 URL in iCal are always displayed in plain text when viewed in iCal but as URL if sent to an Outlook account. Does anyone know if this is expected behaviour?

    Does anyone know why iCal in Lion doesn't displays URL's for events, just as plain text, and why the URL window has been removed when creating a new event?

    Dear Mr. Toad (my all-time favorite ride at Disneyland ;-) ..
    Thanks so much for your detailed reply.. my netbook is in the bedroom, turned off.. I (so far) only use it in the evening, in the bedroom.. I've saved your response, and will try your suggestions, and let you know if they solve the problem I described. I really appreciate you taking the time to post such a detailed reply..
    I can't answer your Thunderbird "configuration" questions, because I'm in the living room, using the crap Vista laptop, on which I plan to install Thunderbird, and then take Windoze Mail out in the street and drive over it a few times.. I'll get back to you one way or the other, and let you know if your instructions solved the problem, or not..
    I don't understand why Thunderbird "out of the box", so to speak, simply doesn't forward HTML emails with embedded graphics, (like Outlook Excess, and Winblows Mail do).. without having to go through those steps. I personally HATE HTML email, but over the years, it's become more and more prevelant.. so it's a problem I must fix..
    Thanks again..
    Harv..

  • Validation error corrupts component tree?

    I've got a strange problem trying to use validation on input fields.
    The basic setup is as follows:
    I've got a page divided into two parts with separate h:form tags, the one holding a dataTable with some elements and the other showing the element details in inputFields once an item is selected in the dataTable via a commandLink. A commandButton on the detail side allows you to update the values of the selected item which is being reflected in the dataTable on reload. So far so good.
    Here comes the strange part:
    All the inputFields are marked required. Now once you leave a field empty and try to submit the form, you get a validation error as expected. BUT if you now select a different element from the dataTable, ONLY the field whose validation formerly failed is being updated, the other fields still show the same value as before. The backing bean method that belongs to the commandLink is being executed, and the underlying data object of the input fields is being set properly, only the values in the component tree aren't updated. This behaviour persists until you enter a valid value in the formerly invalid input field and submit. Debugging shows that as long as at least one field has had validation errors, only the getter of these backing beans properties are being invoked during render response phase, as opposed to the "normal" case where the getters of all the backing beans properties are being called.
    For some reason, the render response phase seems to ignore the other components in the component tree when there was some validation error on one or more fields.
    Another interesting observation:
    This is the behaviour if I don't specify an action attribute in the commandLink selecting an element from the dataTable, as I want to return to the same page again. But if I define a navigation case that brings me to the same page and put that into the action attribute, the problem doesn't occur. Unfortunately this is no option for me, as I'm aiming to do all this with ajax.
    I've created a simple example so you can try out yourself:
    test.jsp:
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <html>
    <head>
    <title>validator test</title>
    </head>
    <body>
    <f:view>
         <h:form id="form1">
              <h:dataTable id="table" value="#{bean.datas}" var="data" binding="#{bean.table}" border="1">
                   <h:column>
                        <h:commandLink actionListener="#{bean.selectData}" value="#{data.string1}" />
                   </h:column>
                   <h:column>
                        <h:outputText value="#{data.string2}" />
                   </h:column>
              </h:dataTable>
              </h:form>
         <hr />
         <h:form id="form2">
              <h:inputText value="#{bean.data.string1}" id="field1" required="true" />
              <h:inputText value="#{bean.data.string2}" id="field2" required="true"/>
              <h:commandButton value="submit" />
         </h:form>
    </f:view>
    </body>
    </html>Bean.java:
    needs to be defined in faces-config.xml as bean "bean" with session scope
    import java.util.ArrayList;
    import java.util.List;
    import javax.faces.component.html.HtmlDataTable;
    import javax.faces.event.ActionEvent;
    public class Bean {
         private Data data;
         private List<Data> datas;
         private HtmlDataTable table;
         public Bean() {
              datas = new ArrayList<Data>();
              datas.add(new Data("data1value1","data1value2"));
              datas.add(new Data("data2value1",""));
         public void selectData(ActionEvent event) {
              data = (Data)table.getRowData();
         public List<Data> getDatas() {
              return datas;
         public Data getData() {
              return data;
         public void setData(Data data) {
              this.data = data;
         public HtmlDataTable getTable() {
              return table;
         public void setTable(HtmlDataTable table) {
              this.table = table;
         public class Data {
              private String string1;
              private String string2;
              public Data(String string1, String string2) {
                   this.string1 = string1;
                   this.string2 = string2;
              public String getString1() {
                   return string1;
              public void setString1(String value) {
                   string1 = value;
              public String getString2() {
                   return string2;
              public void setString2(String value) {
                   string2 = value;
    }My system setup:
    WinXP Professional
    JDK 1.6.0-b105
    Tomcat 5.5.20 (also tried 6.0.7)
    JSF RI 1.1.02_b08 (also tried 1.2_04-b10-p01, different but anyway not expected behaviour with MyFaces 1.1.5)
    Thanks for any input,
    Harry.

    Is there noone here who can tell me if this is behavior like specified or if I miss some point?
    A possible solution seems to be telling JSF programmatically to rebuild the view root. Does anyone if this is possible?

  • How to stop attribute level validation when entity validator fails?

    Hi,
    Can you suggest any way to achieve the desired behaviour on the following scenario.
    Table contains the following columns
    1. Grade
    2. Grade Rate
    3. Status
    Constraints:
    1. Grade and Grade Rate together must be unique.
    2. Grade and Grade Rate are mandatory fields.
    Implementation:
    1. Have Mandatory validator at attribute level for Grade and Grade Rate by default.
    2. Alternate key is defined based on Grade and Grade Rate and added the same as Entity validator.
    User operation scenario:
    User adds a row in a table, entered 'GradeOne' as Grade, tabbed out and then entered '5 %' as Grade Rate (Existing row of the VO has a row with similar data already). When user try to navigate to other row, both validation at attribute level and entity level fires and gives the following error messages.
    Error Msg 1. Grade and GradeRate should be unique.
    Error Msg 2. Attribute GradeRate is required.
    Expected behaviour:
    I can understand the reason why ADF throws both the errors (coz it didn't consider the invalid value of GradeRate posted into attribute), but the error messages confuses the user. It would be great if he get only one error message in this scenario (i.e. Unique validation alone)
    Question:
    How can I restrict in such a way that only one error validation happens in a request (i.e. either attribute level or entity level or in a particular order}
    Thanks in Advance.

    Hi,
    the reason ADF does this is for performance. What if you create a custom error handler in the DataBindings.cpx file and use this to suppress all other errors?
    See
    Decompiling ADF Binaries: Customizing Business Components Error Messages
    :http://www.adftutorials.com/adf-custom-error-handler-to-display-custom-message-to-user.html
    Frank

  • Validation Event Handlers

    Hi
    I have a requirement of creating a user identity in OIM 11gR2 only when few set of attributes say FirstName, MiddleName and Lastname. If this set of attributes are not exist in OIM then only we have to create the user otherwise not.
    So for this purpose we are using Validation Event Handlers, So whenever i am creating a user from OIM console the validation is working but with GTC reconciliation its not working.
    I have implemented both the validate(long eventID, long processID, BulkOrchestration orchestration) and validate(long eventID, long processID, Orchestration orchestration) methods under that event handler.
    So is it a expected behaviour that validation event handler will not work with Recon?
    Can somebody also suggest, what else we can use to satisy this requirement.
    Thanks in Advance

    In this case the values can be null also..So i dont think we can use Required attribute option.
    Let me know if you have some diffrent thought on this?

Maybe you are looking for