How to read value from select list
Hi,
i'm using jdev 10.1.3.1.0, adf, jsp and struts.
i've made a simple viewobject 'bestyrer' (danish for department) and it contains a list of all available department in my organization.
it appears in my jsp page as a dropdown list and when the user chose a specific department all employees in that department are shown as a master detail relationship.
It works and its standard drag'n'drop in JDev.
I need to know which department the user have chosen because the information i show to the user depends on it.
my view look like this:
SELECT KBestyrer.BESTYRER,
KBestyrer.NAVN
FROM K_BESTYRER KBestyrer
bestyrer is a number and navn is the name of the department.
the code generated in my jsp based on drag and drop is:
<html:select property="KBestyrerView"
disabled="${!bindings[\'KBestyrerView\'].updateable}"
onchange="DataForm.submit();">
<html:optionsCollection label="prompt" value="index"
property="KBestyrerView.displayData" />
</html:select>
and the corresponding HTML generated is:
<select name="KBestyrerView" onchange="DataForm.submit();"><option value="0" selected="selected">0 Vejdirektoratet</option>
<option value="1">101 København</option>
<option value="2">147 Frederiksberg</option>
<option value="3">151 Ballerup</option>
<option value="4">153 Brøndby</option>
<option value="5">155 Dragør</option>
<option value="6">157 Gentofte</option>
<option value="7">159 Gladsaxe</option>
<option value="8">161 Glostrup</option>
<option value="9">163 Herlev</option>
<option value="10">165 Albertslund</option>
<option value="104">999 Andet</option></select>
First of all i don't want the indexed values as values of my individual options but the real values as seen in fron of the name. i.e. 101 147 151 and so on.
how do i obtain this and how do i read the value the user have chosen?
hope to receive some help.
thanks
br
kim gabrielsen
Ok,
thanks for the pointer. it clearifies a bit but i cannot make it work.
I've created a second binding as described in the dokument which gives me another binding in the pagedef file:
<attributeValues IterBinding="KBestyrerViewIterator" id="Bestyrer">
<AttrNames>
<Item Value="Bestyrer"/>
</AttrNames>
</attributeValues>
i guess i should be able to reference this binding using 'Bestyrer' as the id.
in my JSP page i insert the following:
<html:select property="KBestyrerView"
disabled="${!bindings[\'KBestyrerView\'].updateable}"
onchange="inspect(this.form)" >
<html:optionsCollection label="prompt" value="#{bindings.Bestyrer.getInputValue()}"
property="KBestyrerView.displayData" />
</html:select>
but it fails with an error:
org.apache.commons.beanutils.NestedNullException: Null property value for '#{bindings' at org.apache.commons.beanutils.PropertyUtilsBean.getNestedProperty(PropertyUtilsBean.java:669) at org.apache.commons.beanutils.PropertyUtilsBean.getProperty(PropertyUtilsBean.java:715) at org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.java:290)
I've tried #{bindings.Bestyrer} and #{bindings.Bestyrer.inputValue()}
but they fail too.
so there is clearly something i don't understand regarding this binding stuff.
Assuming i get this to work how do i actually accesss the value chosen by the user?
as far as i recall in plain HTML i gave the select list a name like:
name=MyList
and called a javascript function like this:
onchange="inspect(this.form)"
in my JS function i could access the value like this:
function inspect(form){
alert(form.MyList.options[form.MyList.selectedIndex].text)
but when i name the select list i receive an error:
javax.servlet.jsp.JspException: Cannot find bean under name MyList at org.apache.struts.taglib.html.SelectTag.calculateMatchValues(SelectTag.java:301) at org.apache.struts.taglib.html.SelectTag.doStartTag(SelectTag.java:244) at brugeroversigt.jspService(_brugeroversigt.java:75) [brugeroversigt.jsp]
I'm a bit confused here so any input would be appreciated.
br
kim gabrielsen
Similar Messages
-
How to get the value from select list to text box
Hi,
I have a select list i want to retrieve the value from select list to text box.
How can i do that???
Regards,
Sakthi.Hi Sakthi,
Yo can use the Java script for that..
Dynamically the value will come into text box.
Use the below script.
<script type="text/javascript">
function disFormItems()
var lReturn = $v(here your select list name)
alert(lReturn);
document.getElementById(here your text box name).value =lReturn; }
</script>Cheers,
Shan -
How to read values from DMM4040
Hi,
I am using DMM4040, NI PXI 6509 device.
I need to make some port pins high which i have already done and now i have to read value captured by DMM then i have to make my port pins low if my value is within limits.
Can u suggest me how to read values from DMM and then by notification i ll make my port pins low.
'' A professional is someone who can do his best work when he doesn't feel like it''...........What language are you using? If using LabVIEW, you use the NI-DMM API to communicate with the 4040. Just take your reading, do your limit comparison, and set your lines based on the comparison results.
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines -
How to remove value from pop list in iProcurement Page
I need to remove a value from POP list. How can I do this? Can I do this using Perosnalization?
While creating requisition in the approvers page there are two buttons one is Approvers and another is Add_Attachments.
When I click Add_Attachments button it will open another page there I need enter description and select category from the pop list and define attachment.
In the category list I need to remove one value. How do i do this.Personalization links not available in this page.
Please help guys...
Thanks Advance
KumarKumar,
First you need to find out the data source for the category pop list. Based on that we can suggest how to achieve that requirement as there are many different ways of specifying the data source for a pop list.
--Shiv -
How to read values from the following XML?
I have been using "extractValue" to get the values from a xmltype field and no problems until now.
The xmltype now is like:
<a>1</a>
<b>2</b>
<c>1221</c>
<c>1412</c>
<d>11111</d>
<e>3333</e>
I'm able to read values from 'a,b,d,e' but not from 'c'.
Questions:
1)- Is posible to read the values of field c?. How?
2)- If is not posible to read the field values, Is posible to transfor the xmlfield to:
Where I will be able to use xmltable columns and loop getting the values.
<a>1</a>
<b>2</b>
<k>
<c>1221</c>
<c>1412</c>
</k>
<d>11111</d>
<e>3333</e>
Like always
Thank you in advance for your help.
Jose GalanSQL> with XML as
2 (
3 select xmltype(
4 '<root>
5 <a>1</a>
6 <b>2</b>
7 <c>1221</c>
8 <c>1412</c>
9 <d>11111</d>
10 <e>3333</e>
11 </root>'
12 ) XMLDOC
13 from dual
14 )
15 select a, b,c, d, e
16 from XML,
17 XMLTABLE
18 (
19 '/root'
20 passing XMLDOC
21 columns
22 A number(5) path 'a',
23 B number(5) path 'b',
24 D number(5) path 'd',
25 E number(5) path 'e',
26 C_XML_FRAG xmltype path 'c'
27 ),
28 XMLTABLE
29 (
30 '/c'
31 passing C_XML_FRAG
32 columns
33 C number(5) path '.'
34 )
35 /
A B C D E
1 2 1221 11111 3333
1 2 1412 11111 3333
SQL> -
How to display a value from Select List by default
I have a Select List on a form and I need to on page load show an entry from the SL depending on the user Id of the user logged on. For example, if the SL had 3 entries: 'Div1', 'Div2', and 'Div3', depending on the division the user belongs to (I can determine that from his user Id using a SQL), say, I need to display 'Div2' to the user in the SL instead of the usual NULL or '---- Select Div ----'. 'Div1' and 'Div 3' entries will still be part of the SL, but for user's convenience I need to display their division.
Any ideas?
Thanks,Hi Ajay,
you need to specify your apex version, database version and so on to make our help specific.
Anyhow you can create a page process- for example one at On Load before header.
For example;
[code]
declare
v_division varchar2(32);
begin
--select default division
select my_division
into v_division
from my_division
where my_division=:APP_USER;
:P_DIVISION:=v_division;
end;
[/code]
Then in the default of your select list, specify P_DIVISION as the default. Using one of several methods
Understanding Page-Level Items
Kofi -
Resolved: Use value from select list in pl/sql block
Hello,
I have a form with a select list: P18_BONUSTYPE, the values of which come from a LOV.
When the user clicks a button, a page process is used to insert a row into a table.
When I use the :P18_BONUSTYPE bind variable in my insert statement I get an error "Invalid number" I get an "Invalid number" error. I assume that APEX is using the displayed text in that bind variable, not its actual (html option) value.
I checked the HTML of the page, and the correct values are in the select list.
Can someone tell me how to get the value into a bind variable that can be used in a pl/sql block for a page process?
Thanks
Message was edited by:
Neeko
Issue was a value in another item.Did you tried changing the value using "to_number"? (i.e. to_number(:P18_BONUSTYPE)).
Max. -
How to read data from select Options in another view without using context
I have 2 views, one for selection screen and another for displaying result.
In selection screen view I have define a select options with the help of webdynpro component.
Now my object is display result in result view based on entry of selection screen.
I don't want to do binding in context node, without that how I can read data of select option
in result view?
Regards,
Rasmi Ranjan MishraSolve by own.
If I define the Select options in component controller, then it will be global in nature. so i can get the value of select options
in another view also.
Regards,
Rasmi Ranjan Mishra -
How to put values from selection screen to ztable
hi all,
i have created a ztable.
now i want to put data through se38.
i have given 5 parameters in selection screen same as there in ztable.
now if i put values in selection screen then it should put that values to my ztable .
how can i put values into my ztable.
i used insert but not workiing.Hi,
Try this.
TABLES : ztable.
SELECTION-SCREEN:BEGIN OF BLOCK b1 WITH FRAME TITLE text-t01.
PARAMETER : p_field1 TYPE field1_in_ztable,
p_field2 TYPE field2_in_ztable.
p_field3 TYPE field3_in_ztable.
p_field4 TYPE field4_in_ztable.
p_field5 TYPE field5_in_ztable.
SELECTION-SCREEN:END OF BLOCK b1.
DATA : itab TYPE TABLE ztable,
wa_itab TYPE ztable.
AT SELECTION-SCREEN.
MOVE p_field1 TO wa_itab-field1.
MOVE p_field2 TO wa_itab-field2.
MOVE p_field3 TO wa_itab-field3.
MOVE p_field4 TO wa_itab-field4.
MOVE p_field5 TO wa_itab-field5.
INSERT ztable FROM wa_itab.
IF sy-subrc = 0.
MESSAGE 'Successfully saved' TYPE 'I'.
ENDIF.
Thanks,
Sri.
Edited by: Sri on Jul 28, 2009 4:15 PM -
How to read value from Key flexfield added on to the newly created SIT
Hi Experts,
I have a requirrment to display a new structure in the Special Information Types (SIT) screen in SSHR. The data entered into the segment needs to be validated using PL/SQL function.
I have performed below steps to display the structure/field on SIT Page
1. Created new flexfield structure as XX_LEAVE_ENCASHMENT under the "HUMAN RESOURCE" Application (Application id- 800) and flexfield TITLE "Personal Analysis Flexfield" (PEA).
2. Added a new segment "Encash Days" for the newly created flexfiled structure "XX_LEAVE_ENCASHMENT".
3. Added this new structure in the Special Information Types form in HRMS responsibility
4. The structure is enabled on the SIT screen.
Now I want to validate the data entered in Encash Days field in this page by calling a PL/SQL function. This can be done by extending the SIT page Controller.
But how should the ID of the newly enabled segment (in the new Flexfield strucuture) be retrieved in the controller inorder to read the user-entered value (to further call the validation program)? Or is there any other way of achieving this functionality in OAF?
Please help.
Thanks.Hi,
Yes, u can get the value from the SIT and perform the relevant validation too.
Refer http://apps2fusion.com/at/43-ss/453-oaf-extension-case-study
Regards,
Gyan -
dear all
can you tell me how to read the value from the gride view coloum...
when i double click on the RowsHeader then i need to pick the value for 2 coloum.
thanks in advance...Hi Kishor,
Try This......
If pVal.FormUID = "test3" And pVal.ItemUID = "grid" And pVal.EventType = SAPbouiCOM.BoEventTypes.et_DOUBLE_CLICK And pVal.BeforeAction = False Then
oform = sbo_application.Forms.Item("test3")
ogrid = oform.Items.Item("grid").Specific
For i As Integer = 0 To ogrid.Rows.Count - 1
If ogrid.Rows.IsSelected(i) = True Then
MessageBox.Show(ogrid.DataTable.Columns.Item(0).Cells.Item(pVal.Row).Value)
MessageBox.Show(ogrid.DataTable.Columns.Item(1).Cells.Item(pVal.Row).Value)
End If
Next
End If
Thanks
Shafi -
How to read value from /401 in my pcr
HI
i have to write a PCR using /401 wage type (which stores projected no of months)
i am trying to write as below.
RTE=& /401.
but i am not able to fetch the value from /401 though in input table i can see the value under Rate as 11.
please help me in fetching the value form /401.
thx
jhI SIKINDAR,
I am trying to take the value stored in rate of /401 and multyply with constant and store amount field of /3C5.but i am not able to get value from /401
RTE=& /401 SET
NUM=KCARPK Set
MULTI RNA Multipl.amt/no/rate
ADDWT /3C5 OT Output table
thx
arun -
HCM Flexible appraisal template how to read value from a dropdown selection
We are on EHP5 based HCM system.
We are trying to read a drop down value populated in appraisal document. This drop down value is coming from a scale type. Now when i check webdynro application HAP_DOCUMENT_BODY , method BUILD_DOCUMENT_BODY seems to be building the UI and populating all the values. Now I am trying to put a break point and capture instance of this drop down and then based on selected value of the drop down wanted to populate another field attached to same column. Well that will be number two but yeah first thing first, need to find how i can capture drop down instance.
Thanks for your time.
Rgds,got a body hrhap00_value_det which can do the trick..but i am still trying to figure out how to pin point my element and then process the logic.
-
How to read values from Property file into BPEL process local variable?
I would like to use a Property file with some parameters e.g.
<myparm1>12345</myparm1>
How can I read from a BPEL process such a Property file and assign it into e.g. local variable "intparm1"?
Where (in which directory) should I put this XML Property file to have it always available for reading?
PeterHi,
You can also use
ora:readFile( ) function as follow :
ora:readFile(xml file location (ex. "file:///D:\\SOA\\FileAdapters\\readFile\\test\\test.xml"),xsd file location (ex."file:///D:\\SOA\\FileAdapters\\readFile\\test\\test.xsd"))
inside the assign activity and assign this to the variable you want.
regards
arababah
Edited by: arababah on Aug 10, 2009 12:55 AM -
How to read values from Property XMLfile into BPEL process local variable?
I would like to use a Property file with some parameters e.g.
<myparm1>
12345
</myparm1>
How can I read from a BPEL process such a Property XML text file and assign it into e.g. local variable "intparm1"?
Where (in which directory) should I put this XML Property file to have it always available for reading?
PeterHi,
You can also use
ora:readFile( ) function as follow :
ora:readFile(xml file location (ex. "file:///D:\\SOA\\FileAdapters\\readFile\\test\\test.xml"),xsd file location (ex."file:///D:\\SOA\\FileAdapters\\readFile\\test\\test.xsd"))
inside the assign activity and assign this to the variable you want.
regards
arababah
Edited by: arababah on Aug 10, 2009 12:55 AM
Maybe you are looking for
-
I have had the same apple ID for years but I had to change my emails around including my iCloud, I wasn't entirely sure how to do this at first so I just set up a new apple ID with the new iCloud email address that I wanted. When I realised how diffi
-
Problem to pass through firmware update... help needed !
Hi there ! having trust in Apple has run software update on blind date basis, ie, just pressed the button to update everything what was proposed . i did not have a look, what was proposed to update, unfortunately ... apparently, some firmware update
-
Mail works on WLAN but not on 3G or Edge
Hello, I am having a interesting problem with my iphone. My emails will not send i get a "failed to connect to SMTP" server or similiar error message, however, when i walk into my house, my emails are sent over my wlan. I can receive emails and i kno
-
I asked the above question a few hours ago and Adobe's Rajshree responded and said I could simply log in to Adobe.com, purchase the new Photoshop + Lightroom CC offer, and then let her know my order number, and that she would then cancel my existing
-
How to Import Leica photos with RWL extensions
I bought Leica V Lux 4 camera. The Raw images in it have the extension .RWL and Lightroom cannot import these pictures it seems. Can somebody help?