logic:iterate question

2004-02-06 Thread Turner Benjamin
hello, i have a question about the logic:iterate tag. My tag iterates over an ArrayList which contains an amount of beans. However, in the last iteration i want to perform some special action. My current code looks something like this: logic:iterate id=foo name=bar scope=session indexId=index

R: repost: validator retrieving data

2004-02-06 Thread Leonardo Francalanci
in other words, your setup action will be called only when you enter the page for the first time Suppose I have: 1) A listbox with values retrieved from db 2) a form with values retrieved from db that the user can change. Now, if I don't call the setup action when there's a validation error,

R: repost: validator retrieving data

2004-02-06 Thread Leonardo Francalanci
I'm sorry, I'll try to explain better. If I used your solution in case of a validation error my list box would not be filled. When you have a validation error it returns to the page where you filled the list box and these values are the same that the user introduced. The listbox and

AW: logic:iterate question

2004-02-06 Thread Otto, Frank
Hello Ben, you can do this in this way: logic:iterate id=foo name=bar scope=session indexId=index ... logic:equal value=%=bar.length-1% name=index ... /logic:equal /logic:iterate Regards, Frank -Ursprüngliche Nachricht- Von: Turner Benjamin [mailto:[EMAIL

AW: logic:iterate question

2004-02-06 Thread Otto, Frank
Sorry, I mean: foo.length-1 instead bar.length-1 -Ursprüngliche Nachricht- Von: Otto, Frank [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 6. Februar 2004 10:41 An: 'Struts Users Mailing List' Betreff: AW: logic:iterate question Hello Ben, you can do this in this way: logic:iterate

Re: REPOST: Question on Frames within Tiles

2004-02-06 Thread Mark Lowe
IE on mac used the same dom as standard frames. Although I imagine that you can use getElementById for IE 6 as well as other browsers. document.all is a legacy dom from ie4 , if you're support NS4 then you can use a div and load content into that and drill using document.layers[mydiv]. The

[OT] Tomcat 5 + j_security_check + login-error-page

2004-02-06 Thread Ronald Rotteveel
Hello everybody, I am porting my application from Tomcat 4.1.29 to Tomcat 5.0.18. I have a Struts ForwardAction mapped to /Login.do that produces the page with login form. Form based authentication is set with the following fragment of the deployment descriptor: login-config auth-method

Re: repost: validator retrieving data

2004-02-06 Thread Alvaro Martinez
Well, when I said: these values are the same that the user introduced I would want to say: the values selected by the user in the listbox .And the values introduced in fields, checkbox, ... stay too When an error occur, it doesnt return to preprare action. It just back to the page selected in the

Re: [Friday] Java in Aus

2004-02-06 Thread Adam Hardy
Since it's Friday, I thought I'd ask you Aussie java guys what the deal is on this strange points system Australia has for its working visas. I thought for a few years I'd never meet the target, whenever I thought about moving to down under. I'm too old, too British, not enough relatives

Request.getParameter()

2004-02-06 Thread Kamal Gupta
Can I set the request to null once I have got the value i required. I have a parameter which has to be set to null in the request object once it is been used as i dont want that request to go to the next page Can anyone help Regards Kamal

R: repost: validator retrieving data

2004-02-06 Thread Leonardo Francalanci
When an error occur, it doesnt return to preprare action. It just back to the page selected in the tag input (input=/prepare.jsp ) You dont need to write code like this... if (!comingFromAValidationError()) form.fillfromDB(); else // leave form as is, with data entered by the user }

Re: repost: validator retrieving data

2004-02-06 Thread Alvaro Martinez
Ok, I understand you... Let me I think it... - Original Message - From: Leonardo Francalanci [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, February 06, 2004 10:21 AM Subject: R: repost: validator retrieving data When an error occur, it doesnt return

R: repost: validator retrieving data

2004-02-06 Thread Leonardo Francalanci
Ok, I understand you... Let me I think it... I found 2 solutions so far: 1) hidden field in the form (extending a Form that has an hidden field and extending an action that has a method like isComingFromAValidatorError() that looks for the value of the hidden par) 2) If the request is a GET

Re: repost: validator retrieving data

2004-02-06 Thread Alvaro Martinez
You could use the mapping class and then compare what is the action tag execute. Some like this: if (mapping.getPath().compareTo(/prepare)==0) form.fillfromDB(); else do nothing; // leave form as is, with data entered by the user Dou you like this...? - Original Message - From:

logic:present Problem

2004-02-06 Thread Mlinar, Mario
My Action put´s a JavaBean into my request. Depending on the instance Type of my Bean I choose different Parameter names for my Bean. Code snippet Action: if (object instanceof A) { request.setAttribute(y, object); } else if(object instanceof B) { request.setAttribute(x,

RE: logic:iterate question

2004-02-06 Thread Turner Benjamin
hi otto, that solution didnt work - it wouldn't recognise bar as a variable in the %= %. this solution does work for me: bean:size id=size name=articles scope=session / ... logic:iterate id=article name=articles scope=session indexId=index ... logic:equal value=%=

RE: repost: validator retrieving data

2004-02-06 Thread anant.parnami
You don't need 2 actions only 3 mappings yes But action would only be 1 Single Class -Original Message- From: Leonardo Francalanci [mailto:[EMAIL PROTECTED] Sent: Friday, February 06, 2004 3:15 PM To: Struts Users Mailing List Subject: R: repost: validator retrieving data Ok, I

Re: [Friday] Java in Aus

2004-02-06 Thread Mark Lowe
Did you put down that you like to play rugby :o) On 6 Feb 2004, at 11:06, Adam Hardy wrote: Since it's Friday, I thought I'd ask you Aussie java guys what the deal is on this strange points system Australia has for its working visas. I thought for a few years I'd never meet the target,

nested iterators and writing back to the form

2004-02-06 Thread Michael Wiles
I have a nested list... something like: logic:iterate property=orders name=allocationOrder id=element .. .. .. logic:iterate property=orderDetails name=orders id=subElement .. html:text name=subElement property=qty/ ..

Re: nested iterators and writing back to the form

2004-02-06 Thread Claire Wall
if you use the nested tags rather than the logic and html tags then this should solve your problem. - Original Message - From: Michael Wiles [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, February 06, 2004 12:32 PM Subject: nested iterators and writing

Re: Request.getParameter()

2004-02-06 Thread Adam Hardy
On 02/06/2004 11:11 AM Kamal Gupta wrote: Can I set the request to null once I have got the value i required. I have a parameter which has to be set to null in the request object once it is been used as i dont want that request to go to the next page No, you're not allowed to edit the request

RE: logic:iterate question

2004-02-06 Thread Slattery, Tim - BLS
i have a question about the logic:iterate tag. My tag iterates over an ArrayList which contains an amount of beans. However, in the last iteration i want to perform some special action. My current code looks something like this: logic:iterate id=foo name=bar scope=session indexId=index

Re: nested iterators and writing back to the form

2004-02-06 Thread Mark Lowe
The second list just needs the have the name of the object that contains the list. At the moment you've got orders.getOrders() which i assume is wrong. If each order contains an iterate-able object then that's what you want to reference in the nested one. i think you want logic:iterate

Re: logic:iterate question

2004-02-06 Thread James Mitchell
Oops, did you mean to do this? c:forEach items=foo.bar var=bar varStat=stat c:if test=stat.last ^^^ do what needs to be done /c:if /c:forEach shouldn't that be? c:if test=${stat.last} ^^ ^ -- James Mitchell Software

RE: logic:iterate question

2004-02-06 Thread Slattery, Tim - BLS
shouldn't that be? c:if test=${stat.last} Yes, it sure should. And the first line should be: c:forEach items=${foo.bar} var=bar varStat=stat So the whole thing should look like this: c:forEach items=${foo.bar} var=bar varStat=stat c:if test=${stat.last} do what needs to be

Enable the log for RequestProcessor and other classes

2004-02-06 Thread Villalba Arias, Fredy [BILBOMATICA]
Hi, Is there a configuration variable (web.xml / struts-config.xml / other file) for enabling the log for the RequestProcessor class (and the like)? Regards, Freddy. --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.459 /

Back to the originating screen...

2004-02-06 Thread Jesse Alexander (KAID 11)
Hi I need a hint on how to return always to the originating action preserving all input-parameters to that originating action... problem: From any screen in my application the user is allowed to change the language of the UI. He should be immediately presented the same screen

RE: Back to the originating screen...

2004-02-06 Thread Villalba Arias, Fredy [BILBOMATICA]
Hi, IMHO, this is a difficult problem to solve (100%, that is). Including the redo-URL on the language link is the most practical of those options, if you are able to generate redo-URLs that do not redo the last action itself but only recompose the current view (not that simple, I know).

Re: nested iterators and writing back to the form

2004-02-06 Thread Michael Wiles
Even with the id's set correctly it doesn't write the value you enter into the html text box back onto the form. On Fri, 2004-02-06 at 16:31, Mark Lowe wrote: The second list just needs the have the name of the object that contains the list. At the moment you've got orders.getOrders()

RE: Back to the originating screen...

2004-02-06 Thread Jesse Alexander (KAID 11)
difficult indeed, that's why I wanted to hear what other's think. Fortunately, at the moment, this application is read-only... But I want something that works also in a read/write app. Thanks for reminding Alexander -Original Message- From: Villalba Arias, Fredy [BILBOMATICA]

RE: Back to the originating screen...

2004-02-06 Thread shirishchandra.sakhare
Hi, We have implemented similar concept.And you are right.You have to be careful not to redo the last posts. Luckily for us, the desin we had solved the problem.We have a concept of OpenAction(Actions that prepare data for view) and Save action(Post actions,actions that update DB).So in

RE: Back to the originating screen...

2004-02-06 Thread Jesse Alexander (KAID 11)
Sounds good. I normally try to follow a similar design... (open- and save-actions...) thanks for the hint Alexander -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Freitag, 6. Februar 2004 16:40 To: [EMAIL PROTECTED] Subject: RE: Back to the originating

Re: img tag with action as src

2004-02-06 Thread Greg Blomquist
Michael McGrady [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] At 10:13 AM 2/3/2004, Greg Blomquist wrote: I apologize in advance if this question has already been answered somewhere. Looks like basebeans is down so I can't search the struts-user archives. I'm trying to do the

Re: Back to the originating screen...

2004-02-06 Thread Joe Germuska
I would suggest intercepting the request processing cycle early on and looking for the evidence that the language has changed and adjust the user's session to the requested language before your other actions even execute. You can extend org.apache.struts.action.RequestProcessor and override

Re: Enable the log for RequestProcessor and other classes

2004-02-06 Thread Joe Germuska
Is there a configuration variable (web.xml / struts-config.xml / other file) for enabling the log for the RequestProcessor class (and the like)? Struts uses the commons-logging API. If Log4J is on the classpath, then you don't need any additional configuration besides the Log4J config files.

Re: nested iterators and writing back to the form

2004-02-06 Thread Mark Lowe
the method names and the scoped id name need to be the same i think, Its a quirk. On 6 Feb 2004, at 16:38, Michael Wiles wrote: Even with the id's set correctly it doesn't write the value you enter into the html text box back onto the form. On Fri, 2004-02-06 at 16:31, Mark Lowe wrote: The

RE: Back to the originating screen...

2004-02-06 Thread Guillermo Meyer
The action that changes the Language should target in a hidden frame and the forwarding JSP to be rendered in this hidden frame could reload the frames that need to be changed by language change: html:form action=/changeLanguiage target=hiddenFrame . /html:form When you submit this form, the

Tiles Dynamic Menu: Design Question

2004-02-06 Thread ZCurtis
Struts v1.1 We are currently using Struts and Tiles and have a dynamic navigation menu with 2-3 nested levels for each top-level menu item (over 100 total menu items). Currently, we are generating links with the action mapping and then appending parameters to determine what level in the menu

DisplayTag: each element in a table of it's own

2004-02-06 Thread Avinash Gangadharan
Hello All, I have a question for people using the displaytag tablib for table rendering. I was wondering is there an easy way I can display each of the object in my list that gets rendered as a row to show in a table of its own( showing the header again ). Thx Avinash

logic:iterate question

2004-02-06 Thread Dragos Madalin Popa
Hi, How can I iterate over a collection which depends of a request parameter? Thank You a lot, Dragos

RE: logic:iterate question

2004-02-06 Thread Wendy Smoak
From: Dragos Madalin Popa [mailto:[EMAIL PROTECTED] How can I iterate over a collection which depends of a request parameter? JSTL and/or Struts-EL can probably help, but I'm not quite sure what your question is. Can you give an example? -- Wendy Smoak Application Systems Analyst, Sr. ASU

RE: logic:iterate question

2004-02-06 Thread Dragos Madalin Popa
Hi, Thank you for your answer.I would like to change the code shown below, to pass a request parameter to the modelList function;something like this: public Collection getModelList(String requestString){}, where requestString is a parameter of the http request.. Warmest Regards, Dragos

Data truncation in request scope

2004-02-06 Thread Namasivayam, Sudhakar (Cognizant)
Title: Data truncation in request scope hi all, I am passing a lot of data from the action class through the request = scope but the data is getting truncated... ie there are 50 elements in the arraylist only 25 are displayed Is there any limit on the amount of data that can be

RE: logic:iterate question

2004-02-06 Thread Wendy Smoak
From: Dragos Madalin Popa [mailto:[EMAIL PROTECTED] Thank you for your answer.I would like to change the code shown below, to pass a request parameter to the modelList function;something like this: public Collection getModelList(String requestString){}, where requestString is a parameter of

RE: logic:iterate question

2004-02-06 Thread Kris Schneider
You should be able to use BeanUtils' mapped property access for this, right? c:set var=modelListProp value=modelList(${param.paramName})/ jsp:useBean id=modelListProp type=java.lang.String/ bean:define id=modelList name=bean property=%= modelListProp %/ Which should give you a bean called

RE: logic:iterate question

2004-02-06 Thread Kris Schneider
Forgot the obligatory, but you should really do this in an action. There's no reason to clog your JSP with this kind of stuff. Grab the collection in an action, set it as a request attribute, forward to the JSP, and... Quoting Kris Schneider [EMAIL PROTECTED]: You should be able to use

OT: question about using CVS to download commons-scaffold

2004-02-06 Thread Jim Anderson
I followed the instructions on page http://jakarta.apache.org/commons/sandbox/scaffold/cvs-usage.html, namely: cvs -d :pserver:[EMAIL PROTECTED]:/home/cvspublic login cvs -z3 -d :pserver:[EMAIL PROTECTED]:/home/cvspublic co jakarta-commons/scaffold and got the following error: cvs

Query String for tiles

2004-02-06 Thread Wayne Kidd
Is it possible to attach a query string to a tiles forward. my struts-config.xml has an entry like action path=/login name=login type=com.rdlogic.struts.control.LoginAction forward name=startapp path=tiles.self.effort/forward forward name=userForInput path=tiles.self.effort/forward forward

DispatchAction Problem

2004-02-06 Thread Ricardo de Souza Moura
Hello Folks I am having problems with my DispatchAction. The name of the my method parameter is method, and I have been receiveing this message error: Request [/testAction] does not contain handler parameter named method But this error has been happening only sometimes. Have somebody ever

RE: DispatchAction Problem

2004-02-06 Thread Wendy Smoak
From: Ricardo de Souza Moura [mailto:[EMAIL PROTECTED] Request [/testAction] does not contain handler parameter named method But this error has been happening only sometimes. Have somebody ever seen this error ? Yes, when the request doesn't contain the handler parameter. Take a look at the

RE: Query String for tiles

2004-02-06 Thread Anand Patil
I assume you want to pass the query string remember=test001 to /pages/time_inputeffort_body_nested.jspf. One way I can think of is put the remember=test001 as a request attribute in the logic of com.rdlogic.struts.control.LoginAction. try reading the attribute directly from the request, since

RE: DispatchAction Problem

2004-02-06 Thread Ricardo de Souza Moura
I know it, but It happen only sometimes. The same form sometimes works, and sometimes doesn't work. I don't get to make a simulation because this mistake only happens when I open my app to internet. My app work very well in my intranet. Does anybody have a sugestion ? From: Wendy Smoak [EMAIL

Re: Query String for tiles

2004-02-06 Thread Wayne Kidd
If I were using a straight action, I would simply get the path from my ActionForward subclass and append the query string to it. This seems ponderous for placing a parameter in the url. Is there any other way? Wayne Anand Patil wrote: I assume you want to pass the query string

RE: Data truncation in request scope

2004-02-06 Thread Robert Nocera
It may sound strange, and may not be what is happening to you, but I have seen similar things occur if your jsp page has a tag referencing a bean or list that isn't there somewhere further down on the page. -Rob _ From: Namasivayam, Sudhakar (Cognizant) [mailto:[EMAIL PROTECTED]

[OT] Examining Response Headers

2004-02-06 Thread Robert Taylor
Sorry for the OT post, but Googling and searching the mailing list archives are not producing much. I may not be asking the right question though. Anyhow, I need a tool (free) to examine the request and response headers. Any suggestions? robert

Re: [OT] Examining Response Headers

2004-02-06 Thread David Erickson
Filters + Eclipse + Debug? -David - Original Message - From: Robert Taylor [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, February 06, 2004 11:44 AM Subject: [OT] Examining Response Headers Sorry for the OT post, but Googling and searching the mailing list archives are not

RE: [OT] Examining Response Headers

2004-02-06 Thread Desai, Sunny
Try JMeter on soureceforge.net -Original Message- From: Robert Taylor [mailto:[EMAIL PROTECTED] Sent: Friday, February 06, 2004 1:45 PM To: [EMAIL PROTECTED] Subject: [OT] Examining Response Headers Sorry for the OT post, but Googling and searching the mailing list archives are not

Re: [OT] Examining Response Headers

2004-02-06 Thread Richard Yee
Robert, You can use the org.apache.soap.util.net.TcpTunnelGui tool to monitor your request and response messages. It comes in the Jakarta SOAP distribution. It acts like a proxy. You will need to run it using something like java org.apache.soap.util.net.TcpTunnelGui server_host_name 80 where

iterate over list of maps

2004-02-06 Thread Daniel Lipofsky
I want to iterate over a list where each object in the list is a map, and print values from the map. The problem, of course, is Map is not a bean - no getters and setters. Do I have to wrap each map in a bean, or is there a more clever approach. (I am pretty much stuck with list:iterate, not

RE: [OT] Examining Response Headers

2004-02-06 Thread Robert Taylor
Thanks to all who responded. Richard, the TcpTunnelGui looks like what I want. I'll check it out. Thanks again. robert -Original Message- From: Richard Yee [mailto:[EMAIL PROTECTED] Sent: Friday, February 06, 2004 5:01 PM To: Struts Users Mailing List Subject: Re: [OT]

RE: Query String for tiles

2004-02-06 Thread Anand Patil
I am confused. What I meant was that you are using a jsp or some form of jsp (judging by the extension as jspf) to render the body of the tile. The logic (if I may) must be that the jsp attached on the tile , will include the body attribute as a dynamic include. All I could think of is that you

RE: iterate over list of maps

2004-02-06 Thread Desai, Sunny
You can use LabelValueBean that's available in org.apache.struts.util.LabelValueBean package -Original Message- From: Daniel Lipofsky [mailto:[EMAIL PROTECTED] Sent: Friday, February 06, 2004 5:12 PM To: [EMAIL PROTECTED] Subject: iterate over list of maps I want to iterate over a list

Re: img tag with action as src

2004-02-06 Thread Michael McGrady
Well, Mr. Greg Bloomquist, Ben Anderson is not correct on that point, if you cite him correctly. You can use the src attribute fine. I do it all the time. I explore this more below. You said: With the help of Ben Anderson, I was able to figure out that I should be using the path attribute

RE: logic:iterate question

2004-02-06 Thread Michael McGrady
I don't think you can pass parameters in JSTL, at least not yet. But you could, in your action, call getModelList passing the String you got from the request, and then when you forward to the JSP, iterate over that Collection. I am not sure what you meant, Wendy, but, in case you meant that you

Re: Query String for tiles

2004-02-06 Thread Wayne Kidd
There is no include anywhere in my app. I am just combining tiles (jspf is the name of fragments of jsp pages)to build up the page. Top level of the page is a .jsp with a bunch of tiles:insert tags filling out the cells of a table. I just want to dynamically build a query string for the

Re: [OT] Examining Response Headers

2004-02-06 Thread Mike Duffy
Robert, DevProxy is a great program for monitoring the request and response headers: http://www.widgetbuilders.com/ I recently did some socket programming. DevProxy was an invaluable tool. You can see exactly what flows through the socket between browser and host. Very good GUI interface.

RE: Query String for tiles

2004-02-06 Thread Anand Patil
Oh ok ... I am sorry, I misunderstood ur requirement. Anand -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Wayne Kidd Sent: Friday, February 06, 2004 3:42 PM To: [EMAIL PROTECTED] Subject: Re: Query String for tiles There is no include anywhere in my app. I am

Re: Query String for tiles

2004-02-06 Thread Wayne Kidd
So, do you have any ideas? Wayne Anand Patil wrote: Oh ok ... I am sorry, I misunderstood ur requirement. Anand -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Wayne Kidd Sent: Friday, February 06, 2004 3:42 PM To: [EMAIL PROTECTED] Subject: Re: Query String for

RE: Query String for tiles

2004-02-06 Thread Gopalakrishnan, Jayesh
You could create an forward-action for the JSP. action path=/go/whatever type=org.apache.struts.actions.ForwardAction parameter=tiles.self.effort/ And modify the foward in your action to, forward name=startapp path=/do/go/faq?remember=test001/forward This may not fit within the best

RE: Query String for tiles

2004-02-06 Thread Gopalakrishnan, Jayesh
typo in my previous email. should have been.. forward name=startapp path=/do/go/whatever?remember=test001/forward -Original Message- From: Gopalakrishnan, Jayesh Sent: Friday, February 06, 2004 3:47 PM To: Struts Users Mailing List Subject: RE: Query String for tiles You could create

Re: img tag with action as src

2004-02-06 Thread Michael McGrady
Just to save you time looking, Greg Bloomquist, here is the tag that works: IMG height=18 alt=Powered by Struts src=RESOURCE.MICHAELMcGRADY?file_type=giffile_name=struts-power.gif Okay dokay? Not trying to beat a dead horse or get one to float when led to water but just letting you know

Re: DispatchAction Problem

2004-02-06 Thread Edgar Silva
Hi Ricardo... The only thing I can see in this situation is the some change in the value of parameter method, due to DispatchAction uses this value to call selected method in the class, I mean: the value of method must be the nome of method in the class. I am using a lot of DispatchActions,

Re: img tag with action as src

2004-02-06 Thread Michael McGrady
Greg, maybe the best way to help you with this is to give you the simple view solution and just forget the fancy stuff. If so, here is the URL: http://jakarta.apache.org/struts/userGuide/struts-html.html#img. - To

Problem in Multipage Validation with DynaValidatorForm

2004-02-06 Thread Joseph Jegan
Hello, My application has two page form (wizard type). To make the programming and maintenance simpler, I have selected Validator along with DynaValidatorForm. The problem which i am facing is that, my first page validation works correctly. But, second page doesnt seems to work. It doesnt go

PropertyDescriptor: internal error while merging PDs: with jdk1.4

2004-02-06 Thread Anand Stephen
Greetings, I get the following error when I run a web app with: java version 1.4.2_01 Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) It works without any problems with: java version 1.3.1_02 Java(TM) 2 Runtime