Getting the selected item of a form
Hi,
I added some matrix to the item-form for showing information on the selected item.
Now I need to know, which item is actually selected.
I'm searching but don't find it.
Regards,
Holger Reppert
Hi Ibai,
sorry for this stupid question. It's early in the morning
THX anyway.
Holger
PS: I thought of sth. like a pointer to the data ........
Message was edited by: Holger Reppert
Similar Messages
-
How to get the selected items from listbox
Regarding listbox i have two questions
1) I want to get the selected items as per the order in which ihave selected.Presently i'm getting in the ascending order.For example after selcting the 1,2,6 if i select 3 then its giving 1,2,3,6.But i want it in the order 1,2,6,3
2)I want to select items from a single list box to many other listboxes.(ie) my first selection should goto first,second one to the second listbox and like this.How should i write the logic.
please give me a suggestion.In order to have the selected items line up in accordance to the selection order, please do it one at a time. (That's the limit for that VI)
If you need more than that (i.e. to regconize which item clicked first and which one comes later), you may have to figure it out ya
Wish you good luck. Perhaps, someone else has a already made vi.
Cheers!
ian.f
Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010
依恩与LabVIEW
LVVILIB.blogspot.com -
Get the selected item in a dropdown
please how can in get the selected item in a dropdown ?
I am using t"his.selectedIndex" but it gives me just de index of the previous selected item, I am using the CHANGE event with javascriptI found the solution with xpa.event.newText
-
So, I am making an application in which binds data from a WebClient to a ListBox. Thus, it is needed to understand that I did not create this data, it is from a Web API. So my goal is to be able to click on any of the items in the list box(which are binded
from a web API) and open a pop-up to display more data binded from that specific area.
Example:
The data has been loaded and I click on the 2nd item, well this item is a Metallica concert located in Russia blah blah.. ok, so I press it, it opens a pop up with more info like the date, location, etc...
Info:
I am binding the things in the lost box from and "events" statement, and I want the data in the list box in the pop up to display the selected child item, "event".
Zack BowlingSo are you storing that 'more info data' along with main data(i.e. that metallica concert etc.) somewhere in a List/observableCollection/database etc, if yes then probably it can be fetched directly from that collection.
e.g.
private void listBox_Tap(object sender, System.Windows.Input.GestureEventArgs e)
var Itemobj = (listboxname.SelectedItem) as ObjectClassname; string datevalue = Itemobj.date; string location = Itemobj.location;
//so using Itemobj you can fetch the properties you want as stored in ObjectClassname.
// Here ObjectClassname is the name of class storing the properties(setter-getter) for the parsed data.
http://developer.nokia.com/community/wiki/Using_Crypto%2B%2B_library_with_Windows_Phone_8 -
Getting the value of the selected items of the shuttle
Hi Steve,
How to get the selected items of the shuttle in the backing Bean upon clicking submit button?
Regards,
GarethCheck the ADF Developer Guide and the SRDemo
application for a sample of using the shuttle
http://download.oracle.com/docs/html/B25947_01/web_com
plex008.htm#CEGHACEDHow to get the values from leading list. I have a pop-up with selectManyShuttle. The leading list values are retreived from from emailTable and there is no default values in the trailing List. When I click ok in the popup, the selectedValues is null.
here is my code:
<af:form>
<af:selectOneChoice label="" valuePassThru="true" valueChangeListener="#{backingpsEmailUserContact.refreshSelectedList}" id="usercontactid" autoSubmit="true">
<af:selectItem label="User" value="user"/>
<af:selectItem label="Contact" value="contact"/>
</af:selectOneChoice>
<af:panelHorizontal valign="bottom" partialTriggers="usercontactid">
<af:selectManyShuttle
trailingHeader="Chosen"
leadingHeader="Email"
trailingDescShown="true"
leadingDescShown="true"
size="10"
value="#{backingpsEmailUserContact.selectedValues}" >
<f:selectItems value="#{backingpsEmailUserContact.allItems}"/>
</af:selectManyShuttle>
<af:commandButton text="Ok" action="#{backingpsEmailUserContact.cmdOk}" id="cmdOkid" partialSubmit="true"/>
</af:panelHorizontal>
</af:form>
backingBean method
public void cmdOk(){
Object selectedList = this.getSelectedValues();
// for (int i = 0; i < selectedList.size();i++){
// System.out.println((String)selectedList.get(i));
} -
How to generate/get the selected PO
Hi to all
Im doing a addon, were i need to get the selected po ,
example
GRPO forms then press the copy button and choose the PO, then select the PO from the list
i hope you could also show me the vb code to do this...
Thanks
LorenHi
SAPbouiCOM.BoEventTypes.et_CHOOSE_FROM_LIST
Select Case pVal.ItemUID.ToUpper
Case (ItemUid).ToUpper
Me.m_SBO_Form.Freeze(True)
Dim oEdit As SAPbouiCOM.EditText
Dim cflevent As SAPbouiCOM.ChooseFromListEvent = pVal
Dim oCFLEvento As SAPbouiCOM.ChooseFromList
Dim strUid As String = cflevent.ChooseFromListUID
oCFLEvento = Me.m_SBO_Form.ChooseFromLists.Item(strUid)
Dim oDataTable As SAPbouiCOM.DataTable = cflevent.SelectedObjects
If strUid = "22" Then
Try
oEdit = Me.m_SBO_Form.Items.Item(itemUid).Specific
oEdit.Value = oDataTable.GetValue(2, 0)
Catch ex As Exception
End Try
Me.m_SBO_Form.Freeze(False)
End If
Thanks -
How to get the Clicked Item of a ListBox?
I need to get the clicked item of a listbox.
The item can be at first selected, when I click it again, it
automatically gets de-selected, but I want to get that item
whenever I click it. Any idea how to do this?
This line does not work, because it gets the selected item.
var pattern:String = event.currentTarget.selectedItem.myname;
This one must work,but something is missing.
Anyone can help me with this?
marks is my ArrayCollection;
var pattern:String =marks.getItemAt[??].myname;Here is my code. Am using this function in the itemclick
event of the ListBox.
My ListBox is a multi-select listbox. So am selecting several
items by pressing "Ctrl" key and selecting each item using click.
Say I have selected 4 items, when I press "Ctrl" and
de-select one of the items, I want to get the itemname of the
deselected item.
public function createMarksList(event:ListEvent):void{
// Alert.show(new
String(event.currentTarget.selectedItem.myname));
// var pattern:String =
event.currentTarget.selectedItem.myname;
// pattern = pattern += "," + pattern;
// text1.text = pattern;
<mx:List x="9" y="46" width="121" height="121"
id="lstMarks" allowMultipleSelection="true"
itemClick="createMarksList(event)"></mx:List>
So, your help is required here buddy.
I sitll can't figure out.
Thx -
I get an error message when importing from iPhoto that says, "There is not enough free space on your Aperture Library volume to import the selected items. It is estimated that you need at least 44GB of free space." the drive is empty, I just reformatted it to Mac OSX journaled.
I'm guessing this is an extrenal drive, correct? If so make sure the library you're importimng into is really located on the external drive. By default Aperture creates its library in your home pictures folder.
-
How to get the selected cell in a Matrix.
Hi all,
Does any one know how to get the selected cell in a Matrix. Please help to answer. Thanks in advance.
Regards,
Thanh TranHi,
You can get the value of every cell using UI API but using datasources is a better aproach.
Using UI API you need to know the event you want to catch. Example: Catching click event in itemcode column and getting the value (C#):Ki
if ((pVal.EventType == BoEventTypes.et_CLICK) && //CLICK EVENT
(pVal.ItemUID == "38") && //MATRIX-> ITEM 38
(pVal.ColUID == "1") && //ITEMCODE COLUMN
(!pVal.InnerEvent) &&
(!pVal.BeforeAction))
Form form = null;
try
form = kernel.Application.Forms.Item(pVal.FormUID);
form.Freeze(true);
Matrix mtx = (form.Items.Item(pVal.ItemUID).Specific as Matrix); //MATRIX OBJECT
string itemCode = (mtx.Columns.Item("1").Cells.Item(pVal.Row).Specific as EditText).Value.Trim(); //itemcode = VALUE OF CELL. COLUMN "1": ITEMCODE COLUMN. CURRENT ROW: pVal.Row
catch (Exception ex)
kernel.Application.MessageBox("Error " + ex.Message, 0, "", "", "");
finally
if (form != null)
form.Freeze(false);
Kind regards,
Nauzet Díaz -
How to get the selected values from a selectmanylistbox?
Hi ADF Experts,
<af:selectManyListbox label="Label 1" id="sml1" partialTriggers="cb2"
value="#{viewScope.TestBean.lovValue}"
autoSubmit="true" valuePassThru="true">
<f:selectItems value="#{viewScope.TestBean.actualList}" id="si1"
binding="#{viewScope.TestBean.selectedItems}"/>
</af:selectManyListbox>
<af:commandButton text="get selected values" id="cb3"
actionListener="#{viewScope.TestBean.getSelectedValues}"
partialSubmit="true"/>
private List<String> lovValue;
private List<SelectItem> actualList;
//getters and setters
public void getSelectedValues(ActionEvent actionEvent) {
// Add event code here...
for (String selectedItem : lovValue) {
System.out.println("Selected item: " +selectedItem.); // this is giving 1 and 3 like this. how to get the checked values as I'm getting only the indexes. In this scenario I am populating the list programmatically.Just I wanted to know how can we get the selected values(not indexes). Please suggest.
Thanks-
AbhijitHi Timo,
As I am sharing the page fragment and the Java class. So its my usecase I have mentioned below
I am sharing the jsff page fragment and java class. So that it wud be of help to others.
jsff page fragment
<?xml version='1.0' encoding='UTF-8'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
xmlns:f="http://java.sun.com/jsf/core">
<af:panelGroupLayout id="pgl1">
<af:commandButton text="Search" id="cb1"
actionListener="#{viewScope.TestBean.searchSupplier}"/>
</af:panelGroupLayout>
<af:popup id="p1" binding="#{viewScope.TestBean.searchSupplierPopup}">
<af:dialog id="d2"
type="none">
<af:table value="#{bindings.Contacts.collectionModel}" var="row"
rows="#{bindings.Contacts.rangeSize}"
emptyText="#{bindings.Contacts.viewable ? 'No data to display.' : 'Access Denied.'}"
fetchSize="#{bindings.Contacts.rangeSize}"
rowBandingInterval="0"
binding="#{viewScope.TestBean.tsupportIssues}"
filterModel="#{bindings.ContactsQuery.queryDescriptor}"
queryListener="#{bindings.ContactsQuery.processQuery}"
filterVisible="true" varStatus="vs"
selectionListener="#{bindings.Contacts.collectionModel.makeCurrent}"
rowSelection="multiple" id="t1">
<af:column sortProperty="name" filterable="true" sortable="true"
headerText="#{bindings.Contacts.hints.name.label}" id="c2">
<af:outputText value="#{row.name}" id="ot1"/>
</af:column>
<af:column sortProperty="email" filterable="true" sortable="true"
headerText="#{bindings.Contacts.hints.email.label}"
id="c1">
<af:outputText value="#{row.email}" id="ot2"/>
</af:column>
</af:table>
<af:commandButton text="OK" id="cb5" partialSubmit="true" actionListener="#{viewScope.TestBean.testMethod}"/>
<af:commandButton text="Cancel" id="cb6"
actionListener="#{viewScope.TestBean.cancelPopupSearch}"/>
</af:dialog>
</af:popup>
<af:selectManyListbox label="Label 1" id="sml1" partialTriggers="cb5"
value="#{viewScope.TestBean.lovValue}"
autoSubmit="true" valuePassThru="true"
binding="#{viewScope.TestBean.prp1}">
<f:selectItems value="#{viewScope.TestBean.actualList}" id="si1"
binding="#{viewScope.TestBean.selectedItems}"/>
</af:selectManyListbox>
<af:commandButton text="get selected values" id="cb3"
actionListener="#{viewScope.TestBean.getSelectedValues}"
partialSubmit="true"/>
<af:commandButton text="remove selected" id="cb4"
partialSubmit="true" actionListener="#{viewScope.TestBean.removeSelectedValues}"/>
</jsp:root>
TestBean.java
package com.demo.view;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import javax.faces.component.UISelectItems;
import javax.faces.event.ActionEvent;
import javax.faces.model.SelectItem;
import oracle.adf.model.BindingContext;
import oracle.adf.model.binding.DCBindingContainer;
import oracle.adf.model.binding.DCIteratorBinding;
import oracle.adf.view.rich.component.rich.RichPopup;
import oracle.adf.view.rich.component.rich.data.RichTable;
import oracle.adf.view.rich.component.rich.input.RichSelectManyListbox;
import oracle.adf.view.rich.context.AdfFacesContext;
import oracle.adf.view.rich.event.DialogEvent;
import oracle.jbo.Key;
import oracle.jbo.Row;
import oracle.jbo.RowSetIterator;
import org.apache.myfaces.trinidad.model.RowKeySet;
public class TestBean {
private RichTable tsupportIssues;
private List<SelectItem> lovValue;
private List<SelectItem> actualList;
private RichSelectManyListbox prp1;
private List valuesChoosed = new ArrayList();
private UISelectItems selectedItems;
private RichPopup searchSupplierPopup;
public TestBean() {
super();
public void setTsupportIssues(RichTable tsupportIssues) {
this.tsupportIssues = tsupportIssues;
public RichTable getTsupportIssues() {
return tsupportIssues;
public void testMethod(ActionEvent actionEvent) {
// Add event code here...
// For learning purposes - show Select Many Button clicked
System.out.println("Select Many Button has been Clicked");
// // RowKeySet Object can hold the selected rows from a user as follows
RowKeySet rksSelectedRows = this.getTsupportIssues().getSelectedRowKeys();
// Iterator object provides the ability to use hasNext(), next() and remove() against the selected rows
Iterator itrSelectedRows = rksSelectedRows.iterator();
// Get the data control that is bound to the table - e.g.
// OpenSupportItemsIterator
DCBindingContainer bindings = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
DCIteratorBinding dcIteratorBindings = bindings.findIteratorBinding("findAllContactsIterator");
// Information from binding that is specific to the rows
RowSetIterator rsiSelectedRows = dcIteratorBindings.getRowSetIterator();
// Loop through selected rows
int i=1;
while (itrSelectedRows.hasNext()) {
// Get key for selected row
Key key = (Key)((List)itrSelectedRows.next()).get(0);
// Use the key to get the data from the above binding that is related to the row
Row myRow = rsiSelectedRows.getRow(key);
// Display attribute of row in console output - would generally be bound to a UI component like a Label and or used to call another proces
System.out.println(myRow.getAttribute("name"));
valuesChoosed.add(myRow.getAttribute("name"));
// actualList = new ArrayList<SelectItem>();
// String j = Integer.toString(i);
// actualList.add(new SelectItem(j, (String)myRow.getAttribute("name")));
// i++;
searchSupplierPopup.hide();
AdfFacesContext.getCurrentInstance().addPartialTarget(prp1);
public void setLovValue(List<SelectItem> lovValue) {
this.lovValue = lovValue;
public List<SelectItem> getLovValue() {
return lovValue;
public void setActualList(List<SelectItem> actualList) {
this.actualList = actualList;
public List<SelectItem> getActualList() {
actualList = new ArrayList<SelectItem>();
if(valuesChoosed.size()!=0){
for(int i=0;i<valuesChoosed.size();i++){
actualList.add(new SelectItem(valuesChoosed.get(i), (String)valuesChoosed.get(i)));
else{
actualList.add(new SelectItem("1","Select One"));
return actualList;
public void setPrp1(RichSelectManyListbox prp1) {
this.prp1 = prp1;
public RichSelectManyListbox getPrp1() {
return prp1;
public void setValuesChoosed(List valuesChoosed) {
this.valuesChoosed = valuesChoosed;
public List getValuesChoosed() {
return valuesChoosed;
public void getValues(ActionEvent actionEvent) {
// Add event code here...
for(int i=0;i<valuesChoosed.size();i++){
System.out.println(valuesChoosed.get(i));
public void getSelectedValues(ActionEvent actionEvent) {
// Add event code here...
for(int i=0;i<this.getLovValue().size();i++){
System.out.println("Selected Value:"+this.getLovValue().get(i));
public void removeSelectedValues(ActionEvent actionEvent) {
// Add event code here...
public void setSelectedItems(UISelectItems selectedItems) {
this.selectedItems = selectedItems;
public UISelectItems getSelectedItems() {
return selectedItems;
public void setSearchSupplierPopup(RichPopup searchSupplierPopup) {
this.searchSupplierPopup = searchSupplierPopup;
public RichPopup getSearchSupplierPopup() {
return searchSupplierPopup;
public void cancelPopupSearch(ActionEvent actionEvent) {
// Add event code here...
searchSupplierPopup.hide();
public void searchSupplier(ActionEvent actionEvent) {
// Add event code here...
RichPopup.PopupHints hints = new RichPopup.PopupHints();
searchSupplierPopup.show(hints);
package com.demo.view;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import javax.faces.component.UISelectItems;
import javax.faces.event.ActionEvent;
import javax.faces.model.SelectItem;
import oracle.adf.model.BindingContext;
import oracle.adf.model.binding.DCBindingContainer;
import oracle.adf.model.binding.DCIteratorBinding;
import oracle.adf.view.rich.component.rich.RichPopup;
import oracle.adf.view.rich.component.rich.data.RichTable;
import oracle.adf.view.rich.component.rich.input.RichSelectManyListbox;
import oracle.adf.view.rich.context.AdfFacesContext;
import oracle.adf.view.rich.event.DialogEvent;
import oracle.jbo.Key;
import oracle.jbo.Row;
import oracle.jbo.RowSetIterator;
import org.apache.myfaces.trinidad.model.RowKeySet;
public class TestBean {
private RichTable tsupportIssues;
private List<SelectItem> lovValue;
private List<SelectItem> actualList;
private RichSelectManyListbox prp1;
private List valuesChoosed = new ArrayList();
private UISelectItems selectedItems;
private RichPopup searchSupplierPopup;
public TestBean() {
super();
public void setTsupportIssues(RichTable tsupportIssues) {
this.tsupportIssues = tsupportIssues;
public RichTable getTsupportIssues() {
return tsupportIssues;
public void testMethod(ActionEvent actionEvent) {
// Add event code here...
// For learning purposes - show Select Many Button clicked
System.out.println("Select Many Button has been Clicked");
// // RowKeySet Object can hold the selected rows from a user as follows
RowKeySet rksSelectedRows = this.getTsupportIssues().getSelectedRowKeys();
// Iterator object provides the ability to use hasNext(), next() and remove() against the selected rows
Iterator itrSelectedRows = rksSelectedRows.iterator();
// Get the data control that is bound to the table - e.g.
// OpenSupportItemsIterator
DCBindingContainer bindings = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
DCIteratorBinding dcIteratorBindings = bindings.findIteratorBinding("findAllContactsIterator");
// Information from binding that is specific to the rows
RowSetIterator rsiSelectedRows = dcIteratorBindings.getRowSetIterator();
// Loop through selected rows
int i=1;
while (itrSelectedRows.hasNext()) {
// Get key for selected row
Key key = (Key)((List)itrSelectedRows.next()).get(0);
// Use the key to get the data from the above binding that is related to the row
Row myRow = rsiSelectedRows.getRow(key);
// Display attribute of row in console output - would generally be bound to a UI component like a Label and or used to call another proces
System.out.println(myRow.getAttribute("name"));
valuesChoosed.add(myRow.getAttribute("name"));
// actualList = new ArrayList<SelectItem>();
// String j = Integer.toString(i);
// actualList.add(new SelectItem(j, (String)myRow.getAttribute("name")));
// i++;
searchSupplierPopup.hide();
AdfFacesContext.getCurrentInstance().addPartialTarget(prp1);
public void setLovValue(List<SelectItem> lovValue) {
this.lovValue = lovValue;
public List<SelectItem> getLovValue() {
return lovValue;
public void setActualList(List<SelectItem> actualList) {
this.actualList = actualList;
public List<SelectItem> getActualList() {
actualList = new ArrayList<SelectItem>();
if(valuesChoosed.size()!=0){
for(int i=0;i<valuesChoosed.size();i++){
actualList.add(new SelectItem(valuesChoosed.get(i), (String)valuesChoosed.get(i)));
else{
actualList.add(new SelectItem("1","Select One"));
return actualList;
public void setPrp1(RichSelectManyListbox prp1) {
this.prp1 = prp1;
public RichSelectManyListbox getPrp1() {
return prp1;
public void setValuesChoosed(List valuesChoosed) {
this.valuesChoosed = valuesChoosed;
public List getValuesChoosed() {
return valuesChoosed;
public void getValues(ActionEvent actionEvent) {
// Add event code here...
for(int i=0;i<valuesChoosed.size();i++){
System.out.println(valuesChoosed.get(i));
public void getSelectedValues(ActionEvent actionEvent) {
// Add event code here...
for(int i=0;i<this.getLovValue().size();i++){
System.out.println("Selected Value:"+this.getLovValue().get(i));
public void removeSelectedValues(ActionEvent actionEvent) {
// Add event code here...
for(int i=0;i<this.getLovValue().size();i++){
System.out.println("Selected Value:"+this.getLovValue().get(i));
System.out.println(this.getLovValue().remove(i));
AdfFacesContext.getCurrentInstance().addPartialTarget(prp1);
public void setSelectedItems(UISelectItems selectedItems) {
this.selectedItems = selectedItems;
public UISelectItems getSelectedItems() {
return selectedItems;
public void setSearchSupplierPopup(RichPopup searchSupplierPopup) {
this.searchSupplierPopup = searchSupplierPopup;
public RichPopup getSearchSupplierPopup() {
return searchSupplierPopup;
public void cancelPopupSearch(ActionEvent actionEvent) {
// Add event code here...
searchSupplierPopup.hide();
public void searchSupplier(ActionEvent actionEvent) {
// Add event code here...
RichPopup.PopupHints hints = new RichPopup.PopupHints();
searchSupplierPopup.show(hints);
Thanks,
A. Abhijit -
¿How can I to get the selected index from a table in sapui5?
I have a multiselect table for each item I need to open a Dialog and bind then the table.
How Can I to obtain the index position from my table?
var myTable = sap.ui.getCore().byId(this.sId);
var myItem = sap.ui.getCore().byId(myTable.getSelectedItem());
Thanks in advance.Hi,
You can also use getSelectedContexts of table instance to get the selected indices of sap.m.Table
var aContexts = myTable.getSelectedContexts(true);
for(var i = 0 ; i < aContexts.length ; i++)
var selectedIndex = parseInt(aContexts[i].sPath .split("/")[2]);
Thanks,
Rumeshbabu S -
How to get the selected value in SelectOneMenu in backing bean
Hello all,
I need your help. I want to have 2 select menus with the second menu's items list are populated based on the selection in the first menu. I don't know how to get the selected value in the backing bean so that I can based on that select menu to populate the second menu's item list. Basically I need to access to the UI Component of the first select Menu and retrieve its selected value.
Could you help me out?
Thank you very much in advance,
LngoHi Lingo,
There r two ways of getting the values into the list. First one is hardcoding the values and the second one is use the list and get the values into the list by firing a query in the database.
Inorder to display the values in the second menu based on the first onces selection we need to add an attribute to the first selectonemenu known as valueChangeListener and we need to sumit the page.
Here is the sample code
<h:selectOneMenu id="catalogue"
binding="#{urbean.catalogue}" onchange="submit()"
valueChangeListener="#{urbean.categoryValueChange}"
<f:selectItem itemLabel="Select Catalogue" itemValue="" />
<f:selectItems value="#{urbean.catalogueList}" />
</h:selectOneMenu>
<h:selectOneMenu id="category"
binding="#{urbean.category}"> <f:selectItem itemLabel="Select Category" itemValue="" />
<f:selectItems value="#{urbean.categoryList}" />
< </h:selectOneMenu>
now in method called by valuechangelistener we need to write the similar code
public void categoryValueChange(ValueChangeEvent event) {
String rfnum = (String) event.getNewValue();
List categoryList = new ArrayList();
List tempList = new TablenameDAO().getActiveCatByCatalogueID(rfnum);
for (int i = 0; i < tempList.size(); i++) {
Tablename tablename = (Tablename ) tempList.get(i);
String value = "" + tablename .getrfnum();
String label = tablename .getname();
if (label == null) {
label = "";
SelectItem item = new SelectItem(value, label);
categoryList.add(item);
bean.setCategoryList(categoryList);
///getActiveCatByCatalogueID (rfnum) should bring the records which r based on the rfnum
if u follow this process i am damsure that u will get the values in to the secondlist based upon the first list
Thanks & Regards
Manidhar -
How do i get the selected index in jsp from a select "in the same page!!!"
i dont if it si possible but i want to get the selected index form a select implmenting javascript jsp an html something like this:
html:select property="slcLocation" onchange="updateList(this.form)">
<% for (int i=0; i< user.getNumLocaliza();i++)
out.println("<option selected>" + user.getLocation(i,1));
%>
</html:select> </div></td>
...i try it in the same page but it fails, the code is:
<html:select property="slcLocation" onchange="document.location.href='cajaApertura.jsp?slcLocation='+this.options[this.selectedIndex].value">
<%
for (int i=0; i< user.getNumLocaliza();i++)
out.println("<option>" + user.getLocation(i,1));
%>
</html:select>
</div></td>
</tr>
<tr>
<td><div align="left"><font size="1"><strong><font color="#FFFFFF" face="Verdana, Arial, Helvetica, sans-serif">Caja:</font></strong></font></div></td>
<td bgcolor="#C4B4F3"><div align="center">
<html:select property="slcCaja" onchange="document.location.href='cajaApertura.jsp?asdf='+this.options[this.selectedIndex].value">
<%
int caja;
if (request.getParameter("slcLocation")!=null)
//for (int i=0; i< cajaLocation.getNumCajas (request.getParameter("slcLocation"));i++)
for (int i=0; i< 3;i++)
caja = i+1;
out.println("<option> Caja p " + caja + request.getParameter("slcLocation"));
}else
for (int i=0; i< cajaLocation.getNumCajas (user.getLocation(0,1));i++)
caja = i+1;
out.println("<option> Caja " + caja);
%>
</html:select>
is this correct? what is my mistake?
tnks for your help -
How to find the selected item in alv grid or table control
can any one tell me please
how to find the selected item in alv grid or table controlIn table control, If you goto screen painter and goto table control properties ( f2 ), there is one check-box w/selColumn check that and give column name. Then add that column to your internal table.
IN PAI
LOOP AT it_tkhdr.
FIELD it_tkhdr-sel_row
MODULE tab_tkhdr_mark ON REQUEST.
ENDLOOP.
MODULE tab_tkhdr_mark INPUT.
MODIFY it_tkhdr INDEX tc_tkhdr-current_line.
ENDMODULE. " tab_tkhdr_mark INPUT
here it_TKHDR is internal table sel_row is field for selection
After that, you can loop at it_tkhdr where sel_row is 'X' to get selected rows.
regards,
Gagan -
How to check the selected items of a selectManyListbox in doDML of an EO ?
Hello,
I have a VO based on en EO. During the doDML(UPDATE) of that EO, I would like to check what items of a af:selectManyListbox have been selected.
How could I get the checked items in the selectManyListbox (which belongs to the ViewController) in the doDML method of an EO (which belongs to the Model)?
Many thanksHello John,
I know I cannot access the component directly. This is why I asked my question.
The real case is rather complex and long to be copied and pasted here.
Let me simplify it without being too generic.
The VO is based on a hierarchical SQL query. All its EO attributes are transient. This VO is shown as a Tree in the page.
Each node of the Tree has a checkBox. During commit (doDML() of the EO to be precise), for each checked node I need to access the selected items of a selectManyListbox in some proper way to perform further operations on the DB (no matter what now). The selectManyListbox is based on a second VO. As you may understand, the problem is that from the EO I don't have a direct access to the selectManyListbox. Also, as far as I know, the VO the selectManuListBox is based on does not have any informations about the selected elements, since the checkBox in the list cannot be associated to the VO. Basically I cannot know what elements have been choosen.
I hope the problem is clear.
Maybe you are looking for
-
Clarification on tax base amount
Hello SAP Gurus I need some clarification on tax base amount. when we make PO, there is a base amount of material and has excise conditions. now when we do MIGO with capture & post excise, one excise tab comes in item details, which shows all the dut
-
Re: Demand calculation from forecast figures
Hi All experts, I am trying to configure a test scenarion for my client. He has a scenario where the demnad for the FG will calculated from the previous consumption figures. To map this I have tried to use the forecast view of the material master whe
-
I'm unable to open 3D files in Photoshop even though I have a brand new iMac, Retina 5K, 32Gigs Ram, 4Gigs Vram (AMD Radeon R9 M295X). Keep getting an error that 'open GL' needs to be turned on, which it is and all memory allocations are maxed out. A
-
When will the droid maxx get 5.0
any news on when will the droid maxx gets Android 5.0
-
How do I solve not being able to scroll or enter letters for search topics
I am having trouble scrolling while on the internet. Also having problems typing in letters for the search topic. What do I need to do to get this corrected. Have done virus scans daily for 2 weeks with no viruses found. Have also removed all cookies