Re: how to use < af:validateLongRange > to string

Hi all

I use Jdev11.1.2.3.0

I have a field as a description of the type.i chain validation for this field set to enter characters 0-20 more than this by using < af:validateLongRange >

< af:validateLongRange
minimum = "1" messageDetailMinimum = "Please enter valid values" hintMinimum = "Please enter valid values" / >

< maximum af:validateLength = "20" / >

Here I can only record the numeric values up to 20. but I'm not able to store strings (letters) when I'm in the string values is to show the error as I said in the messageDetailMinimum.so how come off this.can any one help me please...

Thank you

G.Shilpa.

This, I do not understand. You want to limit the entry for max 20 characters independently which characters. That's what the maximumLength property = "20" is for. There is no need in this case validation. However, if you must have a validation, you can use a regular expression as validator

autoSubmit = "true" >

messageDetailNoMatch = 'Length violation' / >

Timo

Tags: Java

Similar Questions

  • How to use a var a string

    Hello, sorry for my question,

    but I want to use a var a string:

    I know it's a completely beginners question, but I didn t need to date:

    Zahl var = Math.floor ((Math.random () * 99) + 1);

    SYM.$("frame")

    (. CSS

    {' background-image': ' url("images/zahl.jpg") '}

    }

    );

    I tried with {number} and [number], but it does not work.

    Help would be great

    Oliver

    {'background-image':'url ("images /" + number + ".jpg") "}

  • How to use a list of strings as a parameter of data service

    Hello.

    I need to create a service that receives a list of string as parameter. I read the thread list of values as param - is possible to bring down the query? but I was unable to make it work.

    In the my namespace, I defined an element:

    < xs: element name = "keyList" >
    < xs:simpleType >
    < xs:list itemType = "XS: String" / >
    < / xs:simpleType >
    < / xs: element >

    In my dataservice, I stated the following function:

    declare function tns:list ($keyList as element (bt: keyList)) as {element(bt:employee) *}

    for $key in $keyList
    for $employee in emp:EMPLOYEES()
    where (fn:upper - eq fn:upper-case(fn:string($key))) case($employee/STR_KEY)
    return
    < bt: employee >
    < bt: name > {fn:data($employee/STR_NAME)} < / bt: name >}
    < / bt: employee >
    };

    When I test this situation, the generated SQL code considers that all the keys as the only parameter:
    (...)
    WHERE (UPPER (t1." STR_NAME") =?)
    (...)

    So, if I try a string of a list, it works:
    (...)
    WHERE (UPPER (t1." THE STR_NAME") ="STRING1")
    (...)

    But with two or more strings...
    (...)
    WHERE (UPPER (t1." THE STR_NAME") ="WORD1 WORD2")
    (...)

    What I am doing wrong?

    Also, on the wire, I mentioned, I would like to know how I could make the reference "for $paramString in $paramStrings / AN_ELEMENT ' using my code.

    Best regards and thanks for your time!

    My answer in list of values as param - is possible to bring down the query? has been

    I think you want:

    for $paramString in $paramStrings / AN_ELEMENT

    and you have:

    for $key in $keyList

    $keyList is a single element that contains a complete list, so $key is the only element that contains a complete list. And that is why it does not work for you.

    Yourself and the other poster are doing more complicated things they should be. You can simply use the following (you need not specify a child of $keyList here). The ' * ' after XS: String means minOccurs = 0 maxOccurs = unlimited.

    declare function tns:list($keyList_as_xs:string*)...

    for $key in $keyList
    ...

  • How to use regexp_replace to replace strings instead of substrings in commas

    I have a table that has a column that contains the strings separated by columns. For example

    Tbl1

    ===========

    ID || Col1

    1 A-B-C, B - C, A-B-C

    I use select ID, regexp_replace (Col1, ' ([^,] +), \1', '\1') of tbl 1

    and I get

    Tbl1

    ===========

    ID || Col1

    1 A-B-C

    I'm looking for is

    Tbl1

    ===========

    ID || Col1

    1 A-B-C, B - C

    Why is my regular expression matching chain also instead of match the whole string? Thank you!

    You try to delete the duplicates?

    with tbl (ID, Col1) as long as)

    Select 1, 'A-B-C,B-C,A-B-C' of all the double union

    Select 2, 'A-B-C,B-C,A-B-C,B-C,E-F-G,E-F-G' of the double

    )

    SELECT id, listagg (str, ',') within the Group (order by lvl) as NewCol1

    de)

    Select r.*, row_number() over (partition by id, order of str from lvl) rn

    de)

    Select the level lvl, id, regexp_substr (Col1, ' [^,] +', 1, level) Str

    from tbl

    connect by level<= regexp_count(col1,="" ',')="" +="" 1="">

    ID = prior id and

    prior sys_guid() is not null - prevent connect loop using unique val

    + 0

    )

    where rn = 1

    Group by id

    ID NEWCOL1
    1 «A-B-C, B - C»
    2 'A-B-C,B-C,E-F-G '.
  • How to convert numbers to the string with an optimal number of numbers?

    Hello.

    I'm doing something that seems just, and I wonder how much trouble I have with this.  I'm sure there is a way to get LabVIEW for this.

    I have a table of numbers (double), and I use the 'Worksheet picture String' function to generate a string that I can write to a file.

    The problem I have is I want to make the chain to omit useless zeros after the decimal point, but I don't want to limit the accuracy of the numbers that requires it.

    For example, if my data is as follows:

    0.02

    0.4476

    -0.0244570001

    I would like for the string I can be exactly like what I wrote above.  However, depeding on the format string that I use, that's what I get:

    format string: %.10f

    0.0200000000

    0.4476000000

    -0.0244570001

    format string: %f (it seems that by default 6 figures)

    0.020000

    0.447600

    -0.024457

    format string: %.4f

    0,0200

    0.4476

    -0.0244<= all="" trailing="" digits="" for="" this="" number="" have="" been="">

    Anyone know what the format string should be to get the string I want to (what is this

    0.02

    0.4476

    -0.0244570001

    Thanks in advance,

    Alejandro

    Hello Alejandro:

    Try %#f

  • How to use 1-channel analog input for start/stop aquire sample second channel input analog?

    I have a little problem. I've just been programming in labview for 2 weeks.

    I'm trying to figure out how to use my channel of analog input on the USB-6009 case for start/stop (reference trigger and start) presented to the second analog input channel samples.

    I need the first analog input string to operate continuously and control sampling on the second.  When the second channel will start sampling program brings a new graph each time and saves it (I have all this that figure out).

    How can I configure the trigger so the lance program presented in for the second channel when the 1 channel reached above 2V (e.g.) and stop when it falls below 2V.

    I use a pressure force sensor on the first channel that gives me straight (up to) 5 V when it is pressed and nothing when it is not...

    Thank you.

    Grand... Thanks for the information!

    But can't I then make a 1 channel instead and wait until that meat of the max element value?

  • How to use the background rim start page: allowInvokeParams

    Hello

    How to use the element of the rim: background? what it is?

    1. To run javascript? openBISPushListener?
    2. Can you pass parameters between it and the content page?
    3. How to pass parameters between it and the content page?

    It defines a page will be loaded in the background when your application starts.  This page is intended to run any startup logic (for example starting listeners - Push is an excellent example) that your application may need to depend on, without any user interface.

    This background page is WITHOUT user interface.  Any attempt to interact with the user interface (for example change the DOM, calling alert() statements, etc.) will result in no action.  Nor will calls to redirect, since the background page does not interact with the pages of foregroud - if no query string.

    To answer your question - ' How do you pass parameters between it and the content page.  I suggest using a technique of storage like localStorage, WebDB, or same file offline.

  • How to use scheduleApplication - of is to wake up to 4 times a day

    I don't know how to use scheduleApplication and initialize them where there. Please see code below

    1. I have in hand. Is this correct, every time that the application runs that it will set the timetable, what's happening to the old?

    2 - I need my application to wake up to 4 times a day, how can I do that can I Schedule 4?

    3 - I put as that below to wake up at 17:03 (61380000), but he never did. The application did not run?

    result 4 Boolean is true, then I guess it's ok, but my request to wake up ever at 17:03, how to wake up several times a day?

    public class UserInterface extends UiApplication{
    
        public static void main(String[] agrs){
    
            ApplicationDescriptor desc = ApplicationDescriptor.currentApplicationDescriptor();      
    
            boolean result = ApplicationManager.getApplicationManager().scheduleApplication(desc, 61380000, false);
            System.out.println("Calling schedule is " + result );
            UserInterface theApp = new UserInterface();
            theApp.enterEventDispatcher();
    
        }
        public UserInterface() {
            pushScreen(new UserInterfaceScreen(this));
        }
    }
    

    Just to confirm that the application calls scheduleApplication, use the debugger and check what happens. Instead of 17:30, you can take the current time and add a few milliseconds and pick up the results of debugging. Wakingup several times, change the time before you quit the application.

  • SQL how to use a variable and use the result as a reference for the name of the table

    Hi all

    I have new in the declaration of Oracle, sorry in advance if something is easy for you all. BTW, I have this scenario:

    I have a table OL structured in this way:

    Date - it contains dates, for example 11/01/2015

    TableName - it contains strings, for example, OL1, OL2, OL3 and so on...

    Then I have a different table, the name of these tables are of the same name in the table of the OL, so I have table table, OL1, OL2, OL3 table and so on. The structure of these tables is the same. And Yes.

    table OL1

    ---------------------------------------------------------------

    ID LAST NAME FIRST NAME PHONE

    ---------------------------------------------------------------

    1 JOHN DOE 12345679

    2 PAUL 111111122 TIBBS

    table OL2

    ---------------------------------------------------------------

    ID LAST NAME FIRST NAME PHONE

    ---------------------------------------------------------------

    1 ANNA KRAIG (NULL)

    NATHAN FRESHMANN 111111133 2

    If the scenario is clear, I would like to retrieve the value (null), research in all the OL * tables by using the value of the OL table (tablename) max.

    If I'm going to do these simple steps, I got the result:

    Select max (TableName) OL

    the result will be OL2

    # I know not how to use the option set to avoid changing the table name in the sql statement all the time.

    set mytable = 'OL2.

    Select Name, family name

    of & mytable

    When the phone is null

    Any idea?

    Thank you very much in advance.

    Hello

    run immediately "select dt.log_id, obj.presentation_name, dl.begin_time

    bulk collect into v_result_set

    of ' | v_ol |' dt join internal ol_object obj on

    DT.object_type_id = obj.object_type_id

    inner join ol_chunk_log dl on

    DT.log_id = DL.log_id

    where dt.data_value is null';

    dbms_output.put_line (v_ol);

    end;

    Correct the code such as:

    run immediately "select dt.log_id, obj.presentation_name, dl.begin_time

    of ' | v_ol |' dt join internal ol_object obj on

    DT.object_type_id = obj.object_type_id

    inner join ol_chunk_log dl on

    DT.log_id = DL.log_id

    where dt.data_value is null' bulk collect into v_result_set;


    for i in v_result_set.first ... v_result_set. Last

    loop

    dbms_output.put_line ('LOG ID: ' | ) ( v_result_set.log_id (i)) ;

    dbms_output.put_line (' NAME CLOSELY: ' |) v_result_set.presentation_name (i));

    dbms_output.put_line (' START TIME: ' |) ( v_result_set.begin_time (i)) ;

    end loop;

    end;

    Kind regards.

  • using the function - how to use the values of the input variables on the table select statement names

    Hello community, I have a problem when creating a function. The purpose of this function is to check the table of weather gave yesterday or not. We must check this on different tables on different sachems. We are creating a function with input variables.

    CREATE OR REPLACE FUNCTION IN_SCHEMA.IS_YDAYDATA_TO_TABLE

    (

    in_schema IN VARCHAR2,

    in_tablename IN VARCHAR2,

    in_datefield IN VARCHAR2,

    )

    RETURNS INTEGER

    AS

    -Declaring variables

    v_is_true INTEGER.

    BEGIN

    SELECT

    CASE

    WHEN MAX (in_datefield) = TRUNC(SYSDATE-1)

    THEN 1

    ON THE OTHER

    0

    END

    IN

    v_is_true

    Of

    in_schema.in_tablename

    ;

    RETURN v_is_true;

    END;

    /

    When creating, I got error: [error] ORA-00942 (44:19): PL/SQL: ORA-00942: table or view does not exist

    How to use the values of the input variables on the table select statement names?

    Hello

    Here's a way you can use dynamic SQL statements for this task:

    CREATE OR REPLACE FUNCTION IS_YDAYDATA_TO_TABLE

    (

    in_schema IN VARCHAR2,

    in_tablename IN VARCHAR2,

    in_datefield IN VARCHAR2,

    in_first_date DATE DEFAULT SYSDATE - 1,.

    in_last_date DATE by DEFAULT NULL

    )

    RETURNS INTEGER

    AS

    -IS_YDAYDATA_TO_TABLE returns 1 if in_schema.in_tablename.in_datefield

    -contains all the dates in the in_first_date of the range through included in_last_date

    - and it returns 0 if there is no such lines.

    -If in_last_date is omitted, the search only the data on in_first_date.

    -If in_first_date is omitted, it defaults to yesterday.

    -Time parts of the in_first_date and in_last_date are ignored.

    -Declaring variables

    sql_txt VARCHAR2 (1000);

    v_is_true INTEGER.

    BEGIN

    sql_txt: = 'SELECT COUNT (*).

    || 'FROM ' | in_schema | '.' || in_tablename

    || 'WHERE ' | in_datefield | ' > =: d1'

    || «AND» | in_datefield | '< >

    || 'AND ROWNUM = 1';

    dbms_output.put_line (sql_txt |) '= sql_txt in IS_YDAYDATA_TO_TABLE");  -For debugging

    Sql_txt EXECUTE IMMEDIATE

    IN v_is_true

    With the HELP of TRUNC (in_first_date) - d1

    TRUNC (NVL (in_last_date

    in_first_date

    )

    ) + 1                -- d2

    ;

    RETURN v_is_true;

    END is_ydaydata_to_table;

    /

    DISPLAY ERRORS

    If you must use dynamic SQL statements, put all the SQL statement in a single string variable, such as sql_txt in the example above.  In this way, you can easily see exactly what will be executed.  Comment out the call to dbms_output under test is completed.

    Try to write functions that will address not only the question that you have now, but similar questions that you may have in the future.  For example, now that interest you only to the verification of the data of yesterday, but later, you might want to check another day or range of days.  The above function combines the convenience of a function simple (looks like yesterday data if you don't tell him otherwise) with the power of a more complex function (you can use the same function to check any day or range of days).

  • JavaFX how to use WebView load the local HTML page?

    JavaFX how to use WebView load the local HTML page?

    If the HTML code of the files in the class path, which is in the package, the load using one of the following ways:

    String url = Main.class.getResource("/html/index.html").toExternalForm();
    engine.load(url);
    

    The above methods can only load files outside the class path!

  • How is used with fx i18n resources: include?

    I can't seem to get bundles of resources working with fx: include.  This old post suggests it should work, but I'm running into two different errors.  I downloaded a very simple example here:

    https://DL.dropboxusercontent.com/u/8788282/sample-app.zip

    The example has everything set up the way I expect to work.  When I open "MainView.fxml" with SceneBuilder (7 bundled JRE), I get a MissingResourceException.  When I try to run "SampleApp" using JDK8-b111 I get a NullPointerException.  In the second case, it seems that fxmlloader might be passing a null to ResourceBundle ClassLoader.

    Does anyone know how to use beams of resource with nested views?  The Introduction of to FXML. JavaFX 2.2 docs silence resources fx: includes, but does not explain how it is supposed to work.

    A possible workaround is to make sure the ResourceBundle you go to your main FXMLLoader is not loaded by the system class loader. I think that the best way to proceed is to wrap the resource group, you get in the usual way in a trivial wrapper implementation. Something like this:

    import java.io.IOException;
    import java.util.Enumeration;
    import java.util.Locale;
    import java.util.ResourceBundle;
    import java.util.Set;
    
    import javafx.application.Application;
    import javafx.fxml.FXMLLoader;
    import javafx.scene.Parent;
    import javafx.scene.Scene;
    import javafx.stage.Stage;
    
    public class ResourcesTest extends Application {
    
     @Override
      public void start(Stage primaryStage) throws IOException {
           ResourceBundle resources = new ResourceBundleWrapper(ResourceBundle.getBundle("resources.Resources"));
           System.out.println(this.getClass().getClassLoader());
           System.out.println(resources.getClass().getClassLoader());
           FXMLLoader loader = new FXMLLoader(getClass().getResource("ResourcesTest.fxml"), resources);
           Parent root = (Parent) loader.load();
           Scene scene = new Scene(root, 300, 120);
           primaryStage.setScene(scene);
           primaryStage.show();
      }
    
      public static void main(String[] args) {
           launch(args);
      }
    
     // this class effectively does nothing, but it will be loaded by the
     // application class loader
     // instead of the system class loader.
      private static class ResourceBundleWrapper extends ResourceBundle {
    
           private final ResourceBundle bundle;
    
           ResourceBundleWrapper(ResourceBundle bundle) {
                this.bundle = bundle;
           }
    
           @Override
           protected Object handleGetObject(String key) {
                return bundle.getObject(key);
           }
    
           @Override
           public Enumeration getKeys() {
                return bundle.getKeys();
           }
    
           @Override
           public boolean containsKey(String key) {
                return bundle.containsKey(key);
           }
    
           @Override
           public Locale getLocale() {
                return bundle.getLocale();
           }
    
           @Override
           public Set keySet() {
                return bundle.keySet();
           }
    
           }
    }
    

    The simplest workarounds is may be possible, but I don't see one right now...

  • How to use Illustrator SDK of FrameMaker plugin?

    Hello

    I am absolutely new to Illustrator SDK (downloaded 2 days back), even though I have some experience in FrameMaker 12 SDK. My problem is as follows:

    I have a FrameMaker document, where have been incorporated to the Illustrator (.eps) files. I need to develop an application that will find some texts in the document and replace them with others. I know the source text and their replacements. The text to replace can be in the FrameMaker document, as well as in any embedded Illustrator document.

    So far, I have developed a plug-in, FrameMaker, which may be invoked by a menu of the FrameMaker option. If the user opens FrameMaker, loads the document, then calls this plug-in, it will properly replace strings in the FrameMaker document. Now I'm stuck with replacing the strings in the embedded Illustrator documents. I can find the name of the Illustrator files that are integrated and should be treated. But I am confused how to use Illustrator to my FrameMaker plug-in SDK for find and replace these strings? Any idea?

    I read the software Illustrator SDK documentation in the last two days and it seems that I have to use is Adobe Text Engine classes (I could be wrong but) who can manipulate the text in an Illustrator file. Is this correct or is there a more easy/better way? Even if I try this approach, how should I proceed? Should I try to develop a plug-in in Illustrator using classes ATE? If so, how do I invoke that FrameMaker? I should start by Illustrator program, load the document illustrator in it and then some how (how?), call the plug-in which will replace the text, save the file and close the Illustrator? All this has a sense or I'm hiking? Is there a simpler way? It doesn't have to be a manual intervention after the user call my FrameMaker plug-in and everything must be done automatically from there.

    Another little thing. Try to compile and run the example of Illustrator SnippetRunner ATE, I'm stuck as it used Microsoft Foundation Class (MFC) and I have Visual Studio Express Edition 2012, which does not support MFC. I hope that we can develop plug-in in Illustrator without the help of MFC. Can someone please confirm?

    Any help will be much appreciated.

    Thanks in advance,

    Joydeep Ray

    You cannot use the Illustrator SDK of your plugin for FrameMaker. The SDK only works in a plugin Illustrator loaded by a current version of Illustrator. All of your users will have installed Illustrator? If all embedded files are all eps, then you could probably treat the files yourself.

    You don't need MFC to create a plugin to HAVE. I think that the only "MFC" in the samples is "afxres.h" #include in the resource (.rc) files. If you replace this with #include "windows.h" it will probably work.

  • How to use setFireActionForSubmit with the settings and capture the parameter

    Hello

    Can someone explain how to use setFireActionForSubmit.

    I extend the ShoppingCartPG controller. In the extended controller processRequest method I am adding a button to the table and implementation of the setFireActionForSubmit, so when the button is pressed it triggers the setFireActionForSubmit event.
    I need to pass the RequisitionLineId as a parameter which is present in the t associated with the ShoppingCartPG.

    I used the following code in the processRequest
    =================================
    ' public void processRequest (OAPageContext paramOAPageContext, OAWebBean paramOAWebBean)
    {
    super.processRequest (paramOAPageContext, paramOAWebBean);
    OATableBean otbRN = (OATableBean) paramOAWebBean.findIndexedChildRecursive ("ItemTableRN");
    OASB OASubmitButtonBean = (OASubmitButtonBean) paramOAPageContext.getWebBeanFactory () .createWebBean (paramOAPageContext, "BUTTON_SUBMIT");

    oasb.setID ("addnInfo");
    oasb.setUINodeName ("addnInfo");
    oasb.setText ("additional information");

    String pageName = paramOAPageContext.getRootRegionCode ();
    Hashtable params = new Hashtable (1);
    params.put ("param1", pageName);

    Hashtable paramsWithBinds = new Hashtable (1);
    paramsWithBinds.put ("param2", new OADataBoundValueFireActionURL (OASB, "${oa.encrypt.current.RequisitionLineId}"));
    oasb.setFireActionForSubmit ("addnInfoEvent", params, paramsWithBinds, false, false);

    otbRN.addIndexedChild (oasb);
    }
    =================================

    And I capture the event "addnInfoEvent" in processFormRequest method and trying to capture the RequisitionLineId I the past as a parameter.
    This is the code that I used in processFormRequest.
    =================================
    ' Public Sub processFormRequest (OAPageContext paramOAPageContext, OAWebBean paramOAWebBean)
    {
    super.processFormRequest (paramOAPageContext, paramOAWebBean);
    OAApplicationModule localOAApplicationModule = (paramOAWebBean) paramOAPageContext.getApplicationModule;

    String strEvent = paramOAPageContext.getParameter (EVENT_PARAM);

    If ("addnInfoEvent".equals (strEvent))
    {
    Number format = 0;
    try {}
    Format = new Integer (ClientUtil.getDecryptedParameter (paramOAPageContext, "param2"));
    }
    catch (System.Exception e) {e.printStackTrace () ;}

    String outmsg = "line ID:" + size + ":" + strEvent;
    throw new OAException (outmsg, OAException.INFORMATION);
    }
    }
    =================================

    But I'm not able to capture the RequisitionLineId I sent as a parameter.
    Can someone let me know what I am doing wrong.

    Hello

    Because your table is not a tip so table using a submit button approach will not work because it won't give you rank of reference and you will not be able to enter the id of the corresponding command line, instead you use an icon of the image, which can be created through customization. Let me know if you need help in the code.

    Thank you
    Pratap

  • How to use CASE or DECODE into that?

    Hi, I have a query like this
    AND ...smthng
    AND --smtg
    AND age BETWEEN ....
    For the last clause AND the age column, I have the values passed param in the AOC as strings
    0 '-30', 31-60, 61-90, and ' 91 +'. The setting IN of course is VARCHAR2.

    What I want to do in this clause AND
    for example, for age will '' 0-30, the clause AND should be

    AND BETWEEN age (if this interval is 0 '-30' then) AND 30 0 (if it falls between 31-60'), then BETWEEN 31 AND 60... and so on...
    However this BETWEEN will work up to 61-90 of range but for 91 +, there is no upper limit so it should be
    AND age > 91

    Now, I don't know how to achieve both BETWEEN and ' > ' clauses in the same statement AND.

    DECODE will not work and do not know how to use the CASE in this situation that even this cannot solve this problem.

    Don't want to do the last clause AND Dynamics

    Please suggest me how to do this.

    Thank you
    Aashish

    Published by: Sylvie S. on October 21, 2011 18:01

    A third possibility would be to choose a sufficiently high value as a high-end for the Group 91 + and use something like:

    age between to_number(CASE WHEN instr(:param, '+') = 0
                                  THEN substr(:param, 1, instr(:param, '-') -1)
                                  ELSE substr(:param, 1, instr(:param, '+') -1) end) and
                to_number(CASE WHEN instr(:param, '+') = 0
                               THEN substr(:param, instr(:param, '-') +1)
                               ELSE '9999' END)
    

    John

Maybe you are looking for