Search Results

Search found 5183 results on 208 pages for 'xsd validation'.

Page 5/208 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Validation and Verification explanation (Boehm) - I cannot understand its point

    - by user970696
    Hopefully my last thread about V&V as I found the B.Boehm is text which I just do not understand well (likely my technical English is not that good). http://csse.usc.edu/csse/TECHRPTS/1979/usccse79-501/usccse79-501.pdf Basically he says that verification is about checking that products derived from requirements baseline must correspond to it and that deviation leads only to changes in these derived products (design, code). But he says it begins with design and ends with acceptance tests (you can check the V model inside). The thing is, I have accepted ISO12207 in terms of all testing is validation, yet it does not make any sense here. In order to be sure the product complies with requirements (acceptance test) I need to test it. Also it says that validation problems means that requirements are bad and needs to be changed - which does not happen with testing that testers do, who just checks correspondence with requirements.

    Read the article

  • jQuery validation per multiple fieldsets, how to use different event to trigger validation per secti

    - by Jesse
    Hi All! I have a really, really long form (about 300 fields) that I broke down into different sections using this slick jQuery plugin Form Wizard. If you group your form into different fieldsets, the FormWizard will automagically display one section at a time, with a Next hyperlink to take you to the next section: <a id="step0Next" class="next" href="#">Next ></a> My question is this: Using the jQuery Validation plugin, how can I validate each fieldset when a user clicks Next, and so forth, instead of using the Submit button. Put differently, how can I change the trigger event from Submit to six different hyperlinks for six separate sections? Thanks for helping this newb out.

    Read the article

  • Conditional Validation using JQuery Validation Plugin

    - by Steve Kemp
    I have a simple html form that I've added validation to using the JQuery Validation plugin. I have it working for single fields that require a value. I now need to extend that so that if a user answers Yes to a question they must enter something in the Details field, otherwise the Details field can be left blank. I'm using radio buttons to display the Yes/No. Here's my complete html form - I'm not sure where to go from here: <script type="text/javascript" charset="utf-8"> $.metadata.setType("attr", "validate"); $(document).ready(function() { $("#editRecord").validate(); }); </script> <style type="text/css"> .block { display: block; } form.cmxform label.error { display: none; } </style> </head> <body> <div id="header"> <h1> Questions</h1> </div> <div id="content"> <h1> Questions Page 1 </h1> </div> <div id="content"> <h1> </h1> <form class="cmxform" method="post" action="editrecord.php" id="editRecord"> <input type="hidden" name="-action" value="edit"> <h1> Questions </h1> <table width="46%" class="record"> <tr> <td width="21%" valign="top" class="field_name_left"><p>Question 1</p></td> <td width="15%" valign="top" class="field_data"> <label for="Yes"> <input type="radio" name="Question1" value="Yes" validate = "required:true" /> Yes </label> <label for="No"> <input type="radio" name="Question1" value="No" /> No </label> <label for="Question1" class="error">You must answer this question to proceed</label> </td> <td width="64%" valign="top" class="field_data"><strong>Details:</strong> <textarea id = "Details1" class="where" name="Details1" cols="25" rows="2"></textarea></td> </tr> <tr> <td valign="top" class="field_name_left">Question 2</td> <td valign="top" class="field_data"> <label for="Yes"> <input type="radio" name="Question2" value="Yes" validate = "required:true" /> Yes </label> <label for="No"> <input type="radio" name="Question2" value="No" /> No </label> <label for="Question2" class="error">You must answer this question to proceed</label> </td> <td valign="top" class="field_data"><strong>Details:</strong> <textarea id = "Details2" class="where" name="Details2" cols="25" rows="2"></textarea> </td> </tr> <tr class="submit_btn"> <td colspan="3"> <input type="submit" name="-edit" value="Finish"> <input type="reset" name="reset" value="Reset"> </td> </tr> </table> </form> </div> </body> </html>

    Read the article

  • Can generateDS be used like xsd.exe

    - by BozoJoe
    Can I use generateDS.py in python in a similar way that I would use xsd.exe to create C# classes from xsd? Basically, given an xsd schema I want to create a data structure, in python, fill its data in, and then render it into an xml string. perhaps pyXSD is better? oh, and yes, I'm a python newbie

    Read the article

  • .Net Xml Serialize - XSD Definition for Multiple Namespaces

    - by MattH
    The following XML was generated by serializing .Net objects: <?xml version="1.0" encoding="utf-8"?> <Request xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://EPS.WebServices/WebServiceSchema" > <Method xmlns="http://EPS.Library/RequestSchema">PackPlacementUpdate</Method> <Type xmlns="http://EPS.Library/RequestSchema">PackPlacementUpdate</Type> </Request> I am using XSD to generate a schema. However, (I think) because there are multiple namespaces two different schema files get generated. We will be providing the XSD file externally and I'm concerned that two files will cause confusion. Without changing the namespace of the .Net classes, is there is a way I can create a single XSD schema file and not two? Thanks.

    Read the article

  • Find elements based on xsd type with lxml

    - by joet3ch
    I am trying to get a list of elements with a specific xsd type with lxml 2.x and I can't figure out how to traverse the xsd for specific types. Example of schema: <xsd:element name="ServerOwner" type="srvrs:string90" minOccurs="0"> <xsd:element name="HostName" type="srvrs:string35" minOccurs="0"> Example xml data: <srvrs:ServerOwner>John Doe</srvrs:ServerOwner> <srvrs:HostName>box01.example.com</srvrs:HostName> The ideal function would look like: elements = getElems(xml_doc, 'string90') def getElems(xml_doc, xsd_type): ** xpath or something to find the elements and build a dict return elements

    Read the article

  • Why my test xml is failing with very simple XSD Schema?

    - by JSteve
    Hi all, I am a bit novice in xml schema. I would be grateful if somebody help me out to understand why my xml is not being validated with the schema: Here is my Schema: <?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.example.org/testSchema" xmlns="http://www.example.org/testSchema"> <xs:element name="Employee"> <xs:complexType> <xs:sequence> <xs:element name="Name"> <xs:complexType> <xs:sequence> <xs:element name="FirstName" /> <xs:element name="LastName" /> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:schema> Here is my test xml: <?xml version="1.0" encoding="UTF-8"?> <Employee xmlns="http://www.example.org/testSchema"> <Name> <FirstName>John</FirstName> <LastName>Smith</LastName> </Name> </Employee> I am getting following error by Eclipse xml editor/validator: cvc-complex-type.2.4.a: Invalid content was found starting with element 'Name'. One of '{Name}' is expected. I could not understand what is wrong with this schema or my xml.

    Read the article

  • xml validity with xsd with xsi:nillable element

    - by Laxmikanth Samudrala
    My XML file <tns:SampleInfoResponse xsi:schemaLocation="sampleNS test.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="sampleNS"> String String String String String String String String String String String String MY XSD file <xsd:schema targetNamespace="sampleNS" elementFormDefault="qualified" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="sampleNS" xmlns="http://www.w3.org/2001/XMLSchema"> parser is complaining on <tns:LSampleEnrlDetails/>, the XML file should be <tns:LSampleEnrlDetails xsi:nil="true"/> only for valid file ? By taking out the whole tag also the parser is complaining. I would like to know what possible cases for this tag makes the XML file valid according the above schema when i don't have the data to populate for tag

    Read the article

  • Client no longer getting data from Web Service after introducing targetNamespace in XSD

    - by Laurence
    Sorry if there is way too much info in this post – there’s a load of story before I get to the actual problem. I thought I‘d include everything that might be relevant as I don’t have much clue what is wrong. I had a working web service and client (both written with VS 2008 in C#) for passing product data to an e-commerce site. The XSD started like this: <xs:schema id="Ecommerce" elementFormDefault="qualified" xmlns:mstns="http://tempuri.org/Ecommerce.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="eur"> <xs:complexType> <xs:sequence> <xs:element ref="sec" minOccurs="1" maxOccurs="1"/> </xs:sequence> etc Here’s a sample document sent from client to service: <eur xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" class="ECommerce_WebService" type="product" method="GetLastDateSent" chunk_no="1" total_chunks="1" date_stamp="2010-03-10T17:16:34.523" version="1.1"> <sec guid="BFBACB3C-4C17-4786-ACCF-96BFDBF32DA5" company_name="Company" version="1.1"> <data /> </sec> </eur> Then, I had to give the service a targetNamespace. Actually I don’t know if I “had” to set it, but I added (to the same VS project) some code to act as a client to a completely unrelated service (which also had no namespace), and the project would not build until I gave my service a namespace. Now the XSD starts like this: <xs:schema id="Ecommerce" elementFormDefault="qualified" xmlns:mstns="http://tempuri.org/Ecommerce.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.company.com/ecommerce" xmlns:ecom="http://www. company.com/ecommerce"> <xs:element name="eur"> <xs:complexType> <xs:sequence> <xs:element ref="ecom:sec" minOccurs="1" maxOccurs="1" /> </xs:sequence> etc As you can see above I also updated all the xs:element ref attributes to give them the “ecom” prefix. Now the project builds again. I found the client needed some modification after this. The client uses a SQL stored procedure to generate the XML. This is then de-serialised into an object of the correct type for the service’s “get_data” method. The object’s type used to be “eur” but after updating the web reference to the service, it became “get_dataEur”. And sure enough the parent element in the XML had to be changed to “get_dataEur” to be accepted. Then bizarrely I also had to put the xmlns attribute containing my namespace on the “sec” element (the immediate child of the parent element) rather than the parent element. Here’s a sample document now sent from client to service: <get_dataEur xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" class="ECommerce_WebService" type="product" method="GetLastDateSent" chunk_no="1" total_chunks="1" date_stamp="2010-03-10T18:23:20.653" version="1.1"> <sec xmlns="http://www.company.com/ecommerce" guid="BFBACB3C-4C17-4786-ACCF-96BFDBF32DA5" company_name="Company" version="1.1"> <data /> </sec> </get_dataEur> If in the service’s get_data method I then serialize the incoming object I see this (the parent element is “eur” and the xmlns attribute is on the parent element): <eur xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.company.com/ecommerce" class="ECommerce_WebService" type="product" method="GetLastDateSent" chunk_no="1" total_chunks="1" date_stamp="2010-03-10T18:23:20.653" version="1.1"> <sec guid="BFBACB3C-4C17-4786-ACCF-96BFDBF32DA5" company_name="Company" version="1.1"> <data /> </sec> </eur> The service then prepares a reply to go back to the client. The XML looks like this (the important data being sent back is the date_stamp attribute in the last_sent element): <eur xmlns="http://www.company.com/ecommerce" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" class="ECommerce_WebService" type="product" method="GetLastDateSent" chunk_no="1" total_chunks="1" date_stamp="2010-03-10T18:22:57.530" version="1.1"> <sec version="1.1" xmlns=""> <data> <last_sent date_stamp="2010-02-25T15:15:10.193" /> </data> </sec> </eur> Now finally, here’s the problem!!! The client does not see any data – all it sees is the parent element with nothing inside it. If I serialize the reply object in the client code it looks like this: <get_dataResponseEur xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" class="ECommerce_WebService" type="product" method="GetLastDateSent" chunk_no="1" total_chunks="1" date_stamp="2010-03-10T18:22:57.53" version="1.1" /> So, my questions are: why isn’t my client seeing the contents of the reply document? how do I fix it? why do I have to put the xmlns attribute on a child element rather than the parent element in the outgoing document? Here’s a bit more possibly relevant info: The client code (pre-namespace) called the service method like this: XmlSerializer serializer = new XmlSerializer(typeof(eur)); XmlReader reader = xml.CreateReader(); eur eur = (eur)serializer.Deserialize(reader); service.Credentials = new NetworkCredential(login, pwd); service.Url = url; rc = service.get_data(ref eur); After the namespace was added I had to change it to this: XmlSerializer serializer = new XmlSerializer(typeof(get_dataEur)); XmlReader reader = xml.CreateReader(); get_dataEur eur = (get_dataEur)serializer.Deserialize(reader); get_dataResponseEur eur1 = new get_dataResponseEur(); service.Credentials = new NetworkCredential(login, pwd); service.Url = url; rc = service.get_data(eur, out eur1);

    Read the article

  • xsd and wsdl incorrect file

    - by Gandalf StormCrow
    How to fix corrupted xsd and wsdl files, is there any IDE which can suggest what is wrong? such as eclipse for java code when pressing CTRL + 1 , or where can I find books tutorials to understand formatting of these file types better? thank you Here is concrete message error I have [ERROR] 'item' is already defined line 223 of file:/C:/project/src/main/resources/schema.xsd [ERROR] (related to above error) the first definition appears here line 22 of file:/C:/project/src/main/resources/schema.xsd

    Read the article

  • DocuSign Connect xsd [on hold]

    - by Brian
    I'm trying to parse xml inbound to our system from the DocuSign Connect service (which publishes status updates to a given web service). I typiclly use jaxb to process xml but as far as I know I need xsd's in order to generate the jaxb. I don't have (or can't find) xsd's from DocuSign in order to do this. I could use other java classes/libraries to parse the xml but without xsd's I'd have to guess at types, restrictions and formats. Is there a way to generate jaxb without having xsd's?

    Read the article

  • XSD traversal in VIM

    - by maayank
    I use VIM as my text editor and I edit a lot of XML and WSDL files. WSDL files have an XSD section. Is there some VIM plugin I can use to traverse the XSD types? i.e., if I have the following line and the caret is where the '|' sign is: <xsd:element minOccurs="0" name="FooName" type="Magic|FooType"/> and I press Ctrl+Alt+Foo (or some other magic combo) it will get me to the definition of MagicFooType, i.e.: <xsd:complexType name="MagicFooType"> I couldn't find how to use ctags for this and all the other plugins that I could find are for imperative languages (i.e. Java). Is there some plugin/script to do the job?

    Read the article

  • Visual Studio XSD Tool: Generate Collections Rather Than Arrays

    - by senfo
    I generated some C# classes from an XSD using the Visual Studio XSD utility and it generated arrays for storing a collection of elements, rather than one of the built-in generic Collection<T> (or related) classes. None of the command line parameters mentioned in xsd /? mention anything about generating collections rather than arrays, but I know that this can be done with web service proxy classes that Visual Studio generates, so I figured it must be possible. Does anybody know how to have the XSD utility generate collection classes rather than arrays?

    Read the article

  • XSD generation from a MS SQL database using schemas

    - by madprog
    I'm willing to use NDbUnit on a MS SQL database which uses schemas. I have to generate the XSD schema from the database. Visual Studio has a tool to do that, but Visual Studio 2005 doesn't include the schema information in the generated XSD. Therefore, NDbUnit fails because the generated SQL queries do not match the database. Worse, when I try to use Proteus, the XSD schema doesn't validate against the database, and Proteus fails with a warning telling that data could be lost if this check was skipped. So, my question is: is there any tool that would generate my XSD schema properly and from the database information?

    Read the article

  • Interchange xsd and xsi in the output of XmlSerializer

    - by Sri Kumar
    XmlSerializer serializer = new XmlSerializer(typeof(IxComment)); System.IO.StringWriter aStream = new System.IO.StringWriter(); serializer.Serialize(aStream,Comments); commentsString = aStream.ToString(); Here the commentsString has the the following element in it <IxComment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> Is there any possibility to interchange the xsi and xsd attribute and get the element as shown below <IxComment xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > Will this cause any other issue? EDIT: Why do i need to do this? We are migrating an existing application from 1.1 to 3.0 and in the code there is a if loop int iStartTagIndex = strXMLString.IndexOf("<IxComment xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">"); that check for the index of the IxComment. Here the o/p of the serializer and the condition differ in the position of xsd and xsi. So i am trying to know whether we can instruct the serializer to provided the o/p as required. I have another question here as this was an existing application does the serializer O/P differs with versions?

    Read the article

  • XSD.exe question about include files and code generation

    - by Roger Willcocks
    If you have an XSD with an includes reference. Is it possible to generate 2 separate class files. 1 for the XSD, and 1 for the included XSD? My Scenario 4 XSDs, each of which share 15-20 element definitions in common. Rather than maintaining, I'd like to end up with the 4 XSDs all referencing a fifth file with the common definitions, and code generating 5 .cs files to use.

    Read the article

  • Validation against 10K XSD - performance problem

    - by stck777
    I have an XSD scheme which has 10K lines. It takes 5 seconds to validate my XML with 500 lines. I get dynamically XML via POST from external server, on every click of the user on my homepage. The validation takes 5+ seconds, which is very much for every click of the user. PHP Example: $doc = new DOMDocument(); $doc->load('file.xml'); //100 to 500 lines $doc->schemaValidate('schema.xsd'); //schema.xsd 10 000 lines Do you have any idea how I can validate the XML against the XSD faster?

    Read the article

  • XSD editor with the ability to write plugins in Python

    - by Tomasz Zielinski
    I'm writing a Python module for parsing XSD for very specific purpose. Currently it's a console program, but ideally I would see it plugged inside some XSD editor - not only for convenience of end users, but also for fetching XSD parsed into Python objects - this would save me days or weeks of work. Is there any such editor on the market?

    Read the article

  • jquery form validation: validation script specified externally

    - by Abu Hamzah
    i have a jquery form validation in the master page and it works fine and i got that working from this article: http://www.dotnetcurry.com/ShowArticle.aspx?ID=310 my question is: if i place the .js to external and add a reference to my page then its not working... it says object expected here is how i have done: in my content page (i am using master page, asp.net ) add in my content page: <script src="myform_validation.js" type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function() { ValidateMe(this); }); </script> below is in the external .js file: function ValidateMe() { $("#aspnetForm").validate({ rules: { <%=TextBox1.UniqueID %>: { maxlength:1, //minlength: 12, required: true }, <%=TextBox2.UniqueID %>: { minlength: 12, required: true }, <%=TextBox3.UniqueID %>: { minlength: 12, required: true }//, // }, messages: { <%=TextBox1.UniqueID %>: { required: "Enter your firstname", minlength: jQuery.format("Enter at least {0} characters") }, <%=TextBox2.UniqueID %>: { required: "Please enter a valid email address", minlength: "Please enter a valid email address" } , <%=TextBox3.UniqueID %>: { required: "Enter your firstname", minlength: jQuery.format("Enter at least {0} characters") } } , success: function(label) { // set &nbsp; as text for IE label.html("&nbsp;").addClass("checked"); } }); } ;

    Read the article

  • jQuery Validation Plugin: Invoke errorPlacement function when onfocusout, keyup and click

    - by th3hamburgler
    Hi, I am using the jquery validation plugin and want to use the errorPlacement function to add error messages to the fields title attribute and display just a ? next to the field. This works great when the form is submitted with the submit button but when any of the following events are triggered: - onfocusout - click - onkeyup The validation checks are run but it skips the errorPlacement function and adds the full error message after the field, like the default behaviour. I am using the following code: $("#send-mail").validate({ debug: true, // set this class to error-labels to indicate valid fields success: function(label) { // set text as tick label.html("&#10004;").addClass("valid"); }, // the errorPlacement has to take the table layout into account errorPlacement: function(error, element) { console.log("errorPlacement called for "+element.attr("name")+" field"); // check for blank/success error if(error.text() == "") { // remove field title/error message from element element.attr("title", ""); console.log("error check passed"); } else { // get error message var message = error.text(); // set as element title element.attr("title", message); // clear error html and add cross glyph error.html("&#10008;"); console.log("error check failed: "+message); } // add error label after form element error.insertAfter(element); }, ignoreTitle: true, errorClass: "invalid" });

    Read the article

  • Rails: Getting rid of "X is invalid" validation errors

    - by DJTripleThreat
    I have a sign-up form that has nested associations/attributes whatever you want to call them. My Hierarchy is this: class User < ActiveRecord::Base acts_as_authentic belongs_to :user_role, :polymorphic => true end class Customer < ActiveRecord::Base has_one :user, :as => :user_role, :dependent => :destroy accepts_nested_attributes_for :user, :allow_destroy => true validates_associated :user end class Employee < ActiveRecord::Base has_one :user, :as => :user_role, :dependent => :destroy accepts_nested_attributes_for :user, :allow_destroy => true validates_associated :user end I have some validation stuff in these classes as well. My problem is that if I try to create and Customer (or Employee etc) with a blank form I get all of the validation errors I should get plus some Generic ones like "User is invalid" and "Customer is invalid" If I iterate through the errors I get something like: user.login can't be blank User is invalid customer.whatever is blah blah blah...etc customer.some_other_error etc etc Since there is at least one invalid field in the nested User model, an extra "X is invalid" message is added to the list of errors. This gets confusing to my client and so I'm wondering if there is a quick way to do this instead of having to filer through the errors myself.

    Read the article

  • Rails: Getting rid of generic "X is invalid" validation errors

    - by DJTripleThreat
    I have a sign-up form that has nested associations/attributes whatever you want to call them. My Hierarchy is this: class User < ActiveRecord::Base acts_as_authentic belongs_to :user_role, :polymorphic => true end class Customer < ActiveRecord::Base has_one :user, :as => :user_role, :dependent => :destroy accepts_nested_attributes_for :user, :allow_destroy => true validates_associated :user end class Employee < ActiveRecord::Base has_one :user, :as => :user_role, :dependent => :destroy accepts_nested_attributes_for :user, :allow_destroy => true validates_associated :user end I have some validation stuff in these classes as well. My problem is that if I try to create and Customer (or Employee etc) with a blank form I get all of the validation errors I should get plus some Generic ones like "User is invalid" and "Customer is invalid" If I iterate through the errors I get something like: user.login can't be blank User is invalid customer.whatever is blah blah blah...etc customer.some_other_error etc etc Since there is at least one invalid field in the nested User model, an extra "X is invalid" message is added to the list of errors. This gets confusing to my client and so I'm wondering if there is a quick way to do this instead of having to filer through the errors myself.

    Read the article

  • Manually wiring up unobtrusive jquery validation client-side without Model/Data Annotations, MVC3

    - by cmorganmcp
    After searching and experimenting for 2 days I relent. What I'd like to do is manually wire up injected html with jquery validation. I'm getting a simple string array back from the server and creating a select with the strings as options. The static fields on the form are validating fine. I've been trying the following: var dates = $("<select id='ShiftDate' data-val='true' data-val-required='Please select a date'>"); dates.append("<option value=''>-Select a Date-</option>"); for (var i = 0; i < data.length; i++) { dates.append("<option value='" + data[i] + "'>" + data[i] + "</option>"); } $("fieldset", addShift).append($("<p>").append("<label for='ShiftDate'>Shift Date</label>\r").append(dates).append("<span class='field-validation-valid' data-valmsg-for='ShiftDate' data-valmsg-replace='true'></span>")); // I tried the code below as well instead of adding the data-val attributes and span manually with no luck dates.rules("add", { required: true, messages: { required: "Please select a date" } }); // Thought this would do it when I came across several posts but it didn't $.validator.unobtrusive.parse(dates.closest("form")); I know I could create a view model ,decorate it with a required attribute, create a SelectList server-side and send that, but it's more of a "how would I do this" situation now. Can anyone shed light on why the above code wouldn't work as I expect? -chad

    Read the article

  • Creating Custom validation rule and register it

    - by FormsEleven
    What is Validation Rule? A validation rule is a piece of code that performs some check ensuring that data meets given constraints.In an enterprise application development environment, often it might require developers to have validation be performed based on some logic at several places across projects. Instead of redundant validation creation, a custom validation rule provides a library with a validation rules that can be registered and used across applications.A custom Validation is encapsulated in a reusable component so that you do not have to write it every time when you need to do input validation. Here is how we can easily implement a custom validation that checks for name of an employee to be "KING" For creating a custom Validation , 1.         Create Generic Application Workspace "CustomValidator" with the project "Model" 2.         Create an BC4J based on emp table. 3.         Create a custom validation rule.In EmpNamerule class, update the validateValue(..) method as follows:  public boolean validateValue(Object value) { EntityImpl emp = (EntityImpl)value; if(emp.getAttribute("Ename").toString().equals("KING")){ return false; } return true; } Create ADF Library: Next step would be to create ADF library. Create ADF library with name lets say testADFLibrary1.jarRegister ADF Library Next step is to register the ADF library , so that its available across the applications. Invoke the menu "Tools -> Preferences"Select the option "Business Components -> Registered Rules" from left paneClick on button "Pick Library". The dialog "Select Library" comes up with  the user library addedAdd new library' that points to the above jarCheck the checkbox "Register" and set the name for the rule Sample UsageHere is how we can easily implement a validation rule that restrict the name of the employee not to be "KING".Create new Application with BC4J based on EMP table.Create new validation under Business rule tab for Ename & select the above custom validation rule.Run the AppModule tester.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >