Re: Is there a way to prevent urls from being entered from the browser?

2003-12-29 Thread Mark Lowe
. :-) -Original Message- From: Mark Lowe [mailto:[EMAIL PROTECTED] Sent: Monday, December 29, 2003 1:41 PM To: Struts Users Mailing List Subject: Re: Is there a way to prevent urls from being entered from the browser? Is like the one in virgin stores where you can ctrl+esc and get the menu/desktop up

Re: Is there a way to prevent urls from being entered from the br owser?

2003-12-29 Thread Mark Lowe
opensource, use it.. Pritpal Dhaliwal -Original Message- From: Mark Lowe [mailto:[EMAIL PROTECTED] Sent: Monday, December 29, 2003 11:59 AM To: Struts Users Mailing List Subject: Re: Is there a way to prevent urls from being entered from the browser? So to prevent urls from being entered from

Re: Problem with multibox check state

2003-12-27 Thread Mark Lowe
multibox, I need some coding for a dynamic array of multiboxes with the same property value, how do I set the values in the action class? Thanks in advance Regards H.Rajesh -Original Message- From: Mark Lowe [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 24, 2003 5:00 PM To: Struts Users

Re: tiles, conditional choice of

2003-12-27 Thread Mark Lowe
There are a number of options available here, i'd have a different def that extends showList , I'd call this base.list and then have different defs per list. name=user.list extends=base.list in fact i assumed you'd only have to over load body, you could even have a def as the value of body.

Re: bean:write not writing?

2003-12-27 Thread Mark Lowe
Aren't tags usually in /WEB-INF? On 27 Dec 2003, at 14:57, Michael Marrotte wrote: %@ taglib uri=/tags/struts-bean prefix=bean % is at the top of the JSP file and other bean:write tags are working in the same page... -Original Message- From: Sharad Acharya [mailto:[EMAIL PROTECTED]

Re: bean:write not writing?

2003-12-27 Thread Mark Lowe
taglib-uri/tags/struts-bean/taglib-uri taglib-location/WEB-INF/struts-bean.tld/taglib-location /taglib All my tags are defined like this and all are working (even bean:write) as advertised, except in this one case. -Original Message- From: Mark Lowe [mailto:[EMAIL PROTECTED] Sent

Re: bean:write not writing?

2003-12-27 Thread Mark Lowe
anything? Do I need a taglib descriptor for c:out? --Mike M. -Original Message- From: Mark Lowe [mailto:[EMAIL PROTECTED] Sent: Saturday, December 27, 2003 10:08 AM To: Struts Users Mailing List Subject: Re: bean:write not writing? Fair enough The only other thing i can think of is to use jstl

Re: bean:write not writing?

2003-12-27 Thread Mark Lowe
You could try something like this. public class Cart extends ActionForm { private String subTotal; private ArrayList items; public BigDecimal getSubTotal() { for(int i = 0;i items.size();i++) { CartItem item = (CartItem)

Re: tiles, conditional choice of

2003-12-27 Thread Mark Lowe
You could over load on the insert tiles:insert attribute=example.page tiles:put name=body value=%= body % / /titles:insert or do it a specialized action. There are plenty of options although I have trouble thinking of many scenarios where having 1000 different definitions would be

Re: design question

2003-12-24 Thread Mark Lowe
If the forms are in different windows then instantiating new forms I dont think will work. If you want a non javascript way of doing things then you'll want to scope the master form to the session, and then keep populating to from your subforms . However you do this I imagine that scoping the

Re: Problem with multibox check state

2003-12-24 Thread Mark Lowe
The checkboxes are selected depending on whether the value and the property value match.. html:multibox property=myprop value=foo / if myprop is set to foo it will be ticked.. On 24 Dec 2003, at 11:11, Rajesh, Harikrishnan (H.) wrote: Hi, I have a jsp input form with dynamically generated

Re: html:text value=? problem

2003-12-24 Thread Mark Lowe
html:text property=name value=%= user.getName() % / or html-el:text property=name value=${user.name} / You can also populate in the refering action (assuming you've one), i think this is better and keeps your form cleaner and thus perhaps more reusable. theForm.setName(Brian); or

Re: Select without selected value

2003-12-24 Thread Mark Lowe
Just don't set the form value. On 24 Dec 2003, at 15:15, AKostylev wrote: I want to have select element without any selected values by default. I can do this by setting selectedIndex=-1 or value='not_existing_value' in JavaScript. Can I do this with Struts functionality?

Re: parameters in a link

2003-12-24 Thread Mark Lowe
just need paramId to set the parameter name. On 24 Dec 2003, at 15:59, Otávio Augusto wrote: Hi all I'm trying to add a parameter (yeah,i mean only one) to a link. actually, it is an logic:iterator tag which generates a table, and one of the columns is the link to an action which is going to

Re: Select without selected value

2003-12-24 Thread Mark Lowe
an option will only be selected by default if the form property has been set to a value or there is a match in an available scope (like a parameter with the same name as the form property). Otherwise it will just do its thing. I'd use a simple action without a formbean for something like a

Re: Easy question: iterate

2003-12-24 Thread Mark Lowe
//psuedo code. List categoryList = Category.getList(); request.setAttribute(categories, categoryList.toArray()); logic:iterate id=category name=categories /logic:iterate I made the first bit up. But should give you the idea. jsp:useBean id=categories

Re: Easy question: iterate

2003-12-24 Thread Mark Lowe
for this collection Will - Original Message - From: Mark Lowe [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, December 24, 2003 12:31 PM Subject: Re: Easy question: iterate //psuedo code. List categoryList = Category.getList(); request.setAttribute(categories

Re: doubt

2003-12-24 Thread Mark Lowe
Hibernate throws that if it finds a null value on an indexed column. Of example if you've a load of users and groups and say 3 users with group_id of 999 and then someone removes group 999 you'd get this exception. On 24 Dec 2003, at 20:16, Otávio Augusto wrote: hi all Maybe this is an

Re: Error in JSP when using DynaActionForm

2003-12-23 Thread Mark Lowe
Its actually expecting theForm.get(aliasRef); and theForm.set(aliasRef,foo); but this shouldn't make any difference in the jsp as getAliasRef() and get(aliasRef).. are the same thing in the jsp (well in terms of the jsp one uses to access the properties.) Cheers Mark On 23 Dec 2003, at

Re: BeanUtils.populate Error

2003-12-20 Thread Mark Lowe
When are you getting this? Are you using dynaforms and/or validator action forms? On 20 Dec 2003, at 09:36, Raman wrote: I am facing a error in Struts at BeanUtils.populate and not able to trace the cause. has anyone already face this problem? if yes what the cause. Pls help. type Exception

Re: BeanUtils.populate Error

2003-12-20 Thread Mark Lowe
, at 10:41, Raman wrote: Hi I am using Validator form... is there something i am doing wrong in that? -- Raman - Original Message - From: Mark Lowe [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Saturday, December 20, 2003 4:11 PM Subject: Re: BeanUtils.populate Error

Re: BeanUtils.populate Error

2003-12-20 Thread Mark Lowe
] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Saturday, December 20, 2003 12:41 PM Subject: Re: BeanUtils.populate Error Hi I am using Validator form... is there something i am doing wrong in that? -- Raman - Original Message - From: Mark Lowe [EMAIL PROTECTED] To: Struts Users Mailing

Re: BeanUtils.populate Error

2003-12-20 Thread Mark Lowe
Message - From: Raman [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Saturday, December 20, 2003 12:41 PM Subject: Re: BeanUtils.populate Error Hi I am using Validator form... is there something i am doing wrong in that? -- Raman - Original Message - From: Mark

Re: URGENT - Help defending Struts

2003-12-19 Thread Mark Lowe
We've only got the 1st phase done, and there's still much to be done but http://www.murphyandnye.com This is a B2C site, but just displays the products and allows simple ordering at the moment. Next phase is the full ecommerce stuff. As it happens its done with struts. We've carved this out

Re: Dynamic html:image

2003-12-19 Thread Mark Lowe
Same as nico really but you might like the el option html-el:img page=${item} / i'd have the image as a bean with a path, name and desc properties html-el:img page=${item.path} imageName=${item.name} alt=${item.desc} / Cheers Mark On 19 Dec 2003, at 10:37, Nicolas De Loof

Re: setting array of elements in Action class.

2003-12-19 Thread Mark Lowe
If you've an array of array list as your form property form-property name=foo type=java.util.ArrayList / or example set(foo,int index,myvalue); and/or ArrayList list = new ArrayList(); theForm.set(foo,list); IMO this is less hassle using action forms not dynaaction forms. If you dont define

Re: simple question

2003-12-19 Thread Mark Lowe
Nothing to add really just a few variations on a theme. c:forEach var=num begin=0 end=999 html-el:option value=${num} c:out value=${num} / /html-el:option /c:forEach i think c:forEach var=num begin=0 end=999 htmll:option value=%= num %%= num %

Re: simple question

2003-12-19 Thread Mark Lowe
html:options name=numbers/ /html:select Quoting Mark Lowe [EMAIL PROTECTED]: Nothing to add really just a few variations on a theme. c:forEach var=num begin=0 end=999 html-el:option value=${num} c:out value=${num} / /html-el:option /c:forEach i think c:forEach var=num

Re: URGENT - Help defending Struts

2003-12-18 Thread Mark Lowe
just smile a little bit in a yeah right manner. he's just challenging you or plain old bulshiting.. Sure struts isn't used in all b2c sites, but so what, is that a point ? IMO If his team take to it then why not, its more a question of java/jsp or not that struts. On 18 Dec 2003, at 16:03, Max

Re: Newbie: java.lang.boolean and DynaActionForm?

2003-12-17 Thread Mark Lowe
DynaActionForms as cool as they are are more trouble than they're worth unless its a small simple form. For one thing you don't find out what's wrong until runtime. I just use strings for dynaaction forms as it works, the problems our in part caused (i think) by the conversions done by

Re: Newbie: java.lang.boolean and DynaActionForm?

2003-12-17 Thread Mark Lowe
No one's suggesting that anyone hangs them selves or that struts isn't good. But the fact that this list sees a high influx of newbies, getting battered with high-brow design concepts which while are very interesting have a certain chocolate fire guard quality to them . Easiest thing is to

Re: Newbie: java.lang.boolean and DynaActionForm?

2003-12-17 Thread Mark Lowe
reward. Thus the phrase was born taking the piss its also where spending a penny came from also. Cheers Mark Thank you, Ed - Original Message - From: Mark Lowe [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, December 17, 2003 10:33 AM Subject: Re

Re: Newbie: java.lang.boolean and DynaActionForm?

2003-12-17 Thread Mark Lowe
be exchanged by poorer folks for a financial reward. Thus the phrase was born taking the piss its also where spending a penny came from. Cheers Mark Thank you, Ed - Original Message - From: Mark Lowe [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday

Re: validation and DynaActionForm

2003-12-17 Thread Mark Lowe
Hi Marco Perhaps try a none strust form element input type=hidden name=methodToCall value=foo rather than html:hidden property=methodToCall value=foo / also if possible in your situation html:form action=/myaction.do?methodToCall=foo Cheers Mark On 17 Dec 2003, at 16:10, Marco Mistroni

Re: validation and DynaActionForm / concrete question

2003-12-17 Thread Mark Lowe
Hi marco well i think the problem your having is because you're using a dispatch action so the form is mapped to the action and its set to validate. You can either separte yu dispatch actions into standard actions or hack it by having a single action that calls your dispatch action much like

Re: Generate Java class from xml?

2003-12-17 Thread Mark Lowe
Dont know about using digester but html parser is a handy library. http://htmlparser.sourceforge.net/ Might help you do what you want. On 17 Dec 2003, at 22:45, Adam Hardy wrote: Hi Christopher, just a quick question about Digester, perhaps you can save me the effort of reading up on it to

Re: iBatis DAO + Hibernate?

2003-12-16 Thread Mark Lowe
Mine's an opinion from someone who's pretty good on the presentation and servlets stuff, and a lot greener in terms of model tier development. I've used torque and more recently hibernate on two separate projects.. Torque seems a bit dirtier, and a pain for deprecated dependencies, but does

Re: dynamically sized form (mostly solved)

2003-12-15 Thread Mark Lowe
Sorry I forgot the reason for this cognitive preservation with lazyList.. Arraylist works fine.. Even better if you ditch dyna forms in favour of action forms.. On 15 Dec 2003, at 15:44, Andy Schmidgall wrote: Robert, I also could not get LazyList to work with our DynaForms. -Andy

Re: Form and Session

2003-12-13 Thread Mark Lowe
If you're determinted to do this in jsp rather than an action servlet then c:set var=creator value=${articleForm.creator} scope=session / might do the job. I haven't tried it but I reckon it should work. On 13 Dec 2003, at 06:44, Caroline Jen wrote: The statement below in my JSP can write

tiles-el

2003-12-12 Thread Mark Lowe
Am I tree-barking or is there such a thing as tiles-el? I seem to recall some mention of it on the dev list but I cant find any reference to it on the struts site.. Anyone know anything? Cheers Mark - To unsubscribe, e-mail:

Re: tiles-el

2003-12-12 Thread Mark Lowe
Okay I've just had a sniff around the stuff in cvs, has any one used tiles-el without any bleeding edge issues? On 12 Dec 2003, at 10:33, Mark Lowe wrote: Am I tree-barking or is there such a thing as tiles-el? I seem to recall some mention of it on the dev list but I cant find any

displaying errors

2003-12-12 Thread Mark Lowe
This is more out of curiosity than a need, but does anyone have a way of drilling to ActionMessages previously ActionsErrors in jstl. My understanding is that html:errors is deprecated but that silly messagesPresent stuff does my suede in. If been trying c:out

Re: dynamically sized form (mostly solved)

2003-12-11 Thread Mark Lowe
Ted Sorry I'm not really sure what you mean by chrome bean. Or how one would go about scoping one to session while the action form (dyna or otherwise) is scoped the request. Do you mean you have a bean that persists beyond the form submission in which you can store the user input until such a

Re: setting up form validation

2003-12-11 Thread Mark Lowe
I think you work with my brother. Sorry thats OT , mail me off the list and I'll take a look.. Cheers Mark On 11 Dec 2003, at 13:41, Rupinder Singh Mazara wrote: Hi All , Can some help me in getting in setting up validation for data in the following format 2, 4, 5-9, 18, 21-25, 50 or 2, 90,

Re: AW: dynamically sized form (mostly solved)

2003-12-11 Thread Mark Lowe
If you mean how to you access get n set the indexed properties then like this. DynaActionForm theForm = (DynaActionForm) form; ArrayList fooList = (ArrayList) theForm.get(myprop) for(int i = 0;i fooList.size();i++) { String foo = (String) fooList.get(i); } or to set.. ArrayList

Re: dynamically sized form (mostly solved)

2003-12-10 Thread Mark Lowe
What's the problem? On 10 Dec 2003, at 21:20, Yee, Richard K,,DMDCWEST wrote: I thought it worked, but it didn't. -Richard -Original Message- From: Nifty Music [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 10, 2003 1:02 PM To: [EMAIL PROTECTED] Subject: RE: dynamically sized form

Re: dynamically sized form (mostly solved)

2003-12-10 Thread Mark Lowe
No the form (to the best of my knowledge) has to scoped to session, it all looks like it works using request until you submit. IMO you're best off using standard action forms for this kinda thing dynaform get annoying for several reasons although they do work. On 10 Dec 2003, at 22:01, Andy

[ot] image file to byte array

2003-12-03 Thread Mark Lowe
Although its not a struts problem as such I do happen to be using struts in my app.. Here some code as it will say more in less words that it will take to explain In my action servlet I have something like this.. code response.setContentType(image/jpeg); response.setHeader(Cache-Control,

Re: How Do I Create This Drop-Down List in Struts?

2003-11-30 Thread Mark Lowe
The collection that you want to iterate through and the form property aren't linked as such only when you nest the html:options tag in the html:select tag So your html:select form property is like any other form property, and when submitted will only the form property will be set to only one

Re: Hibernate plugin

2003-11-25 Thread Mark Lowe
if you need futher help. Regards, David -Original Message- From: Mark Lowe [mailto:[EMAIL PROTECTED] Sent: Monday, November 24, 2003 12:32 AM To: Struts Users Mailing List Subject: Hibernate plugin After spending all night pissing around with various hibernate plugins

Re: Hibernate plugin

2003-11-25 Thread Mark Lowe
Opps!! an inconsistency. SessionFactory sf = (SessionFactory) ctx.lookup(foo:/hibernate/SessionFactory); On 25 Nov 2003, at 16:07, Mark Lowe wrote: Hi Gopal David cleared this one up for me off the list (Big thanks), I assume you've the same problem with folks trying to create publishing

[OT] Re: URGENT:logic:iterate

2003-11-25 Thread Mark Lowe
Isn't handbags at 20 paces OT? ;o) On 25 Nov 2003, at 16:12, [EMAIL PROTECTED] wrote: Hi I dont want to start a new thread, but the question has changed and if u cant help just stay away. You dont have right to ruin my day and atleast i am asking questions related to struts.You could have

Hibernate plugin

2003-11-23 Thread Mark Lowe
After spending all night pissing around with various hibernate plugins to provide a datasource to use with hibernate? My JNDI datasource reports being okay in my container log, Context path=/mn-test docBase=mn-test debug=5 reloadable=true crossContext=true Logger

[OT] xdoclet + hibernate

2003-11-22 Thread Mark Lowe
Sorry to post this group with an almost unrelated question, but I'm sure someone on this list must be using xdoclet to generate hibernate resources. I wont take the piss and post the problem on this list but I would appreciate it if anyone who's been using hibernatedoclet could drop me a

Re: Still no reply for :Problem in grouping using logic iterate logic equal

2003-11-22 Thread Mark Lowe
I'm not sure how you've got things arranged but sounds like you could do with having you team objects having a getMembers() method. If you don't have this in you model then I guess its going to smart somewhat. List teamList = someModelStuff.getTeams(); request.setAttribute(teams,

Re: [OT] xdoclet + hibernate

2003-11-22 Thread Mark Lowe
and CMP 2.0, Velocity, WebWork, Sitemesh, POJO and Hibernate. then check out http://xpetstore.sourceforge.net/ matt -Original Message- From: Mark Lowe [mailto:[EMAIL PROTECTED] Sent: Saturday, November 22, 2003 7:23 AM To: Struts Users Mailing List Subject: [OT] xdoclet + hibernate Sorry

Re: [OT] xdoclet + hibernate

2003-11-22 Thread Mark Lowe
forum: http://forum.hibernate.org Regards, David -Original Message- From: Mark Lowe [mailto:[EMAIL PROTECTED] Sent: Saturday, November 22, 2003 9:32 AM To: Struts Users Mailing List Subject: Re: [OT] xdoclet + hibernate Thanks Matt I found the xdoclet list just after I posted this question

Re: Inheritance in tile definition files I

2003-11-22 Thread Mark Lowe
You'll hear a lot of shit talked about tiles. This article explains the lot http://www.javaworld.com/javaworld/jw-01-2002/jw-0104-tilestrut.html I use the Tiles inheritance solution. Saves all those jsp's with forwards and redirects. The secret is that you always need to us an action

Re: Dealing with Initializaing data source exception

2003-11-22 Thread Mark Lowe
business solutions Specialiste en solutions d'affaires interactives 14 Commerce Place, 5th floor Nun's Island, QC H4E 1T5 t: 514 768-1000 f: 514 768-7680 -Original Message- From: Mark Lowe [mailto:[EMAIL PROTECTED] Sent: November 21, 2003 12:25 To: Struts Users Mailing List Subject: Re

Re: dynamically sized form

2003-11-21 Thread Mark Lowe
I tend to use arraylist rather than an array, works a treat the only work around is having to put the list in the request or session as well as the form. ArrayList rateList = new ArrayList(); bla , bla.. theForm.set(rate,rateList); request.setAttribute(rate,rateList); .. logic:iterate id=r

Re: Dealing with Initializaing data source exception

2003-11-21 Thread Mark Lowe
If you've been looking through the archives you'll know that datasource in struts config is considered the devil's spawn and its use isn't recommended. Have a look at you TC docs as configuring a JNDI datasource is web xml. You could botch a try catch statement that forwards to your error

Re: dynamically sized form (mostly solved)

2003-11-21 Thread Mark Lowe
On 21 Nov 2003, at 17:18, Yee, Richard K,,DMDCWEST wrote: Matt, The answer to your main question is, No. You don't have to specify the form as the input of the preloader. You don't even really have to have a separate 'pre-loader' action for this form. In any action that will forward to your

Re: dynamically sized form (mostly solved)

2003-11-21 Thread Mark Lowe
On 21 Nov 2003, at 18:29, Matt Bathje wrote: DynaActionForm taxRatesForm = new DynaActionForm(); and taxRatesForm.set(taxRates, allTaxRates); request.setAttribute(taxRates, allTaxRates); Creating a form in the action servlet is one sure way to piss the folks off who have to maintain the app. You

Re: dynamically sized form (mostly solved)

2003-11-21 Thread Mark Lowe
Dick Oh well... There's just no telling some folks.. [OT] But then I've just seen who you're working for.. Sleep well.. On 21 Nov 2003, at 21:04, Yee, Richard K,,DMDCWEST wrote: Matt, I found out that using new DynaActionForm()inside of the PreLoaderAction.execute() doesn't work. It gives a

Re: dynamically sized form (mostly solved)

2003-11-21 Thread Mark Lowe
? Or is it something else that you find objectionable? -Richard -Original Message- From: Mark Lowe [mailto:[EMAIL PROTECTED] Sent: Friday, November 21, 2003 3:38 PM To: Struts Users Mailing List Subject: Re: dynamically sized form (mostly solved) Dick Oh well... There's just no telling some folks

Re: Lazy questions on this list

2003-11-20 Thread Mark Lowe
No its not your imagination.. Some of the questions are just about basic tag which is well documented with examples (for those who first language isn't english). I usually don't believe in stupid questions, as all questions are good, but alas i've been proved wrong. On 20 Nov 2003, at

Re: html:options tag problem

2003-11-17 Thread Mark Lowe
So your end user has to select 1 of 1800 options 8 times on one page? I've never had trouble with options but then again i've never smoked enough crack to think select menus with 1800 options would be a good thing. As a test you could use model 1 jsp or/and jstl to compare., c:forEach

Re: xdoclet strutsconfigxml thingy

2003-11-12 Thread Mark Lowe
I had to use the destdir attribute strutsconfigxml version=1.1 destdir=${build.dir}/WEB-INF / On 12 Nov 2003, at 12:23, [EMAIL PROTECTED] wrote: Yes it is quitte easy: In build.xml target name=xdoclet.web taskdef name=webdoclet

Re: OT - what is a blonk

2003-11-06 Thread Mark Lowe
Nottingham Forest beat Luton 2 -1 I assume the rest of your question was an attempt at humor. Cheers Mark On Thursday, November 6, 2003, at 05:03 AM, [EMAIL PROTECTED] wrote: This is off topic but I couldn't wait til casual friday... I have the following problem in my web-app. When I try and

Re: I get a blank page

2003-11-04 Thread Mark Lowe
what do you mean by execute my (your) submit.jsp ? I could be wrong, but looks like you're trying to be a bit of a picasso with your property names. On Tuesday, November 4, 2003, at 10:50 AM, sairam manda wrote: Hello Sir, I get blank page when I execute my submit.jsp . I have a simple

Re: DynaAction form and ArrayList

2003-11-03 Thread Mark Lowe
while(rs.next()) { Map teacher = new HashMap(); teacher.put(firstName,rs.getString(firstName)); teacherList.add(teacher); } teacherForm.set(teachers, teacherList); request.setAttribute (teachers, teacherList.toArray()); Cheers Mark On Monday, November 3, 2003, at 07:35

Re: DynaAction form and ArrayList

2003-11-03 Thread Mark Lowe
It works alright but last time i played with these beanutil's toys it was understandably slow. A little less slower is getting the resultsetmetadata and using them as your property names. IMO its better to make some beans and populate them with the result set values, until you've time to put a

Re: euro date

2003-10-31 Thread Mark Lowe
Just define the form property as a string form-property name=date type=java.lang.String / when you get the date from you model either format it in your referring class, using DateFormat. java.util.Date date = new java.util.Date( dateString ); now you can format and then feed it back to the

Re: Exception handling - please help!

2003-10-29 Thread Mark Lowe
Its not the best way, but a reasonable and simple way of dealing with this stuff is to use a try/catch statement in you action servlet. try { //your code that does the search stuff bla bla return (mapping.findForward(success)); } catch (WhatEverExceptionYouWantToThrow e) { //print

Re: html:select onchange

2003-10-29 Thread Mark Lowe
Perhaps you don't need to pass the id in as an argument. I'd just wrap the action in a js function function setupUserForm() { alert( 'setUpUsersForm.do?action=retrieveuserId=c:out value=${param.userId} / ' ); } onchange=setupUserForm() .. On Wednesday, October 29, 2003, at 11:12 AM,

Re: html:select onchange

2003-10-29 Thread Mark Lowe
In fact ignore my suggestion, I was silly and assumed the userId was taken somewhere else but the form. On Wednesday, October 29, 2003, at 11:33 AM, Mark Lowe wrote: Perhaps you don't need to pass the id in as an argument. I'd just wrap the action in a js function function setupUserForm

Re: html:hidden +session

2003-10-29 Thread Mark Lowe
If the variable users.userAccount is in an available scope it will be there anyway, without all the messing around. .. session.setAttribute(users,...); .. html:hidden property=users.userAccount / if you've a getUserAccount() method as a property of user it will work like this. On Wednesday,

Re: Struts and db access

2003-10-29 Thread Mark Lowe
I didn't know the postgres was faster than oracle.. I agree that its the canine's genitalia .. But I still thought oracle was the daddy when it came to speed. Is that just read access or everything? On Wednesday, October 29, 2003, at 02:52 PM, Vic Cekvenich wrote: This might confuse you more

Re: was Re: Struts and db access: OT: pgSQL

2003-10-29 Thread Mark Lowe
/ db_compare.h tml Mark Lowe wrote: I didn't know the postgres was faster than oracle.. I agree that its the canine's genitalia .. But I still thought oracle was the daddy when it came to speed. Is that just read access or everything? On Wednesday, October 29, 2003, at 02:52 PM, Vic Cekvenich wrote

Re: [OT] HTML tag stripper

2003-10-29 Thread Mark Lowe
html parser is what you want.. http://htmlparser.sourceforge.net/ On Wednesday, October 29, 2003, at 10:09 PM, Greg Dunn wrote: Does anyone know of any free Java I can incorporate in my app that will take a String of HTML and strip the tags out? Greg

Re: Index properties (once again)

2003-10-28 Thread Mark Lowe
That's okay Rajat as I said I know what its like to up against the wire.. I've found ArrayList works better in dynaActionForms especially if you're dynamically generating forms. I think this because its a big fat pain in the arse to create new dynabeans (have a play with bean utils for a day

Re: Struts cannot support relative uri ?

2003-10-28 Thread Mark Lowe
Try this like George said head html:base / /head Cheers Mark On Tuesday, October 28, 2003, at 03:55 PM, javen fang wrote: but if in left.jsp include struts tags, or it mapping from struts action, then relative uri will fail, and absolute uri is required: img

Re: Index properties (once again)

2003-10-27 Thread Mark Lowe
Forget indexed properties, all that stuff.. Does each state have many bids, modes and/or calls? If you're not clear about this in the first place then you'll be in trouble. Until you stop spamming the list and think about what you're doing then you wont get anywhere. On Monday, October 27,

Re: Deprecation - DataSource

2003-10-27 Thread Mark Lowe
You can use the jndi datasource that you define in web.xml rather than struts. http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource- examples-howto.html The struts datasource is deprecated generally. Ideally you have your db connection stuff in your model layer. If this means

Re: Downloading a file from a database

2003-10-27 Thread Mark Lowe
As a web user I tend to have problems with these sorts of pages as I don't use IE. A lot of downloads where this sort of thing goes on often i end up with the file name of a php page rather than zip and stuff like that. My guess is is that IE is doing some of the work somewhere along the line,

Re: Multiple parameters

2003-10-26 Thread Mark Lowe
Need to know what your validator.xml looks like and form-bean stuff in your struts-config. Just sticking html:radio indexed=true .. doesn't say very much.. and just because its displayed doesn't mean its working.. So give more detail have read the documents. Forget about databases for now and

Re: Multiple parameters

2003-10-26 Thread Mark Lowe
I need to know how to iterate the data and also in case of an error, it should re populate the html:text with the data from the array. Somebody help!! :(((99 -Original Message- From: Mark Lowe [mailto:[EMAIL PROTECTED] Sent: Sunday, October 26, 2003 4:47 AM To: Struts Users Mailing

Re: Multiple parameters

2003-10-26 Thread Mark Lowe
. Hope you will forgive me, I didn't mean to hurt or upset anyone. -Original Message- From: Mark Lowe [mailto:[EMAIL PROTECTED] Sent: Sunday, October 26, 2003 8:19 AM To: Struts Users Mailing List Subject: Re: Multiple parameters Look man I know what its like being up against the wire

Re: Multiple parameters

2003-10-26 Thread Mark Lowe
Message- From: Mark Lowe [mailto:[EMAIL PROTECTED] Sent: Sunday, October 26, 2003 4:47 AM To: Struts Users Mailing List Subject: Re: Multiple parameters Need to know what your validator.xml looks like and form-bean stuff in your struts-config. Just sticking html:radio indexed=true .. doesn't say

Re: going straight to a jsp

2003-10-25 Thread Mark Lowe
The performance costs are low, but using an action just to forward to different views does have a very small performance cost. Run a stress test and you'll see. The benefits however of doing everything via actions, far outweigh the slight performance hit. You can start to think about your app

Re: hide section of form

2003-10-24 Thread Mark Lowe
I'd run an action when you click the radio button and regenerate the form, you'll have to manage this when setting the values that you know longer need. The following with serve as some psuedo code to express what I mean. script langage=javascript type=text/javascript function toggle()

Re: Indexed Properties examples?

2003-10-21 Thread Mark Lowe
If you're using struts 1.1 you can define a form property as an arrayList to do the same thing.. form-property name=myproperty type=java.util.ArrayList / ... action name=myForm scope=session .. .. ArrayList myList = new ArrayList() theForm.set(myproperty,myList); .. logic:iterate id=foo

Re: DynaForms and java.util.ArrayList

2003-10-21 Thread Mark Lowe
I'm not sure if the forEach way works with indexed form properties. I tried and the html:text tags seems to be a tad oblivious to the fact they were nested in a loop. form-property name=cities type=java.util.ArrayList / .. //also you need to scope to session action path=/process-form

[ot] Re: question on javascript...

2003-10-20 Thread Mark Lowe
Those variable don't really need to be global. function getValue(form, optionName,hiddenValue) { s = form.elements[optionName]; for(i = 0;i s.options.length;i++) { if(s.options[i].value == hiddenValue) { s.options[i].selected = true;

[ot] Re: for the Apple-biters

2003-10-20 Thread Mark Lowe
I don't know how to tolerate that eclipse nonsense. Jar bundler that comes with apple dev tools lets you make double clickable mac style (apple menu bar as well) apps out of java utils like antidote, jcvs and struts console. With a copy of bbedit or even project builder as a text editor. I

Re: [ot] Re: question on javascript...

2003-10-20 Thread Mark Lowe
, at 02:55 PM, Jacob Wilson wrote: Thanks for the help Mark... when I do this, it says elements.optionName is not null or an object... Any clue??? Thanks! Mark Lowe [EMAIL PROTECTED] wrote:Those variable don't really need to be global. function getValue(form, optionName,hiddenValue) { s

Re: [ot] Re: question on javascript...

2003-10-20 Thread Mark Lowe
: Thanks for the help Mark... when I do this, it says elements.optionName is not null or an object... Any clue??? Thanks! Mark Lowe [EMAIL PROTECTED] wrote:Those variable don't really need to be global. function getValue(form, optionName,hiddenValue) { s = form.elements[optionName]; for(i = 0;i

Re: [ot] Re: question on javascript...

2003-10-20 Thread Mark Lowe
s.options.length;i++) { if(s.options[i].value == hiddenValue) { s.options[i].selected = true; break; } } } optionName is the element name and the error elements.optionName is not null or an object when I try to use s.options.length... Mark Lowe [EMAIL PROTECTED] wrote: You can specify an index

Re: RE-POST: Access ActionForm data from JSP page

2003-10-19 Thread Mark Lowe
You may have taken the trouble to reflect on why there were no responses to your original post.. DynaActionForm theForm = (DynaActionForm) form; Map formMap = theForm.getMap(); ..or using beanutils... Map formMap = BeanUtils.describe( theForm ); session.setAttribute(details,formMap); ... //in

Re: Logic Iterate

2003-10-17 Thread Mark Lowe
The id is the name of whatever you want to call each object thats being spat out during the iteration. Have a play with this in a jsp page to get used to the tags. And then you can move the scriptlet out when your a bit more familiar with stuff. % java.util.Map mapOne = new

<    1   2   3   4   5   6   7   >