RE: How to create on-the-fly javascript code?

2005-09-14 Thread Raghavendra
Hi Dang
try like the following any one, it will work.

1.


 var forward_details=''
function f() {
  return forward_details;
  }


or

2.


function f() {
  return '';
  }









-Original Message-
From: Thai Dang Vu [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 14, 2005 6:29 PM
To: user@struts.apache.org
Subject: How to create on-the-fly javascript code?


Hello,

I want to write something like this in a jsp file


  function f() {
  return ;
  }


but the bean:write tag isn't processed. So how can I make it processed?

Thank you.


-
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: [OT] Copyright for changed code

2005-09-14 Thread Frank W. Zammetti

Hi Michael,

I think section 4 of the Apache License 2.0 answers this pretty well, 
but it doesn't seem to differentiate between large-scale changes and 
trivial little ones, so I would think this applies regardless...



4. Redistribution. You may reproduce and distribute copies of the Work 
or Derivative Works thereof in any medium, with or without 
modifications, and in Source or Object form, provided that You meet the 
following conditions:


  a. You must give any other recipients of the Work or Derivative Works 
a copy of this License; and


  b. You must cause any modified files to carry prominent notices 
stating that You changed the files; and


  c. You must retain, in the Source form of any Derivative Works that 
You distribute, all copyright, patent, trademark, and attribution 
notices from the Source form of the Work, excluding those notices that 
do not pertain to any part of the Derivative Works; and


  d. If the Work includes a "NOTICE" text file as part of its 
distribution, then any Derivative Works that You distribute must include 
a readable copy of the attribution notices contained within such NOTICE 
file, excluding those notices that do not pertain to any part of the 
Derivative Works, in at least one of the following places: within a 
NOTICE text file distributed as part of the Derivative Works; within the 
Source form or documentation, if provided along with the Derivative 
Works; or, within a display generated by the Derivative Works, if and 
wherever such third-party notices normally appear. The contents of the 
NOTICE file are for informational purposes only and do not modify the 
License. You may add Your own attribution notices within Derivative 
Works that You distribute, alongside or as an addendum to the NOTICE 
text from the Work, provided that such additional attribution notices 
cannot be construed as modifying the License.


You may add Your own copyright statement to Your modifications and may 
provide additional or different license terms and conditions for use, 
reproduction, or distribution of Your modifications, or for any such 
Derivative Works as a whole, provided Your use, reproduction, and 
distribution of the Work otherwise complies with the conditions stated 
in this License.



Hope that helps!

Frank

Michael Jouravlev wrote:

If I am rewriting existing code, copyrighted by Apache, should I
change the copyright? ;) Some code is heavily modified, some is just
barely.

Michael.

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







--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com


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



RE: Newbie: html:link with action taken from bean

2005-09-14 Thread Wojciech Ciesielski
Thank you



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



Re: How to replace normal html-from through html:form in Struts? Example

2005-09-14 Thread Kishore Senji
> A tag would be handy for this ...


Indeed there is one, please take a look at 


Re: Problem with Tiles

2005-09-14 Thread Kishore Senji
There are 2 ways of doing it. 
1) Get the "pageheading" in the layout.jsp and pass it on to the header.jsp 







2) If you need the "pageheading" inside the heading.jsp, it's better to make 
the "header" a separate definition and use the "pageheading" directly in the 
header.jsp
























On 9/14/05, Deepesh Nandal <[EMAIL PROTECTED]> wrote:
> 
> Hi There,
> I am stuck at one place while working with tiles, please help.
> I have my tiles-defs.xml as this:
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>  value="/WEB-INF/tiles/user-login.jsp" type="page"/>
> 
> 
> 
> AND /WEB-INF/tiles/layout.jsp as this:
> <%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
> 
>  
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Now, I need to print the variable 'pageheading'( defined in definition 
> '.mainLayout') in "/WEB-INF/tiles/header.jsp" .
> I cannot use  inside 
> "/WEB-INF/tiles/header.jsp" as "pageheading" is valid in
> "/WEB-INF/tiles/layout.jsp" only . So how do I pass "pageheading" from "
> index.page" to header.jsp through .mainLayout ...
> 
> Please help .
> 
> Many Thanks,
> Deepesh Nandal.
> 
>


[OT] Copyright for changed code

2005-09-14 Thread Michael Jouravlev
If I am rewriting existing code, copyrighted by Apache, should I
change the copyright? ;) Some code is heavily modified, some is just
barely.

Michael.

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



Re: How to prevent path shows up at the Address box in the browser, IE and others

2005-09-14 Thread Kishore Senji
Define action aliases to your jsps and use those actions for eg:



and use that in your tiles menu





You can do some processing on the list of items that are read by the tiles 
to include the  as part of the "link" attributes


On 9/13/05, Kam Lung Leung <[EMAIL PROTECTED]> wrote:
> 
> 
> Hi,
> 
> I am working on a project that uses Tiles and Structs.
> I have the following Tiles definition;
> 
>  path="/Infra/WebComponemt/Layouts/menuLayout.jsp" >
> 
> 
> 
>  link="/WebComponemt/Presentation/UsersAdministrationPage.jsp" />
> 
> 
> 
> What can I do to prevent the path of the UsersAdministrationPage.jsp and
> the index.jsp files show up in the Address box of a browser. Would the
> following step help preventing the path of the UsersAdministrationPage.jsp
> to show up?
> 
> 
>  path="/Infra/WebComponemt/Layouts/menuLayout.jsp" >
> 
> 
> 
> 
> 
> 
> 
> Add a Global Forward in the structs-config.xml file like below:
> 
> 
> 
> 
>  path="/WebComponemt/Presentation/UsersAdministrationPage.jsp"/>
> 
> 
> 
> Any suggestion is greatly appreciated.
> Kam Lung Leung
> [EMAIL PROTECTED]
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>


OT: jsessionid connector error

2005-09-14 Thread Zoran Avtarovski
I'm hoping someone here can help me with this.

I'm getting inconsistency on this issue and googling hasn't helped.

I'm running a struts app on OS X with Jrun 4 and Apache 2. When I use
 in the index.jsp file it appends
the jsessionid to it and apache doesn't recognise the file as a jrun file
and returns a 404 error. When I deploy the same app on Linux using the same
version of Jrun and Java it works fine.

The work around I'm using is to use
<%
String redirectURL = "/general/getInfo.do";
response.sendRedirect(redirectURL);
%>

Instead of



Which solves the problem by not URL encoding the link, but if somebody had
cookies disabled it the jsessionid would return and the problem is back
again. 

When searching I've seen a lot of people experiencing the same problem with
apache and jsessionid but no solutions, apart from URL rewriting which I
don't think is any better than what I've got.

Has anybody had any experience with this and if so any pointers.

Zoran 



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



Re: Keeping Session small using Validation

2005-09-14 Thread Kishore Senji
If you only want to use a DynaActionForm, you could use TilesController and 
set the list in the form using BeanUtils.

In you tiles controller get the ActionForm for the module and set the 
corresponding form property.

ActionConfig actionConfig = (ActionConfig)request.getAttribute(
Globals.MAPPING_KEY);
DyanActionForm form = null;
if(StringUtils.equals(actionConfig.getScope(), "request")){
form = (DynaActionForm) request.getAttribute(actionConfig.getAttribute());
} else {
// similarly read from session
}

form.set("optionsCollectionProperty", optionsCollectionProperty); 

Since the tiles controller is always executed just before rendering the jsp, 
you are guaranteed to have the options collection always populated even in 
the "validation failure" case

On 9/14/05, Dylan Stamat <[EMAIL PROTECTED]> wrote:
> 
> I have an Action which sets a populated List in a DynaValidatorForm Bean.
> The "input" of the ActionMapping in the struts-config simply points back 
> to
> the .jsp page (actually a tile def) and uses  to print out 
> the
> error messages.
> 
> If no validation problems occur, there aren't any problems.
> However, if the validation fails, I get an error within the .jsp page
> complaining that my List is null.
> 
> Question:
> 1) The Action populated this List and explicitly set it in the Form 
> Bean...
> so, shouldn't the "input" page have access to this populated field ?
> 
> Answers:
> 1) Yes, I could set the List in the Session, but I'm trying to avoid this.
> 2) I could also use a basic Form Bean instead of a Dyna, but I want to use 
> a
> Dyna.
> 
> 
> This seems like such a simple and common task, but can't for the life of 
> me
> get it to work.
> Any help would be greatly appreciated !
> Thanks !
> ==
> Dylan
> 
>


Re: LabelValueBean in a Form

2005-09-14 Thread Kishore Senji
It is possible. Have a method on your ActionForm which returns a 
java.util.Collection of org.apache.struts.util.LabelValueBean's and use it 
using  in the jsp

For eg: 

public Collection getMyLVBList() {
Collection options = new ArrayList();
options.add(new LabelValueBean(label, value));
// add more options
return options;
}





On 9/14/05, Dylan Stamat <[EMAIL PROTECTED]> wrote:
> 
> I'm using a LabelValueBean, as I need to have a "name" be diplayed, and a
> "value" be reported back to the form.
> 
> I have no problems creating a List of LabelValueBean's, setting them into
> the request like so:
> request.setAttribute("myLVBList", myLVBList);
> 
> ... and outputting them on the .jsp like so:
>  labelProperty="label"/>
> 
> However, I'd rather put this list into my Form, and not in the Request.
> I fiddled around with html:options and html:optionsCollection trying a 
> slew
> of different combinations using the Struts HTML docs as a reference, but 
> no
> luck.
> 
> Is this even possible ?
> 
> Thanks !
> ==
> Dylan
> 
>


Re: Newbie: html:link with action taken from bean

2005-09-14 Thread Kishore Senji
Define a scripting variable with the "actionUrl" and use that in your 
 like so 






On 9/14/05, Wojciech Ciesielski <[EMAIL PROTECTED]> wrote:
> 
> Hi there,
> 
> 
> 
> I am quite new to JSP and struts. So - as I suppose - quite "lame" 
> question
> ;-)
> 
> In order to implement bread crumbs feature I have a collection bean,
> containing simple PathElement objects in request scope. Each PathElement
> contains two attributes:
> 
> - titleKey (for resource key containing path element's title)
> 
> - actionUri (with action to certain place in my app, like
> "/doSomething.do")
> 
> 
> 
> And now I am trying to do something like this on my JSP page:
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> How can I force  tag to take action from bean?
> 
> 
> 
> THX
> 
> 
>


Re: Newbie: html:link with action taken from bean

2005-09-14 Thread Wendy Smoak

From: "Wojciech Ciesielski" <[EMAIL PROTECTED]>


In order to implement bread crumbs feature I have a collection bean,


You might want to take a look at Struts Layout, it already has support for 
breadcrumbs:

  http://struts.application-servers.com/doc/tags/crumbs.html

--
Wendy Smoak 



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



Newbie: html:link with action taken from bean

2005-09-14 Thread Wojciech Ciesielski
Hi there,

 

I am quite new to JSP and struts. So - as I suppose - quite "lame" question
;-)

In order to implement bread crumbs feature I have a collection bean,
containing simple PathElement objects in request scope. Each PathElement
contains two attributes:

-  titleKey (for resource key containing path element's title)

-  actionUri (with action to certain place in my app, like
"/doSomething.do")

 

And now I am trying to do something like this on my JSP page:

 











 

How can I force  tag to take action from bean?

 

THX



Re: Wrapping Struts tags in tag files

2005-09-14 Thread Laurie Harper

Niall Pemberton wrote:

I was thinking about this some more. Both you and the bugzilla ticket had
this issue
where theres an either/or situation with attributes - (e.g. either alt or
altKey) - maybe
we should stick focused on that. Attributes that are just "passed through"
your tag
files shouldn't be an issue? That way, I don't think we have to worry too
much about
compatibility. First thing to do is identify the tags/attributes that need
changing -
probably best to post that on the bugzilla ticket. Then we can discuss what
to do.


I think this is an issue *anywhere* a tag behaves differently on an 
attribute set to "" vs. an attribute set to null, since in this use case 
every attribute (or at least every one the tag file cares about passing 
on) will get set... :-(



My comment was "not that interested in working on the other taglibs" - even
if someone
else puts in a patch, I find that what takes the most time is testing -
writing the code
is usually pretty quick. Anyway, if you want to scope out what you think
needs changing
then we can take it from there.


Sure; maybe some of the testing burden can be mitigated through unit 
tesst (not sure if Struts has the infrastructure in place to unit test 
custom tags?)


L.



Niall

- Original Message - 
From: "Laurie Harper" <[EMAIL PROTECTED]>

To: 



Cross-posting to the dev list for committer approval of the proposed
changes:

Niall Pemberton wrote:


I agree, not trimming!

Personally I don't have a problem with making the change (i.e. checking


for


zero length strings) in the html taglib, since an easy one line change


will


catch alot of them. I'm not that interested in doing it for the other
taglibs though.


Not that interested in doing the work or not that keen on seeing the
changes made? ;-) If the former, I'll be happy to put together patches
for each taglib to keep things consistent.



The way to do it would be to attach a patch to the bug and then ask for
objections before committing it. Besides changing BaseHandlerTag, do you
have any idea of how many other tags might need custom changes. The ones
that spring to mindare the ones that take action/forward/page/href etc.


as


attributes to generate urls


Well, I'm not a committer, but I get the point ;-) I haven't looked at
how many other places may need to change, though in most cases a single
change in a helper method should cover a bunch of them at once (e.g. in
TagUtils.computeURLWithCharEncoding() for the ones you mention above).

I'll take a more detailed look if/when such a change is approved in
principle by the committers.

L.



Niall

- Original Message - 
From: "Laurie Harper" <[EMAIL PROTECTED]>

Sent: Wednesday, September 14, 2005 2:13 AM





Thanks Niall, yes, that's exactly what I'm talking about (thanks for the
link).

OK, so the issue is the impact on backwards compatibility if the tags
change such that empty values suppress attribute rendering. One
possibility would be to test for null or empty string, without trimming.
That would support the case you mentioned below where someone was
relying on rendering value=" ". It's still a behavioural change, though.

My vote would definately be to make the change suggested in 33064, but I
can see why that might be unacceptable. Short of adding a new attribute
to all tags to switch this behaviour on, or a global config option, I
don't see any way to resolve the issue that does retain backwards
compatibility though :-(

I suppose I should take this up on the dev list.

L.

Niall Pemberton wrote:



Laurie

Theres an open bugzilla ticket for the same kind of thing:

 http://issues.apache.org/bugzilla/show_bug.cgi?id=33064

Changing the prepareAttribute() method in o.a.s.t.h.BaseHandlerTag will


deal



with alot of the html taglib attributes that are simply output. For
alt/altkey and title/titleKey - the message() method in BaseHandlerTag


deals



with those attributes.

Having said that I added a trim() to the label for the SubmitTag a


while


ago



and that caused a problem for someone who relied on the fact that it


would



emit value=" " so I'm wondering if adding a length() check is going to


cause



anyone else issues?



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



Re: Printer Friendly Struts Form

2005-09-14 Thread Mario_Hernandez
Woops, should have read the rest of the thread as Jeff Deskins had already 
brought up the media attribute.

LabelValueBean in a Form

2005-09-14 Thread Dylan Stamat
I'm using a LabelValueBean, as I need to have a "name" be diplayed, and a 
"value" be reported back to the form.

I have no problems creating a List of LabelValueBean's, setting them into 
the request like so:
request.setAttribute("myLVBList", myLVBList);

... and outputting them on the .jsp like so:


However, I'd rather put this list into my Form, and not in the Request.
I fiddled around with html:options and html:optionsCollection trying a slew 
of different combinations using the Struts HTML docs as a reference, but no 
luck.

Is this even possible ?

Thanks !
==
Dylan


Re: Printer Friendly Struts Form

2005-09-14 Thread Mario_Hernandez
Here's a solution for you, but I don't know its applicability to Firefox, 
and won't work for inline styling. 

1. Start by outputting the information in a text area and in a div/span. 
2. Give each different class names/ids, say foo and bar respectivly. 
3. Link to your stylesheet or declare your style section defining all your 
styles EXCEPT for foo and bar.
4. Define two more stylesheets or style sections. 
5. In one use the attribute media="screen"  and within the section do 
foo { display: inline;}
bar{display: none;}
6. In the second one do the same thing but reverse the display properties. 



Mariano

Re: To Whom it may concern

2005-09-14 Thread Ted Husted
The decisions are made by the volunteers who write the code. As the
code is submitted to the repository, the changes are submitted to the
development list for peer review. If someone sees a better way to
write the code, the best thing is to submit a patch demonstrating the
change. In an Apache project, all development conversations do happen
on the mailing list. If you follow the mailing list, including the
commit list, then you are privy to all the development decisions.

The important thing is to offer concrete suggestions in code,
preferably in the form of a patch. The volunteers are usually very
busy people who work the usual 40+ hours a week and then contribute to
open source projects after hours. If you want to get a volunteer's
attention, it's important to show that *you* are paying attention, and
that you are doing everything you can to make the best use of the
volunteer's time. Volunteers are freely sharing their work, and it's
important to show that you are willing to share your best effort in
return.

-Ted.


On 9/14/05, Paranj, Bala <[EMAIL PROTECTED]> wrote:
> I have seen code in open source projects like Commons Chain which does
> not use some of the good design principles like command-query
> separation. Are decisions like these made without any justifications? If
> yes, then it needs to be documented. It is overwhelming to someone who
> is new to open source development to do the documentation. Looks like
> this requires lot of search in the email archives. Any thoughts on this?
> 
> Bala
> http://groups.yahoo.com/group/OOAD_UML

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



Re: AW: Struts Development Tool

2005-09-14 Thread Murray Collingwood
Control Panel | Add or remove programs

Alternatively, C:\ExadelStudio\UninstallerData\Uninstall.exe

Kind regards
mc

On 14 Sep 2005 at 18:58, R. Markham wrote:

> Hallo
>
> I just tried Exadel. I don't like because I don't see what I am doing. I
> tried the tutorial. It has a graphic display to configure the
> struts-config.xml. Editing the struts-config.xml is only a minimum effort in
> a web application. The main part is creating and developing the JSP File and
> the Action Files.
>
> I want to to uninstall Exadel out of eclipse environment. Has anybody an
> idea how I can do this.
>
> Regards
>
> Richard Markham
>
>
> -Ursprüngliche Nachricht-
> Von: david van [mailto:[EMAIL PROTECTED]
> Gesendet: Dienstag, 13. September 2005 20:39
> An: Struts Users Mailing List
> Betreff: Re: Struts Development Tool
>
> try this http://www.exadel.com,
>
> 2005/9/14, Steve Beaver <[EMAIL PROTECTED]>:
> >
> > Raj.
> >
> > You can also download WWW.STRUTSBOX.DE 
for
> > eclipse 3.1
> >
> > Regards
> >
> > Steve
> > -Original Message-
> > From: R Rajendran [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, September 13, 2005 12:09 AM
> > To: Struts Users Mailing List
> > Subject: RE: Struts Development Tool
> >
> > Thank you.
> >
> > 
> >
> > From: Murray Collingwood [mailto:[EMAIL PROTECTED]
> > Sent: Mon 9/12/2005 10:49 PM
> > To: Struts Users Mailing List
> > Subject: Re: Struts Development Tool
> >
> >
> >
> > Hi Raj
> >
> > The main one seems to be Eclipse.
> > I'm using NetBeans which is a little behind what Eclipse is providing
> > through plugins.
> > Following somewhere is JBuilder.
> >
> > I know Eclipse and NetBeans are both free.
> > Eclipse supports a plugin system and there are a number of plugins you can
> > purchase
> > to provide additional functionality (eg Struts support).
> > NetBeans is implementing better Struts support in the next (imminent)
> > release.
> >
> > I haven't heard much about JBuilder, I bought a copy and used it many
> > years
> > ago when
> > I first started on Java. It wasn't that great back then but may well have
> > improved.
> >
> > If you want to really fit in you should probably use Eclipse - it seems to
> > be the most
> > popular on this Struts list.
> >
> > Kind regards
> > mc
> >
> >
> > On 12 Sep 2005 at 22:17, R Rajendran wrote:
> >
> > > Hi everyone,
> > >
> > > Could anyone of you let me know the available Struts Development tools
> > (IDE) for
> > Windows environment.
> > >
> > > Thanks
> > > Raj
> > >
> > >
> >
> >
> >
> > FOCUS Computing
> > Mob: 0415 24 26 24
> > [EMAIL PROTECTED]
> > http://www.focus-computing.com.au
> >
> >
> >
> > --
> > No virus found in this outgoing message.
> > Checked by AVG Anti-Virus.
> > Version: 7.0.344 / Virus Database: 267.10.23/99 - Release Date: 12/09/2005
> >
> >
> > -
> > 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]
> >
> >
>
>
> --
> fancy ^_^
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
> --
> No virus found in this incoming message.
> Checked by AVG Anti-Virus.
> Version: 7.0.344 / Virus Database: 267.10.24/101 - Release Date: 13/09/2005
>



FOCUS Computing
Mob: 0415 24 26 24
[EMAIL PROTECTED]
http://www.focus-computing.com.au



--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.10.24/101 - Release Date: 13/09/2005



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



Re: How to prevent path shows up at the Address box in the browser, IE and others

2005-09-14 Thread Kam Lung Leung
Hi Praveen,

Thank you for helping. Can you explain what must I do in the web.xml file.
I do have the /*.do in the web.xml and I saw the full 
path shows up at the address bar.

Regards,

Kam Lung Leung

 Struts Users Mailing List  wrote:
>
> HI
>  
> In struts if we use ( in web.xml) /*.do we will 
> never get the full path or file name of the JSP's or Action's 
> Check it Once 
> Regards 
> Kumar
>  
> 
> Kam Lung Leung <[EMAIL PROTECTED]> wrote:
> 
> Hi,
> 
> I am working on a project that uses Tiles and Structs.
> I have the following Tiles definition;
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> What can I do to prevent the path of the UsersAdministrationPage.jsp and
> the index.jsp files show up in the Address box of a browser. Would the
> following step help preventing the path of the UsersAdministrationPage.jsp
> to show up?
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Add a Global Forward in the structs-config.xml file like below:
> 
> 
> 
> 
> 
> 
> 
> 
> Any suggestion is greatly appreciated.
> Kam Lung Leung
> [EMAIL PROTECTED]
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> __
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 

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



Re: How to prevent path shows up at the Address box in the browser, IE and others

2005-09-14 Thread Kam Lung Leung
Hi Laurie,

Thank you for helping the question. It seem to be alot of works to prevent the 
path shows up at the address bar. I though by seting up the Tile definition 
like below should be good. When a user press the Administration link, Tile 
forward the reference to the Global forward named UsersAdministrationPage. In 
turn forworded to the UsersAdministrationPage.jsp and the address box only 
shows http://companyname.com/WebApplicationName/UsersAdministrationPage.do. 
This is what I want. The question is that would Tiles except 
UsersAdministrationPage.do as a valid string.



  
  


  






  
  



  

  


 
regards,
Kam Lung Leung

 Struts Users Mailing List  wrote:
>
> I'm not sure what you're trying to achieve here. At what point do you 
> want the URL to remain hidden? What you have below just controls what 
> gets rendered on the HTML page. The address bar will contain the URL 
> used to get that page, not the URL to UsersAdministrationPage.jsp, or 
> any other link on the page.
> 
> On the other hand, when the user clicks any of those links, the browser 
> will load the referenced page and *then* the address bar will contain 
> the URL of that page. Is this what you want to prevent?
> 
> I can only think of two ways to do that:
> 
> 1) use Javascript instead of a regular href-based link to load the URL 
> and replace the current page content with the content loaded from the 
> new URL
> 
> 2) use an enclosing frameset and target the links in your page to a 
> frame in that frameset. The address bar will then always show the URL 
> for the outer frameset rather than the URLs of whatever pages are loaded 
> in the frames.
> 
> Of course with option 2 you have all the normal drawbacks of using 
> frames, including the inability to bookmark pages.
> 
> L.
> 
> Kam Lung Leung wrote:
> >
> >   Hi,
> > 
> > I am working on a project that uses Tiles and Structs.
> > I have the following Tiles definition;
> > 
> >> path="/Infra/WebComponemt/Layouts/menuLayout.jsp" >
> >   
> >   
> >
> > > link="/WebComponemt/Presentation/UsersAdministrationPage.jsp" />
> >  
> >   
> > 
> > What can I do to prevent the path of the UsersAdministrationPage.jsp and
> > the index.jsp files show up in the Address box of a browser. Would the
> > following step help preventing the path of the UsersAdministrationPage.jsp
> > to show up?
> > 
> > 
> >> path="/Infra/WebComponemt/Layouts/menuLayout.jsp" >
> >   
> >   
> >
> > > link="UsersAdministrationPage" />
> >  
> >   
> > 
> > Add a Global Forward in the structs-config.xml file like below:
> > 
> >
> >
> >> path="/WebComponemt/Presentation/index.jsp.do"/>
> >  > path="/WebComponemt/Presentation/UsersAdministrationPage.jsp"/>
> >
> > 
> > 
> > Any suggestion is greatly appreciated.
> > Kam Lung Leung
> > [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: Printer Friendly Struts Form

2005-09-14 Thread Frank W. Zammetti
The idea of updating the tags was proposed by someone else in the past 
two weeks ironically.  I think there was some interest in it (I seem to 
remember it being part of a larger proposal, but that particular part 
seemed to elicit some support).


Frank

Jeff Deskins wrote:
Thanks for the info on this subject. They have been a big help. 

One of the problems with textareas is in printing the rest of the text 
beyond the scrolled view (when you have more text than is visible in the 
textarea). However, it will work in IE with a print style of 
{overflow:visible} - but will not work in Firefox.


Don't want to dive too much into CSS in this group. Was just hoping there 
was (or in the future?) an attribute for the struts form tag that would 
automatically print the form values as text instead of printing the values 
inside form elements (inputs/textareas) using the existing struts form code.


In the meantime, I can live with handling most of it with stylesheets or 
wrapping an "if" statement around each form element and display according to 
a querystring parameter.


Thanks for all the tips!
Jeff

-- Forwarded message --
From: "Frank W. Zammetti" <[EMAIL PROTECTED]>
To: "Frank W. Zammetti" <[EMAIL PROTECTED]>
Date: Wed, 14 Sep 2005 13:39:02 -0400 (EDT)
Subject: Re: Printer Friendly Struts Form
Even better, use display:none; on the checkboxes and radios so everything
lines up right. Updated:



Test

.cssNoBorder {
border : 0 solid #ff;
overflow : hidden;
background-color : #ff;
}





Button:



Text:



Select:
1


Textarea:
SomeValue


Checkbox:
 SomeValue


Radio:
 SomeValue


File:



Password:



Reset:



Submit:






--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com



--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com


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



Re: Printer Friendly Struts Form

2005-09-14 Thread Jeff Deskins
Thanks for the info on this subject. They have been a big help. 

One of the problems with textareas is in printing the rest of the text 
beyond the scrolled view (when you have more text than is visible in the 
textarea). However, it will work in IE with a print style of 
{overflow:visible} - but will not work in Firefox.

Don't want to dive too much into CSS in this group. Was just hoping there 
was (or in the future?) an attribute for the struts form tag that would 
automatically print the form values as text instead of printing the values 
inside form elements (inputs/textareas) using the existing struts form code.

In the meantime, I can live with handling most of it with stylesheets or 
wrapping an "if" statement around each form element and display according to 
a querystring parameter.

Thanks for all the tips!
Jeff

-- Forwarded message --
From: "Frank W. Zammetti" <[EMAIL PROTECTED]>
To: "Frank W. Zammetti" <[EMAIL PROTECTED]>
Date: Wed, 14 Sep 2005 13:39:02 -0400 (EDT)
Subject: Re: Printer Friendly Struts Form
Even better, use display:none; on the checkboxes and radios so everything
lines up right. Updated:



Test

.cssNoBorder {
border : 0 solid #ff;
overflow : hidden;
background-color : #ff;
}





Button:



Text:



Select:
1


Textarea:
SomeValue


Checkbox:
 SomeValue


Radio:
 SomeValue


File:



Password:



Reset:



Submit:






--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com


Re: Keeping Session small using Validation

2005-09-14 Thread Sudhaker Raj
What about keeping the list in form-bean? It is DynaForm, so you can
populate using form.set("mylist", mylisy); and retrieve back using
${form.map.mylist} (or RT equivalent of it).

If you put in session, you have to take care of removal. In this case
Struts will take care of it and recycle it.


On 9/14/05, Sudhaker Raj <[EMAIL PROTECTED]> wrote:
>   /--\
>   |  Action  | populates list
>   \--/
>|
>V
>   /--\
>   | JSP/Tiles|
>   \--/
> 
> The list is not being populated when validation fails as framework is
> throwing back request to JSP/Tiles without running the population
> code. This is very well expected behavior.
> 
> A simple work-around can be assigning input to the action which is
> generating the page. If you don't want to execute the population code
> again and again, you gotta to hold it somewhere.
> 
> Cheers,
> Sudhaker
> 


-- 
Cheers,
Sudhaker Raj
http://thej2ee.com

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



Re: Keeping Session small using Validation

2005-09-14 Thread Sudhaker Raj
  /--\
  |  Action  | populates list
  \--/
   | 
   V
  /--\
  | JSP/Tiles|
  \--/
  
The list is not being populated when validation fails as framework is
throwing back request to JSP/Tiles without running the population
code. This is very well expected behavior.

A simple work-around can be assigning input to the action which is
generating the page. If you don't want to execute the population code
again and again, you gotta to hold it somewhere.

Cheers,
Sudhaker

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



Keeping Session small using Validation

2005-09-14 Thread Dylan Stamat
I have an Action which sets a populated List in a DynaValidatorForm Bean.
The "input" of the ActionMapping in the struts-config simply points back to 
the .jsp page (actually a tile def) and uses  to print out the 
error messages.

If no validation problems occur, there aren't any problems.
However, if the validation fails, I get an error within the .jsp page 
complaining that my List is null.

Question:
1) The Action populated this List and explicitly set it in the Form Bean... 
so, shouldn't the "input" page have access to this populated field ?

Answers:
1) Yes, I could set the List in the Session, but I'm trying to avoid this.
2) I could also use a basic Form Bean instead of a Dyna, but I want to use a 
Dyna.


This seems like such a simple and common task, but can't for the life of me 
get it to work.
Any help would be greatly appreciated !
Thanks !
==
Dylan


Re: Wrapping Struts tags in tag files

2005-09-14 Thread Niall Pemberton
I was thinking about this some more. Both you and the bugzilla ticket had
this issue
where theres an either/or situation with attributes - (e.g. either alt or
altKey) - maybe
we should stick focused on that. Attributes that are just "passed through"
your tag
files shouldn't be an issue? That way, I don't think we have to worry too
much about
compatibility. First thing to do is identify the tags/attributes that need
changing -
probably best to post that on the bugzilla ticket. Then we can discuss what
to do.

My comment was "not that interested in working on the other taglibs" - even
if someone
else puts in a patch, I find that what takes the most time is testing -
writing the code
is usually pretty quick. Anyway, if you want to scope out what you think
needs changing
then we can take it from there.

Niall

- Original Message - 
From: "Laurie Harper" <[EMAIL PROTECTED]>
To: 


> Cross-posting to the dev list for committer approval of the proposed
> changes:
>
> Niall Pemberton wrote:
> > I agree, not trimming!
> >
> > Personally I don't have a problem with making the change (i.e. checking
for
> > zero length strings) in the html taglib, since an easy one line change
will
> > catch alot of them. I'm not that interested in doing it for the other
> > taglibs though.
>
> Not that interested in doing the work or not that keen on seeing the
> changes made? ;-) If the former, I'll be happy to put together patches
> for each taglib to keep things consistent.
>
> > The way to do it would be to attach a patch to the bug and then ask for
> > objections before committing it. Besides changing BaseHandlerTag, do you
> > have any idea of how many other tags might need custom changes. The ones
> > that spring to mindare the ones that take action/forward/page/href etc.
as
> > attributes to generate urls
>
> Well, I'm not a committer, but I get the point ;-) I haven't looked at
> how many other places may need to change, though in most cases a single
> change in a helper method should cover a bunch of them at once (e.g. in
> TagUtils.computeURLWithCharEncoding() for the ones you mention above).
>
> I'll take a more detailed look if/when such a change is approved in
> principle by the committers.
>
> L.
>
> >
> > Niall
> >
> > - Original Message - 
> > From: "Laurie Harper" <[EMAIL PROTECTED]>
> > Sent: Wednesday, September 14, 2005 2:13 AM
> >
> >
> >
> >>Thanks Niall, yes, that's exactly what I'm talking about (thanks for the
> >>link).
> >>
> >>OK, so the issue is the impact on backwards compatibility if the tags
> >>change such that empty values suppress attribute rendering. One
> >>possibility would be to test for null or empty string, without trimming.
> >>That would support the case you mentioned below where someone was
> >>relying on rendering value=" ". It's still a behavioural change, though.
> >>
> >>My vote would definately be to make the change suggested in 33064, but I
> >>can see why that might be unacceptable. Short of adding a new attribute
> >>to all tags to switch this behaviour on, or a global config option, I
> >>don't see any way to resolve the issue that does retain backwards
> >>compatibility though :-(
> >>
> >>I suppose I should take this up on the dev list.
> >>
> >>L.
> >>
> >>Niall Pemberton wrote:
> >>
> >>>Laurie
> >>>
> >>>Theres an open bugzilla ticket for the same kind of thing:
> >>>
> >>>   http://issues.apache.org/bugzilla/show_bug.cgi?id=33064
> >>>
> >>>Changing the prepareAttribute() method in o.a.s.t.h.BaseHandlerTag will
> >
> > deal
> >
> >>>with alot of the html taglib attributes that are simply output. For
> >>>alt/altkey and title/titleKey - the message() method in BaseHandlerTag
> >
> > deals
> >
> >>>with those attributes.
> >>>
> >>>Having said that I added a trim() to the label for the SubmitTag a
while
> >
> > ago
> >
> >>>and that caused a problem for someone who relied on the fact that it
> >
> > would
> >
> >>>emit value=" " so I'm wondering if adding a length() check is going to
> >
> > cause
> >
> >>>anyone else issues?



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



Re: Some i18n issues

2005-09-14 Thread Niall Pemberton
From: "Laurie Harper" <[EMAIL PROTECTED]>

> Michael Ewers wrote:
> > Can anyone see a reason why the html:text implementation in
struts-html.tld
> > doesn't support a formatKey attribute?
>
> I guess because there are already ways to format values which can be
> composed with  so it doesn't *need* to support it. If
> there's some reason that approach wont work in some situation or other,
> or if you feel strongly that the convenience of adding formatKey to
>  and/or other tags outweighs the API bloat, you can submit
> an enhancement request, though.
>
> > To whom can I send patches that I write?
>
> The best way is to open a ticket in Bugzilla and attach patches there.
> Posting to / nagging on the dev list is the best way to get the patches
> looked at and would be the best place to ask whether such patches are
> likely to be accepted.

http://issues.apache.org/bugzilla/show_bug.cgi?id=22991

Niall



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



Re: Some i18n issues

2005-09-14 Thread Laurie Harper

Michael Ewers wrote:

Can anyone see a reason why the html:text implementation in struts-html.tld
doesn't support a formatKey attribute?


I guess because there are already ways to format values which can be 
composed with  so it doesn't *need* to support it. If 
there's some reason that approach wont work in some situation or other, 
or if you feel strongly that the convenience of adding formatKey to 
 and/or other tags outweighs the API bloat, you can submit 
an enhancement request, though.



To whom can I send patches that I write?


The best way is to open a ticket in Bugzilla and attach patches there. 
Posting to / nagging on the dev list is the best way to get the patches 
looked at and would be the best place to ask whether such patches are 
likely to be accepted.


L.



Thanks,
Michael.


That doesn't allow the use of the Struts HTML tags though, since you 
can't use a tag in a tag attribute... This will work, though:


  

  

  

A little cumbersome, and not the only way. You can also do it without a 
nested  if you don't mind creating a scripting variable.


L.

Ivan Rodriguez wrote:

">



Michael Ewers escribió:


The problem is that the  tag doesn't have a 
formatKey-attribute
and I want the initial value to be displayed in a text-field, not as a 
pure

html-output.
In other words: I need struts to make a "" out of a "...initial="1000" with
German locale set in browser.

Thans,
Michael.





You have to use an initial value of "1000".


   
   




Then where you print this initial value, at your jsp, use formatting 
options:


formatKey="format.number" />


format.number is an entry in you MessageResources.properties

For german MessageResources_de.properties:
format.number=#0.000,00

For english MessageResources_en.properties:
format.number=#0,000.00


Michael Ewers escribió:

 




Hi,

I'm new to this group so first of all I'm pleased to have the 
opportunity
   


to
 




ask questions here.

My question(s):
1) I'm trying to write an application that supports i18n with Struts.


I

   


use
 



DynaActionForm for my forms, so I defined them with initial values, 
e.g.:


  
 


initial="1.000"
 




/>

I have German and English users. My problem is that it seems to be
impossible to definie initial values for different languages. 
"1.000" in
Germany means 1000, in UK it means 1. For German users the initial 
value

should be "1,000".
Is there a solution for this problem?

2) If I use the Validator framework to validate double form values, 
it's
basically the same problem: Validator seems to know English writing 
rules
   


of
 



double values but "1,00" is not a valid double value for Validator, 
even
   


if
 




the browser's Locale is set to German.
Is there a solution?

Bye,
Michael.

-
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]




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



Re: Some i18n issues

2005-09-14 Thread Michael Ewers
Can anyone see a reason why the html:text implementation in struts-html.tld
doesn't support a formatKey attribute?

To whom can I send patches that I write?

Thanks,
Michael.

> That doesn't allow the use of the Struts HTML tags though, since you 
> can't use a tag in a tag attribute... This will work, though:
> 
>
>  
>formatKey="format.number"/>
>  
>
> 
> A little cumbersome, and not the only way. You can also do it without a 
> nested  if you don't mind creating a scripting variable.
> 
> L.
> 
> Ivan Rodriguez wrote:
> > ">
> > 
> > 
> > Michael Ewers escribió:
> > 
> >> The problem is that the  tag doesn't have a 
> >> formatKey-attribute
> >> and I want the initial value to be displayed in a text-field, not as a 
> >> pure
> >> html-output.
> >> In other words: I need struts to make a " >> name="propertyName" value="1000,00">" out of a "...initial="1000" with
> >> German locale set in browser.
> >>
> >> Thans,
> >> Michael.
> >>
> >>  
> >>
> >>> You have to use an initial value of "1000".
> >>>
> >>>  >>> type="org.apache.struts.validator.DynaValidatorForm">
> >>> 
> >>>  >>> initial="1000"
> >>> />
> >>> 
> >>>
> >>>
> >>>
> >>> Then where you print this initial value, at your jsp, use formatting 
> >>> options:
> >>>
> >>>  >>> formatKey="format.number" />
> >>>
> >>> format.number is an entry in you MessageResources.properties
> >>>
> >>> For german MessageResources_de.properties:
> >>> format.number=#0.000,00
> >>>
> >>> For english MessageResources_en.properties:
> >>> format.number=#0,000.00
> >>>
> >>>
> >>> Michael Ewers escribió:
> >>>
> >>>   
> >>>
>  Hi,
> 
>  I'm new to this group so first of all I'm pleased to have the 
>  opportunity
>  
> >>>
> >>> to
> >>>   
> >>>
>  ask questions here.
> 
>  My question(s):
>  1) I'm trying to write an application that supports i18n with Struts.
> I
>  
> >>>
> >>> use
> >>>   
> >>>
>  DynaActionForm for my forms, so I defined them with initial values, 
>  e.g.:
>   type="org.apache.struts.validator.DynaValidatorForm">
> 
>   
> >>>
> >>> initial="1.000"
> >>>   
> >>>
>  />
>  
>  I have German and English users. My problem is that it seems to be
>  impossible to definie initial values for different languages. 
>  "1.000" in
>  Germany means 1000, in UK it means 1. For German users the initial 
>  value
>  should be "1,000".
>  Is there a solution for this problem?
> 
>  2) If I use the Validator framework to validate double form values, 
>  it's
>  basically the same problem: Validator seems to know English writing 
>  rules
>  
> >>>
> >>> of
> >>>   
> >>>
>  double values but "1,00" is not a valid double value for Validator, 
>  even
>  
> >>>
> >>> if
> >>>   
> >>>
>  the browser's Locale is set to German.
>  Is there a solution?
> 
>  Bye,
>  Michael.
> 
>  -
>  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]
> 

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



RE: Adding parameters to redirected forwards

2005-09-14 Thread Frank W. Zammetti
On Wed, September 14, 2005 2:37 pm, Max Cooper said:
> Two notes:
>
> 1. Be careful when modifying ActionForwards to make sure that you aren't
> modifying the shared, system-wide instance. That can be a nasty side
> effect. You can make a copy of the ActionForward object, change it, and
> return the copy from your Action.execute() method to get around this
> issue.

Actually, IIRC, you can't do this by default anyway, not without playing
some games... I beleive all the ForwardConfigs are frozen and so don't
allow direct updates unless you copy one.

> 2. Servlet Filters and HttpRequestWrappers do provide a means to mess
> with the request parameters (since you can override getParameter()).
> However, I doubt that is useful in this context.

Indeed.  Ron and I actually mentioned that off-list.  It's a good point to
make for others though.

Frank

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



Re: JavascriptValidatorTag.doStartTag(JavascriptValidatorTag.java:309) ( URGENT !! )

2005-09-14 Thread EROL TEZCAN
We dont use ADF, Martin. But this application works fine in local app server 
(oracle 10g ias).
 
Ivan, we dont use tomcat server for development. We use same server oracle 10g 
ias.
 
Also this app works fine in my OC4J of JDeveloper 10g .  
 
In where automatic string-number castin
 
Any suggestion?
 
Erol

Ivan Rodriguez <[EMAIL PROTECTED]> wrote:
Martin, Oracle ADF Runtime needs to be installed...but if it is used ;) 
I think Erol is not using ADF.

Erol, keep in mind that tomcat and IAS are *different*. I saw a similar 
error with tomcat doing automatic string-number cast, and IAS not.

Martin Gainty escribió:

> Be mindful that Oracle ADF Runtime needs to be installed on the target 
> webapp server check out
> http://www.oracle.com/technology/products/jdev/howtos/10g/adf_runtime_update_howto.html
>  
>
> HTH,
> Martin-
> - Original Message - From: "Laurie Harper" 
> To: 
> Sent: Wednesday, September 14, 2005 11:25 AM
> Subject: Re: 
> JavascriptValidatorTag.doStartTag(JavascriptValidatorTag.java:309) ( 
> URGENT !! )
>
>
>> I don't have the 1.1 source code checked out so I don't know exactly 
>> what it's failing on but I would suggest checking two things:
>>
>> 1) make sure all the attribute values you're passing into the tag are 
>> valid, and
>>
>> 2) make sure the form bean for the enclosing form tag is being found 
>> (i.e. that you have your form-bean / action mappings setup right.
>>
>> L.
>>
>> EROL TEZCAN wrote:
>>
>>> Hi,
>>> We want to deploy an struts application to live server (oracle 10g 
>>> IAS). This application is working properly on our local server. But 
>>> when we want to deploy and start this app. it gives an error like this.
>>> 500 Internal Server Error
>>> java.lang.NullPointerException
>>> at 
>>> org.apache.struts.taglib.html.JavascriptValidatorTag.doStartTag(JavascriptValidatorTag.java:309)
>>>  
>>>
>>> at _index._jspService(_index.java:215)
>>> [SRC:/index.jsp:61]
>>> at com.orionserver[Oracle Application Server Containers for 
>>> J2EE 10g 
>>> (9.0.4.1.0)].http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
>>> at 
>>> oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:349)
>>> at 
>>> oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509)
>>> at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413)
>>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>>> at com.evermind[Oracle Application Server Containers for J2EE 
>>> 10g 
>>> (9.0.4.1.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:765)
>>>  
>>>
>>
>>
>>> at com.evermind[Oracle Application Server Containers for J2EE 
>>> 10g 
>>> (9.0.4.1.0)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
>>>  
>>>
>>> at com.evermind[Oracle Application Server Containers for J2EE 
>>> 10g 
>>> (9.0.4.1.0)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:793)
>>>  
>>>
>>> at com.evermind[Oracle Application Server Containers for J2EE 
>>> 10g 
>>> (9.0.4.1.0)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:208) 
>>>
>>> at com.evermind[Oracle Application Server Containers for J2EE 
>>> 10g 
>>> (9.0.4.1.0)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:125) 
>>>
>>> at com.evermind[Oracle Application Server Containers for J2EE 
>>> 10g 
>>> (9.0.4.1.0)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
>>>  
>>>
>>> at java.lang.Thread.run(Thread.java:536)
>>>
>>> We use struts 1.1 ( old versiyon not 1.2.7 )and all xml, jar .. 
>>> files are in the right place. How can we solve this ? It is very 
>>> urgent solving this problem. Thanks,
>>> Erol
>>>
>>>
>>> -
>>> Yahoo! for Good
>>> Click here to donate to the Hurricane Katrina relief effort.
>>
>>
>>
>> -
>> 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]


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

RE: Adding parameters to redirected forwards

2005-09-14 Thread Max Cooper
Two notes:

1. Be careful when modifying ActionForwards to make sure that you aren't
modifying the shared, system-wide instance. That can be a nasty side
effect. You can make a copy of the ActionForward object, change it, and
return the copy from your Action.execute() method to get around this
issue.

2. Servlet Filters and HttpRequestWrappers do provide a means to mess
with the request parameters (since you can override getParameter()).
However, I doubt that is useful in this context.

-Max

On Wed, 2005-09-14 at 09:23 -0400, Frank W. Zammetti wrote:
> Hi Ron,
> 
> We're actually talking about two different things... there are request
> PARAMETERS and request ATTRIBUTES.  What you say is of course accurate,
> you can call setAttribute() on a request and forward it along and you'll
> have access to those attributes.  But that is different from parameters. 
> They are stored in two different collections, and are accessed with two
> different methods (getAttribute() as opposed to getParameter()).
> 
> Parameters can only be attached to a request by appending a query string
> to the URI being requested, or POSTing a form that includes them.  The
> servlet spec, up to and including 2.4 apparently, does not provide a way
> to add parameters, only attributes.
> 
> Frank
> 
> On Wed, September 14, 2005 2:51 am, Holshausen, Ron said:
> > If you want to just forward the request along, just add any parameters
> > to the request object via the setAttribute method.
> >
> > -Original Message-
> > From: Frank W. Zammetti [mailto:[EMAIL PROTECTED]
> > Sent: 14 September 2005 08:46
> > To: Struts Users Mailing List
> > Subject: Re: Adding parameters to redirected forwards
> >
> > Xavier Vanderstukken wrote:
> >> IS that class really performs a redirect request?
> >> Can I use the setRedirect method to false to performs a forward with
> >> parameters?
> >
> > Interesting question... someone can correct me if I'm wrong, but I
> > believe the answer is no.  Well, to be more precise, you *may* be able
> > tp setRedirect(false) to do a forward, I do not know for sure, but you
> > won't be able to add parameters.
> >
> > Up to and including servlet spec 2.4, there is no addParameter() method
> > of HttpServletRequest, or any superclass.  Since when you do a forward
> > you are passing the same request along, you would need this method to
> > add parameters.
> >
> > When you do a redirect however, the URL you redirect to includes the
> > parameters as a query string.
> >
> > So, no, I do not believe it is ever possible, with ActionRedirect or
> > not, to add parameters when doing a forward, only when doing a redirect.
> >
> >> -
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >>
> >>
> >> .
> >>
> >
> > --
> > Frank W. Zammetti
> > Founder and Chief Software Architect
> > Omnytex Technologies
> > http://www.omnytex.com
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> > E-Mail Disclaimer
> >
> > Aus Rechts- und Sicherheitsgruenden ist die in dieser E-Mail gegebene
> > Information nicht rechtsverbindlich. Eine rechtsverbindliche Bestaetigung
> > reichen wir Ihnen gerne auf Anforderung in schriftlicher Form nach.
> > Beachten Sie bitte, dass jede Form der unautorisierten Nutzung,
> > Veroeffentlichung, Vervielfaeltigung oder Weitergabe des Inhalts dieser
> > E-Mail nicht gestattet ist. Diese Nachricht ist ausschliesslich fuer
> > den bezeichneten Adressaten oder dessen Vertreter bestimmt. Sollten Sie
> > nicht der vorgesehene Adressat dieser E-Mail oder dessen Vertreter sein,
> > so bitten wir Sie, sich mit dem Absender der E-Mail in Verbindung zu
> > setzen.
> >
> >
> > For legal and security reasons the information provided in this e-mail is
> > not
> > legally binding. Upon request we would be pleased to provide you with a
> > legally
> > binding confirmation in written form. Any form of unauthorised use,
> > publication,
> > reproduction, copying or disclosure of the content of this e-mail is not
> > permitted.
> > This message is exclusively for the person addressed or their
> > representative.
> > If you are not the intended recipient of this message and its contents,
> > please
> > notify the sender immediately.
> >
> 
> 
> -
> 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: Some i18n issues

2005-09-14 Thread Laurie Harper
That doesn't allow the use of the Struts HTML tags though, since you 
can't use a tag in a tag attribute... This will work, though:


  

  

  

A little cumbersome, and not the only way. You can also do it without a 
nested  if you don't mind creating a scripting variable.


L.

Ivan Rodriguez wrote:
">



Michael Ewers escribió:

The problem is that the  tag doesn't have a 
formatKey-attribute
and I want the initial value to be displayed in a text-field, not as a 
pure

html-output.
In other words: I need struts to make a "" out of a "...initial="1000" with
German locale set in browser.

Thans,
Michael.

 


You have to use an initial value of "1000".








Then where you print this initial value, at your jsp, use formatting 
options:


formatKey="format.number" />


format.number is an entry in you MessageResources.properties

For german MessageResources_de.properties:
format.number=#0.000,00

For english MessageResources_en.properties:
format.number=#0,000.00


Michael Ewers escribió:

  


Hi,

I'm new to this group so first of all I'm pleased to have the 
opportunity



to
  


ask questions here.

My question(s):
1) I'm trying to write an application that supports i18n with Struts. I



use
  

DynaActionForm for my forms, so I defined them with initial values, 
e.g.:


   
   


initial="1.000"
  


/>

I have German and English users. My problem is that it seems to be
impossible to definie initial values for different languages. 
"1.000" in
Germany means 1000, in UK it means 1. For German users the initial 
value

should be "1,000".
Is there a solution for this problem?

2) If I use the Validator framework to validate double form values, 
it's
basically the same problem: Validator seems to know English writing 
rules



of
  

double values but "1,00" is not a valid double value for Validator, 
even



if
  


the browser's Locale is set to German.
Is there a solution?

Bye,
Michael.

-
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]



RE: To Whom it may concern

2005-09-14 Thread Paranj, Bala
I have seen code in open source projects like Commons Chain which does
not use some of the good design principles like command-query
separation. Are decisions like these made without any justifications? If
yes, then it needs to be documented. It is overwhelming to someone who
is new to open source development to do the documentation. Looks like
this requires lot of search in the email archives. Any thoughts on this?

Bala
http://groups.yahoo.com/group/OOAD_UML

-Original Message-
From: James Mitchell [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, September 14, 2005 12:33 PM
To: Struts Developers List
Cc: Struts Users Mailing List
Subject: Re: To Whom it may concern


Hi Mario, contributing to Open Source can be exciting and frustrating at

the same time.  I'm happy that you've decided to volunteer your time.

I would say your best bet is to decide on what you'd like to do.  This 
should be something that interests you, which, typically, would be 
something you are having to do at work for work, but that's not always 
the case.

If you aren't sure where you want to help out, a good place to start 
would be to help out with documentation.  This is often the area that is

lacking in *many* open source projects.  Of if you want write some code 
and not docs, you could add to or improve the projects test coverage.

There are many ways to help.  No need to send a resume.  Your work is 
your resume, a thriving community is your salary, and any "thank you" 
from a user is your bonus.

Welcome to Apache!


--
James Mitchell
Software Engineer / Open Source Evangelist
Consulting / Mentoring / Freelance
EdgeTech, Inc.
http://www.edgetechservices.net/
678.910.8017
AIM:   jmitchtx
MSN:   [EMAIL PROTECTED]
Skype: callto://jmitchtx


[EMAIL PROTECTED] wrote:
> Hello again.
> 
> I've never contributed to the Apache Project before, but am a regular
user 
> of its tools and love working with it. This March, I will likely be
laid 
> off because of the merger between Federated and May companies. I will
be 
> given a severance package and have decided that I would like to spend
4-6 
> months living abroad and contributing to the project. Naturally I
wouldn't 
> expect to start out as anything more than a Volunteer, but would 
> appreciate the challenges of a Committer. I'm writing this now because

> when the time comes, I would like to jump in with a large load, just
to 
> keep the momentum going. That means I'd probably start doing some
small 
> contributing to a specific sub-project and stick with it. 
> 
>  I've worked for the USPS, the DOD, and now for May/Federated. I'm a
BS in 
> Com Sci with a math minor (like I'll ever use that again!), am of the 
> Meyer OOP school, with a clear understanding of j2ee development and 
> N-tier architecture.  I can provide my resume to whomever needs it, so

> just ask. 
> 
> Thanks for your time, and looking forward to hearing from someone,
> 
> Mariano Hernandez


-
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: Printer Friendly Struts Form

2005-09-14 Thread Frank W. Zammetti
Even better, use display:none; on the checkboxes and radios so everything
lines up right.  Updated:



Test

  .cssNoBorder {
border : 0 solid #ff;
overflow : hidden;
background-color : #ff;
  }



  

  Button:
  


  Text:
  


  Select:
  1


  Textarea:
  SomeValue


  Checkbox:
   SomeValue


  Radio:
   SomeValue


  File:
  


  Password:
  


  Reset:
  


  Submit:
  

  



-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com

On Wed, September 14, 2005 1:36 pm, Frank W. Zammetti said:
> Yeah, no good... Below is a quick test you can play with.  I couldn't
> figure out how to get the selects to work like the rest.  Checkboxes and
> radios too it doesn't like you can do much with, but they may be OK.  Here
> you go though, pretty simple stuff...
>
> 
> 
> Test
> 
>   .cssNoBorder {
> border : 0 solid #ff;
> overflow : hidden;
> background-color : #ff;
>   }
> 
> 
> 
>   
> 
>   Button:
>   
> 
> 
>   Text:
>   
> 
> 
>   Select:
>   1
> 
> 
>   Textarea:
>   SomeValue
> 
> 
>   Checkbox:
>class="cssNoBorder"> SomeValue
> 
> 
>   Radio:
>class="cssNoBorder"> SomeValue
> 
> 
>   File:
>   
> 
> 
>   Password:
>value="SomeValue">
> 
> 
>   Reset:
>   
> 
> 
>   Submit:
>   
> 
>   
> 
> 
>
> --
> Frank W. Zammetti
> Founder and Chief Software Architect
> Omnytex Technologies
> http://www.omnytex.com
>
> On Wed, September 14, 2005 12:59 pm, Michael Jouravlev said:
>> This is what I was thinking where problem was. I don't know if CSS can
>> control borders (and arrows for comboboxes) of input elements.
>>
>> On 9/14/05, Frank W. Zammetti <[EMAIL PROTECTED]> wrote:
>>> Laurie had the right idea... you can disable the border for form
>>> fields,
>>> and that's what you would want your stylesheet to do.  You may run into
>>> some fields that can't be controlled like that, I've never tried to do
>>> them all (specifically I'm thinking of selects, which seem to be a
>>> world
>>> unto themselves many times).
>>
>> -
>> 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: Printer Friendly Struts Form

2005-09-14 Thread Frank W. Zammetti
Actually, for the checkboxes and radios you can set visibility:hidden; on
them and it will actually hide the checkbox or radio itself, not the
associated text, so that's pretty good.  Just gotta find a way to deal
with the selects.

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com

On Wed, September 14, 2005 1:36 pm, Frank W. Zammetti said:
> Yeah, no good... Below is a quick test you can play with.  I couldn't
> figure out how to get the selects to work like the rest.  Checkboxes and
> radios too it doesn't like you can do much with, but they may be OK.  Here
> you go though, pretty simple stuff...
>
> 
> 
> Test
> 
>   .cssNoBorder {
> border : 0 solid #ff;
> overflow : hidden;
> background-color : #ff;
>   }
> 
> 
> 
>   
> 
>   Button:
>   
> 
> 
>   Text:
>   
> 
> 
>   Select:
>   1
> 
> 
>   Textarea:
>   SomeValue
> 
> 
>   Checkbox:
>class="cssNoBorder"> SomeValue
> 
> 
>   Radio:
>class="cssNoBorder"> SomeValue
> 
> 
>   File:
>   
> 
> 
>   Password:
>value="SomeValue">
> 
> 
>   Reset:
>   
> 
> 
>   Submit:
>   
> 
>   
> 
> 
>
> --
> Frank W. Zammetti
> Founder and Chief Software Architect
> Omnytex Technologies
> http://www.omnytex.com
>
> On Wed, September 14, 2005 12:59 pm, Michael Jouravlev said:
>> This is what I was thinking where problem was. I don't know if CSS can
>> control borders (and arrows for comboboxes) of input elements.
>>
>> On 9/14/05, Frank W. Zammetti <[EMAIL PROTECTED]> wrote:
>>> Laurie had the right idea... you can disable the border for form
>>> fields,
>>> and that's what you would want your stylesheet to do.  You may run into
>>> some fields that can't be controlled like that, I've never tried to do
>>> them all (specifically I'm thinking of selects, which seem to be a
>>> world
>>> unto themselves many times).
>>
>> -
>> 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: Printer Friendly Struts Form

2005-09-14 Thread Frank W. Zammetti
Yeah, no good... Below is a quick test you can play with.  I couldn't
figure out how to get the selects to work like the rest.  Checkboxes and
radios too it doesn't like you can do much with, but they may be OK.  Here
you go though, pretty simple stuff...



Test

  .cssNoBorder {
border : 0 solid #ff;
overflow : hidden;
background-color : #ff;
  }



  

  Button:
  


  Text:
  


  Select:
  1


  Textarea:
  SomeValue


  Checkbox:
   SomeValue


  Radio:
   SomeValue


  File:
  


  Password:
  


  Reset:
  


  Submit:
  

  



-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com

On Wed, September 14, 2005 12:59 pm, Michael Jouravlev said:
> This is what I was thinking where problem was. I don't know if CSS can
> control borders (and arrows for comboboxes) of input elements.
>
> On 9/14/05, Frank W. Zammetti <[EMAIL PROTECTED]> wrote:
>> Laurie had the right idea... you can disable the border for form fields,
>> and that's what you would want your stylesheet to do.  You may run into
>> some fields that can't be controlled like that, I've never tried to do
>> them all (specifically I'm thinking of selects, which seem to be a world
>> unto themselves many times).
>
> -
> 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: Struts Development Tool

2005-09-14 Thread Steve Beaver
Rich,

That is the main reason I ZIP down my complete eclipse Directory just prior
to Installing anything
NEW into my eclipse enviroment.  Just in case I don't like the plug-in or
the plug-in has UPDATE
problems..

Steve


-Original Message-
From: R. Markham [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 14, 2005 10:59 AM
To: 'Struts Users Mailing List'; [EMAIL PROTECTED]
Subject: AW: Struts Development Tool

Hallo

I just tried Exadel. I don't like because I don't see what I am doing. I
tried the tutorial. It has a graphic display to configure the
struts-config.xml. Editing the struts-config.xml is only a minimum effort in
a web application. The main part is creating and developing the JSP File and
the Action Files.

I want to to uninstall Exadel out of eclipse environment. Has anybody an
idea how I can do this.

Regards

Richard Markham


-Ursprüngliche Nachricht-
Von: david van [mailto:[EMAIL PROTECTED]
Gesendet: Dienstag, 13. September 2005 20:39
An: Struts Users Mailing List
Betreff: Re: Struts Development Tool

try this http://www.exadel.com,

2005/9/14, Steve Beaver <[EMAIL PROTECTED]>:
>
> Raj.
>
> You can also download WWW.STRUTSBOX.DE  for
> eclipse 3.1
>
> Regards
>
> Steve
> -Original Message-
> From: R Rajendran [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, September 13, 2005 12:09 AM
> To: Struts Users Mailing List
> Subject: RE: Struts Development Tool
>
> Thank you.
>
> 
>
> From: Murray Collingwood [mailto:[EMAIL PROTECTED]
> Sent: Mon 9/12/2005 10:49 PM
> To: Struts Users Mailing List
> Subject: Re: Struts Development Tool
>
>
>
> Hi Raj
>
> The main one seems to be Eclipse.
> I'm using NetBeans which is a little behind what Eclipse is providing
> through plugins.
> Following somewhere is JBuilder.
>
> I know Eclipse and NetBeans are both free.
> Eclipse supports a plugin system and there are a number of plugins you can
> purchase
> to provide additional functionality (eg Struts support).
> NetBeans is implementing better Struts support in the next (imminent)
> release.
>
> I haven't heard much about JBuilder, I bought a copy and used it many
> years
> ago when
> I first started on Java. It wasn't that great back then but may well have
> improved.
>
> If you want to really fit in you should probably use Eclipse - it seems to
> be the most
> popular on this Struts list.
>
> Kind regards
> mc
>
>
> On 12 Sep 2005 at 22:17, R Rajendran wrote:
>
> > Hi everyone,
> >
> > Could anyone of you let me know the available Struts Development tools
> (IDE) for
> Windows environment.
> >
> > Thanks
> > Raj
> >
> >
>
>
>
> FOCUS Computing
> Mob: 0415 24 26 24
> [EMAIL PROTECTED]
> http://www.focus-computing.com.au
>
>
>
> --
> No virus found in this outgoing message.
> Checked by AVG Anti-Virus.
> Version: 7.0.344 / Virus Database: 267.10.23/99 - Release Date: 12/09/2005
>
>
> -
> 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]
>
>


--
fancy ^_^


-
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: Some i18n issues

2005-09-14 Thread Ivan Rodriguez
">



Michael Ewers escribió:


The problem is that the  tag doesn't have a formatKey-attribute
and I want the initial value to be displayed in a text-field, not as a pure
html-output.
In other words: I need struts to make a "" out of a "...initial="1000" with
German locale set in browser.

Thans,
Michael.

 


You have to use an initial value of "1000".








Then where you print this initial value, at your jsp, use formatting 
options:


formatKey="format.number" />


format.number is an entry in you MessageResources.properties

For german MessageResources_de.properties:
format.number=#0.000,00

For english MessageResources_en.properties:
format.number=#0,000.00


Michael Ewers escribió:

   


Hi,

I'm new to this group so first of all I'm pleased to have the opportunity
 


to
   


ask questions here.

My question(s):
1) I'm trying to write an application that supports i18n with Struts. I
 


use
   


DynaActionForm for my forms, so I defined them with initial values, e.g.:

   



initial="1.000"
   


/>

I have German and English users. My problem is that it seems to be
impossible to definie initial values for different languages. "1.000" in
Germany means 1000, in UK it means 1. For German users the initial value
should be "1,000".
Is there a solution for this problem?

2) If I use the Validator framework to validate double form values, it's
basically the same problem: Validator seems to know English writing rules
 


of
   


double values but "1,00" is not a valid double value for Validator, even
 


if
   


the browser's Locale is set to German.
Is there a solution?

Bye,
Michael.

-
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]



Re: Printer Friendly Struts Form

2005-09-14 Thread Michael Jouravlev
This is what I was thinking where problem was. I don't know if CSS can
control borders (and arrows for comboboxes) of input elements.

On 9/14/05, Frank W. Zammetti <[EMAIL PROTECTED]> wrote:
> Laurie had the right idea... you can disable the border for form fields,
> and that's what you would want your stylesheet to do.  You may run into
> some fields that can't be controlled like that, I've never tried to do
> them all (specifically I'm thinking of selects, which seem to be a world
> unto themselves many times).

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



AW: Struts Development Tool

2005-09-14 Thread R. Markham
Hallo

I just tried Exadel. I don't like because I don't see what I am doing. I
tried the tutorial. It has a graphic display to configure the
struts-config.xml. Editing the struts-config.xml is only a minimum effort in
a web application. The main part is creating and developing the JSP File and
the Action Files. 

I want to to uninstall Exadel out of eclipse environment. Has anybody an
idea how I can do this.

Regards

Richard Markham


-Ursprüngliche Nachricht-
Von: david van [mailto:[EMAIL PROTECTED] 
Gesendet: Dienstag, 13. September 2005 20:39
An: Struts Users Mailing List
Betreff: Re: Struts Development Tool

try this http://www.exadel.com,

2005/9/14, Steve Beaver <[EMAIL PROTECTED]>: 
> 
> Raj.
> 
> You can also download WWW.STRUTSBOX.DE  for 
> eclipse 3.1
> 
> Regards
> 
> Steve
> -Original Message-
> From: R Rajendran [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, September 13, 2005 12:09 AM
> To: Struts Users Mailing List
> Subject: RE: Struts Development Tool
> 
> Thank you.
> 
> 
> 
> From: Murray Collingwood [mailto:[EMAIL PROTECTED]
> Sent: Mon 9/12/2005 10:49 PM
> To: Struts Users Mailing List
> Subject: Re: Struts Development Tool
> 
> 
> 
> Hi Raj
> 
> The main one seems to be Eclipse.
> I'm using NetBeans which is a little behind what Eclipse is providing
> through plugins.
> Following somewhere is JBuilder.
> 
> I know Eclipse and NetBeans are both free.
> Eclipse supports a plugin system and there are a number of plugins you can
> purchase
> to provide additional functionality (eg Struts support).
> NetBeans is implementing better Struts support in the next (imminent)
> release.
> 
> I haven't heard much about JBuilder, I bought a copy and used it many 
> years
> ago when
> I first started on Java. It wasn't that great back then but may well have
> improved.
> 
> If you want to really fit in you should probably use Eclipse - it seems to
> be the most
> popular on this Struts list.
> 
> Kind regards
> mc
> 
> 
> On 12 Sep 2005 at 22:17, R Rajendran wrote:
> 
> > Hi everyone,
> >
> > Could anyone of you let me know the available Struts Development tools
> (IDE) for
> Windows environment.
> >
> > Thanks
> > Raj
> >
> >
> 
> 
> 
> FOCUS Computing
> Mob: 0415 24 26 24
> [EMAIL PROTECTED]
> http://www.focus-computing.com.au
> 
> 
> 
> --
> No virus found in this outgoing message.
> Checked by AVG Anti-Virus.
> Version: 7.0.344 / Virus Database: 267.10.23/99 - Release Date: 12/09/2005
> 
> 
> -
> 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]
> 
> 


-- 
fancy ^_^


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



Re: Some i18n issues

2005-09-14 Thread Michael Ewers
I've set up a workaround overwriting some Validator-classes to make the
validator locale-aware. But I can't believe no validator-commiter noticed
the problem before and changed the code in CVS. Maybe I'll post my
replacement code in Validator Dev-List.

Thanks,
Michael.

> --- Ursprüngliche Nachricht ---
> Von: Laurie Harper <[EMAIL PROTECTED]>
> An: user@struts.apache.org
> Betreff: Re: Some i18n issues
> Datum: Wed, 14 Sep 2005 11:20:17 -0400
> 
> And for the validator issue, you can localize your validation rules by 
> defining a seperate set for each locale. I don't know if there's a way 
> to make the standard, included validations locale-aware but you can 
> define alternates where necessary if not. Also, Struts 1.3 will 
> introduce an 'extends' mechanism which will let you only override 
> validations for those fields that are locale sensitive without having to 
> repeat the rest.
> 
> L.
> 
> Ivan Rodriguez wrote:
> > You have to use an initial value of "1000".
> > 
> >  > type="org.apache.struts.validator.DynaValidatorForm">
> > 
> >  initial="1000"
> > />
> > 
> > 
> > 
> > 
> > Then where you print this initial value, at your jsp, use formatting 
> > options:
> > 
> >  > formatKey="format.number" />
> > 
> > format.number is an entry in you MessageResources.properties
> > 
> > For german MessageResources_de.properties:
> > format.number=#0.000,00
> > 
> > For english MessageResources_en.properties:
> > format.number=#0,000.00
> > 
> > 
> > Michael Ewers escribió:
> > 
> >> Hi,
> >>
> >> I'm new to this group so first of all I'm pleased to have the 
> >> opportunity to
> >> ask questions here.
> >>
> >> My question(s):
> >> 1) I'm trying to write an application that supports i18n with Struts. 
> >> I use
> >> DynaActionForm for my forms, so I defined them with initial values,
> e.g.:
> >>  >> type="org.apache.struts.validator.DynaValidatorForm">
> >> 
> >>  >> initial="1.000"
> >> />
> >> 
> >> I have German and English users. My problem is that it seems to be
> >> impossible to definie initial values for different languages. "1.000"
> in
> >> Germany means 1000, in UK it means 1. For German users the initial
> value
> >> should be "1,000".
> >> Is there a solution for this problem?
> >>
> >> 2) If I use the Validator framework to validate double form values,
> it's
> >> basically the same problem: Validator seems to know English writing 
> >> rules of
> >> double values but "1,00" is not a valid double value for Validator, 
> >> even if
> >> the browser's Locale is set to German.
> >> Is there a solution?
> >>
> >> Bye,
> >> Michael.
> >>
> >> -
> >> 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: Some i18n issues

2005-09-14 Thread Michael Ewers
The problem is that the  tag doesn't have a formatKey-attribute
and I want the initial value to be displayed in a text-field, not as a pure
html-output.
In other words: I need struts to make a "" out of a "...initial="1000" with
German locale set in browser.

Thans,
Michael.

> You have to use an initial value of "1000".
> 
>   type="org.apache.struts.validator.DynaValidatorForm">
>  
>   initial="1000"
> />
> 
> 
> 
> 
> Then where you print this initial value, at your jsp, use formatting 
> options:
> 
>  formatKey="format.number" />
> 
> format.number is an entry in you MessageResources.properties
> 
> For german MessageResources_de.properties:
> format.number=#0.000,00
> 
> For english MessageResources_en.properties:
> format.number=#0,000.00
> 
> 
> Michael Ewers escribió:
> 
> >Hi,
> >
> >I'm new to this group so first of all I'm pleased to have the opportunity
> to
> >ask questions here.
> >
> >My question(s):
> >1) I'm trying to write an application that supports i18n with Struts. I
> use
> >DynaActionForm for my forms, so I defined them with initial values, e.g.:
> > > type="org.apache.struts.validator.DynaValidatorForm">
> > 
> >  initial="1.000"
> >/>
> >
> >I have German and English users. My problem is that it seems to be
> >impossible to definie initial values for different languages. "1.000" in
> >Germany means 1000, in UK it means 1. For German users the initial value
> >should be "1,000".
> >Is there a solution for this problem?
> >
> >2) If I use the Validator framework to validate double form values, it's
> >basically the same problem: Validator seems to know English writing rules
> of
> >double values but "1,00" is not a valid double value for Validator, even
> if
> >the browser's Locale is set to German.
> >Is there a solution?
> >
> >Bye,
> >Michael.
> >
> >-
> >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: To Whom it may concern

2005-09-14 Thread James Mitchell
Hi Mario, contributing to Open Source can be exciting and frustrating at 
the same time.  I'm happy that you've decided to volunteer your time.


I would say your best bet is to decide on what you'd like to do.  This 
should be something that interests you, which, typically, would be 
something you are having to do at work for work, but that's not always 
the case.


If you aren't sure where you want to help out, a good place to start 
would be to help out with documentation.  This is often the area that is 
lacking in *many* open source projects.  Of if you want write some code 
and not docs, you could add to or improve the projects test coverage.


There are many ways to help.  No need to send a resume.  Your work is 
your resume, a thriving community is your salary, and any "thank you" 
from a user is your bonus.


Welcome to Apache!


--
James Mitchell
Software Engineer / Open Source Evangelist
Consulting / Mentoring / Freelance
EdgeTech, Inc.
http://www.edgetechservices.net/
678.910.8017
AIM:   jmitchtx
MSN:   [EMAIL PROTECTED]
Skype: callto://jmitchtx


[EMAIL PROTECTED] wrote:

Hello again.

I've never contributed to the Apache Project before, but am a regular user 
of its tools and love working with it. This March, I will likely be laid 
off because of the merger between Federated and May companies. I will be 
given a severance package and have decided that I would like to spend 4-6 
months living abroad and contributing to the project. Naturally I wouldn't 
expect to start out as anything more than a Volunteer, but would 
appreciate the challenges of a Committer. I'm writing this now because 
when the time comes, I would like to jump in with a large load, just to 
keep the momentum going. That means I'd probably start doing some small 
contributing to a specific sub-project and stick with it. 

 I've worked for the USPS, the DOD, and now for May/Federated. I'm a BS in 
Com Sci with a math minor (like I'll ever use that again!), am of the 
Meyer OOP school, with a clear understanding of j2ee development and 
N-tier architecture.  I can provide my resume to whomever needs it, so 
just ask. 


Thanks for your time, and looking forward to hearing from someone,

Mariano Hernandez



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



Re: Printer Friendly Struts Form

2005-09-14 Thread Frank W. Zammetti
Laurie had the right idea... you can disable the border for form fields,
and that's what you would want your stylesheet to do.  You may run into
some fields that can't be controlled like that, I've never tried to do
them all (specifically I'm thinking of selects, which seem to be a world
unto themselves many times).

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com

On Wed, September 14, 2005 11:43 am, Michael Jouravlev said:
> On 9/13/05, Laurie Harper <[EMAIL PROTECTED]> wrote:
>> Jeff Deskins wrote:
>> > Is there a way to display all inputs/textareas of a struts form as
>> plain
>> > text for a printer-friendly version of a page?
>> >
>> > This would be similar to how the readonly attribute of a form
>> currently
>> > works in struts, by changing all fields to readonly. However, in this
>> case,
>> > I am looking for something to change all fields to display just the
>> values
>> > instead of the inputs and textareas. This way I can use the same jsp
>> in
>> > combination with css to have a printer-friendly page by passing in a
>> print
>> > parameter to the struts form.
>>
>> You don't need to do anything (Struts specific or otherwise) in your JSP
>> other than provide the appropriate print stylesheet. Add the following
>> to your JSP page:
>>
>>>  media="print"/>
>>
>> (note the 'media' attribute). Then, in print.css you can make whatever
>> formatting changes you want for printed copy, including supressing input
>> lables if you want.
>>
>> This article might help shed more light:
>>
>>http://www.alistapart.com/articles/goingtoprint
>
> He does not want to suppress form elements, he wants to print existing
> input fields and textareas without borders, as labels.
>
> Michael.
>
> -
> 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 to replace normal html-from through html:form in Struts? Example

2005-09-14 Thread Frank W. Zammetti
On Wed, September 14, 2005 11:15 am, Laurie Harper said:
> I think your 'semantics' arugment may be confusing two orthogonal sets
> of semantics, but I do see where you're coming from.

Could be.  Wouldn't be the first time :)

> We're well off-topic so I'm keeping this brief, but feel free to follow
> up off-list if you want to discuss further.

Yeah, definitely OT now... probably no need to continue... it's not in the
end a big deal either way I suppose... both our approaches work and
neither is so much more right than the other (if at all) that we're going
to convince everyone either way, so I'm content to call it a draw and
continue on our merry ways :)

> L.

Frank

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



[TEST] Test please ignore

2005-09-14 Thread Leon Rosenberg
Test please ignore, switched account to gmail and somehow my mails
seems to be ignored...

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



Re: Struts, JSP 2.0 and Jasper2 compiler error

2005-09-14 Thread Clark Wright

At 09:03 PM 9/13/2005, you wrote:
I'm not sure about this; at worst, wouldn't it be sufficient to recompile 
just the Struts taglibs against the Servlet 2.4 / JSP 2.0 APIs? There 
should be no need to upgrade to J2SE 5 or to recompile any other part of 
Struts as far as I can see.


That being said, I'm not sure any of this is necessary. I'm using Struts 
1.2.7 on Tomcat 5.x without any problem what-so-ever. Perhaps Jasperc2 has 
options to control which level of JSP spec it targets and defaults to 
something backwards-compatible when called during normal operation of the 
Tomcat?


Clark, I suggest you look into that before going to the effort of 
recompiling everything, especially since you'd then be running a 
non-standard Struts build and would presumably have to repeat the effort 
every time you upgrade...


Found the culprit - a reference to a v1.3 j2ee jar on the build path...

cleaned up the build path, its all good.

- clark.



L.

Martin Gainty wrote:

Clark-
The only way I know you can achieve 100% compatibility would be if
You recompile the entire struts package library with J2SE 5.0
which means compiling
TagLibs, JSP Pages and Servlet, external providers and jars (basically 
everything) with the 5.0 JDK to conform to the 2.0 JSP Servlet spec

Peronally I would feel more comfortable if the original authors did this but
I think this could also be a fun weekend project..
In any case let me know how you make out or if I can help out in any way,
Does anyone else have a solution for this??
Martin-
617-852-7822
- Original Message - From: "Clark Wright" 
<[EMAIL PROTECTED]>

To: "Martin Gainty" <[EMAIL PROTECTED]>
Cc: "Struts Users Mailing List" 
Sent: Tuesday, September 13, 2005 12:58 PM
Subject: Re: Struts, JSP 2.0 and Jasper2 compiler error


At 11:10 AM 9/13/2005, Martin Gainty wrote:


Clark-

Ant has not upgraded the JSPC task for the JSP Servlet 2.0 spec as of 
yet to quote
"There are known problems with Tomcat 5.x that won't get fixed in Ant, 
please use Tomcat's jspc task instead."



Yup, been there, gotten it to work for a while now.

The real issue seems to be backwards compatibility when generating the 
java code for taglibs that are adhering to version 1.1 of the JSP spec 
while using the Tomcat 5.5 version of JasperC, which implements the 2.0 spec.


For instance,
using JasperC from Tomcat 4.x (which also required the custom ant 
config), the following class would be generated:


  private boolean
_jspx_meth_html_img_0(javax.servlet.jsp.tagext.Tag _jspx_th_html_link_0,
 javax.servlet.jsp.PageContext pageContext)
  throws Throwable

Now, using the Tomcat 5.5 jasperC, you get this class:

private boolean
_jspx_meth_html_link_0 (javax.servlet.jsp.tagext.JspTag 
_jspx_th_html_html_0,

PageContext _jspx_page_context)
  throws Throwable

Now, same jsp, same taglib, same backing jar.  The only difference is 
that the version of JasperC changed.


The first example adheres to JSP 1.1, the second to JSP 2.0.

But, since the taglib, and its jar, where generated/compiled for jsp 
1.1, you get a "cannot be applied error" since the class hierarchy for 
the tags themselves changed with jsp 2.0.


Since Tomcat 5.5 has been out for a year, I can not be the first person 
to run into this, so what am I missing?


Thanks,
- clark.,

-
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: JavascriptValidatorTag.doStartTag(JavascriptValidatorTag.java:309) ( URGENT !! )

2005-09-14 Thread Ivan Rodriguez
Martin, Oracle ADF Runtime needs to be installed...but if it is used ;) 
I think Erol is not using ADF.


Erol, keep in mind that tomcat and IAS are *different*.  I saw a similar 
error with tomcat doing automatic string-number cast, and IAS not.


Martin Gainty escribió:

Be mindful that Oracle ADF Runtime needs to be installed on the target 
webapp server check out
http://www.oracle.com/technology/products/jdev/howtos/10g/adf_runtime_update_howto.html 


HTH,
Martin-
- Original Message - From: "Laurie Harper" <[EMAIL PROTECTED]>
To: 
Sent: Wednesday, September 14, 2005 11:25 AM
Subject: Re: 
JavascriptValidatorTag.doStartTag(JavascriptValidatorTag.java:309) ( 
URGENT !! )



I don't have the 1.1 source code checked out so I don't know exactly 
what it's failing on but I would suggest checking two things:


1) make sure all the attribute values you're passing into the tag are 
valid, and


2) make sure the form bean for the enclosing form tag is being found 
(i.e. that you have your form-bean / action mappings setup right.


L.

EROL TEZCAN wrote:


Hi,
 We want to deploy an struts application to live server (oracle 10g 
IAS). This application is working properly on our local server. But 
when we want to deploy and start this app. it gives an error like this.

 500 Internal Server Error
java.lang.NullPointerException
  at 
org.apache.struts.taglib.html.JavascriptValidatorTag.doStartTag(JavascriptValidatorTag.java:309) 


  at _index._jspService(_index.java:215)
  [SRC:/index.jsp:61]
  at com.orionserver[Oracle Application Server Containers for 
J2EE 10g 
(9.0.4.1.0)].http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
  at 
oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:349)
  at 
oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509)

  at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
  at com.evermind[Oracle Application Server Containers for J2EE 
10g 
(9.0.4.1.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:765) 




  at com.evermind[Oracle Application Server Containers for J2EE 
10g 
(9.0.4.1.0)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317) 

  at com.evermind[Oracle Application Server Containers for J2EE 
10g 
(9.0.4.1.0)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:793) 

  at com.evermind[Oracle Application Server Containers for J2EE 
10g 
(9.0.4.1.0)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:208) 

  at com.evermind[Oracle Application Server Containers for J2EE 
10g 
(9.0.4.1.0)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:125) 

  at com.evermind[Oracle Application Server Containers for J2EE 
10g 
(9.0.4.1.0)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192) 


  at java.lang.Thread.run(Thread.java:536)

We use struts 1.1 ( old versiyon not 1.2.7 )and all xml, jar .. 
files are in the right place. How can we solve this ? It is very 
urgent solving this problem. Thanks,

 Erol


-
Yahoo! for Good
 Click here to donate to the Hurricane Katrina relief effort.




-
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: JavascriptValidatorTag.doStartTag(JavascriptValidatorTag.java:309) ( URGENT !! )

2005-09-14 Thread Martin Gainty
Be mindful that Oracle ADF Runtime needs to be installed on the target 
webapp server check out

http://www.oracle.com/technology/products/jdev/howtos/10g/adf_runtime_update_howto.html
HTH,
Martin-
- Original Message - 
From: "Laurie Harper" <[EMAIL PROTECTED]>

To: 
Sent: Wednesday, September 14, 2005 11:25 AM
Subject: Re: 
JavascriptValidatorTag.doStartTag(JavascriptValidatorTag.java:309) ( URGENT 
!! )



I don't have the 1.1 source code checked out so I don't know exactly what 
it's failing on but I would suggest checking two things:


1) make sure all the attribute values you're passing into the tag are 
valid, and


2) make sure the form bean for the enclosing form tag is being found (i.e. 
that you have your form-bean / action mappings setup right.


L.

EROL TEZCAN wrote:

Hi,
 We want to deploy an struts application to live server (oracle 10g IAS). 
This application is working properly on our local server. But when we 
want to deploy and start this app. it gives an error like this.

 500 Internal Server Error
java.lang.NullPointerException
  at 
org.apache.struts.taglib.html.JavascriptValidatorTag.doStartTag(JavascriptValidatorTag.java:309)

  at _index._jspService(_index.java:215)
  [SRC:/index.jsp:61]
  at com.orionserver[Oracle Application Server Containers for J2EE 
10g (9.0.4.1.0)].http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)

  at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:349)
  at 
oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509)

  at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
  at com.evermind[Oracle Application Server Containers for J2EE 10g 
(9.0.4.1.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:765)


  at com.evermind[Oracle Application Server Containers for J2EE 10g 
(9.0.4.1.0)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
  at com.evermind[Oracle Application Server Containers for J2EE 10g 
(9.0.4.1.0)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:793)
  at com.evermind[Oracle Application Server Containers for J2EE 10g 
(9.0.4.1.0)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:208)
  at com.evermind[Oracle Application Server Containers for J2EE 10g 
(9.0.4.1.0)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:125)
  at com.evermind[Oracle Application Server Containers for J2EE 10g 
(9.0.4.1.0)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)

  at java.lang.Thread.run(Thread.java:536)

We use struts 1.1 ( old versiyon not 1.2.7 )and all xml, jar .. files are 
in the right place. How can we solve this ? It is very urgent solving 
this problem. Thanks,

 Erol


-
Yahoo! for Good
 Click here to donate to the Hurricane Katrina relief effort.



-
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: Printer Friendly Struts Form

2005-09-14 Thread Michael Jouravlev
On 9/13/05, Laurie Harper <[EMAIL PROTECTED]> wrote:
> Jeff Deskins wrote:
> > Is there a way to display all inputs/textareas of a struts form as plain
> > text for a printer-friendly version of a page?
> >
> > This would be similar to how the readonly attribute of a form currently
> > works in struts, by changing all fields to readonly. However, in this case,
> > I am looking for something to change all fields to display just the values
> > instead of the inputs and textareas. This way I can use the same jsp in
> > combination with css to have a printer-friendly page by passing in a print
> > parameter to the struts form.
> 
> You don't need to do anything (Struts specific or otherwise) in your JSP
> other than provide the appropriate print stylesheet. Add the following
> to your JSP page:
> 
>  media="print"/>
> 
> (note the 'media' attribute). Then, in print.css you can make whatever
> formatting changes you want for printed copy, including supressing input
> lables if you want.
> 
> This article might help shed more light:
> 
>http://www.alistapart.com/articles/goingtoprint

He does not want to suppress form elements, he wants to print existing
input fields and textareas without borders, as labels.

Michael.

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



Re: Problem with html:option default selected

2005-09-14 Thread Laurie Harper

http://svn.apache.org/builds/struts/maven/trunk/site-test/struts-taglib/tlddoc/html/tld-summary.html

See, in particular, the select, option, options, and optionsCollection tags.

L.

Kade Jeevan Kumar wrote:

Hi!
 
What is the corresponding code in Struts for the given html
 


Two
one

 
-Thanks in Advance

Jeevan



-
Yahoo! for Good
 Click here to donate to the Hurricane Katrina relief effort. 



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



Re: Some i18n issues

2005-09-14 Thread Laurie Harper
And for the validator issue, you can localize your validation rules by 
defining a seperate set for each locale. I don't know if there's a way 
to make the standard, included validations locale-aware but you can 
define alternates where necessary if not. Also, Struts 1.3 will 
introduce an 'extends' mechanism which will let you only override 
validations for those fields that are locale sensitive without having to 
repeat the rest.


L.

Ivan Rodriguez wrote:

You have to use an initial value of "1000".








Then where you print this initial value, at your jsp, use formatting 
options:


formatKey="format.number" />


format.number is an entry in you MessageResources.properties

For german MessageResources_de.properties:
format.number=#0.000,00

For english MessageResources_en.properties:
format.number=#0,000.00


Michael Ewers escribió:


Hi,

I'm new to this group so first of all I'm pleased to have the 
opportunity to

ask questions here.

My question(s):
1) I'm trying to write an application that supports i18n with Struts. 
I use

DynaActionForm for my forms, so I defined them with initial values, e.g.:


initial="1.000"

/>

I have German and English users. My problem is that it seems to be
impossible to definie initial values for different languages. "1.000" in
Germany means 1000, in UK it means 1. For German users the initial value
should be "1,000".
Is there a solution for this problem?

2) If I use the Validator framework to validate double form values, it's
basically the same problem: Validator seems to know English writing 
rules of
double values but "1,00" is not a valid double value for Validator, 
even if

the browser's Locale is set to German.
Is there a solution?

Bye,
Michael.

-
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: JavascriptValidatorTag.doStartTag(JavascriptValidatorTag.java:309) ( URGENT !! )

2005-09-14 Thread Laurie Harper
I don't have the 1.1 source code checked out so I don't know exactly 
what it's failing on but I would suggest checking two things:


1) make sure all the attribute values you're passing into the tag are 
valid, and


2) make sure the form bean for the enclosing form tag is being found 
(i.e. that you have your form-bean / action mappings setup right.


L.

EROL TEZCAN wrote:

Hi,
 
We want to deploy an struts application to live server (oracle 10g IAS). This application is working properly on our local server. But when we want to deploy and start this app. it gives an error like this.
 
500 Internal Server Error

java.lang.NullPointerException
  at 
org.apache.struts.taglib.html.JavascriptValidatorTag.doStartTag(JavascriptValidatorTag.java:309)
  at _index._jspService(_index.java:215)
  [SRC:/index.jsp:61]
  at com.orionserver[Oracle Application Server Containers for J2EE 10g 
(9.0.4.1.0)].http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
  at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:349)
  at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509)
  at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
  at com.evermind[Oracle Application Server Containers for J2EE 10g 
(9.0.4.1.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:765)



  at com.evermind[Oracle Application Server Containers for J2EE 10g 
(9.0.4.1.0)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
  at com.evermind[Oracle Application Server Containers for J2EE 10g 
(9.0.4.1.0)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:793)
  at com.evermind[Oracle Application Server Containers for J2EE 10g 
(9.0.4.1.0)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:208)
  at com.evermind[Oracle Application Server Containers for J2EE 10g 
(9.0.4.1.0)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:125)
  at com.evermind[Oracle Application Server Containers for J2EE 10g 
(9.0.4.1.0)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
  at java.lang.Thread.run(Thread.java:536)

We use struts 1.1 ( old versiyon not 1.2.7 )and all xml, jar .. files are in the right place. 
 
How can we solve this ? It is very urgent solving this problem. 
 
Thanks,
 
Erol



-
Yahoo! for Good
 Click here to donate to the Hurricane Katrina relief effort. 



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



Re: How to replace normal html-from through html:form in Struts? Example

2005-09-14 Thread Laurie Harper
I think your 'semantics' arugment may be confusing two orthogonal sets 
of semantics, but I do see where you're coming from.


We're well off-topic so I'm keeping this brief, but feel free to follow 
up off-list if you want to discuss further.


L.

Frank W. Zammetti wrote:


On Wed, September 14, 2005 6:35 am, Laurie Harper said:


I never said you *shouldn't* use 'class' to style elements :-)



True enough :)



That's the right answer when you want to apply the same set of styles to
multiple elements (although even without the 'class' attribute here,
you'd still only need to define one rule in the stylesheet... it would
just jave 3 selectors).



Yeah, that's true.  Even still though, 3 selectors feels like a little
more complexity than there needs to be.  I suppose it's like preferring
a++; over a=a+1; ... neither is complicated by any stretch, but the
postfix just seems slightly cleaner.  I know some people feel the exact
opposite though, so I'm coming down to personal preference, not the basis
of a strong argument :)



Specifically, the first sentence of the last paragraph:

"The use of ID is appropriate when a style only needs to be applied once
in any document."

That's another way of saying what I was trying to say above :)


Note that there's no corollary there that this is in any way
inappropriate, though. If I only *want* to apply styles to one element
in the document, this is the way to do it.



Yes, I definitely agree there is nothing saying that is inappropriate.  I
would still make the argument however that it semantically doesn't feel
right... it's almost as if instead of saying:

class B extends A { }

...I instead did something like:

B b(extendsA) = new B();

That's of course not real syntax, but pretend it is :)  What I'm trying to
say is that it's almost like I'm tying what class B extends into the
identification of an instance of B.  That's what using the ID feels like
to me.



There's a difference between class and style, though. Class and ID are
two different 'hooks' by which you can associate style with (one or
more) elements. CSS provides all sorts of selectors besides class
selectors, after all.



True enough :)



'id' is guaranteed unique in any valid document, whereas 'class' is
(obviously) not. So, if I know that the thing I want to style should
occur exactly once (for example, a title at the start of an article) I
can assign it an ID. By attaching styles via the ID, I can be sure those
styles will never be applied anywhere else in the document, because the
ID must be unique. If it's not, I'll get an error when I validate the
document.

On the other hand, if I use 'class' instead of 'id', that class could be
re-used elsewhere in the document. That won't be caught by validation,
or anything else but visual inspection of the result.



Ah, gotcha.



OK, so it probably not something you care about very often ;-) My point
was just that, while IDs must be unique and that uniqueness is checked
during validation, no such restriction applies to 'class'.



Makes sense.  Yeah, I'm not sure how often it would come up, but if
someone knew it would be a concern, and I could see where it might be if
you have a lot of page designers working in parallel, you might be able to
convince me on this basis.



Heh :) Have you had any experiences where using CSS ID selectors was
actually bad, or caused problems?



No, I can't say that I have.

Ok, I will amend my original comment after this discussion...

It's considered a bad practice, but only by me :)  And not for any real,
concrete technical reasons, just because it doesn't quite *feel* right :)



L.



(F)rank :)



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



Re: How to replace normal html-from through html:form in Struts? Example

2005-09-14 Thread Laurie Harper

Frank W. Zammetti wrote:

If I don't want to use scripting I guess I could use something like
${requestScope['org.apache.struts.action.mapping.instance'].name}

But what if the Globals.MAPPING_KEY will change ... :-)


That's why you want to use the field in Globals... if the key under which
the mapping will be found is changed, your code doesn't need to change. 
If you use the value as it currently is today as you show above, you'll

need to change that it someone changes the key down the road.  That's the
whole point of that Globals class.


I think it's pretty safe to say it *wont* change, though, since not just 
the field but also its value are part of the public API, and Struts *is* 
very good about maintaining backwards compatibility, after all :-)


L.


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



Re: Some i18n issues

2005-09-14 Thread Ivan Rodriguez

You have to use an initial value of "1000".








Then where you print this initial value, at your jsp, use formatting 
options:


formatKey="format.number" />


format.number is an entry in you MessageResources.properties

For german MessageResources_de.properties:
format.number=#0.000,00

For english MessageResources_en.properties:
format.number=#0,000.00


Michael Ewers escribió:


Hi,

I'm new to this group so first of all I'm pleased to have the opportunity to
ask questions here.

My question(s):
1) I'm trying to write an application that supports i18n with Struts. I use
DynaActionForm for my forms, so I defined them with initial values, e.g.:




I have German and English users. My problem is that it seems to be
impossible to definie initial values for different languages. "1.000" in
Germany means 1000, in UK it means 1. For German users the initial value
should be "1,000".
Is there a solution for this problem?

2) If I use the Validator framework to validate double form values, it's
basically the same problem: Validator seems to know English writing rules of
double values but "1,00" is not a valid double value for Validator, even if
the browser's Locale is set to German.
Is there a solution?

Bye,
Michael.

-
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 to replace normal html-from through html:form in Struts? Example

2005-09-14 Thread Frank W. Zammetti
On Wed, September 14, 2005 10:15 am, Tamas Szabo said:
> I definitely like clean code and if I'm looking at the generated HTML
> I agree that it is cleaner if you reference the form by name.
> But in the JSP it's just doesn't seem right to reference a form
> name that will appear only in the generated HTML, based on a config
> file value.
> It just doesn't seem clean ...

You could make that argument :)

> If I don't want to use scripting I guess I could use something like
> ${requestScope['org.apache.struts.action.mapping.instance'].name}
>
> But what if the Globals.MAPPING_KEY will change ... :-)

That's why you want to use the field in Globals... if the key under which
the mapping will be found is changed, your code doesn't need to change. 
If you use the value as it currently is today as you show above, you'll
need to change that it someone changes the key down the road.  That's the
whole point of that Globals class.

> A tag would be handy for this ...

Pretty trivial... go for it :)

> Tamas

Frank


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



Re: How to replace normal html-from through html:form in Struts? Example

2005-09-14 Thread Tamas Szabo
> 
> I would say that the code that is yielded when you reference the form by
> name is clearer and thus better regardless and I would throw away the 
> possibility of someone changing the name in the config file. It's more
> important that the code be as explicit IMO.


I definitely like clean code and if I'm looking at the generated HTML
I agree that it is cleaner if you reference the form by name.
But in the JSP it's just doesn't seem right to reference a form
name that will appear only in the generated HTML, based on a config
file value. 
It just doesn't seem clean ... 

> Isn't there a struts tag which for a given action path it gives me the 

> > name of the associated form?
> 
> You mean the associated ActionForm? I don't think there is a tag to so
> that specifically, but you can get at that information by doing:
> 
> <% ActionConfig mapping = (ActionConfig)request.getAttribute( 
> Globals.MAPPING_KEY); %>


If I don't want to use scripting I guess I could use something like 
${requestScope['org.apache.struts.action.mapping.instance'].name}

But what if the Globals.MAPPING_KEY will change ... :-)

A tag would be handy for this ...

Tamas


Some i18n issues

2005-09-14 Thread Michael Ewers
Hi,

I'm new to this group so first of all I'm pleased to have the opportunity to
ask questions here.

My question(s):
1) I'm trying to write an application that supports i18n with Struts. I use
DynaActionForm for my forms, so I defined them with initial values, e.g.:

 
 

I have German and English users. My problem is that it seems to be
impossible to definie initial values for different languages. "1.000" in
Germany means 1000, in UK it means 1. For German users the initial value
should be "1,000".
Is there a solution for this problem?

2) If I use the Validator framework to validate double form values, it's
basically the same problem: Validator seems to know English writing rules of
double values but "1,00" is not a valid double value for Validator, even if
the browser's Locale is set to German.
Is there a solution?

Bye,
Michael.

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



Re: How to replace normal html-from through html:form in Struts? Example

2005-09-14 Thread Frank W. Zammetti


On Wed, September 14, 2005 6:35 am, Laurie Harper said:
> I never said you *shouldn't* use 'class' to style elements :-)

True enough :)

> That's the right answer when you want to apply the same set of styles to
> multiple elements (although even without the 'class' attribute here,
> you'd still only need to define one rule in the stylesheet... it would
> just jave 3 selectors).

Yeah, that's true.  Even still though, 3 selectors feels like a little
more complexity than there needs to be.  I suppose it's like preferring
a++; over a=a+1; ... neither is complicated by any stretch, but the
postfix just seems slightly cleaner.  I know some people feel the exact
opposite though, so I'm coming down to personal preference, not the basis
of a strong argument :)

>> Specifically, the first sentence of the last paragraph:
>>
>> "The use of ID is appropriate when a style only needs to be applied once
>> in any document."
>>
>> That's another way of saying what I was trying to say above :)
>
> Note that there's no corollary there that this is in any way
> inappropriate, though. If I only *want* to apply styles to one element
> in the document, this is the way to do it.

Yes, I definitely agree there is nothing saying that is inappropriate.  I
would still make the argument however that it semantically doesn't feel
right... it's almost as if instead of saying:

class B extends A { }

...I instead did something like:

B b(extendsA) = new B();

That's of course not real syntax, but pretend it is :)  What I'm trying to
say is that it's almost like I'm tying what class B extends into the
identification of an instance of B.  That's what using the ID feels like
to me.

> There's a difference between class and style, though. Class and ID are
> two different 'hooks' by which you can associate style with (one or
> more) elements. CSS provides all sorts of selectors besides class
> selectors, after all.

True enough :)

> 'id' is guaranteed unique in any valid document, whereas 'class' is
> (obviously) not. So, if I know that the thing I want to style should
> occur exactly once (for example, a title at the start of an article) I
> can assign it an ID. By attaching styles via the ID, I can be sure those
> styles will never be applied anywhere else in the document, because the
> ID must be unique. If it's not, I'll get an error when I validate the
> document.
>
> On the other hand, if I use 'class' instead of 'id', that class could be
> re-used elsewhere in the document. That won't be caught by validation,
> or anything else but visual inspection of the result.

Ah, gotcha.

> OK, so it probably not something you care about very often ;-) My point
> was just that, while IDs must be unique and that uniqueness is checked
> during validation, no such restriction applies to 'class'.

Makes sense.  Yeah, I'm not sure how often it would come up, but if
someone knew it would be a concern, and I could see where it might be if
you have a lot of page designers working in parallel, you might be able to
convince me on this basis.

> Heh :) Have you had any experiences where using CSS ID selectors was
> actually bad, or caused problems?

No, I can't say that I have.

Ok, I will amend my original comment after this discussion...

It's considered a bad practice, but only by me :)  And not for any real,
concrete technical reasons, just because it doesn't quite *feel* right :)

> L.

(F)rank :)



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



Re: How to create on-the-fly javascript code? - Solved

2005-09-14 Thread Thai Dang Vu
You've got a lot of experiences Joe. I forgot to put the taglib declaration at 
the beginning of the jsp file. Sorry for my stupid question.

>>> [EMAIL PROTECTED] 9/14/2005 9:15:07 AM >>>
At 8:59 AM -0400 9/14/05, Thai Dang Vu wrote:
>Hello,
>
>I want to write something like this in a jsp file
>
>
>   function f() {
>   return ;
>   }
>
>
>but the bean:write tag isn't processed. So how can I make it processed?

If the bean:write tag isn't being processed, have you checked to make 
sure you have the necessary taglib declarations in your page?  I do 
this kind of stuff all the time, and it's not fundamentally a problem.

Don't forget that if some_bean.a_property is a string, you should 
quote it.  Also, as noted, you could just as well use

or if you are able to use JSP 2.0, the much more concise
${some_bean.a_property}

Joe

-- 
Joe Germuska
[EMAIL PROTECTED]  
http://blog.germuska.com
"Narrow minds are weapons made for mass destruction"  -The Ex

-
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 to replace normal html-from through html:form in Struts? Example

2005-09-14 Thread Frank W. Zammetti
On Wed, September 14, 2005 6:35 am, Laurie Harper said:
> I never said you *shouldn't* use 'class' to style elements :-)

True enough :)

> That's the right answer when you want to apply the same set of styles to
> multiple elements (although even without the 'class' attribute here,
> you'd still only need to define one rule in the stylesheet... it would
> just jave 3 selectors).

Yeah, that's true.  Even still though, 3 selectors feels like a little
more complexity than there needs to be.  I suppose it's like preferring
a++; over a=a+1; ... neither is complicated by any stretch, but the
postfix just seems slightly cleaner.  I know some people feel the exact
opposite though, so I'm coming down to personal preference, not the basis
of a strong argument :)

>> Specifically, the first sentence of the last paragraph:
>>
>> "The use of ID is appropriate when a style only needs to be applied once
>> in any document."
>>
>> That's another way of saying what I was trying to say above :)
>
> Note that there's no corollary there that this is in any way
> inappropriate, though. If I only *want* to apply styles to one element
> in the document, this is the way to do it.

Yes, I definitely agree there is nothing saying that is inappropriate.  I
would still make the argument however that it semantically doesn't feel
right... it's almost as if instead of saying:

class B extends A { }

...I instead did something like:

B b(extendsA) = new B();

That's of course not real syntax, but pretend it is :)  What I'm trying to
say is that it's almost like I'm tying what class B extends into the
identification of an instance of B.  That's what using the ID feels like
to me.

> There's a difference between class and style, though. Class and ID are
> two different 'hooks' by which you can associate style with (one or
> more) elements. CSS provides all sorts of selectors besides class
> selectors, after all.

True enough :)

> 'id' is guaranteed unique in any valid document, whereas 'class' is
> (obviously) not. So, if I know that the thing I want to style should
> occur exactly once (for example, a title at the start of an article) I
> can assign it an ID. By attaching styles via the ID, I can be sure those
> styles will never be applied anywhere else in the document, because the
> ID must be unique. If it's not, I'll get an error when I validate the
> document.
>
> On the other hand, if I use 'class' instead of 'id', that class could be
> re-used elsewhere in the document. That won't be caught by validation,
> or anything else but visual inspection of the result.

Ah, gotcha.

> OK, so it probably not something you care about very often ;-) My point
> was just that, while IDs must be unique and that uniqueness is checked
> during validation, no such restriction applies to 'class'.

Makes sense.  Yeah, I'm not sure how often it would come up, but if
someone knew it would be a concern, and I could see where it might be if
you have a lot of page designers working in parallel, you might be able to
convince me on this basis.

> Heh :) Have you had any experiences where using CSS ID selectors was
> actually bad, or caused problems?

No, I can't say that I have.

Ok, I will amend my original comment after this discussion...

It's considered a bad practice, but only by me :)  And not for any real,
concrete technical reasons, just because it doesn't quite *feel* right :)

> L.

(F)rank :)


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



Re: How to create on-the-fly javascript code?

2005-09-14 Thread Martin Gainty

Indeed...This is a good solution for creating html javascript

If you are using javascript for validation
(based on the validation rules loaded by the ValidatorPlugIn)
you can use the html:javascript Tag
documentation available here at
http://struts.apache.org/userGuide/struts-html.html#javascript
(This will cache your javascript if staticJavaScript attribute set to true 
and dynamicJavaScript attribute set to false)


Martin-

- Original Message - 
From: "Holshausen, Ron" <[EMAIL PROTECTED]>

To: "Struts Users Mailing List" 
Sent: Wednesday, September 14, 2005 9:04 AM
Subject: RE: How to create on-the-fly javascript code?


Hi,

I have used the JSTL c:out tag to do this, e.g., ;

-Original Message-
From: Thai Dang Vu [mailto:[EMAIL PROTECTED]
Sent: 14 September 2005 15:59
To: user@struts.apache.org
Subject: How to create on-the-fly javascript code?

Hello,

I want to write something like this in a jsp file


 function f() {
 return ;
 }


but the bean:write tag isn't processed. So how can I make it processed?

Thank you.


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

E-Mail Disclaimer

Aus Rechts- und Sicherheitsgruenden ist die in dieser E-Mail gegebene
Information nicht rechtsverbindlich. Eine rechtsverbindliche Bestaetigung
reichen wir Ihnen gerne auf Anforderung in schriftlicher Form nach.
Beachten Sie bitte, dass jede Form der unautorisierten Nutzung,
Veroeffentlichung, Vervielfaeltigung oder Weitergabe des Inhalts dieser
E-Mail nicht gestattet ist. Diese Nachricht ist ausschliesslich fuer
den bezeichneten Adressaten oder dessen Vertreter bestimmt. Sollten Sie
nicht der vorgesehene Adressat dieser E-Mail oder dessen Vertreter sein,
so bitten wir Sie, sich mit dem Absender der E-Mail in Verbindung zu setzen.


For legal and security reasons the information provided in this e-mail is 
not
legally binding. Upon request we would be pleased to provide you with a 
legally
binding confirmation in written form. Any form of unauthorised use, 
publication,
reproduction, copying or disclosure of the content of this e-mail is not 
permitted.
This message is exclusively for the person addressed or their 
representative.
If you are not the intended recipient of this message and its contents, 
please

notify the sender immediately.

-
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 to create on-the-fly javascript code?

2005-09-14 Thread Joe Germuska

At 8:59 AM -0400 9/14/05, Thai Dang Vu wrote:

Hello,

I want to write something like this in a jsp file


  function f() {
  return ;
  }


but the bean:write tag isn't processed. So how can I make it processed?


If the bean:write tag isn't being processed, have you checked to make 
sure you have the necessary taglib declarations in your page?  I do 
this kind of stuff all the time, and it's not fundamentally a problem.


Don't forget that if some_bean.a_property is a string, you should 
quote it.  Also, as noted, you could just as well use


or if you are able to use JSP 2.0, the much more concise
${some_bean.a_property}

Joe

--
Joe Germuska
[EMAIL PROTECTED]  
http://blog.germuska.com
"Narrow minds are weapons made for mass destruction"  -The Ex


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



RE: Adding parameters to redirected forwards

2005-09-14 Thread Frank W. Zammetti
Hi Ron,

We're actually talking about two different things... there are request
PARAMETERS and request ATTRIBUTES.  What you say is of course accurate,
you can call setAttribute() on a request and forward it along and you'll
have access to those attributes.  But that is different from parameters. 
They are stored in two different collections, and are accessed with two
different methods (getAttribute() as opposed to getParameter()).

Parameters can only be attached to a request by appending a query string
to the URI being requested, or POSTing a form that includes them.  The
servlet spec, up to and including 2.4 apparently, does not provide a way
to add parameters, only attributes.

Frank

On Wed, September 14, 2005 2:51 am, Holshausen, Ron said:
> If you want to just forward the request along, just add any parameters
> to the request object via the setAttribute method.
>
> -Original Message-
> From: Frank W. Zammetti [mailto:[EMAIL PROTECTED]
> Sent: 14 September 2005 08:46
> To: Struts Users Mailing List
> Subject: Re: Adding parameters to redirected forwards
>
> Xavier Vanderstukken wrote:
>> IS that class really performs a redirect request?
>> Can I use the setRedirect method to false to performs a forward with
>> parameters?
>
> Interesting question... someone can correct me if I'm wrong, but I
> believe the answer is no.  Well, to be more precise, you *may* be able
> tp setRedirect(false) to do a forward, I do not know for sure, but you
> won't be able to add parameters.
>
> Up to and including servlet spec 2.4, there is no addParameter() method
> of HttpServletRequest, or any superclass.  Since when you do a forward
> you are passing the same request along, you would need this method to
> add parameters.
>
> When you do a redirect however, the URL you redirect to includes the
> parameters as a query string.
>
> So, no, I do not believe it is ever possible, with ActionRedirect or
> not, to add parameters when doing a forward, only when doing a redirect.
>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>>
>> .
>>
>
> --
> Frank W. Zammetti
> Founder and Chief Software Architect
> Omnytex Technologies
> http://www.omnytex.com
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
> E-Mail Disclaimer
>
> Aus Rechts- und Sicherheitsgruenden ist die in dieser E-Mail gegebene
> Information nicht rechtsverbindlich. Eine rechtsverbindliche Bestaetigung
> reichen wir Ihnen gerne auf Anforderung in schriftlicher Form nach.
> Beachten Sie bitte, dass jede Form der unautorisierten Nutzung,
> Veroeffentlichung, Vervielfaeltigung oder Weitergabe des Inhalts dieser
> E-Mail nicht gestattet ist. Diese Nachricht ist ausschliesslich fuer
> den bezeichneten Adressaten oder dessen Vertreter bestimmt. Sollten Sie
> nicht der vorgesehene Adressat dieser E-Mail oder dessen Vertreter sein,
> so bitten wir Sie, sich mit dem Absender der E-Mail in Verbindung zu
> setzen.
>
>
> For legal and security reasons the information provided in this e-mail is
> not
> legally binding. Upon request we would be pleased to provide you with a
> legally
> binding confirmation in written form. Any form of unauthorised use,
> publication,
> reproduction, copying or disclosure of the content of this e-mail is not
> permitted.
> This message is exclusively for the person addressed or their
> representative.
> If you are not the intended recipient of this message and its contents,
> please
> notify the sender immediately.
>


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



RE: How to create on-the-fly javascript code?

2005-09-14 Thread Holshausen, Ron
Hi,

I have used the JSTL c:out tag to do this, e.g., ;

-Original Message-
From: Thai Dang Vu [mailto:[EMAIL PROTECTED] 
Sent: 14 September 2005 15:59
To: user@struts.apache.org
Subject: How to create on-the-fly javascript code?

Hello,

I want to write something like this in a jsp file


  function f() {
  return ;
  }


but the bean:write tag isn't processed. So how can I make it processed?

Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 
E-Mail Disclaimer 
 
Aus Rechts- und Sicherheitsgruenden ist die in dieser E-Mail gegebene 
Information nicht rechtsverbindlich. Eine rechtsverbindliche Bestaetigung 
reichen wir Ihnen gerne auf Anforderung in schriftlicher Form nach. 
Beachten Sie bitte, dass jede Form der unautorisierten Nutzung, 
Veroeffentlichung, Vervielfaeltigung oder Weitergabe des Inhalts dieser 
E-Mail nicht gestattet ist. Diese Nachricht ist ausschliesslich fuer 
den bezeichneten Adressaten oder dessen Vertreter bestimmt. Sollten Sie 
nicht der vorgesehene Adressat dieser E-Mail oder dessen Vertreter sein, 
so bitten wir Sie, sich mit dem Absender der E-Mail in Verbindung zu setzen.


For legal and security reasons the information provided in this e-mail is not 
legally binding. Upon request we would be pleased to provide you with a legally 
binding confirmation in written form. Any form of unauthorised use, 
publication, 
reproduction, copying or disclosure of the content of this e-mail is not 
permitted. 
This message is exclusively for the person addressed or their representative. 
If you are not the intended recipient of this message and its contents, please 
notify the sender immediately.

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



RE: How to create on-the-fly javascript code?

2005-09-14 Thread Paranj, Bala
I would make it part of a custom tag. This will also avoid the
copy/paste of javascript in all the jsps.

Bala
http://groups.yahoo.com/group/OOAD_UML/

-Original Message-
From: Thai Dang Vu [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, September 14, 2005 8:59 AM
To: user@struts.apache.org
Subject: How to create on-the-fly javascript code?


Hello,

I want to write something like this in a jsp file


  function f() {
  return ;
  }


but the bean:write tag isn't processed. So how can I make it processed?

Thank you.


-
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]



How to create on-the-fly javascript code?

2005-09-14 Thread Thai Dang Vu
Hello,

I want to write something like this in a jsp file


  function f() {
  return ;
  }


but the bean:write tag isn't processed. So how can I make it processed?

Thank you.


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



Typo in Struts FAQ (indexed properties) ?

2005-09-14 Thread Tamas Szabo
Hi Guys,

http://struts.apache.org/faqs/indexedprops.html

Subsection "List-Backed Indexed Properties" contains this code:

package org.apache.struts.webapp.exercise;
import org.apache.struts.action.ActionForm;
public class StringBean2 extends ActionForm {
private String strAry[] = { "String 0", "String 1", "String 2",
"String 3", "String 4" };

public java.util.List getStringIndexed(int index) { 
return java.util.Arrays.asList(strAry);
}
}


It seems to me that the getStringIndexed method shouldn't have a parameter.

Tamas


Re: access the DataSource in a plugin object

2005-09-14 Thread Martin Gainty

actually if we are adhering to 'Struts' way of acquiring the DataSource

Action class has a getDataSource which takes a request parameter (and 
optional 2nd param of key for multiple data-sources)

http://struts.apache.org/api/org/apache/struts/action/Action.html#getDataSource(javax.servlet.http.HttpServletRequest)

M-

- Original Message - 
From: "Thibaut Lassalle" <[EMAIL PROTECTED]>

To: "Struts Users Mailing List" 
Sent: Wednesday, September 14, 2005 4:59 AM
Subject: Re: access the DataSource in a plugin object



hi

i have the solution
DataSource aDataSource = (DataSource) 
actionServlet.getServletContext().getAttribute("dataBase1");


i found the solution here
http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=58&t=001155

Thank you,
Thibaut Lassalle


Martin Gainty a écrit :


Hello Thibault

You will want to set this up in your init method of your plugin
so if your DataSource is setup with a key parameter is already identified 
as "database1"



key="dataBase1">
   value="org.gjt.mm.mysql.Driver" />
   value="jdbc:mysql://192.168.0.25/cvdunet" />

   
   
   


later in the code you retrieve desired connection as follows:

public void init(ActionServlet actionServlet, ModuleConfig config)
   throws ServletException
..
java.sql.Connection connection = 
servlet.findDataSource("database1").getConnection();


HTH/Bon Chance,
Martin-
- Original Message - From: "Thibaut Lassalle" 
<[EMAIL PROTECTED]>

To: "Struts Users Mailing List" 
Sent: Tuesday, September 13, 2005 10:29 AM
Subject: Re: access the DataSource in a plugin object



Martin

you are in an action therefore you have getDataSource(request) available
but i am in a plugin therefore i don't have request element.

Any idea ?
Thibaut

Martin Gainty a écrit :


Thibault-

/*This is straight from the Struts doc available at*/
http://www.jajakarta.org/struts/struts1.2/documentation/ja/target/faqs/database.html
/*for a single DataSource*/
public ActionForward
  execute(ActionMapping mapping,
  ActionForm form,
  HttpServletRequest request,
  HttpServletResponse response) throws Exception
{
javax.sql.DataSource dataSource;
java.sql.Connection myConnection;
try {
 dataSource = getDataSource(request);
 myConnection = dataSource.getConnection();
 // do what you wish with myConnection
} catch (SQLException sqle) {
   getServlet().log("Connection.process", sqle);
} finally {
   //enclose this in a finally block to make
   //sure the connection is closed
   try {
  myConnection.close();
   } catch (SQLException e) {
  getServlet().log("Connection.close", e);
   }
  }
}

/*for multiple DataSources */
If you need more than one data source in a module, you can include a 
key attribute in the data-source element:


  
 ... properties as before ...
  
  
 ... properties as before ...
  
  ...

Which can then be accessed by including the key ("A" in this case) as 
an additional parameter to the Action.getDataSource() method.

from inside your Action Class (prefereably the execute method)


  try {
 dataSourceA = getDataSource(request, "A");
 dataSourceB = getDataSource(request, "B");
 }

Each module can have as many data sources as it needs. The keys only 
need to be unique within a module since the struts module system 
maintains a name space for the items in each module to protect you from 
name clashes.


HTH,
Martin-

- Original Message - From: "Thibaut Lassalle" 
<[EMAIL PROTECTED]>

To: "Struts Users Mailing List" 
Sent: Tuesday, September 13, 2005 5:02 AM
Subject: access the DataSource in a plugin object



hi

I would like to access the DataSource object from a plugin in my 
Struts application.

I use struts 1.2 with modules.

In the root struts-config.xml the data source is discribe as :


   key="dataBase1">
   value="org.gjt.mm.mysql.Driver" />
   value="jdbc:mysql://192.168.0.25/cvdunet" />

   
   
   


And in my plugin, i call this :

DataSource aDataSource = (DataSource) 
actionServlet.getServletContext().getAttribute 
(Globals.DATA_SOURCE_KEY);



but 'aDataSource' is 'null'.
Do you know the right way to access the DataSource ?


Thanks
Thibaut Lassalle


-
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]





-
To unsubscribe, e-mail: [EM

Re: Using Tiles tag inside a tile tag

2005-09-14 Thread Deepesh Nandal

Thanks Ron, that worked perfect :)

- Original Message - 
From: "Holshausen, Ron" <[EMAIL PROTECTED]>

To: "Struts Users Mailing List" 
Sent: Wednesday, September 14, 2005 5:30 PM
Subject: RE: Using Tiles tag inside a tile tag


Hi Deepesh,

Try this, it worked for me:


  


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: 14 September 2005 14:15
To: Struts Users Mailing List
Subject: Using Tiles tag inside a tile tag

Hi All,
The following code doesnt work :


  " />


because the 'value' attribute contains an tiles tag instead of a static
value, Please suggest a solution for this

Thanks,
Deepesh.

E-Mail Disclaimer

Aus Rechts- und Sicherheitsgruenden ist die in dieser E-Mail gegebene
Information nicht rechtsverbindlich. Eine rechtsverbindliche Bestaetigung
reichen wir Ihnen gerne auf Anforderung in schriftlicher Form nach.
Beachten Sie bitte, dass jede Form der unautorisierten Nutzung,
Veroeffentlichung, Vervielfaeltigung oder Weitergabe des Inhalts dieser
E-Mail nicht gestattet ist. Diese Nachricht ist ausschliesslich fuer
den bezeichneten Adressaten oder dessen Vertreter bestimmt. Sollten Sie
nicht der vorgesehene Adressat dieser E-Mail oder dessen Vertreter sein,
so bitten wir Sie, sich mit dem Absender der E-Mail in Verbindung zu setzen.


For legal and security reasons the information provided in this e-mail is 
not
legally binding. Upon request we would be pleased to provide you with a 
legally
binding confirmation in written form. Any form of unauthorised use, 
publication,
reproduction, copying or disclosure of the content of this e-mail is not 
permitted.
This message is exclusively for the person addressed or their 
representative.
If you are not the intended recipient of this message and its contents, 
please

notify the sender immediately.

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



--
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.10.24/101 - Release Date: 9/13/2005



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



RE: Using Tiles tag inside a tile tag

2005-09-14 Thread Holshausen, Ron
Hi Deepesh,

Try this, it worked for me:


   
 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: 14 September 2005 14:15
To: Struts Users Mailing List
Subject: Using Tiles tag inside a tile tag

Hi All,
The following code doesnt work :


   " />
 

because the 'value' attribute contains an tiles tag instead of a static
value, Please suggest a solution for this

Thanks,
Deepesh.
 
E-Mail Disclaimer 
 
Aus Rechts- und Sicherheitsgruenden ist die in dieser E-Mail gegebene 
Information nicht rechtsverbindlich. Eine rechtsverbindliche Bestaetigung 
reichen wir Ihnen gerne auf Anforderung in schriftlicher Form nach. 
Beachten Sie bitte, dass jede Form der unautorisierten Nutzung, 
Veroeffentlichung, Vervielfaeltigung oder Weitergabe des Inhalts dieser 
E-Mail nicht gestattet ist. Diese Nachricht ist ausschliesslich fuer 
den bezeichneten Adressaten oder dessen Vertreter bestimmt. Sollten Sie 
nicht der vorgesehene Adressat dieser E-Mail oder dessen Vertreter sein, 
so bitten wir Sie, sich mit dem Absender der E-Mail in Verbindung zu setzen.


For legal and security reasons the information provided in this e-mail is not 
legally binding. Upon request we would be pleased to provide you with a legally 
binding confirmation in written form. Any form of unauthorised use, 
publication, 
reproduction, copying or disclosure of the content of this e-mail is not 
permitted. 
This message is exclusively for the person addressed or their representative. 
If you are not the intended recipient of this message and its contents, please 
notify the sender immediately.

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



JavascriptValidatorTag.doStartTag(JavascriptValidatorTag.java:309) ( URGENT !! )

2005-09-14 Thread EROL TEZCAN
Hi,
 
We want to deploy an struts application to live server (oracle 10g IAS). This 
application is working properly on our local server. But when we want to deploy 
and start this app. it gives an error like this.
 
500 Internal Server Error
java.lang.NullPointerException
  at 
org.apache.struts.taglib.html.JavascriptValidatorTag.doStartTag(JavascriptValidatorTag.java:309)
  at _index._jspService(_index.java:215)
  [SRC:/index.jsp:61]
  at com.orionserver[Oracle Application Server Containers for J2EE 10g 
(9.0.4.1.0)].http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
  at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:349)
  at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509)
  at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
  at com.evermind[Oracle Application Server Containers for J2EE 10g 
(9.0.4.1.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:765)
  at com.evermind[Oracle Application Server Containers for J2EE 10g 
(9.0.4.1.0)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
  at com.evermind[Oracle Application Server Containers for J2EE 10g 
(9.0.4.1.0)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:793)
  at com.evermind[Oracle Application Server Containers for J2EE 10g 
(9.0.4.1.0)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:208)
  at com.evermind[Oracle Application Server Containers for J2EE 10g 
(9.0.4.1.0)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:125)
  at com.evermind[Oracle Application Server Containers for J2EE 10g 
(9.0.4.1.0)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
  at java.lang.Thread.run(Thread.java:536)

We use struts 1.1 ( old versiyon not 1.2.7 )and all xml, jar .. files are in 
the right place. 
 
How can we solve this ? It is very urgent solving this problem. 
 
Thanks,
 
Erol


-
Yahoo! for Good
 Click here to donate to the Hurricane Katrina relief effort. 

Using Tiles tag inside a tile tag

2005-09-14 Thread Deepesh Nandal
Hi All,
The following code doesnt work :


   " />
 

because the 'value' attribute contains an tiles tag instead of a static value, 
Please suggest a solution for this

Thanks,
Deepesh.


Re: Wrapping Struts tags in tag files

2005-09-14 Thread Laurie Harper
Cross-posting to the dev list for committer approval of the proposed 
changes:


Niall Pemberton wrote:

I agree, not trimming!

Personally I don't have a problem with making the change (i.e. checking for
zero length strings) in the html taglib, since an easy one line change will
catch alot of them. I'm not that interested in doing it for the other
taglibs though.


Not that interested in doing the work or not that keen on seeing the 
changes made? ;-) If the former, I'll be happy to put together patches 
for each taglib to keep things consistent.



The way to do it would be to attach a patch to the bug and then ask for
objections before committing it. Besides changing BaseHandlerTag, do you
have any idea of how many other tags might need custom changes. The ones
that spring to mindare the ones that take action/forward/page/href etc. as
attributes to generate urls


Well, I'm not a committer, but I get the point ;-) I haven't looked at 
how many other places may need to change, though in most cases a single 
change in a helper method should cover a bunch of them at once (e.g. in 
TagUtils.computeURLWithCharEncoding() for the ones you mention above).


I'll take a more detailed look if/when such a change is approved in 
principle by the committers.


L.



Niall

- Original Message - 
From: "Laurie Harper" <[EMAIL PROTECTED]>

Sent: Wednesday, September 14, 2005 2:13 AM




Thanks Niall, yes, that's exactly what I'm talking about (thanks for the
link).

OK, so the issue is the impact on backwards compatibility if the tags
change such that empty values suppress attribute rendering. One
possibility would be to test for null or empty string, without trimming.
That would support the case you mentioned below where someone was
relying on rendering value=" ". It's still a behavioural change, though.

My vote would definately be to make the change suggested in 33064, but I
can see why that might be unacceptable. Short of adding a new attribute
to all tags to switch this behaviour on, or a global config option, I
don't see any way to resolve the issue that does retain backwards
compatibility though :-(

I suppose I should take this up on the dev list.

L.

Niall Pemberton wrote:


Laurie

Theres an open bugzilla ticket for the same kind of thing:

  http://issues.apache.org/bugzilla/show_bug.cgi?id=33064

Changing the prepareAttribute() method in o.a.s.t.h.BaseHandlerTag will


deal


with alot of the html taglib attributes that are simply output. For
alt/altkey and title/titleKey - the message() method in BaseHandlerTag


deals


with those attributes.

Having said that I added a trim() to the label for the SubmitTag a while


ago


and that caused a problem for someone who relied on the fact that it


would


emit value=" " so I'm wondering if adding a length() check is going to


cause


anyone else issues?



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



Problem with Tiles

2005-09-14 Thread Deepesh Nandal
Hi There,
   I am stuck at one place while working with tiles, please help.
I have my tiles-defs.xml as this:


 


 
  
  
  
  
 
  
 
  


AND  /WEB-INF/tiles/layout.jsp  as this:
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>

  
 
 
 
 

 
 
 

 


Now, I need to print the variable 'pageheading'( defined in definition 
'.mainLayout')  in "/WEB-INF/tiles/header.jsp" .
I cannot use  inside 
"/WEB-INF/tiles/header.jsp"  as "pageheading" is valid in 
"/WEB-INF/tiles/layout.jsp" only . So how do I pass "pageheading" from 
"index.page" to header.jsp through .mainLayout ...

Please help .

Many Thanks,
Deepesh Nandal.


Re: Missing attribute "wrap" in TextareaTag

2005-09-14 Thread Laurie Harper

Fleischle, Samuel wrote:

I have a textarea and want to set the attribute wrap="off" to avoid
automatic wrapping of my text.

But I can´t find any attribute with this name in the API for the
TextareaTag. And if I insert this attribute in my code, I get an error.

Is this attribute missing? Is there another way (possible with CSS) to avoid
text wrapping?


There is no 'wrap' attribute in any offical version of HTML (it was a 
proprietary Netscape extension), so the HTML taglib doesn't support it. 
It's easy to get the same effect with CSS, though: use the 'white-space: 
nowrap' style.


L.


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



Re: How to replace normal html-from through html:form in Struts? Example

2005-09-14 Thread Laurie Harper

Frank W. Zammetti wrote:

Laurie Harper wrote:
Why do you say that's a bad practice? It's actually both supported and 
recommended; in fact, the 'name' attribute is deprecated in favour of 
the 'id' attribute so 'id' is the only way to target CSS to a 
particular page element rather than an entire display class.


...

OK, you could use class="something-I-made-sure-is-unique" instead of 
using id, but why do that and loose the ability to have uniqueness 
checked by validation?


Exactly.  class is what should be used.  Well, ok, if I'm being fair, 
this is a debatable point, I can't point to any document somewhere that 
says there is a right and wrong answer.  It is a bad practice to me 
though based on my experience :)


The reason for this, in my mind, is that an ID attribute must be unique 
across a document so that you can uniquely address any individual 
element on the page by name.  This makes DOM manipulation much easier, 
and frankly more like the back end where you are either addressing a 
specific object instance by name, or accessing the member of a 
collection.  But that's maybe getting a tad off track I suppose :) ...


By separating the CSS class an element uses from the ID you access it 
with you gain flexibility in being able to manipulate individual objects 
as well as change the stylesheet more precisely.  More importantly 
perhaps, it eliminates duplication of style definitions.


For example, imagine a situation where you have a series of textboxes, 
and you want to apply a style to each and also be able to address each 
individually via scripting...






Ok, so I can certainly address each individually by name.  But what does 
the stylesheet look like?  It would have three styles defined that are 
all duplicate.  Kind of inefficient.  But, if you do:






Now, you can still address each individually, and now they all use the 
same style definition.  Duplication removed.


I never said you *shouldn't* use 'class' to style elements :-) That's 
the right answer when you want to apply the same set of styles to 
multiple elements (although even without the 'class' attribute here, 
you'd still only need to define one rule in the stylesheet... it would 
just jave 3 selectors).



Actually, I did find one reference that seems relevant:

http://www.htmlhelp.com/reference/css/style-html.html#id

Specifically, the first sentence of the last paragraph:

"The use of ID is appropriate when a style only needs to be applied once 
in any document."


That's another way of saying what I was trying to say above :)


Note that there's no corollary there that this is in any way 
inappropriate, though. If I only *want* to apply styles to one element 
in the document, this is the way to do it.


But, even putting all that aside... assigning a CSS class to an element 
with the ID attribute just seems wrong semantically... ID has a pretty 
specific meaning, it's a unique identifier.  class also has a fairly 
specific meaning in this context, it's defining the supertype of an 
element (in essence), and doing it otherwise seems like fighting logic :)


There's a difference between class and style, though. Class and ID are 
two different 'hooks' by which you can associate style with (one or 
more) elements. CSS provides all sorts of selectors besides class 
selectors, after all.


I'm not sure about your validation point though... could you clarify 
that?  You may well be pointing something out I've never considered.


'id' is guaranteed unique in any valid document, whereas 'class' is 
(obviously) not. So, if I know that the thing I want to style should 
occur exactly once (for example, a title at the start of an article) I 
can assign it an ID. By attaching styles via the ID, I can be sure those 
styles will never be applied anywhere else in the document, because the 
ID must be unique. If it's not, I'll get an error when I validate the 
document.


On the other hand, if I use 'class' instead of 'id', that class could be 
re-used elsewhere in the document. That won't be caught by validation, 
or anything else but visual inspection of the result.


OK, so it probably not something you care about very often ;-) My point 
was just that, while IDs must be unique and that uniqueness is checked 
during validation, no such restriction applies to 'class'.


Not trying to go on the attack or anything here :-) Just curious where 
this is coming from...


Sure, no problem at all.  Like I said, I can't point to any official 
spec or something that says "this is the right way to do it", but I know 
what I have my people do and I know what has served me best over the 
years :)  I have no doubt you and others have contrary experiences that 
are just as valid.


Heh :) Have you had any experiences where using CSS ID selectors was 
actually bad, or caused problems?


L.


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

Re: Problem with html:option default selected

2005-09-14 Thread Ugur Cetinkaya
U must set formbean value for default select. For example if formbean 
select=property name value is 1, then it will be selected .

On 9/14/05, Kade Jeevan Kumar <[EMAIL PROTECTED]> wrote: 
> 
> Hi!
> 
> What is the corresponding code in Struts for the given html
> 
> 
> Two
> one
> 
> 
> -Thanks in Advance
> Jeevan
> 
> 
> 
> -
> Yahoo! for Good
> Click here to donate to the Hurricane Katrina relief effort.
>


Re: Adding parameters to redirected forwards

2005-09-14 Thread Laurie Harper

Frank W. Zammetti wrote:

Xavier Vanderstukken wrote:


IS that class really performs a redirect request?
Can I use the setForward method to false to performs a forward with 
parameters?


Interesting question... someone can correct me if I'm wrong, but I 
believe the answer is no.  Well, to be more precise, you *may* be able 
tp setForward(false) to do a forward, I do not know for sure, but you 
won't be able to add parameters.


Up to and including servlet spec 2.4, there is no addParameter() method 
of HttpServletRequest, or any superclass.  Since when you do a forward 
you are passing the same request along, you would need this method to 
add parameters.


When you do a redirect however, the URL you redirect to includes the 
parameters as a query string.


So, no, I do not believe it is ever possible, with ActionForward or 
not, to add parameters when doing a forward, only when doing a redirect.


I believe Frank's basically correct. However (and note, I have *not* 
tried this) I think you might be able to do something like this:


ActionForward fwd = new ActionForward(
mapping.findForward("showSavedItem.do"));
fwd.setPath(fwd.getPath() + "?itemId=" + itemId);
return fwd;

Like I say, I haven't tried it so your mileage may vary...

L.


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



Problem with html:option default selected

2005-09-14 Thread Kade Jeevan Kumar
Hi!
 
What is the corresponding code in Struts for the given html
 

Two
one

 
-Thanks in Advance
Jeevan



-
Yahoo! for Good
 Click here to donate to the Hurricane Katrina relief effort. 

Missing attribute "wrap" in TextareaTag

2005-09-14 Thread Fleischle, Samuel
I have a textarea and want to set the attribute wrap="off" to avoid
automatic wrapping of my text.

But I can´t find any attribute with this name in the API for the
TextareaTag. And if I insert this attribute in my code, I get an error.

Is this attribute missing? Is there another way (possible with CSS) to avoid
text wrapping?

 

Regards,

Sam



Re: access the DataSource in a plugin object

2005-09-14 Thread Thibaut Lassalle

hi

i have the solution
DataSource aDataSource = (DataSource) 
actionServlet.getServletContext().getAttribute("dataBase1");


i found the solution here
http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=58&t=001155

Thank you,
Thibaut Lassalle


Martin Gainty a écrit :


Hello Thibault

You will want to set this up in your init method of your plugin
so if your DataSource is setup with a key parameter is already 
identified as "database1"



key="dataBase1">
   value="org.gjt.mm.mysql.Driver" />
   value="jdbc:mysql://192.168.0.25/cvdunet" />

   
   
   


later in the code you retrieve desired connection as follows:

public void init(ActionServlet actionServlet, ModuleConfig config)
   throws ServletException
..
java.sql.Connection connection = 
servlet.findDataSource("database1").getConnection();


HTH/Bon Chance,
Martin-
- Original Message - From: "Thibaut Lassalle" 
<[EMAIL PROTECTED]>

To: "Struts Users Mailing List" 
Sent: Tuesday, September 13, 2005 10:29 AM
Subject: Re: access the DataSource in a plugin object



Martin

you are in an action therefore you have getDataSource(request) available
but i am in a plugin therefore i don't have request element.

Any idea ?
Thibaut

Martin Gainty a écrit :


Thibault-

/*This is straight from the Struts doc available at*/
http://www.jajakarta.org/struts/struts1.2/documentation/ja/target/faqs/database.html 


/*for a single DataSource*/
public ActionForward
  execute(ActionMapping mapping,
  ActionForm form,
  HttpServletRequest request,
  HttpServletResponse response) throws Exception
{
javax.sql.DataSource dataSource;
java.sql.Connection myConnection;
try {
 dataSource = getDataSource(request);
 myConnection = dataSource.getConnection();
 // do what you wish with myConnection
} catch (SQLException sqle) {
   getServlet().log("Connection.process", sqle);
} finally {
   //enclose this in a finally block to make
   //sure the connection is closed
   try {
  myConnection.close();
   } catch (SQLException e) {
  getServlet().log("Connection.close", e);
   }
  }
}

/*for multiple DataSources */
If you need more than one data source in a module, you can include a 
key attribute in the data-source element:


  
 ... properties as before ...
  
  
 ... properties as before ...
  
  ...

Which can then be accessed by including the key ("A" in this case) 
as an additional parameter to the Action.getDataSource() method.

from inside your Action Class (prefereably the execute method)


  try {
 dataSourceA = getDataSource(request, "A");
 dataSourceB = getDataSource(request, "B");
 }

Each module can have as many data sources as it needs. The keys only 
need to be unique within a module since the struts module system 
maintains a name space for the items in each module to protect you 
from name clashes.


HTH,
Martin-

- Original Message - From: "Thibaut Lassalle" 
<[EMAIL PROTECTED]>

To: "Struts Users Mailing List" 
Sent: Tuesday, September 13, 2005 5:02 AM
Subject: access the DataSource in a plugin object



hi

I would like to access the DataSource object from a plugin in my 
Struts application.

I use struts 1.2 with modules.

In the root struts-config.xml the data source is discribe as :


   key="dataBase1">
   value="org.gjt.mm.mysql.Driver" />
   value="jdbc:mysql://192.168.0.25/cvdunet" />

   
   
   


And in my plugin, i call this :

DataSource aDataSource = (DataSource) 
actionServlet.getServletContext().getAttribute 
(Globals.DATA_SOURCE_KEY);



but 'aDataSource' is 'null'.
Do you know the right way to access the DataSource ?


Thanks
Thibaut Lassalle


-
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]





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