Display of dynamic data in Listbox in jsp usin Struts
Hi,
I am trying to display a List in a jsp in Struts.
I have written a Action form and am populating a Arraylist in a DAO(java class file).
ArrayList.add(rs.getString(1),rs.getSTring(2));
But I do not know how to display the arraylist in JSP using the struts tag libraries.
Please let me know how this can be done.
Thanks in advance.
Sri
Use logic:iterate or nested:iterate.
You can refer to:
http://forum.java.sun.com/thread.jspa?threadID=5164152&messageID=9629275#9629275
http://struts.apache.org/1.x/struts-taglib/tlddoc/index.html
SirG
Similar Messages
-
How to display the cobe data in to the jsp
Hello All,
Greetings.
I am very new to this OLAP cubes and dimensions technology. We got one requirement to give a prototype to fetch the data from the AWM Cubes and dimensions and sgow it in JSp. We created the cubes and dimensions using AWM tool . And created the view with one of the plug in of AWM and displayed the data bu suing the JDBA connection.
But my manager wants to display tthe data from the cubes but not from the views.Can you please help me out by gingthe sample java code to connect to the OLAP cube and dimensions.
Thanks,
Vamshi.I am assuming you are using release 11 of the database, in which case why would you not use the SQL views to fetch the data?
The SQL Views allow you to access all the data for the cubes and the dimensions. -
Displaying dynamic data on every page of standard text
Hi All,
I m using standard text (created in SO10) in smartform . I want to display dynamic data on the top of every page of standard text.
Displaying the dynamic data is not the problem, but how would i know where is page finished(or started) as Preview in SO10 may not look the same as smartform output.
I dont want to do this manually by adjusting the size of window. Is there any other way to do the same??
Vanita.Try to create a text in your SF and write the dynamic data.
To know in which page use &SFSY-PAGE&
this system fields may also be helpful for dynamic text on each page
&SFSY-COPYCOUNT0& "COPY COUNTER( 0 = ORIGINAL, 1 = 1st COPY)
&SFSY-COPYCOUNT& "COPY COUNTER( 1 = ORIGINAL, 2 = 1st COPY)
Still you can called DYNAMIC text through your standard text.. but place your conditions.
Regards,
SaiRam
Message was edited by:
Sai Ram Reddy Neelapu
Message was edited by:
Sai Ram Reddy Neelapu -
{noformat}Hi Everyone
I am having one listbox in jsp its contain some data like(one,two,three,four), i want
to drag and drop action in list box.
Example:-
one
two
three
four
if i drag one to four (after drag and drop action) it'll display
two
three
four
one
now if i drag three to four (after drag and drop action) it'll display
two
four
three
one
please give me some sample code.
thanks in advance,
A.Nayak
(don't use Swing and Applet)
{noformat}Javascript is not the same as Java. Try here: [http://www.webdeveloper.com].
Asking for code without showing any effort from your side is not so smart. Not here and also not at other coding forums. This way you only show how lazy and dumb you are. Rather ask technical questions, you will likely get better help sooner. If you really need someone else to develop for you, better try here: [http://www.rentacoder.com] or [http://www.freelancers.net]. Or if you want help for free, then try to [ask questions the smart way|http://www.catb.org/~esr/faqs/smart-questions.html]. -
How to call javascript function with dynamic data in display tag
Hi,
Iam new to pagination concept. Iam using display tag to display rows in jsp by strtus.
I have a problem when calling the javascript function using ahref in attribute in display tag.
<bean:define name="form1" property="EditDetails.List" id="ListDisplay"/>
<display:table name="pageScope.ListDisplay" cellpadding="0" cellspacing="1" pagesize="10" partialList="false" size="listSize" requestURI="">
<display:column property="poNo" href='javascript:searchEditDetails("./submitOrder.do? actionID=getMISLoadEdit&poNumberSel=<%=((com.po.bean.EditDetails)poListDisplay).getNo()%>&statusIdSelected=<%=((com.po.bean.EditDetails)ListDisplay).getStatusId()%>")'
title="Number"/>
<display:column property="strDate"title="Date" />
<display:column property="orderValue"title="Order Value(INR)"/>
<display:column property="stringRequestedDeliveryDate"title="Suggested Delivery Date"/>
<display:column property="statusDescription" title="Status" />
</display:table>
The above code display the data in row format is working fine when I click the No It thow javascript error and its not redirecting to the other page.
When I try this with ordinary struts its working fine the code is:
<logic:iterate id="polist" name="Form1" property="EditDetails.List" indexId="i" type="com.bean.EditDetails">
<tr>
<td ><a href="javascript:searchEditDetails("./submitOrder.do?actionID=getMISLoadEdit&NumberSel=<%=((com.bean.EditDetails)polist).getNo()%>&statusIdSelected=<%=((com.bean.EditDetails)polist).getStatusId()%>")"><html:hidden name="polist" property="No" write="true" /></a> </td>
<td><html:hidden name="polist" property="strDate" write="true" /></td>
<td><html:hidden name="polist" property="orderValue" write="true" /></td>
<td><html:hidden name="polist" property="stringRequestedDeliveryDate" write="true" /> </td>
<td><html:hidden name="polist" property="statusDescription" write="true" /></td>
</tr>
</logic:iterate>
Please help me how to call javascript with dynamic data.
Thanks in advanceThe ADF Mobile Container Utilities API may be used from JavaScript or Java.
Application Container APIs - 11g Release 2 (11.1.2.4.0) -
Urgent : Problem in displaying 0fiscper as dynamic data col.
Hi SEM gurus,
I have a problem in displaying 0FISCPER in data columns. Say, in my planning level I have restricted 0FISCPER to 0001.2005 to 012.2005. and I did selected in data column, Dynamic for 0fiscper.
Now when I run my lay out for keyfig. 0Amount the lay out is like this
Customer Amount Amount Amount
Xxxxxx 10 20 30
Its not displaying the month what I want in the lay out should be like this
001.2004 002.2004 003.2004
Customer Amount Amount Amount Amount
Xxxxxx 10 20 30 40 .........
Can any one Please help me out to fix this ???
Thanks a bunch in advance
Rohith.
Message was edited by: rohith gentle
Message was edited by: rohith gentleRohith,
change HEADING column in the 2nd screen of the layout design to "0FISCPER Amount".
I think, current HEADING is named as only "Amount".
This will give layout as
Customer 001.2004Amount 002.2004Amount 003.2004Amount
hope that helps.
Hari Immadi
http://immadi.com
SEM BW Analyst -
Displaying data in xml using jsp
how do we display data in database from jsp using xlst format in xml browser view
how do we display data in database from jsp using xlst
format in xml browser viewRefer this Post
http://forum.java.sun.com/thread.jsp?forum=45&thread=482077&tstart=0&trange=15
-Regards
Manikantan -
Displaying Current Date and Time in JSP
Hi,
I need to insert the current date time in Ms SQL Server Database using jsp page. The format of the code willbe
insert into table(update_date) values ('2007-01-01 10:02:21');
But i am not getting how to display the current date and time ie. 2007-01-01 10:02:21 using jsp.
I have tried using
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
GregorianCalendar cal = new GregorianCalendar();
String dd = sdf.format(cal.getTime());
insert into table(update_date) values (dd);
But it didnot get inserted data.
Can anybody figure out with simple ideas.
Thank YouWhy then are you trying to insert the current date on a table?
To show the current date on the JSP you might try
<%=new Date()%>Or the way you had it on your first post with the date formatter and then use the <%=%> tags. Anyway, it seems to me I'm not really understanding what you actually want to do :-p
P.S. NOW() is a MySQL function too, not only MSSQL server (didn't even know it had it too ;-))
mysql> insert into a(up) values (now());
Query OK, 1 row affected (0.00 sec)
mysql> select * from a;
+------------+
| up |
+------------+
| 2007-04-09 |
+------------+Message was edited by:
benubach
Message was edited by:
benubach -
How to display rows of data in JSP?
Hi,
I am learning Servlet and JSP. There is an exercise which requires us to access a database from a Servlet and display the retrieved data in a JSP.
Now I am ok with the database connection. So how to display the data using some kind of loop?
RegardsThey're called ResultSets and they are returned when you execute a query from a Statement. The next() method will tell you whether or not you have another row of data to read.
-
Re-display repeating XML data in dynamic form
I have a dynamic form with repeating data in my XML that populates it. I need to display the repeating data in one of 2 different ways, depending on which business segment the user viewing it is associated with. I have tried 2 ways to accomplish this, neither has worked for me.
Attempt 1: Create 2 separate subforms and hide the one that should not be shown. The first subform in the layout displays just fine and is populated with records, but the second subform never displays any records. This appears to be an issue with the XML node already having been parsed and displayed and does not get displayed again. Is there a way to move the cursor, or pointer, or whatever you call it in XML-speak back to the top of a repeating node to re-display data?
Attempt 2: Create a single subform that contains 2 other subforms - one for each view, which lay atop each other. A script command hides the view the shouldn't be displayed. The problem I ran into here is that the records don't display properly. In my example, there are 3 records in the repeating section, the first displays fine, the second is missing some fields and is pulling some data from the first record. The third record displays no data at all. I deleted the one of the 2 subforms and previewed the form again, now all of the records displayed just as they should.
Any ideas or suggestions would be appreciated.
Thanks,
ChadThat code also produces text in the textfield. What "specific parts" are you trying to display?
textfield.text = (xml.bar[0].text());
textfield.text = (xml.bar[1].text()); -
Dynamic date display as a heading in module pool
Dynamic date display as a heading in module pool from a ztable
the ZTABLE contain the date from which the date value is to be printed as a heading like
"BILLING FOR THE MONTH OF MAY 2010 WILL BE CLOSED ON 26/05/2010"
thanks,
SreeHi Sreekanth,
Simply follow below steps:
1. Create a Input/Output field in screen layout.
2. Double click on it and 'Attributes' window will get opened.
3. Give a 'Name' to it (Ex: Text) and under 'Display' tab, tick 2D display and As label on left
4. Save and Activate.
5. In PBO, use below code,
MODULE status_2000 OUTPUT.
SET PF-STATUS 'DEMO'. " PF status
DATA: l_f_date TYPE sy-datum.
SELECT SINGLE zdate FROM ztable INTO l_f_date. " Select Date from ur ZTABLE
text = 'BILLING FOR THE MONTH OF MAY 2010 WILL BE CLOSED ON'.
CONCATENATE text l_f_date INTO text SEPARATED BY spce.
ENDMODULE. " STATUS_2000 OUTPUT
6. In TOP include,
DATA: TEXT type string. " Same name given to Input/Output field in screen layout.
7. Save & Activate.
Thanks.. -
Display date in jsp. using struts, JSTL
want to display today's date in format October 18, 2006
how to get today's date and how to display it in jsp?
I am using struts framwork and JSTL tags in my JSP.
Thanks.rizza_99 wrote:
The page underlines {<fmt:formatDate value="${now}" type="both" dateStyle="long" />} says
attributte value doesn't accept any expressionsWait, you said "the page underlines"?? So you're using an IDE? Are you sure that it a JSTL problem and not an IDE problem? Ignore the IDE and just execute the code. Does it work without any compilation errors or runtime exceptions? If so, then there's a problem in the IDE. -
How to display dynamic datas and double datas (chart)
Hi all !
I would like to display dynamic datas and double datas by using charts.
However, it doesn't work and I don't understand why.
Can you help me to fix that ?
Best regards,
- John
Attachments:
double_dynamics_data.vi 54 KBHi John,
the sine looks like it should look with your VI!
You convert the DDT to a scalar DBL. That conversion will only use the first sample of the generated sine waveform - usually this is always the same (offset) value when you generate full periods… Or to put it in a mathematical expression: sin(0°)+4 = 4!
When you want to display waveform you should work with waveforms!
Actually, I have used Dynamic data type in order to simulate an signal.
Well, I also simulated a signal in my example VI. I didn't use any ExpressVI to do so…
In a few weeks, I will receive a sensor. I will use in LabView 'DAQ Assistant' whose the ouput is a Dynamic Data.
Nobody forces you to use the DAQAssistent ExpressVI. There are nice DAQmx functions available and LabVIEW comes with a lot of ready-to-use example VIs…
That's why, I used in first place, the 'Simulate signal'. So I think I should keep Dynamic Data Type
I do think you don't need to use the DDT. I think it's better to understand what is going on in your VI. And I think the DDT will be no help for you…
Best regards,
GerdW
CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
Kudos are welcome -
Displaying dynamic data on load
Hello,
Being a newb, I am trying to figure all this out. I am trying to figure out how to make my dynamic data display. I am close but it still is not working the way it needs to. As you can see in the code I am trying to create a dynamic radio group, to load data when the page loads, but as it is it loads one radio button with a lable of "[object Operation]" and it should be creating 6 radio buttons. You can also see where I have commented out a button, now, if I uncomment it and run the page, pressing the button will populate the radio controls. What I need to do is get it so that when the page loads the data will load without having to press a button. This is taken from examples on the web and modifying to fit my needs. TIA.
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" width="554" height="400">
<mx:Script>
<![CDATA[
import mx.controls.Alert;
import mx.rpc.events.FaultEvent;
import mx.rpc.Fault;
import mx.rpc.events.ResultEvent;
import mx.controls.RadioButton;
private function result(evt:ResultEvent):void {
productsRepeater.dataProvider = evt.result;
private function fault(evt:FaultEvent):void {
Alert.show(evt.fault.message);
]]>
</mx:Script>
<mx:RemoteObject id="mycfc" destination="ColdFusion" showBusyCursor="true" source="flexdemo.src.DemoCFC" result="result(event)" fault="fault(event)">
</mx:RemoteObject>
<!-- <mx:Button label="Button" click="mycfc.GetData()"/> -->
<mx:HRule/>
<mx:Repeater id="productsRepeater" dataProvider="{mycfc}">
<mx:RadioButton id="buttonsArray"
label="{productsRepeater.currentItem.affiliatetype}"
data="{productsRepeater.currentItem}"/>
</mx:Repeater>
</mx:Application>You are getting close to having this correct - there just needs to be a few changes.
First, the reason that you are getting the [Operation operation] is that you have the dataProvider for the repeater bound to the RemoteObject. In this case, what you want to do is bind it to the data the RemoteObject returns. For this example, the first thing you need to do is create a variable that will serve as the dataProvider. For example, if you have an ArrayCollection (not sure what format your data will be in), our <mx:Script> block would change to be as follows:
<mx:Script>
<![CDATA[
import mx.controls.Alert;
import mx.rpc.events.FaultEvent;
import mx.rpc.Fault;
import mx.rpc.events.ResultEvent;
import mx.controls.RadioButton;
[Bindable]
public var returnedData:ArrayCollection;
private function result(evt:ResultEvent):void {
// This assumes that an array is being returned by the service
// You first tell Flex that this is an array and then use that to create a new ArrayCollection
returnedData = new ArrayCollection( evt.result as Array );
returnedData = evt.result;
private function fault(evt:FaultEvent):void {
Alert.show(evt.fault.message);
]]>
</mx:Script>
With that in place, you can now bind the repeater to the correct data.
<mx:Repeater id="productsRepeater" dataProvider="{ returnedData }">
Finally, if you want this to happen when the application loads, you need to listen for the creationComplete method of the application. When this event is dispatched, you want to tell your remote object to go and grab the data. Now your opening <mx:Application> tag will look like this:
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" width="554" height="400" creationComplete="mycfc.getData()">
With those items in place, it should work. -
Hi,
I'm teaching myself LabVIEW. I wish to delay a wave form and display it with the non delayed wave form. I used a delay from the examples. The output of the delay is wire (waveform double). The Simulate signal output is dynamic data. My conversion from wire (waveform double) to dynamic does not display on the waveform graph. The VI is attached. Can anyone offer any comment.
Solved!
Go to Solution.
Attachments:
Three input graph.vi 92 KBIt is displaying just fine. The display is hidden behind the display of the second signal. Expand the Plot Legend to show all three plots. Then toggle the plot visible property of the second and third plots.
Lynn
Maybe you are looking for
-
How do I use itunes to transfer music to my ipod while offline?
hello! i was wondering how i can use itunes to xfer music while disconnected to the net. as it is right now (itunes v7.1), i get a message "cannot access itunes store", and will not bring up the usual menus on the left side of the itunes window where
-
IMac Freezes in everything other than Windows 7
-------------------------------------------------------------------------------- My iMac was running Snow Leopard and Windows 7 via Boot Camp successfully with no issues until yesterday. The iMac froze in Snow Leopard and I had to manually reboot by
-
HDV imported from After Effect not playing smooth
Hi, I work with HDV footage from Sony V1E in FCP. For some reason, i need to do a few things in AE. I then export it there, work it out and rexport it from AE. There I use the HDV 1080/25fps quicktime compression. When I bring it back to FCp, it even
-
Treasury link to Cash Management
Hi Experts I am trying to link up treasury to cash management I have done the customising in TR where we assign product type to planning levels (TP,TB etc), mark the update type as CM relevent and have activated the link to cash management via positi
-
Activate acrobat 9 pro without internet connection
I have installed a legal copy of acrobat 9 pro with key and wish to activate it without connecting the computer to the internet--How?