help me

Reply

Join Date: Dec 2007
Posts: 1,681
Reputation: javaAddict is a name known to all javaAddict is a name known to all javaAddict is a name known to all javaAddict is a name known to all javaAddict is a name known to all javaAddict is a name known to all 
Solved Threads: 227
Featured Poster
javaAddict's Avatar
javaAddict javaAddict is offline Offline
Posting Virtuoso

Re: help me

 
0
  #11
Sep 29th, 2008
Originally Posted by rakesh.mk View Post
thats ok after getting the data from the database i need to display the values in text fields. I mean when i select the username in drop down all the information of that perticular user should be displayed in the text.......which is nothing but getting user info...so wat i have to do?
What is your problem? Getting the data from DB or displaying them? Because displaying them is easy. Just call the setText() method of the JTextFields you have. It you want JTextArea call the append() method.
If it is JSP then use: <%= variable%> to display the value of variable in HTML
Check out my New Bike at my Public Profile at the "About Me" tab
Reply With Quote Quick reply to this message  
Join Date: Sep 2008
Posts: 7
Reputation: rakesh.mk is an unknown quantity at this point 
Solved Threads: 0
rakesh.mk rakesh.mk is offline Offline
Newbie Poster

Re: help me

 
0
  #12
Oct 1st, 2008
Originally Posted by peter_budo View Post
Is this part of an application or it should be used as part of web service?
ya its a part of application. i need edit user information and store new values into same location.
Reply With Quote Quick reply to this message  
Join Date: Sep 2008
Posts: 7
Reputation: rakesh.mk is an unknown quantity at this point 
Solved Threads: 0
rakesh.mk rakesh.mk is offline Offline
Newbie Poster

Re: help me

 
0
  #13
Oct 1st, 2008
Originally Posted by javaAddict View Post
What is your problem? Getting the data from DB or displaying them? Because displaying them is easy. Just call the setText() method of the JTextFields you have. It you want JTextArea call the append() method.
If it is JSP then use: <%= variable%> to display the value of variable in HTML
ok i will explain clearly and i will tell my over all work.

in our project we have admin module. ok when admin login into his account if he wants to change user information which is nothing but usermanagement section(usermanagement.jsp). when admin comes this page there is a drop down. In that drop down all the username should be fetched from the database so that when admin selects perticular username then in remaining fields such as designation, role, email should come from database for that perticular user.

now am getting all the user names in drop down which is as shown below

<%!ArrayList usernameslist; %>
<%
InsertRegister insrt=new InsertRegister();
try{
usernameslist=insrt.editUserInfo();
}
catch(SQLException sqe)
{
out.print(sqe.toString());
}
%>




<select type="text" name="select" class="spacer" id="select" onchange="fnChangeHandler_A(this, event); submitAction('EditUserInfo');">
<option>Select UserName</option>
<% Iterator itres=usernameslist.iterator();
while(itres.hasNext())
{ String value=(String)itres.next();
out.println("<option value='"+value+"' onclick='submitAction('EditUserInfo')'>"+value+"</option>");
}%>
</select>
</label></td>
</tr>


now the problem is i need to get the information into the text box by using this username list.

i think now you got my problem...
Last edited by rakesh.mk; Oct 1st, 2008 at 3:54 am.
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 4,212
Reputation: peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of 
Solved Threads: 489
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is offline Offline
Code tags enforcer

Re: help me

 
-1
  #14
Oct 1st, 2008
Originally Posted by rakesh.mk View Post
ya its a part of application. i need edit user information and store new values into same location.
Originally Posted by rakesh.mk View Post
  1. <%!ArrayList usernameslist; %>
  2. <%
  3. InsertRegister insrt=new InsertRegister();
  4. try{
  5. usernameslist=insrt.editUserInfo();
  6. }
  7. catch(SQLException sqe)
  8. {
  9. out.print(sqe.toString());
  10. }
  11. %>
  12.  
  13.  
  14.  
  15.  
  16. <select type="text" name="select" class="spacer" id="select" onchange="fnChangeHandler_A(this, event); submitAction('EditUserInfo');">
  17. <option>Select UserName</option>
  18. <% Iterator itres=usernameslist.iterator();
  19. while(itres.hasNext())
  20. { String value=(String)itres.next();
  21. out.println("<option value='"+value+"' onclick='submitAction('EditUserInfo')'>"+value+"</option>");
  22. }%>
  23. </select>
  24. </label></td>
  25. </tr>
This web service!
Request made to move this to JSP section...
Database connectivity from JSP is bad thing thing to do. Use servlets!
Secondly please start using [code]YOUR CODE HERE[/code]
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)

LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the JSP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC