Determining whether form is valid or not

Assuming I have a form with few input fields,
I want to render a button only when the form is valid using ajax calls,
Is it possible somehow to determine whether a form is valid or not?
Thanks,
Asaf.

When a form is submitted and the JSF validation phase pass successfully and jsf cycle moves to the update model values,
I have several rules like some required fields, several validators attached to input fields, etc...
if all validators / required fields are set I would like to render a 'submit' button.
Asaf.

Similar Messages

  • To check whether a process flow is valid or not

    Hi,
    I want to check whether a OWB process flow is valid or not inside a PL/SQL block. Can anyone let me know about any repository table or view where I can check the process flow status.
    Regards,
    Poulose

    Use display schedule job option from the context menu of the start variant of the process chain.
    When u chick this.. u will get the available job on this start process.. There u can see whether the process chain in schedule mode or not?
    If u can see multiple schedule then u can delete the older ones which are not needed and then u can maintain only one schedule job.
    If u click twice.. then there are chances that u might end up with the 2 schedule job with the same time frame.. .. so check the same with the steps mentioned..... if u find two jobs then u need to delete one.. if not there might be chance that ur PC might get trigger twice.. and one trigger will gets failed. and the other one will gets executed..
    Thanks
    I hope this is clear to u..
    Assign points if this helps

  • How to determine whether a recordset is Empty or not ?

    Please see my snippet code below :
    <%     
         String sql="";
         String username="CDS";
         try
                Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                Connection con = DriverManager.getConnection("jdbc:odbc:Employees","","");
                Statement stmt = con.createStatement();
                ResultSet rs=null;
                   sql = "Select * from Employee where code='" + username + "'";
                   rs = stmt.executeQuery(sql);
                   rs.next();
                   if (rs==null)
                   %>
                        <jsp:forward page="Login.jsp?msg=Username not recognized"></jsp:forward>     
                   <%     
                else
                   %>
                        <jsp:forward page="Login.jsp?msg=Halo"></jsp:forward>
                   <%
              catch(ClassNotFoundException e)
                   out.println("Driver not found");
                    catch(SQLException e2)
                            out.println(e2.getMessage());
                            out.println("<BR>");
                            out.println("Wrong SQL Statement");
                            out.println("<BR>");
                            out.println(sql);
                            out.println("<BR>");
         %>How to determine whether a recordset has no result ?
    From the above code, i use if (rs==null) and that's not worked.
    Help me, guys.

    ResultSet rs = stmt.executeQuery(sql);
    if (rs.next()) {
    %>
        <jsp:forward page="Login.jsp?msg=Halo"/>
    <%
    } else {
    %>
        <jsp:forward page="Login.jsp?msg=Username not > recognized"/>
    <%
    }

  • I am getting error "Office for Mac has determined that your  product key is not valid." when opening xlsx doc.Till yesterday i was not geting this error

    i am getting error "Office for Mac has determined that your  product key is not valid." when opening xlsx doc.Till yesterday i was not geting this error and was working perfectly fine with my sheet.

    Could be some Disk Corruption, but...
    http://support.microsoft.com/kb/969064

  • JEditorPane - Determining whether it is in the middle of a page load or not

    Hello,
    I would like to ask if it is possible (and how) one would go about determining whether a JEditorPane has finished its loading sequence of an HTML page.
    At the moment I implement a property change listener (which works fine, as when I load a page, the status bar changes and does the rest) what I want now is (as I have implemented tabbed browsing) is to determine whether a page is a)Loaded or b)Loading and set the status bar to reflect this whenever I change tabs.
    The only problem I seem to have is I can't seem to find a method which returns (I would imagine) a boolean saying 'True or False' to a page load.
    Thanks,
    Reacz

    Your listener should receive a second, "page" property change event when the document has finished loading (the first is a "document" property change event). If you have received a document property change but not a page property change, then the document is still loading. Look at the javadoc for JEditorPane.setPage(URL) for details...
    Geoff

  • How to Quickly Determine Whether or not Specific Hotfixes or Updates are Installed?

    I have a handful of applications that require specific hotfixes or updates to be installed.  An excellent example of this is Internet Explorer 11 which has
    9 prerequisites. (well only 6 are required, the remaining 3 prerequisites provide a better experience.)
    Is there a reliable & fast way of checking for whether or not a specific hotfix and/or patch/update has been installed? 
    I am aware of `wmic qfe` but
    According to
    this, it will only "retrieve updates for Windows OS itself and its components (such as Windows Internet Explorer (IE) or Windows Server roles and features)"
    Even if I'm checking for just 1 hotifx, it takes roughly 6 seconds to retrieve that information.  When we're checking for dozen or two hotfixid's that quickly adds up. `Measure-Command {wmic qfe where "hotfixid='kb982018'"}`  So
    for IE11, we're looking at nearly 1 minute of waiting.  Nonsense.
    Note: I'm not asking "is my system patched?" nor am I asking for a report of installed patches.  I could use WSUS, SCCM, MBSA and a multitude of other solutions for that.  I need something scriptable that will install a specific prerequisite
    at runtime, so I'm looking for a batch/vbscript/powershell solution that'll be quick, like 1 second quick, not 5+ per KB.

    Thanks.  I'm no expert.  I don't have a slew of characters before or after my name.  This isn't an I'm right/you're wrong situation.  I don't claim to know everything - just trying to mitigate the questions I know I'm going to be asked.
    Prior to posting, I saw
    your post here (which is great I might add) which works, and it will work for determining whether or not a machine has a specific update/hotfix installed.  But it consistently took 6 seconds to retrieve a single result on our assets.  This
    was on a Core i7 with 8GB and an SSD running Windows 8.1 Pro.  This doesn't bode well for our day-to-day systems which are Core 2 Duo's with 4GB and spindle disks.  Unless my math is wrong, if I'm checking for all 6 possible required IE11 prereqs
    thats 36 seconds of wait time just for WMI queries.  I'm just shocked it takes so long which made me wonder whether or not there was a faster retrieval method.
    Why would I think there's a faster method?  The closest example I can think of might be a software install.  Sure, I can query WMI, but that too takes a while.  But I could a
    `reg query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{product code}` or `reg query HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Mozilla Firefox 29.0.1 (x86 en-US)`
    then check errorlevel to determine if the product was installed, right?  Or take it a step further & check the `/v Version` to make sure it matches what I expect it to be, right?   We don't have fancy tools here like Altiris or SCCM
    :(  Reg query just appears to be significantly faster than wmic/gwmi in that specific scenario.  That gave me hope there
    might be a faster option for checking for installed updates & hotfixes.
    IE11
    tries to install the proper prerequisites.  If that fails, they'll have to be done manually. 
    And it just so happens that the IE11 install
    does fail in our environment when we don't install the manually.  Fortunately we're not ready to deploy IE11, so there's no rush to push IE11.  I was merely using IE11 as an example because by virtue of the articles existence, this
    is a possible real-world scenario.  If I know that we can safely regression test the 6 patches for IE11, and just have it be an optional installation for the users that want or need it, then I can add the prerequisite logic to the script to help ensure
    a successful installation.  Again, an IE11 deployment isn't the goal here.  IE11 is just the example.

  • How to determine whether process Chain is active or Not

    Hello Experts,
    How to determine whether process Chain is active or Not, because i have large number of PC to activate.

    Hi,
    Please check this program in SE38---- /SSA/BWT
    This program will give you information regarding all your process chains which are active and running based on there timings.
    Hope it helps.
    Regards,
    AL

  • Validation questions: How to turn it off, and how to check to see if a form is valid

    Hi all,
    I'm looking for some assistance with validation on a form / Form guide. Basically there are two things that we need to be able to do.
    1) We need to be able to disable all the validation on a given form / Form Guide so that we can perform a submit operation to save all the data currently on the form.
    2) We also need to be able to make the determination of whether or not a form is valid. The validity of the form would be passed with the form during the submit process.
    Towards that end, I have been looking into the properties "validationsEnbled" and "disableAll". Neither one of which seem to do anything at all.
    Any assistance you could provide would be greatly appreciated.
    Thanks in Advance.
    Steve

    Okay here's a nice little function I wrote to turn off all the mandatory fields in your form.
    function unMandatoryAll() {
        //makes all mandatory fields not mandatory anymore
        var oFormRoot = xfa.form.nodes.item(0);
        var arrMandatoryFieldNames = findMandatories(oFormRoot, new Array());
        for (var i=0; i<arrMandatoryFieldNames.length; i++) {
            var oCurrentField = xfa.resolveNode(arrMandatoryFieldNames[i]);
            oCurrentField.validate.nullTest = "disabled";
    function findMandatories(oFormNode, arrMandatoryFieldNames) {
        //loops recursively through all fields in the given oFormNode and builds up a list of field names (actually SOM expressions)
        var oChildNodes = oFormNode.nodes;
        var nNumberOfChildNodes = oChildNodes.length;
        for (var i=0; i<nNumberOfChildNodes; i++) {
            var oCurrentNode = oChildNodes.item(i);
            var strNodeType = oCurrentNode.className;
            if (strNodeType == "subform")
                arrMandatoryFieldNames = findMandatories(oCurrentNode, arrMandatoryFieldNames);
            if ((strNodeType == "field") || (strNodeType == "exclGroup")) {
                if (oCurrentNode.validate.nullTest == "error")
                    arrMandatoryFieldNames.push(oCurrentNode.somExpression);
        return arrMandatoryFieldNames;
    Jared Langdon
    http://www.jlangdon.ca

  • Side Effects using a UIInput  to determine whether a component is rendered

    Hi,
    I'm trying to use the value of a UIInput component to decide whether or not to render another component and am getting some strange side effects. When the hidden component is re-rendered after being hidden, the selected value is not displayed. This does not happen if I copy the value of a ValueChangeEvent and then use that as my return value. Any idea what is going on here? Switching the commented out line in getControllerValue in BackingBean.java should demonstrate the issue.
    Thanks,
    Pierce
    index.jsp<?xml version="1.0" encoding="UTF-8" ?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
         xmlns:f="http://java.sun.com/jsf/core"
         xmlns:h="http://java.sun.com/jsf/html"
         version="2.0">
         <jsp:directive.page contentType="text/html; charset=UTF-8" />
         <f:view>
              <html>
              <head>
              <title>test</title>
              </head>
              <body>
              <h:form id="testForm">
                   <h:panelGrid columns="2" columnClasses="labelColumn, inputColumn">
                        <!-- controlling input -->
                        <h:outputLabel value="Controller:"></h:outputLabel>
                        <h:selectOneMenu id="controller"
                             binding="#{backingBean.controller}"
                             valueChangeListener="#{backingBean.changeController}"
                             immediate="true" onchange="submit()" required="true">
                             <f:selectItems value="#{backingBean.controllerItems}" />
                        </h:selectOneMenu>
                        <!-- controlled input -->
                        <h:outputLabel for="hideme" value="Input to hide:"
                             rendered="#{(backingBean.controllerValue != 1) and (backingBean.controllerValue != 5)}"></h:outputLabel>
                        <h:selectOneRadio id="hideme" value="#{backingBean.hideme}"
                             required="true"
                             rendered="#{(backingBean.controllerValue != 1) and (backingBean.controllerValue != 5)}"
                             >
                             <f:selectItems value="#{backingBean.hidemeItems}" />
                        </h:selectOneRadio>
                   </h:panelGrid>
              </h:form>
              </body>
              </html>
         </f:view>
    </jsp:root>BackingBean.java
    package test;
    import java.util.LinkedList;
    import java.util.List;
    import javax.faces.component.UIInput;
    import javax.faces.component.html.HtmlSelectOneMenu;
    import javax.faces.event.ValueChangeEvent;
    import javax.faces.model.SelectItem;
    public class BackingBean {
         private UIInput controller = new HtmlSelectOneMenu();
         private Integer hideme = 2;
         private Integer copiedValue;
         private List<SelectItem> controllerItems = new LinkedList<SelectItem>();
        private List<SelectItem> hidemeItems = new LinkedList<SelectItem>();
        public BackingBean(){
             controller.setValue("3");
             controller.setSubmittedValue("3");
             copiedValue = 3;
             controllerItems.add(new SelectItem(1, "Controller 1"));
             controllerItems.add(new SelectItem(2, "Controller 2"));
             controllerItems.add(new SelectItem(3, "Controller 3"));
             controllerItems.add(new SelectItem(4, "Controller 4"));
             controllerItems.add(new SelectItem(5, "Controller 5"));
             hidemeItems.add(new SelectItem(1, "Hide Me 1"));
             hidemeItems.add(new SelectItem(2, "Hide Me 2"));
             hidemeItems.add(new SelectItem(3, "Hide Me 3"));
         public UIInput getController() {
              return controller;
         public void setController(UIInput controller) {
              this.controller = controller;
         public Integer getHideme() {
              return hideme;
         public void setHideme(Integer hideme) {
              this.hideme = hideme;
         public List<SelectItem> getControllerItems() {
              return controllerItems;
         public List<SelectItem> getHidemeItems() {
              return hidemeItems;
          * Value change listener
         public void changeController(ValueChangeEvent e){
              System.out.println((String)e.getNewValue());
              copiedValue = Integer.parseInt((String)e.getNewValue());
          * Helper
         public Integer getControllerValue(){
            // why does the following line not work?
         //     return Integer.parseInt((String)controller.getValue());
              return copiedValue;
    }

    This is a How to test a variable to determine whether it is a NUMBER.
    Cheers, APC

  • "An error occurred when communicating with the server. Check connectivity with your administrator to determine whether further action is necessary", then attempt to approve TimeSheet.

    Kind day, colleague.
    It was required to organize a statement chain for TimeSheet of employees, as we realized. Everything is good, but at linear managers in PSW opportunity to execute Approve when viewing TimeSheet of the employee remained, and in attempt to approve TimeSheet there
    is a mistake.
    500 Internal Server Error
    "An error occurred when communicating with the server.  Check connectivity with your administrator to determine whether further action is necessary. "
    Accept, is carried out as it is necessary.
    It is a bug or we not correctly realized approval chain?

     issue is  related to the user booking time against a task that was past the finish/end date listed in the Project Schedule.
    To resolve the user needs to submit their time on a valid task that is still within the current reporting timeframe, or have the Project Manager
    update the task in questions so that the finish/end dates are at or beyond the submission period and then republish the project. After that, the user should be able to go in and submit their timesheet with success.
    http://patrickdrews.com/2012/09/project-server-2010-timesheet-submission-produces-an-error-occurred-while-communicating-with-the-server/
    kirtesh

  • How to determine whether a file doesn't exist or doesn't have enough perms

    Hello everone,
    I am stuck in determining whether a file does not exist or does not have enough permissions so that access to this file is denied?". I am using
    java.io.File.exists() or java.io.File.canRead() methods to check this but both of them just return false in both above mentioned cases.
              In the documentation however its mentioned that these method throw SecurityException - If a security manager exists and its SecurityManager.checkRead(java.lang.String) method denies read access to the file. But then problem is to write a security manager which denies
    read access if the file does not have permissions so that exception can the thrown.
    Any suggestions or pointers will be highly appreciated.
    Thank You.
    Regards,
    Vikash Kumar

    Some platforms will let you rename or remove an open
    file.Unless those platforms support file locking, and the file has a lock on it.

  • What determines whether the Label name and/or Caption appears in the context help window but in other cases, both the label and caption appear in the context help window?

    I am trying to polish an application, and find that I cannot seem to reliably control which of the label or caption text appears in the context help window because I don't understand what rules are in place to determine which should appear. It seems like if I reate a named constant, then use it's right click menu command "Create Indicator" I get a control with only a Label (as long as I don't add a caption). This then appears in the context help window as the label name followed by the description text (after entering some description text). But if I add a caption, the label name is shown in bracket
    s which is a 'feature' I would like to avoid, because I have certain controls where I would like to use a descriptive variable name on the block diagram side without using so much space on the front panel. It seems like there is no way to avoid showing the Label name in the context help for a control/indicator. Is this true?
    I thought the purpose of having a seperate caption was to make the text that appears with a control programmatically controllable, but if that control is not extended to what appears in the context help window, it limits the usefulness of the caption and forces me to re-consider some Label names. However, the problem goes deeper than that because then even when I make the label and caption exactly the same, or if I delete (via a select caption text-backspace or select caption text- delete key .. sequence) the caption for a control, the label name in the context help window still appears in square brackets!
    Can I have complete control over the context help fo
    r a particular control (or has anyone found a third-party context help solution that functions compatibly with LabVIEW 7 in a built application that they will be so kind as to recommend?)
    I have used LabVIEW for three years, and I am now using LabVIEW 7.0.

    Sorry for that.. I was changing the text of my question and didn't read carefully enough in the preview stage. I wanted it to read "What determines whether the Label name and/or Caption appears in the context help window?"

  • I am writing to this forum to ask for help in determining whether Aperture will satisfy my needs when I switch from Windows to MAC in the near future.

     I am writing to this forum to ask for help in determining whether Aperture will satisfy my needs when I switch from Windows to MAC in the near future.  
    I am currently using Photoshop Elements 8 on Windows 7.  After several years of use, I am self taught and adequately proficient for an amateur.  What I didn't realize (until I started researching my upcoming migration on the Internet) is that I actually use PE8 for two functions: digital asset management and digital editing. 
    Regarding Digital Asset Management: My research leads me to understand that PE on MAC does not provide the same level of organizational capability that I am used to having on Windows, instead providing Adobe's Bridge which does not look very robust.  Furthermore, iPhoto, which come on MAC will not support the hierarchical keyword tagging that I require to organize my library of photos. The two SW applications which I am thinking of switching to are either Aperture or Adobe's Lightroom.  Frankly, I'm thinking that it would be smoother to stay within the Apple product line. 
    So the remaining question is whether Aperture will support my digital editing needs. The tweaks that I do to my photos are not very complex (no, I do not want to put people's heads on other animal bodies).  But could someone who uses Aperture tell me whether It will allow me to do the following kinds of edits?:
    - If I have a photo where someone's face is too shadowed, can I lighten just that person's face, and leave the rest of the photo as-is?  
    - if I have a photo where the background is cluttered (eg, 2 people in front of the Parthenon which is undergoing renovation), can I remove just the construction cranes?  
    - Can it splice together several separate photos to give a panoramic?  
    If, once I get Aperture, I find that it cannot enable the kinds of editing that I do, I would probably get PE11 in the future. However, if people in this forum tell me that Aperture will definitely not  support the kinds of editing which I've described in the previous paragraph, I would prefer to get PE11 with my initial configuration (since someone will be helping me with my migration).  
    Thanks in advance for your consideration and help! 

    I am concerned, however,  about using a non-Apple Digital Asset Manager in OSX. I would really like to avoid integration problems. Is using PE11 to import and catalog my digital photos likely to cause conflicts?
    Thanks for any insight on this
    Amy,
    Not so much conflicts as maybe a little less seamless integration with Apple software and perhaps some third-party software providers in the Mac App Store where some programs build in direct access to iPhoto and Aperture libraries for getting images into those programs easily. Typically, there is a manual command to go to Finder (think Windows Explorer) to browse folders.
    One caution to mention however, is that the organization you set-up in PE Organizer is unlikely to transfer over to either iPhoto or Aperture if you decide to change at some point.
    The only real stumbling block that I see in your opening comment is that you want hierarchical keywording (Kirby or Léonie can go into the details on keywording limitations as I stay at one level). If you can work with the keywording schemes of either iPhoto or Aperture, then using PE for your external editor (either program supports setting an external editor) would probably be ideal since you know PE well. This is the idea with the Mac App Store version of PE (editor with no organizer).
    Note - I use Photoshop CS6 (full version) with Aperture and it works really well. The only downside is that Aperture has to make either a TIFF or PSD file to send to an external editor so that the original file is protected by not sending it to the pixel editor. While TIFF or PSD files protect the integrity of the image information without degrading it, they are typically much larger file sizes on disk than either RAW or JPEG files. Therefore, your library size (iPhoto or Aperture) will balloon quite a bit if you send a lot of files to external editors.
    One other possibility for an external editor would be a program called Pixelmator. It is pretty similar to early versions of Photoshop, but built for Mac. Other than the panoramics you want, it will do most pixel editing that PE can do. It is not an organizer, so it is built to go with either iPhoto or Aperture. It does have differences in how you complete certain procedures, so there is bit of a learning curve when you are used to doing it the Adobe way.

  • Form field displaying but not in session state

    I have a form which displays data depending on node selected in a tree. The data displays ok and allows me to update but If I try to access a value ( I want to filter a select list ) its empty.
    Displaying all session values reveals that only the primary key of the form is held in sessikon state. I have set the value I want to read to 'Display as Text ( saves state )'
    Regards
    Seán

    I have 2 regions, a tree and a form. The form was created with the wizard and I added the tree afterwards.
    The tree nodes are links which branch to the same page and set the value of the primary key field .
    I've copied the event view of the page below...
    Page Rendering
    Process: After Header Fetch Row from ALL_COST_CENTRE (#OWNER#:ALL_COS..)
    Region: Tree Page Template Body (3) (1,20)
    Admin Tree
    Tree: 11210417299635529
    (50) P8_TREE_ROOT [Hidden]
    Region: HTML Text Page Template Body (3) (3,10)
    Office Details
    (10) CANCEL Location: Template Close
    (30) SAVE Location: Template Change
    (1) P8_COST_CENTRE [Display as Text (saves state)]
    (10) P8_NAME [Display as Text (saves state)]
    (15) P8_OFFICE_TYPE [Display as Text (saves state)]
    (30) P8_DIST_PARENT [Select List]
    (40) P8_ADMIN_PARENT [Select List]
    Region: HTML Text Page Template Body (3) (3,40)
    Administration
    No computations
    Page Processing
    No computations
    Validation: P8_NAME not null (Inline+Notification) sequence: 10
    Process: After Submit Process Row of ALL_COST_CENTRE (#OWNER#:ALL_COS..)
    Process: After Submit reset page (8..)
    Go To Page: f?p=&APP_ID.:8:&SESSION.&succe (After Processing) sequence: 1 Unconditional

  • Preventing ADF Input Form from validating

    Can anyone say how can i prevent an ADF Creation Form from validating the inputText fields when there is no data entered in any of the fields and the user press a Cancel button to cancel the input and return/navigate to another page???
    Currently when i try that that the fields are validates and a message is displayed saying the field requires a value. And it will not allow me to navigate to another page unless some value is entered. Why is this so ?
    Thanks

    I figured this out myself, actually this was quite simple.- just set the 'immediate' property on the component (button) to 'true'.

Maybe you are looking for

  • Where can i download Oracle 8 and Forms/Reports 6/6i ?

    So that we may better diagnose DOWNLOAD problems, please provide the following information. - Server name - Filename - Date/Time - Browser + Version Explorer 6 - O/S + Version XP Proffesional - Error Msg

  • IDML file crashing InDesign...Need help!

    Hi Guys, We are working in a studio full of Macs, some on CS4 and some on CS5.5, we have had a problem occur in the last week. We are saving IDML files on CS5.5 and trying to open them up on one of our Macs running CS4 and it starts to open, stalls t

  • Overtime Calculation

    hi everybody, actually i was doing an audit for a client.  there is a scenario for overtime calculation is like (Basic Salary/30)/81.5No of Hours based on this calculation employee will get loss in the month of february why bcoz no. of days in that a

  • Combing to fields into a LOV drop down

    HI how can I append two fields together in a select statement and contain the second field in brackets? such has CUSTOMER field and CITY. This would look like "Company ABC (London)" Thanks Adam

  • Poor memory or poor documentation?

    This might be no more than a failure of my memory, but I can't figure out what the up statement in the following does:      IF :System.Record_Status = 'NEW' THEN           vRecNum := :System.Cursor_Record;                up;      END IF; I can't seem