on 09-17-2005 7:58 AM
Hi,
I could able to bring data in dropdownListBox using JCO architecture, but when I am selecting the data and clicking on the button, nothing has been displayed.
I am using the attribute getSingleSelection to retreive the data, I want to know whether it works or not. If not, what attribute I need to choose??
Thanks in advance,
Sriram.
Hi sree,
SingleSelection is a boolean attribute which states if more then one entry can be selected at a time.
In a DropdownListBox IListModel it must be true.
You need to use getSelection().
Hope that helps,
Yoav.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Patrick,
Im getting the error that there in no object like getSelection() method.
i m not able to get the item im selecting in DDLB.
my intension is to get the item selected in DDlB and display in TABLE VIEW.
I m not able to get the display the item i select in DDLB.
Plz suggest me i giving some code.
Thanks in advance
Hi Sree,
Here's some very simple code as an example of how a DropdownLisBox can be used in an iView.
Make an iView out of this and have a look at what it does, read through the code and see what's going on.
import com.sapportals.htmlb.DropdownListBox;
import com.sapportals.htmlb.Form;
import com.sapportals.htmlb.GridLayout;
import com.sapportals.htmlb.Label;
import com.sapportals.htmlb.event.Event;
import com.sapportals.htmlb.page.DynPage;
import com.sapportals.htmlb.page.PageException;
import com.sapportals.portal.htmlb.page.PageProcessorComponent;
public class DDLBTest extends PageProcessorComponent{
private String selection = "";
public DynPage getPage(){
return new OutputDynPage();
}
public class OutputDynPage extends DynPage{
public void doInitialization(){
}// End doInitialization
public void doProcessAfterInput() throws PageException{
}// End doProcessAfterInput
public void doProcessBeforeOutput() throws PageException{
Form myForm = this.getForm();
GridLayout gl = new GridLayout();
myForm.addComponent(gl);
DropdownListBox dd = new DropdownListBox("myDropdown");
dd.addItem("00", "Please Select");
dd.addItem("01", "Line One");
dd.addItem("02", "Line Two");
dd.addItem("03", "Line Three");
dd.setOnSelect("onSelect");
Label lb = new Label("myLabel");
lb.setText(selection);
gl.addComponent(1, 1, dd);
gl.addComponent(2, 1, lb);
}// End doProcessBeforeOutput
public void onSelect(Event evt){
Form myForm = this.getForm();
DropdownListBox dd = (DropdownListBox)this.getComponentByName("myDropdown");
selection = <b>dd.getSelection()</b>;
}// End method onSearch
}
}// End class DDLBTest
I hope that it helps you, if you have any questions, just ask.
Patrick.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.