Required attribute and cancel action

How am I supposed to handle the following case (simplified):
<h:inputText required="true" value="#{somebean.property}" />
<h:messages />
<h:commandButton type="submit" value="Cancel" action="cancel" />
The "cancel" action is configured in faces-config.xml to navigate to another page and works like expected without the "required" attribute.
But if I include the "required" attribute I get a validation error message and the navigation to the wanted page does not take place.
Michael

For action like "cancel" I would recommend to use attribute "immediate"
<h:commandButton action="cancel" value="Cancel" immediate="true"/>Vladimir

Similar Messages

  • [JClient 9.0.3] Trapping events and canceling actions

    Subject: [JClient 9.0.3] Trapping events and canceling actions
    I'd like to be able to, based on some condition, abort certain
    actions (navigate, delete, insert, etc, etc) when the appropriate
    events have been fired.
    E.g., in case the Transaction is dirty and when I navigate to a
    certain row in a certain ViewObject instance, I would like to
    intercept this action and let the user decide what to do:
    Commit/Rollback/Cancel. Of cource when 'Cancel' is selected, the
    navigation-action should be aborted at all.
    I have realised this functionality by subclassing JUNavigationBar
    and either calling super's actionPerformed() or not. This works
    perfectly, but of course there are other means to navigate (a
    JComboBox + NavigationBinding, a JTable or programmatically), so
    I would need to implement similar functionality for each of these
    component types.
    So, what I need to do is to intercept these actions on a lower
    level. It appears that I need to register RowSetListeners to
    ViewObject instances, but as far as I can tell, this way there
    isn't a real way to abort these actions once they are started.
    Am I pherhaps overlooking something? Any help and/or suggestions
    would be greatly appreciated.
    Arno

    Subject: [JClient 9.0.3] Trapping events and canceling actions
    I'd like to be able to, based on some condition, abort certain
    actions (navigate, delete, insert, etc, etc) when the appropriate
    events have been fired.
    E.g., in case the Transaction is dirty and when I navigate to a
    certain row in a certain ViewObject instance, I would like to
    intercept this action and let the user decide what to do:
    Commit/Rollback/Cancel. Of cource when 'Cancel' is selected, the
    navigation-action should be aborted at all.
    I have realised this functionality by subclassing JUNavigationBar
    and either calling super's actionPerformed() or not. This works
    perfectly, but of course there are other means to navigate (a
    JComboBox + NavigationBinding, a JTable or programmatically), so
    I would need to implement similar functionality for each of these
    component types.
    So, what I need to do is to intercept these actions on a lower
    level. It appears that I need to register RowSetListeners to
    ViewObject instances, but as far as I can tell, this way there
    isn't a real way to abort these actions once they are started.
    Am I pherhaps overlooking something? Any help and/or suggestions
    would be greatly appreciated.Yes you're right in saying that there are many ways one could perform navigate - by other controls, by calling next() on the VO or even on the RowSetIterator. Also BC4J does not generate 'events' before navigation to preempt navigation unless a row is 'modified' in which case RowValidation events are generated for the Entities modified in that row.
    The most generic way you may fix this is by 'listening' to rowsetiterator's navigation events and get the PreviousRow from the navigation events and set focus back to it if user presses cancel, or get the current RowKey and let the user commit/rollback and then restore the currency to a row with that rowkey (just in case the MT is set to clear all caches on commit/rollback transaction boundaries). Note that insert/delete events should not be handled this way as those event points are usually generated due to a button action and it's easier to preempt these actions rather than 'let the actions' complete and then perform a rollback-to-a-particular-point.
    Arno

  • Mass Transaction to delete a Transfer Requirement (TR) and cancel TO

    Hi All,
    I would like to know of any mass transaction or function module that can delete bunch of Transfer Requirements (TR). Currently using LB02 to delete each TR.I would also like to know a way to cancel the confirmation of bunch of TOs. We are currently using LT15 to cancel each TO manually.
    This is required during production support to clean-up some bad data in Prodn System.
    Thanks.

    Hi Ranga,
    Thanks for a quick reply.
    I cannot use storage type to cancel the TO confirmation, because all the TOs that I am trying to clean-up do not belong to the same storage unit. I have a bunch of TO numbers which I would like to clean-up.
    Regards,
    Swapnil

  • Question on Required Attribute Behavior

    I am having difficulty understanding what the correct behavior of a "required attribute" should be. Im using 9ifs.
    Using the Java API, I created a new content type derived from DOCUMENT, named it CLASSIFIED_DOCUMENT, associated a new file extension "cla" with it, and created a new required attribute called "Security_Level". From ifsmgr, I can see the new type and see that Security_Level
    is a required attribute. When I upload a file with the "cla" extension from the Viewer, it is entered into the database and correctly associated with the CLASSIFIED_DOCUMENT content type. So far so good.
    However, I have not supplied a value for the required attribute, and nothing complains that the Security_Level field is null. It seems to me that IFS should not allow the item to be entered into the database without this required attribute having a value, or perhaps a dialog box should pop up which forces one to enter values for required attributes before the instance of CLASSIFIED_DOCUMENT is entered into the database. Lacking that, an invalid instance is silently slipped into the DB...
    So on to my specific questions:
    How does one enter required attribute data when uploading using the Viewer?
    Shouldn't IFS be complaining when a CLASSIFIED_DOCUMENT is uploaded without Security_Level being set?
    Will required attribute constraints also be "ignored" when performing a programmatic file creation
    (similar to the "Hello World" example) of an instance of CLASSIFIED_DOCUMENT?
    Do I need to do other things when creating a required attribute using Java that will actually cause the attribute to be, well, REQUIRED?
    Is there a RTFM answer to this, and if so, can some kind soul please point me to the correct FM to R? I have the Developer's Guide and the IFS javadocs. The Guide has good examples but is woefully inadequate if you want to do something different from the examples. The jovadocs are of course good reference material but have nothing in the way of "application notes". I have looked at the
    example code and it suffers from the same shortfall as the Guide: if you want to do something different from what is in the example code, you're on your own!
    Is there a document that I should be reading but have missed?
    Thank you,
    Jeff Rininger

    Hi Jeff -
    Thanks for the feedback.
    REQUIRED attributes are exactly what you describe: they are a way to ensure an attribute has a non-null value when a new object is created or when that attribute is updated in an existing object.
    From an API perspective, in creating a new object, that value can be supplied in three ways: explicitly by setting an attribute in the LibraryObjectDefinition, through a VALUEDEFAULT on the attribute, or (advanced topic) through custom server extensibility code.
    One thing to keep in mind: REQUIRED checks are (intentionally) not performed in administration mode. You might want to try creating an object as a non-admin user. That should cause the check to be performed.
    David Pitfield
    Oracle

  • You don't have Add and Customize Pages permissions required to perform this action - but i do!

    Hello.
    I am having a similar problem to the one described by this post here:
    http://kiruthik.com/2010/10/05/YouDontHaveAddAndCustomizePagesPermissionsRequiredToPerformThisAction.aspx
    However, his resolution of changing web.config under wwwroot did not fix my issue.
    Here is the situation on a recently upgraded SP2010.
    1) Create a document library. Set the document template to "basic page"
    2) give a user full control on the document library.
    3) Go, under that users credentials, to the document library and create a new document.
    4) Name the document whatever and hit create
    5) a page is displayed which says the following: "Web Part Error:
    A Web Part or Web Form Control on this Page cannot be displayed or imported. You don't have Add and Customize Pages permissions required to perform this action."
    6) Become confused as giving someone "full control" on the library should obviously inherit the permissions to when they create a document and try and edit it.
    If i give the user "full control" on the entire site (site actions -> site permissions), then the document pops open an editor which would allow you to add content to the basic page. Obviously, i do not want to give users full control to the
    entire site :)
    Giving the user  "Add and Customize Pages" permissions on the entire SITE allows them to edit get the popup to edit the file, but this is not desireable either since then they could "Add, change, or delete HTML pages or Web Part pages,
    and edit the Web site using a Windows SharePoint Services-compatible editor.". I do not want them to edit any web pages, i just want them to edit a particular lists webpage!
    Things i have tried:
    - Set the permissions on the "MSContentEditor" webpart to have the user have full control of the web part.
    - set the permissions on ALL the web parts to have the user have full control (permissions on the web parts list)
    - Edited web.config to add a line to mark "contentEditorWebPart" as safe, and then restarted IIS.
    - Recreated test lists and was able to duplicate the behaviour
    So I am wondering, is this a sharepoint bug or what? Should a web part not inherit the permissions of the list it is working in? if not, what are the exact items i need to set permissions on to get this webpart to display correctly?
    Setting global site permissions is not an option.
    Another workaround is to make a "wiki page library" which allows you to copy and paste text into a static page, and also edit that text. I can move all the content over to a "wiki page library", and thats what i probably will end up doing
    in the end, but its annoying because there is alot of content to move, and it all has to be done by hand as you cannot upload documents to a wiki afaik. Also the wiki uses a different editor, its inline instead of a popup in IE which is probably why it is
    working.
    This may not be a bug and could be a simple permissions problem or something else, but i have been looking at this for hours and it doesnt make any sense to me.
    Any help appreciated thanks!

    Hi,
    Yes, you must have “Add and Customize Pages” permission
    from site level to perform this action, the permission is not in list permission level.
    You can add a new permission level which only includes “Add and Customize Pages” permission, and then create new SharePoint group with this permission
    level.
    Add the users into the SharePoint group and these users will get the “Add and Customize Pages” permission
    from site level.(site permissions)
    Additionally to add/edit page, the users also need the permission level “Contributor” in list permission level.
    (you should know when you grant the full control to the users in list permission level, the users won’t get the permission from site level)
    If you need further help, please let me know.
    Hope this helps
    Thanks!
    Stanfford
    Everything will be fine.

  • Check Required Elements and Attributes in JAXB

    Hi
    I need check required elements and attributes in JAXB java classes , if there are any value for them place it , otherwise place default value in xml file , because of it I upgrade JAXB2.0 to JAXB 2.1 to support "required" in "XmlElement" , I read in "JavaWS(JAXB)Tutorial.pdf" that JAXB itself check required elements and attributes , if there are any value for them place it , otherwise place default value in xml file , the exact part of document is :
    << A property is said to have a set value if that value was assigned to it during unmarshalling or by invoking its mutation method. The value of a property is
    its set value, if defined; otherwise, it is the property’s schema specified default value, if any; otherwise, it is the default initial value for the property’s base type as it would be assigned for an uninitialized field within a Java class. >>
    I want to know , dose JAXB do this task ? (now I work with JAXB2.1 but it doesnt do this task.Maybe I must set some configuration)
    and if JAXB doesnt do it , how I can check required elements and attributes in JAXB ?
    Please help me.
    Shariat

    its all on Apple's Developer site
    http://developer.apple.com/DOCUMENTATION/AppleApplications/Reference/FinalCutPro _XML/index.html

  • Access the Attributes and Actions tabs in AME

    Hi All,
    I am trying to setup the approval process using 'Oracle Approval management'. But I am unable to access the Attributes and Actions tabs in the application.
    Can someone help me how to resolve this issue ? Is there any profile option or setups to be done ?
    Regards
    Jhansi

    Are you on 11.5.10?
    Which responsibility you are using?
    On 11.5.10 try with AME Application Administrator responsibility.

  • Problem with "required" attribute in inputBox

    Hi ,
    I have a requirement where a input field needs to be populated using lookup.
    I am using commandButton to populate the input field.Since I dont want user to type anything in this input Field , I have made this field readOnly.
    This is a mandatory field so I have put required attribute true.But on the click of submit button this validation does not trigger.If I make remove readOnly attribute or make it false, the validation triggers.Here is the snippet for this part.
    <afh:rowLayout>
    <afh:cellFormat halign="right" >
    <af:commandButton id="lookupFrom_buttonId" text="From Mfg:"
    action="dialog:company.selectBox"
    immediate="true" windowWidth="390" windowHeight="550"
    launchListener="#{mfgReassignBean.addParameter}"
    returnListener="#{mfgReassignBean.returnFromMfr}"
    partialSubmit="true" useWindow="true"
    >
    </af:commandButton>
    </afh:cellFormat>
    <af:inputText
    partialTriggers="lookupFrom_buttonId"
    readOnly="true"
    required="true"
    binding="#{mfgReassignBean.fromDeveloperInput}"
    value="#{mfgReassignBean.assignmentRule.fromMfgName}"
    />
    </afh:rowLayout>
    has anybody faced such situation...any suggestions ?
    Thanks!!

    disabled and readonly fields are discarded from the JSF stack and thus not validated! Options are: make readonly field not readonly on form submit or copy readonly field to hidden field (both involve client side javascript)

  • Custom Tag is missing required attribute property

    Hello,
    Here is my struts config file source;
    <global-forwards>
              <forward name="mainpage" path="/index.jsp">
              </forward>
              <forward name="CustomerDetailsForward" path="/GoToCustomerPage.do">
              </forward>
         </global-forwards>
         <!-- Action Mappings -->
         <action-mappings>
              <action path="/SubmitCustomerForm" type="action.SubmitCustomerForm" name="CustomerForm" scope="request" validate="true" input="/CustomerDetails.jsp">
                   <forward name="success" path="/Success.jsp">
                   </forward>
                   <forward name="failure" path="/Failure.jsp">
                   </forward>
              </action>
              <action path="/GoToCustomerPage" type="org.apache.struts.actions.ForwardAction" parameter="/CustomerDetails.jsp">
              </action>
         </action-mappings>
    And my index.jsp source;
    <html:html>
    <head>
    <html:base/>
    </head>
    <body>
    <html:button></html:button>
    <html:link forward="CustomerDetailsForward">Go To Customer Form </html:link>
    </body>
    </html:html>
    And here is the error;
    Error Message:JSPG0227E: Exception caught while translating /index.jsp: /index.jsp(13,1) --> JSPG0006E: Custom Tag is missing required attribute property
    Root Cause:com.ibm.ws.jsp.translator.JspTranslationException: JSPG0227E: Exception caught while translating /index.jsp: /index.jsp(13,1) --> JSPG0006E: Custom Tag is missing required attribute property     at com.ibm.ws.jsp.translator.visitor.validator.ValidateVisitor.visitCustomTagStart(ValidateVisitor.java:304)     at com.ibm.ws.jsp.translator.visitor.JspVisitor.processJspElement(JspVisitor.java:267)     at com.ibm.ws.jsp.translator.visitor.JspVisitor.processChildren(JspVisitor.java:309)     at com.ibm.ws.jsp.translator.visitor.JspVisitor.processJspElement(JspVisitor.java:268)     at com.ibm.ws.jsp.translator.visitor.JspVisitor.processChildren(JspVisitor.java:309)     at com.ibm.ws.jsp.translator.visitor.JspVisitor.processJspElement(JspVisitor.java:139)     at com.ibm.ws.jsp.translator.visitor.JspVisitor.visit(JspVisitor.java:121)     at com.ibm.ws.jsp.translator.JspTranslator.processVisitors(JspTranslator.java:121)     at com.ibm.ws.jsp.translator.utils.JspTranslatorUtil.translateJsp(JspTranslatorUtil.java:181)     at com.ibm.ws.jsp.translator.utils.JspTranslatorUtil.translateJspAndCompile(JspTranslatorUtil.java:83)     at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.translateJsp(AbstractJSPExtensionServletWrapper.java:349)     at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper._checkForTranslation(AbstractJSPExtensionServletWrapper.java:317)     at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.checkForTranslation(AbstractJSPExtensionServletWrapper.java:226)     at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.handleRequest(AbstractJSPExtensionServletWrapper.java:131)     at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionProcessor.handleRequest(AbstractJSPExtensionProcessor.java:270)     at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:308)     at com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.handleRequest(DefaultExtensionProcessor.java:472)     at com.ibm.ws.wswebcontainer.extension.DefaultExtensionProcessor.handleRequest(DefaultExtensionProcessor.java:111)     at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3129)     at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:238)     at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:811)     at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1433)     at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:93)     at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465)     at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:394)     at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:274)     at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)     at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)     at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:152)     at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:213)     at com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsyncFuture.java:195)     at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)     at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:194)     at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:741)     at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:863)     at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1510)

    volkov wrote:
    Error Message:JSPG0227E: Exception caught while translating /index.jsp: /index.jsp(13,1) --> JSPG0006E: Custom Tag is missing required attribute propertyWhich is line 13 then? And check the syntax for that tag.

  • Bulk import error - Missing required attribute ‘fullname’

    Folks,
    I am having trouble trying to bulk import some users.
    I have the following file for import (cut down from what I really want to import):
    command,user,waveset.resources,password.password,password.confirmpassword,global.firstname,global.lastname,global.fullname
    Create,”user1”,”myLDAPresourcename”,”passwd”,”passwd”,”myfirstname1”,”mysurname1”,” myfirstname1 mysurname1”This works using “Accounts->Launch Bulk Actions” with Action set to “From Action List” and everything else on that page left at the default value. The correct data appears in IDM and the LDAP resource.
    Now if I try to import the following file, in which the user does not have a first name, I get in to trouble:
    command,user,waveset.resources,password.password,password.confirmpassword,global.firstname,global.lastname,global.fullname
    Create,”user2”,”myldapresourcename”,”passwd”,”passwd”,””,”mysurname2”,”mysurname2”
    The error message is:
    com.waveset.Util.WaveSetException: An error occurred adding user ‘uid=user2,…..’ to resource “myLDAPresourcename”.
    com.waveset.util.WavesetException:  Missing required attribute ‘fullname’Clearly the import file contains a column for ‘fullname’ (column 8) and a value for ‘fullname’ in the only row of data “mysurname2”. As far as I am concerned it is perfectly valid for a user not to have a ‘firstname’; but they must have a ‘fullname’.
    I have tried using an import file without a value for ‘fullname’, but with a ‘firstname’ and ‘lastname’ like this
    command,user,waveset.resources,password.password,password.confirmpassword,global.firstname,global.lastname,global.fullname
    Create,”user3”,”myLDAPresourcename”,”passwd”,”passwd”,”myfirstname3”,”mysurname3”,””This works. The correct data appears in IDM and the LDAP resource and IDM has generated a ‘fullname’ value of “{Firstname} {Surname}”. Trying to leave out the ‘firstname’ and the ‘fullname’ gives the same error as above.
    The configuration of my resource (in summary) is
    objectclasses:
         top
         person
         inetOrgPerson
    Account Attributes:
         accounted     -> uid               [required]
         password     -> userPassword
         firstname     -> givenname
         lastname     -> sn               [required]
         objectClass     -> objectClass
         fullname     -> cn               [required]
    As an experiment I have tried reconfiguring the resource so that ‘fullname’ is not marked as required.
    Importing user1 and user3 still works and still creates the correct data in IDM and the LDAP resource.
    Importing user2 now gives a different error:
    com.waveset.Util.WaveSetException: An error occurred adding user ‘uid=user2,…..’ to resource “myLDAPresourcename”.
    javax.naming.directory.SchemaViolationException: [LDAP: error code 65 – Object Class Violation]I don’t understand why, during the import of a user without a ‘firstname’ IDM will not generate a ‘fullname’ or use the supplied ‘fullname’.
    Can anyone help?
    Regards,
    Gavin

    After further testing it turned out that I couldn't create a user without a firstname from the IDM GUI and this in turn was because of the way fullname was generated by the user form.
    I've got the user form changed and now user creation (from the GUI and via bulk import) is working as hoped.

  • Approve and Cancel Button

    In the HR portal,When the user requests for a booking , The Manager Can Approve or Cancel that booking based on the Requirement.But In HR portal,when the manager is logged in, when he opens the booking .it is just showing the Forward and cancel assignment Buttons.But there should be Approve and Reject buttons with the same.Can any please give me an idea about this.How can I get a solution for this.

    Try WF_NOTIFICATION API.
    http://etrm.oracle.com/pls/trm11510/etrm_pnav.show_object?c_name=WF_NOTIFICATION&c_owner=APPS&c_type=PACKAGE
    http://etrm.oracle.com/pls/et1211d9/etrm_pnav.show_object?c_name=WF_NOTIFICATION&c_owner=APPS&c_type=PACKAGE
    HOW TO PRINT ATTRIBUTE VALUES ON SUBJECT LINE [ID 351096.1]
    Is it Possible to Create on the Fly a Message Attribute for Showing it as a Document Attachement in a Notification? [ID 973710.1]
    API to reject APINV workflows when upgrading from 11.5.10.2 to R12
    Thanks,
    Hussein

  • Transaction attributes and isolation not working as expected why ? !

    I have three beans participating in a TX
    SeatBean ---- entity (BMP)
    Res --------entity (BMP)
    AgentBean --- session (SFSB)
    AgentBean has bookSeat (seatNumber, amount) method that is being called by the client.
    The Agent bean bookSeat (seatNumber, amount) method locates the seat bean with the given seat number if the booked field is null (means the seat is open for booking)
    It sets the values for booking the seat (inserts a new record in Res table using ResBean and updates the Seat table using SeatBean )
    In the AgentBean I make a check if the booked filed is Y or null.
    If the field is Y it throws a RemoteException.
    I gave Tx attributes in the ejb-jar.xml for ALL the beans as follows
    In ejb-jar.xml <trans-attribute>Required</trans-attribute>
    In weblogic-ejb-jar.xml
    <transaction-isolation>
         <isolation-level>TRANSACTION_REPEATABLE_READ</isolation-level>
    I opened two windows as use1 and user2
    User1 makes search for a seat finds seat1 is not booked
    User2 makes search for a seat finds seat1 is not booked
    User1 books the seat
    User2 books the seat (user2 action is initiated immediately after user1 initiates the action)
    Use1 and user2 actions are successful. There are two records in Res table.
    The seat table reflects the last changes. i.e user2 action.
    My questions are
    1.user2 should not get any search result till user1 intiated TX is complete
    ( i.e user2 should got get any search result till user1 commits or roll back because TRANSACTION_REPEATABLE_READ )
    Why is that not happening?
    2.Since user1 books the seat for customer1 and sets booked = Y in seat table
    user should not be able to book the seat. but user2 actions are reflecting in DB.
    What is going wrong?
    Can any one explain?

    The following szenario will executed as follows:
    User1 makes search for a seat finds seat1 is not booked
    User2 makes search for a seat finds seat1 is not booked
    User1 books the seat
    User2 books the seat
    Use1 and user2 actions are successful. There are two records in Res table.1.) Agent Bean is a session bean with CMT:
    User1: | AgentBean.searchNotBookedSeats()
    Tx1 | call other EJBs with the same transaction
    | context (required)
    v <-- return
    **) at this point the transaction is finished, the
    isolation level is not used
    User2: | AgentBean.searchNotBookedSeats()
    Tx2 | call other EJBs with the same transaction
    | context (required)
    v <-- return
    User1: | AgentBean.bookSeat(...)
    Tx3 | Res.create(..) same transaction context
    v <-- return
    User2: | AgentBean.bookSeat(...)
    Tx4 | Res.create(..) same transaction context
    v <-- return
    In this case there are four transaction used. The easiest way to
    prevent that there exists more than one reservation for one seat is
    to use a database constraint. That's the way I would solve the
    problem.
    Here is another solution:
    2.) Agent Bean is a stateful session bean with BMT and the isolation
    attribute is higher or equal REPEATABLE_READ:
    User1: | AgentBean.searchNotBookedSeats()
    Tx1 | call other EJBs with the same transaction
    | context (required)
    v <-- return
    **) the method starts a transaction but does not
    finish it.
    User2: | AgentBean.searchNotBookedSeats()
    Tx2 | call other EJBs with the same transaction
    | context (required)
    v <-- return
    **) this method blocks until Tx1 will be finished
    User1: | AgentBean.bookSeat(...)
    Tx1 | Res.create(..) same transaction context
    v <-- return
    **) the method finish the transaction
    User2: | AgentBean.bookSeat(...)
    Tx2 | Res.create(..) same transaction context
    v <-- return
    In this case the isolation level will be used. The whole system is
    blocked for the time between searching and booking a seat.
    Thats not very good :-(
    Best Regards and mery christmas
    Markus

  • Problem with the "required" attribute in input_text (in 1.0 beta)

    Suppose you wanted to display a more meaningfull message instead of the default "Validation Error: Value is required", e.g. "Please enter your e-mail address". Looks like the only way to do this is to write a custom validator. However, if required="true" in the input_text, you will get the default message, if you don't set "required", your custom validator is not called at all.
    This is something that needs to be addressed, because it will be very common to want to have meaningfull error messages (I can't imagine somebody will approve a commercial application which will display messages like "Validation Error: Value is required").
    As a workaround, I tried setting an error message in the action handler, but I can't seem to get the component from within the bean code. In the action method I have:
    FacesContext context = FacesContext.getCurrentInstance();
    UIInput component = (UIInput) context.getViewRoot().findComponent("testInput");where testInput is the id of the input_text - findComponent() returns null.
    P.S. Btw, I noticed that now in 1.0 the ids look like this id0:testInput which is a really bad choice if you have to write any JavaScript handler, e.g. onClick(), since id0:testInput is not a valid JavaScript variable name. You can still find it by going through all the document.forms[0].elements[n].name and set it up that way, but it's a hassle.

    Thanks,
    findComponent("formName:inputName")worked fine.
    But still, I think that if you have a custom validator
    it should be called regardless of whether there is
    something in the input or not (or maybe bypass the
    default validation if "required" attribute is set, but
    there is a custom validator), because that's the only
    way you can change the default "Value required"
    message using a validator. If you have to check it in
    the action method, you might as well do the whole
    validation there, which makes validators pointless.The expert group considered this decision carefully, and concluded that the current behavior was the best -- if there is no input data, skip any specified validations -- because of the likelihood for things like null pointer exceptons in validators that are not prepared for this scenario.
    One approach to dealing with this if you would prefer different behavior for your own components is to subclass UIInput and override the validate() method to do something different.
    Craig

  • Open and cancelled Quote Report

    Hi,
    Can anyone give me the information  for getting open and cancelled Quote Report?

    I hope you are using reason for rejection for cancelling quotations. If that is the case, you can use transaction VA25 to view the list of quotations. Here you can filter on two columns status and reason for rejection to view the report as per your requirement.
    Regards,
    GSL.

  • I have ordered an i-pad and cancelled it the other day. I have used my indian debit for that order. So money got debited immediately. Apple has sent an email saying that it is successfully cancelled. But money is not yet credited into my account.

    i have ordered an i-pad and cancelled it the other day. I have used my indian debit for that order. So money got debited immediately. Apple has sent an email saying that it is successfully cancelled. But money is not yet credited into my account. please let me know what is happening. I cancelled the order on April 9th. Its already been more than 15 days.

    Your best corse of action would be to either email apple support or ring them giving them your debit I'd and the order number where they will be able to look at what's wrong and set u going on the right track

Maybe you are looking for

  • Having trouble using my 9720 connecting to car hands free kit

    Hi, i am utterly frustrated with my company blackberry 9720 phone. The trouble i am having is with the car hands free kit, my skoda superb uses the bluetooth premium and cannot use the normal hands free setting like with my Iphone. The problem i am h

  • IDVD will not burn DVD or preview

    I made a DVD in IDVD and burned a DVD last week. I went back into IDVD to replace some photos and movies and when I tried to burn another DVD, the wheel spins and the progress screen comes up but does not progress or burn. I tried different DVDs but

  • Does Apple plan to make an iPod Touch 5th Generation in the future?

    I have not seen news that Apple plans to make a fifth generation iPod Touch. I am wondering if anyone has news that can help? I heard that Siri will not be included. Is it true? Will they have 3G or 4G like the iPad? Thanks a lot!

  • Assessable value not maintained for the material X

    Dear all, i have maintained material chapter ID,Plant and materialchapter id  combination ,assessable value , cenvat determination, and vendor excise details in the transaction J1ID . Even after maintaining all these conditions , i am not able to sav

  • Managing authorization for IC web client

    Where can we find autorization objects used for the IC web client ? - I cannot find any documentation on this topic. - There's no transaction code and by the way no SU24 definition. - Declaring the IC WEB BSP in transaction PFCG, no object are associ