JTextField Document validation

What is the best way to use Document to validate a textfield that will only accepts numbers between 1 and 30.

Lets say there is a situation where we really need to prevent users from typing numbers out of range (instead of showing an error message afterwards). I looked at the tutorial and there is an example on how to use DocumentFilter to restrict input to Integers. I tried to adapt it to do range checking. I was successful in enforcing max value but I can't get it to enforce min value. If the min value is 2 and if the user types 11 then DocumentFilter.insertString is called twice. First with just 1 and then with 11. Is there someway to stop insertString from being called until the user is done typing? I must be missing something obious.

Similar Messages

  • How to reference vendor master data in Document Validation?

    Hi,
    We would like to display a warning message as follows during AP invoices posting if the following details have been defined in the vendor master data.
    a.        u201CAlternate payee has been definedu201D
    b.        u201CPermitted payee has been definedu201D
    c.        u201CPartner bank has been definedu201D
    May i know the best method to do this? If i use document validation, how can i reference these details sitting in the Vendor master data?

    Hi,
    You can use custom validation program (Z*) by copying standard validation (RGGBR000) program.
    Modify the validation program to check table vendor master data.
    After that, you need to assign this  custom validation program to GBLR application area in GCX2.
    Thanks

  • Programatically setting KM property Document Validity Pattern, no method

    I am trying to programatically set the attribute Document Validity Patterns of a KM property.  I am not able to find a method that achieves this.  I can read the Document Validity Pattern, but not set it.
    Can someone help?  My code is shown below:
    IPropertyConfigurationService propConfigService =
                        (IPropertyConfigurationService) ResourceFactory
                             .getInstance()
                             .getServiceFactory()
                             .getService("PropertyConfigurationService");
                   IMetaModel metaModel = propConfigService.getMetaModel();
                   IMetaNameListIterator iterator = metaModel.nameIterator();
                   while (iterator.hasNext()) {
                        IMetaName metaName = iterator.next();
                        String name = metaName.getName();
                        String namespace = metaName.getNamespace();
                        if (namespace.equals(filter)) {
                             String[] documentValidityPatterns =
                                  metaName.getDocumentPatterns();
                             //!!what, no method to set document validity pattern??!!               

    InDesign CS4 (6.0) Object Model says:
     The pattern of dashes and gaps, in the format [dash length1, gap length1, dash length2, gap length2]. Define up to ten values.
    That was it. I guess this is a place where the visual interface diverges from the javascript interface. I was expecting "Start" "Length" as in the dialog. Thanks!

  • Xml document validation using Schema

    I want to validate XML Document using XML Schema...
    does any body have an idea how to do it.
    Every time i m running my java file by using different XML FILE AND XSD FILE in command line i m getting same error.
    error is:
    Exception in thread "main" org.xml.sax.SAXException: Error: URI=null Line=2: s4s-elt-schema-ns: The namespace of element 'catalog' must be from the schema name space.
    at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1115)
    at SAXLocalNameCount.main(SAXLocalNameCount.java:117)
    Below is my java code with xml file and schema file.
    plz get back to me as soon as possible it is urgent.
    thanx
    java File
    import javax.xml.parsers.*;
    import org.xml.sax.*;
    import org.xml.sax.helpers.*;
    import java.util.*;
    import java.io.*;
    public class SAXLocalNameCount extends DefaultHandler {
    /** Constants used for JAXP 1.2 */
    static final String JAXP_SCHEMA_LANGUAGE =
    "http://java.sun.com/xml/jaxp/properties/schemaLanguage";
    static final String W3C_XML_SCHEMA =
    "http://www.w3.org/2001/XMLSchema";
    static final String JAXP_SCHEMA_SOURCE =
    "http://java.sun.com/xml/jaxp/properties/schemaSource";
    /** A Hashtable with tag names as keys and Integers as values */
    private Hashtable tags;
    // Parser calls this once at the beginning of a document
    public void startDocument() throws SAXException {
    tags = new Hashtable();
    // Parser calls this for each element in a document
    public void startElement(String namespaceURI, String localName,
    String qName, Attributes atts)
         throws SAXException
    String key = localName;
    Object value = tags.get(key);
    if (value == null) {
    // Add a new entry
    tags.put(key, new Integer(1));
    } else {
    // Get the current count and increment it
    int count = ((Integer)value).intValue();
    count++;
    tags.put(key, new Integer(count));
    System.out.println("TOTAL NUMBER OF TAG IN FILE = "+count);
    // Parser calls this once after parsing a document
    public void endDocument() throws SAXException {
    Enumeration e = tags.keys();
    while (e.hasMoreElements()) {
    String tag = (String)e.nextElement();
    int count = ((Integer)tags.get(tag)).intValue();
    System.out.println("Local Name \"" + tag + "\" occurs " + count
    + " times");
    static public void main(String[] args) throws Exception {
    String filename = null;
    String schemaSource = null;
    // Parse arguments
    schemaSource = args[0];
    filename = args[1];
    // Create a JAXP SAXParserFactory and configure it
    SAXParserFactory spf = SAXParserFactory.newInstance();
    // Set namespaceAware to true to get a parser that corresponds to
    // the default SAX2 namespace feature setting. This is necessary
    // because the default value from JAXP 1.0 was defined to be false.
    //spf.setNamespaceAware(true);
    // Validation part 1: set whether validation is on
    spf.setValidating(true);
    // Create a JAXP SAXParser
    SAXParser saxParser = spf.newSAXParser();
    System.out.println(" saxparser "+saxParser);
    // Validation part 2a: set the schema language if necessary
    if (true) {
    try {
    saxParser.setProperty(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA);
    System.out.println(" saxparser ");
    } catch (SAXNotRecognizedException x) {
    // This can happen if the parser does not support JAXP 1.2
    System.err.println(
    "Error: JAXP SAXParser property not recognized: "
    + JAXP_SCHEMA_LANGUAGE);
    System.err.println(
    "Check to see if parser conforms to JAXP 1.2 spec.");
    System.exit(1);
    // Validation part 2b: Set the schema source, if any. See the JAXP
    // 1.2 maintenance update specification for more complex usages of
    // this feature.
    if (schemaSource != null) {
    saxParser.setProperty(JAXP_SCHEMA_SOURCE, new File(schemaSource));
    System.out.println(" saxparser 123");
    // Get the encapsulated SAX XMLReader
    XMLReader xmlReader = saxParser.getXMLReader();
    System.out.println(" XML READER "+xmlReader);
    // Set the ContentHandler of the XMLReader
    xmlReader.setContentHandler(new SAXLocalNameCount());
    System.out.println(" XML READER 345 ");
    // Set an ErrorHandler before parsing
    xmlReader.setErrorHandler(new MyErrorHandler(System.err));
    System.out.println(" XML READER 67878 ");
    // Tell the XMLReader to parse the XML document
    xmlReader.parse(filename);
    System.out.println(" XML READER ");
    // Error handler to report errors and warnings
    private static class MyErrorHandler implements ErrorHandler {
    /** Error handler output goes here */
    private PrintStream out;
    MyErrorHandler(PrintStream out) {
    this.out = out;
    * Returns a string describing parse exception details
    private String getParseExceptionInfo(SAXParseException spe) {
    String systemId = spe.getSystemId();
    if (systemId == null) {
    systemId = "null";
    String info = "URI=" + systemId +
    " Line=" + spe.getLineNumber() +
    ": " + spe.getMessage();
    return info;
    // The following methods are standard SAX ErrorHandler methods.
    // See SAX documentation for more info.
    public void warning(SAXParseException spe) throws SAXException {
    out.println("Warning: " + getParseExceptionInfo(spe));
    public void error(SAXParseException spe) throws SAXException {
    String message = "Error: " + getParseExceptionInfo(spe);
    throw new SAXException(message);
    public void fatalError(SAXParseException spe) throws SAXException {
    String message = "Fatal Error: " + getParseExceptionInfo(spe);
    throw new SAXException(message);
    xml file(books.xml)
    <?xml version="1.0"?>
    <catalog>
    <book id="bk101">
    <author>Gambardella, Matthew</author>
    <title>XML Developer's Guide</title>
    <genre>Computer</genre>
    <price>44.95</price>
    <publish_date>2000-10-01</publish_date>
    <description>An in-depth look at creating applications
    with XML.</description>
    </book>
    <book id="bk102">
    <author>Ralls, Kim</author>
    <title>Midnight Rain</title>
    <genre>Fantasy</genre>
    <price>5.95</price>
    <publish_date>2000-12-16</publish_date>
    <description>A former architect battles corporate zombies,
    an evil sorceress, and her own childhood to become queen
    of the world.</description>
    </book>
    <book id="bk103">
    <author>Corets, Eva</author>
    <title>Maeve Ascendant</title>
    <genre>Fantasy</genre>
    <price>5.95</price>
    <publish_date>2000-11-17</publish_date>
    <description>After the collapse of a nanotechnology
    society in England, the young survivors lay the
    foundation for a new society.</description>
    </book>
    <book id="bk104">
    <author>Corets, Eva</author>
    <title>Oberon's Legacy</title>
    <genre>Fantasy</genre>
    <price>5.95</price>
    <publish_date>2001-03-10</publish_date>
    <description>In post-apocalypse England, the mysterious
    agent known only as Oberon helps to create a new life
    for the inhabitants of London. Sequel to Maeve
    Ascendant.</description>
    </book>
    <book id="bk105">
    <author>Corets, Eva</author>
    <title>The Sundered Grail</title>
    <genre>Fantasy</genre>
    <price>5.95</price>
    <publish_date>2001-09-10</publish_date>
    <description>The two daughters of Maeve, half-sisters,
    battle one another for control of England. Sequel to
    Oberon's Legacy.</description>
    </book>
    <book id="bk106">
    <author>Randall, Cynthia</author>
    <title>Lover Birds</title>
    <genre>Romance</genre>
    <price>4.95</price>
    <publish_date>2000-09-02</publish_date>
    <description>When Carla meets Paul at an ornithology
    conference, tempers fly as feathers get ruffled.</description>
    </book>
    <book id="bk107">
    <author>Thurman, Paula</author>
    <title>Splish Splash</title>
    <genre>Romance</genre>
    <price>4.95</price>
    <publish_date>2000-11-02</publish_date>
    <description>A deep sea diver finds true love twenty
    thousand leagues beneath the sea.</description>
    </book>
    <book id="bk108">
    <author>Knorr, Stefan</author>
    <title>Creepy Crawlies</title>
    <genre>Horror</genre>
    <price>4.95</price>
    <publish_date>2000-12-06</publish_date>
    <description>An anthology of horror stories about roaches,
    centipedes, scorpions and other insects.</description>
    </book>
    <book id="bk109">
    <author>Kress, Peter</author>
    <title>Paradox Lost</title>
    <genre>Science Fiction</genre>
    <price>6.95</price>
    <publish_date>2000-11-02</publish_date>
    <description>After an inadvertant trip through a Heisenberg
    Uncertainty Device, James Salway discovers the problems
    of being quantum.</description>
    </book>
    <book id="bk110">
    <author>O'Brien, Tim</author>
    <title>Microsoft .NET: The Programming Bible</title>
    <genre>Computer</genre>
    <price>36.95</price>
    <publish_date>2000-12-09</publish_date>
    <description>Microsoft's .NET initiative is explored in
    detail in this deep programmer's reference.</description>
    </book>
    <book id="bk111">
    <author>O'Brien, Tim</author>
    <title>MSXML3: A Comprehensive Guide</title>
    <genre>Computer</genre>
    <price>36.95</price>
    <publish_date>2000-12-01</publish_date>
    <description>The Microsoft MSXML3 parser is covered in
    detail, with attention to XML DOM interfaces, XSLT processing,
    SAX and more.</description>
    </book>
    <book id="bk112">
    <author>Galos, Mike</author>
    <title>Visual Studio 7: A Comprehensive Guide</title>
    <genre>Computer</genre>
    <price>49.95</price>
    <publish_date>2001-04-16</publish_date>
    <description>Microsoft Visual Studio 7 is explored in depth,
    looking at how Visual Basic, Visual C++, C#, and ASP+ are
    integrated into a comprehensive development
    environment.</description>
    </book>
    </catalog>
    (books.xsd)
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <xsd:element name="catalog">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="book" minOccurs="0" maxOccurs="unbounded">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="author" type="xsd:string"/>
    <xsd:element name="title" type="xsd:string"/>
    <xsd:element name="genre" type="xsd:string"/>
    <xsd:element name="price" type="xsd:float"/>
    <xsd:element name="publish_date" type="xsd:date"/>
    <xsd:element name="description" type="xsd:string"/>
    </xsd:sequence>
    <xsd:attribute name="id" type="xsd:string"/>
    </xsd:complexType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:schema>

    Add xmlns:xsi attribute to the root element <catalog>.
    <catalog xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation='books.xsd'>

  • DMS Document Validity date issue.

    Hello All,
    I have an issue in DMS Valid from Date & Valid to date as below.
    In our Document type when our document status is set to OB i.e. obsolete, in front of the status, system is showing two dates like 22.01.2014 to 31.12.9999.
    We are not using change number functionality in this document type. But still system is showing two dates. When document is in RE i.e Release status system is showing 22.01.2104... date in front of the status.
    Could you please let us know why it is showing two dates in front of document status.
    Thanks

    Hi,
    from my point of view I can inform you that these dates are validity dates for the document. Normally these dates are filled when the document is released to show which version of the document is valid or was valid in a specific period.
    By using menu "Extras" >> "Versions". Here a list of all versions should be displayed and the columns "Valid From" and "Valid to" should show the validity dates.
    Normally these date values are only filled when the status has set the "release" flag in transaction DC10.
    Best regards,
    Christoph

  • DMS - Document Validity

    Hi to all,
    Does anybody know if exist a functionality to handle date of validity of a DMS document? I mean, after approving a document (with the "Release Flag"), I need to fix "manually" a date that the document will be "valid to", the date that the document is "valid from" is automatic when the status with the release indicator is set. The standard system places the date "valid to" automatically.
    Thanks!
    Regards,
    Martin

    Good day,
    The easiest way to do this is by using classification.
    You need to create a user exit using DOCUMENTMAIN01, when a document is released, it must populate the classification field with a valid to/from date.
    In the same exit, you could then also check when the document is accessed, and if it surpasses the valid to date, you can "prompt" the user that the document is no longer valid.
    If you really want to get smart, you can, in the same user exit, change the documents status to "Not Valid" after the allowed period has been reached.
    Regards,
    Freddie Botha
    www.documation.co.za
    SAP DMS, CAD Integration, Data Archiving, Imaging & Scanning, Workflow
    [email protected]
    Please reward points for helpful answers

  • When is a document valid

    Hello,
    I seem to be tripping up on some very basic stuff.
    We install an event listener to detect selection changes. This works well if we manually close the palette. If we quit while the palettte is open we get an error saying we are accessing a document when there are not any open.
    Here is the error. There is a document window.
    The following code demonstrates the problem. In my opinion the alert should not display the documnet name when quiting but it does.
    What is the best test to see if a document is valid.
    Thanks.
    P.
    #targetengine "paltester";
    main();
    function main()
              var w = new Window( "palette", "pal test" );
              w.onShow = function ()
                        app.addEventListener("afterSelectionChanged", selectionChangedFunction);
                        return;
              w.onClose = function ()
                        app.removeEventListener("afterSelectionChanged", selectionChangedFunction);
                        return;
              w.show ();
              function selectionChangedFunction ( )
                        if(app.documents.length <= 0 )
                                  return;
                        alert ( app.documents[0].name );
                        return;

    Hi Pickory,
    The event type afterSelectionChanged is associated to an Event whose target is usually a LayoutWindow (not a Document). When the document's window is closed, however, that event is probably triggered from the app (target). I'm not sure. Anyway, the error you get shows that the app.documents property is not yet updated—on Mac OS—when the event is notified. So, you should use a stronger condition (based on the event target), then try to access the active document if all is fine:
    function selectionChangedFunction(/*Event*/ev)
        var doc,
            docName;
        if( ev.target instanceof LayoutWindow )
            doc = app.properties.activeDocument;
            docName = doc && doc.properties.name;
            alert( docName );
    Hope that helps.
    @+
    Marc

  • Document validity/timeline

    Hi,
    Is it possible to set timelines/validity for documents? If yes, let know how this is done. Thanks.

    Hi Gopal,
    Validity dates for the document can be achieved via Engineering Change Management(ECM). Herein, you may maintain the date effectivity so that any document with the new revision can have a specific date mentioned with it for its effectivity.
    The below link will give you an improved understanding of ECM concept:
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/LOECH/LOECH.pdf
    Regards,
    Pradeepkumar Haragoldavar

  • Document Validity

    Hi guys,
    I  want to use the field "VRLDAT" to define a validate date to a document, but 'i can't find it in any dynpro.
    Please, anybody know how i can mantain a valid date information for a document in DMS?
    regards
    Daniel

    Hi Daniel,
    I've searched the usage of this DRAW field and I found out that it is included in the BAPI_DOCUMENT_CHANGE2 table
    DOCUMENTDATA. So maybe this field could be filled with the help of the BAPI and read out with the BAPI_DOCUMENT_GETDETAIL2.
    Hope this could be useful for you.
    Best regards,
    Christoph

  • Custom xsd document validation referencing child xsd via import/include

    Hi,
    I need to build an ebXML 2.0 agreement which will use multiple xsd's. I have a root xsd document(Company.xsd) which imports two child xsd document(Product.xsd and Person.xsd).
    I've validated the xsd's and it seems to work. I even built a composite process and it works.
    The problem is when I use it in B2B Gateway 11g. I get an error saying it cannot validate against the xsd.
    I followed a thread Re: ebMS with custom xsd document which import other xsd's that tells me that
    I should ZIP it(all top level) and use the zipfile as the document definition and specify the root xsd(Company.xsd). Zipping it with just basic one level
    xsd seems to work but not multi level.
    Are multiple level xsd supported in B2B 11g?
    Regards,
    Robert
    P.S.
    I've attached the xsd and sample xml data.
    --- Company.xsd----
    <?xml version="1.0"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.company.org" xmlns:per="http://www.person.org" xmlns:pro="http://www.product.org" targetNamespace="http://www.company.org" elementFormDefault="unqualified">
         <xsd:import namespace="http://www.person.org" schemaLocation="Person.xsd"/>
         <xsd:import namespace="http://www.product.org" schemaLocation="Product.xsd"/>
         <xsd:element name="Company">
              <xsd:complexType>
                   <xsd:sequence>
                        <xsd:element name="Person" type="per:PersonType" maxOccurs="unbounded"/>
                        <xsd:element name="Product" type="pro:ProductType" maxOccurs="unbounded"/>
                   </xsd:sequence>
              </xsd:complexType>
         </xsd:element>
    </xsd:schema>
    --- Person.xsd----
    <?xml version="1.0"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    targetNamespace="http://www.person.org"
    xmlns="http://www.person.org"
    elementFormDefault="unqualified">
    <xsd:complexType name="PersonType">
    <xsd:sequence>
    <xsd:element name="Name" type="xsd:string"/>
    <xsd:element name="SSN" type="xsd:string"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:schema>
    ---- Product.xsd----
    <?xml version="1.0"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    targetNamespace="http://www.product.org"
    xmlns="http://www.product.org"
    elementFormDefault="unqualified">
    <xsd:complexType name="ProductType">
    <xsd:sequence>
    <xsd:element name="Type" type="xsd:string"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:schema>
    ----Sample XML Data----
    <?xml version="1.0" encoding="UTF-8"?>
    <n1:Company xsi:schemaLocation="http://www.company.org Company.xsd" xmlns:n1="http://www.company.org" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
         <Person>
              <Name>MyName</Name>
              <SSN>12345</SSN>
         </Person>
         <Product>
              <Type>TheProduct</Type>
         </Product>
    </n1:Company>
    Edited by: RSamaniego on 30/08/2010 14:14

    This is the error I'm getting. I got this from the soa-server1-diagnostic file.
    [2010-08-31T08:46:54.209+12:00] [soa_server1] [ERROR] [] [oracle.soa.b2b.engine] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@1e84d54] [userId: <anonymous>] [ecid: 0000If4kAAfECSIMyqqYMG1CV1Rh000033,0] [APP: soa-infra] [dcid: e89d49f26b5a6f2c:11cf61b2:12ac4ba60b9:-7ffd-000000000000002b] oracle.xml.parser.v2.XMLParseException: Element 'Name' not expected.[[
         at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:323)
         at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:342)
         at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:319)
         at oracle.tip.b2b.document.custom.CustomDocumentPlugin.processDocument(CustomDocumentPlugin.java:896)
         at oracle.tip.b2b.document.custom.CustomDocumentPlugin.processOutgoingDocument(CustomDocumentPlugin.java:438)
         at oracle.tip.b2b.msgproc.Request.outgoingRequestPostColab(Request.java:1326)
         at oracle.tip.b2b.msgproc.Request.outgoingRequest(Request.java:837)
         at oracle.tip.b2b.engine.Engine.processOutgoingMessageImpl(Engine.java:1411)
         at oracle.tip.b2b.engine.Engine.processOutgoingMessage(Engine.java:781)
         at oracle.tip.b2b.engine.Engine.handleMessageEvent(Engine.java:3319)
         at oracle.tip.b2b.engine.Engine.processEvents(Engine.java:2948)
         at oracle.tip.b2b.engine.ThreadWorkExecutor.processEvent(ThreadWorkExecutor.java:575)
         at oracle.tip.b2b.engine.ThreadWorkExecutor.run(ThreadWorkExecutor.java:214)
         at oracle.integration.platform.blocks.executor.WorkManagerExecutor$1.run(WorkManagerExecutor.java:105)
         at weblogic.work.j2ee.J2EEWorkManager$WorkWithListener.run(J2EEWorkManager.java:183)
         at weblogic.work.DaemonWorkThread.run(DaemonWorkThread.java:30)
    oracle.xml.parser.v2.XMLParseException: Element 'Name' not expected.
         at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:323)
         at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:342)
         at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:319)
         at oracle.tip.b2b.document.custom.CustomDocumentPlugin.processDocument(CustomDocumentPlugin.java:896)
         at oracle.tip.b2b.document.custom.CustomDocumentPlugin.processOutgoingDocument(CustomDocumentPlugin.java:438)
         at oracle.tip.b2b.msgproc.Request.outgoingRequestPostColab(Request.java:1326)
         at oracle.tip.b2b.msgproc.Request.outgoingRequest(Request.java:837)
         at oracle.tip.b2b.engine.Engine.processOutgoingMessageImpl(Engine.java:1411)
         at oracle.tip.b2b.engine.Engine.processOutgoingMessage(Engine.java:781)
         at oracle.tip.b2b.engine.Engine.handleMessageEvent(Engine.java:3319)
         at oracle.tip.b2b.engine.Engine.processEvents(Engine.java:2948)
         at oracle.tip.b2b.engine.ThreadWorkExecutor.processEvent(ThreadWorkExecutor.java:575)
         at oracle.tip.b2b.engine.ThreadWorkExecutor.run(ThreadWorkExecutor.java:214)
         at oracle.integration.platform.blocks.executor.WorkManagerExecutor$1.run(WorkManagerExecutor.java:105)
         at weblogic.work.j2ee.J2EEWorkManager$WorkWithListener.run(J2EEWorkManager.java:183)
         at weblogic.work.DaemonWorkThread.run(DaemonWorkThread.java:30)
    Edited by: RSamaniego on 30/08/2010 13:57

  • JTextField(Document, string, int)

    Dear friends,
    Could you just tell me how can I fix the size of the JTextField,
    such as just accept the maximum number of digits or characters in JTextField...
    I cant create the Document....
    Could anyone give me a tips?

    I found the best way to do this is to subclass PlainDocument as follows:
    public class MyTextDoc extends PlainDocument
        int maxCharacters;
        public MyTextDoc(int maxChars) {
            maxCharacters = maxChars;
        public void insertString( int offs, String str,  AttributeSet a )
                    throws BadLocationException {
            if( (getLength() + str.length()) <= maxCharacters)
                super.insertString(offs, str, a);
            else
                Toolkit.getDefaultToolkit().beep();
    }I then use this document in the constructor for all my JTextFields.
    I'm not sure what you mean by "I cant create the Document...."
    Cheers
    Gary

  • In-memonry xml document validation against schema with xerces

    Hello, there.
    I found that I can't use JAXP's javax.xml.validation package with jdk 1.4. (Am I wrong?)
    Anyway,
    I found that I can use xerces's DOMParser for the same purpose.
    But I can't find the way to validate my programmatically generate org.w3c.dom.Document against existing schema file.
    Can anybody help me?
    Thanks.

    Have you read Xerces documentation or SUN xml API, there is always a parser option (I suppose it's in the standard) to validate input while parsing.
    Look the API : http://java.sun.com/javase/6/docs/api/javax/xml/parsers/DocumentBuilderFactory.html#setValidating(boolean)

  • JTextField document model

    Hi,
    I have a JTextField field, which is supposed to be read only field to show time.
    My application gets from server a long value, which represents the time.
    This JTextField field shows the time (from server) in format mm:hh:ss (need to convert the long value to the format).
    My question is:
    Which document model should I use and how? I don't find a good example for that.
    Thanks

    I have a JTextField field, which is supposed to be read only field to show time.I would say that typically you would use a JLabel for this. Then you just use the setText() method.

  • JTextField & Document Event

    Hi I need to create a GUI like a calculator with number buttons. When I press 2 if this is the first character on the text field, I should set tp "B " [B and space]. I saw many examples of DocumentFilter and Document Event using to modify the data or generate events when pressing the keys. Then I need to add special characters after few more numbers are eneterd, eg for an input is "B 34.5567" using only keys 0-9.
    Another example was to use JFormattedTextField, I posted another question on the this and got some help to use DocumentFileter.
    I am facing a problem here on how to bind the keys from the GUI to these document events. When I press the keys, I can see events are fired, but cant use it to modify the JFormattedTextField. How should I do this? I am new to JAVA Swing. I am using the examples from the net to get this done.
    Thanks for help in any advance.

    user4071312 wrote:
    Another example was to use JFormattedTextField, I posted another question on the this and got some help to use DocumentFileter.
    what did you try so far? What happened when you used the suggestions in the other thread? Show us that you are trying, that infamous small runnable ... <g>
    BTW, personally, I think it rather impolite to ask a question, get some suggestions and then simply start over again in a new thread.
    I am facing a problem here on how to bind the keys from the GUI to these document events. please get your technical vocabulary right: in the context of Swing "bind keys" is a standing term. It's unrelated to document events.
    When I press the keys, I can see events are fired, but cant use it to modify the JFormattedTextField. assuming with "events" you mean the documentEvents in a DocumentListener: you don't modify the view, you modify the model (and preferably in a DocumentFilter, as you were already advised)
    How should I do this? I am new to JAVA Swing. Boils down to a very general question: How to learn :-) First you have to learn the basics. Start simple, read tutorials, read code, try to modify what you see, experience how it works (and fails <g>)
    I am using the examples from the net to get this done. not enough - you have to understand them. Now go ahead, choose a simple starter (like the one in snoracles online tutorial) and tweak until it works like you want
    Cheers
    Jeanette

  • FIPP document validations

    Hi
    My requirement is "When user parks a document from FB60, it should goto his manager based on cost centre for approval. After approval from manager, the creator of the parked document should be able to POST the document.
    Question are
    1. How can we restrict the creator not to POST the document till he gets confirmation from manager.
    2.If the parked document is raised for 100$ and after approval from manager before posting, how to restrict the user not to change the amout and POST it.
    Regards,
    Pavan

    Raj!
    I have checked the functionality and I have created one custom workflow with reference to WS10000052. I have updated the variant in OBWA t-code with the custom workflow template number. But on triggering the workflow, in SWEL, I am still seeing the standard template number but not the custom one. Am I missing some configuration Also, if a A person in Costcentre parks the document, it should go his manager only. Do we have any standard method which can check this. And should I maintain the costcentre people in any rule or will it go automatically as per the Org structure É
    Regards,
    Pavan

Maybe you are looking for

  • Upgrade from 10.2 to 10.4 on iMac G3 600 MHz ? OS install disk ejects.

    I am trying to help my friend with this one. I gave her my old iMac G3 600 MHz. it has 384 MB memory and currently has Mac OS 10.2.8 which I had installed previously. Now she has a new iPod nano and so the iMac needs the OS system upgraded to be able

  • Error Message when syncing iTunes to Ipod ---- Please help.

    Recently, whenever I try to download my iTunes library to my iPod I get the following messages: The iPod " " cannot be updated. The required file cannot be found. I also get a windows error: "Windows - Delayed Write Failed" Windows was unable to save

  • Mac OS X cannot Install in this computer + strange errors and problems

    Hi guys, My macbook works fine 3 weeks ago, but one day, any operation I make, result in loading, example: click in finder, click in one link on the internet, loading for everything. Then I forced down. After reboot, macbook stay in a blank blue scre

  • How do I re-arrange the tabs on the foxtab display?

    I put sites into the favorites but later want to re-arrange the tabs.

  • WebUtil and Forms9i

    Is there a release of WebUtil that can be used in Oracle9i Forms? In the following link http://www.oracle.com/technology/products/forms/techlisting9i.html I found the following hyperlink named "Oracle9i Forms WebUtil Release". When I clicked on it, i