Update model, even when required field(s) is/are empty

Hello,
A rather exotic question. :-) EDIT: using JDEV 11.1.1.4
Suppose you have a form that consists of inputTexts and some of them are required (required = true). These come from a data control that is based on a BPM Human Task.
What my customer wants is two buttons: one submit button, and one save button.
The submit button behaves normally: when a required field is not entered, a validation error is shown.
The save button on the other hand, will perform a model update without complaining, even though some required fields could be empty. This would be the Save operation on the BPM Data Control: the values that the user entered are saved (in the BPM engine), but the process does not continue. It's like saving a draft version of the fields you entered, so you can continue filling in the form for example the next day.
How can I achieve this? Where I have gotten so far:
*) If I do not make the "Save" button "immediate", then the client side validation will keep on complaining about the empty required fields.
*) If I make the "Save" button "immediate", then the client side validation is skipped. But the Update Model Values phase is also not executed, so values that the user entered are not stored in BPM. Too bad.
My plan now is making the button immediate, and then overriding page life cycle in case the Save button is pressed. I already created my own implementation of oracle.adf.controller.v2.lifecycle.PagePhaseListener. In the afterPhase() method, I then wanted to check if the current phase is the "Apply request Values" phase (if the button is immediate, then this is the last phase before the "Render Response" phase), and if so, manually call the updateModelValues phase, like this:
    public void afterPhase(PagePhaseEvent pagePhaseEvent) {
        int id = pagePhaseEvent.getPhaseId();
        if(pagePhaseEvent.getPhaseId() == 10 && <user has clicked the SAVE button, not the Submit button>){ // APPLY REQ VALUES
          LifecycleContext ctx = pagePhaseEvent.getLifecycleContext().getCurrentInstance();
          ctx.getPageController().processUpdateModel(ctx);
    }The <user has clicked the SAVE button, not the Submit button> condition will be done through a variable on session scope that is set to true/false depending on the button (save or submit) that was pressed, by using a setActionListener on that button.
Unfortunately, the model is still not updated and I'm kind of stuck... Can anyone help me?
Am I barking up the wrong tree and can this be done a lot easier, or what am I missing?
Thanks a lot!
Edited by: user13805808 on Jan 31, 2011 6:29 AM

Hello Frank,
Thanks for your quick reply.
The application is actually a bounded task flow that is based on a human task. So after selecting the human task, JDev automatically creates a task flow, and the Data Controls required to show, update, reject, approve, ... the task.
What I do next is drag & drop the payload of the task from the Data Control Palette to my page, and I create buttons for all the necessary operations (such as approve, reject, ...), also from the Data Control Palette. If you then deploy the application, it is automatically associated with the human task, and the page is shown in the Worklist application after selecting an instance of the task.
The operation that I am interested in is called "update", which basically, through the ADF Data Control and ADF model, sends the updated fields back to the BPM engine and saves the updated fields there (in memory, or in the DB, I don't know, but this doesn't matter). This operation is provided by default when creating a task flow based on a human task, and works perfectly if there are no required fields, or if all required fields are submitted. So "temporarily" saving the fields is not the issue.
What I want to achieve now, is have some fields that are required when the user clicks "approve" (one of the basic operations on a task), but optional with the user clicks "update" (another basic operation of a task). Approve would make the process itself continue and the task would no longer be assigned to the user. Update on the other hand would just update the payload in the BPM engine, but the task remains assigned to the user and the process doesn't continue. So if the user logs in at some point later in time, this task (with updated fields) will still be available in his inbox.
The first thing I noticed is that client side validation cannot be disabled anymore in ADF 11g, so the "update" button has to be set to immediate to avoid the validation of the required fields at client side. But if the "update" button is immedate, then the update model values phase in the page life cycle is skipped, so the data that the user entered is never submitted to BPM. Whereas if I set the "update" button to immedate="false", this works just fine. If all required fields are entered, that is. :-)
So - in my opinion - there would be 2 possible approaches if there are fields that should be required for the "approve" operation and optional for the "update" operation.
- Disable the client side validation and don't set the update button to immediate
- Make the "update" button immediate, but force the lifecycle to still perform Update Model Values, if the "update" button is used
The second approach would be the cleanest, but I'm unable to figure out how to do this... I'm a little bit lost in all the classes that are available. :-)
I hope this clarifies my problem...
Regards,
Chris
Edited by: ChrisSchryvers on Feb 1, 2011 4:21 AM

Similar Messages

  • My iPhone 4 suddenly cannot update apps even when my ID and password are correct. It tries to update but cannot connect.

    Any one has an idea?

    Try This...
    Close All Open Apps... Sign Out of your Account... Perform a Reset... Try again...
    Reset  ( No Data will be Lost )
    Press and Hold the Sleep/Wake Button and the Home Button at the Same Time...
    Wait for the Apple logo to Appear...
    Usually takes about 15 - 20 Seconds... ( But can take Longer...)
    Release the Buttons...

  • I had to reinstall Win 7 and PS CS5, and the updates fail even when opened using 'run-as-admin'. Why?

    The title says it all ...
    I had to reinstall Win 7 and PS CS5, and the updates fail even when opened using 'run-as-admin'. Why?

    If you are using Help 》updates, it is outdated. You can however go to Product Updates on the Adobe.com website and download your updates there. I am not at my desk b<t when I get back, I'll get the links unless someone else can do that sooner.

  • Why does firefox update itself even when i tell it not to? Everytime it updates itself it messes up and crashes, make it stop. I like firefox but if I keep having to unistall and reinstall it ever month to every other month I am going to be done with it

    Fire Fox updates itself even after I tell it not to. The new version it updates to crashes, adobe flash player doesn't work on it and it takes forever to load when it does work. I have used fire fox for years now but if this keeps up I will find something else to use.
    == This happened ==
    A few times a week
    == When you came out with fire fox 6.6 or whatever

    I also have this problem of Firefox updating by itself even when I turn off auto-update.
    For whatever reason, there are situations where you do not want to update or download a large file, because you're working offline, have a slow connection, or have a very low download allowance etc. Usually the update doesn't work and cause Firefox to crash. After that it cannot be started again. This is with Firefox Portable but I think I've had this problem the normal Firefox. With the portable version I can just back up a single folder but it is still time wasting and annoying.
    I've noticed that when I start Firefox with auto-update turned off, it changes the options to auto-update, it also does this periodically. So every time I start Firefox I have to turn off auto-update, and I have to do this from to time because Firefox will by itself turn back on the auto-update.

  • Form problem: no error when required field blank

    I created a form on my Mac and emailed it to a colleague using a PC. He filled it out and sent it back. Several fields that had been marked "required" were blank, and he said he had received no error message.

    Hi,
    MAke sure there are no entries for application 03 in LBWQ, if you are using Queue delta update mode.
    Make sure there are no entries for application 03 in Sm13, if you are using V3 unserialzied update mode.
    You can do this by running collective run for applicaiton 03 in LBWE.
    And also make sure there are no entries in RSA7 for DS 2LIS_03_BF.
    Regards,
    Anil Kumar Sharma .P

  • Continue to get update dialog even when I have the latest version

    I have been on the beta program for quite some time. Over the latest updates (probably at least since FF 4), I get a dialog box when I start FF telling me that an update is available even though I have the latest version. If I select the option to go ahead and do the update. It will hang forever; and not connect to the update server. I have reviewed several articles on this subject including this one [http://kb.mozillazine.org/Software_Update#Software_Update_not_working_properly http://kb.mozillazine.org/Software_Update#Software_Update_not_working_properly] . I have done an extensive search through my directories and cannot find an update folder, an update.xml, or active-update.xml file in any location, especially in the C:\Users\<user>\AppData\Local\Mozilla\Firefox directory or in the install directory. I have even attempted doing a clean install by uninstalling and completely removing the install directory. None of this has worked. I have noted in my search that others seem to have this problem as well. Additionally, I have this problem on both my work and home computers that are running Windows 7. However, I don't have this issue on my Mac. This is an annoyance; but has been going on for way too long and really needs to be addressed.

    Your heading says Adobe Reader and the explanation below says Adobe Flash. Neither of these is shown in your System Details under Plug-ins. Is this the actual computer the question is about?
    Incidentally, Firefox and Google Chrome are web browsers and not search engines. Google, Bing and Yahoo, for example are search engines.

  • Firefox "check for add-on updates" checks even when not selected, request website list for firewall blocking purposes

    I work for the Tech Department in a school district. Our student computers are locked down and all settings are reset after a restart. We have set firefox to always allow all add-ons to run and to never check for updates (we update them on a schedule we control). However, since the latest release, we have been prompted after EVERY flash AND EVERY java update that they are out of date and need to be updated. Having the students click on this every time for every affected webpage is no longer an option. We are also not interested in white-listing pages individually; instead, we would like to prevent firefox from finding the update server to prevent any further prompts.
    Please provide me with all of the websites/web addresses that "check for add-on updates" uses so we can block them at the firewall level.
    Thanks

    Part of the problem may be the recent flurry of required updates to FlashPlayer. As I understand it Mozilla took the exceptional step of blocklisting some of those FlashPlayer versions after fixes were released because there were known exploits in the wild.
    * See the blocklist
    * And flashplayers bulletins https://helpx.adobe.com/security.html#flashplayer
    Possibly you are having difficulty in keeping the software updated and so seeing valid warnings from Firefox. You appear (System info aside) to be posting using Firefox 34. The current Release is Fx35.0.1
    Possibly it would be worth you considering using Firefox ESR, that still has regular updates including backported critical security fixes, but the major version stays the same for longer and there are less frequent feature changes.
    * https://www.mozilla.org/en-US/firefox/organizations/faq/
    I will send links for a couple of other articles by Private Message.
    Steps that may be safe for an IT department may not be recommended for the average reader of this forum.

  • Update EO attributes when the corresponding VO atttibutes are calculated

    Hi All,
    An existing VO on an existing PLSQL EO when opened in Editor displays the EO table attribute fields (attribute1 - 15) as calculated. The corresponding ViewAttribute(s) in VO XML definition do not refer to the EO Attributes.
    We need to pass table attribute fields to the PLSQL API (setting the EO attributes will suffice since EO attributes are input to PLSQL API) so that they also get updated in the DB call. Setting the VO attributes does not help (probably because no mapping between VO and EO attributes). If we set these table attributes directly in the DB (via a seperate DB call), the EO PLSQL API execution resets these attributes to the old values.
    Please let me know if a solution exists.
    Thanks and Regards
    Harjan

    Hi Steve
    Thanks for the reply and apologies for my tardy follow-up.
    2 comments following your post:
    1) In the returnListener backing method I added your EL helper to set the binding directly:
    public void returnDialog(ReturnEvent returnEvent) {
      String eventNoStr = (String)returnEvent.getReturnValue();
      // eventNo.setSubmittedValue(null);
      // eventNo.setValue(eventNoStr);
      EL.set("#{bindings.EventNo.inputValue}", eventNoStr);
      // AdfFacesContext adfContext = AdfFacesContext.getCurrentInstance();
      // adfContext.addPartialTarget(eventNo);
      // adfContext.partialUpdateNotify(eventNo);
    }If I don't include the commented out lines, the fk field is not updated on the screen, nor after a submit. I understand where you're coming from with your EL helper routine here and would have expected this to update the binding at minimum (visible after a submit). Obviously as this isn't updated, the other fk fields aren't either.
    2) I've seen the ADF SRDemo approach and not a big fan as the LOV screen and pageDef through the inclusion of the calling page's iterator is not generic. This implies a LOV screen cannot be re-used across several locations in your app as it needs the hardcoded iterator from the previous screen.
    Ideally the launchListener on the calling page could pass in the EL binding string to update, and the closeDialog call on the LOV could update this setting. The other fk fields would then automagically be updated in the calling screen. I tried getting your EL helper routine to set the binding directly via EL.set("#{data.editEventBookingsPageDef.EventNo.inputValue", value); in the closeDialog routine, but no luck.
    Any suggestions?
    Thanks for your assistance,
    CM.

  • Scoll Lagging FF7.0.1: fine in safe mode, continues to lag when not even when extensions and plug-ins are disabled (reinstalled, problem continues)

    a few days ago, all web pages started to lag when scrolling. Tried safe mode and speed was restored. returned to normal mode and disabled all plug-ins and extension, however, there was no effect upon the scroll lagging. performed a complete Kaspersky virus check with no issues. Other programs on desktop (ex: outlook) are running concurrently at speed without issue. IE is not running with scroll lag.
    Oh, BTW, I don't know if it is related, but I was in China last week. and Only noticed this scroll lagging here in the US when I opened it this morning ... so, perhaps there is a site preference issue?

    If it boots OK in Safe Mode, the you want to check those possible causes outlined in this article.

  • App store tells me I have updates available, but when I get there there are no icons

    I have not updated the system it simply stopped working.

    The update server is down; try this temporary workaround
    App Store>Purchased>Select "All"
    Note: Look out for apps that have the word "Update"
    http://i1224.photobucket.com/albums/ee374/Diavonex/9c256282736869f322d4b3071bbb2 a82_zps51a6f546.jpg

  • HT201272 I am seeing a blank update tab even though badge icon says there are 6 updates due.

    I have tried restarting, resetting iphone settings all the other options as far as my understanding including signing out from itunes.
    Point to be noted though is that all the other tab are showing content as expected.

    Upgrade your browser to Firefox 8 and check
    * getfirefox.com

  • Why do I use my ipod as a camera when I lose precious photos even when I try to back up before an update! Selling my ipod at the first chance I get

    Why do I use my Ipod tiuch as a camera when lose precious photos of my granddaughter every time there is an operating system update? Even when I try to back up the ipod, I can't find the pics etc on my pc. It is very annoying and I am seriously considering selling my ipod because of this. No warning is given that photos will be lost. So very disappointed in aple, lost all my music last time, as well as my pics.

    Yes, using the windows photo capture application is how you get photos taken with the iPod onto your pc. You should store them there, and organize them in folders.
    Create one main photo folder. Inside that folder create additional folders to hold photos. Each folder will become an album on an iPod, iPad, or iPhone. Do not next any other folders inside the first album folder.
    Then start iTunes on your pc and connect your iPod. Select your iPod in itunes and select the Photos tab that will be ps enter. You will most likely have first find your main photos folder. Ten select to sync all photos from your pc or select only those albums you want to have on your iPod. The click on Apply or Sync. That will copy the photos to your iPod.
    If you should do something later to cause these albums to disappear from your iPod you can quickly copy them back by doing another sync.

  • Why is Firefox not updating extension automatically when set to do so?

    None of the extension will update, not even when I press check for updates.

    Maybe check the related extensions.update prefs on the <b>about:config</b> page.
    *http://kb.mozillazine.org/about:config
    Can you install a new version of of an extension that has an update available?
    It is possible that there is a problem with the file(s) that store the extensions registry.
    Delete the files extensions.* (e.g. extensions.sqlite, extensions.ini, extensions.cache) and compatibility.ini in the Firefox profile folder to reset the extensions registry.
    *https://support.mozilla.org/kb/Profiles
    New files will be created when required.
    See "Corrupt extension files":
    *http://kb.mozillazine.org/Unable_to_install_themes_or_extensions
    *https://support.mozilla.org/kb/Unable+to+install+add-ons
    If you see disabled, not compatible, extensions in "Tools > Add-ons > Extensions" then click the Tools button at the left side of the Search Bar (or click the "Find Updates" button in older Firefox versions) to check if there is a compatibility update available.
    If this hasn't helped then also try to delete the addons.sqlite file.

  • Help with validating required fields

    I have approximately 50 columns in a result set. I need to find out if the required fields (20 out of those 50 columns are required fields) have values (not empty field).
    Since I'm dealing with a large result set (approximately 3000 to 5000 records), what is the most efficient thing to do to validate each field?
    For example:
    Column A, B,C,D.E.F, etc are required fields, I need to validate that each of these column has value otherwise I need to <CFABORT> the process and notify the user.

    The data is not yet in our database,they are created in memory when the app. is run.
    I have sort of  Xml To Query function that generates a result set. I'm doing some validation on req. fields before they are inserted into our DB.
    I try to run your code but I got an error:The value '' cannot be converted to a number
    Here is my code imitating yours (For testing I'm using fewer columns):
    <CFSET MandatoryFields = "Org,OrgId,LastName,FirstName,Gender,Address,City,State,Zip,Phone"> 
    <cfquery name="q1" dbtype="query"> 
    <cfloop list="#MandatoryFields#" index="ThisField"> 
    select Org, '#ThisField# null' problem 
    from ResutSet 
    where #ThisField# is null 
    union 
    </cfloop>
    select Campus, '' problem 
    from ResutSet 
    where 1 = 2 
    </cfquery>
    <cfabort>

  • Key Stuck - *EVEN WHEN NO KEYBOARD CONNECTED*

    Hello
    The up cursor on the keyboard is stuck on.
    But it stays stuck even when no keyboard is connected at all.
    i.e. if you use the mouse to open a menu, the options will highlight from the bottom up.
    If you type a document the cursor will keep flying back to the top.
    It's impossible to enter any passwords as the invisible keystrokes of the up cursor seem to make it invalid.
    It's exactly if something was resting on the keyboard.
    I"ve tried different keyboards, including a BlueTooth one, so that rules out the connections.
    And As I say it persists even when the keyboard and mouse are entirely disconnected.
    It is still on when I startup from a bootable CD.
    It feels as if some sort of hardware problem has occurred...
    I've tried resetting the PRAM but as the keyboard doesn't function correctly, I can't use the startup shortcut.
    I've unplugged mains power and removed the battery and pressed the PMU reset button, but to no avail.
    I've started up from an OSX Leopard disk, but the problem persists.
    This is driving me crazy, any ideas?

    yes, I've tried with 2 different mice, and with no mouse connected.
    Even restarted from an install CD with no keyboard or mouse connected at all, cursor is still jumping upwards, and the repeating chime that you get when the keyboard buffer is full (like when you acidentally rest something on a key) is constantly sounding.
    It feels to me as if there is some false signal getting to the keyboard buffer that the computer is interpreting as a constant up arrow key press.
    Any ideas? Is there a part of the internals of the computer that I should check hasn't come loose in some way, triggering this false key input?
    The problem happened after I moved the computer from one part of the office to another.

Maybe you are looking for