FAQ Database Discussion Community

extract string from a json object

I have an attribute in the extjs code defined as : datajson: { 'name' : 'Hello', .... } Now I need to set the value of a textfield to the name defined inside this attribute. I have tried the following but its not working: Ext.getCmp('name').setValue((this.datajson.xyz.name).toString()); The id of the textfield...

How to get values in this json object in ext js?

I try to get values and put in a textfield. return json is ; Object { info=[1]} in this info[Object { name="name", another ="another"}] clearly ; {"info":[{"name":"name","another":"another"}]} i do ; var resp = Ext.decode(response.responseText); txtName.setValue(resp.info); and in text field it shown [Object object] How to i get name and another...

ios/xcode/coredata: How to mimic ajax call in objective c

For a tag system, when entering a new item, I'd like the user to start typing a letter or two and see possible tags...similar to how SO tags work on the website i.e. Ajax. Is there a way to do this on IOS? Basically the Add Item screen has some...

pre-populate wtforms text field with values

I can't figure out how to pre-populate a TextField with WTForms. I have a field called organization that i defined: organization = TextField('Organization name:') # I defined also a function def __init__(self, *args, **kwargs): nameoforganization = session.get('name') How can i populate TextField organization from nameoforganization. Can anybody help me!. Thanks...

Dynamic Adding of Text Fields JQuery

Hi I'm new to JQuery and I'm making a API Tool just like https://www.hurl.it/ I also want to have the Add Parameters Button and it will create a parameter name and a value field and render it inside a div. Here's my form. <div class="panel-body"> {!! Form::open(array('url' => 'invoker', 'class'...

Swift: Problems with getting text from UIAlertView textfield

I'm using Swift with Xcode 6.3. In my application I want a alert with a textfield. After clicking on "Done" I want to save the textfield input in a String. After clicking on "Cancel" I want only to close the alert. I've created my alert like this: var alert =...

Add TextField on Chart

I'm using JavaFX in Swing so I have method: private Scene createScene() { Group root = new Group(); Scene scene = new Scene(root); BorderPane borderPane = new BorderPane(); ... //adding data series to Linechart baseChart ... StackChart chart = new StackChart(baseChart); //returns StackPane with LineChart-s on it borderPane.setCenter(chart); root.getChildren().add(borderPane); return...

Sencha ExtJS: How do I prevent the cursor from leaving the current position in a phone number field upon edit?

Cursor automatically moves to the end of the phone number after 1 backspace move, it should remain in parentheses because the user could just want to edit the area code. (CODE AND IMAGES INCLUDED...scratch that, don't have 10 rep to post pictures, :/) Here is the code for the text...

Swift - Get keyboard input as the user is typing

I have an app in swift, where the texfield is located at the bottom of the screen, and when the user tries to type anything, the keyboard covers the textfield, so the user is unable to see what he/she is typing. To solve this, I would like to get the...

How Vaadin translates &Address to Alt+A using shortcut by a shorthand notation in AbstractField.FocusShortcut?

reading this page of the Book of Vaadin: https://vaadin.com/book/vaadin7/-/page/advanced.shortcuts.html You can also specify the shortcut by a shorthand notation, where the shortcut key is indicated with an ampersand (&). // A field with Alt+A bound to it, using shorthand notation TextField address = new TextField("Address (Alt+A)"); address.addShortcutListener( new AbstractField.FocusShortcut(address, "&Address"));...

JavaFX TextField causes NullPointerException

I am using a Button with an event to control the input of a user, but I am having trouble checking whether or not the TextField is empty. The TextField and Button are declared before the button event, like TextField svar = new TextField(); Button submitB = new Button("submit"); This...

Section Names In Table Views

How can I take a text of textfield, and make it as name of a section in a tableview? I want to do this in Swift and Xcode 6. Thank you very much.

Function not running when return pressed

I have a textfield, when something is typed in the textfield and "return" on the keyboard is pressed, the keyboard should hide. But it doesn't.. Here is the code I am using: import UIKit class EditTableViewController: UITableViewController, UITextFieldDelegate { var product: Product? @IBOutlet weak var productImageView: UIImageView! @IBOutlet weak var...

Cannot see the whole information from my database in a text field if i have a space in my text

I have problem in my site, to be more specific in my edit pages and especially in my edit textfields it does not shows the whole information in the textfields. As you can see in the images, in the text fields it does not shows the whole information. I want...

set value textfield from another viewcontroller

i edited my question , because set textfield maybe can't be simple, need references so this is my code, but still have issue : this code for TableViewController : import UIKit protocol PaymentSelectionDelegate{ func userDidSelectPayment(title: NSString?) } class PopPaymentTableViewController: UITableViewController { var delegate : PaymentSelectionDelegate! override func viewDidLoad() { super.viewDidLoad()...

Text starts from right side of the textfield in extjs

I wish that when a person starts typing in the textfield the text is populated from the right side. Think of it as right-justified. Is there a way to do this ?

focusing a text field in swift

I have 4 textfields on a register screen and i have it set up so that when the user presses next on each text field, the next text field is focused. Code below: func textFieldShouldReturn(textField: UITextField) -> Bool { if (textField == self.fNameField) { textField.resignFirstResponder() self.sNameField.becomeFirstResponder() } else if (textField...

Comma Automatically Being Added to TextField in Swift

I'm working on a status bar application. Currently all I have is a drop down menu that either quits the app or opens a preferences window. There is a textfield in the window that will be for a number value. While testing I noticed that when I used .orderOut to...

JFrame/JPanel refreshing and text fields

I'm trying to switch between displaying different JPanels in BorderLayout.CENTER in a JFrame. The JPanels each contain a JTextField and a JTextPane. Calling revalidate() and repaint() on the JFrame, I get a very strange result: the first time I switch to secondPanel by clicking secondButton, everything works as expected. Then...

Java JTextfield gives me only null data

I made a Mainmenu JFrame which can generate 4 different new frame represents each menu. Mainmenu frame was works fine. but I found that it could't get text from new frame textfield. here is error report and source code. please let me know how to fix it. import java.awt.BorderLayout; import...

User Cannot Enter Text, Index Out Of Bounds Exception

My code runs but when the user inputs text into the text field I am getting an Out Of Bounds Exception. I think it has something to do with this line of code where I give the empty box a value: int express = (str != null && !"".equals(str)) ?...

ios/xcode/objective c: Capture last keystroke in textfield

I have a method to enable the save button that I want to fire when the user meets several conditions, for example, username is at least 4 characters. To test these conditions I need to check with every keystroke. What is best touch event (through storyboard) to capture this? Have...

Is it possible to set different colors for different lines in a javafx textField/Area?

I know that you can set a color of a whole textArea/Field by setting the style of the node to be -fx-text-fill: red; but is there a way to set the color of one single line instead of all of the lines while still keeping the textArea/Field editable?

Validation of text fields and contact no text field

I have a JFrame consisting of some text fields (10) and a TextArea. I want to validate all the text fields and see if they are not empty and also check if a 10 digit contact no is entered in one of the text field. After checking the text fields,...

ComboBox with TextField

I would like to offer my user the choice between one of the predefined enums or an inputted int when using a ComboBox. I can't figure out why the text in the TextField keeps dissapearing. IndexOutBoundsException out of nowhere when using the ComboBox After selecting the TextField for the first...

Django: show newlines from admin site?

This is probably very simple. My database objects have a TextField. Now, when I add the contents of the TextFields to an html paragraph, there are no new lines. How can I make Django show those newlines? Thank you!

How to display TextField at the bottom of the screen

I want to display a TextField at the bottom of the screen in QML for SailfishOS. I attempted multiple tries but the TextField is always at the top of the screen. import QtQuick 2.0 import Sailfish.Silica 1.0 ApplicationWindow { id: screen anchors.fill: parent Item { width: parent.width; anchors.bottom: screen.bottom TextField...

a web application having three textbox under one Label “Full Name”.

textbox "First Name","Middle Name","Last Name" under Label "Full Name" i want to specify Label and textbox......how to query? I am using SQL Server Management Studio. if I do this: create table FullName(FName,MName,LName) values (' ',' ',' ') is this right?...

Can't type in text fields everywhere

I was working on a client site but found a problem that text fields are locked or can't type in it, just looking good means blinking normally if you click on text fields (but can't type). A simple query but not looks like a simple one to me!...

TextField formatting (padding) issue in Titanium Android

I am facing the issue of formatting a simple textfield in Titanium Android. Problem : I am not able to view the text field input value that I enter. If I print the logs its getting entered but not visible. In some devices I get cut-off text. Below is my...

replace text in textField with object name - Pymel

I've realized that there were similar questions located here: textfield query and prefix replacing and here: Python - Change the textField after browsing - MAYA However, these do not address the issue if you have two definitions and need the text in the textField to be queried (actually CHANGE the...

Assign the value from a text field into an int variable to do some math with other variables and then return it?

The code showing here assigns the value of an variables to the text field I want to do the opposite of that. _Initial.text = [NSString stringWithFormat:@"%f", init]; The opposite of the code above. Please help...

how to have default value for a text field only for new form in rails? iam using :value => “0”.but in edit form also iam getting '0' value

How to have default value for a text field only for new form in rails? I am using :value => "0" in form partial. But the problem is though I have a value in database, I am getting 0 in edit form. actually in new form for a text field...

Resize textField Based On Content

How can a textField be resized based on content while using auto-layout in an iOS application written in Swift? The text field will resize as necessary to fit its content when the view loads as well as while the user is typing. Ideally, the text field would stop resizing at...

Different borders on each side of a TextField

How can I change a textfields borders color in a way that two vertical borders have a same color and two horizontal borders have a same color using CSS? Is there any way to make four border lines have four different color? Thanks...