Choose only one value a value I
I have a list of a choice selectionWhen I want to get the value of the list
01 link bean
02 get the list index
03 list Iterator
04. get the value at that index of the iterator
This is the code I am using
Object listIndex = myList.getValue()
DCIteratorBinding binding = ADFUtils.findIterator("listIterator");
Row atRangeIndex = binding.getRowAtRangeIndex(listIndex);
Object attribute = atRangeIndex.getAttribute("Id");
but I have a problem when I try to update the list this valueI have the attribute
ID
I want the list to this attribute when I open the page or when I press the button
in another meaning when I press the button select a choice select this Id
How can I do that.
Generally to the LOV you would list on the attribute binding,
as you the value that must be set for the LOV
(1) create the attribute for the LOV attribute binding
(2) the value for this attribute binding.
3) ensure you have PPR and the partial target defined in the code so that the change is reflected.
Detailed procedure:
Create a binding for the LOV component in the managed bean:
Private RichSelectOneChoice departmentLOV;
{} public void setDepartmentLOV (RichSelectOneChoice departmentLOV)
this.departmentLOV = departmentLOV;
}
public RichSelectOneChoice getDepartmentLOV() {}
Return departmentLOV;
}
{} public void setNewValue (ActionEvent actionEvent)
SUPPOSE THAT THE VALUE OF THE DEPARTMENT MUST BE SET TO 50
Long departmentId = new Long (50);
this.setEL ("#{bindings.") DepartmentIdAttribute.inputValue} «»
departmentId);
AdfFacesContext.getCurrentInstance () .addPartialTarget (this.departmentLOV);
}
UN Private Sub (String el, Object val) {}
FacesContext facesContext = FacesContext.getCurrentInstance ();
ELContext elContext = facesContext.getELContext ();
ExpressionFactory expressionFactory =
facesContext.getApplication () .getExpressionFactory ();
ValueExpression exp =
expressionFactory.createValueExpression (elContext, el,
Object.Class);
exp.setValue (elContext, val);
}
In the file PageDef,.
Use = "LOV_DepartmentId" id = "DepartmentId" DTSupportsMRU = "false" / >
Thank you
Nini
Tags: Java
Similar Questions
-
The creation of "choose only one" controller?
Hello.. I'm new here...
I want to create a control panel with the following functions.
-Control Panel consist of 5 components inside
-If I choose 2 LED, occur [action 2]
-If I choose 4 LED, occur [action 4]
and etc...
now my problem is... When I click on LED 2, it performs [action 2]
but when I click on LED 4 in order, 2 LED light is always on.
(The concept, I want, that.. .when I click on LED 4 in order, 2 LED will automatically turn off, 4 LED lights)
I want to say that only ONE option can be chosen during the operation.
any idea?
Yes, there is a control called radio BUTTONS. fits your expensive application.
-
change only one value of character lowercase to the next
If a variable contains a single character in tiny at the end after the '_' character, how to change for the next character lowercase?
for example
If str contains "act_b", then the result should be "act_c".
If str contains "act_c", then the result should be "act_d".
If str contains "act_d", then the result should be "act_e".
You can use right() function or something to get the last tank; ASC() for his code ASCII, increment, she, using chr() to represent as a tank once again, then reReplace() to replace what currently exists with the new tank.
Or a few variations on this theme.
--
Adam -
HW 2 get the value to select only one option selected by the user in the bean support
IAM using the select only one option button that is filled during execution.
I want to get the value selected by the user of a choice selection in the bean to support for other operations of... .IAM using this method, but I got a null pointer exception.
Public Sub test (ValueChangeEvent tokenChange)
{
Integer tokenIndex = (Integer) tokenChange.getNewValue ();
DCIteratorBinding tokenListIter is getBindings1 () .findIteratorBinding ("TokenIDVOIterator");. in this line null pointer exception
Token of the line = tokenListIter.getRowAtRangeIndex (tokenIndex.intValue ());
currenttoken = (Number) token.getAttribute ("TokenId");
System.out.println ("token ID selected:" + currenttoken);
}
I want to know if there is any method to get the value of the value selected by the user to select a choice...
pls help? //3 words:
"research on the forum.
asked and answered countless times.
-
How to choose only values in double
Hi guys,.
How can I retrieve only duplicate values in a column?
Then,
How can I remove duplicate values?
Best wishes
FatehPLEASE CHECK THIS:
Select * from TABLENAME
WHERE DUPLICATECOLNAME = (select DUPLICATECOLNAME from TABLENAME ANY
where rowid NOT in (select max (rowid) of the TABLENAME of DUPLICATECOLNAME group)) -
Mr President
Is it possible to limit the values in list of choice to a specific number of values or one value?
I have a list of values opportunity on my some columns in the table and to restrict the values to the list of specific codes only, or only a single value.
for example my image below shows the list of choices, and I want that these only values are displayed that begin with 5525001 to 5525009.
or just 5525001.
How to get there
In the photo above, there is a list of values, but if I want to see only highlighted value then what to do.
or if I want only the values starting from 5525 appear then what to do.
Concerning
On the ViewObject LOV, make and apply ViewCriteria adapted to your needs, for example:
When adding that VO as seen at the desired ViewObject accessor, apply just created VC
-
formatting of scale to display only integer values
I'm trying to simply display a graph that has the integer values only and therfore that only integer values appears in the balance to alleviate the congestion of the eye on the chart. Someone knows how this fundamental?
If wire you an integer to the graphic terminal data type it should change the entire representation and take care of the problem.
You can also set numbers of precision in graph to zero properties.
Lynn
-
Hello
[I have a structure of ring which I load an array of strings of four variables and its property is string]
but then I run the code it is show only first value
on mouse pressed nothing happens
Click on ring all values must be
Your ring is an indicator. Make a control of you want to be able to operate at run time. (click right.. .change control)
-
I have a HARD disk with two partitions and two copies of Win7 but at the start, I have the black and white screen asking me only one to choose. How can I rename the Windows 7 and Windows 7 Test to start in one I want right here?
I have a HARD disk with two partitions and two copies of Win7 but at the start, I have the black and white screen asking me only one to choose. How can I rename the Windows 7 and Windows 7 Test to start in one I want right here?
Use BCDEDIT to SET the description that you are wanting to "Rename" and also to choose the displayorder, timeout and that you load by default...
Maybe this old conversation will help you:
http://www.SevenForums.com/general-discussion/20191-renaming-earlier-version-Windows-dual-boot.html -
Show only distinct values in narrative mode
Hi guys!
Here again, we are trying to reach an ambitious goal.
It is possible to show only distinct values in a narrative view? For example, I have a query that retrieves about 100 lines. In these lines, a few different years, it is something like this:
1-2013, Jhon, 10
2-2013, Brian, 15
3-2013, Pete, 20
...
10-2014, Steve. 5
11-2014, Kevin, 12
...
90-2015, Ray, 24
91-2015, Michael, 2
...
It is possible a mode display narrative only something like that?
Years: 2013, 2014, 2015
If I use the feature number @column, I get as many years the results are retrieved. It is not user friendly.
Any help will be appreciated.
Best regards
Fabian
Hi all!
I found my own solution and I want to share with you. Maybe it helps someone in the future.
I used JavaScript to iterate through each row value. By each line, I'll check if it value is added to the overall picture with unique values. If not added, I add it, otherwise, I do nothing.
Here is my script (pay attention to each code block, it must be in its proper "narrative class"):
Narrative section prefix
var periods = [];
var years = [];
var costCenters = [];
function loadArrays (year, period, costCenter)
{
if(periods.indexOf(period)<0)
{
periods.push(period);
}
if(years.indexOf(year)<0)
{
years.push(year);
}
if(costCenters.indexOf(costCenter)<0)
{
costCenters.push(costCenter);
}
}
//Narrative section
//call functions
loadArrays ('@1','@2','@7');
// postfix Narrative section
document.getElementById('promptText').innerHTML = "[b]Fiscal Year : [/b]" + years.toString() + " [b]Fiscal Period : [/b]" + periods.toString() + " [b]Cost Center : [/b]" + costCenters.toString();
-
I can't have more than one value of function?
I hope all of you can point me to some introductory articles/documents on function.
I know the function is used to calculate a value and it always returns a single value.
I want to know I can get more than one value of function? If so please share a few lines of code
Hello
Certainly, you CAN define functions with OUT parameters. It is generally not advisable to do so, however. Working with settings, for example, can be called from SQL, among other useful things.
If you are wanting a function that returns multiple values, you would generally be
-create a procedure that has several OUT parameters
-create a function that returns a type of object that encapsulates the values that you want to return
How to make FUNCTION returns several columns and several outputs line
can functions return multiple values?
oracle function to return more than one value
You must give several values of function that can be found in Sql
-
Hello
I want to extract only 2nd value of col2 that holds the values of semicolons.
When I try his failure to appear as expected.
Table
col1 col2
------ ----------
A cod; MOD; KL
B; DF
C ss; 6; 7
D gg
Expected results:
col1 col2
------ ----------
A mod
B df
C
D
My test:
with
a trial in
(select 'A' col1, col2 "cod;) MOD; KL' Union double all the
Select 'B ', '; '. df"of the double
Union of all the
Select 'C', "ss; 6; 7' of the double
Union of all the
Select would be ', 'gg' of the double
)
Select col1,
NULLIF (regexp_substr (NVL(col2,'~'), "[^;]")) +', 1, 1),'~ ') col2
of the test;
I get:
col1 col2
------ ----------
A mod
B df
C ss
D gg
Any help will be appreciated.
Thank you
Hello
You can also use regular expressions to get the N-th section, like this
REGEXP_SUBSTR (col2
, '([^;] *)(;|$)'
1
N - whole, to 1 or greater
NULL
1
)
SUBSTR and INSTR will be faster, however.
-
{Param_whateverOption} CAN pull one value attribute?
'Safe', I know the 'probably obvious' answer for this, but here goes nothing:
When you pull parameters in the html to run code, is - it possible to the {param_whateverOption} draw one value attribute?
For example:
<list name="myExample" label="Apply to" defaultValue="body:before {"> <value name="body:before {Top" label="Top"/> <value name="body:after {Bottom" label="Bottom"/> </list>
<headHTML> <![CDATA[ <style> {param_myExample} -10px; } </style> ]]> </headHTML> <pageItemHTML> <![CDATA[ I want to be able to put this at the {param_myExample:label} of my page. ]]> </pageItemHtml>
The word 'Top', I want TO be involved in the sentence instead of "body: before {Top.
Y at - it a syntax that will do it? a colon, an additional hose sets of square brackets or braces, etc. etc.
Lol you can of course do it with JS when running, but the Muse is not supported for the replacement of parameter with anything other than the value of the parameter.
-
Show only the value not save to the database based on the dynamic action
Nice day
I have a select box with products and dynamic action that updates a single display element with the price, based on the selection of products.
Once the selection is made and the page is submitted, I noticed that the price is not stored in the database. If I change the display
only the value of a text box, the data is saved. This is expected behavior? If so, can I add something to the text box to make it uneditable?
Thanks for any help you can provide.
Version is Application Express 4.1.1.00.23
Stevestmontgo wrote:
Hello
Thanks for your advice. I changed the STATE of SESSION SAVE Yes with the other values remains the same, as they met to your recommendations.
When I change the value, I get the error below. It's maybe because the value is taken from a dynamic action?Yes. That would mean there isn't an item "view only". The value is changed by the browser.
You might change view as textitem and set read-only by adding the ReadOnly attribute to the property attributes of HTML form elements .
-
show more than one value of PLSQL code for screen
How to display more than one value of PLSQL code on screen?
Below the code has the function of printing two PLSQL code. Can someone pls change the Javascript code according to the code below.
JavaScript:begin htp.prn('hello world'); htp.prn('hi'); end;
SKUD.Javascript Code var ajaxRequest = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=TEST_PROCESS',0); ajaxResult = ajaxRequest.get(); alert(ajaxResult);
OPPS...
Need arr = ajaxResult.split(':');
Kind regards
Shijesh**
Maybe you are looking for
-
Whenever I print, HP I please use their cartridges. I intend to buy cartridges not HP just to stop. Is there another way? I reinstalled the cartridges, unplugged and restarted the computer and the printer, look in the drivers for the solutions, I loo
-
HP Laserjet 1025nw printers takes almost 6-7 seconds before its starts printing.
Whenever I try to start printing a page, the printer takes a long time to print. I thought that the laserjet printers are the fastest online for excellent color prints. But the time it takes to print is increased by his initial work. What is the cali
-
PowerEdge T105 server with SAS HBA PCI card compatibility model UCS - 70
Hello We have a PowerEdge T105 server and want to connect Dell LTO-6 SAS Tape drive to this server. There are available PCI slots... but I wanted to know if this server can host this HBA card? Thank you
-
Hello I need help. Its getting frustrating because every time I'm sitting at my computer and I don't touch it for a minute, I'm brought back to the lock screen so I have to enter my password again. I already tried to change the screen saver timeout,
-
Tried to download Photoshop and lighthouse, not successful code 6
This came after trying to install photoshop. Help!It came when I tried to install the lighthouse?