Compare two input text in adf
Hi
i used the Build JDEVADF_11.1.1.4.0
I want to make compare validation between two input text Are equal or not . same Thing when i create new email i must enter the password and re enter password if not equal he give me message
Hi,
for a validation String, you can put autosubmit=true and in the valuechangeListener make the comparation.
How to compare two Strings in java? http://stackoverflow.com/questions/513832/how-do-i-compare-strings-in-java
Similar Messages
-
Hi,
I've two questions below,
1. I want to create an ADF input text , which looks like a normal textbox but user cannot input anything in it(same as <input type="text" readonly="true">) . Is there any way to have an input text like that by using adf component? ( I do not want to use disabled="true" because it looks very different and cannot add an error message to that component if it's disabled)
2. I know JSF input text can work as required in #1 by using <h:inputText id="it4" readonly=true/>. But if I use JSF input text , its css style looks very different to other af:inputText on the pages. Is there any way to apply ADF CSS style class to <h:inputText id="it4" readonly=true/>
Thank you for your help!Hi Ajay,
what Sireesha trying to say don't wake up the thread which are slumbering.
Reason, Besides you wont get any chances reply in this thread.some one may ignore it ah old one. so better to avoid that get your answer in faster means please be clear with your question. then there you may hook up this thread. you can say i referred this thread. but no luck.
Thanks. -
Editing particular pattern in an input text in ADF
Hi,
I have a requirement in ADF like the user should be able to editable only a particular pattern.
Example:
Name: Chandramohan
Hobbies: My hobbies are {}, {}, {}
In the above hobbies filed( say textarea or input text), the user should be able to replace only the {} with some text, not other text like 'My hobbies are'.
Kindly suggest some ideas.
Edited by: 875628 on Jul 27, 2011 11:29 PM
Edited by: 875628 on Jul 27, 2011 11:30 PMHi,
Have you tried this with javascript?
Here is a basic solution (which takes care only for the first {} - you can enhance it to fulfill your requirement).
<af:inputText label="Label 1" id="it1" value="My hobbies are {}, {}, {}" clientComponent="true" >
<af:clientListener type="keyPress" method="validateValue" />
</af:inputText>
<af:resource type="javascript">
function validateValue(evt){
var inputTxt=document.getElementById('it1::content');
var startPos = inputTxt.value.indexOf("{");
var endPos = inputTxt.value.indexOf("}");
var cursorPos = inputTxt.selectionStart;
if (cursorPos < startPos || cursorPos > endPos) {
alert("Cannot Edit");
evt.cancel();
</af:resource>-Arun -
How to compare two input fields
Hi i have two input filds with labels E mail and confirmmail
in both the input flds same value should be enter ,if data in second input field is different from first input field an error should be displayed,can u please expalin me with code
thanks
kishoreHi,
use as follows
String emailId1 = wdContext.currentContextElement().getID1();
String emailId2 = wdContext.currentContextElement().getID2();
//remove the following condition if not needed ,
if( (emailId1 != null && !emailId1.trim().equals("")) && ( emailId2 != null && !emailId2.trim().equals("")))
int x = emailId1.compareTo(emailId2);
if( x == 0)
//Both are same
else
//Do the else part
Regards
Ayyapparaj -
Left Align for the input text in ADF
Hi,
When I drag and drop the data control in my jsp page, Automatically all the fields are aligned at the center of the page. But I want to align the input text fields to the left of the page. I have only valign which will give me top, bottom and center options.
Is there any property which will help me in aligning it left?
Please help me.
Thanks,
Haripriya.SI think you forgot to close the rowLayout tag.
<afh:rowLayout binding="#{backing_test.rowLayout1}" id="rowLayout1" halign="left">
<af:panelForm binding="#{backing_test.panelForm1}" id="panelForm1">
<af:inputText value="#{bindings.direccion.inputValue}"
label="#{bindings.direccion.label}"
columns="#{bindings.direccion.displayWidth}"
id="inputText1">
</af:inputText>
</af:panelForm>
</afh:rowLayout> -
[ADF Faces] set cursor position to the first column input text in ADF table
How do i set the cursor position to the first column input text when i Insert a blank row?
My idea is to implement using javascript. document.setfocus() but how do i do it from the backing bean code? or how do i install custom js to call document.setfocus()?
any ideas?
Message was edited by:
user450391Did you try by iterating the selected row?
Bind the table with the managed bean and then try with below code:
RichTable empTable;
RowKeySet selectedEmps = getEmpTable().getSelectedRowKeys();
Iterator selectedEmpIter = selectedEmps.iterator();
DCBindingContainer bindings = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
DCIteratorBinding empIter = bindings.findIteratorBinding("EmpView1Iterator");
RowSetIterator empRSIter = empIter.getRowSetIterator();
while(selectedEmpIter.hasNext()){
Key key = (Key)((List)selectedEmpIter.next()).get(0);
Row currentRow = empRSIter.getRow(key);
System.out.println(currentRow.getAttribute("Ename")); -
Hi All,
I have two inputText box in JSF page one is for minValue and other is for maxValue. My problem is like this:
If i fill 20 in minValue box than maxValue should be >= to minValue. If not then an error message should be display on JSF page, after insertion of value in maxValue box.
Please suggest me, what options are avaiable in JSF to solve this kind of comparision. Please explain with example(s).Likely you misunderstood the valueChangeListener / ValueChangeEvent.
To issue a ValueChangeEvent which will be used by valueChangeListener the client still have to submit the form to the server. Generally you see this back in selectboxes using the Javascript submit() function in the onchange attribute. Yes, that one is really a Javascript function. But this is only intented submit the form automatically on change of the value so that the client does not need to press the submit button. Finally, once the request is arrived into the server, the ValueChangeEvent will be created and fired. And that is certainly not clientside.
You may find this article interesting to get more insights in the JSF lifecycle:
http://balusc.xs4all.nl/srv/dev-jep-djl.html -
Comparing data in the database with the input text
hi there i have problem with the comparing data in the database with the input text. here is the piece of code of mine:
//declaration
datasourcedb.connect();
String stcode = req.getParameter("txtCode");
ResultSet rs = null;
String action = req.getParameter("action");
ResultSet portquery = null;
if (action.equals("SELL"))
-->portquery = datasourcedb.query("SELECT stockcode FROM portfolio where stockcode =\'"+ stcode + "\'");
-->portquery.next();
-->if((portquery.wasNull()) == true)
disp = req.getRequestDispatcher("error.jsp"); }
else */
Status = "Sell";
datasourcedb.close();
with the code that i marked with --> it doesnt work since i have to compare the input text stcode with stockcode in the db. could anyone tell me how to compare it?
regards
virginiai have try to change into this code:
if (action.equals("SELL"))
portquery = datasourcedb.query("SELECT distinct stockcode FROM portfolio where stockcode =\'"+ stcode + "\' + and userName = \'"+ user + "\'");
if(portquery.next()) {
Status = "Sell";}
else {
disp = req.getRequestDispatcher("error.jsp");
but so far the coding doesnt give any result.... could anyone help me? since the coding does not reach status n the disp -
Validation on Disabled input text
it seems <af:validateRegExp cannot work inside a <af:inputText disabled='true'>, is there any easy way to have this client side validation on a disabled input text in ADF?
I am wondering if you could create a transient attribute in the EO that displays the data from the attribute. The "real" attribute would not be disabled, and would then validate.
You then display the transient attribute on the form, and it would be non-update-able since it is transient.
You could then place entity level validation on the entity (instead of on the attribute) since it is based on a second value in your form. Haven't tested it, but it would seem to be a solution.
Stuart -
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 -
Copy the values input in input text 1 to input text 2 using value change listener
Hello ,
I have two input texts :
input text 1 & input text 2 .
I need to copy the values input in input text 1 to input text 2 .
How do I implement this using value change listener ?
I did the following steps :
1) I selected input text 1 and chose Value Change listener --> edit .
Typed a new bean & class name .
Which method name should I add ?
Any help please ?Hi,
Give any name to the method and bind the two input text to manged bean using bindings attribute of InputText. just follow the below given code
Ex:
test.java class
private RichInputText inputVal1;
private RichInputText inputVal2;
public Test() {
public void ValChange(ValueChangeEvent valueChangeEvent) {
// Add event code here...
inputVal2.setValue(inputVal1.getValue().toString());
public void setInputVal1(RichInputText inputVal1) {
this.inputVal1 = inputVal1;
public RichInputText getInputVal1() {
return inputVal1;
public void setInputVal2(RichInputText inputVal2) {
this.inputVal2 = inputVal2;
public RichInputText getInputVal2() {
return inputVal2;
test.jspx page
<af:inputText label="Label 1" id="it1" valueChangeListener="#{backingBeanScope.TestBean.ValChange}"
binding="#{backingBeanScope.TestBean.inputVal1}" autoSubmit="true"/>
<af:inputText label="Label 2" id="it2" binding="#{backingBeanScope.TestBean.inputVal2}"
partialTriggers="it1"/>
Thanks
nitesh -
Conditionally Show and Hide Input Text
JDev 11.1.1.5.0
I have two input texts PROFILE and SCORE.
SCORE is shown only if my value in PROFILE is E or F.
And if, it should be hidden once the PROFILE value is changed to some other value.
Also, please note SCORE field should be mandatory if the PROFILE value is E or F.
Here is the code what I tried so far:
<af:inputText value="#{bindings.Profile.inputValue}"
label="#{Resources.PROFIL}"
required="true"
columns="#{bindings.Profile.hints.displayWidth}"
maximumLength="1"
shortDesc="#{bindings.Profile.hints.tooltip}"
id="it94" autoSubmit="true">
<f:validator binding="#{bindings.PsamProfile.validator}"/>
</af:inputText>
<af:inputText value="#{bindings.Score.inputValue}"
label="#{Resources.SCORE}"
required="#{bindings.Profile.inputValue == 'E' or bindings.Profile.inputValue == 'F'}"
columns="#{bindings.Score.hints.displayWidth}"
maximumLength="#{bindings.Score.hints.precision}"
shortDesc="#{bindings.Score.hints.tooltip}"
id="it164"
visible="#{bindings.Profile.inputValue == 'E' or bindings.Profile.inputValue == 'F'}"
partialTriggers="it94"
contentStyle="text-align:left;"
autoSubmit="true">
<f:validator binding="#{bindings.Score.validator}"/>
<af:convertNumber groupingUsed="false"
pattern="#{bindings.Score.format}"/>
</af:inputText>
I have tried using a parent component and using rendered attribute for the SCORE field as explained in https://blogs.oracle.com/Didier/entry/only_rendered_adf_faces_compon, but it still didn't help.Forgot the PROBLEM part
PROBLEM is: If I change the PROFILE value to some other value than E or F, the SCORE field is not getting hidden as expected and in fact it is throwing a mandatory validation. -
Comparing two text files in a UNIX using shell programming
Hi All,
Sorry for posting a UNIX shell query on Database forums.
I want to compare two text files using shell programming. The two text files are actually Business Objects output extracted in a text format. The two output files are not in a tabular format and are no way similar in looking. I want to take one file e.g. file1 as an input file and compare each line of file1 with the other file e.g. file2. During comparison I want to extract the differences found in another file and if possible the similar data as well.
Below is how the files will look like
File 1:
BILL1000000 1111251 122222
RMG1A2 023425100000000010001 11135 102650111100
UHL1 *6999999* *454540001* Weekly *000*
0544424556895PS DATA 01MPS100000/03 MR A A PERTH UTL1234567893106923455053106900000010000005
File 2:
AUTO
APPLICATION=STARTPOINT
START
PROCESSING DATE=01012011
1598301270320099TEST C E 00000031615 123456
7854301276140499TES P 00000062943 234567
UHL1 *6999999* *454540001* Weekly *000*
5569931233333499/123456789 00000013396 345678
4471931233333499ER K J 00000031835123456789012456789
33652931233333499E J L 00000034729123456789012567890
45783123333349921/123456789 00000039080 678901
1452931233333499T R 00000040678123456789012789012
59689312333334994/987654321 00000048614 890123
4112931233333499/987654321 00000060631 901234
1236931217836899 K S 00000043704 012345
END
As you can see above the file are not at all matching except for one record UHL1, but its just an example. As an output I would like to have a third file containing all these records, highlighting the differences, and a fourth file where in only the matched records should get populated.
Please post any useful scripts related to the above scenario.
Many Thanks.
Edited by: 848265 on 06-Apr-2011 04:13Hi;
For your issue i suggest close your thread here as changing thread status to answere and move it to Forum Home » Linux which you can get more quick response
Regard
Helios -
How to get input text values from adf table - Urgent
Hi Friends,
This is my requirement. I designed customized master - detail - detail page. I customized the page in below format.
1. Master Data Field (Input text,etc) .
2. Detail in table format ( Rows are mapped to child table) and i given two buttons for to create row and delete row. I designed the table based on the example provided in forum for to create customized table. The input text component is mapped to the rows.
Now i want to retrieve all the data's entered in the rows. The table is mapped to child table. When i read the values from the table its showing null.
If any one faced this problem and fixed it, please send me the solution.
Thanks & Regards
VBDid you look into the valueChangeEvent?
It has oldValue and newValue attributes.
public void SaveMaterial(ValueChangeEvent valueChangeEvent) {
Object oldVal = valueChangeEvent.getOldValue();
Object newVal = valueChangeEvent.getNewValue();
// check if you see what you are looking for.....
getSelectedRow();
SaveMaterial(material);
}Timo -
Auto populate text fields with a trigger such as entering text into input fields in ADF
Hello all,
I am not able to auto populate text fields with a trigger such as entering text into input fields in ADF.
I tried AdfFacesContext.getCurrentInstance().addPartialTarget(val); in the back end using setter method of input text field.
its not working ..
is there any way to achieve it
Regards,
ShakirHi,
Always mention your JDev version.
The valueChangeListener would fire only when you set the autoSubmit property of the field to true. Can you elaborate your requirement? What do you mean by related data? Are you performing some sort of search?
If you want to get the value you entered on the field, just set autoSubmit to true and get the new value from the valueChangeListener. If your requirement is something like as and when you type, do something, you need to check out this approach :https://blogs.oracle.com/groundside/entry/auto_reduce_search_sample
-Arun
Maybe you are looking for
-
I have a band video that I want to edit. In iMove 09, I could clip to crop or add a transition or both without altering the audio. In iMovie 11, the audio lower or drops out when I clip for and use a transtion. Is there a setting to preven this?
-
Construct a Sql block using With Clause to improve the performance
I have got four diff parametrized cursor in my Pl/Sql Procedure. As the performance of the Procedure is very pathetic,so i have been asked to tune the Select statements used in those cursors. So I am trying to use the With Clause in order to club all
-
How to open a file in ZAV Application ?
HI All I create a Adobe reader application (version 9.4)which insert a PDF file in it. I want to make this application open , it could auto open this pdf file. I add a command line such "@SYSDRIVE\test.pdf" iin startup file. then I perform it to veri
-
Hi Friends , I am getting following dump . CALL_FUNCTION_NOT_FOUND "Check the last transports to the SAP System. Is the program "SAPMSSY1" currently being changed? If an enqueue/dequeue module is involved, is the activation of the lock object missing
-
Can't get my email with ios8 update
I Updated to ios8 and now keep getting the message connection to server failed when I try to get emails on ipad