How to get the selected values from the shuttle
Hi
Please tell me how to get the selected option values from the shuttle leading list.
Thanks
you can also obtain the option values present in the leading and trailing lists using the
following methods:
public String[] getLeadingListOptionValues(OAPageContext pageContext, OAWebBean
webBean)
public String[] getTrailingListOptionValues(OAPageContext pageContext, OAWebBean
webBean)For example, the following code sample returns an array of values in the trailing list, ordered according to the
order in which they appear in the list:
String[] trailingItems =
shuttle.getTrailingListOptionValues(pageContext, shuttle);Thanks
--Anil
Similar Messages
-
Need to get the selected values from the selectManyShuttle
Hi,
I am using ADF11g newer version.
I have a selectManyShuttle and a command button. Need to insert all the selected values on the right hand side of the selectManyShuttle into a database table.
I created the selectManyShuttle with the values. Need help in getting the values on the right hand side.
<af:selectManyShuttle value="#{bindings.UserMgmtVO1.inputValue}"
id="sms2">
<f:selectItems value="#{bindings.UserMgmtVO1.items}"
id="si6"/>
</af:selectManyShuttle>
Any sample code or link is really appreicated.
ThanksThanks for the reply.
I am using a View Object and I dropped it as SelectManyShuttle
<af:selectManyShuttle value="#{bindings.UserMgmtVO1.inputValue}"
id="sms2"
valueChangeListener="#{POBacking.getSelectedValues}"
valuePassThru="true"
autoSubmit="true">
<f:selectItems value="#{bindings.UserMgmtVO1.items}"
id="si6"/>
</af:selectManyShuttle>
public void getSelectedValues(ValueChangeEvent valueChangeEvent) {
System.out.println("Testing Shuttle");
ArrayList list = new ArrayList(Arrays.asList(valueChangeEvent.getNewValue()));
String val = "";
String sqlStmt = "";
try {
if (list != null) {
for (int i = 0; i < list.size(); i++) {
int l = list.size() - 1;
val = list.get(l).toString(); //returns , delimited string
System.out.println(" value:" + val);
if (val != null) {
val = val.replaceAll("[\\[\\]]", ""); //remove []
StringTokenizer st = new StringTokenizer(val, ",");
int nto = st.countTokens();
for (int j = 0; j < nto; j++) {
String users = st.nextToken().trim();
System.out.println("Users:" + users);
//sqlStmt = " update xxpp_project_clip set clip_status='true', clip_seq = "+j * 10+
// " where project_id = "+rHdr.getAttribute("ProjectId") +
// " and clip_name ='"+ clip_Name +"'";
//System.out.println("sqlStmt:" + sqlStmt);
//stmt.executeUpdate(sqlStmt);
//am.getDBTransaction().commit();
//if (stmt != null)
// stmt.close();
// am.getDBTransaction().commit();
} catch (Exception ex) {
ex.printStackTrace();
I don't see the values in the list.
I gets printed as
value:[Ljava.lang.Integer;@1b10691
Users:Ljava.lang.Integer;@1b10691
how to get the individual values in the list?
Thanks
Saru -
How to capture the selected values from module pool dialog list box !
Hi experts,
Can anyone help me out in capturing the values from the list box.
i am able to set the values in the list box.But i am not able to capture the selected value from the list box. Always the list box name is getting as "space"
I also tried in using the FM "VRM_GET_VALUES" but it is retireving all the values. Is there is any flag for filttering out the selected value.
Your inputs are appreciated.
Thanks,
Vijay.Along with the PBO and PAI event, add a POV event in the flow logic of the screen
DEMO_DROPDOWN_LIST_BOX -is a good demo example.
PROCESS ON VALUE-REQUEST.
FIELD structure_name-field_name MODULE create_dropdown_box.
In the report :
MODULE create_dropdown_box INPUT.
SELECT carrid carrname
FROM scarr
INTO CORRESPONDING FIELDS OF TABLE itab_carrid.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'CARRID'
value_org = 'S'
TABLES
value_tab = itab_carrid
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
IF sy-subrc <> 0.
ENDIF.
ENDMODULE.
In the layout, assign a Function Code , for eg : 'SELECTED' to the listbox and lets say name of the field is SDYN_CONN-CARRID. So in the PAI module,
MODULE user_command_0100 INPUT.
CASE ok_code.
WHEN 'SELECTED'.
MESSAGE i888(sabapdocu) WITH sdyn_conn-carrid.
ENDCASE.
ENDMODULE.
sdyb_conn-carrid will contain your selected field -
How to get the selected values from multiselected list
Hi,
I have a multiselect list displaying all the years from 2003 to 2008 (used dynamic LOV). The user can choose one or more years as per his needs, and then when user clicks on the link the selected values of the list are to be captured and a pop up page of a Discoveror report needs to be opened where these years get passed as a parameter. I tried several methods to capture the value, but either one or all are getting passed but not exactly what the user has chosen.
This is how it looks:
P2_FISCAL_YEAR is a multiselect list containing values from 2003,2004... 2008
If user chooses 2004 and 2007
then I want the url to capture these values and pass as parameters for my discoveror reports. as '&qp_fiscal_year=2004,2007'
Any help is appreciated!
Thanks in advance,
Sapna.Hi,
I have a multiselect list displaying all the years from 2003 to 2008 (used dynamic LOV). The user can choose one or more years as per his needs, and then when user clicks on the link the selected values of the list are to be captured and a pop up page of a Discoveror report needs to be opened where these years get passed as a parameter. I tried several methods to capture the value, but either one or all are getting passed but not exactly what the user has chosen.
This is how it looks:
P2_FISCAL_YEAR is a multiselect list containing values from 2003,2004... 2008
If user chooses 2004 and 2007
then I want the url to capture these values and pass as parameters for my discoveror reports. as '&qp_fiscal_year=2004,2007'
Any help is appreciated!
Thanks in advance,
Sapna. -
How can i get the all values from the Property file to Hashtable?
how can i get the all values from the Property file to Hashtable?
ok,consider my property file name is pro.PROPERTIES
and it contain
8326=sun developer
4306=sun java developer
3943=java developer
how can i get the all keys & values from the pro.PROPERTIES to hashtable
plz help guys..............The Properties class is already a subclass of Hashtable. So if you have a Properties object, you already have a Hashtable. So all you need to do is the first part of that:Properties props = new Properties();
InputStream is = new FileInputStream("tivoli.properties");
props.load(is); -
Urgent: How to exclude a particular value from the selection in the infopac
How to exclude a particular value from the selection in the infopackage.
Ex: not load for cost center 10000
Thank you,
samHi Sam,
You cannot do this directly as exclusion, but you can include all other values, even as ranges and thus exclude the particular value, else you can also try to do this by writing a routine.
Hope this helps... -
How to directly get the selected value in the dropdown
Hi Experts
Now, in POV, i want to directly get the selected value in the dropdown. Because, the program doesn't enter the PAI before POV part. Therefore, the corresponding variable of dropdown doesn't store the selected value. That's reason why i want to find a way to directly get the selected value in the dropdown. is there any function module to do this?you can use INITIALIZATION event which triggers first before any other events..
and u can use VRM_SET_VALUES to populate the values in the list
DATA : v TYPE vrm_values.
DATA : vw LIKE LINE OF v.
INITIALIZATION.
vw-key = '1'.
vw-text = 'ABC'.
APPEND vw TO v.
vw-key = '2'.
vw-text = 'DEF'.
APPEND vw TO v.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = 'A'
values = v.
PARAMETERS : a TYPE c VISIBLE LENGTH 10 AS LISTBOX. -
How can I access the Attribute Values from the Search Region
Hi all,
I have a table which contains Company id, department id, and PositonId. For a particular Company and Department there may be multiple records.
I have to pupulate a table which contains the position and other details that comes under a particular Department and Position based on the selection in the Three comboBoxes.
Also I have to populate a select many Shuttle to add new postions and records under a particular Department.
I created a query panel *(Search Region)* for the serch and a table to display the data. That is working fine.
Now the issue is I am using a view criteria to populate the shuttle with two bind variables ie, DepartmentId and CompanyId.
If the serach will return a resuktant set in the table it will also pupulate the correct records, otherwise ie, if the if the serch result is empty the corresponding iterator and the attribute is setting as null.
SO I want to access the attribute values from the Search Region itsef to populate the shuttle.
I don't know how can I access the data from the Search Region.
Please Help.
Regards,
Ranjithyou could access the parameters entered in search region by the user as follows:
You can get handle to the value entered by the user using queryListener method in af:query.
You can intercept the values entered as described
public void onQueryList(QueryEvent queryEvent) {
// The generated QueryListener replaced by this method
//#{bindings.ImplicitViewCriteriaQuery.processQuery}
QueryDescriptor qdes = queryEvent.getDescriptor();
//get the name of the QueryCriteria
System.out.println("NAME "+qdes.getName());
List<Criterion> searchList = qdes.getConjunctionCriterion().getCriterionList();
for ( Criterion c : searchList) {
if (c instanceof AttributeCriterion ) {
AttributeCriterion a = (AttributeCriterion) c;
a.getValues();
for ( Object o : a.getValues()){
System.out.println(o.toString());
//call default Query Event
invokeQueryEventMethodExpression("#{bindings.ImplicitViewCriteriaQuery.processQuery}",queryEvent);
public void onQueryTable(QueryEvent queryEvent) {
// The generated QueryListener replaced by this method
//#{bindings.ImplicitViewCriteriaQuery.processQuery}
QueryDescriptor qdes = queryEvent.getDescriptor();
//get the name of the QueryCriteria
System.out.println("NAME "+qdes.getName());
invokeQueryEventMethodExpression("#{bindings.ImplicitViewCriteriaQuery.processQuery}",queryEvent);
private void invokeQueryEventMethodExpression(String expression, QueryEvent queryEvent){
FacesContext fctx = FacesContext.getCurrentInstance();
ELContext elctx = fctx.getELContext();
ExpressionFactory efactory = fctx.getApplication().getExpressionFactory();
MethodExpression me = efactory.createMethodExpression(elctx,expression, Object.class, new Class[]{QueryEvent.class});
me.invoke(elctx, new Object[]{queryEvent});
Thanks,
Navaneeth -
Hi all,
I am making a vi where I have to save the selected value from listbox with its respective tab control dropdown selcted values in another listbox.Whenever I select Item1 then the heading change and respective tab will open for that item.But Now I just want to save the selection and put it in another ListBox.SO that I can renmove or add according to my wish. Plz help me.
Solved!
Go to Solution.
Attachments:
my_vi.png 83 KBHi, I successfully make the vi to insert itmes from listbox1 to listbox2.Whenever I select itmes 1 in listbox 1 it display same elected item in listbox2 , but it not appending the items in listbox2.Like If 1 is selected in listbox1 then 1 will display , next time after saving when I selct next item like 3 then in listbox 2, 1 is replaced by 3,it dont come in second row of listbox2.Hope I am able to explain.\
Plz help me to resolve this.
Attachments:
listbox_update.vi 11 KB -
How to clear the selected values in the JCombobox
Hi All,
Can you please tell - how to clear the selected values in the JCombobox
I have four dropdowns in my application, When I click "CLEAR" button, what ever the values selected in the four drop downs should go off and view as "SELECT" in all the dropdowns.In addition to the above you should also check out [Combo Box Prompt|http://www.camick.com/java/blog.html?name=combo-box-prompt] which makes it easy to display the default prompt.
-
How to get updated table values from objectlistdataproviders
how to get updated table values from objectlistdataproviders
Hi,
Here is a sample code
start-of-selection.
*Select the data you need into an internal table
loop at it_mara into wa_mara.
data that needs to be displayed in the output list
write:/ box as checkbox,
wa_mara-matnr under text-001,
wa_mara-maktx under text-002,
wa_mara-lgort under text-003.
Hide the data that needs to moved to internal table
hide:wa_mara-matnr, wa_mara-maktx, wa_mara-lgort.
endloop.
clear wa_mara.
end-of-selection.
lines = sy-linno.
at line-selection.
clear:it_matnr.
do lines times.
check sy-index > 1.
box = space.
read line sy-index field value box.
if box = 'X'.
*data selected using check box is moved to internal table
append wa_mara to it_matnr.
endif.
enddo.
Regards,
Jisha. -
Need help Take out the null values from the ResultSet and Create a XML file
hi,
I wrote something which connects to Database and gets the ResultSet. From that ResultSet I am creating
a XML file. IN my program these are the main two classes Frame1 and ResultSetToXML. ResultSetToXML which
takes ResultSet & Boolean value in its constructor. I am passing the ResultSet and Boolean value
from Frame1 class. I am passing the boolean value to get the null values from the ResultSet and then add those
null values to XML File. When i run the program it works alright and adds the null and not null values to
the file. But when i pass the boolean value to take out the null values it would not take it out and adds
the null and not null values.
Please look at the code i am posing. I am showing step by step where its not adding the null values.
Any help is always appreciated.
Thanks in advance.
============================================================================
Frame1 Class
============
public class Frame1 extends JFrame{
private JPanel contentPane;
private XQuery xQuery1 = new XQuery();
private XYLayout xYLayout1 = new XYLayout();
public Document doc;
private JButton jButton2 = new JButton();
private Connection con;
private Statement stmt;
private ResultSetToXML rstx;
//Construct the frame
public Frame1() {
enableEvents(AWTEvent.WINDOW_EVENT_MASK);
try {
jbInit();
catch(Exception e) {
e.printStackTrace();
//Component initialization
private void jbInit() throws Exception {
//setIconImage(Toolkit.getDefaultToolkit().createImage(Frame1.class.getResource("[Your Icon]")));
contentPane = (JPanel) this.getContentPane();
xQuery1.setSql("");
xQuery1.setUrl("jdbc:odbc:SCANODBC");
xQuery1.setUserName("SYSDBA");
xQuery1.setPassword("masterkey");
xQuery1.setDriver("sun.jdbc.odbc.JdbcOdbcDriver");
contentPane.setLayout(xYLayout1);
this.setSize(new Dimension(400, 300));
this.setTitle("Frame Title");
xQuery1.setSql("Select * from Pinfo where pid=2 or pid=4");
jButton2.setText("Get XML from DB");
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
catch(java.lang.ClassNotFoundException ex) {
System.err.print("ClassNotFoundException: ");
System.err.println(ex.getMessage());
try {
con = DriverManager.getConnection("jdbc:odbc:SCANODBC","SYSDBA", "masterkey");
stmt = con.createStatement();
catch(SQLException ex) {
System.err.println("SQLException: " + ex.getMessage());
jButton2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(ActionEvent e) {
jButton2_actionPerformed(e);
contentPane.add(jButton2, new XYConstraints(126, 113, -1, -1));
//Overridden so we can exit when window is closed
protected void processWindowEvent(WindowEvent e) {
super.processWindowEvent(e);
if (e.getID() == WindowEvent.WINDOW_CLOSING) {
System.exit(0);
void jButton2_actionPerformed(ActionEvent e) {
try{
OutputStream out;
XMLOutputter outputter;
Element root;
org.jdom.Document doc;
root = new Element("PINFO");
String query = "SELECT * FROM PINFO WHERE PID=2 OR PID=4";
ResultSet rs = stmt.executeQuery(query);
/*===========This is where i am passing the ResultSet and boolean=======
===========value to either add the null or not null values in the file======*/
rstx = new ResultSetToXML(rs,true);
} //end of try
catch(SQLException ex) {
System.err.println("SQLException: " + ex.getMessage());
======================================================================================
ResultSetToXML class
====================
public class ResultSetToXML {
private OutputStream out;
private Element root;
private XMLOutputter outputter;
private Document doc;
// Constructor
public ResultSetToXML(ResultSet rs, boolean checkifnull){
try{
String tagname="";
String tagvalue="";
root = new Element("pinfo");
while (rs.next()){
Element users = new Element("Record");
for(int i=1;i<=rs.getMetaData().getColumnCount(); ++i){
tagname= rs.getMetaData().getColumnName(i);
tagvalue=rs.getString(i);
System.out.println(tagname);
System.out.println(tagvalue);
/*============if the boolean value is false it adds the null and not
null value to the file =====================*/
/*============else it checks if the value is null or the length is
less than 0 and does the else clause in the if(checkifnull)===*/
if(checkifnull){
if((tagvalue == null) || tagvalue.length() < 0 ){
users.addContent((new Element(tagname).setText(tagvalue)));
else{
users.addContent((new Element(tagname).setText(tagvalue)));
else{
users.addContent((new Element(tagname).setText(tagvalue)));
root.addContent(users);
out=new FileOutputStream("c:/XMLFile.xml");
doc = new Document(root);
outputter = new XMLOutputter();
outputter.output(doc,out);
catch(IOException ioe){
System.out.println(ioe);
catch(SQLException sqle){Can someone please help me with this problem
Thanks. -
How t print out selected values from a Jlist
hi iam trying to get the selected values from a list to print out as a string but iam getting ,Invalid cast from java.lang.Object[] to java.lang.String.is there any way to get the selected values t print ut as a string?? import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class MultipleSelection2 extends JFrame {
private JList colorList, copyList;
private JButton copy;
private String colorNames[] =
{ "Black", "Blue", "Cyan", "Dark Gray", "Gray",
"Green", "Light Gray", "Magenta", "Orange", "Pink",
"Red", "White", "Yellow" };
public MultipleSelection2()
super( "Multiple Selection Lists" );
Container c = getContentPane();
c.setLayout( new FlowLayout() );
colorList = new JList( colorNames );
colorList.setVisibleRowCount( 5 );
colorList.setFixedCellHeight( 15 );
colorList.setSelectionMode(
ListSelectionModel.MULTIPLE_INTERVAL_SELECTION );
c.add( new JScrollPane( colorList ) );
// create copy button
copy = new JButton( "Copy >>>" );
copy.addActionListener(
new ActionListener() {
public void actionPerformed( ActionEvent e )
// place selected values in copyList
copyList.setListData(
colorList.getSelectedValues());
String s1 =(String)colorList.getSelectedValues();Since the JList method 'getSelectedValues' returns an object array you'll need to iterate through the array and cast each object in the array to a string as you access them.
Object[] o = colorList.getSelectedValues();
for(int count=0,end=o.length; count<end; count++) {
String s = (String) o[count];
Hope that helps
Talden -
How do I pass selected values from dynamic LOV to Command SQL in Oracle
My environment:
Crystal 11
Oracle 10
I've created and tuned a SQL script for a report. In the Database Expert, I've copied the SQL into a Command. I've modified the Command to create 3 parameters.
I need help with the following:
1) How do I create a dynamic, cascading LOV and associated prompt group for the three parameters defined in the Command?
2) How do I pass the user selected valueS from the prompt group into the Command SQL as limits applied to the query executed against the database?I have the same problem with same environment .
The main report is having a 2 level cascading dynamic parameters.
I created a sub report with a command as below.
*select * from (*
select DATUM,MSEC,CNT,B1_NAME,B2_NAME,B3_NAME,ELEM_NAME,INFO_NAME,m.INFOTYPE,V.NAME,rank()
over (partition by B1_NAME,B2_NAME,B3_NAME order by DATUM desc ,MSEC desc,CNT desc) currentRank
from MESSAGES m,INTYDE i,VANAME v
where DATUM <=SYSDATE and trim(B1_NAME)='{?B1Name}'
and trim(B2_NAME)='{?B2Name}'
and m.INFOTYPE=i.INFOTYPE
and i.VALUE_NAME_NUMBER = v.VALNUM) where currentRank=1
I needs to pass cmbination of B1Name and B2Name from main report. I created a formula like
formula=Join({?B1Name},{?B2Name}),'|'); But this is showing some error.
and How I will substitute this in my command . As I new to Crystal XI help expected. -
Accessing the email value from the iPhone AddressBook
Need some help getting the email value from the AddressBook. This is what I have so far ...
Used to open up the picker and limit to email only
-(void) browseButtonPressed:(id)sender
ABPeoplePickerNavigationController* controller = [[ABPeoplePickerNavigationController alloc] init];
controller.peoplePickerDelegate = self;
NSNumber* emailProp = [NSNumber numberWithInt:kABPersonEmailProperty];
controller.displayedProperties = [NSArray arrayWithObject:emailProp];
controller.navigationBar.tintColor = [UIColor blackColor];
[self presentModalViewController:controller animated:YES];
The delegate method in the same class
- (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker
shouldContinueAfterSelectingPerson:(ABRecordRef)person
property:(ABPropertyID)property
identifier:(ABMultiValueIdentifier)identifier
NSString *email = (NSString *)ABRecordCopyValue(person, kABPersonEmailProperty);
NSLog(@"selected person: %@", email);
[[peoplePicker parentViewController] dismissModalViewControllerAnimated:YES];
return NO;
The NSLog prints the following ...
selected person: <NSCFType: 0x1d81c0>
Any idea why it's not printing a string rather I am getting NSCFType ?Great Post. One of the few times that I was able to come to a conclusion about the code I need. Here is an example of the delegate method in reference to getting the email address.
- (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker shouldContinueAfterSelectingPerson:(ABRecordRef)person property:(ABPropertyID)property identifier:(ABMultiValueIdentifier)identifier
ABMultiValueRef emails = ABRecordCopyValue(person, property);
CFStringRef email = ABMultiValueCopyValueAtIndex(emails, identifier);
NSLog( (NSString *) email);
self.receiverEmail.text = (NSString *) email;
[self.tabBarController dismissModalViewControllerAnimated:YES];
return NO;
}
Maybe you are looking for
-
Photoshop CS4 program error: deleted prefs, keeps coming back instantly
I am running Photoshop CS4 extended on my Mac OS X 10.5.6 OS. Out of no where, I create a new file, try to fill a layer with a solid color, I get the generic program error message. I click OK to get rid of it, but it is erratic. I have to force quit
-
Error "conversion of a text from codepage '4102' to codepage '1100' "
Hello, If some could help me with this error while tryning to transfer a structure containning the character "u20AC" to a file: OPEN DATASET p_fic FOR OUTPUT IN text MODE ENCODING non-unicode. transfer wt_textes to p_fic. close datas
-
Hi Folks, when i do a billing I am getting a message saying foreign trade data incomplete. Then i went to VF02 transaction and made following changes.. 1. Goto->Header->Foreign trade data/Customs. There i gave values for modeoftransport Border and D
-
How can I use In Private browsing alongside already open regular browsing window?
Hi, Whenever we start Private browsing, the existing tabs and windows we are currently working on closes and reopens only when the Private browsing is stopped. What we exactly need is, a new Private browsing window should open so that we could work o
-
How to increase the size of a particular icon in MBP Desktop ?
Hii..i want to increase the size of a particular icon alone in my desktop.. i tried downloading larger icon but the icon does not display ?? how to do it ? Thanks, Regards -Rathish [email protected]