Iteration without Javacode

2003-08-03 Thread stephan
Hi list, I want to iterate over a number of rows from my database. I have removed most of my Javacode, but two statements remain. Any way I can get rid of those too? % BuchKatalog bk = new BuchKatalog(); % ol logic:iterate id=myBooks collection=%= bk.getBuecher() % li bean:write

Call methods from JSTL

2003-08-03 Thread stephan
hi list, I don't manage to use methods from my classes with JSTL. This is normal Java code: BuchKatalog bk = new BuchKatalog(); java.util.Iterator i = bk.getBuecher(); How can I achieve the same with JSTL? (tons of examples to continue afterwards, but none to this point .-()

Re: Call methods from JSTL

2003-08-03 Thread message message
You may want to have a look at this page. http://developer.novell.com/tech/1126.html. It shows, using struts, on how to retrieve and display data from a database. From: [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject:

Re: Iteration without Javacode

2003-08-03 Thread Mark Lowe
If the list is in an available context you can just use the name attribute.. % java.util.ArrayList myList = new ArrayList(); myList.add(one); myList.add(two); pageContext.setAttribute(mylist,myList.toArray()); % logic:iterate id=item name=mylist

Re: Re: Iteration without Javacode

2003-08-03 Thread stephan
Hi Mark, that eleminates one of the two scriplets, but leaves me with: pageContext.setAttribute(bk2, new BuchKatalog().getBuecher()); Anyway I can remove that one too? Stephan Mark Lowe [EMAIL PROTECTED] schrieb am 03.08.2003, 10:39:28: If the list is in an available context you can just

Re: Re: Call methods from JSTL

2003-08-03 Thread stephan
Hi message, I get an broken link error :-( message message [EMAIL PROTECTED] schrieb am 03.08.2003, 09:31:21: You may want to have a look at this page. http://developer.novell.com/tech/1126.html. It shows, using struts, on how to retrieve and display data from a database. From:

Re: Form action url get rewritten.

2003-08-03 Thread Mark Lowe
On Friday, July 25, 2003, at 08:08 PM, Curtney Jacobs wrote: Oopse, I forge to add that my action is no longer being called. It was working fine two days ago. I don't know what broke it. The only thing I notice was what I have written below. Also, I have pasted the relevant parts of my

Re: Iteration without Javacode

2003-08-03 Thread Anders Hermansen
* [EMAIL PROTECTED] ([EMAIL PROTECTED]) wrote: that eleminates one of the two scriplets, but leaves me with: pageContext.setAttribute(bk2, new BuchKatalog().getBuecher()); Anyway I can remove that one too? You can set the bk2 attribute in your action's execute method.

Re: Call methods from JSTL

2003-08-03 Thread Anders Hermansen
* [EMAIL PROTECTED] ([EMAIL PROTECTED]) wrote: I get an broken link error :-( Remove the . from the url: http://developer.novell.com/tech/1126.html Maybe you should also look closer at the Learing about Struts on the struts website: http://jakarta.apache.org/struts/learning.html Hope this

Re: Call methods from JSTL

2003-08-03 Thread Mark Lowe
The scriplet was an example.. The code could just as simply be in an action. I included as a scriptlet so you didn't have to recompile and reload you webapp.. Ithough it would make thinks simpler but obviously I was making too many assumptions. If your iterator is straight from you model (DB

Re: dyna form property size.

2003-08-03 Thread Mark Lowe
Okay I've been looking at the struts source to try an solve this, I tried using the form config objects and setting the size there, but the form configuration is frozen. So when i try to set the form property size at run time i get an exception.. Merely attempting to populate the form to set

NewBie: Iterations for a constant no. of times

2003-08-03 Thread Jitesh Sinha
I have to show a row of 3 text fields a constant no. (say 5 ) of times . I have the code to show these 3 text fields in place in my jsp which will look like : table tr tdinput type=text name=aTextField/td tdinput type=text name=anotherTextField/td tdinput type=text name=anotherOneTextField/td

Re: Re: Call methods from JSTL

2003-08-03 Thread stephan
Hi Mark, why would I want to iterate over my data just to put it into an ArrayList? I thought the use of an Iterator is to prevent me doing that? I can set move the setRequest to my ActionClass, so now it works for me. Thanks! Stephan Mark Lowe [EMAIL PROTECTED] schrieb am 03.08.2003,

Re: Call methods from JSTL

2003-08-03 Thread Mark Lowe
ArrayLists are handy, and you need to read some of the excellent docs that are provided.. If your iterator is taken from your model (DB i should imagine) you wont want to be dumping its contents to your presentation layer without copying the contents to mediating structure. If this isn't

Re: Call methods from JSTL

2003-08-03 Thread Mark Lowe
you must have meant... request.setAttribute(myObj,it); Despite my misgivings about exclamation marks, I like your Torque primer. On Sunday, August 3, 2003, at 12:20 PM, Mark Lowe wrote: ArrayLists are handy, and you need to read some of the excellent docs that are provided.. If your

Re: Unable to compile

2003-08-03 Thread send2rajesh
Thanks! By adjusting the clock setting I was able to get rid of the compile warning of modified in future That still does not solve the primary error I am getting as below : [javac] C:\Program Files\eclipse\workspace\jakarta-struts\src\share\org\apache\struts\actio n\ActionServlet.java:117:

RE: NewBie: Iterations for a constant no. of times

2003-08-03 Thread Jitesh Sinha
Somebody please answer my question as in the email below.. -Original Message- From: Jitesh Sinha [mailto:[EMAIL PROTECTED] Sent: Sunday, August 03, 2003 3:20 PM To: Struts Users Mailing List Subject: NewBie: Iterations for a constant no. of times I have to show a row of 3 text

RE: NewBie: Iterations for a constant no. of times

2003-08-03 Thread Oguz Kologlu
You should be using the JSTL for this. Have a look at a concise JSTL reference at: http://www.manning.com/bayern/appendixA.pdf Oz -Original Message- From: Jitesh Sinha [mailto:[EMAIL PROTECTED] Sent: Monday, 4 August 2003 12:06 AM To: Struts Users Mailing List Subject: RE: NewBie:

RE: NewBie: Iterations for a constant no. of times

2003-08-03 Thread Jitesh Sinha
you mean to say there is absolutely no way I can achieve it by using Struts??? If that is the case,struts is not a wise choice to use in our apps..because we don't know what is present there and what is not -Original Message- From: Oguz Kologlu [mailto:[EMAIL PROTECTED] Sent:

RE: NewBie: Iterations for a constant no. of times

2003-08-03 Thread Oguz Kologlu
Jitesh, I didn't say that. I think you have some misconceptions about what struts is. You were asking how to do a for loop. The answer is to use the Java Standard Tag Library - JSTL. There is no need to use struts tags for this. JSTL and Struts tags play very nicely together. If you are

RE: NewBie: Iterations for a constant no. of times

2003-08-03 Thread Jitesh Sinha
That's fine Oz... Actually by looking at your reply,I thought you know that it cannot be done by Struts... Thanks for letting me onto JSTL -Original Message- From: Oguz Kologlu [mailto:[EMAIL PROTECTED] Sent: Sunday, August 03, 2003 8:29 PM To: Struts Users Mailing List Subject: RE:

RE: NewBie: Iterations for a constant no. of times

2003-08-03 Thread Erez Efrati
%@ taglib uri=http://java.sun.com/jstl/core; prefix=c % c:forEach begin=1 end=5 ... what ever you want here /c:forEach Hope this helps, Erez -Original Message- From: Jitesh Sinha [mailto:[EMAIL PROTECTED] Sent: Sunday, August 03, 2003 5:09 PM To: Struts Users Mailing List

Re: Iteration without Javacode

2003-08-03 Thread David Graham
--- [EMAIL PROTECTED] wrote: Hi list, I want to iterate over a number of rows from my database. I have removed most of my Javacode, but two statements remain. Any way I can get rid of those too? % BuchKatalog bk = new BuchKatalog(); % ol logic:iterate id=myBooks collection=%=

Internationalization on a DB Scale

2003-08-03 Thread Juan Alvarado
I am developing an e-commerce application which will need among other things store things like a product description in different languages. These different product descriptions would be stored in a database table(product) and there will be a column for each (product_description_en,

Re: RES: I18N in struts

2003-08-03 Thread Ted Husted
How a method inside the FormBean can get the current localization without receiveing aditional parameters? Add a locale property to your ActionForm. Then, in the reset method set it to the Struts locale stored in the session. -Ted. RODRIGO CARVALHO DOS SANTOS wrote: Yansheng, Thanks

RE: Calling a tiles definition from a jsp?

2003-08-03 Thread Holman, Cal
Currently a definition cannot be used as a target for a html:link. You can put a definition in a .jsp then forward to the .jsp. But calling an action to execute a definition is pretty easy you can use org.apache.struts.tiles.actions.DefinitionDispatcherAction with a parameter or define your

RE: Please Help With Simple Tiles Problem

2003-08-03 Thread Holman, Cal
Terry Hard to tell from a snippet of an entire site but if the definition page does not define anything except the page.jsp and if you always have form_wrapper.jsp around each for then you could move form_wrapper.jsp functionality to page.jsp and simplify the design. The other way to reduce is

[Problem]

2003-08-03 Thread Naohiro Kuroda
Dir sir, I'm developing Web Application for Schedule Management in the company by Struts-1.1 now. The contents are re-displayed after registering user information. But, if a new browser is opend, it will not those with a problem. I think that session information remains, but i don't know how it

Re: [Problem]

2003-08-03 Thread message message
the example code comes from the struts-logon application available from the struts website. for session information you should use Httpsession class for getting and setting session information. i.e. HttpSession session = request.getSession(); session.setAttribute(Constants.USER_KEY, form);

Newbie: Passing parameter using html:link, but how to get it back?

2003-08-03 Thread Andy Cheng
I have a JSP that contains a list of User bean, and I display that list with all the attributes of the User bean. I use literate tag to display it logic:iterate id=bUser offset=offset length=length name=vUserList indexId=rowNum scope=request tr tdbean:write name=bUser scope=page

pageflow for struts

2003-08-03 Thread Paul_T_Smith
Dear struts users, I have launched a sub-project at the struts sourceforge site which provides flow functionality for struts. Essentially it is a re-write of the struts controller and provides a significant set of additional features. I am currently working on finalizing the struts example and

Re: Newbie: Passing parameter using html:link, but how to get itback?

2003-08-03 Thread Rick Reumann
On Mon, Aug 04,'03 (11:36 AM GMT+0800), Andy wrote: If I do the data access part in UserDetailAction, how can I retrieve the UserId parameter that was specified from the link part in UserList.jsp? request.getParameter(UserId); -- Rick