Generate input text fields dynamically on clicking a image with adf??
Is it possible to generate input text fields dynamically on clicking a image with adf??
The functionality to add and remove text field from UI with ADF??
Yes, you can dynamically add components to a page.
[url http://www.nearinfinity.com/blogs/michael_bevels/dynamic_forms_using_jsf.html]Here is an example - it demonstrates with ICE Faces components, but the concept is the same for any type of component, including ADF
John
Similar Messages
-
Generating input textfields on clicking image with adf
Is it possible to generate input text fields dynamically on clicking a image with adf??
The functionality to add and remove text field from UI with ADF??
Edited by: 897462 on Nov 16, 2011 12:16 AMthanks for ur reply....my other question is
Is it possible to generate input text fields dynamically on clicking a image with adf??
The functionality to add and remove text field from UI with ADF?? -
Hi,
public void addInputTextListener(ActionEvent actionEvent)
UIComponent button = (UIComponent)actionEvent.getSource();
RichPanelGroupLayout pgl = (RichPanelGroupLayout)button.getParent();
List<UIComponent> children = pgl.getChildren();
RichInputText it = new RichInputText();
it.setLabel("New IPT "+(children.size()+1));
children.add(it);
AdfFacesContext.getCurrentInstance().addPartialTarget(pgl);
I had got this code to generate input text field dynamically... i had got a reply from one of the user,the message which i m not able to access.
this code is throwing an error saying that CANNOT FIND METHOD "getSource();"........... in the line 4. i'm using 11.1.1.5.0 jdev. Can someone help me out in resolving this.This seems to be more a Java issue, than anything related to WebCenter, correct?
Question 1: you write that
this code is throwing an error saying that CANNOT FIND METHOD "getSource();"Where does the error appear? In JDev when you try to compile? If so, that it simply tells you that the class ActionEvent does not contain a method "getSource()", which leads to
Question 2: where does the class ActionEvent come from?
If it is the standard java.awt.event.ActionEvent, it should contain it. I'd guess that you just linked the name ActionEvent to the class with the same name, but from a different package. (If so, fix the import section.) -
Subscript & Superscript in dynamic and input text field in Flash
Yes, <sub> & <sup> tags are not supported by
Flash but you can
use Subscript & Superscript in dynamic and input text
field in Flash:
Download & install Subscript & Superscript fonts
from
http://www.subscriptfont.com
or
http://www.superscriptfont.com
You will need to restart Flash software after installed
fonts.
Create a dynamic text field with Arial font embeded. Set the
HTML property to true.
Create a dynamic text field with Subscript font embeded.
Create a dynamic text field with Superscript font embeded.
Use HTML tag to set text to subscript or superscript like
below:
Some text<font face="Superscript">©</font>
If you are using ActionScript to test the htmlText, use
script like below:
my_txt.htmlText = "Some text<font
face='Superscript'>TM</font>";
They are better than CG since it goes lower than the baseline
and it's real subscript..Hi Nirnalatha,
I have newly joined this forum and while going through the
posts I came across your post which I thought I could help out. But
I think I am too late for the reply.
I am also into Flashlite development couple of months from
now. Coming to your questions:
1. Textbox problem: I am surprised to know that E70 mobiles
(Device central list has E70-1 only) does not show input text box
when cursor is in input box. Anyways its a good thing that you dont
get an additonal input box. Like all J2ME applications you will be
able to type the text inline. Infact we had reverse problem where I
was told to create inline edit input box instead of flashlite input
box. I think this is the mobile setting. Check the device features
in the Adobe Device Central under Flash - Standalone player - Text
and Fonts features. It will be mentioned whether inline text is
allowed or not.
2. Soft keys issues: You need to use
fscommand2("SetSoftKeys", "Previous", "Next");
and use a key listener in order to override the Mobile
Softkey commands. Check out the flashlite help which clearly
explains this.
Hope I have given youa way to solve ur problem. -
Changing the cursor position in an input text field and Removing leading numeric zeros
Flash8 - AS2
It's good to be back after all these years and thanks for the faithfull folks like kglad, Ned Murphy, Rothrock and all the others who give so much of themselves to make this forum a success!
My Problem:
I have an input text field that is named in the properties box as 'numberOfKids'.
When the program is executed, and a delete or backspace is pressed the input textfield goes blank
and any calculations that use 'numberOfKids' shows NaN.
I have trapped the NaN and undefined so that a numeric 0 shows up instead of a blank.
There are two problems:
First problem:
The cursor is to the left of the zero, so the first number inputted by the user is 10x larger than what they want. 0 becomes 10.
Question: How do I get the cursor to move to the right of the 0?
Second Problem:
When I manually move the cursor to the right of the 0 and input a number, say 4, it shows up as 04.
Question 2: How do I delete the leading numeric zero in the input textfield?
Thanks for the help.
Here's the code I am using:
calculateChildWeight = function () {
if (isNaN(numberOfKids)) {
numberOfKids = 0;
if ((numberOfKids) == undefined) {
numberOfKids = 0;
if (numberOfKids>=0 && numberOfKids<=137) {
numberOfKids = numberOfKids;
} else {
numberOfKids = 0;
if (isNaN(adjustedChildWeight)) {
adjustedChildWeight = 0;
if ((adjustedChildWeight)=undefined) {
adjustedChildWeight = 0;
adjustedChildWeight = Number(numberOfKids*(-100));
//numberOfKids.setSelection(numberOfKids.length, numberOfKids.length);
//if (numberOfKids.length=2 && numberOfKids<10) {
// remove the first character or leading zero
// numberOfKids = numberOfKids;Thanks Rothrock for being so patient.
I'm lost!
I go back to a brand new flash file to try and implement the textfields as a stand alone test document. I have lost the concept I think.
I created on the stage of a blank .fla file 4 text fields, 2 input and 2 dynamic. I gave them an instance name in the properties box. I use this instance name.text to find the value of the field. I use the parseInt to put that value into a numeric variable for calculation. The results are put to the appropriate textfield.
All seems to work except one of my input text fields. I use the value of this field to calculate:
revisedValue = parseInt(numberOfKids.text);
revisedValue = revisedValue*(-100);
The problem now is that if the numberic '2' is inputted into numberOfKids, numberOfKids.text shows up as 200 and a trace shows up as '2NaN'.
Flash is logical and consistant, I must conform to it but I'm in the dark.
(( Concerning the forum: If I click on helpful, which your posts have been in directing me, does that blank out the possibility of selecting the correct answer in the future???)) -
How Can i send the data entered in Input text fields to e-mail?
Iam Jennifer, Iam having a doubt in Flash, I hope that you
are going to solve my problem, Iam taking 3 Static text fields as
Name, Age and Country and besides each and every static text fields
i have taken 3 input text fields with different instance names,
when i enter my Name, Age and Country details in the input text
fields and after entering those details if user clicks the submit
button the data should be send to some mail address, is it possible
Im not so good at action script, but i hope that any one can
help me...
Iam attaching the action script code also, please find the
attachment below, the actions are given to button.
Attach Code
Btn.onPress = function ()
mail_lv = new LoadVars();
mail_lv.dummy1 = "";
mail_lv.subject = "Details";
mail_lv.message = "hi";
mail_lv.username = "name_txt".text;
mail_lv.age = "age_txt".text;
mail_lv.country = "country_txt".text;
mail_lv.onLoad = function ()
trace("Sent successfully...");
trace("mail_lv.subject = " + mail_lv.subject);
trace("mail_lv.message = " + mail_lv.message);
mail_lv.send("mailto:[email protected]", "_blank");The names of your variables, "name_txt", for instance, should
NOT have quotes around them. Use:
mail_lv.username = name_txt.text;
mail_lv.age = age_txt.text;
mail_lv.country = country_txt.text; -
How can i validate current row input text field like required.
Hi All,
jdev 11.1.2.1.0
in my use case i have drag drop one viewobject as a adf table. and in table i have also add one extra input text field which is not based on
vo.
now i want to validate current row input text field not null when i commit row.
but when i using required property true. it worked for all row in table. problem is that i want only current row input text field validate not all
thanks,
ManishWhen the user tries commit the data by clicking on the button -- For that button, have the logic in the actionlistener method to check if the additional input field is NULL or NOT.
If it is NULL, show an error message using FacesContext.addMessage() API.
Thanks,
Navaneeth -
How to add comma and dollar sign that places automatically in input text field
I have this ROI calculator which has several text input field
on frame one with calculate and reset buttons. When a user enters
numerical values in the text field, and jumping to the next field,
I want the input text filed be updated with dollar sign and with
comma.
Next when they hit "ENTER" key or click "Calculate ROI"
button, all the input text fields on frame 2 as a result of
calculations be updated with dollar sign and comma. I also need
that once the comma sign is assigned then it would not add any more
even if user presses the button. Can someone help me in
this?If you want to Set the Comma when you Switch to next Text
Field
Use onKillFocus / onSetFocus Functions.
to restrict multiple comma, Before Adding comma use
myText.text =
myText.text.split(",").join("").split("$").join("");
So this will give you the value without Comma and Dollar
symbol, Now add the Comma and dollar.
or you need to use a Flag for onChange Event. -
Emailing data found in input text fields
Hi,
I have a simple form that users fill in various "input" text
fields like "Name", "Email", etc... now all I want is when the
click on the "send" button, it should automatically send an e-mail
to "info@...".
I got it to enter the proper recipient email address and
subject but there's not content. What am I missing?
Thanks,
PhalconheartThanks for the prompt reply.
Just to clarify (programming is not my primary function...
far from it)
Yes, just opening the clients e-mail program and populating
it with all the variable info he's selected is fine.
so, in your code:
url ="mailto:[email protected]?subject=Message
Subject&body=First line of message.%0ASecond line." + "%0A" +
"Third line.";
1) what does the "%0A" do exactly?
2) do I simply replace where you wrote "First Line of
message" with the code "variables.item = itemChoice.text;"? and so
on and so forth?
Thanks,
Pat -
Calculations in input text fields
Hello,
I'm making an engineering game. Students need to input force
equations and to check the equation is right it has to add up to
zero. There are two input text fields, one the student sees with
the force values expressed in letters like HA, VA, and MA, and one
hidden field where the values are expressed as numbers. They also
input operators as part of the equation. I need to make it so when
they click a button to check if their equation is correct, the
contents of the text field are calculated to see if the equation
adds up to zero. I know you can express the contents as a number
with say Number (this.my_hidden_text.text), but how do I get the
operators in the equation, which are +, -, *, /, (, ), and ^ to
mean something and do what they're supposed to?
Any assistance would be most welcome.
Thank you for your time,
Beatie3Thank you for your quick response. Would you mind explaining
more how to use the strings method to find the operators, please?
It's a bit messy but my code currently looks like this:
stop();
//hide stuff
this.tickb._visible = false;
this.crossb._visible = false;
//declare the variables
var check1:Number = parseInt(display_secret.text);
var display1 = "";
var display_secret = "";
//function for the calculation
function onCalculate() {
if(this.display_secret = 0){
this._parent.tickb._visible = true;
this._parent.crossb._visible = false;
} else {
this._parent.crossb._visible = true;
this._parent.tickb._visible = false;
check02_btn.onRelease = function():Void {
trace(display1);
trace(check1);
if(check1 == 0){
this._parent.tickb._visible = true;
this._parent.crossb._visible = false;
} else {
this._parent.crossb._visible = true;
this._parent.tickb._visible = false;
//load external images
pic04_container.loadMovie("fig_3_1a.gif");
//takes you back to the previous scene
back02_btn.onRelease = function() {
gotoAndStop("Scene 2", 1);
//Takes you home
home02_btn.onRelease = function() {
gotoAndStop("Scene 1", 1);
//moves to the next scene
next02_btn.onRelease = function() {
gotoAndStop("Scene 3a", 1);
//calculator buttons workings
left_btn.onRelease = function() {
display1 = display1+ "(";
display_secret = display_secret + "(";
plus_btn.onRelease = function() {
display1 = display1+"+";
display_secret = display_secret +"+";
times_btn.onRelease = function() {
display1 = display1+"*";
display_secret = display_secret +"*";
right_btn.onRelease = function() {
display1 = display1+")";
display_secret = display_secret +")";
minus_btn.onRelease = function() {
display1 = display1+"-";
display_secret = display_secret +"-";
peek_btn.onRelease = function() {
display1 = display1+"^";
display_secret = display_secret +"^";
slash_btn.onRelease = function() {
display1 = display1+"/";
display_secret = display_secret +"/";
ha_btn.onRelease = function() {
display1 = display1+"HA";
display_secret = display_secret +"108";
va_btn.onRelease = function() {
display1 = display1+"VA";
display_secret = display_secret +"0";
ma_btn.onRelease = function() {
display1 = display1+"MA";
display_secret = display_secret +"1296";
c_btn.onRelease = function() {
display1 = "";
display_secret = "";
vd_btn.onRelease = function() {
display1 = display1+"VD";
display_secret = display_secret +"0";
w_btn.onRelease = function() {
display1 = display1+"w";
display_secret = display_secret +"12";
a_btn.onRelease = function() {
display1 = display1+"a";
display_secret = display_secret +"18";
b_btn.onRelease = function() {
display1 = display1+"b";
display_secret = display_secret +"9";
thank you very much for your help,
Beatie3 -
Putting cursor in input text field
I'm trying to put the cursor in an input text field as soon
as I get to a certain frame. I'm using Selection.setFocus() but it
does not seem to work. It returns true but I still can't see my
cursor and I can't type to the field until I click in it or tab to
it. Does anyone have any ideas what I'm neglecting to do?mmmm just did that, I don't get the carret, but I can type
just to be pedantic you did pass the TextField instance ie
Selection.setFocus(myTextField )? -
Error checking input text fields.
Hi
Just wondering where I find a list of what can be error checked in input text fields?
I'm looking for things like...
- checking that letters and not numbers are entered
- checking that an entered number is in a certain range
etc...
Thanks guys
ShaunTo restrict input for a text field, use the following AS3 codes:
myInput.restrict = "A-Z, a-z, ., ,'"; //myInput is the instance name of your text area
To check the range of the numbers, use the following code:
myInput.restrict = "0-9";
myInput.maxChars = 3;
myBtn.addEventListener(MouseEvent.CLICK, chk);
function chk(e:MouseEvent):void
var myString:String = myInput.text;
var i:Number = Number(myString); //Converting the string to a number variable
var max:Number = 100; //Maximum range
var min:Number = 30; //Minimum range
if (i < max && i > min) //Condition to indicate the range
trace("Within range");
else
trace("Out of range");
Hope this helps. -
HtmlText in input text field?
Hi
Is it possible to have input text fields respond to htmlText? I'm sure I've done it before.
Although the following code displays the string correctly, there is no color formatting displayed:
e.target.htmlText = noColour + "<font color='0x00FF00'>"+ colorText +"</font>";
I've clicked the button in the field's properties (Flash Pro) to render as htmlText.
Cheers for having a look.Never mind - I had the wrong syntax.
Should be '#00FF00', not '0x00FF00' when it's within quotes. -
This is about fill in the blanks in flash 8 as2. In this i used input text fields and three buttons.In first frame i used multiple input text fields and a submit button. After filling all the blanks we click on submit button then in the second frame we will show the result like if the blank is correct it should change the color to green and if it is wrong it should change to red.and in the frame i have check button when we click on it will display all the answers. And when we click on analyse button we have to display the answer which the user types and the correct answers.
And my problem is when we click on submit there is no difference in the blanks color all are in black only and i have assigned red to the wrong answer and green to the correct answer.
and script on submit button is
on (release) {
gotoAndStop("Bl1");
if ((_root.Bl.txt1 == "abc1") && (_root.Bl.txt2 == "abc2") && (_root.Bl.txt3 == "abc3") && (_root.Bl.txt4 == "abc4")) {
_root.Bl.txt1.textColor = 0x006600;
_root.Bl.txt2.textColor = 0x006600;
_root.Bl.txt3.textColor = 0x006600;
_root.Bl.txt4.textColor = 0x006600;
} else {
_root.Bl.txt1.textColor = 0xFF0000;
_root.Bl.txt2.textColor = 0xFF0000;
_root.Bl.txt3.textColor = 0xFF0000;
_root.Bl.txt4.textColor = 0xFF0000;
where "Bl" is the movie clip name and "txt1","txt2","txt3","txt4" are the var names for input text fields
Please help........You are concatenating the conditions it will only work if all are true or all are false
on (release)
gotoAndStop("Bl1");
if (_root.Bl.txt1 == "abc1")
_root.Bl.txt1.textColor = 0x006600;
else
_root.Bl.txt1.textColor = 0xFF0000;
if (_root.Bl.txt2 == "abc2")
_root.Bl.txt2.textColor = 0x006600;
else
_root.Bl.txt2.textColor = 0xFF0000;
if (_root.Bl.txt3 == "abc3")
_root.Bl.txt3.textColor = 0x006600;
else
_root.Bl.txt3.textColor = 0xFF0000;
if (_root.Bl.txt4 == "abc4")
_root.Bl.txt4.textColor = 0x006600;
else
_root.Bl.txt4.textColor = 0xFF0000;
You can also run a for loop for optimizing the code further.
www.darshanrane.com -
Paging a data table with input text fields
I've created a datatable with input text fields so that contents can be edited. I have 'save' and 'cancel' buttons on the page so that changes can be saved or abandoned. That seems to work fine.
However, I have a problem with paging. If I modify an input text field, page to the next page in the datatable and then page back, the modified input text field reverts to the original entry in the database. Does anyone know how I can preserve this change (without issuing a commit) until the user clicks on the save button?
Here is a snippet of jsp with datatable.
<h:dataTable binding="#{DocTypeDetail.doctypeMetadataTable}" headerClass="list-header" id="doctypeMetadataTable"
rowClasses="list-row-even,list-row-odd" rows="5" style="left: 240px; top: 312px; position: absolute"
value="#{DocTypeDetail.doctypeMetadataTableModel}" var="currentRow">
<h:column binding="#{DocTypeDetail.column2}" id="column2">
<h:inputText binding="#{DocTypeDetail.textField1}" id="textField1" value="#{currentRow['name']}"/>
<f:facet name="header">
<h:outputText binding="#{DocTypeDetail.outputText5}" id="outputText5" value="Name"/>
</f:facet>
</h:column>
<h:column binding="#{DocTypeDetail.column3}" id="column3">
<h:inputText binding="#{DocTypeDetail.textField2}" id="textField2" value="#{currentRow['value']}"/>
<f:facet name="header">
<h:outputText binding="#{DocTypeDetail.outputText8}" id="outputText8" value="Value"/>
</f:facet>
</h:column>
<f:facet name="header"/>
<f:facet name="header"/>
<f:facet name="header"/>
<f:facet name="header"/>
<f:facet name="header"/>
<f:facet name="header"/>
<f:facet name="header"/>
<f:facet name="header"/>
<f:facet name="header"/>
<f:facet name="header">
<h:panelGroup binding="#{DocTypeDetail.groupPanel1}" id="groupPanel1" style="display: block; text-align: center" styleClass="list-paging-header">
<h:commandButton action="#{DocTypeDetail.doctypeMetadataTable_firstPageAction}"
binding="#{DocTypeDetail.doctypeMetadataTableHeaderFirstButton}" id="doctypeMetadataTableHeaderFirstButton"
image="resources/paging_first.gif" immediate="true"/>
<h:commandButton action="#{DocTypeDetail.doctypeMetadataTable_previousPageAction}"
binding="#{DocTypeDetail.doctypeMetadataTableHeaderPreviousButton}" id="doctypeMetadataTableHeaderPreviousButton"
image="resources/paging_previous.gif" immediate="true"/>
<h:commandButton action="#{DocTypeDetail.doctypeMetadataTable_nextPageAction}"
binding="#{DocTypeDetail.doctypeMetadataTableHeaderNextButton}" id="doctypeMetadataTableHeaderNextButton"
image="resources/paging_next.gif" immediate="true"/>
<h:commandButton action="#{DocTypeDetail.doctypeMetadataTable_lastPageAction}"
binding="#{DocTypeDetail.doctypeMetadataTableHeaderLastButton}" id="doctypeMetadataTableHeaderLastButton"
image="resources/paging_last.gif" immediate="true"/>
</h:panelGroup>
</f:facet>
</h:dataTable>I know by now you must have figured it out. If not you might want to try keeping the backing bean in session instead of request scope.
Hope that helps,
HeMan
Maybe you are looking for
-
I get the notice that there is a new update and if I want to restart Firefox. I click restart and then i get a message that the update fails and it will now download the entire file (?). I allow it to do this and then click restart again but get an e
-
How to print in black and white only?
Hello, I have HP Color Laserjet cp1515n. I downloaded and installed "HP_CP1510_series_full_solution_EMEA3-v4.0" from HP's website for the driver. When printing (in the properties for the printer) there is no option whether to print in black and whit
-
Hello everybody, I am quite new in working with the NWDI, so probably my question is quite easy to answer. Is it possible to reuse a SC that is changed in one track with this changes in another track? E.g.: I have a track TRACK_X where I am developin
-
Read System.in from JTextField
hi all, I have found this code that redirect System.in and System.out on JTextArea: package xyzGui; import javax.swing.JOptionPane; import java.awt.*; import java.awt.event.*; import java.io.*; import javax.swing.*; import javax.swing.event.*; import
-
ANN: BPEL PM 10.1.2 Limited Preview 1
Hi All, We are looking for a few people to help us kick the tires and provide feedback on BPEL PM 10.1.2 before the preview hits OTN. If you are interested, please send us an email to [email protected] with BPEL PM 10.1.2 preview in the email subject