AF:inputtext change the color of the text on pressure from button and the position of the caret

Hi all

Very green, when it comes to ADF so I hope to give you enough information to get assistance.

I found a 2008 document that created Frank Nimphius that shows how the JavaScript in the ADF and the manipulation of the inline style property.

It is titled "ADF Code corner 010. How to create a character counter of entry for text fields.

While my use case is not the same I feel that I could use for my use case logic.

My use case is that the user wants a text field to replace the blue color when being typed in so that they know what they changed.

I'm jusing JDeveloper 12.1.2

That's what I have my input text looks like:

<af:column sortProperty="#{bindings.ChiefScaleOrderVO.hints.OrderNo.name}" filterable="true"
                               sortable="true" headerText="#{bindings.ChiefScaleOrderVO.hints.OrderNo.label}" id="c1"
                               width="11%" inlineStyle="#{recordManager.columnStyle}">
                      <af:inputText value="#{row.bindings.OrderNo.inputValue}"
                                    label="#{bindings.ChiefScaleOrderVO.hints.OrderNo.label}"
                                    columns="#{bindings.ChiefScaleOrderVO.hints.OrderNo.displayWidth}"
                                    maximumLength="#{bindings.ChiefScaleOrderVO.hints.OrderNo.precision}"
                                    shortDesc="#{bindings.ChiefScaleOrderVO.hints.OrderNo.tooltip}" id="it1"
                                    autoSubmit="true" valueChangeListener="#{recordManager.columnTextModified}"
                                    clientComponent="true">
                        <af:clientListener method="keyInput" type="keyPress"/>
                        <f:validator binding="#{row.bindings.OrderNo.validator}"/>
                      </af:inputText>
                    </af:column>

This is what looks like my javascript:

<af:resource type="javascript">
       function keyInput(evt){
          //document.getElementById(evt.getSource().getClientId() + '::content').style.color = 'blue';
          textfield = evt.getCurrentTarget();
          textfield.setInlineStyleProperty("color","blue");
       }
</af:resource>

If I do an alert (textfield.getInlineStyleProperty("color")); before and after the the setInlineStyleProperty it does not say it gets the value at the blue, but my text color never changes.

If I do the document.getElementById (evt.getSource () .getClientId () + ': content ""). style.color = "blue"; It works, but I'm doing things the "right way".

So is there another way to do this now in 12 JDeveloper?

Also is there anyway to when you click inside an af:inputText that he will not select all of the text and just position the cursor at the end?

Thank you

Derek Hansen

Well, you try to set the wrong property.

According to your example of "pure" javascript, you must set contentStyle and not inlineStyle.

Then try something like: textfield.setContentStyle ("color: Blue");

Dario

Tags: Java

Similar Questions

  • Change background color of TLF text. How do I?

    Hello

    I have to TLF text (read-only) with the name of sMath10 inside MovieClip named content10. I want to chage the backgorund color from white to gray when the value of the text under 26 then. How can I do that. Please?

    Kind regards

    It's sMath10 is a valid reference in the scope of your code using the following syntax.  otherwise, try content10.sMath10 instead of sMath10 (if content10 is defined in the scope of your code).

    sMath10.background = true;

    sMath10.backgroundColor = 0xff0000;

  • Using Javascript to change the color of a button

    Hello

    I am changing a button from blue to red when selected.

    The button is named myShape.

    I tried:

    this.myShape.style.color = "FF0000";

    but no go.

    I also tried just setting the myShape as a clip instead of a button, but no go.

    The function of the button works as I have an alert is triggered when the button is clicked.

    Thank you

    Do you want to change the button color as long as it is which is clicked, or discoloration permanently after summer on it?

    If you just want to change while the click occurs, it's super easy with a button symbol: How to create buttons with Adobe animate (you would simply adjust the "low" State to be of whatever color you want.)

    If you want to permanently change, you could create a clip below an invisible button, and when the button is clicked you might it have to reach a specific image in the clip. in this image, you can use a shape tween to change the color of the shape of button, or you can simply use a keyframe to set the color of what you want it to be.

    Here is a small example of work of two of these options: https://www.dropbox.com/sh/jnrerw6suqfmpu6/AACC8_yuznQzf7h3esVU5VXya?dl=0

  • Changing the properties of "Hint."

    Can you change "hint" property on a text box or a button?

    I am using Captivate 5 and I did a recording in Autmoatic-> training Mode. I want that my advice to appear on the screen when the screen is loaded, not when the user hovers over the interactive realm.

    I am brand new to Captivate so any suggestions would be much appreciated!

    Hello and welcome to the forum of Captivate,

    Tips usually appear during reversal as (perhaps) some users should not a suspicion. You can even choose to have no indication at all.

    It does not insert a text caption and make it appear at the beginning of the slide and probably not stay until the end of the slide. In this text of legend, you can put what you want, or possibly to copy the text of the legend of suspicion (and then delete the Hint caption). Those are the steps:

    • Insert a text caption (using the vertical toolbar, second button insertion, the Standard objects, legend text
    • Choose a provision of the text caption in the property inspector (layout of the text box, character in the region in general, properties of character and Format)
    • Insert your text (possibly to copy the text of the legend of suspicion and paste it into the text of the legend)
    • Check the calendar for the text of the legend: he'll be here at the beginning of the slide, but if the blade is longer than the default 3 sec, he won't be there until the end of the slide, you can extend with Inspector properties (region of duration), or more easily by using the shortcut key CTRL-E with the legend of text selected in the timeline panel
    • by default, a text caption has a transition Fade in and Fade out; you could change it in the property inspector, Transition region.

    Another possibility is to use a rectangle (rounded), you can put text in there too. You can find an explanation for this blog:

    Place text in forms

    I hope this helps you.

    Lilybiri

  • Excel freeze when changing cell color and HP LaserJet CM1415fn is default printer

    We use a HP LaserJet CM1415fn connected via Ethernet. The computer is running Windows 7 x 64 with the latest printer drivers available on the HP Web site as of today.

    When this printer is the default printer, there's a freeze occurring in Excel when we try to change the color of a cell, exactly as described here:

    http://answers.Microsoft.com/en-us/Office/Forum/office_2010-Excel/changing-font-color-causes-Excel-t...

    and here:

    http://answers.Microsoft.com/en-us/Office/Forum/Office_2007-Excel/Excel-not-responding-when-changing...

    Both messages suggested that set the default printer to something else solves the problem and that the problem lies in the driver printer, and indeed, the default printer to something other that our HP printer makes this problem disappear immediately.

    Could you please provide an updated driver or a workaround another that set the default printer to something else?

    To after what I read this peut be bound by printer drivers, but I doubt that the problem is caused by the printer driver. They do refer to is an editor of document to their default the Printers folder, which I do not have is - not - a printer driver. The XPS Document Writer 'prints' documents in a file, it is not really a printer driver at all and it's more a misnomer to consider it as such.

    The description of the problem, it seems always be attached to the Software Suite. If it is a problem that the effects of several printer drivers (according to the user), it wouldn't make sense to assume that the problem is the drivers for the printers belonging to users who have this problem, but the common factor uniting the experiences here, that would be the desktop software.

    What you can do is check the following link to ensure that A) all updates are applied correctly B) driver software is updated through uninstall/reinstall and (C) you ensure that the printer firmware is up to date:

    http://h10025.www1.HP.com/ewfrf/wc/softwareCategory?cc=us&LC=en&DLC=en&product=4089468

    It is possible, it's a hangup in the software, but if things internally within the program that it would not make sense of how the printer HP programming works.

    I would like to know how it goes!

    -Spencer

    PS Hope you have a wonderful day and that your time is as beautiful as she is here!

  • Pages 5.6.2, cannot highlight and change the color of the text?

    I use pages 4.3 and earlier of passage to 5.6.2 - I just tried to highlight a word in a document and change the color - nothing happened.  Tried selecting the color first, and then type a new Word and that doesn't work either.  Am I missing something?  Is there any quick way to the color of the text in 5.6.2?

    To well highlight a word or a selection of words in the v5.6.2, Pages you will need to select the text, click the image below on the gear watch icon and set the fill color of your character. To remove the highlight, select your text, click in the ink of fill color of characters and click transparency icon in the lower right.

  • cannot add emoticons or change the color of the text when you write a message to send

    When I type a message to send. I can't change the color of the text, or if I add an emoticon. I can change the size of the letter, featuring bold, italic and underlined.

    If you mean an e-mail message, Firefox is not 'do' by email.

    If you use Firefox to access your e-mail, you use "webmail". You must seek assistance from your service provider or a forum for this service.

    If your problem is with Mozilla Thunderbird, let know us and we can move this thread to the queue of Thunderbird. This issue is currently in the queue of Firefox to get answers.

  • How can I change the beige tabs with white text to the text of the tabs beige with black (or another dark color)?

    Classic restoration changed by FF 29 tabs beige with black text on the tab active and beige with white text on other open tabs. The white text is not visible. How can I change the text in white with a darker color?
    If this cannot be done, is there a way to reinstall FF 29 with just the security updates (and not all the other stuff) so that I can keep my 28 FF settings? Thank you.

    1. Open the modules (Ctrl + Shift + A Manager; Mac: Command + shift + A), then the Extensions category.
    2. Beside the classical restaurant theme, click on the Options button.
    3. Click the custom colors tab, then the less than (active/hover/default) tab.
    4. Below (active) tab, check 'Text', then click on the color swatch and choose black.
    5. Click the tab (unread) / new tab.
    6. (Unread) tab, check 'Text', then click on the color swatch and choose black.
  • Is there a way to change the color of my text &amp; fonts?

    I would like to change the color of my text that I added my thoughts in a response message, how can I do this?

    Thank you!!

    Eric

    You must compose messages in HTML format in order to apply the colors, styles, and other formatting. The default format is defined under the tools/account settings /accountname/Composition & address.

  • How can I change the color to search for text in firefox?

    When you press CTRL + F in Firefox to make appear the text search and you search for a Word, the word is highlighted in this neon-green color. Is there a way to change the color of this? The green color is barely visible.

    As I mentioned in my first post, you can right-click and choose New > String to create the entry.

  • change the color of the text block fcp

    Hi, editing a video with 3D tumble text. When I go to change the text color of the FCP crashes.

    Does anyone know how to fix this?

    Running the Version OS X El Capitan 10.11.2

    Final Cut Pro X Version 10.2.1

    I read that El Capitan because of problems in another application for example Safari do not know if it is related.

    Kind regards

    Amy

    What are your complete computer specifications?

  • A way to change the colors of metal (gold, etc.) into text in 3D?

    Often, I find that the metallic colors in 3D texts are not quite what I want.  However looks a little too light yellow and I sometimes use brass, but is possible to change these colors?

    I find nothing in the titles themselves.

    TTry changing the environment and lighting.

  • How to change the background color of a text indicator?

    I have an ASCII/text indicator on my FP. FP uses a .png file as the background, with a block diagram. The diagram is a white background with lines black, figures, etc. I wish I could change the background color of the indicator of ASCII text / to white, so that it better matches the white background of the block diagram.

    LabView 2009 SP1 running.

    Thank you

    Have you tried the brush in the tool palette?

  • How partly change the color of text in OutputMessage?

    We could change color OutputMessage via the parameter "textColor". But it changes the entire message. Is it possible to paint a portion of a message for example in red and the other green? In other words, is it possible to change the color of a common string?

    Kind regards

    Max

    Hi Max,.

    There is only a single property for the text color, and it applies to the message the entire production.  I'm sure that there is no way to split the message in different colors.

  • Dynamically change the color of the text substring

    Hello!

    I'm working on a simple serial terminal and I would like to change the color of each line depending on whether the message is sent or received. I have an indicator of string in which I add all messages, sent or received.

    My problem is that when I change the color of a substring by using a property node, all the text in my chain indicator changes. Here is a small Video that shows my problem (my real VI is a little too big to put here but the part of string works the same. I concatenate, keep the clues and apply the property node):

    Result:

    Any idea on how I could change the color of the new line? It seems the selection doesn't really work, because everything in the chain takes the new color.

    Thanks in advance,

    Tim

    PS: I've seen a web-based solution in which the property node must be extended for every line, of course it does not work for me as the number of lines changes dynamically.

    The problem you have is that the string contains no format information and it does not keep the indicator.  You will need to set the font.color in each line, each time you receive a new message.  See my post here - http://forums.ni.com/t5/LabVIEW/Different-fonts-in-string-indicator/m-p/1601602/highlight/true#M5823...

Maybe you are looking for

  • Went URL bar

    I accidentally deletes the url bar, ive crossed all how can I get it back http://www.imagebam.com/image/168a2b358376960

  • iPhone 6 upgrade to iOS 9.3.1 now unable to connect to something other than Chrome works?

    Then I updated my iPhone to iOS 9.3.1 6 and now I can't connect with Safari, Mail, the App store, iTunes, anything in the settings or to iCloud by using 4G or a network. But Chrome still works. After installation, I was invited to connect to iCloud a

  • HP 2035N: HP 2035N won't stop printing

    I've recently set up a network printer.   HP 2035N When I print a test page it prints correctly. When I print from Word or a browser, the right printer keeps printing the same document over and over. I have reset the printer to the factory settings a

  • Satellite A100 - question on the removal of the HARD drive

    Hi all I opened the back panel and have Visual access to the hard drive. It is placed in a kind of rubber cradle / cage. Please advise on how to remove the hard drive and replace it with a new one. I need to do this is because I am faced with recurri

  • Photosmart 7510 prints only one page when I copy 2 sided-multipage document

    I have a two-sided 4-page document. I have placer place in autonatic tray, select Copy 2 head to head 2 and press "Black." All pages are scanned, but only one page (2 sides), one out. I expect all 4 pages 2 faces out. What's wrong? Thank you.