Re: Dynamic HTML

2003-11-13 Thread Affan Qureshi
There are quite a few ways to do this and you can find help on this 
list. I prefer the Nested Tags to do this.
Affan
Gonzalez wrote:
How can generate "input tags"  dynamicly ??  My application have fields that are dynamics  and sometimes I have 1 fields and sometimes I have N fields. 
Can I "control" this in struts ??

Thanks 

Sergio.


Aquest missatge electrònic pot  contenir informació confidencial o privilegiada.
Si vostè no és el destinatari del  missatge, o l'ha rebut per error, si us plau
notifiqui-ho al remitent i destrueixi el missatge amb tot el seu contingut.
Està completament  prohibida  qualsevol  còpia, ús o distribució no autoritzada
del contingut d'aquest missatge electrònic.

Este mensaje electrónico puede contener información confidencial o privilegiada.
Si usted  no es  el destinatario de este mensaje o lo ha recibido por error, por
favor notifíquelo al remitente y destruya el mensaje con todo su contenido.
Queda  expresamente  prohibida  cualquier  copia, utilización o  distribución no
autorizada del contenido de este mensaje electrónico.

This e-mail may contain confidential and/or privileged information.
If you  are  not the  intended recipient (or have received this e-mail in error)
please notify the sender immediately and destroy this e-mail.
Any  unauthorized  copying,  disclosure  or distribution of the material in this
e-mail is strictly forbidden.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: sending object with query.

2003-11-03 Thread Affan Qureshi
You will have to create a string from the collection of objects you have 
and send it as a hidden variable or query parameter(if length allows)

Affan

imran ali wrote:
Hi All,

I am sending a parameter with query request in this way:


function foo()
{
  url = "/LoanGeniusWeb/pricingQuoteDetail.do?";
  url += &object + 'abcd';
  document.quoteListForm.action = url;
  document.quoteListForm.submit();
}

Now instead of 'abcd' If I want to pass a collection of object.
How should I do it. I tried it by replacing 'abcd' with a collection.
But it seems this is the way of passing 'parameters' not 'attributes'.
So even if I pass a collection in this way I am getting string representation of 
collection, not the collection object.
How should I go about it.
Help please. thanx a lot
Imran.



Imran


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: large scale deployments

2003-07-10 Thread Affan Qureshi
Hi,
I think the isssue of scalability and a supporting large customer base is
out of scope of what Struts does. You might want to look into techniques
like clustering, load-balancing and distributed app architectures. Struts
has no feature that helps in these situations. However while Struts does not
solve any scalability problems it does not create any itself. The purpose of
Struts is to help you with some common web development problems that you
would have in any environment. In other words the ability or inability if an
application to support large customer base does not depend on Struts.

Regards,
.Affan

<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi all,
>
> We're in the depths of 'framework decision time' for a large scale web
> application.  Does anyone on this list use struts for really large
customer
> bases?  (Millions?, 10s of millions?)  What are the sort of problems large
> scale systems have run into (specifically struts related)?
>
> Thanks,
>
> -gjb
>
> e-mail [EMAIL PROTECTED]
> www.convergys.com
>
> --
> "NOTICE:  The information contained in this electronic mail transmission
is
> intended by Convergys Corporation for the use of the named individual or
> entity to which it is directed and may contain information that is
> privileged or otherwise confidential.  If you have received this
electronic
> mail transmission in error, please delete it from your system without
> copying or forwarding it, and notify the sender of the error by reply
email
> or by telephone (collect), so that the sender's address records can be
> corrected."




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Include response in the JSP page

2003-07-09 Thread Affan Qureshi
I can include the image response using simple  which is the action that returns the image
response. But this causes a new request to be made on the server after the
html page is downloaded. This way I cannot access request variables etc.

Affan

"Affan Qureshi" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi,
> I have a JSP page which needs to dynamically include response from actions
> (or servlets) which are actually images streamed over the response. I
tried
> to use  but I guess it has some
problem
> for extensions other than jsp and html. (I saw a similar bug for Tomcat
> bugzilla). I have tried to define a mime-type for 'do' in web.xml but does
> not help. I guess I cannot use  for the purpose.
>
> Any suggestions?
>
> Also another question, can I get request Attributes set in this page in
the
> action/servlet that I call thru ?
>
>
> Thanks,
> Affan




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Include response in the JSP page

2003-07-09 Thread Affan Qureshi
Hi,
I have a JSP page which needs to dynamically include response from actions
(or servlets) which are actually images streamed over the response. I tried
to use  but I guess it has some problem
for extensions other than jsp and html. (I saw a similar bug for Tomcat
bugzilla). I have tried to define a mime-type for 'do' in web.xml but does
not help. I guess I cannot use  for the purpose.

Any suggestions?

Also another question, can I get request Attributes set in this page in the
action/servlet that I call thru ?


Thanks,
Affan




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: tiles and tabs; post instead of link

2003-07-09 Thread Affan Qureshi
You need to change the code that generates links in tabLayout.jsp and call
javascript methods to submit the form on those links using onclick.

Affan

"Natalie D Rassmann" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Can anyone help?  I am trying to change the tab links in the tabLayout
> to submits  I am having so much trouble.  I can't get it to work.
> Has anyone tried to do this?  Can anyone give me an example or point me
> in the right direction??
>
> Any help would be much appreicated?
>
> Natalie
>
>






> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



changed in Struts 1.1 Final?

2003-07-07 Thread Affan Qureshi
I have problem executing the simplest of statements since I have upgraded
from RC1 to Final 1.1.



I get the error: Define tag can contain only one of name attribute, value
attribute, or body content'

This was working fine previously. I didn't use  or bean:define coz I
wont be able to use the nested referencing then. Actually i want to set a
default value for the "attValue" variable and modify it via  later.

Thanks in advance.

Affan




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[OT] Updateable Cache Framework

2003-07-04 Thread Affan Qureshi
We had an Application Cache implemented in our app which actually stored
frequently used objects in at application scope. Whenever that object was
modified in the DB we had to update its state in the cache too which was a
pain. I was looking for available cache frameworks that did something
similar (probably closely associated with the persistence layer) but most of
them provided "read-only" cache. I am referring to some kind of EJB
mechanism like it keeps the objects reference locked until the changes in
the persistence layer are committed and updates object states appropriately.

Has anybody had this requirement in his project? Any available caching
frameworks exist for such functionality?

Thanks for any pointers.

Regards,
Affan




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: site root going straight to a .do

2003-06-30 Thread Affan Qureshi
Have you tried configuring the  in web.xml. I guess you
can do all this there.

Affan

"Simon Kelly" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi all,
>
> Sorry about the subject line, it's the best I can do in one sentance.
>
> What I'm trying to do, is set up the wecome file, so that instead of
having
> to go via a html or jsp page, I can go straight to an action class! Any
> ideas?
>
> If someone types in htt://our.site.com/ourapp then it should go straight
to
> the welcome.do Action and not a html file.
>
> I'm using struts1.1 and stxx.
>
> Cheers
>
> Simon
>
>
> "I have often wondered how it is that every man loves himself more than
all
> the rest of men, but yet sets less value on his own opinion of himself
than
> on the opinion of others." -- Georg Christoph Lichtenberg
>
> Institut fuer
> Prozessdatenverarbeitung
> und Elektronik,
> Forschungszentrum Karlsruhe GmbH,
> Postfach 3640,
> D-76021 Karlsruhe,
> Germany.
>
> Tel: (+49)/7247 82-4042
> E-mail : [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: refresh

2003-06-25 Thread Affan Qureshi
Just use redirect when sending the page back instead of forward. Would this
help in your case?
Affan

- Original Message -
From: "Frances Aleah Z. de Guzman" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>; "Jing
Zhou" <[EMAIL PROTECTED]>
Sent: Thursday, June 26, 2003 6:11 AM
Subject: Re: refresh


yah i just checked out the struts docs and example and i saw the token
thing...im working on it right now

On Wednesday 25 June 2003 03:55 am, Jing Zhou wrote:
> Have you thought of using the transaction token? Or detecting
> the invalid employee id in the action class before the transaction?
>
> Jing
> Netspread Carrier
> http://www.netspread.com
>
> - Original Message -
> From: "Frances Aleah Z. de Guzman" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, June 25, 2003 5:18 PM
> Subject: refresh
>
>
> i have a time-in time-out application and i have a timelogForm that
> captures the employee id and password. the saving of in and out works
fine.
> after saving the values to the database (im using ejb by the way) im
> setting the employeeid and password in the form to null so when the action
> returns to the
> same page the employeeid and password textboxes are empty. but the bug is
> whenever i refresh the browser, using the refresh button of the browser,
> the form is like resubmitting its contents eventhough i have set the
> employee id and password to null. so i have now double entries in the
> database for the employee's time in. how can i resolve this bug?

--
Frances Aleah Z. De Guzman
SA/Programmer
Ingenium Technology, Inc.
http://www.ingenium.com.ph

Disclaimer :
This message is intended only for the named recipient. If you are not the
intended recipient you are notified that disclosing, copying, distributing
or taking any action in reliance on the contents of this information is
strictly prohibited.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Checking for a null property

2003-06-25 Thread Affan Qureshi
Save yourself all the trouble and use 
Affan
- Original Message -
From: "Varun Garg" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Wednesday, June 25, 2003 3:24 AM
Subject: RE: Checking for a null property


> I think you can use empty also, but present also works for me.
>
> The documentation also suggests that
> property - Checks for the existence of a non-null property value,
> returned by a property getter method on the JSP bean (in any scope) that
> is specified by the name attribute. Property references can be simple,
> nested, and/or indexed.
>
> I have used the empty more for collections to make sure there is
> something in there.
>
> Varun
>
>
> -Original Message-
> From: Mick Knutson [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, June 24, 2003 5:04 PM
> To: [EMAIL PROTECTED]
> Subject: RE: Checking for a null property
>
>
> But doesn't the present tag just check whether the property is present,
> and
> not if it is null or not? I was having some strange actions with this.
>
>
>
> ---
> Thanks...
> Mick Knutson
> ---
>
>
>
>
>
> >From: "Varun Garg" <[EMAIL PROTECTED]>
> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> >Subject: RE: Checking for a null property
> >Date: Tue, 24 Jun 2003 17:00:28 -0500
> >
> >
> > 
> >
> >
> >
> >-Original Message-
> >From: Jindal, Ashwini [mailto:[EMAIL PROTECTED]
> >Sent: Tuesday, June 24, 2003 4:57 PM
> >To: [EMAIL PROTECTED]
> >Subject: Checking for a null property
> >Importance: High
> >
> >
> >Anyone,
> >
> >Can anyone please help me with the following situation?
> >
> >I am trying to display the Agent's full Name. Now it works fine as long
>
> >as the Agent has a valid full Name. As soon as Agent is null, I get a
> >Null Pointer. I want to check
> >
> > 
> >
> > if the agent is null
> > then do something
> >
> >Can please tell me how I can make this check?
> >
> >Thank you,
> >...AJ
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
> _
> Add photos to your e-mail with MSN 8. Get 2 months FREE*.
> http://join.msn.com/?page=features/featuredemail
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Prevent file overwriting for uploaded files in Struts

2003-06-25 Thread Affan Qureshi
Once you have the stream you can always use java.io.* APIs to do whatever
you like. See the java.io.File class for possibilities.
Affan

- Original Message -
From: "Alen Ribic" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, June 25, 2003 1:15 PM
Subject: Prevent file overwriting for uploaded files in Struts


> Hi all
>
> What is the best way of prevent a file overwriting when uploading a file
in
> Struts?
> For example, if file "my_image.jpg" exists on the server I would like it
to
> save it as something like "my_image[1].jpg".
>
> Any ideas?
>
> Thanks
> --Alen
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: dispatching actionForm and httprequest parameters

2003-06-25 Thread Affan Qureshi
Do you "forward" to the second action or "redirect"? They should be
available as long as it is the same request.

Affan

- Original Message -
From: "Ionel Gardais" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, June 25, 2003 2:21 PM
Subject: dispatching actionForm and httprequest parameters


> Hi,
>
> I am using a DispatchAction to switch between tasks.
> For one of my methods, I forward to another Action (a simple action, not
> a dispatch action)
>
> Unfortunatly, the form and the request parameters that I can retrieve in
> the dispatch action's method are not available in the second action
> parameters list.
>
> Is there a way to forward form and request parameters too ?
>
> thanks,
> ionel
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Newbie : How can i implement the "navigator menu" with Struts?

2003-06-24 Thread Affan Qureshi
Look at Struts-Layout. It has tags for breadcrumbs which can help you in
this regard.

- Original Message -
From: "Paolo Razzi" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, June 24, 2003 11:51 AM
Subject: Newbie : How can i implement the "navigator menu" with Struts?


> I have this problem, I should implement in my application a navigator menu
> as kind, for help the user in the navigation :
>
>  "you are in >> homepage >> userpage>> otherpage >>..."
>
> anyone, could you help me?
>
> Best Regards
> Paolo Razzi
>
>
>
> --
> Email.it, the professional e-mail, gratis per te: http://www.email.it/f
>
> Sponsor:
> Invia le tue immagini digitali su www.digitalpix.it
> e ricevi vere stampa a casa tua in 24 ore.
> Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=1534&d=24-6
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [Nested] Order of Population of nested properties

2003-06-03 Thread Affan Qureshi
Thanks for your reply. Well doing stuff in action is the cleaner approach
unless u can use DOM (which is at least quicker). But I solved this by
moving the property one level up in the nested hierarchy. Although it
doesn't make sense there but it always gets populated before the nested
beans. Also since it is a temporary variable you don't need to worry about
its placement too much.

I'll look into the other approach when I get some time.

Thanks,
Affan

- Original Message -
From: "Andrew Hill" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, June 02, 2003 4:50 PM
Subject: RE: [Nested] Order of Population of nested properties


> 
> If you must do your thing in the setter then you can use
request.getPara...
> hmm oops! no you cant. You dont have access to the request object there!
> 
>
> Suppose you could save the reference to the request in a member variable
> during the reset() method and refer to it in your setter, but thats
> distinctly 'inelegant'. Unless your in a big hurry Id say go with doing
the
> stuff in the action itself.
>
> -Original Message-
> From: Andrew Hill [mailto:[EMAIL PROTECTED]
> Sent: Monday, 2 June 2003 19:42
> To: Struts Users Mailing List
> Subject: RE: [Nested] Order of Population of nested properties
>
>
> Yeh. There is no gaurantee on the order of population. :-(
>
> If you must do your thing in the setter then you can use
request.getPara...
> hmm oops! no you cant. You dont have access to the request object there!
>
> If its not a multipart form you could do it in the reset() method and use
> request.getParameter() to obtain the values you need but I wouldnt
normally
> recommend that (unless of course you had _already_ created the new rows
and
> fields on the client side using javascript DOM programming - in which case
> you need to create those beans before population occurs!)
>
> I had to do something similar in my app (simple add rows on submit (no
> client side funny business)) so I put the relevant code in the Action that
I
> was submitting to - which simply checks if the "addMoreStuff" property was
> set and adds the necessary rows before forwarding back to the view - (or
> takes other action if it wasnt).
>
> -Original Message-
> From: Affan Qureshi [mailto:[EMAIL PROTECTED]
> Sent: Monday, 2 June 2003 19:35
> To: struts-user
> Subject: [Nested] Order of Population of nested properties
>
>
> Hi,
> I have an implementation just like the monkey-tree example where I have a
> button to add more fields in a form dynamically. The button is a Submit
> button which is mapped to a nested bean's property. By default the the
> button adds one set of nested (recursively) fields. I want it to add
> user-defined no of rows. For that I have a text field mapped to another
> property of the same nested bean. I get that value and add the specified
no
> of rows. It works fine but sometimes I get the following problem.
>
> Sometimes properties are populated before the other which causes great
> confusion. E.g if the 'noOfFieldsToAdd' property is populated after the
> 'addMoreFields' (the button) property I wont get the correct output. Also
I
> see that some properties are populated twice instead of once which is also
a
> bit confusing.
>
> Is there any order in which the fields are populated? Can i control this?
Or
> maybe I am using it in the wrong way?
>
> Thanks a lot.
>
> Affan
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[Nested] Order of Population of nested properties

2003-06-02 Thread Affan Qureshi
Hi,
I have an implementation just like the monkey-tree example where I have a
button to add more fields in a form dynamically. The button is a Submit
button which is mapped to a nested bean's property. By default the the
button adds one set of nested (recursively) fields. I want it to add
user-defined no of rows. For that I have a text field mapped to another
property of the same nested bean. I get that value and add the specified no
of rows. It works fine but sometimes I get the following problem.

Sometimes properties are populated before the other which causes great
confusion. E.g if the 'noOfFieldsToAdd' property is populated after the
'addMoreFields' (the button) property I wont get the correct output. Also I
see that some properties are populated twice instead of once which is also a
bit confusing.

Is there any order in which the fields are populated? Can i control this? Or
maybe I am using it in the wrong way?

Thanks a lot.

Affan


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: cancel button problem

2003-05-28 Thread Affan Qureshi
I have seen this one before as well. But I dont think it is possible in
plain HTML. So the best you could do in HTML is to place the default button
as the first Submit button on the form.
Or if you want ot use JavaScript then u might want to make use of new
key-capture events of JS. But i think you will then have to make all your
submissions thru links.

Affan

- Original Message -
From: "Vivian, Nigel (N.)" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 28, 2003 2:08 PM
Subject: cancel button problem


> Hi all
>
> I've got a webapp working with struts 1.0.2 and tiles, but there is now a
requirement to make the enter button on the keyboard work.
>
> My problem is that my pages have the following code on them which creates
two submit button objects.  The user types an entry into some text fields on
the form and then presses enter.  The behaviour at the moment is that either
nothing happens or the first button defined on the form in this case the
cancel button is activated.
>
> My question is how can I make the Enter button be the default on an enter
keyboard press?  So far I have tried adding tabindex="0" to the code for the
cancel button with no success.
>
> 
>    
>    
>    
> 
>
> which generates the following HTML in the browser
>
> 
>    
>    
>  
> 
>
> Thanks
>
> Nigel Vivian
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Browser influence Session behavior

2003-04-04 Thread Affan Qureshi
What about browser seetings specially accepting cookies etc? I had this
problem in Netscape 7.01 on Win2K on a customer's machine. In that case the
it asked the user to login at every step of the application. Probably
becuase the session was renewed at every stage. When I asked him to set
"Accept Cookies" it worked fine.

HTH.
Affan

- Original Message -
From: "Johan Wasserman" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, April 04, 2003 4:36 PM
Subject: Browser influence Session behavior


Hi,

I have an initial page where the company name is entered and that
forwards to a main page (with 3 frames) that loads the header, sidebar
and logon page.  I save a State bean in the session after the company is
validated (against a db) and then use the company name from the State
bean on the logon page.  With Konqueror and Netscape I have no problems
in getting the bean back from the session, but with Mozilla a new
session is created and I get a nullpointer exception (the bean's not
found in the new session).

I have traced the session id and find that it remains the same for
Konqueror and Netscape but changes for Mozilla.

Anyone got any ideas?

Thanks in advance,
Johan.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: bean message as button label

2003-04-01 Thread Affan Qureshi
Use


You can't use a tag as an attribute's value.

HTH
Affan


> I want to use a value in my ApplicationResources.properties as a label on
a button in my jsp, so that I can switch the text on the button, depending
on the Locale used.  I used the following code :
> 
>
> This gives the text: bean:message key on my button, and not the wanted
text in my .properties file. Can anyone help me ?
>
> Thanks
>
> Koen Boutsen
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[OT] Re: A question

2003-04-01 Thread Affan Qureshi
Isn't the scriplet free version more confusing/cryptic than the scriplet
one? I know we should avoid scriplets 110% in JSPs but what about cases
where it can save some confusion of five tags to do a simple thing?

The reason to avoid scriplets is to allow seperation of page designers and
developers dependancies but the poor page designer won't make much sense out
of either of them in this case i think and its better to give him one line
of confusion than 5.

Intersted to know your comments.

Regards,
Affan

- Original Message -
From: "James Mitchell" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, April 02, 2003 12:21 AM
Subject: Re: A  question


> or using the scriptlet-free version
>
> 
>
> 
>  .name
> 
>
> 
>  
> 
>
>   <-- remove this unless you just want to
print
> it out on the page
>
>
>
> --
> James Mitchell
> Software Developer/Struts Evangelist
> http://www.open-tools.org
>
>
>
> - Original Message -
> From: "Karr, David" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Tuesday, April 01, 2003 11:14 AM
> Subject: RE: A  question
>
>
> > This might work:
> >
> > 
> > 
> > 
> >
> > > -Original Message-
> > > From: Binaghi Mauro [mailto:[EMAIL PROTECTED]
> > >
> > > Hi
> > > I have the "user.name" property in my "ApplicationResource.properties"
> > > file.
> > > Can I take its value with the following instrucition in my JSP page?
> > >
> > > 
> > >  > > %>.name"/>
> > > 
> > >
> > > Of course, I call my JSP with this URI
> > "/myPage.jsp?httpParameter=user"
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[FRIDAY]Re: Just let me be the first to say...

2003-03-27 Thread Affan Qureshi
I can't see the [FRIDAY] prefix in the subject headers

- Original Message - 
From: "Andrew Hill" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, March 28, 2003 12:24 PM
Subject: RE: Just let me be the first to say...


> Yep. Weekends are sweet. :-)
> Not so many people in the office so got less distractions.
> ahhh the joys of a career in IT...
> 
> -Original Message-
> From: Simon Kelly [mailto:[EMAIL PROTECTED]
> Sent: Friday, 28 March 2003 15:05
> To: Struts Users Mailing List
> Subject: Re: Just let me be the first to say...
> 
> 
> +1
> 
> The weekend starts here!  Wooo Hooo!
> 
> 
> - Original Message - 
> From: "Scott Barr" <[EMAIL PROTECTED]>
> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> Sent: Friday, March 28, 2003 7:52 AM
> Subject: Just let me be the first to say...
> 
> 
> > 
> > TGIF!!
> > 
> > Scott
> > www.exergonic.com.au
> > 
> > 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [NEWBIE]A very stupid question

2003-03-16 Thread Affan Qureshi
If you are creating a forward in struts config files or actions, you should
ignore the context name completely and write url as "/myAction.do". Struts
takes care of the context path itself.

 If you are creating links simply in HTML then do something like:
request.getContextPath() + "/myAction.do"

Look at the link Tags examples in the example apps that come with struts.

HTH.
Affan
- Original Message -
From: "Tony Tahbaz" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, March 17, 2003 2:16 AM
Subject: RE: [NEWBIE]A very stupid question


> How are you creating your link? Are you using the struts-html taglib or
are
> you just using html?
>
> -Original Message-
> From: Marco Tedone [mailto:[EMAIL PROTECTED]
> Sent: Sunday, March 16, 2003 2:07 PM
> To: Struts-user-list
> Subject: [NEWBIE]A very stupid question
>
>
> I have my application under the context /xml-op/
>
> In my struts-config.xml file, I define an action with the path=/Login
>
> Anyway, when I want to invoke the Login action as a forward, let's say by
> means of a ForwardAction action mapping, in my jsp page, as href I have to
> indicate the following: /xml-op/Login.do
>
> If I want to invoke the same action from within a form, then I have to
omit
> the /xml-op/ prefix.
>
> Anyone of you does know why?
>
> TIA, Marco
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [Tiles] Design - Overriding items

2003-03-14 Thread Affan Qureshi
Thanks for the explanation. I have also implemented a similar solution (by
looking at the examples). The problem i am facing is the modification of
session value in the actions. I mean when the session values are modified in
each Action, it makes my code hard to maintain and error-prone. Because now
the layout logic is spread all over the place in my actions. I know this is
more of a design issue than an implementation one.

Also, sometimes I need to forward to actions but also want to pass
parameters to it in the query string. In this case I cannot use
mapping.findForward("Success"). I have to create a new ActionForward object
and provide the url plus the query string. This is again hard-coding of the
urls. Is there any way I can specify request paramters for a forward in
Tiles or Struts?

Thanks,

Affan

>   In tiles examples I use the following for a user customized menu:
>
> * A definition contain the attributes for the menu, with a list of
>   default items to show.
> * The controller  try to retrieve a customized list of items (from
>   the session, but could be from a persistent storage)
>   o If the list isn't found, get the one defined in the tile
> context from the definition, copy it and store it
> appropriately in the session. So, the list in the definition
> is used to initialize the default values !
> * Replace the list in the tile context with the customized one
> * Return from the controller and show the tile
>
>   In this scenario, the definition is used to defined the default
> values. So, the management still centralized in the xml file. The
> controller is used to prepare appropriately the data to show.
>
> Hope this help,
>
>   Cedric
>
> >
> >Thanks a lot,
> >Affan
> >
> >PS
> >My Tiles Code below:
> >
> >This is my basic/default definition:
> >
> > >controllerClass="com.etilize.cms.web.actions.LayoutProcessorAction">
> >
> >
> >
> >
> >
> >
> > >classtype="org.apache.struts.tiles.beans.SimpleMenuItem"/>
> >
> > >classtype="org.apache.struts.tiles.beans.SimpleMenuItem"/>
> >..
> > >classtype="org.apache.struts.tiles.beans.SimpleMenuItem"/>
> >
> >
> >
> >In actions i have the following code to set the values in the session
bean:
> >LayoutSettings settings =
>
>(LayoutSettings)req.getSession(true).getAttribute(WebAppConstants.TAB_LAYOU
T
> >_SETTINGS);
> >List tabList = settings.getTabList();
> >SimpleMenuItem searchTab = (SimpleMenuItem)tabList.get(3);
> >searchTab.setLink(returnLink);
> >tabList.set(3,searchTab);
> >settings.setTabList(tabList);
> >
>
>req.getSession(true).setAttribute(WebAppConstants.TAB_LAYOUT_SETTINGS,setti
n
> >gs);
> >


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[Tiles] Creating SubTabs (Tabs within Tabs)

2003-03-13 Thread Affan Qureshi
Hi,
I have implemented the TabLayout as described in the examples and works
well. I want to define sub tabs under the main Tabs. So my requirement would
be like having  elements inside  elements(which is not
possible in DTD) so that I can define nested lists. How have you implemented
this in your apps?

Looking at the DTD I saw an element "putListElements". Where des this fit
in? Can this be helpful in this regard?

Also can I specify the class by
classtype="org.apache.struts.tiles.beans.SimpleMenuItem" to something more
sophisticated so that I can add some more info? What will I need to change?

Thanks a lot.

Affan


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[Tiles] Design - Overriding items

2003-03-09 Thread Affan Qureshi
I have divided the modules(logical) in my application in a Tab layout. I
want to show different pages under the same tab at various points in the
application. It means the putList items change all the time. If I want to
extend and override the values inside the putList tags I have to write the
whole putList tag again in the extended definition. Is this right or is
there a better way?

I have created a bean in which I keep values for links to display in each
tab and modify them at runtime in my Action classes. I put that bean in
session and copy its properties to the TilesContext in the controllerClass
actions. The problem is that this design is not very easy to maintain and
enhance. Also I get the values mixed up in the session which makes the user
go to a wrong page sometimes. And the layout code is all over the place
instead of a single, configurable one (like the XML file).

Is this the right design I have? Any suggestions/solutions?

Thanks a lot,
Affan

PS
My Tiles Code below:

This is my basic/default definition:











..




In actions i have the following code to set the values in the session bean:
LayoutSettings settings =
(LayoutSettings)req.getSession(true).getAttribute(WebAppConstants.TAB_LAYOUT
_SETTINGS);
List tabList = settings.getTabList();
SimpleMenuItem searchTab = (SimpleMenuItem)tabList.get(3);
searchTab.setLink(returnLink);
tabList.set(3,searchTab);
settings.setTabList(tabList);

req.getSession(true).setAttribute(WebAppConstants.TAB_LAYOUT_SETTINGS,settin
gs);


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



1.1rc1 Error: Path index.jsp does not start with a "/" character

2003-02-27 Thread Affan Qureshi
I have been using Struts 1.1b2 and tiles in my application and have defined
forwards like:



where forward paths were JSP pages,  whithout the starting "/" for paths and
it worked ok. But this does not work when I installed Strut 1.1rc1 coz it
gave the exception:

java.lang.IllegalArgumentException: Path index.jsp?selected=1 does not start
with a "/" character

Have I been doing it wrong until now? Is this a TilesRequestProcessor issue?
I had done so, so that I can deploy my app under any context/module etc. and
have no dependency on root path.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT] Special Symbols in HTML

2003-02-25 Thread Affan Qureshi
have you seen http://www.w3schools.com? 

- Original Message - 
From: "ajTreece" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, February 26, 2003 4:07 AM
Subject: [OT] Special Symbols in HTML


> My apologies for this [OT] question, but chances are someone on this 
> list will know the answer.
> 
> I know that you can use the symbol ™ to display the Trademark 
> symbol via HTML. Is there a like symbol for Service Mark? If not does 
> anyone have a clue where to look? I've been google'ng all over the place 
> and can't really find anything.
> 
> 
> Thanks, ajTreece
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



monkey tree - must be session-based?

2003-02-25 Thread Affan Qureshi
I have been using Nested tags to create pretty complicated nested structures
in a flash. But I have a problem when the user opens multiple windows and
the session values can get messed up and the trees throw
ArrrayIndexOutOfBound Exceptions. Has anyone come across the same? How to
resolve it?

Can we make the  to pick up a ActionForm bean from the session
dynamically? I mean instead of using the name defined in struts-config.xml,
can we specify a name of formbean to use at runtime? This way we can create
'N' no. of independent trees and store in session under different names and
and the user can work with them simultaneously.

Thanks a lot.

Affan


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[OT] Editable Trees - Design

2003-02-20 Thread Affan Qureshi
Hi,
I have a requirement of "editable" Trees. I have set up tree views to show
categories in my application. I want to allow editing of those trees but
unfortunately HTML has some limitations. Can someone point me to a useful
resource in this regard or suggest a nice design for this. I am using
Struts-Layout treeview tag (happily :). You can see the suggested solutions
below.

Thanks a lot.
Regards,
Affan

 - Original Message -
> From: "Aamir Baig" <[EMAIL PROTECTED]>
> To: "Toqeer Sardar" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Friday, February 21, 2003 7:58 AM
> Subject: Re: Editable Trees
>
>
> > There is another pretty neat way that I just thought of...
> > Since the tree that we use currently is open-source we can modify it to
> > support editable trees ..
> >
> > This could be done quite a number of ways...
> >
> > We could create Add, Del small icons that show up with each node in the
> > tree...(to the left or right...watever makes more ergonomical sense),
> >
> > On clicking Add we could prompt up a javascript box, take input and
> > submitit would execute an action defined in struts for the tree
(just
> > like the sorting in the collection tags...).
> >
> > For delete it could prompt up javascript confirmation and do the same...
> >
> > Once the action is executed, we would have to support action forwarding
> > setup for the tree so that it can then forward to an application action
> > .(where we can actually put it in the db...)..As a matter of fact we
> > would want to forward to the application action first..in case it fails
we
> > don't want to update the tree..
> >
> > This way we can maintain the same elegant structure that we have right
> now,
> > have any number of levelsI think it'll work wellwe could set the
> > tree up to be instantiated in editable or non-editable mode(the
> > default)...and contribute it back to the open-source community that way
> > their existing code would not be hurt ..and they have capability to
setup
> > editable ones
> >
> > Also, I am not sure if javascript supports right click pop-up
> > menus..otherwise we can add add/edit/del in there
> >
> > As for the ordering, we could add up and down arrow icons too...although
> > they would only allow incremental movement upwards and downwards
> >
> > To move by leaps when someone edits a category we can also give the
number
> > order number field that they can type the order number in, and it moves
> the
> > order accordingly
> >
> > That's one suggestion...what do you guys think

> > Regards,
> > Aamir
> >
> > - Original Message -
> > From: "Toqeer Sardar" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Cc: <[EMAIL PROTECTED]>
> > Sent: Friday, February 21, 2003 12:29 AM
> > Subject: category management
> >
> >
> > >
> > >
> > > Hi
> > > The best way to handle hierarchical structures is an editable tree
where
> > we
> > > can edit, add, delete and move the nodes up and down. But the problem
is
> > HTML
> > > and java script limitations. I did some search but couldn't find such
> > > component in HTML/JavaScript... If any one knows or have any idea
please
> > help
> > > me.
> > > I have following one solution, which is not the best:
> > > Create three lists, for three levels of categories each with
> > add/edit/delete
> > > and UP/DOWN buttons. Selecting a row in list-1 will populate child
> records
> > in
> > > list-2 and so on.
> > >
> > > One major disadvantage with this approach is that we can't handle
> > dynamically
> > > the category levels more than 3 (number of lists we have in UI), it
also
> > > increases the size of the screen in horizontal direction.
> > >
> > > Any better idea...?
> > >
> > > Regards
> > > Toqeer.
> > >
> > >
> >
> >
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: html:form

2003-02-20 Thread Affan Qureshi
Your form bean name is the html form name.
Affan

- Original Message - 
From: "Ray Madigan" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, February 20, 2003 9:47 AM
Subject: html:form


> Greetings:
> 
> I am still trying to figure things out to port my application.
> 
> In the past I have used the form name as a locator for JavaScript.
> 
>  that is in another frame then the one I am in now?
> 
> Thanks
> Ray Madigan
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: fill value from database

2003-02-20 Thread Affan Qureshi
In the preceding Action just put the values for the  drop-down in a
collection and set it in th erequest-scope (or the form-bean). On the JSP
use the  or  tag to populate the list from
that collection.

See the taglib API for details.

Affan

- Original Message -
From: "alexj" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, February 20, 2003 6:43 PM
Subject:  fill value from database


> Hi all,
>
> I got a trouble what's the best to do for my project :
>
> I need to add student from an addstudent view page who
> have a StudentForm bean associated.
>
> In my view page I need to fill some datas who cames
> from a database (some field like formationSelected and
> durationSelected).
>
> I want to use these datas retrieved from a database to fill a
> . But I don't know what's the best to do.
>
> Thanks for your advice.
>
> <--
> Alexandre Jaquet
> -->
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Scroll

2003-02-19 Thread Affan Qureshi
Look at the Pager tag at Struts Layout:
http://struts.applications-servers.com or the same in Ed Hill's Dispaly tag
library (http://edhill.its.uiowa.edu/display-0.8/). Both places have running
examples I think.
Affan

- Original Message -
From: "Richard Raquepo" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, February 19, 2003 2:49 PM
Subject: Scroll


> hello anybody?
>
> Can anyone show me how to implement a Scroll in my page.
>
> Assuming i have 20 or more result returned from my bean i want to display
> the first 5 only and let the user scroll either forward or backward.
>
> Can someone show me or give me a working sample.
>
> thanks a lot everyone!
>
>
> -richard
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Use of Bean Default Value in Struts

2003-02-19 Thread Affan Qureshi
Use the value attribute of the  and assign it the required
value. But value attribute does not take the property of the form bean. It
takes the value explicitly specified. e.g 
If you specify  then it will search for the
string "val" in the options list.
Affan

- Original Message -
From: "shashi" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, February 19, 2003 12:08 PM
Subject: Use of Bean Default Value in Struts


Hi

In my form in the  i want a default bean value will be
selected.
Ex:
public class A extends ActionForm{
private String val="A";
public void setVal(String val){
this.val=val;
}
public String getVal(){
return val;
}
In Jsp
I want this "A" value comes as a default value in select.

help me

Regards

Shashi







-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: One ActionForm for multiple JSPs

2003-02-19 Thread Affan Qureshi
BlankI don't know of an example but its pretty easy to do. Just define one
ActionForm bean and create all the properties in the wizard in it. Make it
sessions scoped. And assign/retrieve the properties as you would do with a
normal form-bean. In struts-config.xml refer to the same actionForm bean in
all the actions that are part of the wizard.

Regards,
Affan

- Original Message -
From: Chetan Sahasrabudhe
To: Struts Users Mailing List
Sent: Wednesday, February 19, 2003 12:09 PM
Subject: One ActionForm for multiple JSPs


Hi,
when going through struts documentation, I came across a statement
saying

extract from struts documentation chapter 2 Building Model Components.
Section 2.3 ActionForm Bean.
<>

My current requirments are exactly as mentioned in above para. I have to
develop a wizard kind of GUI for setting up some data in our application.

Can anybody point me to the example for the same, or point me to the
document where I can use single ActionForm bean for mulitple JSPs.


Regards
Chetan
___
|
| The trouble with being punctual
|  is that nobody's there to appreciate it.
|
|
|___


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re:

2003-02-18 Thread Affan Qureshi
What should I specify in the "property" attribute in case of ? I have a nested bean whose "name" property I am using to store and
retrieve errors.

In ActionForm bean i have:
errors.add(parameter.getName(), error);
where paramter is the ref to my nested bean and getName is the property
getter method.

In JSP i have:
 inside the  for the nested
bean.

But this doesn't seem to work. Has anyone tried this before?
Any help is appreciated in advance. Thanks

Affan

- Original Message -
From: "David Graham" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, February 18, 2003 9:28 AM
Subject: Re: 


> I don't use nested but I think it will work the same as html:errors.
>
> David
>
>
>
> >From: "Affan Qureshi" <[EMAIL PROTECTED]>
> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >Subject: Re: 
> >Date: Tue, 18 Feb 2003 09:16:00 +0500
> >
> >Does this work for  as well? Or do I have to do something
> >different?
> >
> >Affan
> >
> >- Original Message -
> >From: "David Graham" <[EMAIL PROTECTED]>
> >To: <[EMAIL PROTECTED]>
> >Sent: Tuesday, February 18, 2003 8:31 AM
> >Subject: Re: 
> >
> >
> > > http://jakarta.apache.org/struts/userGuide/struts-html.html#errors
> > >
> > > See the property attribute.
> > >
> > > David
> > >
> > >
> > >
> > > >From: "varma dvk" <[EMAIL PROTECTED]>
> > > >Reply-To: "Struts Users Mailing List"
<[EMAIL PROTECTED]>
> > > >To: [EMAIL PROTECTED]
> > > >Subject: 
> > > >Date: Mon, 17 Feb 2003 18:09:03 +0530
> > > >
> > > >Hi frenz,
> > > >
> > > >Here goes my problem...
> > > >
> > > >How can i display action errors at different different places in jsp.
> >For
> > > >example
> > > >  i have username and password fields in a jsp.If the username is
null
> >then
> > > >i want display the error right behind the username text box...n the
> >same
> > > >for password..
> > > >
> > > >how can i do this...
> > > >i appreciate any kind of help...
> > > >
> > > >Thanks
> > > >Varma
> > > >
> > > >
> > > >
> > > >_
> > > >
> > > >
> > > >
> > > >-
> > > >To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > >For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> > > _
> > > The new MSN 8: smart spam protection and 2 months FREE*
> > > http://join.msn.com/?page=features/junkmail
> > >
> > >
> > > -
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> >
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> _
> MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.
> http://join.msn.com/?page=features/virus
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re:

2003-02-17 Thread Affan Qureshi
Does this work for  as well? Or do I have to do something
different?

Affan

- Original Message -
From: "David Graham" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, February 18, 2003 8:31 AM
Subject: Re: 


> http://jakarta.apache.org/struts/userGuide/struts-html.html#errors
>
> See the property attribute.
>
> David
>
>
>
> >From: "varma dvk" <[EMAIL PROTECTED]>
> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >To: [EMAIL PROTECTED]
> >Subject: 
> >Date: Mon, 17 Feb 2003 18:09:03 +0530
> >
> >Hi frenz,
> >
> >Here goes my problem...
> >
> >How can i display action errors at different different places in jsp. For
> >example
> >  i have username and password fields in a jsp.If the username is null
then
> >i want display the error right behind the username text box...n the same
> >for password..
> >
> >how can i do this...
> >i appreciate any kind of help...
> >
> >Thanks
> >Varma
> >
> >
> >
> >_
> >
> >
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> _
> The new MSN 8: smart spam protection and 2 months FREE*
> http://join.msn.com/?page=features/junkmail
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Jsp code is sent to the client...?

2003-02-17 Thread Affan Qureshi
Can you show us the JSP code? This happened to me when I forgot to import
the tag libraries. Try deleting the work directory contents and restart the
server. Also make sure the extensions etc. are correct.

Affan

- Original Message -
From: "Jörgen Lundberg" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, February 17, 2003 2:58 PM
Subject: Jsp code is sent to the client...?


Hi,
I'm running a small struts(1.1b3) app in our Tomcat 4.0.6. After a few
days the jsp:s stop working. They don't seem to be processed, instead
the jsp code gets sent back to the browser.

Our bug reporting app (Scarab) is running in the same Tomcat and it
works fine.

Any ideas?

 / Jörgen Lundberg



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: How can I redirect a user to the previous page ?

2003-02-01 Thread Affan Qureshi
Save the url in session against some key and use that to forward to when
done on the second page. This way you can send the user to any page he/she
came from.

Affan

- Original Message -
From: "Claude Glauser" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Saturday, February 01, 2003 5:05 PM
Subject: How can I redirect a user to the previous page ?


> Hi,
>
> I have a struts action to change the language.
> A link to this action is in the mainmenu of
> the webapplication. This link is always visible
> in the browser (while in my webapp).
> How can I redirect to the page the user
> was and display it in the selected language ?
>
> Is there a way to get the url where to user
> was previously ?
>
> Thanks for any hints.
>
>
>
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Setting Character Encoding (getting ? for ©)

2003-01-31 Thread Affan Qureshi
I am having trouble displaying special characters and hence my web pages are
unable to render characters like the Trademark or Copyright symbols.
Initially I thought it was a Tomcat problem coz it was working fine in Resin
and Weblogic. But if I place the same file outside the Struts application
(tomcat-docs or examples) it works fine. However it show '?' if plcaed
inside the Struts application.

Any ideas how can I fix this ugly problem in my app. The app is unusable
without this.

Thanks a lot.

Affan

Here is my code for the Test JSP:
<%@page contentType="text/html; charset=UTF-8"%>

Test JSP

<% out.println('\u00A9'); %>
<% System.out.println("This © is test");%>

<% out.println("This ° is test"); %>

<% out.println("This © is test"); %>

<% out.println("This \u00A9 is test"); %>  <%= "©"%>

<% out.println("This \u00B0 is test"); %>

<% out.println("This \u00AE is test"); %>

<% out.println("This \u0099 is test"); %>

<% out.println("This \u00F6 is test"); %>
<% out.flush(); %>





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: AW: Transforming a String to valid HTML encoding

2003-01-29 Thread Affan Qureshi
The struts html/nested tags replace these characters with the question
marks. This is probably because they are trying to use a filter. Now if I
use my own Encoding/Decoding I will have to turn struts filtring off as u
said. I can do it in  tags but I can find a way to do this in
 and  etc.

This is critical for the application to be usable.

Thanks and Regards,
Affan



It is just for Struts. Or even just for the JSPEngine.

If you want to be on the save side, you can ADDITIONALY add

in the html head.

> Also I still get a ? for the copyright symbol. I must be
> doing something wrong here.

Do you use a font in which this symbol is available?

Regards,
Bernhard





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: AW: Transforming a String to valid HTML encoding

2003-01-28 Thread Affan Qureshi
Hi,

I was facing the same problem in displaying the copyright and trademark
symbols. Did you find some solution for this? I shall be greatfeul if you
can share you experience with me.

What I did was I created a utility class which transforms special characters
into their HTML encodings and also decodes the same. But Struts transforms
them again e.g if I encode ˱ for one symbol Struts will encode the '&'
to & and hence my effort to encode will not work because my symbol would
become ˱. Now either I want to know if I can turn the
ResponseUtils.filter OFF or I can have it filter for my characters too (it
currently only filters 4 characters).

BTW I cam not talking about URL encoding here. I am talking about HTML
encoding for my forms and otherwise.

Thanks,

Affan

- Original Message -
From: "Hirschmann, Bernhard" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Wednesday, January 15, 2003 2:16 PM
Subject: AW: AW: Transforming a String to valid HTML encoding



Thank you for your help, Craig.

I don't know if you got me completely right.. or maybe I didn't understand.

What I want to do is to transform the regional characters of a String like
"ü" into "ü"

The reason is, that I don't want to use utf-8, but ISO-8859-1 for my html
pages. And if a "ü" appears in the ISO-8859-1 characterset in the browser,
it is not displayed correctly in a browser using the english locale. But it
is displayed correctly if "ü" is used. (what is the name for this
format?)

As far as I could learn, java.net.URLEncoder transforms into
"application/x-www-form-urlencoded MIME format", used for the URLs. But this
format is not for the body of a html page, right?


Regards,
Bernhard


-Ursprüngliche Nachricht-
Von: Craig R. McClanahan
Gesendet: Dienstag, 14. Januar 2003 19:06
An: Struts Users Mailing List
Betreff: Re: AW: Transforming a String to valid HTML encoding

On Tue, 14 Jan 2003, Hirschmann, Bernhard wrote:

> Date: Tue, 14 Jan 2003 17:31:03 +0100
> From: "Hirschmann, Bernhard" <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
> Subject: AW: Transforming a String to valid HTML encoding
>
>
> I wonder if this problem is too easy or too hard - may please somebody
> comment this?
>

ResponseUtils is only worried about filtering the characters that could
cause security problems -- it is not designed to be a general purpose URL
encoder.  For that, check out the java.net.URLEncoder class.

> Craig?
>
> Thank you very much

Craig


>
>
> - original message -
>
> I still have the problem to transform a String containing national special
> characters to the appropriate HTML encoding.
>
> i.e.: "schön & reich" --> "schön & reich"
>
> The class org.apache.struts.util.ResponseUtils only transforms the 4
> characters <, >, & and " into their html representative.
>
> Is there another transformer around?
>
> Any hints highly appreciated.
>
> Regards,
> Bernhard
>
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:

For additional commands, e-mail:




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: line breaks

2003-01-21 Thread Affan Qureshi
Sorry for the last post. Actually it was a GZip filter that was not
preserving the line breaks.

But your point still holds. And that may be the reason for the equality
comparison not working quite right.

I will try to take out all line-breaks before comaprison.

Affan

- Original Message -
From: "Affan Qureshi" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, January 22, 2003 11:49 AM
Subject: Re: line breaks


> Well thats interesting coz I am experiencing it a bit differently. I have
> line breaks in the DB but when they show values in the textarea the text
> appears as one block. However if you enter line breaks in the textarea and
> then Save the data it goes into the DB *with* the line breaks. But when it
> is loaded back again the line-breaks disappear.
>
> This has to do something with the population of HTML controls with the
data
> because my form-bean values do have line breaks (in setters and getters).
> Also if I print these values using  I get the line breaks as
in
> the DB. But not in case of . Quite strange.
>
> Affan
>
> - Original Message -
> From: "Ben Starr" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Wednesday, January 22, 2003 10:45 AM
> Subject: Re: line breaks
>
>
> > I looked into this once and as far as I can remember browsers will
happily
> > read files containing \r (Mac), \n (Unix) or \r\n (Windows) line breaks
> and
> > display them as separate lines in a text area. However, when they are
> > submitted back to the server they are always submitted as just \r. I'm
not
> > sure if this is part of the W3C HTML standard but it is what I found
from
> > experimenting with various browsers and line breaks. This may be why
your
> > equals comparison is not working.
> >
> > Ben
> >
> >
> > > My problem is that the data in my DB and the form-beans contain line
> breaks
> > > but when I populate  or  with these
> values
> > > the line-breaks go away and I see the text as one block.
> > >
> > > BTW I am using redirect=true but I dont think that should make a
> difference.
> > >
> > > Anyone with such experience/ideas? Thanks for your help.
> > >
> > > Affan
> > >
> > > - Original Message -
> > > From: "Max Kremer" <[EMAIL PROTECTED]>
> > > To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > > Sent: Monday, January 06, 2003 1:31 AM
> > > Subject: Re: line breaks
> > >
> > >
> > >> I use SQL server to populate TEXTAREAs from the DB and update the DB
as
> > >> well.
> > >> I'm using the  struts tag to accomplish this, and I'm
> not
> > >> experiencing any problems.
> > >> If  I understand your message correctly you're saying that the string
> > > value
> > >> is not coming directly from the DB but from Swing.
> > >> Its probably something along the way thats messing up your string.
> > >>
> > >> - Original Message -
> > >> From: "Affan Qureshi" <[EMAIL PROTECTED]>
> > >> To: "struts-user" <[EMAIL PROTECTED]>
> > >> Sent: Saturday, January 04, 2003 9:10 AM
> > >> Subject: line breaks
> > >>
> > >>
> > >>> I am using Struts 1.1b2, Tomcat 4.1.12 LE, on Win2K.
> > >>>
> > >>> I have a strange issue. I have a TEXTAREA type control that gets
> > > populated
> > >>> from values in database. The value in the database has some line
> breaks.
> > > I
> > >>> store that value in a variable called: "OLD_VALUE". Then I display
the
> > >> value
> > >>> in the TEXTAREA and when i get it back(from form-bean) after the
form
> is
> > >>> submitted (without changing the value) i store it in a variable
called
> > >>> "NEW_VALUE". The two DON'T evaluate String.equals() to "true". When
I
> > >> paste
> > >>> them in notepad I see that OLD_VALUE has line-breaks while the
> NEW_VALUE
> > >>> does not have line breaks.
> > >>>
> > >>> Has anyone else faced the same problem? I guess it has something to
do
> > >> with
> > >>> \r and \r\n for line breaks on different platforms.
> > >>>
> > >>> BTW the data in the database is saved in Oracle 8i through a Swing
> >

Re: line breaks

2003-01-21 Thread Affan Qureshi
Well thats interesting coz I am experiencing it a bit differently. I have
line breaks in the DB but when they show values in the textarea the text
appears as one block. However if you enter line breaks in the textarea and
then Save the data it goes into the DB *with* the line breaks. But when it
is loaded back again the line-breaks disappear.

This has to do something with the population of HTML controls with the data
because my form-bean values do have line breaks (in setters and getters).
Also if I print these values using  I get the line breaks as in
the DB. But not in case of . Quite strange.

Affan

- Original Message -
From: "Ben Starr" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, January 22, 2003 10:45 AM
Subject: Re: line breaks


> I looked into this once and as far as I can remember browsers will happily
> read files containing \r (Mac), \n (Unix) or \r\n (Windows) line breaks
and
> display them as separate lines in a text area. However, when they are
> submitted back to the server they are always submitted as just \r. I'm not
> sure if this is part of the W3C HTML standard but it is what I found from
> experimenting with various browsers and line breaks. This may be why your
> equals comparison is not working.
>
> Ben
>
>
> > My problem is that the data in my DB and the form-beans contain line
breaks
> > but when I populate  or  with these
values
> > the line-breaks go away and I see the text as one block.
> >
> > BTW I am using redirect=true but I dont think that should make a
difference.
> >
> > Anyone with such experience/ideas? Thanks for your help.
> >
> > Affan
> >
> > - Original Message -
> > From: "Max Kremer" <[EMAIL PROTECTED]>
> > To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > Sent: Monday, January 06, 2003 1:31 AM
> > Subject: Re: line breaks
> >
> >
> >> I use SQL server to populate TEXTAREAs from the DB and update the DB as
> >> well.
> >> I'm using the  struts tag to accomplish this, and I'm
not
> >> experiencing any problems.
> >> If  I understand your message correctly you're saying that the string
> > value
> >> is not coming directly from the DB but from Swing.
> >> Its probably something along the way thats messing up your string.
> >>
> >> - Original Message -
> >> From: "Affan Qureshi" <[EMAIL PROTECTED]>
> >> To: "struts-user" <[EMAIL PROTECTED]>
> >> Sent: Saturday, January 04, 2003 9:10 AM
> >> Subject: line breaks
> >>
> >>
> >>> I am using Struts 1.1b2, Tomcat 4.1.12 LE, on Win2K.
> >>>
> >>> I have a strange issue. I have a TEXTAREA type control that gets
> > populated
> >>> from values in database. The value in the database has some line
breaks.
> > I
> >>> store that value in a variable called: "OLD_VALUE". Then I display the
> >> value
> >>> in the TEXTAREA and when i get it back(from form-bean) after the form
is
> >>> submitted (without changing the value) i store it in a variable called
> >>> "NEW_VALUE". The two DON'T evaluate String.equals() to "true". When I
> >> paste
> >>> them in notepad I see that OLD_VALUE has line-breaks while the
NEW_VALUE
> >>> does not have line breaks.
> >>>
> >>> Has anyone else faced the same problem? I guess it has something to do
> >> with
> >>> \r and \r\n for line breaks on different platforms.
> >>>
> >>> BTW the data in the database is saved in Oracle 8i through a Swing
> >>> client/server app. The App-Server for Swing app is Weblogic on Solaris
> > for
> >>> SunSPARC. Then the data gets imported to XML and then to MySQL on
Win2K.
> >>> Then the Struts app loads and display/edits it in the above form.
> >>>
> >>> Thanks and regards,
> >>>
> >>> Affan
> >>>
> >>>
> >>> --
> >>> To unsubscribe, e-mail:
> >> <mailto:[EMAIL PROTECTED]>
> >>> For additional commands, e-mail:
> >> <mailto:[EMAIL PROTECTED]>
> >>>
> >>> -
> >>>
> >>>
> >>
> >>
> >> --
> >> To unsubscribe, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> >> For additional commands, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> >>
> >
> >
> > --
> > To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
> >
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Re: line breaks

2003-01-21 Thread Affan Qureshi
My problem is that the data in my DB and the form-beans contain line breaks
but when I populate  or  with these values
the line-breaks go away and I see the text as one block.

BTW I am using redirect=true but I dont think that should make a difference.

Anyone with such experience/ideas? Thanks for your help.

Affan

- Original Message -
From: "Max Kremer" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, January 06, 2003 1:31 AM
Subject: Re: line breaks


> I use SQL server to populate TEXTAREAs from the DB and update the DB as
> well.
> I'm using the  struts tag to accomplish this, and I'm not
> experiencing any problems.
> If  I understand your message correctly you're saying that the string
value
> is not coming directly from the DB but from Swing.
> Its probably something along the way thats messing up your string.
>
> - Original Message -
> From: "Affan Qureshi" <[EMAIL PROTECTED]>
> To: "struts-user" <[EMAIL PROTECTED]>
> Sent: Saturday, January 04, 2003 9:10 AM
> Subject: line breaks
>
>
> > I am using Struts 1.1b2, Tomcat 4.1.12 LE, on Win2K.
> >
> > I have a strange issue. I have a TEXTAREA type control that gets
populated
> > from values in database. The value in the database has some line breaks.
I
> > store that value in a variable called: "OLD_VALUE". Then I display the
> value
> > in the TEXTAREA and when i get it back(from form-bean) after the form is
> > submitted (without changing the value) i store it in a variable called
> > "NEW_VALUE". The two DON'T evaluate String.equals() to "true". When I
> paste
> > them in notepad I see that OLD_VALUE has line-breaks while the NEW_VALUE
> > does not have line breaks.
> >
> > Has anyone else faced the same problem? I guess it has something to do
> with
> > \r and \r\n for line breaks on different platforms.
> >
> > BTW the data in the database is saved in Oracle 8i through a Swing
> > client/server app. The App-Server for Swing app is Weblogic on Solaris
for
> > SunSPARC. Then the data gets imported to XML and then to MySQL on Win2K.
> > Then the Struts app loads and display/edits it in the above form.
> >
> > Thanks and regards,
> >
> > Affan
> >
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> >
> > -
> >
> >
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Re: Design of action classes

2003-01-14 Thread Affan Qureshi
Also look at DispatchAction which provides a cleaner approach to this...
Affan

- Original Message -
From: "Mark Galbreath" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Tuesday, January 14, 2003 7:02 PM
Subject: RE: Design of action classes


I think the consensus is to use one Action class per Action form (bean).
For a simple update like you describe, it would be natural for the same
Action to update the database (actually, call a DAO or EJB) whether it's a
new user or new information for an existing user.  Work through your use
cases and I think it will become apparent what Action classes are
appropriate for specific responsibilities.

Mark

-Original Message-
From: João Paulo Batistella [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 14, 2003 8:36 AM

We are deciding about how to use action classes in our project.

Is it a problem to let developers use the same action class to handle
different operations?

Example:

The action UpdateUserAction could be used to insert a new user or to update
the data of an existing user. Is it a problem? Or it's better to have
InsertUserAction and SaveUserAction. They do almost the same thing so I
think they could be same.

Thanks,

Joao Paulo.



--
To unsubscribe, e-mail:

For additional commands, e-mail:




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




How to reset session-scoped Dyna bean values

2003-01-12 Thread Affan Qureshi
A rather basic question: How to reset/empty the property values in a session
bean when I get to page 1 in a wizard type interface?

I have a wizard type interface where I need to retain values throught
four/five screens. But when I want to start a new process from screen 1 I
get the same values back that I had entered in the prev process. How can I
reset them? My form bean is a DynaActionForm and I have tried setting the
initial property to "" and "false" but this does not seem to work. What am I
doing wrong?

Thanks in advance..

Affan



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Checkbox in a multiple-page form.

2003-01-07 Thread Affan Qureshi
Same problem here as well. But in my case the checkbox values are coming
from the database. So I can't set all checkbox properties to false in the
reset() method.

Any solution in mind?

Affan

- Original Message -
From: "ROSSEL Olivier" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, January 07, 2003 3:45 PM
Subject: Checkbox in a multiple-page form.


> I have a form on 3 pages.
> So my form bean is in session scope.
>
> The JSP are as follows:
>
> Page1:
> some text inputs+some checkboxes.
>   Next>>
>
> Page2:
> more advanced stuff
>   <>
>
> Page3:
> even more advanced stuff
>   <
> My problem is the classic problem of checkboxes.
> I do check some of them on page1.
> I go to page 2, then to page 3.
>
> Then back, back.
> And guess what?
> All my checkboxes on page 1 are empty.
>
> Of course, they are empty cause I coded that
> in the reset() method of my form bean:
> all checkboxes <= false.
> (it's in the FAQ).
>
> Well, replacing the value of the checkbox with false
> seems to have erased the value the user had chosen.
>
> I (of course) missed something.
>
> Any help?
>
>
> ---cut here---
>
>
> This e-mail is intended only for the above addressee. It may contain
> privileged information. If you are not the addressee you must not copy,
> distribute, disclose or use any of the information in it. If you have
> received it in error please delete it and immediately notify the sender.
> Security Notice: all e-mail, sent to or from this address, may be
> accessed by someone other than the recipient, for system management and
> security reasons. This access is controlled under Regulation of
> Investigatory Powers Act 2000, Lawful Business Practises.
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Struts equivalent of if...else (newbie)

2003-01-06 Thread Affan Qureshi
Not in Struts itself but have you seen JSTL? it has a  tag
which does exactly what u r looking for.

Affan

- Original Message -
From: "Suresh Addagalla" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Monday, January 06, 2003 7:18 PM
Subject: RE: Struts equivalent of if...else (newbie)


> Well, as you guessed, I do have scriptlets. Now my effort is to minimize
> or remove them completely.
>
> And I tried to use logic with local variables, it worked. Thanks for
> that. And still, logic:equal offers only if..then; is there any way to
> simulate if..then..else?
>
> Thanks,
> Suresh
>
> >-Original Message-
> >From: Siggelkow, Bill [mailto:[EMAIL PROTECTED]]
> >Sent: Monday, January 06, 2003 7:41 PM
> >To: 'Struts Users Mailing List'
> >Subject: RE: Struts equivalent of if...else (newbie)
> >
> >
> >I believe that the logic tags will work with a local variable
> >-- anyway, if you don't want to use scriptlet, how did you
> >create the local variable in the first place?
> >
> >-Original Message-
> >From: Suresh Addagalla [mailto:[EMAIL PROTECTED]]
> >Sent: Monday, January 06, 2003 8:59 AM
> >To: [EMAIL PROTECTED]
> >Subject: Struts equivalent of if...else (newbie)
> >
> >
> >Hi,
> >
> >I would like to know if Struts provides a custom tag for
> >achieving if..then..else functionality.
> >
> >I can not use logic:equal because the data for me is NOT
> >coming from either a bean or through the request. I just need
> >to compare a variable. Is there any option apart from writing
> >a cryptic looking scriptlet?
> >
> >Thanks,
> >Suresh
> >
> >
> >--
> >To unsubscribe, e-mail:
> >[EMAIL PROTECTED]>
> >For
> >additional commands,
> >e-mail: 
> >
>
>






> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




[IGNORE ->] Re: Setting chehckbox state for DynActionForm

2003-01-06 Thread Affan Qureshi
Please ignore. Its fixed. I was not using correct property names in the
files. Sorry for the post out of frustration.
Regards,
Affan
- Original Message -
From: "Affan Qureshi" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, January 06, 2003 12:32 PM
Subject: Setting chehckbox state for DynActionForm


> I want to set checkbox states for properties of a DynaActionForm. What
> values and types should I set for form bean defs in struts-config? What
> values should I get in Action after submitting the form?
>
> I have tried setting property types to java.lang.String, boolean and
> java.lang.Boolean type. It showed all checkboxes as "on" even though I had
> set the property to "on" in the prececding Action. Then I used  type="checkbox" name="myPropertyName" checked > in JSP but this time the
> display was fine but the values i was getting were not correct i.e the
only
> checked checkbox was the one that I had hard-coded in JSP.
>
> Note: All checkboxes are not related. So multi-box is no suitable here i
> think
>
> Any ideas.
>
> Thanks,
> Affan
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Setting chehckbox state for DynActionForm

2003-01-05 Thread Affan Qureshi
I want to set checkbox states for properties of a DynaActionForm. What
values and types should I set for form bean defs in struts-config? What
values should I get in Action after submitting the form?

I have tried setting property types to java.lang.String, boolean and
java.lang.Boolean type. It showed all checkboxes as "on" even though I had
set the property to "on" in the prececding Action. Then I used  in JSP but this time the
display was fine but the values i was getting were not correct i.e the only
checked checkbox was the one that I had hard-coded in JSP.

Note: All checkboxes are not related. So multi-box is no suitable here i
think

Any ideas.

Thanks,
Affan


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: PrePopulation of FormBean Values

2003-01-05 Thread Affan Qureshi
This has been asked many times before as well.

In Action before forwarding to the JSP:

MyBean bean = new MyBean();
bean.setMyAttribute("my value from somwhere");
request.setAttribute("formBeanNameInStrutsConfig" , bean);


- Original Message -
From: "ashokd" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, May 02, 2002 3:23 PM
Subject: PrePopulation of FormBean Values


> Hi,
>
> How to propopulate the Form values in a Form (which is using the Struts
> FormBean)
>
> The scope of the FormBean is request.
>
> Please provide an example on this.
>
> Thanks in Advance,
> Ashok.D
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: line breaks

2003-01-05 Thread Affan Qureshi
No its coming from a DB. But the DB gets its values from Swing tool.
The chain is:
Swing->Oracle->XML->MySQL->WebApp (Struts)
Thanks
Affan

- Original Message -
From: "Max Kremer" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, January 06, 2003 1:31 AM
Subject: Re: line breaks


> I use SQL server to populate TEXTAREAs from the DB and update the DB as
> well.
> I'm using the  struts tag to accomplish this, and I'm not
> experiencing any problems.
> If  I understand your message correctly you're saying that the string
value
> is not coming directly from the DB but from Swing.
> Its probably something along the way thats messing up your string.
>
> - Original Message -
> From: "Affan Qureshi" <[EMAIL PROTECTED]>
> To: "struts-user" <[EMAIL PROTECTED]>
> Sent: Saturday, January 04, 2003 9:10 AM
> Subject: line breaks
>
>
> > I am using Struts 1.1b2, Tomcat 4.1.12 LE, on Win2K.
> >
> > I have a strange issue. I have a TEXTAREA type control that gets
populated
> > from values in database. The value in the database has some line breaks.
I
> > store that value in a variable called: "OLD_VALUE". Then I display the
> value
> > in the TEXTAREA and when i get it back(from form-bean) after the form is
> > submitted (without changing the value) i store it in a variable called
> > "NEW_VALUE". The two DON'T evaluate String.equals() to "true". When I
> paste
> > them in notepad I see that OLD_VALUE has line-breaks while the NEW_VALUE
> > does not have line breaks.
> >
> > Has anyone else faced the same problem? I guess it has something to do
> with
> > \r and \r\n for line breaks on different platforms.
> >
> > BTW the data in the database is saved in Oracle 8i through a Swing
> > client/server app. The App-Server for Swing app is Weblogic on Solaris
for
> > SunSPARC. Then the data gets imported to XML and then to MySQL on Win2K.
> > Then the Struts app loads and display/edits it in the above form.
> >
> > Thanks and regards,
> >
> > Affan
> >
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> >
> > -
> >
> >
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




line breaks

2003-01-04 Thread Affan Qureshi
I am using Struts 1.1b2, Tomcat 4.1.12 LE, on Win2K.

I have a strange issue. I have a TEXTAREA type control that gets populated
from values in database. The value in the database has some line breaks. I
store that value in a variable called: "OLD_VALUE". Then I display the value
in the TEXTAREA and when i get it back(from form-bean) after the form is
submitted (without changing the value) i store it in a variable called
"NEW_VALUE". The two DON'T evaluate String.equals() to "true". When I paste
them in notepad I see that OLD_VALUE has line-breaks while the NEW_VALUE
does not have line breaks.

Has anyone else faced the same problem? I guess it has something to do with
\r and \r\n for line breaks on different platforms.

BTW the data in the database is saved in Oracle 8i through a Swing
client/server app. The App-Server for Swing app is Weblogic on Solaris for
SunSPARC. Then the data gets imported to XML and then to MySQL on Win2K.
Then the Struts app loads and display/edits it in the above form.

Thanks and regards,

Affan


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: multiple parameters for dispatchaction

2003-01-03 Thread Affan Qureshi
Of course. Set up a link like:
Link Text

In the action class you can get the value of the primary key by
request.getParameter("pkey")

Was that the problem or am I missing something?

Affan
- Original Message -
From: "usha" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, January 03, 2003 1:54 PM
Subject: Re: multiple parameters for dispatchaction


> Hi Dan Tran
>
> my problem is when i click a link on the first page it will be sent to a
> particular method on the dispatchaction class, in that particular method
> i need to know the my primary key that i selected on the first page.so
> that's why i am thinking to sent it as a parameter in the url so that i
> can get it in the method in the request object, but this is an
> dispatchaction class i need to pass the parameter for the method to be
> excuted. can i pass another parameter along with this dispatchaction
> parameter in the link?
>
> Thanks
> usha
>
> Dan Tran wrote:
>
> >After reading your message more carefully,  where is your problem?  in
the
> >first page
> >or second page?
> >
> >-D
> >- Original Message -
> >From: "usha" <[EMAIL PROTECTED]>
> >To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >Sent: Friday, January 03, 2003 12:00 AM
> >Subject: Re: multiple parameters for dispatchaction
> >
> >
> >
> >
> >>Hi Dan Tran
> >>
> >>Correct on the first page i don't have any form its just a list upon
> >>cliking the primary key field i need to fill out my ActionForm for that
> >>primary key to show it on the next page.
> >>
> >>Thanks
> >>usha
> >>
> >>Dan Tran wrote:
> >>
> >>
> >>
> >>>So you start out with a list of items and upon clicking on
> >>>the item (your primary key), it will invoke a dispatch action?  In
> >>>
> >>>
> >another
> >
> >
> >>>word, the initial screen does not have a form.?
> >>>
> >>>-D
> >>>
> >>>- Original Message -
> >>>From: "usha" <[EMAIL PROTECTED]>
> >>>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >>>Sent: Thursday, January 02, 2003 11:35 PM
> >>>Subject: Re: multiple parameters for dispatchaction
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> Hi Dan Tran
> 
> i cannot set as hidden field because in that page all the primary keys
> list will be there upon clicking on the on of the primary key the key
> has to passed to the dispatchaction class
> 
> Thanks
> usha
> 
> Dan Tran wrote:
> 
> 
> 
> 
> 
> >set your primary key as a hidden field.  This way you dont have to
pass
> >
> >
> >
> >
> >>>it
> >>>
> >>>
> >>>
> >>>
> >in the query string
> >
> >-D
> >
> >
> >- Original Message -
> >From: "usha" <[EMAIL PROTECTED]>
> >To: <[EMAIL PROTECTED]>
> >Sent: Thursday, January 02, 2003 10:41 PM
> >Subject: multiple parameters for dispatchaction
> >
> >
> >
> >
> >
> >
> >
> >
> >>Hi
> >>
> >>can we pass multiple parameters for dispatchaction.
> >>
> >>for example
> >>i wanted to go to the details page on click of link i wanted to pass
> >>the primary key value along with the dispatch action parameter
value.
> >>
> >>how can i pass the both the dispatchaction parameter and the primary
> >>
> >>
> >key
> >
> >
> >>value.
> >>
> >>Thanks
> >>usha
> >>
> >>
> >>--
> >>To unsubscribe, e-mail:
> >>
> >>
> >>
> >>
> >>
> >>
> >
> >
> >
> >
> >
> >
> >
> >>For additional commands, e-mail:
> >>
> >>
> >>
> >>
> >>
> >>
> >
> >
> >
> >
> >--
> >To unsubscribe, e-mail:
> >
> >
> >
> >
> >>>
> >>>
> >>>
> >>>
> >>>
> >For additional commands, e-mail:
> >
> >
> >
> >
> >>>
> >>>
> >>>
> >>>
> >>>
> >
> >
> --
> To unsubscribe, e-mail:
> 
> 
> 
> 
> >>>
> >>>
> >>>
> >>>
> >>>
> For additional commands, e-mail:
> 
> 
> 
> 
> >>>
> >>>
> >>>
> >>>
> >>>--
> >>>To unsubscribe, e-mail:
> >>>
> >>>
> >
> >
> >
> >>>For additional commands, e-mail:
> >>>
> >>>
> >
> >
> >
> >>>
> >>>
> >>
> >>
> >>--
> >>To unsubscribe, e-mail:
> >>
> >>
> >
> >
> >
> >>For additional commands, e-mail:
> >>
> >>
> >
> >
> >
> >
> >--
> >To unsubscribe, e-mail:

> >For additional commands, e-mail:

> >
> >
>
>
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Dynamic Forms

2003-01-01 Thread Affan Qureshi
You have quite a few options for this scenario. Either use Map-backed form
bean properties. Or use Nested Extension. I would prefer the latter.

Affan

- Original Message -
From: "ashokd" <[EMAIL PROTECTED]>
To: "Struts" <[EMAIL PROTECTED]>
Sent: Tuesday, April 30, 2002 1:36 PM
Subject: Dynamic Forms


Hi,

In my project, I am displaying all exisiting data in row format, user can
update any row(We don't know how many rows will come every time, it depends
upon the records exist in database).

For this type of project shall I use Struts, If yes how can I create
FormBeans for this type of forms.

Please give your suggestion on this.

Thanks & Regards,
Ashok.D



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Multiple forms in session [WAS: RE: how to send actionForm fromone action to another action]

2002-12-27 Thread Affan Qureshi
Is there a way to instantiate multiple instances of actionForm beans under
different names? Also the  and action should lookup beans using a
dynamic string rather than one from struts-config.xml. We can create unique
names by appending some Id to the names. This way we might be able to avoid
name conflicts and still be able to work with multiple forms simultaneously.
Is this possible in any way? Or what is a better solution for this?

I dont want to make the bean request-scope because session-scope beans allow
for better functionality. BTW I am using Nested tags in this case.

Thanks and regards,

Affan

- Original Message -
From: "Eddie Bush" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, December 18, 2002 11:32 AM
Subject: Re: Multiple forms in session [WAS: RE: how to send actionForm
fromone action to another action]


> Eddie Bush wrote:
>
> > They'd get trampled :-(  In fact, there's really not a good solution
> > that comes to mind.  The only single thing I see that we can do to
> > make using session-based forms more safe is to add the module name to
> > the key we use to place the forms into scope.  I'm going to go look
> > for that bug now - nearly certain it's there.
>
> ... and I have yet again managed to show my imperfection - I was wrong!
>  I sure thought such a bug existed, but I guess it must have been a
> discussion instead of a bug report.
>
> --
> Eddie Bush
>
>
>
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Cascade actions execution!

2002-12-27 Thread Affan Qureshi
Have you tried writing reset code in FromB.reset()?

Or perhaps you can create FormB yourself in ActionA and store it in the
appropriate scope explicitly (although I have never tried this myself). I
think the request parameter with the common name is the problem here. Can
you forward to ActionB by somehow overriding the value of that request
parameter? Or (of course) you can name the parameters differently.

Tell me if it works?

Affan

- Original Message -
From: "Victor Batista" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, December 27, 2002 4:07 PM
Subject: Cascade actions execution!


> Hello!
> I have two Actions which are called on cascade:
> ActionA -> Forward to ActionB (without Redirect) -> JSP constructs HTML
> Page.
>
> Action A has one form, say FormA and ActionB has a different form, FormB.
> When the client requests ActionA, a new FormA is created and filled
> correctly. When ActionA finishes, it forwards control to ActionB. A new
> FormB is created. In my case, FormA and FormB have a common parameter, and
> FormB gets that parameter filled. Although I don't want this to happen.
How
> can I, after ActionA finishes, clean all the Parameters in such a way that
> FormB will be created, but without parameters (or even not created at
all).
> I need to reset all parameters from struts. How can I do this? I have
reset
> FormA, but the values still appear on FormB. How can I do this? I don't
want
> to make a redirect from ActionA to ActionB.
> I would really appreciate your help.
>
> Thanks in advance,
> Victor Batista
>
>
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Simultaneous editing of a session-scoped ActionForm bean

2002-12-27 Thread Affan Qureshi
I have a session scoped ActionForm bean "productBean" which has a nested
hierarchy of objects. If the user opens two windows for the same page for
different products the bean in the session gets overwritten and may cause
corruption of data. One way is to error out if the user has a different
product on the screen than the bean in the session (by comparing the
productIds). But I wanted to maybe define multiple beans with different
bean-names by appending the productId with the bean name. In that case the
form should lookup the bean identified by a dynamic label rather than the
one defined in struts-confg.xml. Is this possible? Can I instantiate
multiple instances of a form bean even if declared only once in
struts-config.xml? Or do I have to bypass the struts-config declaration
altogether somhow?

Has anyone done this in a better way? Any best practices in this case?

Thanks a lot.

Affan


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Pre-populating DynaActionForm Bean (solved)

2002-12-21 Thread Affan Qureshi
Should use the following way to instantiate a DynaActionForm:

DynaBean form =
DynaActionFormClass.getDynaActionFormClass("accessory").newInstance();

But surprisingly i can't find this method on the API on the Docs on the
struts website. http://jakarta.apache.org/struts/api/index.html

Thanks,

Affan

- Original Message -----
From: "Affan Qureshi" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Saturday, December 21, 2002 4:33 PM
Subject: Re: Pre-populating DynaActionForm Bean


> I have a similar scenario but in my case the sending action does not have
> the same form bean bean associated as the destination. So what I want to
do
> is to instantiate a form bean which the JSP is expecting and put it in the
> request scope.
>
> Here is my code:
>
> DynaActionForm form = new DynaActionForm();
> form.set("productId", String.valueOf(acc.getProductId()));
> form.set("mfrPartNumber", acc.getAccessoryProduct().getMfgPartNo());
> form.set("description", acc.getAccessoryProduct().getDescription());
> form.set("notes", acc.getNotes());
> req.setAttribute("accessory", form);
>
> This is the JSP to which I am sending this request:
> 
> 
> 
> 
> 
> Save Accessory
> 
>
> In struts-config.xml I have the following def for action saveAcc.do
>  name="accessory" validate="false" scope="request">
>
> This is the error I get when submitting to the JSP:
> java.lang.NullPointerException at
>
org.apache.struts.action.DynaActionForm.getDynaProperty(DynaActionForm.java:
> 545) at
org.apache.struts.action.DynaActionForm.set(DynaActionForm.java:361)
> at com.etilize.cms.web.actions.AddAccessoriesAction.editAccessory ..
> (more...)
>
> I am sorry if this has come up earlier but I could not find one.
>
> Thanks a lot.
> Affan



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Re: Pre-populating DynaActionForm Bean

2002-12-21 Thread Affan Qureshi
I have a similar scenario but in my case the sending action does not have
the same form bean bean associated as the destination. So what I want to do
is to instantiate a form bean which the JSP is expecting and put it in the
request scope.

Here is my code:

DynaActionForm form = new DynaActionForm();
form.set("productId", String.valueOf(acc.getProductId()));
form.set("mfrPartNumber", acc.getAccessoryProduct().getMfgPartNo());
form.set("description", acc.getAccessoryProduct().getDescription());
form.set("notes", acc.getNotes());
req.setAttribute("accessory", form);

This is the JSP to which I am sending this request:





Save Accessory


In struts-config.xml I have the following def for action saveAcc.do


This is the error I get when submitting to the JSP:
java.lang.NullPointerException at
org.apache.struts.action.DynaActionForm.getDynaProperty(DynaActionForm.java:
545) at org.apache.struts.action.DynaActionForm.set(DynaActionForm.java:361)
at com.etilize.cms.web.actions.AddAccessoriesAction.editAccessory ..
(more...)

I am sorry if this has come up earlier but I could not find one.

Thanks a lot.
Affan
- Original Message -
From: "Mark Lowe" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Saturday, December 21, 2002 1:17 AM
Subject: Re: Pre-populating Form Bean


> As a side note I'd watch out putting dots in your actions .. I was doing
the
> same and it worked .. and then i was getting an error that complained it
> could find the action...
>
> perhaps it was the release i was using or something, but i'd hate someone
> else to wash time out over this as well.. If its working however then
don't
> fix it...
>
>
>
> - Original Message -
> From: "Mark Conlin" <[EMAIL PROTECTED]>
> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> Sent: Friday, December 20, 2002 8:42 PM
> Subject: RE: Pre-populating Form Bean
>
>
> >
> > This can not be the correct way to do this.
> >
> > I removed any reference to the form from the pre-Action:
> >
> >  > type="com.yordata.action.customer.CustomerAccountDetailsPreEditAction">
> > 
> > 
> >
> > Then I placed the Form into the session in the action like this:
> > session.setAttribute( "customerDetailsForm", custForm);
> >
> > This works but, I do not want to hard-code the form reference like this.
> >
> > Mark
> >
> >
> >
> > -Original Message-
> > From: Mark Conlin [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, December 20, 2002 2:30 PM
> > To: 'Struts Users Mailing List'
> > Subject: RE: Pre-populating Form Bean
> >
> >
> >
> > Okay, I think I am missing something major here.
> > By watching the log files I see the following.
> >
> > 1)Proccessing my pre edit Action -
> > "customer.customAccountDetails.pre.edit"
> > 2)Struts then looks for my ActionForm -  "customerDetailsForm"
> > 3)Struts then creates my ActionForm since it can not find it.
> > 4)The form fails validation, as described by my validation.xml file.
> >
> > The pre edit Action never runs...
> >
> > The result is that I arrive at my "create" page with validation errors
> > because the validation logic tells it to return to that page.
> >
> > So, how can I pre-populate a Form? What am I don't wrong here...
> >
> > Mark
> >
> >
> > -Original Message-
> > From: Mark Conlin [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, December 20, 2002 1:38 PM
> > To: 'Struts Users Mailing List'
> > Subject: RE: Pre-populating Form Bean
> >
> >
> > Okay so I have done the following...
> > I placed name="customerDetailsForm" into my action declaration..
> > It wanted an input field as well so I added that too.
> >
> > Now my form comes up and it is still not populated...
> >
> > My action execute code is below... are you sure I don't need to place
> > the custForm back into the session somehow ?
> >
> >
> > Thanks
> > Mark
> >
> > logger.debug("performAction starting");
> > ActionErrors errors = new ActionErrors();
> > ActionForward actionForward = mapping.findForward(FAILURE);
> > CustomerDetailsForm custForm = (CustomerDetailsForm) form;
> > HttpSession session = (HttpSession) request.getSession();
> >
> > custForm = this.setup( session );
> > actionForward = mapping.findForward(SUCCESS);
> >
> > logger.debug("performAction exiting");
> >
> > Action Declaration:
> >
> >  > type="com.yordata.action.customer.CustomerAccountDetailsEditAction"
> > name="customerDetailsForm"
> > scope="session"
> > input="customer.account_details_view">
> >  > path="/customer.customerAccountDetails.view.do"/>
> > 
> > 
> >
> >
> > -Original Message-
> > From: Eddie Bush [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, December 20, 2002 2:13 PM
> > To: Struts Users Mailing List
> > Subject: Re: Pre-populating Form Bean
> >
> > If this is a form which you've declared in your config file, and it's
> > associated with this action and you're forwarding to a JSP, you really
> > needn't bother sticking it into any scope.  St

Re: monkey tree problem

2002-12-19 Thread Affan Qureshi
Are you talking about JavaScript click event here? The names of the buttons
are generated using the nesting scheme like:
name="bean1.nestedBean1.nestedBean2.button1". Or if they are indexed (in an
array) it uses the array syntax like
name="bean1.beanColl[2].nestedBeanColl[4].button1".

Have you tried using the onclick attribute of the  tag. You
can pass this button into the JavaScript function and use the above scheme
to know which button was clicked.

Is there a way you can accomplish the same functionality (like the
monkey-tree example v2) by making the bean request-scoped?

Affan

- Original Message -
From: "Amit Badheka" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, December 19, 2002 5:48 PM
Subject: monkey tree problem


Hi All,

I have a requirement to generate the tree structure from the collection
object.

right now I am using the monkey tree to generate the tree structure for the
same.

The tree is generating fine. But, the problem is that I want to catch the
click event i.e. which node is clicked so that I can get the node name that
is clicked.

Is anybody is using monkey tree?

please help me to resolve this problem, also if there is any alternate
option let me know.

thanks a lot,

Amit Badheka.




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: logic:iterate

2002-12-13 Thread Affan Qureshi
You can do it manually by keeping the collection and state variables in the
session which indicate the page nos and the current status of the
collection. However there are some Tag Libraries available taht do just
that. Check out Struts-Layout and Ed Hill's TagLibs on the Struts resources
page.

Affan

- Original Message -
From: "Cathy Osekizoglu" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, December 13, 2002 11:59 PM
Subject: logic:iterate


>
> Hi:
> I have 12 items in a collection. I want to display the first 10 items on
the first page, and the rest 2 items in the next page. How can I control it
using logic:iterate tag. Thank you for your help.
> Regards,
> Cathy
>
>
>
> -
> Post your free ad now! Yahoo! Canada Personals
>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




theKB Example (prev: Complicated Web Interfaces?)

2002-11-28 Thread Affan Qureshi
Nested Tags really helped me in achieving what I had nightmares trying to
accomplish otherwise. I have something similar to what we have at
http://www.keyboardmonkey.com/StrutMonkey/MonkeyStruts_v2.jsp
but in my case the Adding/Deleting object (corresponding to BunchBean ) is
pretty dynaimc i.e you dont know in advance the properties of the
BananaBean. However it works pretty sweet.

The problem is screen refresh. If I delete a node and click Refresh then
there is an ArrayIndexOutOfBoundsException because the request is resent to
delete a node that is already deleted. I have disabled the user to delete
the last Banana (i.e the user should not be able to delete the last Banana).
But the refresh problem I dont get. In the example it just deletes the last
Banana if I refresh until all bananas are gone. But at least it does not
show an exception.

I have even tried to catch and ignore the error at the
Action/RequestProcessor but it did not work too well. (Maybe i did not
implement it correctly).

Has anybody come across this?

Thanks for a great example.

- Original Message -
From: "Arron Bates" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, November 28, 2002 6:06 PM
Subject: Re: Complicated Web Interfaces?


> > > I've also looked at the monkey-struts example as well but that seems
to
> > > lack the
> > > creation of objects in these lists, which doesn't look to be a problem
> > > to implement
> > > but that might be an oversight on my part : ) please let me know if
I'm
> > > wrong.
>
> Have another play, click on "new banana"... :)
>
> http://www.keyboardmonkey.com/StrutMonkey/MonkeyStruts_v2.jsp
>
>
> > KB-Monkey-example uses a fixed object model (i.e it knows what fields
are
> > there in each object). However I think if you want the tree to be
dynamic
> > you can use the same technique with your own object model (which seems
to be
> > dynamic in content). The key to adding and deleting the nodes is the way
the
> > button clicks of "Add" and "Delete" are handled in a nested environment.
> > Nested tags enable you to remember the context of added and deleted
> > objects/nodes. You can use Map-backed properties for dynamic
form-fields.
> >
> > But one issue with the monkey example is that it refreshes the page if I
> > want to add/delete an object/node. Wouldn't it be more efficient to use
> > JavaScript for the purpose? I mean why resend the request back to the
server
> > if you only want to add "blank" fields? If anybody has accomplished this
I
> > would be glad to know.
>
> It's all up to watever you want to code. The fact that the monkey
> example trips to the server has nothing to do with the nested tags.
>
> To write the monkey example in Struts without the nested tags is verging
> on impossible, at the very least a truly large headache, it was really
> quite easy.
>
> If the nested tags are guilty of anything, they make it very easy (and
> even fun?... maybe I'm wired differently) to add more and more
> complexity to the structure. The nested tags have made some truly
> unwieldy applications, including the reason for their creation.
>
> You just have to ask yourself one question...
> Red or Blue pill?  :P
>
>
> Arron.
>
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Complicated Web Interfaces?

2002-11-28 Thread Affan Qureshi
Well. Depends on what logic you want to implement using your JavaScript. If
it pertains to display logic I think there is no harm in using JS. But if it
also specifies rules (like which node can go uder which tree and so on) then
I guess you have a point and need to re-assess the maintainability of the
app in case og Business Rule changes.

Affan

- Original Message -
From: "Jonathan Holloway" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Thursday, November 28, 2002 2:11 PM
Subject: RE: Complicated Web Interfaces?


> Ok fair enough but surely the issue of embedding all this javascript
> In my html is reversing the whole embedding presentation logic within
> business logic?  Surely  embedding javascript in a JSP is just as bad
> as embedding scriptlets in a JSP?  Or am I missing the point here
> somewhere :) ?
>
> Jonathan Holloway.
>
> -Original Message-
> From: Affan Qureshi [mailto:[EMAIL PROTECTED]]
> Sent: 28 November 2002 03:31
> To: Struts Users Mailing List
> Subject: Re: Complicated Web Interfaces?
>
> My comment between lines.
>
> > Say I want to display two lists of objects and swap lists in and out
> of
> > these two
> > lists as required.
> >
> > List A   -->   List B
> > Object A  Object C
> > Object B
> >
> > e.g. Move object B to List B
> >
> > I also want to add/remove objects as required to these lists.  Is this
> > possible in
> > Struts.  I've looked at the struts-layout library on
> > http://struts-application-servers.com/
> > but it look sto be buggy.  Has anbody actually had any success with
> > this?
>
> This is shown in Tiles portal example. Works pretty well for simple
> purposes. Look at the place where you can add, delete, change tiles in
> the
> portal setup. You dont have to use tables like struts-layout. You can
> use
> some HTML select lists and some simple JS to manipulate them.
>
> > I also want to be able to display a tree component to a user and allow
> > the user to
> > manipulate the tree by adding or removing nodes to the tree.  Is this
> > possible with
> > any of the struts user interface components or will I have to use an
> > applet or a
> > sophiticated javascript tree to achieve this.  If so how do I
> integrate
> > it with Struts?
>
> Struts is just another Web application and runs servlets and JSPs. You
> need
> to come up with your own way to intergrate your stuff (JavaScript,
> Applets)
> with it. Struts does not provide you with an IDE. It provides you with a
> framwork to make your work easy.
>
> > I've also looked at the monkey-struts example as well but that seems
> to
> > lack the
> > creation of objects in these lists, which doesn't look to be a problem
> > to implement
> > but that might be an oversight on my part : ) please let me know if
> I'm
> > wrong.
> >
>
> KB-Monkey-example uses a fixed object model (i.e it knows what fields
> are
> there in each object). However I think if you want the tree to be
> dynamic
> you can use the same technique with your own object model (which seems
> to be
> dynamic in content). The key to adding and deleting the nodes is the way
> the
> button clicks of "Add" and "Delete" are handled in a nested environment.
> Nested tags enable you to remember the context of added and deleted
> objects/nodes. You can use Map-backed properties for dynamic
> form-fields.
>
> But one issue with the monkey example is that it refreshes the page if I
> want to add/delete an object/node. Wouldn't it be more efficient to use
> JavaScript for the purpose? I mean why resend the request back to the
> server
> if you only want to add "blank" fields? If anybody has accomplished this
> I
> would be glad to know.
>
> > I know there's a lot of questions abou the above and I'm still
> pondering
> > them as well
> > myself but I just wanted to know whether it is possible to do this in
> > Struts at present.
> > From what I can see it is possible to create simple web based
> > applications using
> > Struts but I haven't come across any really complicated web interfaces
> > yet using
> > Struts, has anybody got any ideas on this or any examples of web
> > applications that
> > are a little more compicated.
>
> > Many thanks,
> > Jon Holloway.
> >
>
> If you find any such resource please let us know.
>
> Regards,
>
> Affan
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Quick Question: rtexprvalue for onclick event in

2002-11-27 Thread Affan Qureshi
I want to use a nested bean property in the onclick attribute of the
nested:submit. Since i cannot refer to bean properties in onClick
attributes, I declared a pageContext variable using nested:define. Then I
used that variable in the onclick attribute.

I want to accomplish this:
', this.form)">
Add Params


But I get te following error:
[ServletException in:/webpages/editSpecs.jsp]
/webpages/editSpecs.jsp(58,176) jsp.error.attribute.noequal'

I think i cannot give both a <%= %> and a String in the attribute value as I
have done above. But if I remove the String so that my code becomes:
onclick="<%= (String)pageContext.getAttribute("attributeId")%>", it woks
correctly. Is there a work around for this?
Thanks


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Complicated Web Interfaces?

2002-11-27 Thread Affan Qureshi
My comment between lines.

> Say I want to display two lists of objects and swap lists in and out of
> these two
> lists as required.
>
> List A   -->   List B
> Object A  Object C
> Object B
>
> e.g. Move object B to List B
>
> I also want to add/remove objects as required to these lists.  Is this
> possible in
> Struts.  I've looked at the struts-layout library on
> http://struts-application-servers.com/
> but it look sto be buggy.  Has anbody actually had any success with
> this?

This is shown in Tiles portal example. Works pretty well for simple
purposes. Look at the place where you can add, delete, change tiles in the
portal setup. You dont have to use tables like struts-layout. You can use
some HTML select lists and some simple JS to manipulate them.

> I also want to be able to display a tree component to a user and allow
> the user to
> manipulate the tree by adding or removing nodes to the tree.  Is this
> possible with
> any of the struts user interface components or will I have to use an
> applet or a
> sophiticated javascript tree to achieve this.  If so how do I integrate
> it with Struts?

Struts is just another Web application and runs servlets and JSPs. You need
to come up with your own way to intergrate your stuff (JavaScript, Applets)
with it. Struts does not provide you with an IDE. It provides you with a
framwork to make your work easy.

> I've also looked at the monkey-struts example as well but that seems to
> lack the
> creation of objects in these lists, which doesn't look to be a problem
> to implement
> but that might be an oversight on my part : ) please let me know if I'm
> wrong.
>

KB-Monkey-example uses a fixed object model (i.e it knows what fields are
there in each object). However I think if you want the tree to be dynamic
you can use the same technique with your own object model (which seems to be
dynamic in content). The key to adding and deleting the nodes is the way the
button clicks of "Add" and "Delete" are handled in a nested environment.
Nested tags enable you to remember the context of added and deleted
objects/nodes. You can use Map-backed properties for dynamic form-fields.

But one issue with the monkey example is that it refreshes the page if I
want to add/delete an object/node. Wouldn't it be more efficient to use
JavaScript for the purpose? I mean why resend the request back to the server
if you only want to add "blank" fields? If anybody has accomplished this I
would be glad to know.

> I know there's a lot of questions abou the above and I'm still pondering
> them as well
> myself but I just wanted to know whether it is possible to do this in
> Struts at present.
> From what I can see it is possible to create simple web based
> applications using
> Struts but I haven't come across any really complicated web interfaces
> yet using
> Struts, has anybody got any ideas on this or any examples of web
> applications that
> are a little more compicated.

> Many thanks,
> Jon Holloway.
>

If you find any such resource please let us know.

Regards,

Affan


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




forwarding to Actions expecting ActionForm

2002-11-26 Thread Affan Qureshi
I want to forward the request from my Action to another action which expects an 
ActionForm instance for processing. But my current Action does not have access to that 
Form. Can I instantiate an ActionForm and store it in the request/session scope on the 
fly? 

I have a search page which displays results from where I can view details of the 
results. On the details page if I click "Cancel" I want the user to come back on the 
Search Results page but with the same results opened. 

Also if the user clicks on Search Tab from anywhere in the app I want the specific 
(last) search results displayed.

Any ideas? Thanks a lot.



Re: help needed with DynaActionForm

2002-11-14 Thread Affan Qureshi
I want to accomplish dynamic property defs by specifying properties in a
DynaActionForm from a database value. Not only define values for the
attributes but also define the attributes themselves. Is this possible?

I define a property in EditProductsAction by using
DynaActionForm dynaFrom = new DynaActionForm();
dynaFrom.set(propertyNameFromDB, new Integer(55));
and in the JSP i try to refer to this as:

I get the NullPointerException whose stack trace is given below. It is
occuring inside DynaActionForm.java on the call to getDynaClass()

protected DynaProperty getDynaProperty(String name) {

DynaProperty descriptor = getDynaClass().getDynaProperty(name);
/* Here */

}

Can anyone help me on what I am doing wrong?
Also what is the difference in the "key" and "name" of the form property?
Which method should I use in this case?

Thanks a lot.

Exception Stack Trace:

- Root Cause -
java.lang.NullPointerException
at
org.apache.struts.action.DynaActionForm.getDynaProperty(DynaActionForm.java:
551)
at
org.apache.struts.action.DynaActionForm.set(DynaActionForm.java:365)
at
com.etilize.cms.web.actions.EditProductSpecsAction.execute(Unknown Source)
at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProces
sor.java:446)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:266)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1292)
at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)

> You can auto-initialize primitives (and things like that) by using the
> "initial" attribute on the  element.  But initializing a
> property that is an object requires an *instance* of that object to be
> available.  It's not appropriate for a general purpose framework to just
> go and try to create such things, and hope that it's OK.
>
> A couple of strategies to consider:
>
> * Create the form bean in a separate Action that can pre-initialize
>   all of the necessary properties for you.  This will often be the
>   best course of action when you are creating edit forms for modifying
>   existing database data.
>
> * Create a custom subclass of DynaActionForm with a reset() method
>   that, among other things, instantiates your credit card object
>   and stores it:
>
> put("creditCard", new my.package.CreditCard()");
>
>   Struts calls the reset() method for you when *it* creates the form
>   bean instance.  If you create one yourself, you'll need to remember
>   to call this method.
>
>
> Craig




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: An example of dynabean !

2002-11-14 Thread Affan Qureshi
I guess i can do this by overriding the processPopulate() method of
RequestDispatcher.But the problem is that I want this to take place in only
a special case when my form is a dynamic one. Otherwise I want to use the
default functionality. A request attribute can help but that would be a bit
patchy.

- Original Message -
From: "Affan Qureshi" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, November 14, 2002 8:51 AM
Subject: Re: An example of dynabean !


> I want to build dynamic HTML forms whose fields are dependent on the data
> from the Model. Is there a way I can specify the Dynabean properties at
> runtime in action/request processor or somewhere?
>
> I used to do this by using a naming convention on control names (e.g
fld_<%=
> propertyName%>) but there is no Struts here. I mean I can't benefit from
the
> ActionForm framework that Struts provides. Has anybody accomplished this
> before using Struts?
>
> Thanks.
> Affan Q.
> - Original Message -
> From: "Huynh Ngoc Huy" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, November 14, 2002 7:38 AM
> Subject: An example of dynabean !
>
>
> >   Dear group,
> >   After extract the zip file, you must copy all libs
> > of struts-1.1b2 (struts.jar, commons-*.jar) into the
> > lib directory of the example.
> >   Regard,
> >   Huy
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:struts-user-unsubscribe@;jakarta.apache.org>
> For additional commands, e-mail:
<mailto:struts-user-help@;jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>




Re: An example of dynabean !

2002-11-13 Thread Affan Qureshi
I want to build dynamic HTML forms whose fields are dependent on the data
from the Model. Is there a way I can specify the Dynabean properties at
runtime in action/request processor or somewhere?

I used to do this by using a naming convention on control names (e.g fld_<%=
propertyName%>) but there is no Struts here. I mean I can't benefit from the
ActionForm framework that Struts provides. Has anybody accomplished this
before using Struts?

Thanks.
Affan Q.
- Original Message -
From: "Huynh Ngoc Huy" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, November 14, 2002 7:38 AM
Subject: An example of dynabean !


>   Dear group,
>   After extract the zip file, you must copy all libs
> of struts-1.1b2 (struts.jar, commons-*.jar) into the
> lib directory of the example.
>   Regard,
>   Huy



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: logic tags

2002-11-06 Thread Affan Qureshi
Try JSTL as well.

- Original Message -
From: "Mohan Radhakrishnan" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Wednesday, November 06, 2002 1:46 PM
Subject: logic tags


> Hi,
>  Our requirement is this. Based on the report chosen from the menu, we
> have to show parameters. Parameters vary with the report chosen.
>
> We have html:options tags to display the parameters. Are logic tags
the
> best approach to introduce if/else
> logic inside the JSP to decide which parameters to show? Is there a better
> approach ?
> bye,
> Mohan
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: [TILES] Dynamically overriding Tiles Definitions

2002-11-05 Thread Affan Qureshi
Thanks. I got the attributes form the Tiles Context but only on the JSP that
had a . Can I somehow make the Tiles Definition session
scoped? Also in case of nested Tiles, will there be multiple Tile Contexts?

Affan
- Original Message -
From: "Cedric Dumoulin" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, November 05, 2002 9:11 PM
Subject: Re: [TILES] Dynamically overriding Tiles Definitions


>
>   Hi,
>
>   Where is declared your action ? To be able to retrieve the tiles
> context, there should be a tiles context. There is a tiles context only
> if you insert an Tiles, or do a forward from an action to a definition.
> In this later case, the context is created after the action.
>
>   Cedric
>
> Affan Qureshi wrote:
>
> >I want to modify the Attributes in a tiles Definition from my Action
> >classes. Is this possible? I have tried the following code inside the
Action
> >class but do not get an Attribute against the name, instead I get a null.
> >
> >ComponentContext context = ComponentContext.getContext(request);
> >java.util.List list =
(java.util.List)context.getAttribute("tabList");
> >
> >Is it because it is request scoped? Can i make it session-scoped? Also I
get
> >an empty iterator when I try to traverse the list of attributes in the
Tiles
> >Context.
> >
> >Iterator iter = context.getAttributeNames();
> >System.out.println(iter.next())
> >System.out.print("Printing Attrbutes:");
> >while(iter.hasNext())
> >    {
> >System.out.println("Attribute"+ ((String)iter.next()));
> >}
> >
> >My tiles definition is given below. Thanks a lot.
> >
> >- Original Message -
> >From: "Affan Qureshi" <[EMAIL PROTECTED]>
> >To: "struts-user" <[EMAIL PROTECTED]>
> >Sent: Tuesday, November 05, 2002 1:26 PM
> >Subject: Nested layouts (Panels inside Tabs)
> >
> >
> >
> >
> >
> >>I have a Tabs Layout setup and inside a tab I have another layout with
two
> >>panels(menu and content). This is my definition:
> >>
> >>
> >> 
> >> dfs
> >> s
> >> 
> >> 
> >>  >>classtype="org.apache.struts.tiles.beans.SimpleMenuItem" />
> >>  >>classtype="org.apache.struts.tiles.beans.SimpleMenuItem" />
> >>  >>classtype="org.apache.struts.tiles.beans.SimpleMenuItem" />
> >> 
> >>
> >>
> >>The link to "Template" i.e the template.jsp file follows a simple
layout:
> >>
> >>
> >>
> >>
> >>
> >>
> >>The problem is that when I click on any link inside one of the panels in
> >>templateTile.jsp or any other file, it breaks out of the Tabular layout
> >>
> >>
> >and
> >
> >
> >>displays it as just two panels. This problem can be reproduced if you
run
> >>the tiles-documentation example and go to
> >>http://localhost:8080/tiles-documentation/examples/tabs.jsp. Now here if
> >>
> >>
> >you
> >
> >
> >>click on any link in the menu the page will open outside the tab layout.
> >>
> >>The hyperlinks in my "Menu" panel point to Action classes. I am
forwarding
> >>requests from the Action classes to Tiles Definitions.
> >>
> >>What should I do to tackle this problem?
> >>
> >>Also can anyone guide me to a resource for Nested Tabs?
> >>
> >>Thanks for your time.
> >>
> >>
> >
> >
> >--
> >To unsubscribe, e-mail:
<mailto:struts-user-unsubscribe@;jakarta.apache.org>
> >For additional commands, e-mail:
<mailto:struts-user-help@;jakarta.apache.org>
> >
> >
> >
> >
>
>
> --
> To unsubscribe, e-mail:
<mailto:struts-user-unsubscribe@;jakarta.apache.org>
> For additional commands, e-mail:
<mailto:struts-user-help@;jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>




Re: [TILES] Dynamically overriding Tiles Definitions

2002-11-05 Thread Affan Qureshi
I want to modify the Attributes in a tiles Definition from my Action
classes. Is this possible? I have tried the following code inside the Action
class but do not get an Attribute against the name, instead I get a null.

ComponentContext context = ComponentContext.getContext(request);
java.util.List list = (java.util.List)context.getAttribute("tabList");

Is it because it is request scoped? Can i make it session-scoped? Also I get
an empty iterator when I try to traverse the list of attributes in the Tiles
Context.

Iterator iter = context.getAttributeNames();
System.out.println(iter.next())
System.out.print("Printing Attrbutes:");
while(iter.hasNext())
{
System.out.println("Attribute"+ ((String)iter.next()));
}

My tiles definition is given below. Thanks a lot.

- Original Message -
From: "Affan Qureshi" <[EMAIL PROTECTED]>
To: "struts-user" <[EMAIL PROTECTED]>
Sent: Tuesday, November 05, 2002 1:26 PM
Subject: Nested layouts (Panels inside Tabs)



> I have a Tabs Layout setup and inside a tab I have another layout with two
> panels(menu and content). This is my definition:
>
> 
>  
>  dfs
>  s
>  
>  
>   classtype="org.apache.struts.tiles.beans.SimpleMenuItem" />
>   classtype="org.apache.struts.tiles.beans.SimpleMenuItem" />
>   classtype="org.apache.struts.tiles.beans.SimpleMenuItem" />
>  
> 
>
> The link to "Template" i.e the template.jsp file follows a simple layout:
>
> 
> 
> 
> 
>
> The problem is that when I click on any link inside one of the panels in
> templateTile.jsp or any other file, it breaks out of the Tabular layout
and
> displays it as just two panels. This problem can be reproduced if you run
> the tiles-documentation example and go to
> http://localhost:8080/tiles-documentation/examples/tabs.jsp. Now here if
you
> click on any link in the menu the page will open outside the tab layout.
>
> The hyperlinks in my "Menu" panel point to Action classes. I am forwarding
> requests from the Action classes to Tiles Definitions.
>
> What should I do to tackle this problem?
>
> Also can anyone guide me to a resource for Nested Tabs?
>
> Thanks for your time.


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>




Nested layouts (Panels inside Tabs)

2002-11-05 Thread Affan Qureshi
I have a Tabs Layout setup and inside a tab I have another layout with two
panels(menu and content). This is my definition:


 
 dfs
 s
 
 
 
 
 
 


The link to "Template" i.e the template.jsp file follows a simple layout:






The problem is that when I click on any link inside one of the panels in
templateTile.jsp or any other file, it breaks out of the Tabular layout and
displays it as just two panels. This problem can be reproduced if you run
the tiles-documentation example and go to
http://localhost:8080/tiles-documentation/examples/tabs.jsp. Now here if you
click on any link in the menu the page will open outside the tab layout.

The hyperlinks in my "Menu" panel point to Action classes. I am forwarding
requests from the Action classes to Tiles Definitions.

What should I do to tackle this problem?

Also can anyone guide me to a resource for Nested Tabs?

Thanks for your time.

Affan
[EMAIL PROTECTED]


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




How to get the tiles-def.xml (and struts-config.xml) reloaded w/out restarting

2002-11-04 Thread Affan Qureshi
If you reload the application only (using Tomcat Webapp Manager) I think you
won't have to restart the server but just reolad the app.

However can I reload it without even restarting/reloading the Application?

I would also like to know how can we reload struts-config.xml without
restarting the server or even reloading the app.

Thanks

- Original Message -
From: "Zsolt Koppany" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, November 04, 2002 5:07 PM
Subject: How to get the tiles-def.xml reloaded without starting the
serveragain?


Hi,

how can I get tiles-def.xml reload after I changed tiles-def.xml and don't
want to restart tomcat?

Zsolt

--
To unsubscribe, e-mail:

For additional commands, e-mail:




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Actions and Sessions

2002-10-31 Thread Affan Qureshi
Why dont you do:
request.getSession(true).setAttribute(PROFILE_KEY,profile) in the Action
object itself.

- Original Message -
From: "Bruce Van Horn" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, November 01, 2002 3:38 AM
Subject: Actions and Sessions


> What is the most efficient way to place information coming to a JSP from
an
> Action into a session object?
>
> I have an action that reads a database for user profile information.  It
> needs to be flexible enough such that changes to the data model don't
> require code changes in the Action.  This has been achieved -- the Action
> dynamically writes whatever comes back from the query.
>
> I can put these dynamic properties into the JSP with setAttributes() and
get
> them out on the other side, but I'd like to immediately store them in a
> session so the user's profile will be available for the entire session.
>
> The obvious approach is to create code in the JSP to create the session
and
> store the info.  However I want to utilize a frame for sidebar navigation,
> and since I include access permissions in the profile, I need all pages in
> the frames to have access to the profile info on page load.  This means I
> would have to code an intermediate page that loads the session data then
> forwards to the frames, which seems kludgy to me.
>
> Any ideas are greatly appreciated!  Thanks!
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




TLD not found

2002-10-31 Thread Affan Qureshi
I get the following error when running the JSP in tomcat 4.1.12 on W2k

org.apache.jasper.JasperException: null(-1,-1) File "/struts-layout" not
found.. (and the rest of the stack trace)

In web.xml I have

/struts-bean
/WEB-INF/tld/struts-bean.tld
  


On top of JSP I have
<%@ taglib uri="/struts-bean" prefix="bean" %>

However it worksfine if i give a full path in the JSP as
<%@ taglib uri="/WEB-INF/tld/struts-bean.tld" prefix="bean" %>

But according to TagLib Specs the first one is also valid. Or is it not?



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Basic question

2002-10-31 Thread Affan Qureshi
But this is
if(true){/* do somethig*/  }

if(false) {/* do something else */}

not
if(true)
{/*do something*/ }
else
{/*do something else*/}

Or is it?

- Original Message -
From: "Marcus Biel" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, October 31, 2002 6:05 PM
Subject: Re: Basic  question


> if: 
> else: 
>
> marcus
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Basic question

2002-10-31 Thread Affan Qureshi
I guess i can do:






for
if((request.getParameter("ext")!=null)||(request.getParameter("ext").equals(
"0")))
but still I can't figure out the "else" clause. I dont want to insert
another set of  and  tags with inverse
conditions cause that will introduce another "if" instead of the "else"
clause.

- Original Message -
From: "Affan Qureshi" <[EMAIL PROTECTED]>
To: "struts-user" <[EMAIL PROTECTED]>
Sent: Thursday, October 31, 2002 5:20 PM
Subject: Basic  question


> A rather basic question.
> I want to accomplish in my JSP:
>
>
if((request.getParameter("ext")!=null)||(request.getParameter("ext").equals(
> "0")))
> {
> /* do Something */
> }
> else
> {
> /* do Something else */
> }
>
> Using the  tag I write
>
> 
>
>
> 
> 
>
>
> 
>
> But first this is not an "else" equivalent and secondly it does not
account
> for "null" if the parameter is not found in request.
> What is the solution?
>
> Thanks for your time on this silly question.
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:struts-user-unsubscribe@;jakarta.apache.org>
> For additional commands, e-mail:
<mailto:struts-user-help@;jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>




Basic question

2002-10-31 Thread Affan Qureshi
A rather basic question.
I want to accomplish in my JSP:

if((request.getParameter("ext")!=null)||(request.getParameter("ext").equals(
"0")))
{
/* do Something */
}
else
{
/* do Something else */
}

Using the  tag I write










But first this is not an "else" equivalent and secondly it does not account
for "null" if the parameter is not found in request.
What is the solution?

Thanks for your time on this silly question.



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: back button

2002-10-30 Thread Affan Qureshi
You can disable the back button by using JavaScript history.forward() at the
top of your page. But i dont know if that solves your problem.

- Original Message -
From: "Gus Delgado" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, October 30, 2002 6:38 PM
Subject: back button


> I have a JSP that has a sequence of actions.  First one is "validate"
> which will validate some IO File and the next one is "load" to load the
> file.
>
> When the user hits "validate" it sends a request to the back-end to do
> some validation and I get back a response.  When I hit Load it sends a
> request to the back-end to persist that file.
>
> the Load button depends on the validation button.  When click validate
> and get an ok response, load shows.
>
> The problem is the back button on the browser, the file is already
> validated but if I hit the back button the ui and the back-end are our
> of sync I can validate again.
>
> Any one run into this problem? how can it be handlel?  thanks.
>
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




package not found Error

2002-10-29 Thread Affan Qureshi
A strange error keeps persisting when I am using any  tag in
my JSP running in Tomcat 4.1. It doesnt seem to be ableto find the
Struts-Layout classes although I have placed the Struts-Layout.jar in the
lib directory and defined and placed the TLDs at the proper places.

 It says:

org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: -1 in the jsp file: null

Generated servlet error:
[javac] Compiling 1 source file
C:\tomcat\work\Standalone\localhost\_\webpages\viewCategory_jsp.java:152:
package fr.improve.struts.taglib.layout.treeview does not exist
fr.improve.struts.taglib.layout.treeview.TreeViewTag
_jspx_th_layout_treeview_0 =
(fr.improve.struts.taglib.layout.treeview.TreeViewTag)
_jspx_tagPool_layout_treeview_name.get(fr.improve.struts.taglib.layout.treev
iew.TreeViewTag.class);
^
C:\tomcat\work\Standalone\localhost\_\webpages\viewCategory_jsp.java:152:
package fr.improve.struts.taglib.layout.treeview does not exist
fr.improve.struts.taglib.layout.treeview.TreeViewTag
_jspx_th_layout_treeview_0 =
(fr.improve.struts.taglib.layout.treeview.TreeViewTag)
_jspx_tagPool_layout_treeview_name.get(fr.improve.struts.taglib.layout.treev
iew.TreeViewTag.class);

^
C:\tomcat\work\Standalone\localhost\_\webpages\viewCategory_jsp.java:152:
package fr.improve.struts.taglib.layout.treeview does not exist
fr.improve.struts.taglib.layout.treeview.TreeViewTag
_jspx_th_layout_treeview_0 =
(fr.improve.struts.taglib.layout.treeview.TreeViewTag)
_jspx_tagPool_layout_treeview_name.get(fr.improve.struts.taglib.layout.treev
iew.TreeViewTag.class);

^
3 errors

Any help would be appreciated. Thanks a lot.

Affan


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: parameter in session

2002-10-28 Thread Affan Qureshi
I think placing the Form Bean in the session scope will help.
/* A
- Original Message -
From: "Marcus Biel" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, October 28, 2002 4:57 PM
Subject: parameter in session


> Hi,
>
> I got an select box, where you can select a value. When you hit submit,
> you get displayed a list of data records that fit to that value.
> But the selected value should get stored for the whole session,
> so if you hit on "edit" or "delete" that you directly get displayed the
> table,
> wihout selecting the value another time.
>
>
> At the moment I got something like this:
>
> 
> 
> 
>  
> 
> 
> 
> 
> 
> data record
> Edit
> 
> 
> (The real page is much more complicated, but this should do it to
> understand the problem faster)
>
> So when I hit edit, I want to be able to edit the data record on the
> same page. Therefore when backwarding to this page,
> the table directly needs to get shown, without to hit on the submit
> button.
>
> Got me ?
>
>
> If you understan what I mean, help would be appreciated.
>
> thanks in advance,
>
> marcus
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: generating serial no

2002-10-28 Thread Affan Qureshi
I guess u can make a simple Bean that increments an instance variable on
each read.

/* A
- Original Message -
From: "Amit Badheka" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, October 28, 2002 1:40 PM
Subject: generating serial no


Is there any tag available in struts to generate serial no ?

AB.






--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: static pages

2002-10-26 Thread Affan Qureshi
Also document management, change management, rights/access management is
easier
- Original Message -
From: "Jacob Hookom" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Friday, October 25, 2002 11:19 PM
Subject: RE: static pages


> You can setup a filter according to the new Servlet Spec to restrict
> access to static content via Role management (SEE TOMCAT MANUAL).  But
> as for Struts specifically, I'm not completely sure.
>
> | -Original Message-
> | From: Beast [mailto:beast@;setuid.com]
> | Sent: Saturday, October 26, 2002 1:09 PM
> | To: Struts Users Mailing List
> | Subject: static pages
> |
> | Hello,
> |
> | Just examine the struts-example, Is it advisable using struts to
> handle
> | static pages also? what is the advantage?
> | Tks.
> |
> |
> | --
> | To unsubscribe, e-mail:    | [EMAIL PROTECTED]>
> | For additional commands, e-mail:  | [EMAIL PROTECTED]>
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Open an other window for information

2002-10-25 Thread Affan Qureshi
Use JavaScript: window.open() method which takes in URL among other options.

- Original Message -
From: "Heligon Sandra" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Friday, October 25, 2002 12:11 AM
Subject: RE: Open an other window for information


> Yes, it is not linked to the help command only.
> My problem is that I would like to know the command to open a
> new InternetExplorer window.
> Do you understand my question ?
>
> Sandra
>
> -Original Message-
> From: James Mitchell [mailto:jmitchtx@;telocity.com]
> Sent: 24 October 2002 22:37
> To: Struts Users Mailing List
> Subject: RE: Open an other window for information
>
>
> Sorry for not getting back sooner.
>
> Based on your response, I don't understand your correlation to "Help
> Menu".you really just need help opening a new window.  Is this
correct?
>
>
> James Mitchell
> Software Engineer/Struts Evangelist
> http://www.open-tools.org
>
> "Only two things are infinite, the universe and human stupidity, and I'm
not
> sure about the former."
> - Albert Einstein (1879-1955)
>
>
> > -Original Message-
> > From: Heligon Sandra [mailto:sandra.heligon@;nextream.fr]
> > Sent: Thursday, October 24, 2002 3:28 AM
> > To: 'Struts Users Mailing List'
> > Subject: RE: Open an other window for information
> >
> >
> > Not exactly, on my JSP page I have a menu bar with a Help menu,
> > for example
> >
> >
> > <><...> 
> >
> > 
> >
> > 
> >
> > I would like to open a new InternetExplorer window
> > when the user click on the Help item (command of the menu).
> > In this new window I will display information about version
> > of the application.
> >
> > Sandra
> >
> > -Original Message-
> > From: James Mitchell [mailto:jmitchtx@;telocity.com]
> > Sent: 23 October 2002 21:45
> > To: Struts Users Mailing List
> > Subject: RE: Open an other window for information
> >
> >
> > Are you talking about overriding the F1 key to open a window to your
help
> > docs?
> >
> > James Mitchell
> > Software Engineer/Struts Evangelist
> > http://www.open-tools.org
> >
> > "Only two things are infinite, the universe and human stupidity,
> > and I'm not
> > sure about the former."
> > - Albert Einstein (1879-1955)
> >
> >
> > > -Original Message-
> > > From: Heligon Sandra [mailto:sandra.heligon@;nextream.fr]
> > > Sent: Wednesday, October 23, 2002 11:25 AM
> > > To: '[EMAIL PROTECTED]'
> > > Subject: Open an other window for information
> > >
> > >
> > >
> > > I have an item "Help" in my menu bar and I would like to
> > > display a second window (other than the current page) to
> > > give information about the application.
> > >
> > > I don't know which command add in the Action associated to
> > > the Help command.
> > >
> > > Thanks
> > > Sandra
> > >
> > > --
> > > To unsubscribe, e-mail:
> > > 
> > > For additional commands, e-mail:
> > > 
> > >
> > >
> >
> >
> > --
> > To unsubscribe, e-mail:
> > 
> > For additional commands, e-mail:
> > 
> >
> > --
> > To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>
>
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Dynamic Forms using XML

2002-10-25 Thread Affan Qureshi
Did you get a reply to this?

I am faced with a similar situation but in my case the information is coming
form a database. I created my Beans which had the properties to specify the
field type. Display Label, ids(name), etc. When I unmarshall my information
from the database I construct a collection of these beans. This colleciton
is passed on to the presentation to the Custom Tags that do the needed
rendering of the HTML fields.

Any comments/suggestions/improvements?

/* A

- Original Message -
From: "Bhamani, Nizar A TL56E" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, October 24, 2002 3:46 PM
Subject: Dynamic Forms using XML


> I have a scenario where, I need to develop Dynamic forms using an XML.
> i.e. the XML will specify what fields (all types of fields) need to be
> displayed
> on what page (i.e. page1, page2, etc). Has anybody out there worked on
> a similar scenario using Struts? Any help/input on this will be greatly
> appreciated.
>
> Thanks,
>
> Nizar Bhamani
>
> 
> CONFIDENTIALITY
> This e-mail and any attachments are confidential and also may be
privileged.
> If you are not the named recipient, or have otherwise received this
> communication in error, please delete it from your inbox, notify the
sender
> immediately, and do not disclose its contents to any other person,
> use them for any purpose, or store or copy them in any medium.
> Thank you for your cooperation.
> 
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: *reset* why is it not being called

2002-10-24 Thread Affan Qureshi
I think you should use JavaScript function for your req. and change teh tye
of the "Reset" button to BUTTON and call a JS function on its click().

- Original Message -
From: "Joe Barefoot" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, October 24, 2002 5:11 PM
Subject: RE: *reset* why is it not being called


If you mean that you are using  or , and
this is the button you are clicking, then there is no request being made to
the server.  The reset button is client-side;  the browser just resets the
form to whatever the values were at the time the form was last submitted.
That's why they "magically" return. :)

The reset() method in your ActionForm is *only* called when you do a submit
to an action URL that uses this ActionForm.  The reset *button* in html
forms doesn't do a submit.  So, if you want your reset() method to be
invoked, you need another mini-form, which only contains a submit button
(you can label it reset, clear, or whatever) and maybe a hidden value or
something to instruct your action to not do anything (i.e., action=reset).
In your action, just check for this value in the form or request, and do
nothing.  The reset method in your form will already have been called.

Note:  Do NOT use another submit button in the same html form as the one
containing your entry fields (use a separate form), as the values they
contain will be submittedand since Struts calls the reset() method
*before* populating your form, the form will still get populated with the
'old' values, negating the effects of your reset logic.


hope this helps,
Joe

> -Original Message-
> From: Anthony Mutiso 2 [mailto:anm1@;utilitynet.net]
> Sent: Thursday, October 24, 2002 4:34 PM
> To: '[EMAIL PROTECTED]'
> Subject: *reset* why is it not being called
>
>
> I have a form that on succesful submission loops back to the
> same page but
> more data is displayed at the bottom of the page.
>
> My problem is that the reset button in the form only clears
> the form to the
> data that was in the form after the last submit. So every
> time I submit, if
> I press reset nothing appears to work. If clear the form
> manually and press
> reset, my old values from my last submit magically return.
>
> How to I correct this problem. config looks something like:
>
>type="Test.SearchAction"
>name="searchForm"
>scope="request"
>validate="true"
>input="/search.jsp">
>   
>   
>   
>
>
> and I have a "   "
> in my global
> forwards.
> My form is "".
>
> and my reset function has clears my form, and has log
> messages that I only
> see when the application start. Any pushing of the reset
> button does not
> result in any new log entries.
>
> What gives?
>
> Thanks
>
> Anthony
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>
>

--
To unsubscribe, e-mail:

For additional commands, e-mail:




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: how to set flags in view

2002-10-23 Thread Affan Qureshi
Have you seen struts-layout tags? They have a nice tag to achieve this.
http://struts.application-servers.com/

- Original Message -
From: "Marcus Biel" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, October 23, 2002 1:05 AM
Subject: how to set flags in view


> How to set a flag in your jsp ?
>
> I need one, to alternately display 2 different row colors in a table,
> and one to differ between sort="ascending" or sort="descending".
>
> Any ideas ??
>
> thx in advance,
>
> marcus
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Any Web Development Environments that incorporate Struts?

2002-10-23 Thread Affan Qureshi
Sun's Forte for Java 4.0 has good support for tools like tld's and xml files
but i'm not sure if it actually incorporates Struts.

- Original Message -
From: "Frederic Laub" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, October 23, 2002 12:05 AM
Subject: RE: Any Web Development Environments that incorporate Struts?


> Hi,
>
> Your list would be helpfull I'm starting to design my HTML view
components,
> and I didn't decide yet which Ide I'll use for that.
> Thanks in advance
>
> Frederic
>
> -Original Message-
> From: Haseltine, Celeste [mailto:CHaseltine@;magticket.com]
> Sent: 22 October 2002 21:12
> To: 'Struts Users Mailing List'
> Subject: RE: Any Web Development Environments that incorporate Struts?
>
>
> Out of curiosity, what version of Together are you using?  I've seen the
> product, but the version that was demo'd for us a while back was way to
> expensive for a small shop like ours to afford.
>
> We are using Eclipse 2.0.1 with the Struts plugin and several additional
> plugins for JSP, EJB, XML, and HTML development.  We also have a copy of
> Dreamweaver MX and FlashMX, so on occasion, we will design HTML templates
to
> convert to JSP templates/pages and/or flash graphics inside of the
> Macromedia Suite.  Although Dreamweaver MX does support JSP development,
> it's not that great of a JSP development environment.  We prefer to stick
> with Eclipse 2.0.1 unless we need to create or tweak a very "involved" JSP
> that was derived from an HTML template.
>
> If you need a list of plugins and the web links to find them for Eclipse,
> let me know.  Eclipse is free, and so are all the plugins we are using.
>
> Celeste Haseltine, PE
> MTL, Inc
> Dallas, TX
>
> -Original Message-
> From: McLure, David [mailto:David.McLure@;fmr.com]
> Sent: Tuesday, October 22, 2002 12:57 PM
> To: '[EMAIL PROTECTED]'; 'Steven Headley'
> Cc: '[EMAIL PROTECTED]'
> Subject: RE: Any Web Development Environments that incorporate Struts?
>
>
> I use Together by TogetherSoft.  You can download a free evaluation copy
at
> http://www.togethersoft.com.  I have been using Together to design, as
well
> as compile, debug, test, and deploy (to it's own bundled Tomcat instance)
> Struts-based web applications for nearly a year now.  We use the product
at
> work at Fidelity Investments, and I like it so much, I use it as my own
> personal development tool at home as well.
>
> Not only is Togethersoft an awesome product, but the company has an
> excellent staff.  One TogetherSoft support rep named James Banks assembled
> an on-line tutorial on how to setup Together to build and deploy the
Struts
> example web application.  I have been tweaking it fixing a few bugs and
> adding a workaround or two and I have posted the current tutorial on my
web
> site: http://www.mclures.net (just click on the "Struts Info" link, or
type
> in the full URL of
>
http://www.mclures.net/java/struts/Together/Getting_Started_with_Struts_and_
> Together.html).
>
> Enjoy!
>
> Dave McLure
> Internet Technology Group
> Fidelity e-Business (FeB) Company
> Fidelity Investments
> [508-35]7-5226
> [EMAIL PROTECTED]
> pager: (800)759- pin:1257875
>
>
>
> -Original Message-
> From: Steven Headley [mailto:sheadley@;swbell.net]
> Sent: Tuesday, October 22, 2002 9:46 AM
> To: [EMAIL PROTECTED]
> Subject: Any Web Development Environments that incorporate Struts?
>
>
> Hello All,
> I have started a web development project and want to incorporate
struts
> into the plan. I want to be able to use MVC to separate the programmers
from
> the web designers. Are their any packages avaiable that will allow the
> designers the ability to manipulate screens like coldfusion, dreamweaver,
> etc which incorporate struts? Curently My designers must work with the
html
> to move struts code to around. What alternative do I have?
>
>
>
> Steven H.
>
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>
>
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Tiles vs Template Tags

2002-10-22 Thread Affan Qureshi
I want the layout of my application in such a way that if I want to change it I have 
to make changes in a minimum number of places. What should I use Tiles or Template 
Tags? Can someone highlight the difference between the two?

Also when iterating a collection i want to check whether a value is null or not. 
Should I use  tag? Or how else?

Thanks a lot.



Re: Duplication of code in Business objects and Action forms

2002-10-22 Thread Affan Qureshi
Do you intend to pass the Data Object back and forth between the
presentation layer and the Business layer? I thought it would be a nice idea
to pass only the view of the data in/out of the Business layer and the
presentation layer.

I would go more for what Ronald specified.

- Original Message -
From: "Rajesh Kanade" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Tuesday, October 22, 2002 3:25 AM
Subject: RE: Duplication of code in Business objects and Action forms


> Thanx Ronald for the reply.
>
> One solution which I have thought of is
>
> I have a data object let's say called UserData which has all the
> instance variables and getter/setter methods.
>
> Now both User Form and User Business object have a instance variable of
> this UserData object which they use.
> This way if my data is changing I just have to change it at one place
> i.e. my UserData class.
>
> Are we both essentially talking the same thing ??
>
> Thanx
>
> Rajesh
>
> -Original Message-
> From: Ronald Rotteveel [mailto:r.p.rotteveel@;its.tudelft.nl]
> Sent: Tuesday, October 22, 2002 3:44 PM
> To: Struts Users Mailing List
> Subject: Re: Duplication of code in Business objects and Action forms
>
>
> I'm not using Struts for a very long time now, but I think this is NOT
> the way to do this.
>
> In your ActionForm bean called User I would put the getter/setter
> methods. In your UserBO (User Business Object) I would put the methods
> that make use of the UserDAO (User Data Access Object). The UserBO is
> only for handling the business logic in your form/application. The
> UserDAO actually executes the real SQL queries or XML update functions.
>
> So, User extends ActionForm and is really a simple mapping of your form
> in your application.
>
> In your Action class (belonging to this User form) you map the User bean
> and give it as an argument with any function of your UserBO object which
> will execute the desired action (update/create/delete etc.).
>
> Hope I helped you a bit. Maybe other people have better solutions, but
> this is the way I handle actions...
>
> Good luck
>
> Regards,
>
> Ronald
>
>
> - Original Message -
> From: "Rajesh Kanade" <[EMAIL PROTECTED]>
> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> Sent: Tuesday, October 22, 2002 9:00 AM
> Subject: Duplication of code in Business objects and Action forms
>
>
> > Hi All
> >
> > I am new to Struts so please bear with me.
> >
> > We have started implementing a new  product using struts.
> >
> > Now I do see that I need to have getter /setter methods declared on
> > both
> my
> > business objects as well as Action form.
> > So for e.g if I had a User business object which encapsulates the
> > entire business login for my system user. Now I will have UserForm
> > class also which will have all the getter/setter methods of ny User
> > Object so as to faciliate the CRUD operation from the browser.
> >
> >
> > If something changes I need to go and change it in both the places.
> >
> > Is there any way to over come this problem.
> >
> > Any help would be greatly appreciated.
> >
> > Rajesh Kanade
> >
> >
>
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Bean Utils - Help needed

2002-10-22 Thread Affan Qureshi

The org.apache.commons.beanutils package contains several classes that are
used throughout the Struts framework. From the standpoint of the Struts
framework, the two most important are the BeanUtils and PropertyUtils
classes.

As you might have guessed, the BeanUtils class is used with JavaBeans. The
Struts components primarily use just three of the methods in the BeanUtils
class:

· populate()

· getProperty()

· getArrayProperty()

The populate() method is used to fill a JavaBean with data, using a map of
key/value pairs. The method signature for the populate() method is shown
here.

public static void populate( Object bean, Map properties )

  throws IllegalAccessException, InvocationTargetException;

The getProperty() method returns a String representation of the property
stored in the variable with the name that matches the value of the name
parameter.

public static String getProperty( Object bean, String name )

  throws IllegalAccessException, InvocationTargetException,
NoSuchMethodException;

Regardless of the type of property that the name argument references, it
will be converted and returned as a String.

The getArrayProperty() method returns the value of the specified array
property of the specified bean, as a String array. Here is the method
signature for the getArrayProperty() method.

public static [] getArrayProperty(Object bean, String name)

  throws IllegalAccessException, InvocationTargetException,
NoSuchMethodException;

Although the Java language provides reflection and introspection as part of
its core API's, the BeanUtils class provides convenience wrappers around
these API's.

The other class that is used by the Struts framework is that PropertyUtils
class. However, only one method is currently used, the getProperty() method.

public static Object getProperty(Object bean, String name)

  throws IllegalAccessException, InvocationTargetException,
NoSuchMethodException;

The getProperty() method in the PropertyUtils class returns the value of the
specified property, without attempting to convert the type.  Much of the
code that is in the PropertyUtils class was originally implemented in the
BeanUtils class. It was moved to its own class due to the size that
BeanUtils was becoming.

- Original Message -
From: "Podhigai Thendral" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, October 22, 2002 1:04 AM
Subject: Bean Utils - Help needed


> Hi all,
>
> I see a commons-beanutils.jar file that comes with struts. I would
> like to know the functionalities offered by this package. I read
> somewhere that this is the one that helps in auto population of
> the form beans. Is it right ? Please help.
>
> Thanks in advance.
>
> -Thendral
>
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: