Text input control the length

Hey,
I have a text input field with 240 length (displayed in 3 rows).
when users enters more than this length it stops the user but when he copies from some where else
and pastes the text here it does not stop the user to the size. (he can copy more than 240 size).
- is there a way we can provide a counter when he types or copies here
- how do we stop him when he copies more than 240 size (copying using right click mouse and paste OR ctrl-V)
Thanks

Hi,
I tried the javascript. It prevants the user to paste. But the need is to allow the user to do the right-click paste but not beyond the allowed size.
Also,
when I get the error message it shows the DB length constraint message EVEN THOUGH I have added a validation for length with error message ("Length cannot be more then 60") in the attribute.
Error: Attribute set with value 123456701234567890123456789012345678901234567890123 456789012123456701 2345678901234567890123456789012345678901234567890 for Note in AppModule.EmpView has invalid precision/scale
Attribute set with value 1234567012345678901234567890123456789012345678901234567890121234567012345678901234567890123456789012345678901234567890 for Note in AppModule.EmpView has invalid precision/scale
How can I show my message and suppress the above default message?
Also the message shows up twice?
Thanks

Similar Messages

  • How To Show Blinking Cursor In Text Input Control

    Hi,
    How to show blinking cursor in a text input control?
    I am using this for login page
    Thanks.

    Hi!
    you can try this!
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" horizontalAlign="center">
    <mx:VBox horizontalAlign="center" paddingTop="100">
    <mx:HBox horizontalAlign="center">
    <mx:TextInput id = "textinput1" />
    <mx:Spacer width="10"/>
    <mx:TextInput id = "textinput2" />
    </mx:HBox>
    <mx:Spacer height="50"/>
    <mx:HBox horizontalAlign="center">
    <mx:Button label="setfocus1" click="setTextInputFocus1(event)"/>
    <mx:Spacer width="5"/>
    <mx:Button label="setfocus2" click="setTextInputFocus2(event)"/>
    </mx:HBox>
    </mx:VBox>
    <mx:Script>
    <![CDATA[
    private function setTextInputFocus1(evt:Event):void{
    textinput1.setFocus();
    textinput1.setSelection(textinput1.text.length,textinput1.text.length);
    private function setTextInputFocus2(evt:Event):void{
    textinput2.setFocus();
    textinput2.setSelection(textinput2.text.length,textinput2.text.length);
    ]]>
    </mx:Script>
    </mx:Application>

  • How to control the length of tax number

    Hi,expert,
    I want to control the length of tax number regarding to some  tax category in 'CONTROL' tabpage of newing organization.
    Could some expert tell me how to customize it?
    In my former opinion,I think this should be customized in SAP  NetWeaver->General settings->Set Countries->Set Country- Specific Checks.
    But after I restrict the length check,test result shows  failure.
    For example, tax number1 of BO(Bolivia) should be 10  characters at most. After the length check is set as '10',the  tax number in BP could still contain more than 10 characters.
    So could anybody tell me where's the problem,am I think  wrong? Or did I miss some other

    Hi,
    Did you check the view V_TFKTAXNUMTYPE in SM30? In this view you can see the FM that consists the tax code for BO.
    If the FM does not work for you, you can copy and do the necessary changes!
    Hope this helps!
    Best regards,
    Caíque Escaler

  • How to change the caret/selection color of text input controls?

    Hello JavaFX Community,
    i'm new to JavaFX. I'm using it since i saw the huge steps forward with version 2.0.
    I have the task to migrate a software from Swing to JavaFX. As a part of our corporate design, we used a special color for the caret and text selection. I couldn't find any information about changing the caret color in JavaFX 2, so i'd like to ask you and i'd be very thankful for an advise.
    There is a cross-post at StackOverflow:
    http://stackoverflow.com/questions/10057989/how-to-change-the-caret-color-in-javafx-2-0
    Thanks and best regards.

    This might be possible, but it is not trivial. You cannot do it with a standard API at this time, you will have to look into creating a skin that allows for these properties to be controlled.
    For example, the color of the caret is currently controlled in the TextFieldSkin (look for the "caretPath" property). Just forcing a color change in a subclassed skin is not so hard. Something like this:
    public class MyTextFieldSkin extends TextFieldSkin {
      public MyTextFieldSkin() {
        this.caretPath.fillProperty().unbind();
        this.caretPath.fillProperty().set(Color.RED);
    }However, it gets trickier if this color must be dynamic and if you want other things to be changed as well. It is a place to start though.
    Many of the skins methods and properties are 'protected' though, so atleast in Skin subclasses you have a lot of options to introduce new features and behaviour.

  • How to move the cursor in a text input programatically

    Hi,
    I am using a TextInput field and a my own keyboard UI with buttons for each alphabet.
    When the user presses buttons on the keyboard UI, i populate the TextInput field through data binding.
    But I would want the cursor to move as the characters are entered in the field at the same time.
    So, how do I move the cursor using actionscript code?
    thanks,
    Sunil

    In that case you need to programmatically insert the text at the selection point. You get the selection point using the selectionBeginIndex and selectionEndIndex properties. I have an app where I do that, using this code:
    // textInput is the name of the TextInput control
    private function insertTextAtSelection(text:String):void
         var start:int = textInput.selectionBeginIndex;
         var end:int = textInput.selectionEndIndex;
         var hasSelection:Boolean = start != end;
          textInput.text = textInput.text.substring(0, start) + text + textInput.text.substring(end);
         if (hasSelection)
             textInput.selectionBeginIndex = start;
             textInput.selectionEndIndex = start + text.length;
         else
             textInput.selectionBeginIndex = textInput.selectionEndIndex = end + text.length;
    This is what the code does:
    gets the starting and ending positions of the insertion point (in case the user has an active selection rather than just an insertion point).
    concatenates the old text with the new text and writes it into the text input
    restores the user's previous selection or insertion point (In this case I'm setting the selectionBeginIndex and selectionEndIndex properties rather than calling setSelection(), but the end result is the same.)

  • Masked Input Plugin - Cannot change the length

    I use the masked plugin alot. But the strange thing is that it does not have a length field so it defaults to 30. In order to change the length, I have to change it to a Text Field, then change the length (e.g., to 15 for phone number) and then change the type back to Masked Input. The length is then shorten.
    Can't the masked input plugin be changed to include the length field? It seems to still use it.
    Robert
    http://apexjscss.blogspot.com

    Hi Robert,
    are you talking about the display length of the field or the number of characters which can be entered.
    Don't have access to the source code now from my iPad, but in the plugin definition you could check if the checkbox for field width (don't remember the exact name) in the standard attributes region is checked.
    Have you downloaded the plugin from http://apex.oracle.com/plugins or do you use the copy from the sample app?
    Regards
    Patrick

  • Text Input Prompt

    Does anyone tried to build some text input field that can do prompt? Something like auto-complete in source code edit. It would mean that:
    - we have to make the rest of the prompt text gray
    - the cursor blinks right after the user input characters
    - if user click space bar, the first word in prompt become solid and cursor moves to next word.
    Is this something that's possible to do for iPhone?

    - How do I programmatically place the cursor in the middle of a word
    - How do I font/color part of word in text input control
    - How do I select the text up to or from where the cursor is...
    You can't. You can't. You can't. At least not with a UITextField.
    I've done more or less of what you are looking for in PocketMoney for auto completing transaction. You need to do a lot of rolling of your own code to pretend you have UITextField.
    What I ended up doing is drawing the uncompleted text at the end of the current text input of the UITextField that I subclassed.
    - Hardy

  • Text Input Autocomplete

    How do you make a text input control behave like a normal web
    form control that displays suggestion as you type in the control.
    I'm sure Flex can do this I am apparently looking in the wrong
    places. Any help would be greatly appreciated. Thanks so much!
    curtkauf

    The Adobe site has an Exchange section where there are many
    flex components, some are free, some are not.
    Here's one that does what you need
    http://www.adobe.com/cfusion/exchange/index.cfm?event=extensionDetail&loc=en_us&extid=1340 018

  • Controlling the Tab key

    My application is build from a number of application
    components. Search on the left, edit component on the right.
    The edit component is a custom canvas with 1 or more text
    input controls to display the
    data. The text input controls are added dynamically based on
    the data content. What I want to
    do is to precisely control what happens when the tab key is
    pressed, without tabbing out of the edit application component into
    another component. (like my search component).

    Hey..
    i have tried and got the solution:
    We can do our coding in LCOIHFI1 include.
    In
    FORM EKORG_DEFAULT_FILL USING    HEADER LIKE CAUFVD
                                     P_AFVGD LIKE AFVGD.
    Thanks,
    Prem

  • Text input?

    How can i make text input in the red rentangles?
    Picture
    Edited by: ImuN on Aug 3, 2009 12:42 AM

    Hi,
    You can use a JTextfield as following :
    import java.awt.Color;
    import java.awt.Dimension;
    import javax.swing.BorderFactory;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JTextField;
    public class Test {
         public static void main(String [] args){
              JFrame jf = new JFrame();
              jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              jf.setLocationRelativeTo(null);
              JPanel jp = new JPanel(null);
              jp.setBackground(Color.green);
              JTextField jtf = new JTextField();
              jtf.setBounds(10, 10, 100, 20);
              jtf.setOpaque(false);
              jtf.setBorder(BorderFactory.createLineBorder(Color.red));
              jp.add(jtf);
              jf.setMinimumSize(new Dimension(300,300));
              jf.setContentPane(jp);
              jf.setVisible(true);
    }

  • Text Input in iOS

    Does TLF except text input on iOS devices?  Can someone point me to documentation about this?
    Thanks.

    Here the solution.. with an ipad i get the native keyboard if i click on the text field..
    It's like a keylogger, which captures the text input to the tlf text (and with the tlf text name you can use the input for your scripts)
    import flash.display.Sprite;
    import flash.display.Stage;
    import flash.text.*;
    import flash.events.*;
    var myTextInput:TextField = new TextField();
    myTextInput.type = TextFieldType.INPUT;
    myTextInput.background = true;     
    myTextInput.text = "Search..";
    Object(root).addChild(myTextInput);
    myTextInput.addEventListener(EVENT.CHANGE, inputEventCapture);
    function inputEventCapture(event:Event):void{
        Object(root).myTLF.text = myTextInput.text;

  • Can input controls be used to change sections?

    Hi,
    I am trying to figure out a way to use the value of an Input Control to change the section dimension without having to create multiple copies of objects and hide/display them.  I have a table with multiple measures and dimensions, including multiple dates (fiscal year, India fiscal year and calendar year).  I want to section the report based on the input control selection so for ex, if the user selects fiscal year on the input control, the report sections are each fiscal year, if they select calendar year, the sections are each calendar year.  I created a variable that uses a simple If statement to select the object based on the input control so for ex, if the input control selection is fiscal year, then the variable is equal to the fiscal year object. If I set the section header equal to the variable, it displays the different values in the header when I change the input control selection but it isn't really creating section blocks based on the object.  Is this possible?  It seems like it should be. 

    Let me share a PoC:
    I have a block like:
    Dim A 
    Dim B
    Dim C
    A1
    B1
    C1
    A1
    B2
    C2
    A2
    B2
    C1
    A2
    B2
    C2
    A2
    B3
    C1
    A3
    B1
    C1
    A3
    B4
    C1
    A3
    B5
    C2
    In Input Control I would like to have A/B/C option. Accordingly it will create section by Dim A/Dim B/Dim C.
    Create two variables:
    Input ="A"
    Section =If([Input]="A";[Dim A];If([Input]="B";[Dim B];[Dim C]))
    Now, I create a section on [Section] object.
    Now, I create an Input Control on [Input] object:
    Let us add custom list of values as below:
    We are done !!!

  • Drill in BW hierarchy level in webi based on input control selection

    Hello Experts,
    I have a requirement in Webi. The Webi report is based on BW hierarchy and it is using hierarhcy both in the report output block and also in the report prompts. We are are BI 4.0 SP5,Patch 6. The report has input controls in it based on the BW Hierarchy. When the report is first executed,the user can drill down the hierarchy by clicking on the "+" nodes to the max level as shown in the screenshot below.
    Now, when the user selects an input control, the data gets filtered but the hierarchy level automatically expands. In other words, when they select a data hierarchy  showed in the input control the hierarchy in table is shown expanded and they want to see the  hierarchy in the table close automatically.
    So ideally its like this when a value from input control is selected.
    Whereas the user wants it to be like this automatically on selecting a particular value from the input control and not in expanded form.
    I'm aware of the Hierarchy depth function but that only takes us to a particular node based on depth and then doesn't allow further drilling after that.
    Is there any setting in webi/bex about always keeping all sub nodes closed to prevent this expansion on selection of input control?
    Thanks and regards,
    Abhishek

    Just did some research on on this and the SAP best practice: The question itself is logically incorrect.
    A report/table filter where there is a hierarchy may remove rows without respecting the hierarchy structure. For this reason, a filter can remove a parent node currently expanded and keep leaves or
      nodes collapsed. To avoid returning an empty table in this case the system automatically expands the hierarchy in the block to shows the resulting members
    Thats why it automoatically expands the hierarchy.
    Closing this thread. Thanks.

  • Keyboard hiding Text Input on Android

    Good Day,
    I have a mobile Flex Application, that isn't scrolling to show a text input and the softkeyboard at the same time.  I have check the app.xml file and any other documentation about the use of the keyboard, and it _should_ be working.
    I have <fullscreen>false</fullscreen>
    and in the main application mxml file: resizeForSoftKeyboard="true"
    however whenever I go into view that needs to show the keyboard and the input together, the keyboard still covers the input.  The scrolling never fires.
    Has anyone experienced this?  Or have some other solution that I should try?
    Cheers,
    Rob

    Hi Rob,
    I think the app.xml could also have:
    <softKeyboardBehavior>none</softKeyboardBehavior>
    specified/added (hint: it could be missing from commented defaults in app.xml)
    http://help.adobe.com/en_US/flex/mobileapps/WS82181550ec4a666a39bafe0312d9a274c00-8000.htm l
    http://opensource.adobe.com/wiki/display/flexsdk/Mobile+SoftKeyboard+Support+Spec
    hth,
    regards,
    Peter

  • Creating a script for a repeating text input on Flash game

    Hey there, I play a browser-based Flash game (in Google Chrome) and one of the most time-consuming aspects of the game is repeating text inputs within the game. This repeat will be inputting a number, followed by tab - tab and then another number and so on. I am a complete novice when it comes to things like this. Many of my gaming friends on Windows have set up macros that enable a hotkey to input all the text in all the fields. I would love to do the same, but have no idea how.
    Is this possible? I apologise for being a total noob on this. Applescript and automator has me completely baffled.

    You can backup using some unix shell scripts.
    rman is not really good one.

Maybe you are looking for