Re: Getting a list from a session bean and displaying the data in a jsp

2002-05-17 Thread Ted Husted
Just to be clear, there are actually two distinct objects. The ActionFormBean is created by the form-bean element in the Struts configuration. This is a descriptor that the Struts ActionServlet (or sometimes html:form tag) uses to create an ActionForm object. Just to keep you on your toes,

Getting a list from a session bean and displaying the data in a jsp

2002-05-13 Thread Michael Delamere
Hi, I´ve got a session bean which returns an Object[] array of entity beans. In my action file I get the array via a jndiContext.lookup. That´s all no problem and I can retreive my data out of the entity beans. However, I´m slightly stuck getting them over to my jsp file. I´ve tried

Re: Getting a list from a session bean and displaying the data in a jsp

2002-05-13 Thread Raffy_Lata
In a non-nested context, you would do the following for a collection of objects associated with the request object logic:iterate name=entryList id=entry scope=request type=com.xxx.xxx.xxx.Entry tr tdhtml:text property=entry_subject //td tdhtml:text

RE: Getting a list from a session bean and displaying the data in a jsp

2002-05-13 Thread Galbreath, Mark
Declare a form bean with session scope associated with your action class and forwarded to the JSP in struts-config. Use your action class to set the bean's properties and then access the lists with iterate and individual properties with bean:write. Mark -Original Message- From: Michael

Re: Getting a list from a session bean and displaying the data in a jsp

2002-05-13 Thread Michael Delamere
Hi, thanks for the response. I´ve done exactly as you said and I get the following error message: === ERROR javax.servlet.ServletException: Cannot find bean org.apache.struts.taglib.html.BEAN in scope null at

Re: Getting a list from a session bean and displaying the data in a jsp

2002-05-13 Thread Michael Delamere
Thanks, I will try it. regards Michael - Original Message - From: Galbreath, Mark [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Monday, May 13, 2002 11:02 PM Subject: RE: Getting a list from a session bean and displaying the data in a jsp Declare a form

Re: Getting a list from a session bean and displaying the data in a jsp

2002-05-13 Thread Michael Delamere
Just one question to add to the previous one: Does this mean that I have to create a form bean for every ejb in order to make it accessible to the jsp? regards Michael - Original Message - From: Michael Delamere [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent:

RE: Getting a list from a session bean and displaying the data in a jsp

2002-05-13 Thread Galbreath, Mark
Not for every EJB, but I have a separate form bean for each JSP in which data is collected or displayed. I believe that is the practice recommended by Craig. -Original Message- From: Michael Delamere [mailto:[EMAIL PROTECTED]] Sent: Monday, May 13, 2002 5:52 PM To: Struts Users Mailing

Re: Getting a list from a session bean and displaying the data in a jsp

2002-05-13 Thread Michael Delamere
Sorry to go on about this but I´m fairly new to struts and therefore I don´t understand all of the connections immediately. Basically what you suggested means that I would map a listEntries.jsp to a listEntriesForm.java which would contain a function called getEntries(); ? My formBean would get

RE: Getting a list from a session bean and displaying the data in a jsp

2002-05-13 Thread Galbreath, Mark
Exactly. -Original Message- From: Michael Delamere [mailto:[EMAIL PROTECTED]] Sent: Monday, May 13, 2002 6:20 PM To: Struts Users Mailing List Subject: Re: Getting a list from a session bean and displaying the data in a jsp Sorry to go on about this but I´m fairly new to struts and

Re: Getting a list from a session bean and displaying the data in a jsp

2002-05-13 Thread Raffy_Lata
Try to specify the name attribute in the html:text tag like so tdhtml:text name=gbEntry property=entry_subject //td tdhtml:text name=gbEntry property=entry_text //td tdhtml:text name=gbEntry property=entry_date //td Michael Delamere [EMAIL PROTECTED] on 05/13/2002 02:43:16 PM

Re: Getting a list from a session bean and displaying the data in a jsp

2002-05-13 Thread Michael Delamere
Thanks, I´m starting to get it now :-). I think it´s a good approach although the fact that it´s called a formBean is a bit confusing. regards Michael - Original Message - From: Galbreath, Mark [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Tuesday, May 14,

RE: Getting a list from a session bean and displaying the data in a jsp

2002-05-13 Thread Galbreath, Mark
Let's see your struts-config. -Original Message- From: Michael Delamere [mailto:[EMAIL PROTECTED]] Sent: Monday, May 13, 2002 5:43 PM To: Struts Users Mailing List Subject: Re: Getting a list from a session bean and displaying the data in a jsp Hi, thanks for the response. I´ve done

Re: Getting a list from a session bean and displaying the data in a jsp

2002-05-13 Thread Michael Delamere
Hi, Note: The message that you have got from me below was before you mentioned the formBean idea. I haven´t tested that one yet. Basically below you will see a config based on an example that I downloaded from the net. All that I have done for testing purposes so far is to get my data from my

RE: Getting a list from a session bean and displaying the data in a jsp

2002-05-13 Thread Galbreath, Mark
Michael, 1. Your input form should not contain iterator - it is for input. You need to define your html:text tags inside an html:form action=/saveGBEntry method=post and declare this bean and action in struts-config.xml like form-bean name=GBEntryForm !--name of the bean--

Re: Getting a list from a session bean and displaying the data in a jsp

2002-05-13 Thread Michael Delamere
Mark, Thanks very much for your time. I will try that now. Regards, Michael - Original Message - From: Galbreath, Mark [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Tuesday, May 14, 2002 1:22 AM Subject: RE: Getting a list from a session bean and