set the initial input focus text of the component of motion af

JDeveloper 12.1.3

Is it possible to specify the original purpose, say for 1st render input text of the component query af on the rendering of page? To make things more difficult, suppose af: query is inside the jsff fragment of page top of page jsf (region)

http://Biemond.blogspot.ca/2011/03/set-initial-focus-on-component-in-page.html

Tags: Java

Similar Questions

  • Set the focus to the text box of the embedded NumericStepper control

    I have an application that requires I use NumericStepper edit control as ItemEditor of a DataGrid column.

    I have two problems that I can't seem to overcome, one being the result of the solution to another:

    (1) I need to instantiate the component NumericStepper during execution, because I don't ' know advance what columns it will require.  More important still, I need to specify default attributes (styles, min, max, width, etc.).  I can't understand how to specify these attributes other than in a .mxml file.  To handle this, I have crreated a component 'wrapper' that's an HBox with a NumericStepper inside her, and I can specify my attributes on the tag NumericStepper.

    (2) now that I did #1 above, although, when I click a DataGrid cell that uses this component editing, the editor comes back but the text box is NOT centered, which means that the user must click a second time if he wants to type a number.  It's very irritating, but I do not know how to manage the focus such as when my HBox-with-embedded-NumericStepper' control rises, it concentrates and its selected data, NumericStepper, just as the 'base' is.

    So, my questions are:

    (1) can I somehow assign property values to a standard when executing NumericStepper, so that I can avoid using my built-in custom control HBox?

    (2) how can I manage the focus so that when my control HBox is in place, the text box is selected and fucused?

    That sounds confusing, but I have a small program to demonstrate this.  The "QtyBad" column uses my own NumericStepper HBos-based and not to be put in the correct focus when activated.  The "QtyGood" column has demonstrated APPROPRIATE behavior, as exposed by the native NumericStepper component, but I can't specify additional attributes / s on this subject.

    Here are all of the program - called "DGNumStepperDemo" - here:

    DGNumStepperDemo.mxml

    <? XML version = "1.0" encoding = "utf-8"? >
    " < = xmlns:mx mx:Application ' http://www.Adobe.com/2006/MXML "layout ="absolute"creationComplete =" onInitialize () "> "
    < mx:Script source = "DGNumStepperDemo.as" / >
    < mx:DataGrid id = "dg1" editable = "true" top = "20" left = "20" width = "350" height = "124" >
    < / mx:DataGrid >
    < / mx:Application >

    DGNumStepperDemo.as


    ActionScript file
    Import mx.collections.ArrayCollection;
    Import mx.controls.DataGrid;
    Import mx.controls.dataGridClasses.DataGridColumn;
    //---------------------------------------------------------------------------------------- -------
    [bindable]
    private var gridData:ArrayCollection = new ArrayCollection([{Qty:0},{Qty:5},{Qty:10}]);

    private function onInitialize (): void
    {
    CDL of the var: Array = new Array();
    var dgc:DataGridColumn;

    DGC = new DataGridColumn ("QtyBad");
    dgc.dataField = "Qty";
    DGC. Width = 75;
    dgc.itemEditor = new ClassFactory (EditorDGNumericStepper);
    dgc.editorDataField = "value";
    cols.push (DGC);

    DGC = new DataGridColumn ("QtyGood");
    dgc.dataField = "Qty";
    DGC. Width = 75;
    dgc.itemEditor = new ClassFactory (mx.controls.NumericStepper);

    dgc.editorDataField = "value";
    cols.push (DGC);

    DG1. Columns = cols;
    DG1. DataProvider = gridData;
    }

    EditorDGNumericStepper.mxml

    <? XML version = "1.0" encoding = "utf-8"? >
    " < = xmlns:mx mx:HBox ' http://www.Adobe.com/2006/MXML ""4"verticalAlign ="middle"paddingRight ="4"paddingLeft = verticalScrollPolicy ="off"horizontalScrollPolicy ="off"> "
    < mx:Script >
    <! [CDATA]
    public function get value(): number {return itemQuantity.value ;}
    []] >
    < / mx:Script >
    < mx:NumericStepper id = "itemQuantity" value = "{data.". Qty}"minimum maximum ="0"="100"/ >
    < / mx:HBox >

    If anyone who bothers to run it, you can see what I mean about the focus problem in the QtyGood and QtyBad columns.

    Any help is appreciated!

    Quick response to the #2 is to change the EditorDGNumericStepper.mxml to the following:

    
    http://www.adobe.com/2006/mxml"
               verticalAlign="middle" paddingRight="4" paddingLeft="4"
               verticalScrollPolicy="off" horizontalScrollPolicy="off"
               creationComplete="focusManager.setFocus(itemQuantity)">
         
              
         
         
    
    

    The only thing I did was put the NumericStepper to 100% width so it fills the column like the standard NumericStepper and it looks a bit better and I added a creation complete event handler that sets the focus to the NumericStepper.  I tested it and it will be emphasis each time on it like a standard stepper.  There may be a more "preferred" way, but it's simple and effective.

    On the #1 question, you want to change the properties, styles, etc. of a NumericStepper standard once it has been added to the data grid?

  • set the focus to the text fields named incrementally

    I created the many (hundreds) of the fields of text through actionscript. I gradually name them and place them on the stage and then subsequently access to set focus.
    I use create a textfield object:
    var txtbox:TextField = new TextField();

    and then use a name incremented to the text field to identify it later:

    var txtname:String = txtn + txtcnt; txtcnt is a number incremented variable. txtn is a string variable.
    txtBox. Name = txtname;

    I add an eventlistener on stage. The event listener works very well and has a companion function.
    I can identify the text field I want access once the move is running through his name.
    Then I use this .name property to set the focus:

    internship. Focus = "txt88";

    Again, "txt88" is the .name of the text field.

    What I am doing wrong?

    ypeError: Error #1034: Type coercion failed: cannot convert "txt88" in flash.display.InteractiveObject.
    to MethodInfo-(200)


    Also, I tried to use the variable incremented during this step, but get a msg of error affecting the variable this way textfield name.
    var txtname:TextField = new TextField();

    Awesome!
    Who did it! I appreciate your help. It is a major obstacle and I went through the help files and books without success. (If it works fine in the AS2 version!)
    Anyway, you are a lifesaver. Thank you.

  • Entry text box loses focus after setting the innerHTML

    I'm trying to change my widget so that it supports the search when you type.

    But when my javascript event fires to submit ajax request entry box retains loses focus.  I tried to reset the focus after writing the html code with blackberry.focus.setFocus (), but this function sets the cursor at the beginning of the entry rather than at the end zone, so I can continue typing.

    Is it possible to update the html code in a DIV without losing the focus on my entry box, or there at - it a way to make the blackberry.focus.setFocus () to go to the end of the string currently in the box?

    Here is an example of the code that I am trying to work in my 9700 Simulator:

    ------ JS Code---function doLiveSearch(str) {  if (str.length==0) {    document.getElementById("results").innerHTML="";    return;  }   xmlhttp=new XMLHttpRequest();  xmlhttp.onreadystatechange = function() {   if (xmlhttp.readyState==4 && xmlhttp.status==200) {    document.getElementById("results").innerHTML=xmlhttp.responseText;     blackberry.focus.setFocus("search");    }  }  xmlhttp.open("GET","livesearch.php?q="+str,true);  xmlhttp.send();}
    
    ------- HTML Code-----
    ----here's an example what my lookup code returns.----
    One
    Two

    Try with selectionStart and selectionEnd before focus:

  • How to set the input to a text field filter?

    I use a text entry (a flash component) to which the user will enter numbers only in (positiv and negative integers and floating point numbers) but not any other symbol.

    Copy the following code


    on keyDown me

    If ("1234567890 -") contains the key or the key = backSpace or key = tab keyCode = 123 or the keyCode 124 = then
    Pass
    on the other
    stopEvent
    end if

    end

    This script works fine when I use it with style text old fields to the Director. It does however not work with new component flash style (text entry).

    How can this be repaired?

    Thanks in advance for any help.

    HUMAN RESOURCES


    First of all, I should mention that I have avoid using Flash inside Director, so there may be a better way.

    As you noted, catch events keyDown globally affect all entrances to the keyboard. If you want to specify a subset of sprites so you need a management system which. The simplest would be a global list that fill you it with a small number of sprite when switching to a new framework.

    global gRestrictedInputSprites

    on preparemovie
    gRestrictedInputSprites = [1, 5, 6, 23] - SAMPLES
    keyDownScript = "chatchKeys()".
    end


    on stopMovie
    keyDownScript = «»
    end


    on chatchKeys
    If gRestrictedInputSprites.getPos (_movie.keyboardFocusSprite) then
    If _key.key = "," and then
    stopEvent()
    on the other
    Pass
    end if
    on the other - overall restrictions on entry
    Pass
    end if
    end chatchKey

    And then add a beginsprite to your Framescript to set the values of the gRestrictedInputSprites for each image tag loop you on--assuming that you place the frame head with "go the frame."


    global gRestrictedInputSprites

    on beginSprite me
    gRestrictedInputSprites = [] - the list of sprites all entry who need entry restrictions for this frame.
    end

    on exitFrame me
    go part
    end

    If you follow this path then I suggest to use a GPDL to set the sprite shortlists. No need to write more than one behavior.

  • How to set the initial focus to the second field?

    Hello

    I created one for the user to enter data.
    The first field of the form has a default value.
    Therefore, when the screen is rendered, I would like to put the cursor in the second field for the user to enter data.

    How can I do this?

    Thank you

    Gabor

    Ahh and now for points...

    Set the display of Page attributes > focus cursor "do not carry the cursor".

    This allows your javascript to run.

    Gus...

    You can reward this answer by marking as being useful or correct ;-)

  • the color of blue default text input focus

    What is the property to change the default color of the development of the components of area text input and text (the light blue color around them). I guess that there is a property css or something, I just have not been able to find.

    Have you looked at the Flex Style Explorer? It is extremely useful to see what can be done and how do something with styles.
    http://examples.Adobe.com/flex3/consulting/styleexplorer/Flex3StyleExplorer.html#

    Tracy

  • Setting the focus problem - stadium is null?

    I'm trying to programmatically set the development of a textinput, however the debugger throws me this error:

    Cannot access a property or method of a null object reference.

    I'm trying to set the focus with this line

    stage.focus = input
    

    For reference, here's a bit of the code

    package views
    {
        import flash.display.GradientType;
        import flash.display.Graphics;
        import flash.display.Shape;
        import flash.events.MouseEvent;
        import flash.events.TouchEvent;
        import flash.geom.Matrix;
        import flash.text.TextFormat;
        import flash.text.TextFormatAlign;
    
        import qnx.input.IMFConnection;
        import qnx.ui.buttons.LabelButton;
        import qnx.ui.core.UIComponent;
        import qnx.ui.display.Image;
        import qnx.ui.text.Label;
        import qnx.ui.text.TextInput;
    
        public class RenamePopupContainer extends UIComponent
        {
            private var input:TextInput;
            private var file:String;
    
            public function RenamePopupContainer(_file:String)
            {
                super();
                file = _file;
                setSize(1024, 600);
                setPosition(0, 0);
                createChildren();
    
                IMFConnection.imfConnection.showInput();
                stage.focus = input;
            }
    
            private function createChildren():void
            {
                var labelFormat:TextFormat = new TextFormat();
                labelFormat.color = 0xFFFFFF;
                labelFormat.size = 28;
                labelFormat.align = TextFormatAlign.CENTER;
    
                var mat:Matrix = new Matrix();
                mat.createGradientBox(400, 1);
    
                var line1:Shape = new Shape();
                line1.x = 312;
                line1.y = 92;
                line1.graphics.beginGradientFill(GradientType.LINEAR, [0xeeeeee, 0xeeeeee, 0xeeeeee], [0, 1, 0], [0, 127, 255], mat);
                line1.graphics.drawRect(0, 0, 400, 1);
                line1.graphics.endFill();
                addChild(line1);
    
                var label:Label = new Label();
                label.text = "Rename to?";
                label.setSize(450, 40);
                label.setPosition(287, 43);
                label.format = labelFormat;
                addChild(label);
    
                input = new TextInput();
                input.setSize(380, 40);
                input.setPosition(322, 120);
                input.text = file;
                addChild(input);
    
                var line2:Shape = new Shape();
                line2.x = 312;
                line2.y = 190;
                line2.graphics.beginGradientFill(GradientType.LINEAR, [0xeeeeee, 0xeeeeee, 0xeeeeee], [0, 1, 0], [0, 127, 255], mat);
                line2.graphics.drawRect(0, 0, 400, 1);
                line2.graphics.endFill();
                addChild(line2);
    
                var btnOk:LabelButton = new LabelButton();
                btnOk.setSize(120, 40);
                btnOk.setPosition(384, 210);
                btnOk.label = "Ok";
                btnOk.addEventListener(MouseEvent.CLICK, ok);
                addChild(btnOk);
    
                var btnCancel:LabelButton = new LabelButton();
                btnCancel.setSize(120, 40);
                btnCancel.setPosition(519, 210);
                btnCancel.label = "Cancel";
                btnCancel.addEventListener(MouseEvent.CLICK, cancel);
                addChild(btnCancel);
            }
        }
    }
    

    This is a fairly common problem: placement of a DisplayObject property has the value NULL until it has been added to the display list.  There are a few solutions, but the easiest for you would be, if this object never will be added to the display list once.

    // in place of your existing stage.focus line
    addEventListener(Event.ADDED_TO_STAGE, onAddedToStage);
    
    ...
    
    private function onAddedToStage(e:Event):void {
        removeEventListener(Event.ADDED_TO_STAGE, onAddedToStage);
        stage.focus = input;
    }
    
  • How to set the focus after initialization?

    Problem: I have a problem affecting a new text field to the development after its initialization.

    Background: I've created a form with a table that creates a new line after leaving the last cell/textfield in the last line if necessary. Once I get the label off the last field, emphasis is more completely - that is to say, tab does not reach any other part of the form.

    Tests: I tried to set the focus on the first field of the new line to the help text (rowNum is a variable for the newly created line)

    xfa.host.setFocus (".form1 form [0] of xfa [0] [0].") #subform [0]. Subform2 [0]. Table 1 [0]. Row1 [rowNum]. TextField1 [0] ");"

    and

    this.parent.parent.Row1 [rowNum]. TextField1.setFocus ();

    I also tried to set the focus to the last field that I had left with just

    xfa.host.setFocus ("this");

    Also, I tried to use of the generator of the action to restore the focus to the textfield object newly created when it is initialized.

    [edit] I forgot to say that the attempt to set the focus to the last field that I had left just actually worked. [/ Edit]

    Post edited by: jasotastic81

    Looks like you used the variable a literal string... must concatenate the value of the variable in the expression of SOM:

    xfa.host.setFocus (".form1 form [0] of xfa [0] [0].") #subform [0]. Subform2 [0]. Le1 tab [0]. Row1 ["+ rowNum + '"]. TextField1 [0] ");"

    Note the name of two + around the variable to its value with the rest of the chain.

    Let us know if that helps.

    -Scott

  • Set the variable to the text entered in a text box

    Hello. I have 2 text boxes on a form that the user can type in numbers. I just want to add the numbers that they typeRegeditdans together and the response of output. I'm a simple and will get more complicated with my calculations later. I've done the calculations to work if they are entered in a database, but we need to work on the fly based on what the user has typed in the text boxes.

    I am only able to set the text of the box and their output values, but I can't bring it to add up. I have some javascript that displays what has been typed in areas using CFSet. Is it the way I should write this? Is it possible to condense the javascript, or I have to separate each set of code text box on? Is there another way to do this simple calculation with just Cold Fusion, or do I have the javascript to enter numbers that are entered in the text boxes? Here is the code I have below. If you delete the CFset price and output price, you will see that this code generates areas of text X and Y. thank you for your help.

    < name cfparam = "url. X"default =" ">

    < name cfparam = "url. "By default Y" = "" >

    < cfoutput >

    < script type = "text/javascript" >

    var pageSoumettre = ' #jsStringFormat (url. X)#';

    function appenX() {}

    document.getElementById('submitLink').href = '? X=' +

    encodeURIComponent)

    (pageSubmit.length? pageSubmit + ',' :'') +)

    document.getElementById('X').value);

    }

    var pageSoumettre = ' #jsStringFormat (url. Y)#';

    function appenY() {}

    document.getElementById('submitLink').href = '? Y=' +

    encodeURIComponent)

    (pageSubmit.length? pageSubmit + ',' :'') +)

    document.getElementById('Y').value);

    }

    < /script >

    < name cfform = "theForm" action = "" # "method ="get">"

    < cfinput type = "text" name = "X" id = "X" value = "" > < br / >

    < cfinput type = "text" name = 'Y' id = 'Y' value = "" >

    < input type = "submit" id = "submitLink" onclick = "appenX (); "onclick ="appenY (); "value ="Update">

    < / cfform >

    < cfset X = #url. X # >

    < cfset #url =. Y # >

    < cfset price = X + Y >

    #X # < br / >

    #Y #.

    #Price #.

    < / cfoutput >

    Andy

    Mixture of Javascript with Coldfusion is unnecessarily complex. If all you need is to add the value of two form fields, then just Google javascript add form fields and you will get a lot of suggestions.

    For example, http://stackoverflow.com/questions/5074073/how-can-i-add-form-values-using-javascript

    X:

    Y:

    Total:

  • How to set the text of creepy stationary?

    How to make the text text in a fixed position in a specific spot while crawling from left to right? EXAMPLE; I don't want the text to analyze the frame from left to right. I just want that it ti be in the middle of the image, but still have the effect of the analysis. I'm stuck and comes to mind. Any help is very appreciated.

    Ok

    A few ways to do this... but here's an interesting way. (and I really hope that you are in CC 2014 version)

    Create your title (titration) for example "TEXT GOES HERE"

    Set up and position it on your Clip, exactly as you wish in the Titler.

    Place layer above your video Clip in the Timeline. It will overlap.

    Duplicate video Clip (Alt click drag) and place it directly above title and Clip Original

    Click the Clip duplicate (top layer)

    Open the window controls Effects > opacity

    Click on the mask of rectangular shape and set it on the edges of the "TEXT GOES HERE" - it will go away.

    Click REVERSE in the mask settings. It will be published.

    Click on the layer title.

    The effects control window > Motion > Position

    Set X of left hand to move the text out of the mask > Set Key Frame

    Move the cursor in the timeline for new times and > set X of left hand to move the text out of the mask on the other side > Set Key Frame.

    Play with keyframes to set the Timings on duration (drag them anywhere)

    Play with mask feathering if you want soft input output

  • New - set the focus

    Hi again,

    I was faced with the implementation focus on each instance of a field to a repeating subform. My subform is limited to 5 cases. Min 1.

    When the user leaves the only textfield in the subform, I create a new instance. I want the focus, set the new instance, but I was not able to get anything to work. My last attempt was to try to pass a number using the instancemanager to a variable in the string of setfocus.

    Here's what I have so far. I know that I have to solve the node, but this process is confusing the heck out of me. I have read and reread everything I could find, but I just couldn't wrap my head around this part successfully.

    Can someone point me in the right direction or suggest a better solutions? TIA!

    Form1. Account_Client_Information.Long_Title.Account_Long_Title::exit - (JavaScript, client)

    var oSubform = xfa.resolveNode ("Long_Title");

    var oNewInstance = oSubform.instanceManager.addInstance (1);

    XFA. Form.Recalculate (1);

    var number = (this.instanceManager.count)

    xfa.host.messageBox ("Index of text field new subform:" + count);

    var vfocindex = xfa.resolveNode ("Account_Long_Title [count]");

    xfa.host.setFocus (vfocindex);

    Hello

    The addInstance method returns the subform you want to if you only need to do;

    var oNewInstance = Subform1.instanceManager.addInstance (1);

    xfa.host.setFocus (oNewInstance.Account_Long_Title)

    Concerning

    Bruce

  • Setting the focus to textfield - cannot type

    I'm trying to use a MouseEvent.CLICK event to set the focus to a TLFTextField and let the user type:

    var textField:TLFTextField = menuField.getTextField ();

    textField.stage.focus = textField;

    textField.setSelection (0,0);

    However, when this code executes, the cursor appears in the textfield, but the user cannot type. What can I do to fix this? A more detailed description below:

    I am applying that has many fields, that the user must fill. The fields are generated dynamically and not always the same number, so I made a movieclip called now and wrote a class so he could manage the feature.

    Now has two areas of text, which are TLFTextFields to the inside of the container MovieClips. The first region, lblFieldName, is the label of the field (for example "name:"). The second is the editable text area lblFieldValue the TLFTextFields are inside containers because I found if I tried to put the lblFieldNametext of now 's manufacturer, it would reset immediately (TextFields are apparently not intitialized until the manufacturer of their parent is over...)

    The size and position of lblFieldValue is defined dynamically depending on the size of lblFieldName. The text in lblFieldValue begins in white until the user enters something. Unfortunately, regardless of the width of the textfield, if the text is empty the user select the textfield by clicking the left edge of it, which is completely unrealistic. My solution has been to add a mouse CLICK event to the set now and try to set the focus to the lblFieldValue TextField. But once again, when the previous code is running it places the cursor but does not allow the user to type. I don't know that I'm missing something simple. Any suggestions?

    Problematic are tlf textfields.  unless you have a good reason to use them, you must use classic text.

  • How I set the value of a dynamic text field row

    I have a repeated line form that contains a button and several text fields.  There is a text field (input field) above with some information I want to place in the table and several buttons that I want to read the value of and defined on the table.  Excuse me there are several questions I have and I use pseudocode to describe.

    Top shape resembles

    InputField

    | ButtonX1 | ButtonY1 | DescriptionX1 (read the text only field)

    ...

    | ButtonXn | ButtonY1 | DescriptionXn

    OutputRow looks like

    | ButtonOutput | OutputField1 | OutputField2 | OutputField3 |

    So, I want to do

    ButtonX1.click

    {

    OutputTable.OutputRow.addInstance (true) //this works - everything I have questions on

    OutputTable.OutputRow.OutputField1.rawValue = DescriptionX1.rawValue

    /*

    Question 1

    How should I address the location of each table to set a value

    Question 2

    How can I get the value of the description field in the same row as button and table

    I would like to say something to the effect of the OutputTable.OutputRow [?]. OutputField1.rawValue = this.parent.DescriptionX

    */

    OutputTable.OutputRow.OutputField2 = InputField.rawValue

    /*

    Same question as above - how can I specify a dynamic line - it's the syntax appropriate for obtaining the value of the input field?

    */

    OutputTable.OutputRow.OutputField3 is this. ButtonLabel

    /*

    Question 3

    How can I get the value of the label of the button to set the field

    There should be a lot of these buttons and buttons will be added - I'd rather set the value based on the label of the button to facilitate value - not requiring only not to change the code

    */

    Issue 4--unrelated to those at the top.

    Is it possible to build the first table

    | ButtonX | ButtonY | Description |

    from a XML file.  I've seen examples showing how to build if it's just data, but XML can be pushed into a form with the code to perform the above actions?

    Glad you figured it out... nothing wrong with doing it this way.

    Normally XML contains data and no default legends these xml files are bouond to the rawValue property. You can enable the dynamic linking and other properties of the object will be bindable (they appear as links) in the user interface. If you click on the link to legend an Assistant appears allowing you to bind the node in the XML file.

    Paul

  • How to set the focus

    Hai

    Say like page of connection in onload, the cursor should focus in the box, how to set the focus?

    Second, even connect click on the connection through properties of the keyboard button, if I click enter on the keyboard it should connect

    How to have the keyboard properties in flex?

    Can someone help me

    Thanks in advance :-)

    for logging by using the... button you can add eventlistenrer to the area of particular text... example...

    ti.addEventListener (KeyboardEvent.KEY_DOWN, EnterKeyEvent);

    private function EnterKeyEvent (event: KeyboardEvent): void
    {
    if(Event.keycode == 13)
    {
    do something
    }
    }

Maybe you are looking for