Form Validation - Error Trapping Not Working.

Hi,
I'm a Coldfusion beginner desperately trying to get along with some database work for my site and have come across an annoying error that I just can't solve! I'm sure I'm missing something really basic - I just can't for the life of me figure out what it is!
Basically, I have a form for users to sign-up. I have introduced several cfif statements and a basic CAPTCHA system to trap errors. If any errors are submitted then they should be displayed in a cfwindow. This process works fine until I specify the form action - after which it is completely ignored and the form contents are written to the database without any validation taking place. Even without specifying the form action the errors won't show in Internet Explorer.
I really would appreciate any help - it's driving me crazy!
Thanks in advance,
Tom.
Here is the code:
<cfinclude template="CFIDE/headertemplate.cfm">
<!-- RANDOM NUMBER GENERATOR  FOR CAPTCHA -->
<cffunction name="makerandom" returnType="string" output="false">
<cfset var chars = "23456789ABCDEFGHJKMNPQRSTW">
<cfset var length = randRange(4,6)>
<cfset var result = "">
<cfset var i = "">
<cfset var char = "">
<cfscript>
     for(i=1; i <= length; i++) {
          char = mid(chars, randRange(1, len(chars)),1);
          result&=char;
</cfscript>
<cfreturn result>
</cffunction>
<!-- ERROR TRAPPING -->
  <cfset showForm = true>
  <cfparam name="form.email" default="">
  <cfparam name="form.artistname" default="">
  <cfparam name="form.city" default="">
  <cfparam name="form.postcode" default="">
  <cfparam name="form.pass" default="">
  <cfparam name="form.captcha" default="">
  <cfparam name="form.captchahash" default="">
  <cfparam name="form.terms" default="">
<cfif isDefined("form.send")>
      <cfset errors = "">
<cfif len (form.email) LT '4'>
<cfset errors = errors & "You must include a valid e-mail address.<br />">
</cfif>
<cfif find('.',form.email) is '0'>
<cfset errors = errors & "Your E-mail features no . symbol.<br />">
</cfif>
<cfif find('@',form.email) is '0'>
<cfset errors = errors & "Your E-mail features no @ symbol.<br />">
</cfif>
<cfif not len(trim(form.artistname))>
<cfset errors = errors & "You must include your name.<br />">
</cfif>
<cfif not len(trim(form.city))>
<cfset errors = errors & "You must include your city.<br />">
</cfif>
<cfif not len(trim(form.postcode))>
<cfset errors = errors & "You must include your postcode.<br />">
</cfif>
<cfif not len(trim(form.pass))>
<cfset errors = errors & "You must specify a password.<br />">
</cfif>
<cfif len(form.pass) LT '6'>
<cfset errors = errors & "Password must be between 6 and 10 characters.<br />">
</cfif>
<cfif hash(ucase(form.captcha)) neq form.captchahash>
<cfset errors = errors & "You did not enter the correct Captcha text.<br />">
</cfif>
<cfif not len(trim(form.terms))>
<cfset errors = errors & "You must agree to our Terms and Conditions.<br />">
</cfif>
<cfif errors is "">
<cfset showForm = false>
</cfif>
</cfif>
<cfif showForm>
<cfset captcha = makerandom()>
<cfset captchahash = hash(captcha)>
<cfoutput>
<h1>Artist Sign-Up</h1>
<p>Your details are required for sign-up. Mandatory fields are indicated with a *.</p><br/><br/>
<cfif isDefined("errors")>
<cfwindow name="formerrors"
title="Form Errors"
width="450"
height="250"
modal="true"
initshow="true"
center="true"
closable="true"
minheight="200"
minwidth="200">
<center><b>Please correct the following errors and re-submit the form:</b><br /><br/>#errors#
<br/><a href="javascript:ColdFusion.Window.hide('formerrors');">Close Window</a>
</center>
<br/></cfwindow>
</cfif>
<!-- FORM CONTENTS -->
<cfform action="artist_insert.cfm" method="post">
<table class="signup">
<tr>
<td class="noborder" width="200">
  <label for="email">E-Mail Address*:</label>
</td>
<td class="noborder" width="156">
<input type="text" name="email" class="textbox" value="<cfoutput><cfif IsDefined("URL.email")>#URL.email#<cfelse></cfif></cfoutput>"/>
</td>
<td class="noborder">
<cftooltip autoDismissDelay="9999" tooltip="This needs to be a valid e-mail so that<br/> promoters can get in contact with you. <br/>If several people will be using this<br/> account then try and make it a shared<br/> address."><img src="pics/i.jpg" alt="info" border="1" /></cftooltip>
</td>
</tr>
<tr>
<td class="noborder" width="200">
  Your Password* (6 to 10 chars.):
</td>
<td class="noborder">
<input type="password" class="textbox" name="pass" maxlength="10"/>
</td>
<td class="noborder">
</td>
</tr>
<tr>
<td class="noborder" >
Artist/Band Name*:
</td>
<td class="noborder">
<input type="text" class="textbox" name="artistname" />
</td>
<td class="noborder">
</td>
</tr>
<tr>
<td class="noborder">
City*:
</td>
<td class="noborder">
<input type="text" class="textbox" name="city" />
</td>
<td class="noborder">
<cftooltip autoDismissDelay="9999" tooltip="Entering your locational details enables Gig<br/>Digger to find the events and promoters<br/>in your area. Try specifying a well known<br/>city nearby for the best results."><img src="pics/i.jpg" alt="info" border="1" /></cftooltip>
</td>
</tr>
<tr>
<td class="noborder">
Postcode*:
</td>
<td class="noborder">
<input type="text" class="textbox" name="postcode" maxlength="8"/>
</td>
<td class="noborder">
</td>
</tr>
<tr>
<td class="noborder">
Your Contact Number:
</td>
<td class="noborder">
<input type="text" class="textbox" name="contact" maxlength="14"/>
</td>
<td class="noborder">
</td>
</tr>
<tr>
<td class="noborder">
</td>
</tr>
<tr>
<tr>
<td class="noborder" valign="top" width="200">Please enter the CAPTCHA text in the box below*: </td>
<td class="noborder" align="left">
<center><cfimage action="captcha" width="156" height="50" text="#captcha#" border="1">
<input type="hidden" name="captchaHash" value="#captchaHash#"></center>
</td>
<td class="noborder" valign="top">
<cftooltip autoDismissDelay="9999" tooltip="This is here to ensure that<br/>you're human. It stops abuse <br/>of the site and makes it a safer <br/>place for us all."><img src="pics/i.jpg" alt="info" border="1" /></cftooltip>
</td>
</tr>
<tr>
<td class="noborder">
</td>
<td class="noborder" align="right"><font size="-2"><b><a href="javascript:location.reload(false)">Refresh Page</a></b></font>
</td>
<td class="noborder">
</td>
</tr>
<tr>
<td class="noborder"></td>
<td class="noborder"><input type="text" name="captcha" class="textbox"></td>
</tr>
<tr>
<td class="noborder">
</td>
</tr>
<tr>
<td class="noborder">
</td>
</tr>
<tr>
<td class="noborder" width="170">Please check this box to confirm that you agree<br/> to our <b><a href="termsandconditions.cfm">Terms and Conditions</a></b>*.
</td>
<td class="noborder">
<input type="checkbox" class="textbox" name="terms" /></td>
</tr>
<tr>
<td class="noborder">
</td>
</tr>
<tr>
<td class="noborder">
</td>
<td class="noborder" align="center">
<cfinput type="image" src="pics/submit.png" name="send" value="Submit" validate="submitonce" border="1">
</td>
</tr>
</table>
</cfform><br/>
</cfoutput>
<cfelse>
<cfoutput>
Thank you for submitting your details, #form.name#. You may now log in with your e-mail and password.
</cfoutput>
</cfif>
</td>
</tr>
</table>
<!-- FOOTER START -->
</body>
</html>
ARTIST INSERT PAGE - artist_insert.cfm
<cfquery datasource="071907cs07to">
INSERT INTO Artist(    Nsudate,
                    Nemail,
                    Npass,
                    Nname,
                    Ncity,
                    Npostcode,
                    Ncnumber
VALUES(    ( #Now()# ),
        '#Trim(form.email)#',
        '#Trim(form.pass)#',
        '#Trim(form.artistname)#',
        '#Trim(form.city)#',
        '#Trim(form.postcode)#',
        '#Trim(form.contact)#'
</cfquery>

In addition to BreakawayPaul's answer.
You are making it very difficult to troubleshoot your if/else logic because your code includes all the display stuff.  Since you're a self proclaimed beginner, you might want to try another approach.
Save your old page and start a new one from scratch.  Solve all your logic problems first.  Display what you need to see with the cfdump tag.
Here are some hints to make the whole thing easier.
1.  In your cfform, use the validate and required attributes to catch errors earlier.
2. You don't have to cfparam every form field.  The form has either been submitted to it hasn't.  If it has, all the fields will be there with the possible exception of checkboxes or radio button, if nothing was selected.

Similar Messages

  • Tabular form validation(Checkbox) is not working for Interactive report

    Hi,
    I am using the oracle apex 4.0 and oracle 11g.
    I have written a below select query on interactive report as
    select
    apex_item.checkbox(1,RESIDD)||apex_item.hidden(2,RESIDD) row_selector,
    apex_item.text(3,RESNUM) as resnum
    from "PDRRES"
    and written the validation to display the error message( Function returning error text ) as
    DECLARE
    vRow BINARY_INTEGER;
    BEGIN
    -- apex_application.g_print_success_message := NULL;
    FOR i IN 1 .. apex_application.g_f01.COUNT
    LOOP
    vRow := apex_application.g_f01(i);
    apex_application.g_print_success_message := apex_application.g_f01(i)||'-'|| apex_application.g_f03(vRow) ;
    END LOOP;
    END;
    Output : No data found error message
    As far as it work for sql report with above logic because apex built in row selector
    but it fails in case of interactive report for some reason.
    Please suggest.

    Saroj Nayak wrote:
    Hi,
    I am using the oracle apex 4.0 and oracle 11g.
    I have written a below select query on interactive report as
    select
    apex_item.checkbox(1,RESIDD)||apex_item.hidden(2,RESIDD) row_selector,
    apex_item.text(3,RESNUM) as resnum
    from "PDRRES"
    and written the validation to display the error message( Function returning error text ) as
    DECLARE
    vRow BINARY_INTEGER;
    BEGIN
    -- apex_application.g_print_success_message := NULL;
    FOR i IN 1 .. apex_application.g_f01.COUNT
    LOOP
    vRow := apex_application.g_f01(i);
    apex_application.g_print_success_message := apex_application.g_f01(i)||'-'|| apex_application.g_f03(vRow) ;
    END LOOP;
    END;
    Output : No data found error message
    As far as it work for sql report with above logic because apex built in row selector
    but it fails in case of interactive report for some reason.
    Please suggest.NO DATA FOUND usually occurs when an i mplicit select does not find anything. It can also occur when referencing a collection element that has not been defined.
    You have 2 collectinons in the code you posted, apex_application.g_f01() and apex_applciation.g_f03. Since you are looping therough the COUNT attribute of g_f01 its reference ("I") is probably okay and the value store in vRow is probably not right. You can check this by using RAISE_APPLICTION_ERROR to see the value something like
    raise_application_error(-20000,'vRow="'||vRo2||'"');Remember that working with checkboxes is tricky. If the box is not checked nothing will be sent. You may need to define a default value when no value is submitted.

  • Formlevel Validation properties are not working when stitching the XDPs

    The form validation settings are not coming in merged PDF document.We are using Adobe LiveCycle Designer 9.0
    We changed the Form Validations settings, 'Configure how Acrobat displays validation message boxes', to 'Don't show any message box at all' in our XDPs. It is behaving as required when we tested them in individual PDFs.
    In our project, it is required to merge these XDPs to a single PDF document. We are stitching the XDPs using the assembler by providing the DDX file. We are getting the default behavior , 'Show every message........', it is showing error message for each field.
    Please help us to corect this.
    Thanks in Advance,
    Shabeer

    Hi Poornachandra,
    I tested the same formula in my environment for uploading the videos in Site Assets library, however the validation worked fine.
    This error may be caused by some other reasons. Could you please provide more error message in ULS log for further research?
    To narrow the issue scope, I recommend to test the validation formula in another library and then upload a video to the library, then compare the results.
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • Form validation error when the Table is empty.

    Hello Gurus,
    I am getting form validation error as soon as the popup is rendered to submit new row.
    I am using the this popup to add new row in the table and this is happening only when there no data in the table but it works fine when there is some data in the table.
    Screen shot: [http://picpaste.com/adf_error-BAdP8Thv.JPG]
    Is there any way can I defer this error till I submit the form. ( which works fine when there is some data in table )
    Thanks
    Abhijeet

    here i tested not happend for me.
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
              xmlns:f="http://java.sun.com/jsf/core"
              xmlns:h="http://java.sun.com/jsf/html"
              xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
      <jsp:directive.page contentType="text/html;charset=UTF-8"/>
      <f:view>
        <af:document id="d1" binding="#{backingBeanScope.backing_untitled8.d1}">
          <af:form binding="#{backingBeanScope.backing_untitled8.f2}" id="f2">
            <af:messages binding="#{backingBeanScope.backing_untitled8.m1}"
                         id="m1"/>
            <af:popup binding="#{backingBeanScope.backing_untitled8.p1}" id="p1">
              <af:dialog binding="#{backingBeanScope.backing_untitled8.d3}" id="d3">
                <af:panelFormLayout binding="#{backingBeanScope.backing_untitled8.pfl1}"
                                    id="pfl1">
                  <af:inputText value="#{bindings.AunitctrlBe.inputValue}"
                                label="#{bindings.AunitctrlBe.hints.label}"
                                required="#{bindings.AunitctrlBe.hints.mandatory}"
                                columns="#{bindings.AunitctrlBe.hints.displayWidth}"
                                maximumLength="#{bindings.AunitctrlBe.hints.precision}"
                                shortDesc="#{bindings.AunitctrlBe.hints.tooltip}"
                                binding="#{backingBeanScope.backing_untitled8.it10}"
                                id="it10">
                    <f:validator binding="#{bindings.AunitctrlBe.validator}"/>
                  </af:inputText>
                  <af:inputText value="#{bindings.AunitctrlUnit.inputValue}"
                                label="#{bindings.AunitctrlUnit.hints.label}"
                                required="#{bindings.AunitctrlUnit.hints.mandatory}"
                                columns="#{bindings.AunitctrlUnit.hints.displayWidth}"
                                maximumLength="#{bindings.AunitctrlUnit.hints.precision}"
                                shortDesc="#{bindings.AunitctrlUnit.hints.tooltip}"
                                binding="#{backingBeanScope.backing_untitled8.it11}"
                                id="it11">
                    <f:validator binding="#{bindings.AunitctrlUnit.validator}"/>
                  </af:inputText>
                  <af:inputText value="#{bindings.AunitctrlCostMethod.inputValue}"
                                label="#{bindings.AunitctrlCostMethod.hints.label}"
                                required="#{bindings.AunitctrlCostMethod.hints.mandatory}"
                                columns="#{bindings.AunitctrlCostMethod.hints.displayWidth}"
                                maximumLength="#{bindings.AunitctrlCostMethod.hints.precision}"
                                shortDesc="#{bindings.AunitctrlCostMethod.hints.tooltip}"
                                binding="#{backingBeanScope.backing_untitled8.it12}"
                                id="it12">
                    <f:validator binding="#{bindings.AunitctrlCostMethod.validator}"/>
                  </af:inputText>
                  <af:inputText value="#{bindings.AunitctrlCostMgmtOpt.inputValue}"
                                label="#{bindings.AunitctrlCostMgmtOpt.hints.label}"
                                required="#{bindings.AunitctrlCostMgmtOpt.hints.mandatory}"
                                columns="#{bindings.AunitctrlCostMgmtOpt.hints.displayWidth}"
                                maximumLength="#{bindings.AunitctrlCostMgmtOpt.hints.precision}"
                                shortDesc="#{bindings.AunitctrlCostMgmtOpt.hints.tooltip}"
                                binding="#{backingBeanScope.backing_untitled8.it13}"
                                id="it13">
                    <f:validator binding="#{bindings.AunitctrlCostMgmtOpt.validator}"/>
                  </af:inputText>
                  <af:inputText value="#{bindings.AunitctrlCostApprMtd.inputValue}"
                                label="#{bindings.AunitctrlCostApprMtd.hints.label}"
                                required="#{bindings.AunitctrlCostApprMtd.hints.mandatory}"
                                columns="#{bindings.AunitctrlCostApprMtd.hints.displayWidth}"
                                maximumLength="#{bindings.AunitctrlCostApprMtd.hints.precision}"
                                shortDesc="#{bindings.AunitctrlCostApprMtd.hints.tooltip}"
                                binding="#{backingBeanScope.backing_untitled8.it14}"
                                id="it14">
                    <f:validator binding="#{bindings.AunitctrlCostApprMtd.validator}"/>
                  </af:inputText>
                  <af:inputText value="#{bindings.AunitctrlJocApprMtd.inputValue}"
                                label="#{bindings.AunitctrlJocApprMtd.hints.label}"
                                required="#{bindings.AunitctrlJocApprMtd.hints.mandatory}"
                                columns="#{bindings.AunitctrlJocApprMtd.hints.displayWidth}"
                                maximumLength="#{bindings.AunitctrlJocApprMtd.hints.precision}"
                                shortDesc="#{bindings.AunitctrlJocApprMtd.hints.tooltip}"
                                binding="#{backingBeanScope.backing_untitled8.it15}"
                                id="it15">
                    <f:validator binding="#{bindings.AunitctrlJocApprMtd.validator}"/>
                  </af:inputText>
                  <af:inputText value="#{bindings.AunitctrlCreBy.inputValue}"
                                label="#{bindings.AunitctrlCreBy.hints.label}"
                                required="#{bindings.AunitctrlCreBy.hints.mandatory}"
                                columns="#{bindings.AunitctrlCreBy.hints.displayWidth}"
                                maximumLength="#{bindings.AunitctrlCreBy.hints.precision}"
                                shortDesc="#{bindings.AunitctrlCreBy.hints.tooltip}"
                                binding="#{backingBeanScope.backing_untitled8.it16}"
                                id="it16">
                    <f:validator binding="#{bindings.AunitctrlCreBy.validator}"/>
                  </af:inputText>
                  <af:inputDate value="#{bindings.AunitctrlCreDate.inputValue}"
                                label="#{bindings.AunitctrlCreDate.hints.label}"
                                required="#{bindings.AunitctrlCreDate.hints.mandatory}"
                                shortDesc="#{bindings.AunitctrlCreDate.hints.tooltip}"
                                binding="#{backingBeanScope.backing_untitled8.id1}"
                                id="id1">
                    <f:validator binding="#{bindings.AunitctrlCreDate.validator}"/>
                    <af:convertDateTime pattern="#{bindings.AunitctrlCreDate.format}"/>
                  </af:inputDate>
                  <af:inputText value="#{bindings.AunitctrlUpdBy.inputValue}"
                                label="#{bindings.AunitctrlUpdBy.hints.label}"
                                required="#{bindings.AunitctrlUpdBy.hints.mandatory}"
                                columns="#{bindings.AunitctrlUpdBy.hints.displayWidth}"
                                maximumLength="#{bindings.AunitctrlUpdBy.hints.precision}"
                                shortDesc="#{bindings.AunitctrlUpdBy.hints.tooltip}"
                                binding="#{backingBeanScope.backing_untitled8.it17}"
                                id="it17">
                    <f:validator binding="#{bindings.AunitctrlUpdBy.validator}"/>
                  </af:inputText>
                  <af:inputDate value="#{bindings.AunitctrlUpdDate.inputValue}"
                                label="#{bindings.AunitctrlUpdDate.hints.label}"
                                required="#{bindings.AunitctrlUpdDate.hints.mandatory}"
                                shortDesc="#{bindings.AunitctrlUpdDate.hints.tooltip}"
                                binding="#{backingBeanScope.backing_untitled8.id2}"
                                id="id2">
                    <f:validator binding="#{bindings.AunitctrlUpdDate.validator}"/>
                    <af:convertDateTime pattern="#{bindings.AunitctrlUpdDate.format}"/>
                  </af:inputDate>
                  <af:inputText value="#{bindings.RowID.inputValue}"
                                label="#{bindings.RowID.hints.label}"
                                required="#{bindings.RowID.hints.mandatory}"
                                columns="#{bindings.RowID.hints.displayWidth}"
                                maximumLength="#{bindings.RowID.hints.precision}"
                                shortDesc="#{bindings.RowID.hints.tooltip}"
                                binding="#{backingBeanScope.backing_untitled8.it18}"
                                id="it18">
                    <f:validator binding="#{bindings.RowID.validator}"/>
                  </af:inputText>
                  <f:facet name="footer">
                    <af:panelGroupLayout layout="vertical"
                                         binding="#{backingBeanScope.backing_untitled8.pgl1}"
                                         id="pgl1">
                      <af:panelGroupLayout layout="horizontal"
                                           binding="#{backingBeanScope.backing_untitled8.pgl2}"
                                           id="pgl2">
                        <af:commandButton actionListener="#{bindings.First1.execute}"
                                          text="First1"
                                          disabled="#{!bindings.First1.enabled}"
                                          partialSubmit="true"
                                          binding="#{backingBeanScope.backing_untitled8.cb1}"
                                          id="cb1"/>
                        <af:commandButton actionListener="#{bindings.Previous1.execute}"
                                          text="Previous1"
                                          disabled="#{!bindings.Previous1.enabled}"
                                          partialSubmit="true"
                                          binding="#{backingBeanScope.backing_untitled8.cb3}"
                                          id="cb3"/>
                        <af:commandButton actionListener="#{bindings.Next1.execute}"
                                          text="Next1"
                                          disabled="#{!bindings.Next1.enabled}"
                                          partialSubmit="true"
                                          binding="#{backingBeanScope.backing_untitled8.cb4}"
                                          id="cb4"/>
                        <af:commandButton actionListener="#{bindings.Last1.execute}"
                                          text="Last1"
                                          disabled="#{!bindings.Last1.enabled}"
                                          partialSubmit="true"
                                          binding="#{backingBeanScope.backing_untitled8.cb5}"
                                          id="cb5"/>
                      </af:panelGroupLayout>
                      <af:commandButton text="Submit"
                                        binding="#{backingBeanScope.backing_untitled8.cb6}"
                                        id="cb6"/>
                    </af:panelGroupLayout>
                  </f:facet>
                </af:panelFormLayout>
              </af:dialog>
            </af:popup>
            <af:panelCollection binding="#{backingBeanScope.backing_untitled8.pc2}"
                                id="pc2">
              <f:facet name="menus"/>
              <f:facet name="toolbar">
                <af:toolbar binding="#{backingBeanScope.backing_untitled8.t3}"
                            id="t3">
                  <af:commandButton text="insert"
                                    binding="#{backingBeanScope.backing_untitled8.cb7}"
                                    id="cb7"
                                    action="#{backingBeanScope.backing_untitled8.cb7_action}"
                                    partialSubmit="true"/>
                </af:toolbar>
              </f:facet>
              <f:facet name="statusbar"/>
              <af:table value="#{bindings.ApplUnitControlView1.collectionModel}"
                        var="row" rows="#{bindings.ApplUnitControlView1.rangeSize}"
                        emptyText="#{bindings.ApplUnitControlView1.viewable ? 'No data to display.' : 'Access Denied.'}"
                        fetchSize="#{bindings.ApplUnitControlView1.rangeSize}"
                        rowBandingInterval="0"
                        filterModel="#{bindings.ApplUnitControlView1Query.queryDescriptor}"
                        queryListener="#{bindings.ApplUnitControlView1Query.processQuery}"
                        filterVisible="true" varStatus="vs"
                        selectedRowKeys="#{bindings.ApplUnitControlView1.collectionModel.selectedRow}"
                        selectionListener="#{bindings.ApplUnitControlView1.collectionModel.makeCurrent}"
                        rowSelection="single"
                        binding="#{backingBeanScope.backing_untitled8.t4}" id="t4"
                        partialTriggers=":::cb1 :::cb3 :::cb4 :::cb5 ::cb2">
                <af:column sortProperty="AunitctrlBe" filterable="true"
                           sortable="true"
                           headerText="#{bindings.ApplUnitControlView1.hints.AunitctrlBe.label}"
                           id="c6" width="105">
                  <af:inputText value="#{row.bindings.AunitctrlBe.inputValue}"
                                label="#{bindings.ApplUnitControlView1.hints.AunitctrlBe.label}"
                                required="#{bindings.ApplUnitControlView1.hints.AunitctrlBe.mandatory}"
                                columns="#{bindings.ApplUnitControlView1.hints.AunitctrlBe.displayWidth}"
                                maximumLength="#{bindings.ApplUnitControlView1.hints.AunitctrlBe.precision}"
                                shortDesc="#{bindings.ApplUnitControlView1.hints.AunitctrlBe.tooltip}"
                                id="it1">
                    <f:validator binding="#{row.bindings.AunitctrlBe.validator}"/>
                  </af:inputText>
                </af:column>
                <af:column sortProperty="AunitctrlUnit" filterable="true"
                           sortable="true"
                           headerText="#{bindings.ApplUnitControlView1.hints.AunitctrlUnit.label}"
                           id="c3" width="105">
                  <af:inputText value="#{row.bindings.AunitctrlUnit.inputValue}"
                                label="#{bindings.ApplUnitControlView1.hints.AunitctrlUnit.label}"
                                required="#{bindings.ApplUnitControlView1.hints.AunitctrlUnit.mandatory}"
                                columns="#{bindings.ApplUnitControlView1.hints.AunitctrlUnit.displayWidth}"
                                maximumLength="#{bindings.ApplUnitControlView1.hints.AunitctrlUnit.precision}"
                                shortDesc="#{bindings.ApplUnitControlView1.hints.AunitctrlUnit.tooltip}"
                                id="it9">
                    <f:validator binding="#{row.bindings.AunitctrlUnit.validator}"/>
                  </af:inputText>
                </af:column>
                <af:column sortProperty="AunitctrlCostMethod" filterable="true"
                           sortable="true"
                           headerText="#{bindings.ApplUnitControlView1.hints.AunitctrlCostMethod.label}"
                           id="c9" width="105">
                  <af:inputText value="#{row.bindings.AunitctrlCostMethod.inputValue}"
                                label="#{bindings.ApplUnitControlView1.hints.AunitctrlCostMethod.label}"
                                required="#{bindings.ApplUnitControlView1.hints.AunitctrlCostMethod.mandatory}"
                                columns="#{bindings.ApplUnitControlView1.hints.AunitctrlCostMethod.displayWidth}"
                                maximumLength="#{bindings.ApplUnitControlView1.hints.AunitctrlCostMethod.precision}"
                                shortDesc="#{bindings.ApplUnitControlView1.hints.AunitctrlCostMethod.tooltip}"
                                id="it6">
                    <f:validator binding="#{row.bindings.AunitctrlCostMethod.validator}"/>
                  </af:inputText>
                </af:column>
                <af:column sortProperty="AunitctrlCostMgmtOpt" filterable="true"
                           sortable="true"
                           headerText="#{bindings.ApplUnitControlView1.hints.AunitctrlCostMgmtOpt.label}"
                           id="c1" width="105">
                  <af:inputText value="#{row.bindings.AunitctrlCostMgmtOpt.inputValue}"
                                label="#{bindings.ApplUnitControlView1.hints.AunitctrlCostMgmtOpt.label}"
                                required="#{bindings.ApplUnitControlView1.hints.AunitctrlCostMgmtOpt.mandatory}"
                                columns="#{bindings.ApplUnitControlView1.hints.AunitctrlCostMgmtOpt.displayWidth}"
                                maximumLength="#{bindings.ApplUnitControlView1.hints.AunitctrlCostMgmtOpt.precision}"
                                shortDesc="#{bindings.ApplUnitControlView1.hints.AunitctrlCostMgmtOpt.tooltip}"
                                id="it3">
                    <f:validator binding="#{row.bindings.AunitctrlCostMgmtOpt.validator}"/>
                  </af:inputText>
                </af:column>
                <af:column sortProperty="AunitctrlCostApprMtd" filterable="true"
                           sortable="true"
                           headerText="#{bindings.ApplUnitControlView1.hints.AunitctrlCostApprMtd.label}"
                           id="c2" width="105">
                  <af:inputText value="#{row.bindings.AunitctrlCostApprMtd.inputValue}"
                                label="#{bindings.ApplUnitControlView1.hints.AunitctrlCostApprMtd.label}"
                                required="#{bindings.ApplUnitControlView1.hints.AunitctrlCostApprMtd.mandatory}"
                                columns="#{bindings.ApplUnitControlView1.hints.AunitctrlCostApprMtd.displayWidth}"
                                maximumLength="#{bindings.ApplUnitControlView1.hints.AunitctrlCostApprMtd.precision}"
                                shortDesc="#{bindings.ApplUnitControlView1.hints.AunitctrlCostApprMtd.tooltip}"
                                id="it2">
                    <f:validator binding="#{row.bindings.AunitctrlCostApprMtd.validator}"/>
                  </af:inputText>
                </af:column>
                <af:column sortProperty="AunitctrlJocApprMtd" filterable="true"
                           sortable="true"
                           headerText="#{bindings.ApplUnitControlView1.hints.AunitctrlJocApprMtd.label}"
                           id="c4" width="105">
                  <af:inputText value="#{row.bindings.AunitctrlJocApprMtd.inputValue}"
                                label="#{bindings.ApplUnitControlView1.hints.AunitctrlJocApprMtd.label}"
                                required="#{bindings.ApplUnitControlView1.hints.AunitctrlJocApprMtd.mandatory}"
                                columns="#{bindings.ApplUnitControlView1.hints.AunitctrlJocApprMtd.displayWidth}"
                                maximumLength="#{bindings.ApplUnitControlView1.hints.AunitctrlJocApprMtd.precision}"
                                shortDesc="#{bindings.ApplUnitControlView1.hints.AunitctrlJocApprMtd.tooltip}"
                                id="it4">
                    <f:validator binding="#{row.bindings.AunitctrlJocApprMtd.validator}"/>
                  </af:inputText>
                </af:column>
                <af:column sortProperty="AunitctrlCreBy" filterable="true"
                           sortable="true"
                           headerText="#{bindings.ApplUnitControlView1.hints.AunitctrlCreBy.label}"
                           id="c5" width="105">
                  <af:inputText value="#{row.bindings.AunitctrlCreBy.inputValue}"
                                label="#{bindings.ApplUnitControlView1.hints.AunitctrlCreBy.label}"
                                required="#{bindings.ApplUnitControlView1.hints.AunitctrlCreBy.mandatory}"
                                columns="#{bindings.ApplUnitControlView1.hints.AunitctrlCreBy.displayWidth}"
                                maximumLength="#{bindings.ApplUnitControlView1.hints.AunitctrlCreBy.precision}"
                                shortDesc="#{bindings.ApplUnitControlView1.hints.AunitctrlCreBy.tooltip}"
                                id="it7">
                    <f:validator binding="#{row.bindings.AunitctrlCreBy.validator}"/>
                  </af:inputText>
                </af:column>
                <af:column sortProperty="AunitctrlCreDate" filterable="true"
                           sortable="true"
                           headerText="#{bindings.ApplUnitControlView1.hints.AunitctrlCreDate.label}"
                           id="c8" width="103">
                  <f:facet name="filter">
                    <af:inputDate value="#{vs.filterCriteria.AunitctrlCreDate}"
                                  binding="#{backingBeanScope.backing_untitled8.id5}"
                                  id="id5"/>
                  </f:facet>
                  <af:inputDate value="#{row.bindings.AunitctrlCreDate.inputValue}"
                                label="#{bindings.ApplUnitControlView1.hints.AunitctrlCreDate.label}"
                                required="#{bindings.ApplUnitControlView1.hints.AunitctrlCreDate.mandatory}"
                                shortDesc="#{bindings.ApplUnitControlView1.hints.AunitctrlCreDate.tooltip}"
                                id="id3">
                    <f:validator binding="#{row.bindings.AunitctrlCreDate.validator}"/>
                    <af:convertDateTime pattern="#{bindings.ApplUnitControlView1.hints.AunitctrlCreDate.format}"/>
                  </af:inputDate>
                </af:column>
                <af:column sortProperty="AunitctrlUpdBy" filterable="true"
                           sortable="true"
                           headerText="#{bindings.ApplUnitControlView1.hints.AunitctrlUpdBy.label}"
                           id="c7" width="107">
                  <af:inputText value="#{row.bindings.AunitctrlUpdBy.inputValue}"
                                label="#{bindings.ApplUnitControlView1.hints.AunitctrlUpdBy.label}"
                                required="#{bindings.ApplUnitControlView1.hints.AunitctrlUpdBy.mandatory}"
                                columns="#{bindings.ApplUnitControlView1.hints.AunitctrlUpdBy.displayWidth}"
                                maximumLength="#{bindings.ApplUnitControlView1.hints.AunitctrlUpdBy.precision}"
                                shortDesc="#{bindings.ApplUnitControlView1.hints.AunitctrlUpdBy.tooltip}"
                                id="it5">
                    <f:validator binding="#{row.bindings.AunitctrlUpdBy.validator}"/>
                  </af:inputText>
                </af:column>
                <af:column sortProperty="AunitctrlUpdDate" filterable="true"
                           sortable="true"
                           headerText="#{bindings.ApplUnitControlView1.hints.AunitctrlUpdDate.label}"
                           id="c10" width="105">
                  <f:facet name="filter">
                    <af:inputDate value="#{vs.filterCriteria.AunitctrlUpdDate}"
                                  binding="#{backingBeanScope.backing_untitled8.id6}"
                                  id="id6"/>
                  </f:facet>
                  <af:inputDate value="#{row.bindings.AunitctrlUpdDate.inputValue}"
                                label="#{bindings.ApplUnitControlView1.hints.AunitctrlUpdDate.label}"
                                required="#{bindings.ApplUnitControlView1.hints.AunitctrlUpdDate.mandatory}"
                                shortDesc="#{bindings.ApplUnitControlView1.hints.AunitctrlUpdDate.tooltip}"
                                id="id4">
                    <f:validator binding="#{row.bindings.AunitctrlUpdDate.validator}"/>
                    <af:convertDateTime pattern="#{bindings.ApplUnitControlView1.hints.AunitctrlUpdDate.format}"/>
                  </af:inputDate>
                </af:column>
                <af:column sortProperty="RowID" filterable="true" sortable="true"
                           headerText="#{bindings.ApplUnitControlView1.hints.RowID.label}"
                           id="c11" width="105">
                  <af:inputText value="#{row.bindings.RowID.inputValue}"
                                label="#{bindings.ApplUnitControlView1.hints.RowID.label}"
                                required="#{bindings.ApplUnitControlView1.hints.RowID.mandatory}"
                                columns="#{bindings.ApplUnitControlView1.hints.RowID.displayWidth}"
                                maximumLength="#{bindings.ApplUnitControlView1.hints.RowID.precision}"
                                shortDesc="#{bindings.ApplUnitControlView1.hints.RowID.tooltip}"
                                id="it8">
                    <f:validator binding="#{row.bindings.RowID.validator}"/>
                  </af:inputText>
                </af:column>
              </af:table>
            </af:panelCollection>
          </af:form>
        </af:document>
      </f:view>
      <!--oracle-jdev-comment:auto-binding-backing-bean-name:backing_untitled8-->
    </jsp:root>
        public String cb7_action() {
            try {
                BindingContainer bindings1 = getBindings();
                DCIteratorBinding dciter = (DCIteratorBinding)bindings1.get("ApplUnitControlView1Iterator");
                Row oldCcurrentRow = dciter.getCurrentRow();
                BindingContainer bindings = getBindings();
                OperationBinding operationBinding = bindings.getOperationBinding("CreateInsert");
                Object result = operationBinding.execute();
                if (!operationBinding.getErrors().isEmpty()) {
                    return null;
                RichPopup popup = this.getP1();
                RichPopup.PopupHints hints =
                    new RichPopup.PopupHints(); //empty hints renders dialog in center of screen
                popup.show(hints);
            catch (NullPointerException e)
                System.out.println(" cause " + e.getCause());
                System.out.println("message" + e.getLocalizedMessage());
                System.out.println("stack trace" + e.getStackTrace());
            return "insert";
        }Edited by: ADF 7 on Feb 10, 2012 2:05 AM

  • When i insert the menu.js file the validations(javascript) is not works

    i write the following code into "menu.js" file ie. for menu bar its work finely. I write one jsp file in that i write the code for insert record with the validatations eg. check whether its number or not/ integer or not.
    In this jsp file i include the .js file ie. menu.js.
    ============== In jsp file ===================
    <table align=center width=100%>
         <tr>
              <td>
                        <script type='text/javascript' src='menu/menu.js'></script>
              </td>
         </tr>
    </table>
    =================================
    But problem is this when i insert the above 5 or 6 lines into jsp file at run time validation script is not working and when i remove the
    above code then validation script is works.
    So experts i want works both means the menu and the validation script.

    andy_surya wrote:
    i write the following code into "menu.js" file ie. for menu bar its work finely. I write one jsp file in that i write the code for insert record with the validatations eg. check whether its number or not/ integer or not.
    In this jsp file i include the .js file ie. menu.js.
    ============== In jsp file ===================
    <table align=center width=100%>
         <tr>
              <td>
                        <script type='text/javascript' src='menu/menu.js'></script>
              </td>
         </tr>
    </table>
    =================================
    But problem is this when i insert the above 5 or 6 lines into jsp file at run time validation script is not working and when i remove the
    above code then validation script is works.
    So experts i want works both means the menu and the validation script.Despite the confusion there seems to be in many threads (which is scary to me somehow) this forum is not about JavaScript.
    You need to debug your JavaScript problem. I suggest starting by using Firefox and then using Tools->Error Console and see what's up. By your description you have two different JavaScripts with conflicting functions or something.

  • Validation Event Handler Not working with GTC Recon???

    We have implemented a Validation Event Handler on user entity.
    In the code we have implemented both the execute methods i.e. Orchestration andf Bulk Orchestration. We have created a UDF for Manager field and our validation handler checks whether the user in Manager UDF field is an Active user in OIM or not. In case the user is not an Active user, code will throw a Validation Failed Exception.
    At the time of changing the Manager UDF value from the Console directly Validation Event Handler is getting triggered but with GTC Recon Validation Handler is not Working.
    Previously i faced the same issue with the post process event handler but the problem get resoved when i implemented execute method with Bulk Orchestration. As per my understanding Bulk Orchestration exceute method gets called with GTC Recon and execute method with Orchestration gets called when changing the attribute value directly from the console.
    In case of Validation Event Handler i have implemented both but still validation Event handler is not working with GTC.
    Thanks in Advance....

    Any Help????

  • InDesign Buttons and Forms... Not Working

    Hello Guys,
    I'm using Adobe InDesogn CC 10.1.0.70 x64 Build, the problem is with the check box option from Buttons and Forms, They are, simply, not working... I'm trying to add a check box on my pdf I'm creating in InDesign.. I'm using checkbox from "Sample Buttons and forms".. but nothing is working.. I'm just dragging the Check Box samp and drop it in my canvas, exporting it as PDF with "Hyperlinks" checked.. and Interactive Elemnts with Include Appearance chosen but the check box doesn't having any action!! I don't know what I should do to make this work please help  

    Start by restoring your InDesign preferences:
    Trash, Replace, Reset, or Restore the application Preferences

  • Actionscript error checking not working?

    Does error checking only work on actionscript files that are imported by main file?
    Also...will error checking not work on the current open file if another file contains errors?

    from where u are loading the external SWF
    possible problems are
    check the URL
    check for crossDomain problem

  • Contact Form with Email PHP not working?

    Hello !
    Here is a link to my contact form:
    http://bayareafacepainters.com/quote_face_painting.html
    Here is the tutorial I am following to set up the Form to Email PHP
    http://www.freecontactform.com/email_form.php
    My form is not working. It is not sending me the email, and the "Thank you for contacting us page" is not showing up either. Is this a simple fix? I am not an expert coder, any help on what I am doing wrong or missing would be helpfull!

    Thank you for the suggestions... I cleaned up the names, and so I guess I am supposed to match the names in the form  to the PHP, so I changed the PHP to reflect the names of the fields in the form... it seems there may be more areas where I need to do this... What else does this need to work properly?
    http://www.bayareafacepainters.com/quote_face_painting.html
    <?php
    if(isset($_POST['email'])) {
        // EDIT THE 2 LINES BELOW AS REQUIRED
        $email_to = "[email protected]";
        $email_subject = "Face Painting Quote";
        function died($error) {
            // your error code can go here
            echo "We are very sorry, but there were error(s) found with the form you submitted. ";
            echo "These errors appear below.<br /><br />";
            echo $error."<br /><br />";
            echo "Please go back and fix these errors.<br /><br />";
            die();
        // validation expected data exists
        if(!isset($_POST['Name']) ||
            !isset($_POST['Email']) ||
            !isset($_POST['Phone']) ||
            !isset($_POST['Contact_Preference']) ||
            !isset($_POST['Contact_Preference']) ||
            !isset($_POST['Date']) ||
            !isset($_POST['Time']) ||
            !isset($_POST['Location']) ||
            !isset($_POST['Guests']) ||
            !isset($_POST['Age']) ||
            !isset($_POST['comments'])) {
            died('We are sorry, but there appears to be a problem with the form you submitted.');     
        $Name = $_POST['Name']; // required
        $Email = $_POST['Email']; // required
        $Phone = $_POST['Phone']; // required
        $telephone = $_POST['telephone']; // not required
        $comments = $_POST['comments']; // required
        $error_message = "";
        $email_exp = '/^[A-Za-z0-9._%-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/';
      if(!preg_match($email_exp,$email_from)) {
        $error_message .= 'The Email Address you entered does not appear to be valid.<br />';
        $string_exp = "/^[A-Za-z .'-]+$/";
      if(!preg_match($string_exp,$first_name)) {
        $error_message .= 'The First Name you entered does not appear to be valid.<br />';
      if(!preg_match($string_exp,$last_name)) {
        $error_message .= 'The Last Name you entered does not appear to be valid.<br />';
      if(strlen($comments) < 2) {
        $error_message .= 'The Comments you entered do not appear to be valid.<br />';
      if(strlen($error_message) > 0) {
        died($error_message);
        $email_message = "Form details below.\n\n";
        function clean_string($string) {
          $bad = array("content-type","bcc:","to:","cc:","href");
          return str_replace($bad,"",$string);
        $email_message .= "First Name: ".clean_string($first_name)."\n";
        $email_message .= "Last Name: ".clean_string($last_name)."\n";
        $email_message .= "Email: ".clean_string($email_from)."\n";
        $email_message .= "Telephone: ".clean_string($telephone)."\n";
        $email_message .= "Comments: ".clean_string($comments)."\n";
    // create email headers
    $headers = 'From: '.$email_from."\r\n".
    'Reply-To: '.$email_from."\r\n" .
    'X-Mailer: PHP/' . phpversion();
    @mail($email_to, $email_subject, $email_message, $headers);
    ?>
    <!-- include your own success html here -->
    Thank you for contacting us. We will be in touch with you very soon.
    <?php
    ?>

  • Form validation error with mandatory fields and signature field

    Hello,
    I have seen that many other users are facing this issue, and they partialy do solve it with some workarounds. However, none of them applies to my case.
    I have a dynamic form (can be registration form for example) where user fills in bunch of fields. Some of them are mandatory.
    When user signs the form, I get our favourite validation error popups that filed this and this did not validate. (I think that the signature is not valid too once I get these errors).
    Workaround would be to set all fileds in the form as optional, however, the presign and postsign events work only in A9 and I need the form to be compatible with ver. 8 too.
    I also need to make sure, that they are not set to optional, if the signing fails, user clicks on cancel etc...
    Any ideas how to acomplish such a scenario?
    Thanks
    J.

    solved by myself.
    You have to install and configure the reader rights credentials mentioned in note 736902

  • Creating a Form in PRO 9 not working. Fonts turn to Symbols

    When I run the Form Wizard in Acrobat Pro 9 everything works normally until I save the form and open it again.
    When I open the form after saving it all of my fonts convert to symbols [### @@>>]. I've opened the PDF in Readers 7, 8 and 9 AND when I open the very same PDF in PRO 9, I get the same symbols for fonts thing.
    Has anyone else seen this or does anyone know if this is a bug or am I doing something wrong?
    Just as a test I did not use form wizard and the form worked normally after saving... No symbols.

    The form fields are empty but all of the text outside of the form fields change to symbols like [##@@!!--###%%].
    This happens in Reader 7, 8 and 9.
    And when I "re-open" the PDF in PRO 9.
    First off Thanks guys for the help!!
    I thought about the fonts not being embedded but shouldn't I receive an error message when I try to save it?
    Also if I save the document as a plain PDF [not a form] it opens with normal fonts.
    Also if I don't use the Form Wizard and just add the form fields manually then it works.
    Thanks again guys for thinking about this and trying to help.

  • Form in Dynamic page not working when checkbox is used.

    I have created a form using dynamic page. The form most have display fields and a checkbox field. When I check a box, it assigns 'Y' value and when unclick, it assign 'N' to the database field.
    When I submit the form, the procedure which is supposed to save the form data never gets executed. Well, at least it says, page not found HTTP 404 error.
    Interestingly if I make this field a text box and manually enter 'Y' or 'N', and then submit the form, the procedure is executed. Data gets saved.
    Is the checkbox not supposed to be used for a database field because checkbox value can be assigned only using javascript and the procedure never get that value ?
    Can you please tell me how to use a checkbox for a database field using dynamic page ?
    thanks,
    Mainak

    Sharmila,
    When I said, the form does not get submitted, I meant that the procedure does not work. The form gets submitted but the procedure does not work. It gives HTTP 404 error. That is what perplexes me. I am unable to understand why the procedure does not work when I click a checkbox.
    May be you can make this work. I am hopeless about this.
    Here is the code for the procedure sumbit_form:
    NOTE: I ADDED TWO FIELDS CALLED PROMOT VARCHAR2(1), PROMOTID NUMBER(4) TO THE EMP TABLE AND CREATED A NEW TABLE CALLED PROMOTEMP. THIS IS A TEST CASE.
    create or replace procedure sumbit_form
    (p_empno IN portal30.wwv_utl_api_types.vc_arr, p_promot IN portal30.wwv_utl_api_types.vc_arr, p_action IN VARCHAR2)
    is
    begin
    if p_action = 'save' then
    for i in 1..p_empno.count LOOP
    update scott.promotemp
    set promot = p_promot(i)
    where empno = p_empno(i);
    END LOOP;
    end if;
    commit;
    htp.p('<b>Saved Successfully</b>');
    htp.p('<table border=1 bordercolor="red">');
    for c1 in (select * from promotemp where promot='Y')
    LOOP
    htp.p('<tr><td>');
    htp.p(c1.ename);
    htp.p('</td><td>');
    htp.p(c1.job);
    htp.p('</td><td>');
    htp.p(c1.mgr);
    htp.p('</td><td>');
    htp.p(c1.sal);
    htp.p('</td><td>');
    htp.p(c1.deptno);
    htp.p('</td></tr>');
    end loop;
    htp.p('</table>');
    EXCEPTION
    when others then
    raise;
    end;
    Here is the code for the dynamic page.
    <HTML>
    <HEAD>
    <TITLE>Promot Emp</TITLE>
    <script language="JavaScript1.1">
    function include(form) {
    var thisform = form;
    for (var i=0; i<thisform.length; i++) {
         if (thisform.elements.type == 'checkbox') {
              if (thisform.elements[i].checked) {
                   thisform.elements[i].value = 'Y'; }
              else { thisform.elements[i].value = 'N'; }
    form.submit();
    function show(form) {
    var thisform = form;
    for (var i=0; i<thisform.length; i++) {
         if (thisform.elements[i].type == 'checkbox') {
              if (thisform.elements[i].value = 'Y') {
                   thisform.elements[i].checked = true; }
              else { thisform.elements[i].checked = false; }
    </script>
    </HEAD>
    <BODY>
    <FORM action="scott.sumbit_form" method="post">
    <table border=1 bordercolor="red">
    <tr>
    <td> </td>
    <td>Name</td>
    <td>Job</td>
    <td>Manager</td>
    <td>Hire Date</td>
    <td>Commission</td>
    <td>Department#</td>
    <td>Include</td>
    </tr>
    <ORACLE>declare
    i number;
    begin
    i := 0;
    for c1 in (select * from scott.promotemp where promotid = :promotid)
    loop
    htp.p('<tr><td>');
    htp.p('<input type="hidden" name="p_empno" value='||c1.empno||'>');
    htp.p('</td><td>');
    htp.p(c1.ename);
    htp.p('</td><td>');
    htp.p(c1.job);
    htp.p('</td><td>');
    htp.p(c1.mgr);
    htp.p('</td><td>');
    htp.p(c1.hiredate);
    htp.p('</td><td>');
    htp.p(c1.comm);
    htp.p('</td><td>');
    htp.p(c1.deptno);
    htp.p('</td><td>');
    if (c1.promot = 'Y') then
    htp.p('<SELECT NAME="p_promot" SIZE="1">
    <OPTION SELECTED VALUE="'||c1.promot||'">Yes
    <OPTION VALUE="N">No
    </SELECT>');
    else
    htp.p('<SELECT NAME="p_promot" SIZE="1">
    <OPTION SELECTED VALUE="'||c1.promot||'">No
    <OPTION VALUE="Y">Yes
    </SELECT>');
    end if;
    htp.p('</td></tr>');
    end loop;
    htp.p('</table>');
    htp.p('<input type="submit" value="save" name="p_action">');
    end;
    </ORACLE>
    </form>
    </BODY>
    </HTML>
    thanks,
    Mainak

  • ADF Custom error handler not working.

    Hi All,
    i am using jdev version 11.1.1.5.0. i have created one custom error handler class in model layer which extend DcErrorHandlerImpl class.
    and do the entry in Databinding.cpx file
    *<Application ErrorHandlerClass="mypackage.classname"/>*
    i have override getDisplayMessage(BindingContext ctx, Exception ex) method to show SQL Exception which comes from database table trigger.
    code is following-
    package com.in.jagran.view.services;
        import java.sql.SQLException;
        import oracle.adf.model.BindingContext;
        import oracle.adf.model.binding.DCErrorHandlerImpl;
        import oracle.jbo.JboException;
        public class AclasErrorHandler extends DCErrorHandlerImpl {
          public AclasErrorHandler(boolean setToThrow) {
            super(setToThrow);
            System.out.println("Inside Error Handler class");
          public AclasErrorHandler() {
              super(true);
           // this(true);
           * Returns the message that will be reported to JSF for each error that occurs.
           * Returning "null" is the way the custom error handler signals that a given exception
           * should not be reported to the client.
          @Override
          public String getDisplayMessage(BindingContext ctx, Exception ex)
            if (ex instanceof oracle.jbo.ValidationException) {
              return super.getDisplayMessage(ctx, ex);
            else {
              // Extract and return the error message that has to be displayed
              Exception exception = ex;
              String message = "";
              // If this exception is an instance of JboException,
              // try to find the cause by recursing over the eventual causing exceptions
              if (exception instanceof JboException)
                Throwable[] exceptionList = ((JboException)exception).getExceptions();
                while (exception instanceof JboException
                        && exceptionList != null && exceptionList.length > 0)
                  exception = (Exception)exceptionList[0];
                  if (exception instanceof JboException) {
                    exceptionList = ((JboException)exception).getExceptions();
              // *** Special processing of SQLExceptions
              if (exception instanceof SQLException) {
                message = exception.getMessage();
                // Ignore the lines in the error message that indicate the line number in the PLSQL code that the error resulted on.
                int ind = message.indexOf("ORA-06512");
                if (ind > 0)
                  message = message.substring(0, ind);
              // *** If the the reason for the JboException was data creation exception then display the message
              // of the top JboException (i.e. JBO-*****: Invalid numeric value, date format or time format)
              else if (exception instanceof NumberFormatException || exception instanceof IllegalArgumentException) {
                // Report the top exception
                message = ex.getMessage();
              // Otherwise report the message of the lowest exception in the hierarchy
              else {
                message = exception.getMessage();
              return message;
        }but it is not working for me.
    thanks in Advance.

    yes i have used dubugger.
    i have set break point to following line-
    return super.getDisplayMessage(ctx, ex);
    if (ex instanceof oracle.jbo.ValidationException) {
            return super.getDisplayMessage(ctx, ex);   
    }when atttribute validation done like i have attribute of type number and i have done the validation "must be greater than 0" now when i have given negative value control go to above line.
    and i have added following code also in handler class
            @Override
               public void reportException(DCBindingContainer dCBindingContainer,
                                           Exception exception) {
    System.out.println(exception.getMessage());
                       super.reportException(dCBindingContainer, exception);
                   }now when i have done commit operation control go to here and println statement print follwoing error on log window.
    JBO-26041: Failed to post data to database during "Rollback to Savepoint": SQL Statement "null".

  • Tabular form number validtion is not working

    Hi,
    I have an tabular form with updatable columns which has datatype as number. i have created the in built tabular form validation "Item/value specified is numeric" for this updatable columns.
    when i entered any non numeric character like "asdasd" into this updatable columns. it shows me plsql error. PL/SQL: numeric or value error: character to number conversion error.
    can you please help me on this?
    Regards,
    Nilesh

    Hi,
    If you enter "asdasd" and get PL/SQL: numeric or value error: character to number conversion error , it only implies the right thing is happening.
    Maybe what you are alluding to is that the messages is not the way you want it. It should perhaps be "<column_name> must be numeric."
    What do you have in the Error Message item of this process? If is it null you are likely to get the message of the type you are getting.
    Did you by any chance try to change the default error message, which reads "#COLUMN_HEADER# must be numeric."?
    Regards,

  • Detect form validation error

    Hi there,
    I have a page that displays a report and a form on the same page.
    The user clicks on a row in the report - triggering a re-submit - and the form fills with the correct details.
    On the report there's a NEW button to add a new row.
    When clicked the form is emptied and ready for filling in.
    On the form there's a CREATE button to accept the entry and create the row (using a custom After Submit process).
    I use Before Header processes to set the details in the form depending on the row clicked or a particular REQUEST from a button.
    I also enable/disable button depending on the REQUEST (in add mode the CREATE button is shown - otherwise the APPLY button).
    So far so good.
    Now i have some validations on the form and when one of them fails it re-writes the screen with the inline error messages shown however the REQUEST is then empty!
    This causes problems for me when pre-setting the form with data and enabling/disabling buttons.
    Is it possible to detect somehow if a field validation error has occured or set the REQUEST with a particular value?
    Because of the REQUEST reset after an error my CREATE button gets disabled and my APPLY button re-appears causing confusion for the user (and me :-) ).
    I hope I'm making myself clear here.
    Ruud

    The problem is not how to set the items & buttons.
    My buttons are conditionally shown by looking at the REQUEST value.
    My problem is more with the logic of detecting an error on my screen.
    I need something like following pseudo-code:-
    IF :REQUEST = 'ADD_ROW' THEN -- Insert mode (invoked by pressing button NEW on the report)
      clear form
      disable button APPLY in the form
      enable button CREATE in te form
    ELSE
      IF form shows an inline validation error THEN -- Error mode
        -- do nothing to change the values on the form
        -- do nothing to change existing enabled/disabled buttons
        -- Basically allow the user to correct mistakes and continue
        NULL;
      ELSE -- Normal update mode
        fill form with details of selected row
        enable APPLY button
        disable CREATE button
      END IF;
    END IF;It's the "form shows an inline validation error" bit that I have problems with.
    How do I know an error is shown on the screen?
    Is there an application item that tells me this?
    Perhaps I could set a page or app item myself in the validation code to flag that an error occurred?
    Ruud

Maybe you are looking for

  • Delivery not picked in Wave in T code VL35

    Hi Friends, I have created delivery for 201 Movement (Issue to Cost Centre)and with HODN-Item Category. This is not picked up for Wave in VL35 T Code. Please let me know if there is any SPRO setting missed out. Is there any Upgrade related issue. (EC

  • ABAP Run time Error whle executing the Balance sheet report in FGI0

    Hi, I am getting the below ABAP Run time error while executing the Balance Sheet report in FGI0.It was working before but now it is giving the error.Kindly help me in solving this. Runtime Errors         MESSAGE_TYPE_X Date and Time          06/12/20

  • Question about Alpha option in the transfer rules for infoobject

    SDN Experts, I know that we check the Alpha conversion for only numbers like 0,1,2. this alpha option puts zeros in fornt of numbers but what happens when we get characters words for example 'Apple' does it put zeros infornt like '00Apple'? i will as

  • How do I learn to make truly interactive graphics (beginner)?

    Hello. I would appreciate some guidance to learn how to make truly interactive graphics for the web. I am a beginner, with most of my experience in print design. I am not an experienced high level coder, and the less I have to understand about coding

  • Client login solution - please recommend.

    In regards to the site http://www.myhappypeople.com I need a simple directory access solution (that hopefully doesn't let people bookmark an accessed page and go back to it without logging in again). All I want is for a client to click one link, whic