Spray validation TextField placement

Hi everyone,
I am having possibly quite easy problem for most of you with placing  Spray validation TextField.
I am trying move to the left this field by fixed number of pixels. My code looks like:
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
<style type="text/css">
.form_container {
  height: 400px;
  width: 960px;
  border: 1px solid #000;
</style>
<link href="SpryValidationTextField.css" rel="stylesheet" type="text/css">
<script src="SpryValidationTextField.js" type="text/javascript"></script>
</head>
<body>
<div class="form_container">
  <p> </p>
  <form name="form1" method="post" action="">
    <span id="nameTextField">
    <label for="name"></label>
    <input type="text" name="name" id="name">
    <span class="textfieldRequiredMsg">A value is required.</span></span>
  </form>
</div>
<script type="text/javascript">
var sprytextfield1 = new Spry.Widget.ValidationTextField("nameTextField", "none", {validateOn:["blur"], hint:"Your Name"});
</script>
</body>
</html>
If you know how to move this field to the right please let me know.
Thanks in advance.

Adding
.textfieldRequiredState .textfieldRequiredMsg, .textfieldInvalidFormatState .textfieldInvalidFormatMsg, .textfieldMinValueState .textfieldMinValueMsg, .textfieldMaxValueState .textfieldMaxValueMsg, .textfieldMinCharsState .textfieldMinCharsMsg, .textfieldMaxCharsState .textfieldMaxCharsMsg
    margin-left: -50px;
will produce the following result

Similar Messages

  • Spry validation textfield errors are appearing as regular text

    I am trying to create a simple email contact form using two spry validation text fields and one spry validation textarea. I inserted a spry validation text field called "Name", and then a second below it called "email" and then a spry validation textarea called "message" I gave the email field an email validation to come on at Blur, and a textarea character count validation of no more than 400 characters. The problem is that the error messages are appearing as soon as the page is loaded, they are bypassing their initial states. They say: "A value is required.Invalid format." and "A value is required.Exceeded maximum number of characters."

    I build a sample a while ago that shows you how to generate and destroy validations on the fly.
    http://www.spry-it.com/examples/spry-widget-validation-generation-and-destroy/
    Check out the source for how its done.

  • Spry validation textfield - required condition

    Can anyone help me with the Spry validation text field...
    I have a form for which I wish to be able to use for 1 to 4
    users to fill in, if at the beginning of the form they select 2
    users then I wish to then change the 'isRequired:false' to
    'isRequired:true' so that the details for user 2 then become
    required before the form submits... Is there a way I can do this?
    Thanks

    ...plz help me..

  • Spry validation textfield widget

    I've followed the lynda.com tutorial
    online
    here & added the widget to my page in DWCS4.
    I can preview the various states in the properties bar but it
    is not working when I save the page & preview in my browser (or
    live view).
    My page is a php file - does this make any difference?

    This is causing a JavaScript error and not allowing the Spry
    JavaScript to run:
    if (window.location.search.substring(1) != "")
    window.frames['PropertiesFrame'].location.href =
    http://powering.expertagent.co.uk/CustomSearch.aspx?ShowSearchFirst=false&aid={76C20EAB-05 89-4AEB-A7BE-CE3182F07285}&"
    +
    window.location.search.substring(1)
    else
    window.frames['PropertiesFrame'].location.href =
    http://powering.expertagent.co.uk/default.aspx?aid={76C20EAB-0589-4AEB-A7BE-CE3182F07285}& dep=1"
    Remove it and the Spry will run.
    Ken Ford
    Adobe Community Expert Dreamweaver/ColdFusion
    Adobe Certified Expert - Dreamweaver CS3
    Adobe Certified Expert - ColdFusion 8
    Fordwebs, LLC
    http://www.fordwebs.com
    http://www.cfnoob.com
    "Sirius7" <[email protected]> wrote in
    message news:gi0mfo$ad0$[email protected]..
    > Hi Ken
    >
    > Thanks - just unprotected the directory as it's still in
    development...
    >
    >
    http://www.designermagic.co.uk/hobarts/freemagazine.php
    >
    > I've not added validation to the dropmenu or checkboxes
    yet.
    >

  • Error in Validation Textfield Overview

    I tried to validate a german phonenumber and it didn't work.
    The document says there:
    <script type="text/javascript"> var TextfieldWidgetObject
    = new Spry.Widget.ValidationTextField("TextfieldWidget",
    {format:"phone_custom", pattern:"00 0000 A"});;
    </script>
    but this will not work!
    var sprytextfield3 = new Spry.Widget.ValidationTextField("Tele",
    "phone_number", {format:"phone_custom",validateOn:["blur"],
    isRequired:false, pattern:"00000 0000"});
    This works!
    The second thing which is wrong - in the table there stands
    "phone" "phone_us" (default)/"phone_custom"
    ["blur"]/["change"]/["blur", "change"] true (default)
    false false (default)
    true - - custom phone pattern
    - used when
    format="phone_custom"
    correct would be there instead of "phone" "phone_number".
    ;) now I have still to find a way for German phone nummers -
    areacodes can have 3 - 5 digits - the number 3 - 10.
    Has anyone a clue?

    Hi,
    I tested the patterns you mentioned and both of them are
    working for me. The first pattern :00 0000 A accepts something
    like: 12 2345 E (the letter should be in upper-case only).
    To define a validation phone number with variable length, you
    should create you own function and then call it from the widget
    constructor.
    The function you create should contain the regexp you need to
    validate for your custom pattern, and should receive two
    parameters: (value, options).
    We have such an example on the labs:
    http://labs.adobe.com/technologies/spry/samples/validationwidgets/TextfieldValidationSampl e.html
    The lest example from page contains an example of how
    implement your function and then call it from the widget
    constructor.
    Hope this helps,
    Diana

  • Contact form with Spry 'Tabbed Panels' and 'Validation TextField'

    Hello
    I am considering making a form using Spry tabbed panels (as step 1, step 2, etc.) and the form validation to process name, email, address, credit-card, accept terms and conditions, etc.
    This is instead of a multi-page form, because there could be security flaws there (i.e. passing sensitive information from one page to the next) and it would take longer for the user - needing to open each page, etc. where this is to be used as a buy form (for a single product), sort of like one-click order (but not exactly).
    Overall, it seems like a good idea, someone else has tried it, but I do have some questions that haven't been covered there - relevant for anyone that'd ever want to do this with Spry - that didn't come up there:
    1. Will it degrade gracefully, and still work? For example, when you turn JavaScript, CSS, images, and other things off?
    2. Is it possible to go from Step-to-Step (using the top tabs, or 'Submit' and 'Back' buttons added on the bottom) without entering all of the required information? Because I would like to disable this - perhaps also have the future Steps grayed out and un-clickable.
    3. Is it safe to use this form to enter credit card details, and then email those to the website's account? I am new to SSL, so I'm not sure if I could implement some security feature here? Where should I look?
    4. Does it load the page fast, despite having multiple steps all pre-loaded? Can we make subsequent steps require some 'loading' (without refreshing the page)?
    5. If it doesn't do either of these, how could we make it do that?
    I hope to hear from you!

    Hello
    I am considering making a form using Spry tabbed panels (as step 1, step 2, etc.) and the form validation to process name, email, address, credit-card, accept terms and conditions, etc.
    This is instead of a multi-page form, because there could be security flaws there (i.e. passing sensitive information from one page to the next) and it would take longer for the user - needing to open each page, etc. where this is to be used as a buy form (for a single product), sort of like one-click order (but not exactly).
    Overall, it seems like a good idea, someone else has tried it, but I do have some questions that haven't been covered there - relevant for anyone that'd ever want to do this with Spry - that didn't come up there:
    1. Will it degrade gracefully, and still work? For example, when you turn JavaScript, CSS, images, and other things off?
    2. Is it possible to go from Step-to-Step (using the top tabs, or 'Submit' and 'Back' buttons added on the bottom) without entering all of the required information? Because I would like to disable this - perhaps also have the future Steps grayed out and un-clickable.
    3. Is it safe to use this form to enter credit card details, and then email those to the website's account? I am new to SSL, so I'm not sure if I could implement some security feature here? Where should I look?
    4. Does it load the page fast, despite having multiple steps all pre-loaded? Can we make subsequent steps require some 'loading' (without refreshing the page)?
    5. If it doesn't do either of these, how could we make it do that?
    I hope to hear from you!

  • Validating TextField input

    Due to JVM constraints, I'm using JDK 1.1.8. Can I capture the TAB key, & create a focusManager, so focus won't occur until the gaining component type is learned AND the losing input is validated? It also appears that gaining processFocusEvent's method isn't called until the losing method exits. Expected? Makes synchronization using flags complex. I created a singleton focusManager, and created new FocusEvents and queued them, just to set flags. Somewhat overkill. Any ideas on implementation would be appreciated. TIA, Jeff

    Thanks for the reply.
    Jeff,
    One thing I learned early on is that you cannot tell
    the order that events will happen, you can get the
    keypress, but the other events may have happened
    already--the order may be different on each computer
    you install. You will have to get the keypress and
    then verify the other conditions you want to happen.
    In my early programming I had an application that did
    something on lostfocus and then on gotfocus. When I
    started installing on different computers, it only
    took about 3 to find the first one that sent events in
    a different order than my box did. It caused me to do
    a lot of reading and then some major rewriting.
    Have fun.

  • Textfield validation with XML Data

    hello
    can i validation a textfield with data from a XML file?
    i will read eg usernames form an XML file and will check it
    with a username was typed in in a textfield,
    if the username exits the textfield is invalid, since the
    username was typed in, is not in the XML file.
    thanks
    jack

    Hello,
    I don't advise you to make such an scenario. The solution you
    propose involve some high security risks and privacy problems
    because you send to the browser a complete list of users of your
    website.
    The Spry Validation Textfield supports callback validation
    javascript function. This means you create your own function that
    include the necessary code to validate the user input and pass to
    the widget as parameter the name of your function. A good sample of
    this feature could be seen in the
    Password
    Validation section.
    Regards,
    Cristian

  • Need a Exit or BADI  For Changing Validation Class  (PRUEFKL) during  EL28

    need to change the Validation Class Validation Class  (PRUEFKL)  or send it blank in order to remove all valdition during Meter read uplaod  , Can any one suggest a BADI or user exit or anything where in i can change the Validtion class before validation take place at the time of meter read uplaod .  As validtion class we do not pass in EL28 it usually get filled with 001 ans 002 . 
    Thanks in advance . 
    regards
    rajeev

    Thank for the response however my question was , can we change the Validation Class throght code  any exit or BADI  during el28  not  by config as config will be done for every thing as this we need to do only for a paticlular program .
    So in short i m looking for any enhancement point ( Exit /BADI ) which willl trigger during el28 and i will be able to send emply validation class in initial stage to avoide validation .
    Regards
    Rajeev
    Edited by: rajeevkohli on Aug 3, 2011 2:25 PM

  • Spry Validation Textarea

    Does anybody have a solution for keeping the Spry Validation Textarea from resizing in Firefox?
    Example at http://thebfpd.org/contact.htm.  Just clicking in the textarea causes it to resize then starting to type causes it to shrink even more.
    Also, why does the Spry Validation Textarea have a different default font than the Spry Validation Textfield?   textfield=san serif  textarea = serif

    Just tried adding
    <link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/3.2.0/build/cssreset/reset-min.css">
    as suggested in another post Spry Menu Bar IE v FF.
    Well, that took care of the mis-matched fonts but now the textarea box grows when you click on it and then grows more when you start typing.
    Suggestions?

  • 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.

  • How does XML DB handle XML Schema Validation ?

    In order to validate an XML document against an XML Schema using Oracle XML DB the XML Schema must first be registered with XML DB using the method registerSchema provided by the package DBMS_XMLSCHEMA.
    XDB provides two types of schema validation, 'Lax' Validation and 'Strict' Validation.
    'Lax' validation takes place whenever a schema based document is converted from it's textual representation into the XML DB internal object model. Errors caught by this validation will be prefixed with 'ORA'.
    'Stict' validation takes place when the XMLType methods schemaValidate() or isSchemaValid() are invoked.
    The schemaValidate() method throws an exception with an error message indicating what is wrong it encounteres an invalid document. The error message associated with the exception will be prefixed with LSX.
    The isSchemaValid() method returns true or false, depending on whether or not the document is valid. It cannot return any information about why the document is invalid.
    The reason for having both the Lax and Strict validation models is that Strict validation is much more expensive in terms of CPU and memory usage than Lax validation.

    Here are some examples of what is caught by Lax validation (ORA errors) and what is only caught by Strict validation (LSX errors).
    SQL> begin
      2     dbms_xmlschema.registerSchema('test',xmltype(
      3  '<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.co
    eFormDefault="unqualified">
      4     <xs:complexType name="RootType">
      5             <xs:sequence>
      6                     <xs:element name="Mandatory"/>
      7                     <xs:element name="Enumeration">
      8                             <xs:simpleType>
      9                                     <xs:restriction base="xs:string">
    10                                             <xs:enumeration value="A"/>
    11                                             <xs:enumeration value="B"/>
    12                                             <xs:enumeration value="C"/>
    13                                     </xs:restriction>
    14                             </xs:simpleType>
    15                     </xs:element>
    16                     <xs:element name="MinLength">
    17                             <xs:simpleType>
    18                                     <xs:restriction base="xs:string">
    19                                             <xs:minLength value="4"/>
    20                                             <xs:maxLength value="20"/>
    21                                     </xs:restriction>
    22                             </xs:simpleType>
    23                     </xs:element>
    24                     <xs:element name="MaxLength">
    25                             <xs:simpleType>
    26                                     <xs:restriction base="xs:string">
    27                                             <xs:minLength value="1"/>
    28                                             <xs:maxLength value="4"/>
    29                                     </xs:restriction>
    30                             </xs:simpleType>
    31                     </xs:element>
    32                     <xs:element name="MaxOccurs" type="xs:string" maxOccurs="2"/>
    33                     <xs:element name="MinOccurs" minOccurs="2" maxOccurs="2"/>
    34                     <xs:element name="Optional" type="xs:string" minOccurs="0"/>
    35             </xs:sequence>
    36     </xs:complexType>
    37     <xs:element name="Root" type="RootType" xdb:defaultTable="ROOT_TABLE"/>
    38  </xs:schema>'));
    39  end;
    40  /
    PL/SQL procedure successfully completed.
    SQL> --
    SQL> -- Valid Document
    SQL> --
    SQL> insert into ROOT_TABLE values (xmltype(
      2  '<Root>
      3     <Mandatory>Hello World</Mandatory>
      4     <Enumeration>A</Enumeration>
      5     <MinLength>ABCD</MinLength>
      6     <MaxLength>WXYZ</MaxLength>
      7     <MaxOccurs>1</MaxOccurs>
      8     <MaxOccurs>2</MaxOccurs>
      9     <MinOccurs>1</MinOccurs>
    10     <MinOccurs>2</MinOccurs>
    11     <Optional>Goodbye</Optional>
    12  </Root>'
    13  ))
    14  /
    1 row created.
    SQL> --
    SQL> -- Undefined element 'Illegal'
    SQL> --
    SQL> insert into ROOT_TABLE values (xmltype(
      2  '<Root>
      3     <Mandatory>Hello World</Mandatory>
      4     <Illegal>Hello World</Illegal>
      5     <Enumeration>A</Enumeration>
      6     <MinLength>ABCD</MinLength>
      7     <MaxLength>WXYZ</MaxLength>
      8     <MaxOccurs>1</MaxOccurs>
      9     <MaxOccurs>2</MaxOccurs>
    10     <MinOccurs>1</MinOccurs>
    11     <MinOccurs>2</MinOccurs>
    12     <Optional>Goodbye</Optional>
    13  </Root>'
    14  ))
    15  /
    insert into ROOT_TABLE values (xmltype(
    ERROR at line 1:
    ORA-30937: No schema definition for 'Illegal' (namespace '##local') in parent
    '/Root'
    SQL> --
    SQL> -- Multiple occurences of 'Optional'
    SQL> --
    SQL> insert into ROOT_TABLE values (xmltype(
      2  '<Root>
      3     <Mandatory>Hello World</Mandatory>
      4     <Enumeration>A</Enumeration>
      5     <MinLength>ABCD</MinLength>
      6     <MaxLength>WXYZ</MaxLength>
      7     <MaxOccurs>1</MaxOccurs>
      8     <MaxOccurs>2</MaxOccurs>
      9     <MinOccurs>1</MinOccurs>
    10     <MinOccurs>2</MinOccurs>
    11     <Optional>Goodbye</Optional>
    12     <Optional>Goodbye</Optional>
    13  </Root>'
    14  ))
    15  /
    insert into ROOT_TABLE values (xmltype(
    ERROR at line 1:
    ORA-30936: Maximum number (1) of 'Optional' XML node elements exceeded
    SQL> --
    SQL> -- Missing element 'Manadatory'
    SQL> --
    SQL> insert into ROOT_TABLE values (xmltype(
      2  '<Root>
      3     <Enumeration>A</Enumeration>
      4     <MinLength>ABCD</MinLength>
      5     <MaxLength>WXYZ</MaxLength>
      6     <MaxOccurs>1</MaxOccurs>
      7     <MaxOccurs>2</MaxOccurs>
      8     <MinOccurs>1</MinOccurs>
      9     <MinOccurs>2</MinOccurs>
    10     <Optional>Goodbye</Optional>
    11  </Root>'
    12  ))
    13  /
    1 row created.
    SQL> --
    SQL> -- Invalid Enumeration Value
    SQL> --
    SQL> insert into ROOT_TABLE values (xmltype(
      2  '<Root>
      3     <Mandatory>Hello World</Mandatory>
      4     <Enumeration>Z</Enumeration>
      5     <MinLength>ABCD</MinLength>
      6     <MaxLength>WXYZ</MaxLength>
      7     <MaxOccurs>1</MaxOccurs>
      8     <MaxOccurs>2</MaxOccurs>
      9     <MinOccurs>1</MinOccurs>
    10     <MinOccurs>2</MinOccurs>
    11     <Optional>Goodbye</Optional>
    12  </Root>'
    13  ))
    14  /
    insert into ROOT_TABLE values (xmltype(
    ERROR at line 1:
    ORA-31038: Invalid enumeration value: "Z"
    SQL> --
    SQL> -- MinLength Violation
    SQL> --
    SQL> insert into ROOT_TABLE values (xmltype(
      2  '<Root>
      3     <Mandatory>Hello World</Mandatory>
      4     <Enumeration>A</Enumeration>
      5     <MinLength>ABC</MinLength>
      6     <MaxLength>WXYZ</MaxLength>
      7     <MaxOccurs>1</MaxOccurs>
      8     <MaxOccurs>2</MaxOccurs>
      9     <MinOccurs>1</MinOccurs>
    10     <MinOccurs>2</MinOccurs>
    11     <Optional>Goodbye</Optional>
    12  </Root>'
    13  ))
    14  --
    15  -- MaxLength Violation
    16  --
    17  /
    1 row created.
    SQL> insert into ROOT_TABLE values (xmltype(
      2  '<Root>
      3     <Mandatory>Hello World</Mandatory>
      4     <Enumeration>A</Enumeration>
      5     <MinLength>ABCD</MinLength>
      6     <MaxLength>VWXYZ</MaxLength>
      7     <MaxOccurs>1</MaxOccurs>
      8     <MaxOccurs>2</MaxOccurs>
      9     <MinOccurs>1</MinOccurs>
    10     <MinOccurs>2</MinOccurs>
    11     <Optional>Goodbye</Optional>
    12  </Root>'
    13  ))
    14  /
    insert into ROOT_TABLE values (xmltype(
    ERROR at line 1:
    ORA-30951: Element or attribute at Xpath /Root/MaxLength exceeds maximum length
    SQL> --
    SQL> -- Missing element Optional - Valid Document
    SQL> --
    SQL> insert into ROOT_TABLE values (xmltype(
      2  '<Root>
      3     <Mandatory>Hello World</Mandatory>
      4     <Enumeration>A</Enumeration>
      5     <MinLength>ABCD</MinLength>
      6     <MaxLength>WXYZ</MaxLength>
      7     <MaxOccurs>1</MaxOccurs>
      8     <MaxOccurs>2</MaxOccurs>
      9     <MinOccurs>1</MinOccurs>
    10     <MinOccurs>2</MinOccurs>
    11  </Root>'
    12  ))
    13  /
    1 row created.
    SQL> --
    SQL> -- Too many instances of 'MaxOccurs'
    SQL> --
    SQL> insert into ROOT_TABLE values (xmltype(
      2  '<Root>
      3     <Mandatory>Hello World</Mandatory>
      4     <Enumeration>A</Enumeration>
      5     <MinLength>ABCD</MinLength>
      6     <MaxLength>WXYZ</MaxLength>
      7     <MaxOccurs>1</MaxOccurs>
      8     <MaxOccurs>2</MaxOccurs>
      9     <MaxOccurs>3</MaxOccurs>
    10     <MinOccurs>1</MinOccurs>
    11     <MinOccurs>2</MinOccurs>
    12     <Optional>Goodbye</Optional>
    13  </Root>'
    14  ))
    15  /
    insert into ROOT_TABLE values (xmltype(
    ERROR at line 1:
    ORA-30936: Maximum number (2) of 'MaxOccurs' XML node elements exceeded
    SQL> --
    SQL> -- Too few instances of 'MinOccurs'
    SQL> --
    SQL> insert into ROOT_TABLE values (xmltype(
      2  '<Root>
      3     <Mandatory>Hello World</Mandatory>
      4     <Enumeration>A</Enumeration>
      5     <MinLength>ABCD</MinLength>
      6     <MaxLength>WXYZ</MaxLength>
      7     <MaxOccurs>1</MaxOccurs>
      8     <MaxOccurs>2</MaxOccurs>
      9     <MinOccurs>1</MinOccurs>
    10     <Optional>Goodbye</Optional>
    11  </Root>'
    12  ))
    13  /
    1 row created.
    SQL> create trigger validateSchema
      2  before insert on ROOT_TABLE
      3  for each row
      4  begin
      5     :new.object_value.schemaValidate();
      6  end;
      7  /
    Trigger created.
    SQL> --
    SQL> -- Valid Document
    SQL> --
    SQL> insert into ROOT_TABLE values (xmltype(
      2  '<Root>
      3     <Mandatory>Hello World</Mandatory>
      4     <Enumeration>A</Enumeration>
      5     <MinLength>ABCD</MinLength>
      6     <MaxLength>WXYZ</MaxLength>
      7     <MaxOccurs>1</MaxOccurs>
      8     <MaxOccurs>2</MaxOccurs>
      9     <MinOccurs>1</MinOccurs>
    10     <MinOccurs>2</MinOccurs>
    11     <Optional>Goodbye</Optional>
    12  </Root>'
    13  ))
    14  /
    1 row created.
    SQL> --
    SQL> -- Undefined element 'Illegal'
    SQL> --
    SQL> insert into ROOT_TABLE values (xmltype(
      2  '<Root>
      3     <Mandatory>Hello World</Mandatory>
      4     <Illegal>Hello World</Illegal>
      5     <Enumeration>A</Enumeration>
      6     <MinLength>ABCD</MinLength>
      7     <MaxLength>WXYZ</MaxLength>
      8     <MaxOccurs>1</MaxOccurs>
      9     <MaxOccurs>2</MaxOccurs>
    10     <MinOccurs>1</MinOccurs>
    11     <MinOccurs>2</MinOccurs>
    12     <Optional>Goodbye</Optional>
    13  </Root>'
    14  ))
    15  /
    insert into ROOT_TABLE values (xmltype(
    ERROR at line 1:
    ORA-30937: No schema definition for 'Illegal' (namespace '##local') in parent
    '/Root'
    SQL> --
    SQL> -- Multiple occurences of 'Optional'
    SQL> --
    SQL> insert into ROOT_TABLE values (xmltype(
      2  '<Root>
      3     <Mandatory>Hello World</Mandatory>
      4     <Enumeration>A</Enumeration>
      5     <MinLength>ABCD</MinLength>
      6     <MaxLength>WXYZ</MaxLength>
      7     <MaxOccurs>1</MaxOccurs>
      8     <MaxOccurs>2</MaxOccurs>
      9     <MinOccurs>1</MinOccurs>
    10     <MinOccurs>2</MinOccurs>
    11     <Optional>Goodbye</Optional>
    12     <Optional>Goodbye</Optional>
    13  </Root>'
    14  ))
    15  /
    insert into ROOT_TABLE values (xmltype(
    ERROR at line 1:
    ORA-30936: Maximum number (1) of 'Optional' XML node elements exceeded
    SQL> --
    SQL> -- Missing element 'Manadatory'
    SQL> --
    SQL> insert into ROOT_TABLE values (xmltype(
      2  '<Root>
      3     <Enumeration>A</Enumeration>
      4     <MinLength>ABCD</MinLength>
      5     <MaxLength>WXYZ</MaxLength>
      6     <MaxOccurs>1</MaxOccurs>
      7     <MaxOccurs>2</MaxOccurs>
      8     <MinOccurs>1</MinOccurs>
      9     <MinOccurs>2</MinOccurs>
    10     <Optional>Goodbye</Optional>
    11  </Root>'
    12  ))
    13  /
    insert into ROOT_TABLE values (xmltype(
    ERROR at line 1:
    ORA-31154: invalid XML document
    ORA-19202: Error occurred in XML processing
    LSX-00213: only 0 occurrences of particle "Mandatory", minimum is 1
    ORA-06512: at "SYS.XMLTYPE", line 345
    ORA-06512: at "XDBTEST.VALIDATESCHEMA", line 2
    ORA-04088: error during execution of trigger 'XDBTEST.VALIDATESCHEMA'
    SQL> --
    SQL> -- Invalid Enumeration Value
    SQL> --
    SQL> insert into ROOT_TABLE values (xmltype(
      2  '<Root>
      3     <Mandatory>Hello World</Mandatory>
      4     <Enumeration>Z</Enumeration>
      5     <MinLength>ABCD</MinLength>
      6     <MaxLength>WXYZ</MaxLength>
      7     <MaxOccurs>1</MaxOccurs>
      8     <MaxOccurs>2</MaxOccurs>
      9     <MinOccurs>1</MinOccurs>
    10     <MinOccurs>2</MinOccurs>
    11     <Optional>Goodbye</Optional>
    12  </Root>'
    13  ))
    14  /
    insert into ROOT_TABLE values (xmltype(
    ERROR at line 1:
    ORA-31038: Invalid enumeration value: "Z"
    SQL> --
    SQL> -- MinLength Violation
    SQL> --
    SQL> insert into ROOT_TABLE values (xmltype(
      2  '<Root>
      3     <Mandatory>Hello World</Mandatory>
      4     <Enumeration>A</Enumeration>
      5     <MinLength>ABC</MinLength>
      6     <MaxLength>WXYZ</MaxLength>
      7     <MaxOccurs>1</MaxOccurs>
      8     <MaxOccurs>2</MaxOccurs>
      9     <MinOccurs>1</MinOccurs>
    10     <MinOccurs>2</MinOccurs>
    11     <Optional>Goodbye</Optional>
    12  </Root>'
    13  ))
    14  --
    15  -- MaxLength Violation
    16  --
    17  /
    insert into ROOT_TABLE values (xmltype(
    ERROR at line 1:
    ORA-31154: invalid XML document
    ORA-19202: Error occurred in XML processing
    LSX-00221: "ABC" is too short (minimum length is 4)
    ORA-06512: at "SYS.XMLTYPE", line 345
    ORA-06512: at "XDBTEST.VALIDATESCHEMA", line 2
    ORA-04088: error during execution of trigger 'XDBTEST.VALIDATESCHEMA'
    SQL> insert into ROOT_TABLE values (xmltype(
      2  '<Root>
      3     <Mandatory>Hello World</Mandatory>
      4     <Enumeration>A</Enumeration>
      5     <MinLength>ABCD</MinLength>
      6     <MaxLength>VWXYZ</MaxLength>
      7     <MaxOccurs>1</MaxOccurs>
      8     <MaxOccurs>2</MaxOccurs>
      9     <MinOccurs>1</MinOccurs>
    10     <MinOccurs>2</MinOccurs>
    11     <Optional>Goodbye</Optional>
    12  </Root>'
    13  ))
    14  /
    insert into ROOT_TABLE values (xmltype(
    ERROR at line 1:
    ORA-30951: Element or attribute at Xpath /Root/MaxLength exceeds maximum length
    SQL> --
    SQL> -- Missing element Optional - Valid Document
    SQL> --
    SQL> insert into ROOT_TABLE values (xmltype(
      2  '<Root>
      3     <Mandatory>Hello World</Mandatory>
      4     <Enumeration>A</Enumeration>
      5     <MinLength>ABCD</MinLength>
      6     <MaxLength>WXYZ</MaxLength>
      7     <MaxOccurs>1</MaxOccurs>
      8     <MaxOccurs>2</MaxOccurs>
      9     <MinOccurs>1</MinOccurs>
    10     <MinOccurs>2</MinOccurs>
    11  </Root>'
    12  ))
    13  /
    1 row created.
    SQL> --
    SQL> -- Too many instances of 'MaxOccurs'
    SQL> --
    SQL> insert into ROOT_TABLE values (xmltype(
      2  '<Root>
      3     <Mandatory>Hello World</Mandatory>
      4     <Enumeration>A</Enumeration>
      5     <MinLength>ABCD</MinLength>
      6     <MaxLength>WXYZ</MaxLength>
      7     <MaxOccurs>1</MaxOccurs>
      8     <MaxOccurs>2</MaxOccurs>
      9     <MaxOccurs>3</MaxOccurs>
    10     <MinOccurs>1</MinOccurs>
    11     <MinOccurs>2</MinOccurs>
    12     <Optional>Goodbye</Optional>
    13  </Root>'
    14  ))
    15  /
    insert into ROOT_TABLE values (xmltype(
    ERROR at line 1:
    ORA-30936: Maximum number (2) of 'MaxOccurs' XML node elements exceeded
    SQL> --
    SQL> -- Too few instances of 'MinOccurs'
    SQL> --
    SQL> insert into ROOT_TABLE values (xmltype(
      2  '<Root>
      3     <Mandatory>Hello World</Mandatory>
      4     <Enumeration>A</Enumeration>
      5     <MinLength>ABCD</MinLength>
      6     <MaxLength>WXYZ</MaxLength>
      7     <MaxOccurs>1</MaxOccurs>
      8     <MaxOccurs>2</MaxOccurs>
      9     <MinOccurs>1</MinOccurs>
    10     <Optional>Goodbye</Optional>
    11  </Root>'
    12  ))
    13  /
    insert into ROOT_TABLE values (xmltype(
    ERROR at line 1:
    ORA-31154: invalid XML document
    ORA-19202: Error occurred in XML processing
    LSX-00213: only 1 occurrences of particle "MinOccurs", minimum is 2
    ORA-06512: at "SYS.XMLTYPE", line 345
    ORA-06512: at "XDBTEST.VALIDATESCHEMA", line 2
    ORA-04088: error during execution of trigger 'XDBTEST.VALIDATESCHEMA'
    SQL>

  • Changing the Decimal places for Percentage in cost distribution in SC

    Hi Gurus,
    Is it possible to change the number decimal places for the Percentage field in cost Assignment tab in Shopping cart in cost distribution option?
    The user wants 3 decimal places, currently we can enter only 2 decimal places.
    I have gone thro' couple of blogs which are talking about changing the price decimal and not the percentage field decimal. (in IMG setting: General settings > Currencies > Set Decimal places)
    So, if anyone come acorss this issue, please let me know.
    Thanks and Regards,
    Nowsath

    Decimal Places Factor of the Receiver Weighting Factors
    Specifies the number of valid decimal places with which the given weighting factors are valuated.
    Example
    You enter 123456 as the weighting factor. Depending on the factor, this number is interpreted as:
    Factor Decimal places Weighting factor
    1 0 123456
    10 1 12345.6
    100 2 1234.56
    1000 3 123.456
    10000 4 12.3456
    100000 5 1.23456
    1000000 6 0.123456
    Please check with your FICO consulant .what settings you have in backend system.
    http://help.sap.com/saphelp_nw04/helpdata/en/bb/bdbdc4575911d189240000e8323d3a/frameset.htm
    Muthu

  • Validation mechanism in SAP XI/PI

    Dear All
    I am new to SAP XI. I need to validate incoming data. Recieved via File adaptor. Validation takes place with SAP z tables and update Oracle database after validation. How can i do this? After recieving file how to validate it with SAP tables and based on results update Oracle database.
    Can some one guide me with this scenario??
    Thanks
    Gaurav

    Hi,
    For your scenario of File to JDBC which requires Data Validation against a Custom Table in SAP R/3. One way to design is as below assuming the number of fields to be validated are called in one RFC lookup call per message.
    1. Create a Custom RFC in SAP R/3 to validate the data from file with the data in the ZTable and return a Validation code ( True/False)
    2. In the Message Mapping, create a UDF and pass the incoming data from file to the Custom RFC for validation by doing a RFC lookup.
    3. Based on the Validation code returned by the RFC, in the message mapping decide on the next action to update the Oracle DB or to stop with error.
    Reference Link: <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a03e7b02-eea4-2910-089f-8214c6d1b439">Mapping lookups – RFC API</a>
    Hope this will be helpful
    Regards,
    S.Santhosh Kumar

  • Validation Model

    Hi,
    I�m on the final project of my degrees. I have to develop a system to generate client side validations and server side validations for n-tiers Java applications. The principal objective of the project is: write the validations rules ones and use it for validations in the client side (JavaScript) and the server side (Java).
    I�m over the research stage and searching for the possible solutions that the Java technologies proposes for this problem. I know that JSF has a �Validation Model� that maybe resolve the problem, probably only part of it. I need to evaluate the possibilities to integrate this existing solution with my work, but first y have to make sure that I�m not fighting with JSF Validation Model, this is not the idea.
    The problem that I found was the poor official information that explain how the validations works, probably because JSF is in a very early realize. I mean, I find a lot of information in the Internet but I need an official voice, so I can justify why I will not use the standard solution (JSF) or why I�ll use it.
    1)     The validation model generate client side validations (for example JavaScript) ?. If not, do you think that a feature like this can be included in the next release of JSF?.
    2)     The validations runs on the server side. Do they run on the web-tier or on the business-tier?
    3)     I need to now the plans for the future, what do I�ll expect for JSF Validation Model now to 6-8 months?
    4)     Is there a way to make validation rules using different fields, for example, validate one field based on the value of another field.
    Thanks, Elena.

    I'll try to answer your questions;
    1) The validation model generate client side validations (for example JavaScript) ?. If not, do you think that a feature like this can be included in the next release of JSF?.
    This is unlikely to change for the RI, however the spec does not care where the validations take place so long as they follow the spec. So I could see some JSF vendor suppling an implemenation that did generate JavaScript for client side validations but also performed the Web Tier validations as described in the spec.
    2) The validations runs on the server side. Do they run on the web-tier or on the business-tier?
    JSF only addresses the web-tier.
    3) I need to now the plans for the future, what do I�ll expect for JSF Validation Model now to 6-8 months?
    I susspect that things in the validation area will not changes much in the next 6 months.
    4) Is there a way to make validation rules using different fields, for example, validate one field based on the value of another field.
    You could fairly easily write a custom validator that validated several fields in relation to each other. In the JSP I could see something like this.
    <h:input_number ......
    <f:validator type="foo.bar.MyValidator>
    <f:attribute name="attrOne" value="propertyReference.one"/>
    <f:attribute name="attrTwo" value="propertyReference.two"/>
    </f:validator>
    </h:input_number>
    Then the MyValidator could use the attributes (attrOne and attrTwo) set on the component (a UIInput in this case) to lookup the values to validate against.
    This thread has info on how to use the property references to get at the actual values;
    http://forum.java.sun.com/thread.jsp?forum=427&thread=427896&message=1908077#1908077
    From what it sounds like that you want to do I'd suggest perhaps writing an extension to XDoclet that would allow you to specify the validation once and have XDoclet generate the code for a custom renderer that would generate JavaScript as well as making java code that you could invoke from your validator and your back-end business logic. Extending XDoclet is supposed to be easy (although I have not done it personally yet) the hard part would be defining the proper semantics in your 'constraint language' so that you could generate propery JavaScript and Java.
    Good luck,
    -bd-
    http://bill.dudney.net

Maybe you are looking for