How to refresh the input text value in backing bean
hi all
i want to know
how to refresh the input text value in backing bean?
i have tried this code ,but it doesnt work
public void click(ActionEvent actionEvent) {
tempConId.setValue("111111111111111");
AdfFacesContext.getCurrentInstance().addPartialTarget(tempConId);
sb know?
Edited by: Joe Zou on 2012-4-6 下午9:11
The code looks good.
Here is a sample based on your use-case:
InputTextSample.jspx:
<af:form id="f1">
<af:panelFormLayout id="pfl1">
<f:facet name="footer">
<af:commandButton text="Ok" id="cb1" partialSubmit="true"
actionListener="#{InputTextSampleBean.onClick}"/>
</f:facet>
<af:inputText label="InputText" id="it1"
binding="#{InputTextSampleBean.myInputText}"/>
</af:panelFormLayout>
</af:form>
InputTextSampleBean.java:
import javax.faces.event.ActionEvent;
import oracle.adf.view.rich.component.rich.input.RichInputText;
import oracle.adf.view.rich.context.AdfFacesContext;
public class InputTextSampleBean {
private RichInputText myInputText;
public InputTextSampleBean() {
public void setMyInputText(RichInputText myInputText) {
this.myInputText = myInputText;
public RichInputText getMyInputText() {
return myInputText;
public void onClick(ActionEvent actionEvent) {
this.myInputText.setValue("1234");
AdfFacesContext adfFacesContext = AdfFacesContext.getCurrentInstance();
adfFacesContext.addPartialTarget(this.myInputText);
}
Similar Messages
-
How to disply the input text box when the data in the table is empty
Hi,
I m using JDeveloper 11g 5.1.1.1 : How to display the Input text box when the data in the table is empty or by using the dual table.
Since there is no record in the table, screen is displying only the lable. not displying the Input text box.? Any property is there to enable?.
One more case i tried by using dual (eg Select '0' as name from dual) created one view object and dragged in the JSF screen as input combo box with list of values.
In this case also it is not displaying the combo box.Just displaying the Lable name and 0 only.
Regards
Bijesh KHi,
I didn,t get you.Could you please explain. I am not choosing the ADF table. Selecting and dragging ADF form only.
Regards
Bijesh K -
How to get the current JSF phase in backing bean?
How to get the current JSF phase in backing bean?
Edited by: jimmy6 on Nov 27, 2007 7:27 AMI am using phasetracker to trace it also.I want to know whether it is it render response phase. I know FacesContext.getCurrentInstance().getRenderResponse() work for normal jsf component but it will not work for qiupukit datatable. FacesContext.getCurrentInstance().getRenderResponse() will not return true in the following phase. Why?
[ INFO] 27-11-07 16:20:21 : BEFORE RENDER_RESPONSE(6) (http-80-Processor23)
I want the 'get' method of datatable being called in response phase to reduce the number of calling because i put the query in 'get' method there. Actually i still straggling with the best practice to code the datatable... -
Getting a value of an input text component in backing bean
I have created an input text component on a page where I will be entering a number, setting Autosubmit feature as true. ValueChangeListener property is set as #{test.displayTable} where displayTable is a method defined in test managed bean.
Now I know to fetch the value entered in input text component by creating a RichInputText variable in Advanced property.
But in case the Advanced property is blank, then how will I be able to retrieve the value of it? This is the code. I am not able to get the value entered in the component. I can't even find any getvalue method for it.
FacesContext facesContext = FacesContext.getCurrentInstance();
UIViewRoot root = facesContext.getViewRoot();
RichInputText inputText = (RichInputText) root.findComponent("it1"); // it1 is the id of the input text component
System.out.println("inputText: "+inputText);On using sop statement, this is the output which is getting generated, while I had entered 90.
inputText: RichInputText[UIXEditableFacesBeanImpl, id=it1]One more thing. Once the VO is getting refreshed, I am able to display an inline message saying that 'Table refreshed Successfully!' (refer the code)
But in case if the user doesn't enter anything, and press TAB button, I want to display an error message exactly besides the input text component, saying that 'Please Enter an Integer.' According to my understanding, if the user enters a null value then while casting string to Integer, it will throw an exception, so I will be writing the code in the catch part. Any suggestions?
public void displayTable(ValueChangeEvent valueChangeEvent) {
BindingContext bctx = BindingContext.getCurrent();
BindingContainer bindings = bctx.getCurrentBindingsEntry();
OperationBinding method = (OperationBinding)bindings.get("displayEmployeeTable");
try {
Integer getValue = Integer.valueOf(valueChangeEvent.getNewValue().toString());
System.out.println("getValue: " + getValue);
method.getParamsMap().put("deptId", getValue);
} catch (Exception e) {
method.execute();
FacesMessage message = new FacesMessage("Table refreshed Successfully!");
message.setSeverity(FacesMessage.SEVERITY_INFO);
FacesContext fc = FacesContext.getCurrentInstance();
fc.addMessage(null, message);
}Edited by: Sonull on Jan 12, 2013 3:56 PM -
How to read the input field value into ABAP variable?
Hi All,
i need a read the value of an input field into an ABAP variable,and i am doing this in the following way
lstring = request->get_form_field('myFlag').
here 'myFlag' is the input field name,but this is not returning me any value into lstring.
I have gone through the SDN and tried to do this.
could you please help me out to resolve this issue.
Thanks in Advance,
PraveenaDear Praveena
In which event are you putting this code. Place it in oninputprocessing event(Page with flow logic Model of coding). Then it will surely work.
Regards
Vijay.M -
How to get the application module instance in backing bean.
This is Ramesh, I am new to JDeveloper world.
In my current application I have change password screen which allows user to change there password.
Here this is a pop-up page. Here I don't have the view object and pagadef for this changepassword.jspx file.
My aim is to call the Application Module method which takes the user name, old password and new password.
In backing bean I am trying to call this method by using
MyProjAM obj = _binding.getDataControl().getApplicationModule(); //throw null pointer exception.
_binding is the object of DCBindingContainer.
( I have created the parameter called "binding" as my managed bean property and values as #{binding})
But the above line is throwing the NullPointerException.
Could you please help me to come out of this problem.
Thanks and Regards,
Ramesh Biradar.If your page has no page definition, then #{bindings} will be null during the request for that page.
If you need your page to invoke a data control method when you press a button, the simplest (and declarative) way is publish your AM method on the AM's client interface, then drop the method as a button from the data control palette onto your page. You don't even need a backing bean to accomplish this.
That said, you can refer to a data control in a backing bean using the expression #{data.[i]YourAppModuleNameDataControl.dataProvider}
So, assuming you have a helper method like this:
public static Object EL(String expression) {
FacesContext ctx = getFacesContext();
Application app = ctx.getApplication();
ValueBinding bind = app.createValueBinding(expression);
return bind.getValue(ctx);
}and assuming that your application module is named SRService
and assuming that you have correctly nominated any Application Module custom methods as being available to clients by selecting them on the "Client Interface" panel of the application module editor, then in a backing bean you can acquire an instance.
Then, the ADF design time will have automatically generated you a custom AM client interface named SRService and you can reference that service interface in your backing bean by using code like this:
SRService svc = (SRService)EL("#{data.SRService.dataProvider}");
svc.yourCustomMethod(your,args); -
How to get the short text values from F4 SEARCH HELP
Hi Friends,
My requirement is in Module -pool Screen Programming, i have Designed one field in a custom screen and provided a F4 search help to that field..
For eg the F4 help is displayed as below.
Value short text
1 A
2 B
3 C
4 D
5 E
6 F
7 G
When i select the first option (1) then value 1 appears in the field.
now i want the text relevant to the value 1 to appear by the side of the field.
Eg : 1 A (A should appear by the side of the value 1)
How do i achieve it?
Kindly help me.
Regards,
K.S.Kannan.
Edited by: kannan ks on Dec 8, 2008 4:05 PMhi
1) place a field adjacent to your value field on which F4 is operated
so now you will have 2 fields.
iam considering it as for ex: field1 & field2
2)
BOLD one is import in FM call
CLEAR: t_dynpfld_mapping,
e_dynpfld_mapping.
e_dynpfld_mapping-fldname = 'F0001'.
e_dynpfld_mapping-dyfldname = -
> name of field1 (for ex: your 1 value field name)
APPEND e_dynpfld_mapping TO t_dynpfld_mapping.
e_dynpfld_mapping-fldname = 'F0002'.
e_dynpfld_mapping-dyfldname = -
> name of field2 (for ex: your short text field name)
APPEND e_dynpfld_mapping TO t_dynpfld_mapping.
3))))))))
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield =
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = -
> name of field1 (for ex: your 1 value field name)
value_org = 'S'
TABLES
value_tab = itab
dynpfld_mapping = t_dynpfld_mapping
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3 -
How to get readonly text field value in backing bean?
Below is my code in JSF.
<h:inputText id="prodLine" value="#{fbackingBean.value}" required="true" styleClass="readOnlyField" readonly="true"/>
This is a readonly field, and the value will been pass in by a pop up window. after the value had been passed in, i try to store the data which i had selected, but the value in readonly field (which show in above) return a null value.
May i noe how can i get the readonly field value in backing bean? thanks!Why not keep track of the value in the backing bean? If it's a read only value set from a backing bean it should be simple to retrieve from a backing bean.
I'm new to JSF, but one thing that I have figured out is to try to put everything in the backing beans possible and to do as little as possible within the JFS web page components. -
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 -
How to use multiple patterns for masking/format the input text
Hi All,
I am using Jdeveloper 11.1.1.5 and i have a requirement where i need to format my input Text value in these below patterns:-
Format
Example
AA9A 9AA
EC1A 1BB
A9A 9AA
W1A 1HQ
A9 9AA
M1 1AA
B33 8TH
A99 9AA
AA9 9AA
CR2 6XH
DN55 1PT
AA99 9AA
For Example :- If user puts value as EC1A1BB, it should automatically changed to EC1A 1BB
if user puts value as W1A1HQ, it should be automatically changed to W1A 1HQ and so on..
If it could have been one format , i might have followed this :- https://blogs.oracle.com/jdevotnharvest/entry/get_social_security_numbers_right
But for multiple patterns i am not able to get through to the proper solution.
Is there any way to achieve this ? Please suggest.
Regards,
ShahFor the validation you should be able to use one regular expression where you add the logical or (|) (check the doc http://docs.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html) between the groups. If none of the patterns matches you have an error.
For the for formatting I'm not sure you can use only one expression.
I suggest to write one method which does the checking on and the formatting may be using an array of patterns to check and iterate the patterns in a loop. Once you found a match you can read the needed format from another array (or an other dimension if you prefer to use a multidimensional array).
Timo -
How to set the default text in an input box or a label to be a predefine, multiline text
how to set the default text in an input box or a label to be a predefine, multiline text. In other words how to break the line in the code of a text box.
thank youThere are a couple of ways of doing this:
If you're editing on the canvas, press Shift + Enter.
If you're working in Express View (see lower right hand corner of Project Siena), you'll need to copy a hard return from another app such as Notepad.
I believe a better implementation of hard returns are in the list of requested functionality that you can find here:
https://social.technet.microsoft.com/Forums/en-US/2e1f9446-56b2-419a-9c17-7037d2cd6146/from-the-community-overview-of-requested-additional-functionality?forum=projectsiena
Thor -
How to read the 'Input help with fixed values' of domain .
How to read the 'Input help with fixed values' of domain .
The domain has a Value range i want to read those values .
Are these values stored in any table ?
Plz help me i need it ver badly...
Thanks in Advance...Hi Chandra Shekhar,
To read the 'Input help with fixed values' of domain , you can use the function module : HR_P_GET_FIXED_VALUE_TEXT.
iIf you enter the domain name, you will find the fixed values entered in the domain.
These values are stored in a table DD07L(DD zero 7 L). Here the values are stored based on domain name.
See if it works for you.
Award points if its helpful.
Regards,
Bhanu -
How to clear input field value on back
Hi All,
I have developed an application, in which user put sales order on first page and press a button then its detail display on second page using restAPI. Now when I press back button on second page then it takes me to first page with holding previous sales order value in input field. And when I change its value and press that button again then it shows me previous sales order detail.
Please suggest me, how to refresh cache and input fields value on back button?
Thanks & Regards
ShubhanshuHi Viren,
My code is,
First view
sap.ui.jsview("uitest2.first", {
getControllerName : function() {
return "uitest2.first";
createContent : function(oController) {
var text = new sap.m.Label({
text: 'Dealer Code',
layoutData: new sap.m.FlexItemData({alignSelf: sap.m.FlexAlignSelf.Center })
var input = new sap.m.Input("CUSTOMER",{
type: sap.m.InputType.Text,
placeholder: 'Enter Dealer code...',
layoutData: new sap.m.FlexItemData({growFactor: 1, alignSelf: sap.m.FlexAlignSelf.Center})
var Dealer = new sap.m.HBox({
items:[ text,input
// new sap.m.Label({
// text: 'Dealer Code'
// new sap.m.Input("CUSTOMER",{
// type: sap.m.InputType.Text,
// placeholder: 'Enter Dealer code...'
height : "6em"
var button = new sap.m.Button({
text: "Submit",
press: function(oEvent) {
oController.loadData();
app = sap.ui.getCore().byId("myApp");
app.to("idsecond1");//, sap.ui.getCore().byId("CUSTOMER").getValue());
layoutData: new sap.m.FlexItemData({alignSelf: sap.m.FlexAlignSelf.Center})
return new sap.m.Page({
title: "Sales Dealer Info",
content: [ Dealer,button
First controller
sap.ui.controller("uitest2.first", {
loadData: function() {
var oParameters = ({
"CUSTOMER" : sap.ui.getCore().getElementById('CUSTOMER').getValue(),
console.log(oParameters);
var url = "http://###########:8000/sap/bc/zrst_customer?sap-client=800/";
var oModel = new sap.ui.model.json.JSONModel();
$.ajax({
url : url ,
dataType : "jsonp",
type : "POST",
data: oParameters,
success: function(data,textStatus,jqXHR) {
data = JSON.parse(data);
console.log(data);
oModel.setData(data);
sap.ui.getCore().setModel(oModel);
Second View
sap.ui.jsview("uitest2.second", {
getControllerName : function() {
return "uitest2.second";
createContent : function(oController) {
var oTable = new sap.m.Table("table",{
headerText: "Dealer data",
columns: [
new sap.m.Column({
header: new sap.m.Label({text: "NAME"}),
demandPopin : true,
minScreenWidth : "Tablet",
new sap.m.Column({
header: new sap.m.Label({text: "CITY"}),
demandPopin : true,
minScreenWidth : "Tablet",
new sap.m.Column({
header: new sap.m.Label({text: "COUNTRY"}),
demandPopin : true,
minScreenWidth : "Tablet",
new sap.m.Column({
header: new sap.m.Label({text: "COUNTRYISO"}),
demandPopin : true,
minScreenWidth : "Tablet",
new sap.m.Column({
header: new sap.m.Label({text: "STREET"}),
demandPopin : true,
minScreenWidth : "Tablet",
new sap.m.Column({
header: new sap.m.Label({text: "PST_CODE"}),
demandPopin : true,
minScreenWidth : "Tablet",
new sap.m.Column({
header: new sap.m.Label({text: "TELEPHONE"}),
demandPopin : true,
minScreenWidth : "Tablet",
new sap.m.Column({
header: new sap.m.Label({text: "EMAIL"}),
demandPopin : true,
minScreenWidth : "Tablet",
items: {
path: "/KEY",
template: new sap.m.ColumnListItem({
cells: [
new sap.m.Text({ //new sap.m.ObjectIdentifier
text: "{NAME}"
new sap.m.Text({
text: "{CITY}"
new sap.m.Text({
text: "{COUNTRY}"
new sap.m.Text({
text: "{COUNTRYISO}"
new sap.m.Text({
text: "{STREET}"
new sap.m.Text({
text: "{PST_CODE}"
new sap.m.Text({
text: "{TELPHONE}"
new sap.m.Text({
text: "{EMAIL}"
return new sap.m.Page({
title: "Dealer Info",
showNavButton: true,
navButtonTap:function(){
app = sap.ui.getCore().byId("myApp");
app.to("idfirst1");
sap.ui.getCore().getElementById('CUSTOMER').setValue("");
oModel.refresh();
content: [ oTable
Index.htm
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<script src="resources/sap-ui-core.js"
id="sap-ui-bootstrap"
data-sap-ui-libs="sap.m,sap.ui.commons"
data-sap-ui-theme="sap_bluecrystal">
</script>
<!-- only load the mobile lib "sap.m" and the "sap_mvi" theme -->
<script>
sap.ui.localResources("uitest2");
var app = new sap.m.App("myApp",{initialPage:"idfirst1"});
var page = sap.ui.view({id:"idfirst1", viewName:"uitest2.first", type:sap.ui.core.mvc.ViewType.JS});
var page1 = sap.ui.view({id:"idsecond1", viewName:"uitest2.second", type:sap.ui.core.mvc.ViewType.JS});
app.addPage(page).addPage(page1);
app.placeAt("content");
</script>
</head>
<body class="sapUiBody" role="application">
<div id="content"></div>
</body>
</html>
Thanks
Shubhanshu -
Trying to auto commit after input text value change
Hello, I have created a page that contains an input text box. When the user changes something in the input text box, I want to fire off a commit operation.
As of now, I have valueChangeListener of the inputText set to a method on my managed bean which then grabs the commit operation from my bindings container and executes it.
At that point, I would expect the changes to a the input text box to be saved after a user modifies it. However, it doesn't seem to be working, because when I refresh the page, the mod I made to the text is not there. The input text still reflects the text that was there before I made a change.
Anyone know what's happening here?? And how I can make it work?Hi Timo,
Thanks for the response. I tried that, and my commit function in my bean was getting called, but the data still wasnt "REALLY" getting saved.
I had to bind my input text to a property in managed bean, and call
inputText.processUpdates(FacesContext.getCurrentInstance());
doCommit(); // method that simply calls the commit method in my binding container, and does a few other things.
For simplicity I just bound the panel that all my input components were child of. In this case it was a DecorativeBox. So I bound the DecorativeBox to my bean and just did
decBox.processUpdates(....)
doCommit();
That way all my child input components were updated before the commit took place. That seemed to do the trick nicely (-;
Edited by: Fonz Desselle on Mar 25, 2013 11:42 AM -
How to display my input history values on Filename filed (selection screen)
Hi All,
Please let me know how to display my input history values under the field of selection screen.
I created Zprogram as below.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
PARAMETERS: P_FILE TYPE RLGRAP-FILENAME OBLIGATORY.
SELECTION-SCREEN END OF BLOCK B1.
I displayed a selection screen of my Zprogram, my cursor put on P_FILE field, and enter BACKSPACE key,
so it doesn't display my input history values.
Of course I've selected Local Data History 'ON' of my GUI option,
so it's displayed my input history values on any other fields.
If you know why, please let me know.
Regards,
Rie.In the GUI options, there is also a setting for the maximum length of fields for storing the history, maybe it is set to small, as your selection field is length 128.
Alternatively you can switch to a STRING, I have observed that the history is displayed after the first letter is being entered (maybe dependent on GUI version, who knows...)
Thomas
Maybe you are looking for
-
Hi, I'm trying to run a visual experiment using PsychToolbox in Matlab. I've attached a secondary monitor to my iMac for this purpose and I'm having difficulties trying to 'black out' the iMac screen. I need the secondary monitor to run at a refresh
-
Printing Problems - FH11 - shifted color values
I am printing on a non-PostScirpt, ink-jet printer (LexMark X6190). When I print a document, with various combinations of text and photos, the colors on the header change. On a correct page, the header would be a medium wine red. But, on page with a
-
Hi Experts, when i execute below code all the radio buttons are displaying one by one line, my requirement is it has to be disaplyed in a single line two radio buttons can anyone guide me,,,, selection-screen begin of block k with fr
-
Adobe Flash CS5 - Kreis soll sich öffnen
Liebe Community, ich habe eine frage zu meiner gebauten Flashanimation. Bisher ändert sich die Größe des "Swatches" aufgrund der Zahl die ihm übergeben wird. Sprich: Steht in der Mitte die Zahl 5, wird er z.b. nur mit 10 % dargestellt, sollte jedoch
-
Mac OS X Leopard Install Problems
I'm trying to install Mac OS X Leopard onto a Western Digital WDH1CS5000N MyBook Home Edition External Hard Drive using a FW connection. I partitioned the drive to allow it to be installed on and began the installation. However, in the early part of