Drop Lists & SQL
Forte Users,
Is there any method of putting an SQL response into a droplist?
Well, the only way I know is like the code below. But there's a problem.
Hope you can help me.
============
-- Insert value into DB
-- Table is : sigl_orgao varchar2 not null, numseq number not null, data
-- date
sql insert into DELHABILIDADE_ORGAO
values ( 'MG' , 1 , '' )
on session OracleDBSEssion;
-- Create Target Array for SQL
Orgao_Temp : Array of TextData = new;
-- Select from database into Orgao_Temp
-- The problem is here: if there is more then one row with identical
-- column value
-- forte raises an exception and says:
-- Select more than 1 row(s). The extra results were cancelled.
sql select sigl_orgao into :Orgao_Temp
from DEL_HABILIDADE_ORGAO
on session OracleDBSESSION;
-- Creat the list for setting the droplist
-- If the array Orago_Temp is OK, this code fragment works pretty well. I
-- tested it before.
Orgao_list : Array of ListElement = new;
cont : integer;
cont = 0;
for p in Orgao_Temp
do
cont = cont + 1;
OrgaoList[cont] = new ( IntegerValue = cont , TextValue=p.Value);
end for;
-- Set the droplist
<Orgao>.SetElementList(Orgao_List);
===================
Could anyone help me?
C.M. Motta
C.M.,
As to how to retrieve ListElement values from a database table,
another solution you may avail yourself of with Oracle is to use "column aliasing".
A listelement has several attributes: textvalue, integervalue, and objectvalue.
you can select directly into an array of listelement with a query of the form:
aListElement : ListElement = new;
sql select ORACLECOLUMN1 "integervalue",
ORACLECOLUMN2 "textvalue"
into :aListElement
from <table>
on session <session>;
or
result : array of ListElement;
sql select ORACLECOLUMN1 "integervalue", ORACLECOLUMN2 "textvalue"
into :result
from <table>
...and so on
The column aliasing assists the forte/dbms API to match attribute names to column names.
-John
>>
>>
Is there any method of putting an SQL response into a droplist?
Well, the only way I know is like the code below. But there's a problem.
Hope you can help me.
============
-- Insert value into DB
-- Table is : sigl_orgao varchar2 not null, numseq number not null, data
-- date
sql insert into DELHABILIDADE_ORGAO
values ( 'MG' , 1 , '' )
on session OracleDBSEssion;
-- Create Target Array for SQL
Orgao_Temp : Array of TextData = new;
-- Select from database into Orgao_Temp
-- The problem is here: if there is more then one row with identical
-- column value
-- forte raises an exception and says:
-- Select more than 1 row(s). The extra results were cancelled.
sql select sigl_orgao into :Orgao_Temp
from DEL_HABILIDADE_ORGAO
on session OracleDBSESSION;
-- Creat the list for setting the droplist
-- If the array Orago_Temp is OK, this code fragment works pretty well. I
-- tested it before.
Orgao_list : Array of ListElement = new;
cont : integer;
cont = 0;
for p in Orgao_Temp
do
cont = cont + 1;
OrgaoList[cont] = new ( IntegerValue = cont , TextValue=p.Value);
end for;
-- Set the droplist
<Orgao>.SetElementList(Orgao_List);
===================
Could anyone help me?
C.M. Motta**************************************
John Jamison
Sage Solutions, Inc.
353 Sacramento Street, Suite 1360
San Francisco, CA 94111
415 392 7243 x 306
[email protected]
Similar Messages
-
The drop list is supposed to be populated by a form before the user enters the jsp page. The error is - "Failed to obtain specified collection". I think it is a servlet call or the logic of javascript and JSP whichever either process first. I'm trying to do the droplist, then I'll be doing the chain droplist by subcategories via ajax call. Any other strategies might be nice. I added the <body onload="retrieveCategories();"> to call the function in the js -
var req;
function retrieveCategories() {
var url = "/CategoriesAction/categories;"
if (window.XMLHttpRequest) {
req = new XMLHttpRequest();
else if (window.ActiveXObject) {
req = new ActiveXObject("Microsoft.XMLHTTP");
req.open("Get", url, true);
req.send();
}struts-config.xml - the js should get this info and call CategoriesAction.
<action input="/addsheet.jsp" name="refsheetsForm" path="/categories" scope="request" type="com.refsheets.struts.CategoriesAction" validate="false"/> This code summons the struts Action - CategoriesAction. It gets the list of categories from database and setAttribute in the form. I'm not sure if it's right - request.setAttribute(categories, list); I basically set the first parameter to the form - Collection categories, and supply the list(data) to be set in.
public class CategoriesAction extends Action {
/* forward name="success" path="" */
private final static String SUCCESS = "success";
Collection list = new ArrayList();
String categories = "categories";
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
DAOFactory TomcatFactory =
DAOFactory.getDAOFactory(DAOFactory.TOMCAT);
ClientDAO clientdao = TomcatFactory.getClientDAO();
list = clientdao.getCategories();
request.setAttribute(categories, list);
return mapping.findForward(SUCCESS);
}the form - as you can see the setCategories(Collection categories) it should be set up before the droplist requests this collection.
public Collection getCategories() {
return categories;
public void setCategories(Collection categories) {
this.categories = categories;
}The jsp page - placed the keys to get the form data. I couldn't figure out why it is still returning an error.
<html:select property="category" value="Select Categories">
<html:optionsCollection property="categories"/>
</html:select>I'm not sure what do you meant - id & category.
this collection only returns from a SQL statement which is
Games
Programming
Software Development
Hardware
The 'bean class' is an Action class? if you are talking about this - it's - request.setAttribute(categories, list);
It'll be
<html:select property="category" value="Select Categories">
<html:optionsCollection property="categories" value="list" label="category"/>
</html:select>It didn't work, it still returned an error. -
I bought an I pad 2 from us but I can not activate the Facetime in UAE(Dubai)as I can not see the country in the I pad's drop list, anyone has an idea as to how to resolve this issue
I'm not that familiar with how FaceTime works. I know how to set It up but I don't use it. I just know that you can't activate in the UAE. I believe that you can activate in any country that permits it's use. Whether you will need a new ID or not, I can't confirm.
You can Google this and get all sorts of articles on workarounds. Apparently if you set up a VPN you can use it in the UAE. Here is one article that I found.
http://talkfree7.blogspot.com/2010/09/how-to-facetime-voip-call-from-uae.html
I Googled "workaround for FaceTime in UAE" to find this. -
Hi!.
I need create a dinamyc drop list for a field in a ALV List report. for example...
IF the field in the alv = 1, i must show a list with the values '2' and '3', but in the case of the value is = '4' i must show a list with the values '1' and '2'. it's just an example.
I think that i must do by coding, but i don´t know how..
I'm waiting for your answers..
Thanks!! for your help!Check this Sample code
BCALV_EDIT_07
it exactly behaves the way you want. -
How to lengthen the drop list view in form page selection?
Hi All,
Looking at 11.1.2.1 Planning, it's annoying that I can only see 10 members at a time when scrolling through the page drop list in forms:
http://www.stanford.edu/~mikeling/drop_list_screenshot.jpg
In 9.3, one is able to see a much longer list.
Is there a way to globally customize the length of viewable members in the dropdown, so that I see 20 or 30 members at a time, for example?
Mike
Edited by: user1123980 on Feb 3, 2012 11:10 AMdid you change it with the Application owner login(log in id using which the application created) and save it after making the change.
it is working absolutely the way you are expecting in my system. i login with Admin id and made the changes and saved it and my serch box incresed with number of members.
-KP -
RE: Viewable Items on a Drop List in Forte V2
Hi Kumar,
Let me guess, you're using windows NT 4.0 as your client.
I had the same problem a few months ago and raised the
question in this list.
My answer is as brief as it is unsatisfying:
It is a known bug for which there is no work around.
Forte 2 and NT 4.0 don't mix very well. Forte 3 works fine.
You think you found some logic behind the bug, but you
haven't. I just so happened it works this way for these
droplists in this window. Other droplists in other windows
will not follow this logic. Some won't even show the bug.
These are your choises:
Don't use NT 4.0
Switch to Forte 3
Don't use droplists
Use some tricks, like adding an empty row at the end
of the list.
Pascal Rottier
STP - MSS Support & Coordination Group
Philip Morris Europe
e-mail: [email protected]
Phone: +49 (0)89-72472530
+++++++++++++++++++++++++++++++++++
Origin IT-services
Desktop Business Solutions Rotterdam
e-mail: [email protected]
Phone: +31 (0)10-2428100
+++++++++++++++++++++++++++++++++++
/* My reality check bounced */
-----Original Message-----
From: Kumar Krishnasami [SMTP:[email protected]]
Sent: Friday, March 05, 1999 5:30 PM
To: [email protected]
Cc: Kumar Krishnasami
Subject: Viewable Items on a Drop List in Forte V2
I have a set of drop lists that are part of an array field which are
populated dynamically. If I set the number of viewable items to n,
and
if the drop list has m number of items in it, the number of items
that
actually appear is n-1 if the list contains more than n items( m>n)
and it is m-1 if the list contains less than n items (m<n).
For example, if I set the number of viewable items to 4 and a drop
list contains 7 items, the actual number of viewable items I see is 3
(4-1) whereas if the drop list contains 2 items, the actual number of
viewable items I see is 1 (2-1).
I searched through the archive of this list and found that this same
issue was raised before, but couldn't find any replies pertaining to
it.
Is this a "feature" of Forte V2? I tried the same thing with Forte V3
and it does work fine in V3.
Any pointers would be appreciated.
-- Kumar Krishnasami.
p.s:- It doesn't matter how I set the viewable items. I tried both
setting them through the windows workshop as well as in the code
after
the self.Open() in the Display() method. The behavior is the same in
both cases.
To unsubscribe, email '[email protected]' with
'unsubscribe forte-users' as the body of the message.
Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>-
To unsubscribe, email '[email protected]' with
'unsubscribe forte-users' as the body of the message.
Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>On Wed, 28 Jan 1998 11:50:42 +0000, [email protected] wrote:
I have noticed that Drop List widgets show an initial value equal to
the first value in their Element List. However, this does not seem
to happen as soon as the Drop List is placed inside a grid with a
mapped type. In this case, the drop list shows a blank value
initially. Once a value is selected from the drop down list, it
always has a value.I have found the following behaviour to be true of DropLists with an
object mapped type (ie, TextData as opposed to string): If you
instantiate the mapped attribute in the Init() method (ie,
self.theDroplist = new()), then the DropList will display the first
item in the list as selected when the window comes up. If however, you
do NOT instantiate the mapped attribute, then you get the behaviour you
are observing where the DropList defaults to showing nothing until the
user makes a selection. It's kind of an odd behaviour, but you can
take advantage of it in cases where you want to force something to be
selected by the user, but you don't want an initial default.
Dale
================================================
Dale V. Georg
Systems Analyst
Indus Consultancy Services
[email protected]
================================================ -
How to make hidden Drop Lists functional in RBList Subforms?
I have created a form that contains 3 isolated Radio Button lists, each with hidden subforms that are unique per each button.
Two of my RBLists and subforms work perfectly, showing hidden Drop Down List options and other fields as they should when a button is selected.
However, RBList3 presents the Drop Down lists as user entry fields only. Each hidden subform in RBList3 contains one drop down menu and one text box for instructions.
I've used the same javascript to hide/show hidden fields when buttons are selected. All settings seem to match up. Here is a sample of my code:
if(RBList3.F.rawValue != 2)
this.presence = "hidden";
newsubform.presence = "hidden";
else if(RBList3.F.rawValue == 2)
this.presence = "visible";
newsubform.presence = "hidden";
Does anyone have any suggestions for how to make my Drop Down Lists in RBList3 show as functional Drop lists?
I have attached the form for reference.See example #62 on my blog for a 10.1.3 example:
http://tinyurl.com/smuench-adf-examples
For a tutorial on how to create them using the new features we enable in 11g, see my Oracle Magazine article:
Defining Cascading List of Values -
Operations not sorted in the drop list of the web service endpoint
Hello,
Since the beginning of oc4j standalone till the last release 10.1.3.5.0, the operations in the drop list of the web service endpoint are not alphabetically sorted,
they are in a random order.
If a web service contains a lot of operations, it's always difficult to find one operation in the list.
How can this list be sorted ?
I don't see any sort option in the web service properties (in Jdevelopper) or in the deployment descriptor (in Jdevlopper).
Best regards
LaurentYou are correct...the above code is useful only when debugging in Visual Studio. You should have better luck with either of the following two options:
Option 1: Retrieve the id from the response of SaveChanges()
sc.AddToSampleList(new ServiceReference.SampleListItem { Title= "Hello World" });
System.Data.Services.Client.ChangeOperationResponse response = sc.SaveChanges().FirstOrDefault() as System.Data.Services.Client.ChangeOperationResponse;
int id = ((ServiceReference.SampleListItem)((System.Data.Services.Client.EntityDescriptor)response.Descriptor).Entity).Id;
Option 2: Create the list item and access its properties after calling SaveChanges()
ServiceReference.SampleListItem li = new ServiceReference.SampleListItem { Title= "Hello World" };
sc.AddToSampleList(li);
sc.SaveChanges();
int id = li.Id; -
How to make table that will include controls such as drop list?
How to make table that will include controls such as drop list?
I need to create table as Property Browser of ActiveX, that include rows with differnt types such as drop list, color, ...Hi Nadav,
I figured out where I missed your point. When you wrote
table as Property Browser of ActiveX, that include rows with differnt types such as drop list, color, ...
I was thinking mixed data-types in a [2d] table!
Looking at the property browser again it looks like no single LV function can do all of that. It can be developed as a pop-up (like the browser is set-up) and then code all of the elegance using an event structure to control the background color of a string indicator while controling the visability of rings that are only made visable when a mouse down is detected. That will get you pretty close.
So no, my previous response ws not correct for what you are trying to do if you want to duplicate all of the wistles and bells of the property browser pop-up window.
Please forgive my distraction.
Ben
Ben Rayner
I am currently active on.. MainStream Preppers
Rayner's Ridge is under construction -
Fonts that I dont have on my comuter are showing in FCP text drop list?
Ok I had downloaded a font last year when i was using fcp 6 and when I did a clean instal of my OS I forgot to save it so it got deleted. I never downloaded the font again. So now im using FCP 7 and when I go to enter some text on some footage that font appears in the drop list. I can selected it and apply it to the footage. But I checked my font book and did a search for that font and its not on my computer. so how is this possible?
Message was edited by: AzzieDepending on how you searched, Finder does not always look at all possible locations.
Fonts can be in the Following directories:
*Macintosh HD/Library/Fonts.* These fonts are installed by applications or the user. Available to all.
*Macintosh HD/System/Library/Fonts.* Installed by Mac OS X. Available to all. Do not tamper with the fonts in this folder.
*Macintosh HD/Users/user name/Library/Fonts.* Installed by and only available to that user account.
http://www.jklstudios.com/misc/osxfonts.html -
Q: Creating a drop list with dynamic content?
Hi,
Like to start off by saying that I am new to this so be gentle...
I want to create a JSP which contains a search form.
To limit the search options I want to present some of
them as drop lists with pre-defined values.
As the drop list values need to be easiliy updated
I want to be able to control the content (using a servlet or a JB).
What would be the best way of implementing this?
Examples would be helpful.
Regrads
//JimmyThis is pretty easy to do. All you have to do is below:
In the option tags place the jsp variable:
<option><%=variable%></option>
Good Luck,
J.Clancey -
How to filter viewobject based drop list ?
Hi all,
I have a drop list based on read only view object that will exist on many jspx.
The view object/drop list must be filtered depending on from which jspx it is called.
So the filtering is done when user enter the page.
How to do that ?
Thank you for your help,
xtantoSince I don't know the actual source of your method, I can only guess what exactly is going on in there.
One common mistake people do is creating a new instance of the AM instead of using the existing AM instance that is used in the ADF page - so check if this is the case.
I would recommend that you move up to JDeveloper 10.1.3 which has way better support for JSF and way better documentation on this type of topics - for example in the ADF Developer Guide for 10.1.3 you'll find this topic about accessing the AM from Struts:
http://download.oracle.com/docs/html/B25947_01/bcservices005.htm#sthref684
JDeveloper 10.1.3 has a newer version of ADF that has excellent integration with JSF instead of the old Struts - and it can deploy to an OAS 10.1.2 server:
http://download.oracle.com/docs/html/B25947_01/deployment_topics006.htm#CIHGIAAE
JDeveloper itself is free - so no licensing issues there.
And you are covered in terms of ADF license since you have an OAS license that includes it. -
Display author as drop list on advanced search UCM
Hello
Does anyone know if it is possible to have the authors field appear as a drop list on the advanced search screen in 10gR3 UCM?
ThanksKyle has a great blog article about changing the Account field, you can probably use the same method for the Author field.
http://blogs.oracle.com/kyle/2010/02/making_the_account_field_a_str.html -
APEX setup issue; empty drop lists
We have an 11g database upgraded without APEX on. To start using APEX we enabled it, but many of the drop lists are empty.
For example, when setting up a user, under "Account Privileges" the list for "Application Builder Access" is empty.
Any ideas on what we did wrong?HI Stuart ,
Please try out the following steps .
1. To delete setup table entries
use T-code "Lbwg" in this provide the application componet.
for Example:- 11 .
2. you can confirm weather the setup table is empty by going to "SE11" provide setup table name.
setup table name = name of extractstructure+setup.
chose number of entries it should display "0". Which confirms that setup table is empty.
3. fill the setup table using T-code " oli*bw"
where * implies application componet i.e 02,03,11,12 etc.
I hope this will reslove your issue.
Thanks
vijay. -
hi,
I'm using Apex4.2
How can I display drop list when button pressed ?
or is there any solution to create same interface as apex dev environment
ThanksProbably lot's of ways to do this but I would just give the drop down list a CSS class of hidden.
Put this in the CSS inline section of your page:
.hidden {
visibility:hidden;
and then on your drop down item in the field labeled HTML form element classes just add this: hidden
Then create a dynamic action on button click that uses JavaScript to remove this class:
$("#P10_YOUR_ITEM").removeClass("hidden");
See this example: http://apex.oracle.com/pls/apex/f?p=32581:2
username: guest
pw: app_1000
Click the Show Drop Down List button and the drop down item appears.
Maybe you are looking for
-
Installation on new hard drive
I have a G4 Quicksilver that had a mechanical failure in the hard drive, so I had a new one installed. I have all of the original installation disks: OS 9.2.1, OS 10.1, displays software, and software restore (4 of them). I don't really need OS 9 (co
-
How to read the Key value from the Message using the text value.. Urgent
I need to read the Key valuefrom the message pool using the text value for the Key.. Is it possible.. Please help me with sample code.. Thanks and Regards Avijit
-
What is the actual file size for the iphone 4s update - 55.5 mb's or 832 mb's
Can someone tell me the actual file size of the new update for the iphone 4s On my iphone it is telling me it is 55.5 mbs but when I try to download the file thru i tunes it twlls me it is 830 odd mb's. Thanks, michael.
-
if anyone has ether had this happen to them can u tell me and if you no how to fix it please tell
-
HI Thanx yar i want records from both a/r invoice and a/r credit memo table both item based and service based depending upon usre selection but because 2 queries join by union it show 2 rows means for the same customer if a/r invoice and a/r credit m