Error message when populating drop-down list with mysql DB
Hi everyone,
i'm having an error message which gives zero result on google...
here's the context: i have a drop-down list called "Patient" in the template pages of a livecycle form. The binding is set to Global so that the value is the same on the two pages of the form. I have also linked the items of the list to a mysql database (with DataConnection) by clicking the "Specify Item Values" link on the Binding tab of the element.
now, when i open my form (or preview) i get this message, in french:
"Propriété incorrecte de l'opération SET; dataGroup ne possède pas de propriété id."
which is, in english (personal translation):
"Incorrect property of the SET operation; dataGroup doesn't have an id property."
this message appears in a messagebox, the background is empty (standard gray color)
Then i click "OK" (which is the only button available), and my form appears, the list is populated with the values of my database table, so it actually works...
As i said, i have zero results on google with this message...
any idea what it means and how to avoid it?
Thanks!
Hi,
For all things XFA Forms and Databases there is no place better than Stefan Cameron's blog: http://forms.stefcameron.com/.
Have a look here: http://forms.stefcameron.com/2006/12/18/databases-inserting-updating-and-deleting-records/ and at comment 60.
Good luck,
Niall
Similar Messages
-
Error while populating drop down list with values from a database
Hi all,
I have a JSP page with a drop down list that is to be populated with values from a database.
This is the code in my JSP file:
<!-- Form for picking the floor -->
<!-- Get the available floors -->
<% ArrayList<Integer> floornumbers = dataManager.getAllFloorNumbers();
Iterator<Integer> iterator = floornumbers.iterator(); %>
<!-- Create the form for users to select the floor -->
<form id="floorselectionform">
<input type="hidden" name="action" value="floorselected"/> <!-- Guides the servlet to redirect to the appropriate page -->
Select floor | <select name="floorselector" id="floorselector">
<% while (iterator.hasNext()) { %>
<option value="<%=iterator.next().intValue()%>"> <%=iterator.next().intValue()%> </option>
<% } %>
</select>
<input type="submit" value="Go!"/>
</form> The DataManager.java class simply forwards this to its respective Peer class, which has the code shown below:
package seatplanner.model;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
/* This class handles all floor operations */
public class FloorPeer
/* This method returns all the floor numbers */
public static ArrayList<Integer> getAllFloorNumbers(DataManager dataManager) {
ArrayList<Integer> floornumbers = new ArrayList<Integer>();
Connection connection = dataManager.getConnection();
if (connection != null) {
try {
Statement s = connection.createStatement();
String sql = "select ID from floor order by ID asc";
try {
ResultSet rs = s.executeQuery(sql);
try {
while (rs.next()) {
floornumbers.add(rs.getInt(1));
finally { rs.close(); }
finally {s.close(); }
catch (SQLException e) {
System.out.println("Could not get floor numbers: " + e.getMessage());
finally {
dataManager.putConnection(connection);
return floornumbers;
} The classes compile properly, but when I load this page up in Tomcat it just freezes and does not load the form. I tested the DB connection and it works fine.
What am I doing wrong in the JSP code?
Thanks for the help in advance.
UPDATE: I commented out the form, and added <%=floornumbers.size()%> right above the commented code to check if the ArrayList is indeed getting populated with the values from the database (the values are of type integer in the database). The page still freezes like before. I'm puzzled now :confused: .Wrong usage of Iterator.
<!-- Form for picking the floor -->
<!-- Get the available floors -->
<% ArrayList<Integer> floornumbers = dataManager.getAllFloorNumbers();
Iterator<Integer> iterator = floornumbers.iterator(); %>
<!-- Create the form for users to select the floor -->
<form id="floorselectionform">
<input type="hidden" name="action" value="floorselected"/> <!-- Guides the servlet to redirect to the appropriate page -->
Select floor | <select name="floorselector" id="floorselector">
<% while (iterator.hasNext()) {
Integer inte = iterator.next();
%>
<option value="<%=inte.intValue()%>"><%=inte.intValue()%></option>
<% } %>
</select>
<input type="submit" value="Go!"/>
</form>or make use of enhanced loop as you are already using J2SE 5.0+ for avoiding confusions.
<!-- Form for picking the floor -->
<!-- Get the available floors -->
<% ArrayList<Integer> floornumbers = dataManager.getAllFloorNumbers(); %>
<!-- Create the form for users to select the floor -->
<form id="floorselectionform">
<input type="hidden" name="action" value="floorselected"/> <!-- Guides the servlet to redirect to the appropriate page -->
Select floor | <select name="floorselector" id="floorselector">
<% for(Integer inte:floornumbers) {%>
<option value="<%=inte.intValue()%>"><%=inte.intValue()%></option>
<%}%>
</select>
<input type="submit" value="Go!"/>
</form>and a lot better thing would be making usage of basic Taglib provided with JSTL spec or struts spec which make life easier and simple.
something like usage of <c:forEach/> or <logic:iterate/> would be lot better without writing a single scriptlet code.
Hope that might help :)
REGARDS,
RaHuL -
Error message when installing Flash Player : List of actions not found
I get an error message when trying to install Flash Player.
I use Windows 64 bit with Internet Explorer 64x.
I'm able to download, the installation starts but it stops before completing.
I get this error message (loosely transalated) :
Installation encountered errors
List of actions not found
How can I fix this ?
Thank you
AnnieI solved my problem by installing the Flash Player from home.
The network security at work prevented me from completing installation.
Thanks for your help.
Annie
2012/9/26 Pat Willener <[email protected]>
Re: Error message when installing Flash Player : List of actions not
found created by Pat Willener <http://forums.adobe.com/people/pwillener>in
Installing Flash Player - View the full discussion<http://forums.adobe.com/message/4728064#4728064 -
Self populating drop down lists.
Is there any tutorials or information to do a self populating
drop down list
in CF?
I assume you would have the form post back to its self using
a IsDefined for
each drop down step. Drop Down 1 (DD1) is selected and that
posts back to
the same page and causes the DD2 to run a SQL query based on
DD1's choice
and you repeat the process until the final DD is selected.
Is this correct and where can I find a good tutorial?
Thanks
Wally Kolcz
Developer / SupportDo a search on Google for "related selects in ColdFusion".
Bryan Ashcraft (remove brain to reply)
Web Application Developer
Wright Medical Technologies, Inc.
Macromedia Certified Dreamweaver Developer
Adobe Community Expert (DW) ::
http://www.adobe.com/communities/experts/
"Wally Kolcz" <[email protected]> wrote in
message
news:e7c9hc$g6a$[email protected]..
> Is there any tutorials or information to do a self
populating drop down
> list in CF?
>
> I assume you would have the form post back to its self
using a IsDefined
> for each drop down step. Drop Down 1 (DD1) is selected
and that posts back
> to the same page and causes the DD2 to run a SQL query
based on DD1's
> choice and you repeat the process until the final DD is
selected.
>
> Is this correct and where can I find a good tutorial?
>
> Thanks
>
> --
> Wally Kolcz
> Developer / Support
> -
Problems with populating Drop Down List (WD ABAP)
Hi,
I am trying to populate two Drop Down fields CARRID and CONNID (Type Table SPFLI) on an Adobe Interactive Form in a Web Dynpro ABAP Application.
In the WD Context I have a node "Flights" with those attributes.
In the WDDOINIT I populate the Context elements (just for test purposes with all entries of SPFLI).
[code]
DATA:
node_flights TYPE REF TO if_wd_context_node,
elem_flights TYPE REF TO if_wd_context_element,
stru_flights TYPE wd_this->element_flights,
it_flights TYPE TABLE OF spfli.
SELECT carrid connid FROM spfli INTO TABLE it_flights.
navigate from <CONTEXT> to <FLIGHTS> via lead selection
node_flights = wd_context->get_child_node( name = wd_this->wdctx_flights ).
node_flights->bind_table(
new_items = it_flights
set_initial_elements = ABAP_FALSE
[/code]
According to this
Re: adobe form/reader error I bound the element values property of the Enumerated Drop Down List to [code]$record.sap-vhlist.CARRID.item[*][/code], whereas <i>Object Text</i> is "Text" and <i>Object Value</i> is "Key".
Unfortunately the DDLs on the Adobe Form are not populated with the values read from the table. I debugged the application and the values are written to the Context node.
Do you have any further hints?
Best regards,
Robin
Message was edited by:
Robin WennemuthRobin:
Did you get this resolved? Would you please tell me how you got it done?
Thank you,
Fred. -
Populating drop down list in a table cell-urgent
Hi all
I have a problem. I want to populate a dropdown list in a table cell. can anybody tell me the step by step procedure for that.
I am doing it generally. not using R/3
I am creating sub node like u have mentioned. I haven't done it using wizard.
Is there any difference in the way we populate this list?
My root node is expense. Inside that some value attributes are there. For the drop down list i've created a sub node 'extype'.
I am getting error.
it is:
com.sap.tc.webdynpro.progmodel.context.ContextException: Node(EREmpHomeView.expense.extype): cannot bind or add elements because the node has no valid parent
Following is the code i've written.
IPrivateEREmpHomeView.IExtypeElement el;
IPrivateEREmpHomeView.IExtypeNode nd=wdContext.nodeExpense().nodeExtype();
el=wdContext.nodeExpense().nodeExtype().createExtypeElement();
el.setEtype("Travel");
nd.addElement(el);
Sill i'm getting the same error
Hi Nidhideep
Error has gone with the code that Mr Anil has given. But there is no value in the List. Dropdown list is coming as a blank list.
Thanks and Regards
Aparnna
Message was edited by:
aparnna prasadhi
Aparna try this code:
1. Context description at design time:
Value-Node "myNode", collection type=list, cardinality=0..n, selection=0..n
and the attribute:
Value attributes myValue, type="String".
2. The corresponding Java source code example that you create in the wdDoInit method of the controller implementation:
// The ISimpleTypeModifiable interface enables access to
//a data type instance that can be modified at runtime:
ISimpleTypeModifiable myType =
wdThis.wdGetAPI().getContext.getModifiableTypeOf(.myNode.myValue);
//Sets the label text for this data type.
myType.setFieldLabel(New label)
//Sets the valid values of this data type. The individual elements are inserted
//when the put method is called and
//and the value set is filled with the appropriate
//key value pair.
IModifiableSimpleValueSet values =
getSVService().myType.getModifiableValueSet();
values.put(key_1,Mister);
values.put(key_2,Mistress);
values.put(key_3,Miss);
Regards
Nidhideep -
Dynamically Populating Drop Down Lists
Hi,
I am trying to dynamically populate a drop down list on a form based on a selection in another drop down list. I have read the help file "To dynamically populate a second field after populating the first" which goes through an example, however I cannot get this example to work for me.
I know that the best way to do it is to create an xml file and connect the form to this file. I am new to programming in xml but have had some experience in other forms. The code that I have (from the help page) looks like this;
<?xml version="1.0" encoding="UTF-8"?>
<MyData>
<country/>
<countries>
<item uiname="United States" token="US"/>
<item uiname="Vietnam" token="SRV"/>
</countries>
<state/>
<US>
<item>California</item>
<item>New York</item>
<item>Texas</item>
</US>
<SRV>
<item>An Giang</item>
<item>Bac Giang</item>
<item>Bac Kan</item>
</SRV>
</MyData>
I have then followed the instructions on the page, and am unable to populate either field on my form. Perhaps there is something wrong with my code? Or any other suggestions would be greatly appreciated!
ThanksHi Paul,
I have another question,
I would now like to populate a third drop down menu based on the selection in the second one, however my code is going wrong somewhere as now when I put in the first 2 drop down lists, nothing appears in the second one. ie, the first drop down list I link to countries, and the second to state, as I did with the previous file, but now, when I preview it, I can choose a country, but nothing comes up in state. When I set the first drop down box to countries, I have to specify that I want it to show the uiname, but I can't do that with the second one when I select state using the XML file below, nothing is shown. Where am I going wrong?
<MyData>
<Country/>
<countries>
<item uiname="United States" token="US"/>
<item uiname="Vietnam" token="SRV"/>
</countries>
<state/>
<US>
<item uiname="California" token="CA"/>
<item uiname="New York" token="NY"/>
<item uiname="Texas" token="TEX"/>
</US>
<SRV>
<item uiname="An Giang" token="AG"/>
<item uiname="Ban Giang" token="BG"/>
<item uiname="Bac Kan" token="BK"/>
</SRV>
<time/>
<CA>
<item>6</item>
<item>7</item>
</CA>
<NY>
<item>5</item>
<item>4</item>
</NY>
<TEX>
<item>3</item>
<item>8</item>
</TEX>
<AG>
<item>2</item>
</AG>
<BG>
<item>1</item>
</BG>
<BK>
<item>9</item>
</BK>
</MyData>
Thank you for your help! -
Hi!
I have a problem with a PDF form: There's a drop down list that I populate with Excel data that I've put in an XML file through an XSD file -- no problem here. The drop down list has a data binding to the XML file, so that a choice in the drop down list can be associated with an object in the XML file. So, when I make a choice in the drop down list, a corresponding object value is fetched from the XML file and put in a text field on the form.
How to do this is described by Stefan Cameron here:
http://forms.stefcameron.com/2006/07/29/dynamic-properties/
There's a snag, though, and to describe it more clearly:
The XML file contains three types of objects: role, role number, and role cost center. Of these I use the first and the third, i.e. the role and the role cost center. The drop down list contains the roles, and when I select a role, the corresponding cost center is filled out in the text field. So far, so good!
But -- if the cost center has the same value for two or more roles, all of these roles "bounce back" into the drop down list, that is, they are all selected in the drop down list. How many of these you can see depend on the height of the drop down list -- if it's low you'll only see the first one.
If I modify Stefan Cameron's data in his example I get the same behavior, so the problem seems to have to do with how XML data are fetched.
I'm sure there's a workaround, but I can't find it! I've spent many hours browsing the web without finding anyone with a similar problem.
Any suggestions appreciated!Although your issue is far beyond mine, I was hoping you can help me out.....
I need to create a drop down list of names which I wish to somehow link to an Excel spreadsheet.
Please let me know the steps I need to do. I've tried several things, but nothing seems to work and I'm not sure what I am doing wrong.
Thank you -
Populating Drop down List in Excel Planning Layout
HI!
hopefully somebody can help me.
I have a simple planing function ( copy function: Version1 => Version2 ), Version2 the target version is a BEx Variable and a parameter of the copy planing function.
basicly i want to put a drop down list on a Excel Planing Layout to manipulate the BEx Variable (Version 2 - the target version). So that the user can fill the BEx Variable by selecting the version by the dropdown list.
In BW-BPS is quite simple -but unfortunately i dont know how it works in BW-IP.
Best Regards
Mike
Message was edited by:
Mike KhatibHello Mike,
First you create two Drop Down lists (Dimension Version, Read Mode Masterdata table) in your workbook. Now go to the Visual basic editor (alt+F11) and you will find the following code for each Drop Down list:
Public Sub DROPDOWN_22_LostFocus()
Dim lComboBoxName As String
Dim BEx1 As Object
On Error Resume Next
lComboBoxName = "DROPDOWN_22"
Set BEx1 = Application.Run("BExAnalyzer.xla!GetBEx")
Call BEx1.RaiseComboBoxChange(Parent.Name, lComboBoxName)
End Sub
Comment the last line and add a function to output the chosen value to a cell in the workbook
Public Sub DROPDOWN_22_LostFocus()
Dim lComboBoxName As String
Dim BEx1 As Object
Dim version As String
'Call Dropdown List
On Error Resume Next
lComboBoxName = "DROPDOWN_22"
Set BEx1 = Application.Run("BExAnalyzer.xla!GetBEx")
'Call BEx1.RaiseComboBoxChange(Parent.Name, lComboBoxName)
'get version
version = DROPDOWN_22.Text
'output chosen version to a cell in the workbook
Range("C801").FormulaR1C1 = version
End Sub
Now add a command range to your workbook (VAR_VALUE_1,1, <VERSION>). Thats it.
If you need further information dont hesitate to ask me!
Best regards
Johannes
PS: Please assign points if this information was helpful -
ISR drop-down lists with ZCI layout
Hi,
We are developing a custom ISR scenario on Netweaver 2004s SP11 and Adobe LiveCycle Designer 7.1. Our Interactive form has a drop-down list which is supposed to get prefilled. When we use the ZCI layout, the drop-down is not showing any values. If we simply change the layout type to Standard, it is working fine. While using ZCI layout, we inserted the webdynpro script and used ISR native controls.
Why the drop-down is not working with ZCI layout? Are we missing any thing?
Appreciate your response
Thanks
RamIt is solved. The issue was with binding.
-
Change values of drop down list when other drop-down list value is clicked
Hi Gurus,
I look for my requirement very much but I can't find. I think it must be very simple but I can't do it, please help :
I have to custom added fields. Both of them is made drop-down list by picklist defined in GET_P...methods.
When I click and select a value from the first drop-down list, I want that second drop-down values are fully changed, depend on what I select in the first list. If I select my value and press enter in the first drop down box, I can do my requirement with GET_V...method. But if I don't press enter, the values of second list doesn't change, they remain same. I want exactly that when I click and select a value from first drop-down list, second drop-down list values are automatically change, dependent on what selected. Do I have to define and event?? where and how, please help me..Hi,
You must have created the field as a dropdown using the below code in the get_p method.
CASE iv_property.
WHEN if_bsp_wd_model_setter_getter~fp_fieldtype.
rv_value = cl_bsp_dlc_view_descriptor=>field_type_picklist.
ENDCASE.
Here you need to add the below lines of code along with the previous code. for the first dropdown value
IF iv_property = if_bsp_wd_model_setter_getter=>fp_server_event.
rv_value = 'DDLB_CLICK'.
ENDIF.
This would refresh the screen when the user selects any value from the dropdown.
Regards,
Radhika -
Dynamic drop down list with dynamic sql
Hi all,
I am facing a problem here..Please see if any one can help.
I jave a JSP page which has two drop down list boxes.
One list box is populated from the databse.
ListBox1:
values: kishan
maha
tony
assuming all those were populated from database.
ListBox2:
values: Chennai
Bangalore
Hyderabad
should come if "kishan" is selected from the first listbox.
if "maha" is selected then
Values: Delhi
Goa
Mumbai
should be populated from the databse using the where condition
got by the first selection.
Both these boxes are in same page and i do not want to transfer
this to another page..staying in the same how to accomplish this.
An onChange function of the selection list on listBox1 can be
written which gives me what value is selected. This i can get in
Java script. But how to give this value to a jsp variable which
queries the database using the selected value.
Is there any other logic i can use.
remember there is no request that is passed. both are in same page and on selection it should stay in same page populating the
second one dynamically.Bcoz what i have said is the operation in one row.. the same should happed for 5 rows in a form so.. pls send me code if possible or links related to this problem
please help.You can use Ajax ;-) or you do a server roundtrip (aka postback) i.e. the onchange event of ListBox1 submits the form and the server returns the same page with the updated ListBox2
-
Issue populating drop-down lists on newly created instances.
I have a drop-down list on the main page and another ddl on the flowed subform. I have js code that populates the support type ddl when a selection is made on the team ddl. My issue is when I use instanceManager.addInstance(1); The new instance doesn't populate with the selection. How do I get it to populate. most of my code; not the array is at http://pastebin.com/uM0ssT8v
Can anyone help???
I have a date field on my jsp form. I want to ensure
that the date is entered correctly.
To do this I have 3 drop down lists....year, month,
date.
How can I populate the date list when the user selects
a month?
e.g. user enters "Feb". Date list should only display
numbers 1 to 28 or 1 to 29 if it is a leap year.
Any idea's or suggestions??? -
Greetings
I have created a form in Acrobat XI Pro with 3+ text fields which populate a drop down list. My problem is that when I duplicate the Drop down, which I need to do around 50 times, each selection resets all the drop downs to that choice.
The Drop down fields have a Javascript action added to call a single Javascript.
function popDropdown()
var myBlocks = [];
myBlocks.push("Select from Drop down");
if (this.getField("Block1").value != "")
myBlocks.push(this.getField("Block1").value);
if (this.getField("Block2").value != "")
myBlocks.push(this.getField("Block2").value);
if (this.getField("Block3").value != "")
myBlocks.push(this.getField("Block3").value);
this.getField("select").clearItems();
this.getField("select").setItems(myBlocks);Here is the problem: You are modifying the dropdown configuration every time somebody moves the mouse over one of the dropdowns. Every time you set the data in the dropdown list, it will always reset the selection to the first item.
I would remove all embedded JavaScripts, and all "On Focus" triggers for the dropdowns and the text fields. Then create a new text field that uses the following script as it's custom calculation script:
// global calculation script
// take the information from Block1..Block3 and
// initialize the dropdown lists
var aDropdownListData = [];
aDropdownListData.push("Select from Drop down");
aDropdownListData.push(this.getField("Block1").value);
aDropdownListData.push(this.getField("Block2").value);
aDropdownListData.push(this.getField("Block3").value);
var lDropdowns = ["select1", "select2", "select3" ];
for (var i in lDropdowns) {
// get the currently selected item in the dropdown list
var f = this.getField(lDropdowns[i]);
var a = f.currentValueIndices;
var item = "";
if (typeof a == "number") { // A single selection
item = f.getItemAt(a, false);
else { // Multiple selections
item = f.getItemAt(a[0], false);
f.setItems(aDropdownListData);
// select the previously selected item again
for (var i in aDropdownListData) {
if (aDropdownListData[i] == item) {
f.currentValueIndices = [ i ];
Now set this new field to read-only and hidden. This will take care of modifying the dropdown controls whenever you modify one of the text fields. It will also make sure that whatever setting was selected, will be selected again after this change (unless that value is no longer available). -
Populating Drop-down List in Interactive Forms for Java
Hi,all
I need to populate a drop-down list in Interactive Form.
I tried to do it by using Dynamic Properties of the drop-down
list,but didn't give nothing.At the same time I have successfully
populated a simple drop-down list(on webdynpro view),which I
replaced near my InteractiveForm.
What may be the problem?
Regards,
MichaelUse the DDL from the Web Dynpro pallette. Bind the same/ similar attribute of the DDL you used in the web Dynpro view in the interactive form also... this should work..
Thanks and Regards,
Anto.
Maybe you are looking for
-
Problem mapping USB external drive connected to Airport Extreme on my PC
I am having a problem mapping my USB external drive in my PC running WIndows Vista. Here is what I have so far: USB External Drive connected to my AirPort Extreme which is connected to my Century Link modem/router. I have installed the USB drive us
-
Regarding Deletion of Chart of Accounts
Dear All, When I am trying to delete the chart of accounts in development server it is saying that Chart of accounts is used in Special Purpose Ledger and entries cannot be deleted. So i removed all the accounts for down payments received and down pa
-
Include a New Meta Tag in head section of OBIEE generated HTML
Hi, Is there any xml place holder, that we can modify / add any additional HTML tags to the <HEAD> section of the HTML that OBIEE is going to generate. Requirement is to add the following tag in the <HEAD> section. <meta http-equiv="X-UA-Compatible"
-
When I publish a PowerPoint presentation as a pdf, the slides are blank.
-
Since installing MAMP I cannot click on the drop down for choosing accounts. It seems to have frozen. MAMP can be on or off. It makes no difference. The error message in firefox log is: Error message= uncaught exception: [Exception... "Component retu