How to process list within list in jsp
Hi,
I have to read values from list within the list in jsp. I got list of objects and I am reading the variables from it in jsp. for that I iterate through the list, read the variable from the object.
I use
<logic:iterate name="searchFormBean" property="policies" id="policiesList" indexId="index">
and reading the variable like below.
<html:hidden name="searchFormBean" property='<%= "partyId[" + index + "]" %>' />
and I have method getPartyId(int index, String text) in searchFormBean class.
now I have a problem that object has list variable which has to be read.
I am not sure of how to pass both the index (index of object list and index of list within the object).
I have method getIds(int index, int listIndex, String text)
Please let me know how should I write code in jsp to call the above method.
Thanks & Regards,
Nasrin.N
<%
getPartyId(int index, String text);
%>
Nasree ..its quite confusin ur question...forget abt implementation..just tell us in detail what ur rqmt is..
regards
shanu
Similar Messages
-
How to iterate List in jsp without using for loop
Hi,
I am developing a small application is struts. I have one ActionForm file which contain one List like getEmployeeDetailsList(). When I am using this list in jsp page for displaying data. I want to display it as employee name, employee address, employee designation and employee contact no. These all fields are available in the above list. Now what is the problem is that I am using logic:iterate method to iterate data. but this is not sufficient to display all records in order. like employee name should be in one table and they can be vertical not horizontal, employee address is also should be seperate. and same thing with employee designation and contact no. I don't want to use for loop to iterate this list. Please tell me about optionCollection for this list. only employee names should be one drop down and employee designation is also in another drop down.
Please help. It is really urgent.
Any help will be appreciated.
Thanks in advance.
ManveerI'm not sure what you problem is, but one thing you can do is to create a new class and pass the list into its constructor (and store it as a private variable). Then, provide a set of functions in the new class that extracts data from the list and returns it in a form that the various parts of the JSP page wants. For example, one function may return a sorted list of just the employee names. In this way, all the business logic for formatting the data into a form that JSP page likes is hidden inside the new class.
-
How to use ShowValue within a UIX/JSP page to display an active link?
I am storing URL's in the DB and want to display them as active links on a UIX/JSP page. I thought that I had this working some time ago, but now it no longer works.
Using <bc4juix:RenderValue datasource="ds1" dataitem="myTextField" /> will display "http://www.otn.oracle.com" as an inactive link using UIX/XML which is expected.
Using <jbo:ShowValue datasource="ds1" dataitem="myTextField" /> will display an active link using if using BC4J/JSP, which is expected.
However, I have not been able to do this using a UIX/JSP page.
Is it possible to use ShowValue within a UIX/JSP page to display an active link?
Thanks,
Bill GHi Juan,
I've done the following and it does not work for me;
--- snip ---
<uix:form name="form1" method="GET">
<bc4juix:Table datasource="ds1" >
<uix:columnHeaderStamp>
<uix:styledText textBinding="LABEL"/>
</uix:columnHeaderStamp>
<%--
<jbo:AttributeIterate id="dsAttributes" datasource="ds1" hideattributes="UixShowHide">
<bc4juix:RenderValue datasource="ds1" dataitem="<%=dsAttributes.getName()%>" />
</jbo:AttributeIterate>
--%>
<bc4juix:RenderValue datasource="ds1" dataitem="FacilityDesc" />
<bc4juix:RenderValue datasource="ds1" dataitem="LocationId" />
<bc4juix:RenderValue datasource="ds1" dataitem="LocationDesc" />
<%-- ** THE FOLLOWING DOES NOT DISPLAY ON THE BROWSE_EDIT_PAGE ** --%>
<jbo:ShowValue datasource="ds1" dataitem="Notes" ></jbo:ShowValue>
<%-- ** THE FOLLOWING DOES NOT DISPLAY ON THE BROWSE_EDIT_PAGE ** --%>
<uix:rawText>
<jbo:ShowValue datasource="ds1" dataitem="Notes" ></jbo:ShowValue>
</uix:rawText>
<%-- ** THE FOLLOWING DOES NOT DISPLAY ON THE BROWSE_EDIT_PAGE ** --%>
<uix:contents>
<uix:rawText>
<jbo:ShowValue datasource="ds1" dataitem="Notes" ></jbo:ShowValue>
</uix:rawText>
</uix:contents>
--- snip ---
Bill G... -
How to send List from jsp to action class
hi,
i m fetching list from database and showing to jsp as follows:
user can update that list i need to collect that updated list in next action class but i m not able to do that. can anybody suggest me any solution the code i m using is as follows:
<html:form action="/myUpdate">
<table>
<tr>
<td>
<label><input type="text" property="name" name="name" value=""/></label>
</td>
</tr>
<logic:iterate id="address" name="info" property="addressList" indexId="rowindex">
<tr>
<td>
<input type="text" value="" name="address[<bean:write name="rowindex"/>].houseno" />
</td>
<td>
<input type="text" value="" name="address[<bean:write name="rowindex"/>].roadname" />
</td>
<td>
<input type="text" value="" name="address[<bean:write name="rowindex"/>].city" />
</td>
<td>
<input type="text" value="" name="address[<bean:write name="rowindex"/>].state" />
</td>
<td>
<input type="text" value="" name="address[<bean:write name="rowindex"/>].country" />
</td>
</tr>
</logic:iterate>
<tr>
<html:submit/>
</tr>
</table>
</html:form>
here in privious action i m settting bean object in session with name 'info'. it is fetching data and disply it correctly but when i m trying to get this updated data in myUpdate action i m not getting list element.--------------- MyBean.java----------------------
package form;
import java.util.Iterator;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import org.apache.log4j.Logger;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
* @author Sushant.Raut
public class MyBean extends ActionForm {
Logger log = Logger.getLogger(this.getClass());
/* (non-Javadoc)
* @see org.apache.struts.action.ActionForm#reset(org.apache.struts.action.ActionMapping, javax.servlet.http.HttpServletRequest)
@Override
public void reset(ActionMapping mapping, HttpServletRequest request) {
// TODO Auto-generated method stub
super.reset(mapping, request);
this.name = "";
public String toString()
System.out.println("name : " + this.name );
for(Iterator<Address> iterator = addressList.iterator(); iterator.hasNext();)
Address address = (Address)iterator.next();
System.out.println("city : " + address.getCity());
return null;
private static final long serialVersionUID = 1L;
private String name;
private List<Address> addressList;
* @return the names
public MyBean()
log.info("Bean Construtor is called.");
System.out.println("MyBean:::::constructor is called.");
public String getName() {
log.info("Bean getName() is called");
return name;
* @param names the names to set
public void setName(String name) {
this.name = name;
log.info("Bean setName() is called");
* @return the address
public List<Address> getAddressList() {
log.info("Bean getAddressList() is called");
return addressList;
* @param address the address to set
public void setAddressList(List<Address> address) {
log.info("Bean setAddressList() is called");
this.addressList = address;
public Address getAddress(int index)
log.info("Bean getAddress(int index) is called");
while(index >= addressList.size())
addressList.add(new Address());
return this.addressList.get(index);
public void setAddress(int index, Address address)
log.info("Bean setAddress(int index, Address address)) is called");
this.addressList.add(index, address);
}------------- Address.java------------
package form;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionMapping;
* @author Sushant.Raut
public class Address {
private String houseno;
private String roadname;
private String city;
private String state;
private String country;
public Address(){}
* @return the houseno
public String getHouseno() {
return houseno;
* @param houseno the houseno to set
public void setHouseno(String houseno) {
this.houseno = houseno;
* @return the roadname
public String getRoadname() {
return roadname;
* @param roadname the roadname to set
public void setRoadname(String roadname) {
this.roadname = roadname;
* @return the city
public String getCity() {
return city;
* @param city the city to set
public void setCity(String city) {
this.city = city;
* @return the state
public String getState() {
return state;
* @param state the state to set
public void setState(String state) {
this.state = state;
* @return the country
public String getCountry() {
return country;
* @param country the country to set
public void setCountry(String country) {
this.country = country;
public void reset(ActionMapping mapping, HttpServletRequest request)
this.city = "";
this.country = "";
this.houseno = "";
this.roadname = "";
this.state = "";
}------ MyAction.java------
package action;
import java.util.ArrayList;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.log4j.Logger;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import form.Address;
import form.MyBean;
* @author Sushant.Raut
public class MyAction extends Action {
Logger log = Logger.getLogger(this.getClass());
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)throws Exception{
MyBean myBean = new MyBean();
log.info("Bean is Initialised.");
String name = "sushant";
Address address = new Address();
address.setCity("city1");
address.setCountry("India");
address.setHouseno("1111");
address.setRoadname("xyz Road");
address.setState("MH");
Address address1 = new Address();
address1.setCity("Hyderabad");
address1.setCountry("India");
address1.setHouseno("2222");
address1.setRoadname("ABC Road");
address1.setState("AP");
List<Address> addressSet = new ArrayList<Address>();
addressSet.add(address);
addressSet.add(address1);
myBean.setName(name);
myBean.setAddressList(addressSet);
request.getSession().setAttribute("info", myBean);
log.info("Bean is bound to session.");
System.out.println("MyBean object is bound to session.");
System.out.println(myBean);
return mapping.findForward("success");
}-------- show.jsp-----------
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<html:form action="/myUpdate">
<table>
<tr>
<td>
<label><html:text property="name" name="info"/></label>
</td>
</tr>
<logic:iterate id="address" name="info" property="addressList" indexId="rowindex">
<tr>
<td>
<html:text property="houseno" name="address" indexed="true"/>
</td>
<td>
<html:text property="roadname" name="address" indexed="true"/>
</td>
<td>
<html:text property="city" name="address" indexed="true"/>
</td>
<td>
<html:text property="state" name="address" indexed="true"/>
</td>
<td>
<html:text property="country" name="address" indexed="true"/>
</td>
</tr>
</logic:iterate>
<tr>
<html:submit title="Submit"/>
</tr>
</table>
</html:form>
</body>
</html> -
How to use List within javaFX(*.fx) script?
How to use java.util.List within javaFX(*.fx) script?
The following is my code in Java
PDBFileReader pdbreader = new PDBFileReader();
pdbreader.setPath("/Path/To/PDBFiles/");
pdbreader.setParseSecStruc(true);// parse the secondary structure information from PDB file
pdbreader.setAlignSeqRes(true); // align SEQRES and ATOM records
pdbreader.setAutoFetch(true); // fetch PDB files from web if they can't be found locally
try{
Structure struc = pdbreader.getStructureById(code);
System.out.println("The SEQRES and ATOM information is available via the chains:");
int modelnr = 0 ; // also is 0 if structure is an XRAY structure.
List<Chain> chains = struc.getChains(modelnr);
for (Chain cha:chains){
List<Group> agr = cha.getAtomGroups("amino");
List<Group> hgr = cha.getAtomGroups("hetatm");
List<Group> ngr = cha.getAtomGroups("nucleotide");
System.out.print("chain: >"+cha.getName()+"<");
System.out.print(" length SEQRES: " +cha.getLengthSeqRes());
System.out.print(" length ATOM: " +cha.getAtomLength());
System.out.print(" aminos: " +agr.size());
System.out.print(" hetatms: "+hgr.size());
System.out.println(" nucleotides: "+ngr.size());
} catch (Exception e) {
e.printStackTrace();
}The following is my code in JavaFX(getting errors)
var loadbtn:SwingButton = SwingButton{
text:"Load"
action: function():Void{
var pdbreader = new PDBFileReader();
var structure = null;
try{
structure = pdbreader.getStructure(filepath.text);
List<Chain> chains = structure.getChains(0);
foreach (Chain cha in chains){
List < Group > agr = cha.getAtomGroups("amino");
List < Group > hgr = cha.getAtomGroups("hetatm");
List < Group > ngr = cha.getAtomGroups("nucleotide");
} catch (e:IOException) {
e.printStackTrace();
};I'm using Netbeans 6.5 with JavaFX
(PDBFileReader, Chain, Structure etc are classes from my own package, already added to the library folder under the project directory)
Simply put, How to use List and Foreach in JavaFX?We can not use Java Generics syntax in JavaFX. But we can use Java Collection classes using the keyword 'as' for type-casting.
e.g.
import java.util.LinkedList;
import java.util.List;
import javafx.scene.shape.Rectangle;
var outerlist : List = new LinkedList();
var innerlist : List = new LinkedList();
innerlist.add(Rectangle{
width: 10 height:10});
innerlist.add(Rectangle{
width: 20 height:20});
outerlist.add(innerlist);
for (inner in outerlist) {
var list : List = inner as List;
for (element in list) {
var rect : Rectangle = element as Rectangle;
println("(width, height)=({rect.width}, {rect.height})");
} -
How to retrive the List in jsp
Hi
i m storing the objects of the same class in the List. and that list i stored in a request scope in the Acton class . Now i want to acess the single object from the List in jsp page ...
so please suggest me ; how can i access it ? and i also dont want to use any scriptlet code
i want to access it through jsp or html tags .....Try this (assuming you have the list in request scope as variable myList)
<c:forEach var="listItem" items="${ requestScope.myList }">
<c:out value="${listItem}"/> </td>
</c:forEach> -
How to display list process, when i run sql*loader in c#
Hello,
How to display list process, when i run sql*loader in c#. I mean when i run sql*loader from cmd windows, i get list process how many row has been inserted. But when i run SQL*Loader from C#, i can't get process SQL*Loader.
This is my code:
string strCmd, strSQLLoader;
string strLoaderFile = "XLLOAD.CTL";
string strLogFile = "XLLOAD_LOG.LOG";
string strCSVPath = @"E:\APT\WorkingFolder\WorkingFolder\sqlloader\sqlloader\bin\Debug\8testskrip_HTTP.csv";
string options = "OPTIONS (SKIP=1, DIRECT=TRUE, ROWS=1000000,BINDSIZE=512000)";
string append = "APPEND INTO TABLE XL_XDR FIELDS TERMINATED BY ','";
string table = "OPTIONALLY ENCLOSED BY '\"' TRAILING NULLCOLS (xdr_id,xdr_type,session_start_time,session_end_time,session_last_update_time,session_flag,version,connection_row_count,error_code,method,host_len,host,url_len,url,connection_start_time,connection_last_update_time,connection_flag,connection_id,total_event_count,tunnel_pair_id,responsiveness_type,client_port,payload_type,virtual_type,vid_client,vid_server,client_addr,server_addr,client_tunnel_addr,server_tunnel_addr,error_code_2,ipid,c2s_pkts,c2s_octets,s2c_pkts,s2c_octets,num_succ_trans,connect_time,total_resp,timeouts,retries,rai,tcp_syns,tcp_syn_acks,tcp_syn_resets,tcp_syn_fins,event_type,flags,time_stamp,event_id,event_code)";
strCmd = "sqlldr xl/secreat@o11g control=" + strLoaderFile + " LOG=" + strLogFile;
System.IO.DirectoryInfo di;
try
System.Diagnostics.ProcessStartInfo cmdProcessInfo = new System.Diagnostics.ProcessStartInfo("cmd.exe");
di = new DirectoryInfo(strCSVPath);
strSQLLoader = "";
strSQLLoader += "LOAD DATA INFILE '" + strCSVPath.ToString().Trim() + "' " + append + " " + table;
StreamWriter writer = new StreamWriter(strLoaderFile);
writer.WriteLine(strSQLLoader);
writer.Flush();
writer.Close();
// Redirect both streams so we can write/read them.
cmdProcessInfo.RedirectStandardInput = true;
cmdProcessInfo.RedirectStandardOutput = true;
cmdProcessInfo.UseShellExecute = false;
cmdProcessInfo.LoadUserProfile = true;
//System.Diagnostics.Process.Start("CMD.exe", strCmdLine);
// Start the procses.
System.Diagnostics.Process pro = System.Diagnostics.Process.Start(cmdProcessInfo);
// Issue the dir command.
pro.StandardInput.WriteLine(strCmd);
// Exit the application.
pro.StandardInput.WriteLine("exit");
//Process[] processlist = Process.GetProcesses();
//foreach(Process pro in processlist){
Console.WriteLine("Process: {0} ID: {1}", pro.ProcessName, pro.Id);
Console.WriteLine(pro.StandardOutput.ReadLine());
// Read all the output generated from it.
string strOutput;
strOutput = pro.StandardOutput.ReadToEnd();
pro.Dispose();
catch (Exception ex)
return;
finally
Thanks.friend
sqlldr is an application residing in the OS. procedure runs in the dbms engine.
you cannot run an os command directly from a procedure or a function or a package .
If you want to do so you need to use either a daemon process created by a PRO*C program
or a JAVA stored procedure to do so.
just refer to previous question forums, you can find the solution. Somebody has already given a solution using
java to run an OS command . check it out
prakash
[email protected] -
How to discover/list 'NICE' process priority ???
I know how to change it.
How do you LIST them ?
TYErmanno Polli wrote:
orangekay wrote:
That's because you left out the "your favorite options" part. Try something like
LOL :-D
I thought he was more unix savy, judging by his request.
If he knows how to change the "niceness" of a process, he has to know how to list them.
Since nice is not in the standard listing, it could be normal to not remember the right option.
But he should have known how to use man, on the other hand..
Oh, well...
ps aux -O nice
Ciao,
Ermanno
Hey Ermanno, new friend...
*I DO Know how to use 'man'*.. - even said :"nor did *apropos display priority* & Variations... tho I Found 'Getpriority' which doesn't seem to be present:(
" {Anyone know why it isn't, BTW ??} - Generally, I find apropos about as useful as +<milk production spigots,4 letters>+ on a Bull...
{On the subject: does anyone now of a decent online help fast DB Tool for OS X /Darwin/BSD? -the type of programmers tool I used to use with CodeWorrier (sic) for system calls, syntax & similar when I was still programming...)
BUT, when someone responds with
ps -O nice
In answer to a question like mine.. You copy,paste and GO, don't you?
I Got results that looked right/reasonable. The Command looked right, HAD 'nice' in it, so I naturally assumed (wrongly,of course) that 'nice' was expected in the results (silly me ) and so posted back rather than going for man (gotta admit, man is often scarcely comprehensible -I think the system needs a SUPERman - more like 'Help - and more helpful than 'Help... man is more a 'memory jogger' than anything else IMNSHO
You're just trying to get outa admitting that it woulda been just as easy to have given me:
ps aux -O nice
:P
But thank you very kindly for the assistance.
+(Just FYI: wikip says "...A niceness of −20 is the highest priority and *19 is the lowest* priority. ...".+ Further: +"...Thus a process run with nice +15 will receive 1/4 of the CPU time allocated to a normal-priority process: (20-15)/(20-0)=1/4. *On the BSD 4.x scheduler, on the other hand, the ratio in the same example is about ten to one.....*"+ Wonder what it is on Mac/Darwin ...
I Gotta award the 'Solved' to someone...
I thank everyone - and wish this system would allow me to award more 'Helpful' points... seems unfair.
so: THANK YOU:-
orangekay
Courcoul
glsmith
- and even * 'I love my macbo...'* - for trying to help.
and,of course,
Ermanno
To whom,
Ciao...
Problem solved. -
How to retrieve datas from database to dropdown list in jsp
hai.
please tell me how to retrieve a perticular field list from database to a drop down list using jsp. i am new to jsp. i am doing employee management system. in that i need to edit employee's details as like.
so that i want to display employee id's in a drop down list. i want to retrieve from database and display.
please help me in this .
advance thanks.Hello friendz,
If tht is the i wud suggest if guyz can go wid AJAX...
try to make use of xmlHttp Object and generate a new dependent drop down by using a property from a bean->servlet->VIEW(FORM)
else save the form state in a session and then refersh it. once all in again.
i had a similar problem which i solved in the following way
Hi friend,
I had a similar situation and i tried to solve it by using XmlHttpRequest Object(used in AJAX).
U can checkout the below example just for further reference delete
UserForm.jsp:
==========
<head>
<script>
var xmlHttp
function showState(str)
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
alert ("Browser does not support HTTP Request")
return
var url="getState.jsp"
url=url+"?count="+str
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=stateChange
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
function stateChange()
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){
document.getElementById("state").innerHTML=xmlHttp.responseText
</head>
<body>
<select name='country' onchange="showState(this.value)">
<option value='india>india</option>
</select>
<br>
<div id='state'>
<select name='state' >
<option value='-1'>pickone</option>
</select>
</div>
</body>
getState.jsp
============
<%@page language="java" import ="java.util.Hashtable" import ="java.util.Set" %>
<%
String country=request.getParameter("count");
response.setContentType("text/html");
response.setHeader("Cache-Control","no-cache");
try{
Hashtable ht = (Hashtable)session.getAttribute("<ATTRIBUTE_NAME>");
String buffer="<select name='state'><option value='-1'>Pick One</option>";
Set s=ht.keySet();
Object keys[]=s.toArray();
int size=keys.length;
for(int i=0; i < size;i++){
buffer=buffer+"<option value='"+ht.get(keys).toString()+"'>"+ht.get(keys).toString()+"</option>";
buffer=buffer+"</select>";
response.getWriter().println(buffer);
catch(Exception exp){
response.getWriter().println(exp);
%> -
JSP: How do display list of objects in jsp table?
sorry that my question my confuse you, let me explain more.
in my java class, have method : public List retrieveAllVacancies(); and it returns a list of available vacancies.
on my jsp page, i want to display the vicancies in the table have 3 rows:
vacancy title | location | contract type
should i use some form of for loop or iterator to get the vacancies in the list? how does the jsp page get the list of objects?
anyone can help me? thanksi found out the actual thing i look for is how to pass the vector to the jsp page.
<table>
<%
Vacancy vacancy= new Vacancy();
Vector allVacancies = new Vector();
*//allVacancies = (java.util.Vector)request.getAttribute("allVacancies");*
if(allVacancies.size() == 0)
out.print("<br><br><br> There are no vacancies available!!");
else
%>
<tr>
<td>Vacancy Title</td>
<td>Contract Type</td>
<td>Location</td>
</tr>
<%
for (int i=0;i<allVacancies.size();i++)
vacancy = (Vacancy)allVacancies.get(i);
%>
<tr>
<td><% out.print(vacancy.getVacancyTitle());%></td>
<td><% out.print(vacancy.getContractType());%></td>
<td><% out.print(vacancy.getVacancyLocation()); %></td>
</tr>
<%
%>
</table>*//allVacancies = (java.util.Vector)request.getAttribute("allVacancies");*
if i have this line, when i open the jsp page it will gives NullPoniterException.
the following was what i found for the similar problem,
You can add the Vector to the HttpSession with_
session.setAttribute(String name, Object value)_
or to the ServletRequest with_
request.setAttribute(String name, Object value)._
In the other JSP, retrieve the value with_
session.getAttribute(String name)_
or to the ServletRequest with_
request.getAttribute(String name)._
but i tried to do in this way it didn't work. for sure i didn't do it correctly. could anybody give bit more explanation about how to pass the Vector to the jsp page?
any help would be appreciated. -
How to create two level dynamic list using JSP , Java Script and Oracle
I am new in JSP. And i am facing problem in creating two level dynamic list using JSP ,Java Script where the listdata will come from Oracle 10g express edition database. Is there any easy way in JSP that is available on in ASP.NET.
Plz response with details.1) Learn JDBC API [http://java.sun.com/docs/books/tutorial/jdbc/index.html].
2) Create DAO class which contains JDBC code and do all SQL queries and returns or takes ID's or DTO objects.
3) Learn Servlet API [http://java.sun.com/javaee/5/docs/tutorial/doc/].
4) Create Servlet class which calls the DAO class, gets the list of DTO's as result, puts it as a request attribute and forwards the request to a JSP page.
5) Learn JSP and JSTL [http://java.sun.com/javaee/5/docs/tutorial/doc/]. Also learn HTML if you even don't know it.
6) Create JSP page which uses the JSTL c:forEach tag to access the list of DTO's and iterate over it and prints a HTML list out.
You don't need Javascript for this. -
How 2 disply 2 or More coulmns from the DBase to Dropdown list in JSP
Dear Friends,
Please can anyone help us, on displaying the 2 or more columns into a single Dropdown list in the JSP page, by using Struts-tag Libraries
We are displayig only 1 coulmn from the DBase resultset to Dropdown list,
When we try to concatenate, 2 columns of the resulset, the data format has changed
Please help, Early response is appreciated
Thanking you
JagadishWE are using sturts , Fallowing is code for
extracting the O_NOUN and O_MODIFIER table Columns from the DBase and setting into
"mat_Reg_ActionForm" form
Statement stmt = null;
ResultSet rs = null;
ArrayList objQualList = new ArrayList();
String query = " SELECT UNIQUE O_NOUN , O_MODIFIER FROM O_NOUN_MOD ";
stmt = conn.createStatement();
rs = stmt.executeQuery(query);
String columnLabel = (rsmd.getColumnName(0)+"|"+rsmd.getColumnName(1));
String columnLabel = "Object"+"|"+"Modifier";
objQualList.add(columnLabel);
while(rs.next())
String objModifier = (rs.getString("O_NOUN")+"|"+rs.getString("O_MODIFIER"));
objQualList.add(objModifier);
mat_Reg_ActionForm.setObject(objQualList);
Fallowing the iteration with which we are displaying the data in the Drop downl List
"mat_Reg.jsp"
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<html>
<head><title></title>
</head>
<body>
<html:form action="mat_Reg.do" name="mat_Reg_ActionForm" type="com.pilog.bo.ManfPartNoActionForm">
<html:select name="mat_Reg_ActionForm" property="object">
<html:options name="mat_Reg_ActionForm" property="object"/>
</html:select>
</TR>
</TABLE>
</html:form>
</body>
</html>
Is this code will help you give us some guidence ! Your early reply will be appreciated
Thankng you -
How to populate list box in module pool program
How to populate list box in module pool program.
Please give me reply as soon as posible
regards,
Venu.hi,
go thrugh the folling code .
TABLES sdyn_conn.
DATA ok_code TYPE sy-ucomm.
Global data
TYPES: BEGIN OF type_carrid,
carrid type spfli-carrid,
carrname type scarr-carrname,
END OF type_carrid.
DATA itab_carrid TYPE STANDARD TABLE OF type_carrid.
*& Processing Blocks called by the Runtime Environment *
Event Block START-OF-SELECTION
START-OF-SELECTION.
CALL SCREEN 100.
Dialog Module PBO
MODULE status_0100 OUTPUT.
SET PF-STATUS 'SCREEN_100'.
ENDMODULE.
Dialog Modules PAI
MODULE cancel INPUT.
LEAVE PROGRAM.
ENDMODULE.
MODULE user_command_0100 INPUT.
CASE ok_code.
WHEN 'SELECTED'.
MESSAGE i888(sabapdocu) WITH sdyn_conn-carrid.
ENDCASE.
ENDMODULE.
Dialog Module POV
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.
the following code should be included in flow logic of screen
process on value-request.
field scarr-carrname module create_dropdown_box.
in module pool select list box.
hope it is useful.
regards,
sreelakshmi. -
How do I list the e-mail addresses in my contacts group? It seems to go only to the first address.
Hi ozziejack123,
Welcome to the Support Communities!
The individual contacts are sorted first within the Contact application. When you create a group in Contacts, the individual names in the group should keep the same sorting order. Try resetting the name order for all contacts.
Contacts (Mavericks): List contacts by first or last name
http://support.apple.com/kb/PH15091
Choose whether contacts’ first or last names are listed first, and whether they’re sorted by first or last name.
Change the name order for all contacts
Choose Contacts > Preferences, then click General.
Select an option next to “Show first name.”
Sort contacts
Choose Contacts > Preferences, then click General.
Use the Sort By menu to choose how to sort.
I hope this information helps ....
- Judy -
How to get listed as a XMP partner?
Hi there
We have just released a major metadata/keywords update, to our Digital Asset Management solution, based on Adobes XMP format.
Does anybody know how to get listed on the XMP partner page: http://www.adobe.com/products/xmp/partners.html
Thanks,
Jesper
Filecamp.comHi Frank
Just wanted to make sure you got our company information:
Your full company name
Filecamp AG
A company representative (name, title)
Jesper Faurby, CEO, Filecamp AG
About the partner
Filecamp is a lightweight Digital Asset Management, Image Library, and Online Proofing solution. Filecamp provides a secure customer branded platform to organize, review, approve, and share digital assets. Subscribers are from all over the world - ranging from freelancers to large corporations, usually from within the creative/media industry.
The value of XMP technology
"Adobe's XMP technology enables Filecamp to read and write metadata for common file types. Our customers appreciate the embedded metadata which allows keywords and more, to "travel" along with the files across various products, vendors and platforms."
Logo
A 170x55 px version of the logo can be downloaded from here: https://files.filecamp.com/public/file/21xp-1cum8c4d
Many thanks for your help. Please let me know if you have any questions.
Ok?
Best regards
Jesper Faurby
www.filecamp.com
Media Asset Management, Image Library, Professional File Hosting & Online Proofing ... in one integrated, secure and cost-effective solution.
Maybe you are looking for
-
When I run update status reports, some computers show "not needed" for an update that is clearly needed. For instance, if I run a compliance report and look for the status of KB2775511, I get a lot of computers showing "Update is not required" - howe
-
Dmstool sometimes does not show all metrics
Platform: HP-UX B.11.11 U 9000/800 9iAS: 9.0.3.1 Sometimes dmstool does not show all metrics. there are different output generated by dmstool in different time. Who can explain why this occurs? $ dmstool -t JVM FLEXMON ERROR: Unknown type: JVM prod1*
-
Hi, In the layout tab I can't seem to move around any of the elements. I can put elements, but can't seem to move any of them or configure them. Am I doing something wrong or is it a bug in VC? Thanks,
-
Working with org.eclipse.draw2d .IFigure
Hi. I have the next problem. There are Window in my eclipse application. In this window my program paint figures. May be many figure in window area. So not all figures are visible in window(I need scroll to make them visible) I need reveal(make visib
-
Network error (-1001) during Mac OS check update
When I try to check new update for my MAC OS 10.5.6 an network error -1001 appear. I run the network dignostic utility and the network works properly. Concurrently if try to use SAFARI, it hang too. thnks in advance bgiulio66