Re: [OS-webwork] whens the next beta release?

2003-10-02 Thread Pat Lightbody
Sure thing -- so far beta2 has had 45 issues resolves -- if I moved the
remaining 25 to beta3 that'd be 42 open issues to resolve in beta3. I think
we're at a good point to release beta2 tonight. So i'll try to resolve
anything I can in the next few minutes and then cut a build.

-Pat

- Original Message - 
From: Robert Douglass [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, October 01, 2003 10:18 PM
Subject: RE: [OS-webwork] whens the next beta release?


 +1 for another beta. That guarantees that people can grab a .jar of the
 latest changes, instead of having to build it.

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Behalf Of
 Francisco Hernandez
 Sent: Wednesday, October 01, 2003 11:04 PM
 To: [EMAIL PROTECTED]
 Subject: [OS-webwork] whens the next beta release?


 just wondering if theres an eta on the next beta release?




 ---
 This sf.net email is sponsored by:ThinkGeek
 Welcome to geek heaven.
 http://thinkgeek.com/sf
 ___
 Opensymphony-webwork mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork



 ---
 This sf.net email is sponsored by:ThinkGeek
 Welcome to geek heaven.
 http://thinkgeek.com/sf
 ___
 Opensymphony-webwork mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork



---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork


RE: [OS-webwork] whens the next beta release?

2003-10-02 Thread Robert Douglass
I'll buy the champaign!

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of
Pat Lightbody
Sent: Thursday, October 02, 2003 8:02 AM
To: [EMAIL PROTECTED]
Subject: Re: [OS-webwork] whens the next beta release?


Sure thing -- so far beta2 has had 45 issues resolves -- if I moved the
remaining 25 to beta3 that'd be 42 open issues to resolve in beta3. I think
we're at a good point to release beta2 tonight. So i'll try to resolve
anything I can in the next few minutes and then cut a build.

-Pat

- Original Message - 
From: Robert Douglass [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, October 01, 2003 10:18 PM
Subject: RE: [OS-webwork] whens the next beta release?


 +1 for another beta. That guarantees that people can grab a .jar of the
 latest changes, instead of having to build it.

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Behalf Of
 Francisco Hernandez
 Sent: Wednesday, October 01, 2003 11:04 PM
 To: [EMAIL PROTECTED]
 Subject: [OS-webwork] whens the next beta release?


 just wondering if theres an eta on the next beta release?




 ---
 This sf.net email is sponsored by:ThinkGeek
 Welcome to geek heaven.
 http://thinkgeek.com/sf
 ___
 Opensymphony-webwork mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork



 ---
 This sf.net email is sponsored by:ThinkGeek
 Welcome to geek heaven.
 http://thinkgeek.com/sf
 ___
 Opensymphony-webwork mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork



---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork


---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork


Re: [OS-webwork] Type conversion

2003-10-02 Thread John Patterson
Title: Message



Thanks for all the support on WW! I always 
get very helpful responses from this group.

  - Original Message - 
  From: 
  Jason Carreira 
  To: [EMAIL PROTECTED] 
  
  Sent: Wednesday, October 01, 2003 2:50 
  PM
  Subject: RE: [OS-webwork] Type 
  conversion
  
  
  

-Original Message-From: John Patterson 
[mailto:[EMAIL PROTECTED] Sent: Wednesday, October 
01, 2003 9:42 AMTo: WebworkSubject: [OS-webwork] Type 
conversion
What is happening with the type 
conversion functionality? I need to be able to override the conversion 
both to and from string easily. xwork-conversion.properties only 
allows me to specify one way.

If you specify a converter for the one direction and 
itis trying to convert from your type TO aString, it will also 
try to use that same converter (so make them 
bidirectional)

Is there any plans to allow you to 
configure a converter seperatly for each property? For example, I have 
several dates which appear on a page in different formats. It would be 
great to be able to specify in xwork.xml the format to be used for each 
property. Or would this be best handled in a tag lib (to presentation 
specific)?

This canbe done now. You would have 
aMyAction-conversion.properties which specifies the conversions for 
this specific class (by field name).I'm not sure if Pat has fully 
documented this?

Maybe if the PropertyTag had a format attribute 
which was somehow passed to the TypeConverter...

ww:property value="startDate" format="dd 
MMM "/

...or something like that.

John.

Also on the type conversion front... I checked in yesterday a 
change to make type conversion problems add field errors to your Action... 
let me know if it's working for you.

Jason


[OS-webwork] Flash Blogs

2003-10-02 Thread Vincent Faidherbe
http://www.gregburch.com/blog/
http://www.danieldura.com
http://www.flogspot.com
http://www.gskinner.com/blog/
http://www.illogicz.com/blog/
http://radio.weblogs.com/0113297/
http://www.joshdura.com
http://www.markme.com/techsales/
http://www.markme.com/mesh/
http://www.swfoo.com/
---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork


[OS-webwork] Re: Flash Blogs - SORRY for the spam

2003-10-02 Thread Vincent Faidherbe
I wasn't written this mail for the webwork mailing list. I've simply made 
a mistake with my mail client.
Sorry.

---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork


Re: RES: RES: [OS-webwork] Component repository

2003-10-02 Thread Francisco Hernandez
I need to look into the code but the date picker component works fine 
with IE, its just Mozilla thats crapping out with it

Pat Lightbody wrote:
Looks like a problem with the absolute/relative paths -- should be trivial
to fix.
- Original Message - 
From: Francisco Hernandez [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, September 30, 2003 12:18 PM
Subject: Re: RES: RES: [OS-webwork] Component repository



im using the latest firdbird myself too, when i click on the arrows to
goto the next/previous month/year I get this:
404 Not Found
Resource
/cart/templates/xhtml/calendar/templates/xhtml/calendar/calendar.html
not found on this server
[EMAIL PROTECTED] wrote:

Really?! I expected the other way around, as I developed/tested this
using Mozilla Firebird 0.6! :)
What does the JavaScript console shows?

-Mensagem original-
De: Francisco Hernandez [mailto:[EMAIL PROTECTED]
Enviada em: terça-feira, 30 de setembro de 2003 15:51
Para: [EMAIL PROTECTED]
Assunto: Re: RES: [OS-webwork] Component repository
uh oh, I tried it in Mozilla, and it fails, but works great in IE!

[EMAIL PROTECTED] wrote:
 Okay, the date picker is here:
 http://jira.opensymphony.com/secure/ViewIssue.jspa?key=WW-329

 Have fun, and if there are any suggestions, feel free to add them.

 Peace,
 -cv

 -Mensagem original-
 *De:* Jason Carreira [mailto:[EMAIL PROTECTED]
 *Enviada em:* terça-feira, 30 de setembro de 2003 10:19
 *Para:* [EMAIL PROTECTED]
 *Assunto:* RE: [OS-webwork] Component repository

 If people add them to Jira issues, we'll put them in CVS to go into
the

 distribution...

 -Original Message-
 *From:* Drew McAuliffe [mailto:[EMAIL PROTECTED]
 *Sent:* Tuesday, September 30, 2003 2:01 AM
 *To:* [EMAIL PROTECTED]
 *Subject:* RE: [OS-webwork] Component repository

 Sure, JIRA is fine, or you can email me at drew (at) lowerunit
dot

 com (trying to avoid getting more spam). I've been looking for
one

 of these for a long time. It's especially helpful to have a ww
 component. Any idea on if a component repository will be created,
 and if so, where it will go on CVS? A great component repository
 would really help sell webwork to a lot of people, hitting a nice
 sweet spot between tapestry and struts.

 Thanks,

 Drew

 -Original Message-
 *From:* [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] *On
 Behalf Of [EMAIL PROTECTED]
 *Sent:* Monday, September 29, 2003 5:30 AM
 *To:* [EMAIL PROTECTED]
 *Subject:* RES: [OS-webwork] Component repository

 Hi Drew!

 I just finished mine, and it's working quite well with
european

 (dd/mm/) dates. Should be a breeze to modify them for the
 american/british format (mm/dd/). How should I send it to
 you? Maybe create an issue in JIRA and attach it?

 -cv

 -Mensagem original-
 *De:* Drew McAuliffe [mailto:[EMAIL PROTECTED]
 *Enviada em:* sábado, 27 de setembro de 2003 14:51
 *Para:* [EMAIL PROTECTED]
 *Assunto:* RE: [OS-webwork] Component repository

 If someone has a datepicker component available, I would love
to

 get access to it right away.

 -Original Message-
 *From:* [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]
 *On Behalf Of *Jason Carreira
 *Sent:* Friday, September 26, 2003 11:46 AM
 *To:* [EMAIL PROTECTED]
 *Subject:* RE: [OS-webwork] Component repository

 I think they should go right into WW2 CVS... Sounds like
a

 great idea.

 -Original Message-
 *From:* [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]
 *Sent:* Friday, September 26, 2003 10:47 AM
 *To:* [EMAIL PROTECTED]
 *Subject:* [OS-webwork] Component repository

 Hi all,

 Do you think it would be a good idea to set up a
 component repository somewhere? I'm creating some
 components here, and I started feeling that creating
a

 date picker or tree component would be reinventing
the

 wheel somehow.

 IMHO, I think having a good component repository
would

 be a huge plus for WW2 users, as they could just slap
 them together and create wicked cool forms with
dynamic

 behaviour in minutes. I'm sure this was already
 discussed at some point, but as I couldn't find any
 references to it on the mailing list archives, it
 sounded like a good idea to bring this subject back
again.

 If you're interested, I'd suggest having a look at
 http://webfx.eae.net - there are some awesome
components

 

Re: [OS-webwork] WW2 Tags in SiteMesh decorators

2003-10-02 Thread Pat Lightbody
There is no need to make the ActionTag keep the ActionContext around -- 
that's really unhealthy. However -- what we could do is put the
ActionContext in a request attribute and then use that in all our tags -- 
that would solve it perfectly. Here's a visual of the problem that I quickly
put together in fireworks (be amazed by my awesome graphics ability):

http://www.lightbody.net/webwork_flow.png

So I suppose we could make all our tags get the AC from the request rather
than the ThreadLocal. Hehe, I recall this is one of the reasons I opted for
not having ActionContext a ThreadLocal, but I was voted down ;) (no, I don't
really want to debate this again, it's staying as a TL for the foreseeable
future)

-Pat


- Original Message - 
From: Jason Carreira [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, September 30, 2003 6:16 AM
Subject: RE: [OS-webwork] WW2 Tags in SiteMesh decorators


What are you trying to do in your decorators? If you access things in the
request, where the Action will be bound with its id, you can push this
action onto the ValueStack using the ww:push tag and use all of the other
tags as normal.

I don't think we're going to make the ActionTag leave its ActionContext out
there. It needs to be returned to the original.

 -Original Message-
 From: Frederick N. Brier [mailto:[EMAIL PROTECTED]
 Sent: Monday, September 29, 2003 10:20 PM
 To: [EMAIL PROTECTED]
 Subject: Re: [OS-webwork] WW2 Tags in SiteMesh decorators


 This is exactly what I got working this weekend with my change to the
 ww:action tag.  I am using Webwork2 with SItemesh.  My
 Action class is
 populated via the interceptors and an IoC component and populates the
 header.jsp referenced in my Sitemesh decorator default.jsp with a
 ww:property from the Action.

 The reason it didn't work originally was the ActionTag wipes out own
 ActionContext issue, now in Jira.

 Fred.

 At 03:38 PM 9/29/2003, you wrote:
 SiteMesh parses the HTML from WW and extract the meta tags,
 the title
 and
 the content of the page. It then decorates the page using a template.
 
 Jérôme.
 
 Jason Carreira wrote:
 
 Well, I'm not really familiar with Sitemesh's internals, but the
 filter
 could be processing before and/or after the request reaches
 the Servlet...
 
 
 
 -Original Message-
 From: Jerome BERNARD [mailto:[EMAIL PROTECTED] Sent:
 Monday, September 29, 2003 2:56 PM
 To: [EMAIL PROTECTED]
 Subject: Re: [OS-webwork] WW2 Tags in SiteMesh decorators
 
 
 I think this is the other way around: SiteMesh wraps the
 output from
 WW
 into a decorated HTML page.
 
 Regards,
 Jérôme.
 
 Jason Carreira wrote:
 
 
 
 The problem is that Sitemesh is a filter, so it operates
 before any
 WebWork code, so nothing is set up.
 
 I'm not sure of a solution...
 
 Jason
 
 
 
 
 -Original Message-
 From: Vincent Faidherbe [mailto:[EMAIL PROTECTED]
 Sent: Monday, September 29, 2003 4:45 AM
 To: [EMAIL PROTECTED]
 Subject: [OS-webwork] WW2 Tags in SiteMesh decorators
 
 
 It seems that it isn't possible to use WW2 tags in SiteMesh
 decorators because tags suchs ww:property or ww:iterator fail to
 rerieve the ValueStack from the ActionContext. I had a the same
 issue in a home-made tag but I fixed the
 problem by
 
 replacing the call ActionContext.getContext().getValueStack() by
 (OgnlValueStack)request.getAttribute(webwork.valueStack
 ). I think it
 should be an issue related to the fact that the ActionContext is
 thread-local variable.
 Any idea?
 
 
 
 
 ---
 This sf.net email is sponsored by:ThinkGeek
 Welcome to geek heaven.
 http://thinkgeek.com/sf
 ___
 Opensymphony-webwork mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork



 ---
 This sf.net email is sponsored by:ThinkGeek
 Welcome to geek heaven.
 http://thinkgeek.com/sf
 ___
 Opensymphony-webwork mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork



---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork


---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork


RE: [OS-webwork] Advanced URL mapping?

2003-10-02 Thread Jérôme BERNARD
Hi Cameron,

The more I think about the CoolURIServletDispatcher, the more I think it is too
much limited. For example I changed the abbreviation syntax from:
http://myhost.com/article/paramValue1 to
http://myhost.com/article/articleID/paramValue1 instead of
http://myhost.com/article/article/paramValue1 .

Why?

Simply because most of the time your action are written that way:

public class LoadArticleAction extends ActionSupport {  
  long articleID;
  Article article;
  // getter  setter for the above members
  // other methods omitted...
}

If you use a parameter named article (by using the same parameter name as the
one from the action) then you will need to use weird method names in order to
retreive the real object linked to this id.

Anyway, I think we should write a custom ServletDispatcher that reads advanced
mapping configuration from another xml file (or perhaps extends webwork.xml?).

This file could allow to use the sheme explained above but also deal with URL
including dates (like http://myhost.com/2003/10/02).

What do you think about this?

Jérôme.

Selon Cameron Braid [EMAIL PROTECTED]:

 I have madea  patch to the servlet dispatcher to allow for extensability
 :
 
 the methods that can be overriden are
 
 protected void sendError(HttpServletRequest request, HttpServletResponse
 response, int code, Exception e)
 protected Map getParameterMap(HttpServletRequest request)
 protected Map getSessionMap(HttpServletRequest request)
 protected Map getApplicationMap()
 protected String getActionName(HttpServletRequest request)
 protected String getNameSpace(HttpServletRequest request)
 
 this will allow for the core logic in the service method to be re-used
 from custom servlet based dispatchers, allowing a custom URL and
 parameter mapping scheme to be implemented.
 
 
 Pat / Jason / Others : do we want to include the
 CoolUriServletDispatcher in the core ?
 
 If so, I will modify it to extend the new ServletDispatcher.
 
 
  -Original Message-
  From: [EMAIL PROTECTED] 
  [mailto:[EMAIL PROTECTED] On 
  Behalf Of Jerome BERNARD
  Sent: Tuesday, 30 September 2003 4:06 AM
  To: [EMAIL PROTECTED]
  Subject: Re: [OS-webwork] Advanced URL mapping?
  
  
  Hum... I should have a closer look at IDEA then :-)
  Jérôme.
  
  Cameron Braid wrote:
  
  What IDE do you use ?
  
  Eclispe can automatically create delegator calls for you, 
  which makes 
  tasks like that a piece of cake.
  
  Cam
  

  
  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED] On 
  Behalf Of Jerome BERNARD
  Sent: Monday, 29 September 2003 7:26 PM
  To: [EMAIL PROTECTED]
  Subject: Re: [OS-webwork] Advanced URL mapping?
  
  
  Cameron Braid wrote:
  
  
  
  Cool idea :)
  
  Though, for the implementaion, wouldn't you have been better

  
  to use the
  
  
  wrapper pattern, rather than dynamic proxies :)
  

  
  Sure. I thought about it, but it's quite painful: you have to
  override 
  so many methods :-(
  
  I'll do it tomorrow and update the attachment in the JIRA issue.
  
  Jérôme.
  
  
  
  Cam
  
   
  

  
  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED] On
  Behalf Of Jérôme BERNARD
  Sent: Tuesday, 30 September 2003 1:30 AM
  To: [EMAIL PROTECTED]
  Subject: RE: [OS-webwork] Advanced URL mapping?
  
  
  I have created a new issue in JIRA
  (http://jira.opensymphony.com/secure/ViewIssue.jspa?key=WW-326
  ) and submitted a new servlet that extends ServletDispatcher
  and provides such a functionality. I also provided a way to 
  shorten even more the URL by assuming that if the first 
  parameter name is not specified then it is supposed to be the 
  name of the action.
  
  This allows to replace the following URL 
  http://myhost.com/article/article/123
  with this URL http://myhost.com/article/123.
  
  Any code review welcomed! :-p
  
  Jérôme.
  
  Robert Douglass [EMAIL PROTECTED]:
  
 
  
  
  
  I think this is the relevant code, from 
  org.apache.turbine.util.parser.DefaultParameterParser. As I
   
  

  
  understand
 
  
  
  
  it, Turbine folks avoid URLs like foo/bar?id=1812 in favor of 
  foo/bar/id/1812. I've never used this, and I can't remember
   
  

  
  right off
 
  
  
  
  exactly how the servlet container knows which part is the
   
  

  
  path info,
 
  
  
  
  but essentially, they assume that the path info follows 
  the pattern 
  name_1/value_1/...name_n/value_n. The advantage is 
  supposed to be 
  search-engine friendly URLs from completely dynamic
   
  

  
  applications. This
 
  
  
  
  gets touted by the Turbine community as a great feature 
  (and it may 
  be). I'd love to have this available, but as you can see
   
  

  
  below, it is
 
  
  
  
  easy enough to implement that anyone can do it as soon 
  

Re: [OS-webwork] Advanced URL mapping?

2003-10-02 Thread Francisco Hernandez
does the CoolUriDispatcher handle passing arrays like when using 
multiple checkboxes or multiple selected select tags?

also whats going to happen if you have a textfield that its value is 
03/17/1990

also I think a CoolUrlTag would make sense to have aswell to write out 
the Urls just like ww:url does now but in the new Cool format

Jérôme BERNARD wrote:
Hi Cameron,

The more I think about the CoolURIServletDispatcher, the more I think it is too
much limited. For example I changed the abbreviation syntax from:
http://myhost.com/article/paramValue1 to
http://myhost.com/article/articleID/paramValue1 instead of
http://myhost.com/article/article/paramValue1 .
Why?

Simply because most of the time your action are written that way:

public class LoadArticleAction extends ActionSupport {  
  long articleID;
  Article article;
  // getter  setter for the above members
  // other methods omitted...
}

If you use a parameter named article (by using the same parameter name as the
one from the action) then you will need to use weird method names in order to
retreive the real object linked to this id.
Anyway, I think we should write a custom ServletDispatcher that reads advanced
mapping configuration from another xml file (or perhaps extends webwork.xml?).
This file could allow to use the sheme explained above but also deal with URL
including dates (like http://myhost.com/2003/10/02).
What do you think about this?

Jérôme.

Selon Cameron Braid [EMAIL PROTECTED]:


I have madea  patch to the servlet dispatcher to allow for extensability
:
the methods that can be overriden are

protected void sendError(HttpServletRequest request, HttpServletResponse
response, int code, Exception e)
protected Map getParameterMap(HttpServletRequest request)
protected Map getSessionMap(HttpServletRequest request)
protected Map getApplicationMap()
protected String getActionName(HttpServletRequest request)
protected String getNameSpace(HttpServletRequest request)
this will allow for the core logic in the service method to be re-used
from custom servlet based dispatchers, allowing a custom URL and
parameter mapping scheme to be implemented.
Pat / Jason / Others : do we want to include the
CoolUriServletDispatcher in the core ?
If so, I will modify it to extend the new ServletDispatcher.



-Original Message-
From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On 
Behalf Of Jerome BERNARD
Sent: Tuesday, 30 September 2003 4:06 AM
To: [EMAIL PROTECTED]
Subject: Re: [OS-webwork] Advanced URL mapping?

Hum... I should have a closer look at IDEA then :-)
Jérôme.
Cameron Braid wrote:


What IDE do you use ?

Eclispe can automatically create delegator calls for you, 
which makes 

tasks like that a piece of cake.

Cam




-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On 
Behalf Of Jerome BERNARD
Sent: Monday, 29 September 2003 7:26 PM
To: [EMAIL PROTECTED]
Subject: Re: [OS-webwork] Advanced URL mapping?

Cameron Braid wrote:

  


Cool idea :)

Though, for the implementaion, wouldn't you have been better


to use the
  


wrapper pattern, rather than dynamic proxies :)



Sure. I thought about it, but it's quite painful: you have to
override 
so many methods :-(

I'll do it tomorrow and update the attachment in the JIRA issue.

Jérôme.

  


Cam






-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
Behalf Of Jérôme BERNARD
Sent: Tuesday, 30 September 2003 1:30 AM
To: [EMAIL PROTECTED]
Subject: RE: [OS-webwork] Advanced URL mapping?
I have created a new issue in JIRA
(http://jira.opensymphony.com/secure/ViewIssue.jspa?key=WW-326
) and submitted a new servlet that extends ServletDispatcher
and provides such a functionality. I also provided a way to 
shorten even more the URL by assuming that if the first 
parameter name is not specified then it is supposed to be the 
name of the action.

This allows to replace the following URL 
http://myhost.com/article/article/123
with this URL http://myhost.com/article/123.

Any code review welcomed! :-p

Jérôme.

Robert Douglass [EMAIL PROTECTED]:

 

  


I think this is the relevant code, from 
org.apache.turbine.util.parser.DefaultParameterParser. As I
   



understand
 

  


it, Turbine folks avoid URLs like foo/bar?id=1812 in favor of 
foo/bar/id/1812. I've never used this, and I can't remember
   



right off
 

  


exactly how the servlet container knows which part is the
   



path info,
 

  


but essentially, they assume that the path info follows 
the pattern 

name_1/value_1/...name_n/value_n. The advantage is 
supposed to be 

search-engine friendly URLs from completely dynamic
   



applications. This
 

  


gets touted by the Turbine community as a great feature 
(and it may 

be). I'd love to have this available, but as you can see
   



below, it is
 

  


easy enough to implement that anyone can do it as soon 
as they want 

it. I don't 

Re: [OS-webwork] Advanced URL mapping?

2003-10-02 Thread Jérôme BERNARD
Selon Francisco Hernandez [EMAIL PROTECTED]:

 does the CoolUriDispatcher handle passing arrays like when using 
 multiple checkboxes or multiple selected select tags?

Nope.
It splits the URL on '/' delimiters. It then decides whether the token is the
name of the action to execute, the parameter name or the parameter value.

 also whats going to happen if you have a textfield that its value is 
 03/17/1990

This will clearly fail! I am wondering though if the CoolURIServletDispatcher
should be used with such a kind of parameter values. For example if you would
like to display articles published on 03/17/1990, you should instead stick to
this kind of URL: http://myhost.com/1990/03/17 . Why? Simply because one would
expect http://myhost.com/1990/03 to display the articles from this months and so
on...

 also I think a CoolUrlTag would make sense to have aswell to write out 
 the Urls just like ww:url does now but in the new Cool format

As I said, I am not sure this is really needed. After all, Cool URIs are meant
to be at least URIs that would stay and not change when the site
organization/content/technology change. So why would you like to dynamically
build those URLs? I mean what would you expect the CoolUrlTag to do that you
can't do with the ww:url one?

Jérôme.

 Jérôme BERNARD wrote:
  Hi Cameron,
  
  The more I think about the CoolURIServletDispatcher, the more I think it is
 too
  much limited. For example I changed the abbreviation syntax from:
  http://myhost.com/article/paramValue1 to
  http://myhost.com/article/articleID/paramValue1 instead of
  http://myhost.com/article/article/paramValue1 .
  
  Why?
  
  Simply because most of the time your action are written that way:
  
  public class LoadArticleAction extends ActionSupport {  
long articleID;
Article article;
// getter  setter for the above members
// other methods omitted...
  }
  
  If you use a parameter named article (by using the same parameter name as
 the
  one from the action) then you will need to use weird method names in order
 to
  retreive the real object linked to this id.
  
  Anyway, I think we should write a custom ServletDispatcher that reads
 advanced
  mapping configuration from another xml file (or perhaps extends
 webwork.xml?).
  
  This file could allow to use the sheme explained above but also deal with
 URL
  including dates (like http://myhost.com/2003/10/02).
  
  What do you think about this?
  
  Jérôme.
  
  Selon Cameron Braid [EMAIL PROTECTED]:
  
  
 I have madea  patch to the servlet dispatcher to allow for extensability
 :
 
 the methods that can be overriden are
 
 protected void sendError(HttpServletRequest request, HttpServletResponse
 response, int code, Exception e)
 protected Map getParameterMap(HttpServletRequest request)
 protected Map getSessionMap(HttpServletRequest request)
 protected Map getApplicationMap()
 protected String getActionName(HttpServletRequest request)
 protected String getNameSpace(HttpServletRequest request)
 
 this will allow for the core logic in the service method to be re-used
 from custom servlet based dispatchers, allowing a custom URL and
 parameter mapping scheme to be implemented.
 
 
 Pat / Jason / Others : do we want to include the
 CoolUriServletDispatcher in the core ?
 
 If so, I will modify it to extend the new ServletDispatcher.
 
 
 
 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On 
 Behalf Of Jerome BERNARD
 Sent: Tuesday, 30 September 2003 4:06 AM
 To: [EMAIL PROTECTED]
 Subject: Re: [OS-webwork] Advanced URL mapping?
 
 
 Hum... I should have a closer look at IDEA then :-)
 Jérôme.
 
 Cameron Braid wrote:
 
 
 What IDE do you use ?
 
 Eclispe can automatically create delegator calls for you, 
 
 which makes 
 
 tasks like that a piece of cake.
 
 Cam
 
  
 
 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On 
 Behalf Of Jerome BERNARD
 Sent: Monday, 29 September 2003 7:26 PM
 To: [EMAIL PROTECTED]
 Subject: Re: [OS-webwork] Advanced URL mapping?
 
 
 Cameron Braid wrote:
 

 
 
 Cool idea :)
 
 Though, for the implementaion, wouldn't you have been better
  
 
 
 to use the

 
 
 wrapper pattern, rather than dynamic proxies :)
 
  
 
 
 Sure. I thought about it, but it's quite painful: you have to
 override 
 so many methods :-(
 
 I'll do it tomorrow and update the attachment in the JIRA issue.
 
 Jérôme.
 

 
 
 Cam
 
 
 
  
 
 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On
 Behalf Of Jérôme BERNARD
 Sent: Tuesday, 30 September 2003 1:30 AM
 To: [EMAIL PROTECTED]
 Subject: RE: [OS-webwork] Advanced URL mapping?
 
 
 I have created a new issue in JIRA
 (http://jira.opensymphony.com/secure/ViewIssue.jspa?key=WW-326
 ) and submitted a new servlet that extends ServletDispatcher
 and provides such a functionality. I also provided a way to 
 shorten even more the URL by assuming that if the first 
 parameter name is 

Re: [OS-webwork] Application Components

2003-10-02 Thread Samuel Mota

Hi,

No, the application-scoped resource won't be loaded until it's needed (lazy)

Ouch! But is there some way to get my object instanciated BEFORE I need it?

explaining ... my application-scoped resource does a lot of initializations that turns 
the first
action execution into a big pacience test.

thanks

+ Samuel G. Mota
+ [EMAIL PROTECTED]
+ 55 (11) 4417 7093
+ Business Application Dpt.
+ Netset Serviços em Tecnologia
+ a Hypercom Company
+ http://www.hypercom.com




---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork


Re: [OS-webwork] Type conversion

2003-10-02 Thread John Patterson
Indeed this seems to be the best solution to the common text formatting
problem...

 ww:property value=formateDate(startDate,'dd MMM ')/

Thanks.

But it does point out that the current type conversion scheme is very
limited as a text formatting mechanism.   Property based format
configuration is adequate for text input (ie from html forms) but an
approach similar to the code above is necessary for output (ie into the
view).  Maybe it would be better to not use this TypeConverter functionality
for the textual output of to views.

The TypeConverter approach does not allow for the different types of
formatting that may be required in a view.  For example, to output a date as
both a time part and a date part or to shorten a long description String
into an short abstract.  For these types of formatting issues maybe a new
formatting API should be created that can be controlled at the view level
directly with tags.

But for now I will roll my own text formatting like the above.

John


- Original Message - 
From: Francisco Hernandez [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, October 01, 2003 8:10 PM
Subject: Re: [OS-webwork] Type conversion


 I would probably just put a formatDate() method in my BaseAction class
 and use something like:

 ww:property value=formateDate(startDate,'dd MMM ')/


 John Patterson wrote:
  What is happening with the type conversion functionality?  I need to be
  able to override the conversion both to and from string easily.
  xwork-conversion.properties only allows me to specify one way.
 
  Is there any plans to allow you to configure a converter seperatly for
  each property?  For example, I have several dates which appear on a page
  in different formats.  It would be great to be able to specify in
  xwork.xml the format to be used for each property.  Or would this be
  best handled in a tag lib (to presentation specific)?
 
  Maybe if the PropertyTag had a format attribute which was somehow passed
  to the TypeConverter...
 
  ww:property value=startDate format=dd MMM /
 
  ...or something like that.
 
  John.





 ---
 This sf.net email is sponsored by:ThinkGeek
 Welcome to geek heaven.
 http://thinkgeek.com/sf
 ___
 Opensymphony-webwork mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork



---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork


Re: [OS-webwork] Application Components

2003-10-02 Thread Rick Salsa




Having not read the whole
thread, would it be possible for you to make that component implement
ServletContextListener as well? Then do the initializations in
contextInitialized?
Mathias has something like this, in that it uses ww2's IoC, but the
class isn't a component in any of the different scopes. The example is
here:

http://blogs.atlassian.com/scuttlebutt/java/OptimizeIndexListener.java

Or, just write a servletContextListener that calls the required methods
on the component. Just an some ideas. If anyone sees something wrong
with this, let me know... :)

/rick

Samuel Mota wrote:

  Hi,

  
  
No, the application-scoped resource won't be loaded until it's needed (lazy)

  
  
Ouch! But is there some way to get my object instanciated BEFORE I need it?

explaining ... my application-scoped resource does a lot of initializations that turns the first
action execution into a big pacience test.

thanks

+ Samuel G. Mota
+ [EMAIL PROTECTED]
+ 55 (11) 4417 7093
+ Business Application Dpt.
+ Netset Servios em Tecnologia
+ a Hypercom Company
+ http://www.hypercom.com




---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

  






[OS-webwork] Checkbox grouping?

2003-10-02 Thread CVillela
Title: Checkbox grouping?





Hi all,


I gotta create a form like this:


[ ] Foo
[ ] Bar
[ ] Baz
[ ] Other: [ ]


Being kind of a WW2 newbie, what would be the best way to do that? It'd be better if I could keep the other text filled in the textbox in the same place on the model (and thus, the model has a String property).

Any ideas gladly appreciated! :)


[]'s
-cv





RE: [OS-webwork] Advanced URL mapping?

2003-10-02 Thread Cameron Braid
I have used cocoon before and they provide a cool url mapping techinque
using matchers.

I will have a think about how we can integrate something like that.

For example,

Syntax aside, I would like to be able to specify a match pattern of : 

/action/year/month/day

to parse /article/2003/10/02 
and get a map {action=article,year=2003,month=10,day=02}

Since we are trying to achive a permalink style URL, why are the
parameter names required in the URL ?

Also, for your original idea

/article/id/10 would probably be better written as /article/10 with a
matcher /(action)/(id)

This type of pattern will also allow for action namespaces

/namespace/action/id

Then /customer/sale/10 - namespace=customer, action=sale, id=10
Then /admin/vendor/sale/10 - namespace=/admin/vendor, action=sale,
id=10

Before we implement these ideas, what other types of URL's do we want to
try and map ?

Cameron



 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On 
 Behalf Of Jérôme BERNARD
 Sent: Thursday, 2 October 2003 7:21 PM
 To: [EMAIL PROTECTED]
 Subject: RE: [OS-webwork] Advanced URL mapping?
 
 
 Hi Cameron,
 
 The more I think about the CoolURIServletDispatcher, the more 
 I think it is too much limited. For example I changed the 
 abbreviation syntax from: 
 http://myhost.com/article/paramValue1 to 
 http://myhost.com/article/articleID/paramValue1 instead of 
 http://myhost.com/article/article/paramValue1 .
 
 Why?
 
 Simply because most of the time your action are written that way:
 
 public class LoadArticleAction extends ActionSupport {  
   long articleID;
   Article article;
   // getter  setter for the above members
   // other methods omitted...
 }
 
 If you use a parameter named article (by using the same 
 parameter name as the one from the action) then you will need 
 to use weird method names in order to retreive the real 
 object linked to this id.
 
 Anyway, I think we should write a custom ServletDispatcher 
 that reads advanced mapping configuration from another xml 
 file (or perhaps extends webwork.xml?).
 
 This file could allow to use the sheme explained above but 
 also deal with URL including dates (like 
 http://myhost.com/2003/10/02).
 
 What do you think about this?
 
 Jérôme.
 
 Selon Cameron Braid [EMAIL PROTECTED]:
 
  I have madea  patch to the servlet dispatcher to allow for 
  extensability
  :
  
  the methods that can be overriden are
  
  protected void sendError(HttpServletRequest request, 
  HttpServletResponse response, int code, Exception e) protected Map 
  getParameterMap(HttpServletRequest request) protected Map 
  getSessionMap(HttpServletRequest request) protected Map 
  getApplicationMap() protected String 
 getActionName(HttpServletRequest 
  request) protected String getNameSpace(HttpServletRequest request)
  
  this will allow for the core logic in the service method to 
 be re-used 
  from custom servlet based dispatchers, allowing a custom URL and 
  parameter mapping scheme to be implemented.
  
  
  Pat / Jason / Others : do we want to include the 
  CoolUriServletDispatcher in the core ?
  
  If so, I will modify it to extend the new ServletDispatcher.
  
  
   -Original Message-
   From: [EMAIL PROTECTED]
   [mailto:[EMAIL PROTECTED] On 
   Behalf Of Jerome BERNARD
   Sent: Tuesday, 30 September 2003 4:06 AM
   To: [EMAIL PROTECTED]
   Subject: Re: [OS-webwork] Advanced URL mapping?
   
   
   Hum... I should have a closer look at IDEA then :-)
   Jérôme.
   
   Cameron Braid wrote:
   
   What IDE do you use ?
   
   Eclispe can automatically create delegator calls for you,
   which makes
   tasks like that a piece of cake.
   
   Cam
   
 
   
   -Original Message-
   From: [EMAIL PROTECTED]
   [mailto:[EMAIL PROTECTED] On
   Behalf Of Jerome BERNARD
   Sent: Monday, 29 September 2003 7:26 PM
   To: [EMAIL PROTECTED]
   Subject: Re: [OS-webwork] Advanced URL mapping?
   
   
   Cameron Braid wrote:
   
   
   
   Cool idea :)
   
   Though, for the implementaion, wouldn't you have been better
 
   
   to use the
   
   
   wrapper pattern, rather than dynamic proxies :)
   
 
   
   Sure. I thought about it, but it's quite painful: you have to 
   override so many methods :-(
   
   I'll do it tomorrow and update the attachment in the JIRA issue.
   
   Jérôme.
   
   
   
   Cam
   

   
 
   
   -Original Message-
   From: [EMAIL PROTECTED]
   [mailto:[EMAIL PROTECTED] On 
   Behalf Of Jérôme BERNARD
   Sent: Tuesday, 30 September 2003 1:30 AM
   To: [EMAIL PROTECTED]
   Subject: RE: [OS-webwork] Advanced URL mapping?
   
   
   I have created a new issue in JIRA 
   (http://jira.opensymphony.com/secure/ViewIssue.jspa?key=WW-326
   ) and submitted a new servlet that extends 
 ServletDispatcher and 
   provides such a functionality. I also provided a way 
 to shorten 
   even more the URL by assuming that if the first 
 parameter name 
   is not specified then it is 

RE: [OS-webwork] Advanced URL mapping?

2003-10-02 Thread Jérôme BERNARD
Selon Cameron Braid [EMAIL PROTECTED]:

 I have used cocoon before and they provide a cool url mapping techinque
 using matchers.

Yep. This is somehow the kind of thing WW should provide, but at a WW level,
meaning that we are not really dealing with pipeline but instead actions (or
action chains).

 I will have a think about how we can integrate something like that.
 
 For example,
 
 Syntax aside, I would like to be able to specify a match pattern of : 
 
 /action/year/month/day
 
 to parse /article/2003/10/02 
 and get a map {action=article,year=2003,month=10,day=02}
 
 Since we are trying to achive a permalink style URL, why are the
 parameter names required in the URL ?
 
 Also, for your original idea
 
 /article/id/10 would probably be better written as /article/10 with a
 matcher /(action)/(id)
 
 This type of pattern will also allow for action namespaces
 
 /namespace/action/id
 
 Then /customer/sale/10 - namespace=customer, action=sale, id=10
 Then /admin/vendor/sale/10 - namespace=/admin/vendor, action=sale,
 id=10
 
 Before we implement these ideas, what other types of URL's do we want to
 try and map ?

Have a look at the proposal I sent.
BTW, I do not know why but mails sent are delivered a few hours late...


Regards,
Jérôme.


---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork


[OS-webwork] Testing actions

2003-10-02 Thread Samuel Mota
Hi,

I'm building a test case with JUnit, I'm trying to use the hole WW/XW engine ...

while trying to put an object into the session map I'm getting a NPE ...
At my action the code:
ActionContext.getContext().put(
ActionContext.SESSION,
ActionContext.getContext().
  getSession().put(Static.USER_SESSION_KEY, user)
);

The setUp method from the test case:
  protected void setUp() throws Exception {
super.setUp();
Static.setEnvironment();
XmlConfigurationProvider configurationProvider = new 
XmlConfigurationProvider(
xwork.xml);
ConfigurationManager.clearConfigurationProviders();
ConfigurationManager.addConfigurationProvider(configurationProvider);
ConfigurationManager.getConfiguration().reload();
proxy = ActionProxyFactory.getFactory().createActionProxy(,login,null);
userLogin = (UserLogin) proxy.getAction();
  }

One test method:
  public void testInvalidLogin() throws Exception {
proxy.setExecuteResult(false);
userLogin.setCelulaTecnica(new Integer(1));
userLogin.setPassword(0);
assertEquals(Action.ERROR,proxy.execute());
assertTrue(userLogin.hasErrors());
  }

How can I achive this?

thanks

+ Samuel G. Mota
+ [EMAIL PROTECTED]
+ 55 (11) 4417 7093
+ Business Application Dpt.
+ Netset Serviços em Tecnologia
+ a Hypercom Company
+ http://www.hypercom.com



---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork


RE: [OS-webwork] WebWork2 newbie biting off more than I can chew...

2003-10-02 Thread Jason Carreira
Title: Message



Sorry, 
I kept meaning to answer this email...

  
  -Original Message-From: Peter White 
  [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 30, 2003 10:11 
  PMTo: [EMAIL PROTECTED]Subject: 
  [OS-webwork] WebWork2 newbie biting off more than I can 
  chew...
  Hi Gang! 
  I'm still fairly new to WW2 and am using it for a 
  contract project I'm working on. What I'm trying to do is pretty complex so 
  I'm hoping to verify whether or not the framework has the built-in capability 
  to support what I'm trying to do. If so, any pointers in the right direction 
  would be greatly appreciated. I'll try to explain what I need to accomplish as 
  clearly as possible without putting it in the application's context (sorry, 
  I'm under NDA).
  Description of process: 
  A dynamically generated web page is being 
  submitted. This page contains groups of fields that are represented by 
  different Java classes (All derived from the same Abstract base class). When 
  my WW Action is called, my Action's execute() method will load the instance of 
  the object that represents the form being submitted and it contains a List of 
  AbstractBaseClass containing the classes that were represented on the form. 
  I'm using Hibernate as my persistence layer and will have all the info I'll 
  need to retrieve the form instance from the DB in a hidden field in the form 
  being submitted.
  The 2 challenges, based on the above process, that 
  I'm facing are as follows: 
  1) I'm used to extending ActionSupport and having 
  WW2 "automagically" set all my attributes for me. This won't work since the 
  attributes which need to be set will be the attributes contained in the List 
  collection that will be retrieved from the DB via Hibernate. My thought on 
  this is that each class contained in the List will have it's own 
  implementation of a "getFormFields" method which would extract the field 
  values from the request, and then I'd iterate through the list calling 
  "getFormFields" on each object in the list - I'm assuming WW2 can't do 
  anything automatically for me at this level. If that's not the case, I'd love 
  to hear and better ways to implement this. If that's the only way to do what I 
  need, which WW2 is the best class to extend for this purpose?
  2) Validation - rather than using a 
  validation interceptor, I'd still like to be able to use the Validation 
  framework with a separate validation.xml file for each of the classes that 
  could possibly be contained in the above mentioned list. However, I'm pretty 
  sure the validationStack won't work for me here since the form being validated 
  has a non-static structure. Once "getFormFields" from step #1 has been called, 
  then I'd call something like "doValidate()" which would use XWork's validation 
  framework to validate that populated object using it's class-specific 
  validation rules.
  You can use theVisitorFieldValidator to havethe 
  framework automatically validate all of the items in the list for you. 
  
  I figure #1 is possible, worst case, by passing 
  around the request object and extracting what I need from it. Unfortunately, 
  I'm not so sure about #2. I'm going to take a look at 
  com.opensymphony.xwork.validator.ValidationInterceptor when I get a chance to 
  see how it's working it magic but I thought I'd fire this off in case anyone's 
  done something similar.
  Thanks in advance! Peter 


RE: [OS-webwork] WebWork2 newbie biting off more than I can chew...

2003-10-02 Thread Jason Carreira
Title: Message



Which 
validators throw exceptions for null Strings? We have the RequiredFieldValidator 
which checks for null values, and the RequiredStringValidator also checks for 
empty Strings... The range validators are built to not check fields which are 
null (assuming you'll have a RequiredFieldValidator if you want to make it 
required).

If 
you're getting exceptions, it's a bug and we need to fix it.

  
  -Original Message-From: Peter White 
  [mailto:[EMAIL PROTECTED] Sent: Thursday, October 02, 2003 1:37 
  AMTo: [EMAIL PROTECTED]Subject: 
  RE: [OS-webwork] WebWork2 newbie biting off more than I can 
  chew...
  Hi Pat,
  
  My partner in crime on this project has been 
  experimenting with the validation framework all day. He says it looks like we 
  can do what we want with it with one minor exception (sorry, no pun intended 
  here...) - the validation framework throws an exception if String attributes 
  it's validatingare null. It sounds like this might be a bugbut we 
  can workaround this by wrapping the String attributes so they return an empty 
  String if they have null values before having them validated. Thanks for the 
  ParameterAware tip, this would definitely be preferable to passing around and 
  working with the request object directly.
  
  Regards,
  Peter


RE: [OS-webwork] Converters need to be unified

2003-10-02 Thread Jason Carreira
Title: Message



Cool... now we need i18n localized validators if we switched from 
using the property files directly to using ResourceBundle's we could do this 
pretty easily...

We 
also need to work on getting conversion to add field messages if it 
fails...

  
  -Original Message-From: Pat Lightbody 
  [mailto:[EMAIL PROTECTED] Sent: Thursday, October 02, 2003 
  12:31 AMTo: 
  [EMAIL PROTECTED]Subject: Re: [OS-webwork] 
  Converters need to be unified
  Well -- there is 
  xwork-default-conversion.properties and xwork-conversion.properties. So 
  xwork-default-conversion.properties is in xwork.jar and then you can write 
  your own xwork-conversion.properties that can override that.
  
  -Pat
  
- Original Message - 
From: 
Jason Carreira 
To: [EMAIL PROTECTED] 

Sent: Monday, September 29, 2003 11:25 
AM
Subject: RE: [OS-webwork] Converters 
need to be unified

The xwork-default-conversion.properties does this, to some extent... 
Pat, it might be nice to be able to register other default conversion 
properties files (app specific)...

  
  -Original Message-From: Fred 
  Lamuette [mailto:[EMAIL PROTECTED] Sent: Monday, 
  September 29, 2003 3:33 AMTo: [EMAIL PROTECTED]Subject: 
  [OS-webwork] Converters need to be unified
  I think WW2should give the ability to use converters (default 
  and user-defined) easily from actions and views, from aunified entry 
  point. It would be nice.
  Richard.


RE: [OS-webwork] Checkbox grouping?

2003-10-02 Thread Jason Carreira
Title: Message



If the 
checkboxes are not selected, nothing will be sent for them You could name 
the check boxes and text field the same thing and you'd get a String[] with 
either 1 or 2 things in it (1 if no checkbox)... At least I think 
so...

  
  -Original Message-From: 
  [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 
  Thursday, October 02, 2003 10:07 AMTo: 
  [EMAIL PROTECTED]Subject: [OS-webwork] 
  Checkbox grouping?
  Hi all, 
  I gotta create a form like this: 
  [ ] Foo [ ] 
  Bar [ ] Baz [ ] Other: 
  [ 
  ] 
  Being kind of a WW2 newbie, what would be the best 
  way to do that? It'd be better if I could keep the "other" text filled in the 
  textbox in the same place on the model (and thus, the model has a String 
  property).
  Any ideas gladly appreciated! :) 
  []'s -cv 
  


Re: [OS-webwork] Application Components

2003-10-02 Thread Pat Lightbody



Yeah -- any class, not just actions, can use the 
IoC framework. I think the best bet would be to write a ServletContextListener 
that implements FooAware (Foo is your resource you want to load up) and then 
pulls out the application-scoped ComponentManager by doing: 
context.getAttribute("DefaultComponentManager") and then calls init(this) on 
it.

-Pat

  - Original Message - 
  From: 
  Rick Salsa 
  To: [EMAIL PROTECTED] 
  
  Sent: Thursday, October 02, 2003 7:00 
  AM
  Subject: Re: [OS-webwork] Application 
  Components
  Having not read the 
  whole thread, would it be possible for you to make that component implement 
  ServletContextListener as well? Then do the initializations in 
  contextInitialized? Mathias 
  has something like this, in that it uses ww2's IoC, but the class isn't a 
  component in any of the different scopes. The example is here:http://blogs.atlassian.com/scuttlebutt/java/OptimizeIndexListener.javaOr, 
  just write a servletContextListener that calls the required methods on the 
  component. Just an some ideas. If anyone sees something wrong with this, let 
  me know... :)/rickSamuel Mota wrote:
  Hi,

  
No, the application-scoped resource won't be loaded until it's needed (lazy)

Ouch! But is there some way to get my object instanciated BEFORE I need it?

explaining ... my application-scoped resource does a lot of initializations that turns the first
action execution into a big pacience test.

thanks

+ Samuel G. Mota
+ [EMAIL PROTECTED]
+ 55 (11) 4417 7093
+ Business Application Dpt.
+ Netset Serviços em Tecnologia
+ a Hypercom Company
+ http://www.hypercom.com




---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

  


[OS-webwork] Another quickie

2003-10-02 Thread CVillela
Title: Another quickie





Hi all :)


First, thanks a lot to Jason for answering the previous question (checkbox grouping) so fast. Really helpful! :)


Now I'm creating one more component, a select box for gender, which should render something like this:


 Gender: [Choose one... ][v]


In my Velocity template, I tried:


#tag(Select 
label=gender name=gender value=gender
listKey={' ', 'M', 'F'}
listValue={'Choose one...', 'Male, 'Female'}
)


But, so far, no-no. I'm almost certain there's something wrong with the OGNL expressions, but reading the OGNL user's guide I couldn't find any evidence proving it. Any ideas? :)

[]'s
-cv





[OS-webwork] Accessing request parameters

2003-10-02 Thread Nils Hartmann
Hi,

I'm still looking for a way to access request parameters from WW2-tags, 
like in WW1 ww:property value=$foo/. The only thread about this issue 
in the mailing list is from june and unfortunatly it doesn't provide an 
answer. Is there any progress made in this area ?

Thanks,
Nils




---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork


RE: RES: RES: [OS-webwork] Component repository

2003-10-02 Thread Drew McAuliffe
Here's another useful idea. How about a rich text editor component, to
take the place of a textarea control? I've seen things like this on PHP
message boards. It includes a formatting toolbar as well as the textarea
itself, and works just like a miniature wordpad. I don't know how hard
this would be to do as a component, but it would certainly be useful.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Francisco Hernandez
Sent: Thursday, October 02, 2003 1:42 AM
To: [EMAIL PROTECTED]
Subject: Re: RES: RES: [OS-webwork] Component repository


I need to look into the code but the date picker component works fine 
with IE, its just Mozilla thats crapping out with it

Pat Lightbody wrote:
 Looks like a problem with the absolute/relative paths -- should be 
 trivial to fix.
 
 - Original Message -
 From: Francisco Hernandez [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, September 30, 2003 12:18 PM
 Subject: Re: RES: RES: [OS-webwork] Component repository
 
 
 
im using the latest firdbird myself too, when i click on the arrows to

goto the next/previous month/year I get this:

404 Not Found
Resource 
/cart/templates/xhtml/calendar/templates/xhtml/calendar/calendar.html
not found on this server

[EMAIL PROTECTED] wrote:

Really?! I expected the other way around, as I developed/tested this 
using Mozilla Firebird 0.6! :)

What does the JavaScript console shows?

-Mensagem original-
De: Francisco Hernandez [mailto:[EMAIL PROTECTED] Enviada em: 
terça-feira, 30 de setembro de 2003 15:51
Para: [EMAIL PROTECTED]
Assunto: Re: RES: [OS-webwork] Component repository


uh oh, I tried it in Mozilla, and it fails, but works great in IE!

[EMAIL PROTECTED] wrote:
  Okay, the date picker is here: 
  http://jira.opensymphony.com/secure/ViewIssue.jspa?key=WW-329
 
  Have fun, and if there are any suggestions, feel free to add them.
 
  Peace,
  -cv
 
  -Mensagem original-
  *De:* Jason Carreira [mailto:[EMAIL PROTECTED]
  *Enviada em:* terça-feira, 30 de setembro de 2003 10:19
  *Para:* [EMAIL PROTECTED]
  *Assunto:* RE: [OS-webwork] Component repository
 
  If people add them to Jira issues, we'll put them in CVS to go 
  into
 
 the
 
  distribution...
 
  -Original Message-
  *From:* Drew McAuliffe [mailto:[EMAIL PROTECTED]
  *Sent:* Tuesday, September 30, 2003 2:01 AM
  *To:* [EMAIL PROTECTED]
  *Subject:* RE: [OS-webwork] Component repository
 
  Sure, JIRA is fine, or you can email me at drew (at) lowerunit
 
 dot
 
  com (trying to avoid getting more spam). I've been looking for
 
 one
 
  of these for a long time. It's especially helpful to have a ww
  component. Any idea on if a component repository will be
created,
  and if so, where it will go on CVS? A great component
repository
  would really help sell webwork to a lot of people, hitting a
nice
  sweet spot between tapestry and struts.
 
  Thanks,
 
  Drew
 
  -Original Message-
  *From:* [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED]
*On
  Behalf Of [EMAIL PROTECTED]
  *Sent:* Monday, September 29, 2003 5:30 AM
  *To:* [EMAIL PROTECTED]
  *Subject:* RES: [OS-webwork] Component repository
 
  Hi Drew!
 
  I just finished mine, and it's working quite well with
 
 european
 
  (dd/mm/) dates. Should be a breeze to modify them for
the
  american/british format (mm/dd/). How should I send it
to
  you? Maybe create an issue in JIRA and attach it?
 
  -cv
 
  -Mensagem original-
  *De:* Drew McAuliffe [mailto:[EMAIL PROTECTED]
  *Enviada em:* sábado, 27 de setembro de 2003 14:51
  *Para:* [EMAIL PROTECTED]
  *Assunto:* RE: [OS-webwork] Component repository
 
  If someone has a datepicker component available, I would 
  love
 
 to
 
  get access to it right away.
 
  -Original Message-
  *From:*
[EMAIL PROTECTED]
 
[mailto:[EMAIL PROTECTED]
  *On Behalf Of *Jason Carreira
  *Sent:* Friday, September 26, 2003 11:46 AM
  *To:* [EMAIL PROTECTED]
  *Subject:* RE: [OS-webwork] Component repository
 
  I think they should go right into WW2 CVS... Sounds 
  like
 
 a
 
  great idea.
 
  -Original Message-
  *From:* [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED]
  *Sent:* Friday, September 26, 2003 10:47 AM
  *To:* [EMAIL PROTECTED]
  *Subject:* [OS-webwork] Component repository
 
  Hi all,
 
  Do you think it would be a good idea to set up a
  component repository somewhere? I'm creating some
  components here, and I started feeling that 
  creating
 
 a
 
  date picker or tree 

Re: [OS-webwork] Accessing request parameters

2003-10-02 Thread Rick Salsa




The request parameters are in
the valuestack, so I believe the syntax to search the stack is #foo.

/rick

Nils Hartmann wrote:
Hi,
  
  
I'm still looking for a way to access request parameters from WW2-tags,
like in WW1 ww:property value="$foo"/. The only thread about
this issue in the mailing list is from june and unfortunatly it doesn't
provide an answer. Is there any progress made in this area ?
  
  
Thanks,
  
Nils
  
  
  
  
  
  
  
---
  
This sf.net email is sponsored by:ThinkGeek
  
Welcome to geek heaven.
  
http://thinkgeek.com/sf
  
___
  
Opensymphony-webwork mailing list
  
[EMAIL PROTECTED]
  
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
  
  






[OS-webwork] WW2 Tags vs. WW1.x Tags

2003-10-02 Thread Thompson, Kris
Title: WW2 Tags vs. WW1.x Tags






In general can one state that most if not all of the WW1.x tags work in WW2 or has there been a major overhaul?


Thanks


Kris Thompson





Re: [OS-webwork] Accessing request parameters

2003-10-02 Thread Nils Hartmann
The request parameters are in the valuestack, so I believe the syntax to 
search the stack is #foo.
It doesn't work for me. I call a jsp with http://myhost.com?foo=bla but
ww:property value=#foo/ doesn't return the value. (Regardless whether 
the jsp is invoked directly or used as an action's result). The same in 
included pages.

nils



---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork


RES: RES: RES: [OS-webwork] Component repository

2003-10-02 Thread CVillela
Title: RES: RES: RES: [OS-webwork] Component repository





Hi Drew!


Great idea, indeed, and I think it's kinda easy to do - I just need to have a look at Roller's source and grab its HTML editor components, and rework them to be WW2 components.

Now, I just gotta find me some time to implement that :)


[]'s
-cv


-Mensagem original-
De: Drew McAuliffe [mailto:[EMAIL PROTECTED]]
Enviada em: quinta-feira, 2 de outubro de 2003 13:58
Para: [EMAIL PROTECTED]
Assunto: RE: RES: RES: [OS-webwork] Component repository



Here's another useful idea. How about a rich text editor component, to
take the place of a textarea control? I've seen things like this on PHP
message boards. It includes a formatting toolbar as well as the textarea
itself, and works just like a miniature wordpad. I don't know how hard
this would be to do as a component, but it would certainly be useful.


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] On Behalf Of
Francisco Hernandez
Sent: Thursday, October 02, 2003 1:42 AM
To: [EMAIL PROTECTED]
Subject: Re: RES: RES: [OS-webwork] Component repository



I need to look into the code but the date picker component works fine 
with IE, its just Mozilla thats crapping out with it


Pat Lightbody wrote:
 Looks like a problem with the absolute/relative paths -- should be 
 trivial to fix.
 
 - Original Message -
 From: Francisco Hernandez [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, September 30, 2003 12:18 PM
 Subject: Re: RES: RES: [OS-webwork] Component repository
 
 
 
im using the latest firdbird myself too, when i click on the arrows to


goto the next/previous month/year I get this:

404 Not Found
Resource 
/cart/templates/xhtml/calendar/templates/xhtml/calendar/calendar.html
not found on this server

[EMAIL PROTECTED] wrote:

Really?! I expected the other way around, as I developed/tested this 
using Mozilla Firebird 0.6! :)

What does the _javascript_ console shows?

-Mensagem original-
De: Francisco Hernandez [mailto:[EMAIL PROTECTED]] Enviada em: 
terça-feira, 30 de setembro de 2003 15:51
Para: [EMAIL PROTECTED]
Assunto: Re: RES: [OS-webwork] Component repository


uh oh, I tried it in Mozilla, and it fails, but works great in IE!

[EMAIL PROTECTED] wrote:
  Okay, the date picker is here: 
  http://jira.opensymphony.com/secure/ViewIssue.jspa?key=WW-329
 
  Have fun, and if there are any suggestions, feel free to add them.
 
  Peace,
  -cv
 
  -Mensagem original-
  *De:* Jason Carreira [mailto:[EMAIL PROTECTED]]
  *Enviada em:* terça-feira, 30 de setembro de 2003 10:19
  *Para:* [EMAIL PROTECTED]
  *Assunto:* RE: [OS-webwork] Component repository
 
  If people add them to Jira issues, we'll put them in CVS to go 
  into
 
 the
 
  distribution...
 
  -Original Message-
  *From:* Drew McAuliffe [mailto:[EMAIL PROTECTED]]
  *Sent:* Tuesday, September 30, 2003 2:01 AM
  *To:* [EMAIL PROTECTED]
  *Subject:* RE: [OS-webwork] Component repository
 
  Sure, JIRA is fine, or you can email me at drew (at) lowerunit
 
 dot
 
  com (trying to avoid getting more spam). I've been looking for
 
 one
 
  of these for a long time. It's especially helpful to have a ww
  component. Any idea on if a component repository will be
created,
  and if so, where it will go on CVS? A great component
repository
  would really help sell webwork to a lot of people, hitting a
nice
  sweet spot between tapestry and struts.
 
  Thanks,
 
  Drew
 
  -Original Message-
  *From:* [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED]]
*On
  Behalf Of [EMAIL PROTECTED]
  *Sent:* Monday, September 29, 2003 5:30 AM
  *To:* [EMAIL PROTECTED]
  *Subject:* RES: [OS-webwork] Component repository
 
  Hi Drew!
 
  I just finished mine, and it's working quite well with
 
 european
 
  (dd/mm/) dates. Should be a breeze to modify them for
the
  american/british format (mm/dd/). How should I send it
to
  you? Maybe create an issue in JIRA and attach it?
 
  -cv
 
  -Mensagem original-
  *De:* Drew McAuliffe [mailto:[EMAIL PROTECTED]]
  *Enviada em:* sábado, 27 de setembro de 2003 14:51
  *Para:* [EMAIL PROTECTED]
  *Assunto:* RE: [OS-webwork] Component repository
 
  If someone has a datepicker component available, I would 
  love
 
 to
 
  get access to it right away.
 
  -Original Message-
  *From:*
[EMAIL PROTECTED]
 
[mailto:[EMAIL PROTECTED]]
  *On Behalf Of *Jason Carreira
  *Sent:* Friday, September 26, 2003 11:46 AM
  *To:* [EMAIL PROTECTED]
  *Subject:* RE: [OS-webwork] Component repository
 
  I think they should go right into WW2 CVS... Sounds 
  like
 
 a
 
  great idea.
 
  -Original Message-
  *From:* [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED]]
  *Sent:* Friday, September 26, 2003 10:47 AM
  *To:* [EMAIL PROTECTED]
  *Subject:* [OS-webwork] Component repository
 
  Hi all,
 
  Do you think it would be a good idea to set up a
  component repository somewhere? I'm creating some
  components here, and I 

Re: [OS-webwork] Accessing request parameters

2003-10-02 Thread Pat Lightbody
#foo grabs from the ActionContext (OgnlContext is what it really is), so
that won't work

I recently added support for doing #reqeuest['foo'], (as well as session
and application), but those are for _attributes_ not parameters. This is an
easy fix though -- I just have to add another Map (parameter map). What's a
good now? How about just params?

-Pat

- Original Message - 
From: Nils Hartmann [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, October 02, 2003 10:17 AM
Subject: Re: [OS-webwork] Accessing request parameters


  The request parameters are in the valuestack, so I believe the syntax to
  search the stack is #foo.

 It doesn't work for me. I call a jsp with http://myhost.com?foo=bla but
 ww:property value=#foo/ doesn't return the value. (Regardless whether
 the jsp is invoked directly or used as an action's result). The same in
 included pages.

 nils




 ---
 This sf.net email is sponsored by:ThinkGeek
 Welcome to geek heaven.
 http://thinkgeek.com/sf
 ___
 Opensymphony-webwork mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork



---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork


[OS-webwork] List of products using WebWork

2003-10-02 Thread Jason Carreira
I've added a section on the WebWork page which lists products using
WebWork

http://wiki.opensymphony.com/space/WebWork

Feel free to add yours...

Jason

--
Jason Carreira
Technical Architect, Notiva Corp.
phone:  585.240.2793
  fax:  585.272.8118
email:  [EMAIL PROTECTED]
---
Notiva - optimizing trade relationships (tm)
 


---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork


RE: [OS-webwork] NPE thrown when view location returned is not found for an action

2003-10-02 Thread Jason Carreira
Did you create a Jira issue for this?

 -Original Message-
 From: Francisco Hernandez [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, October 01, 2003 8:08 PM
 To: [EMAIL PROTECTED]
 Subject: [OS-webwork] NPE thrown when view location returned 
 is not found for an action
 
 
 im getting the NPE below thrown when a views location 
 returned in not found
 
 i have the result defined but the file (a jsp) does not exist in the 
 file system. just need a prettier error i guess..
 
 500 Internal Server Error
 
 java.lang.NullPointerException
 
   at 
 com.opensymphony.webwork.dispatcher.ServletDispatcherResult.ex
 ecute(ServletDispatcherResult.java:67)
 
   at 
 com.opensymphony.xwork.DefaultActionInvocation.executeResult(D
 efaultActionInvocation.java:235)
 
   at 
 com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultA
 ctionInvocation.java:161)
 
   at 
 com.opensymphony.xwork.interceptor.DefaultWorkflowInterceptor.
 intercept(DefaultWorkflowInterceptor.java:58)
 
   at 
 com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultA
 ctionInvocation.java:149)
 
   at 
 com.opensymphony.xwork.interceptor.AroundInterceptor.intercept
 (AroundInterceptor.java:37)
 
   at 
 com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultA
 ctionInvocation.java:149)
 
   at 
 com.opensymphony.xwork.interceptor.AroundInterceptor.intercept
 (AroundInterceptor.java:37)
 
   at 
 com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultA
 ctionInvocation.java:149)
 
   at 
 com.opensymphony.xwork.interceptor.AroundInterceptor.intercept
 (AroundInterceptor.java:37)
 
   at 
 com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultA
 ctionInvocation.java:149)
 
   at 
 com.opensymphony.xwork.interceptor.AroundInterceptor.intercept
 (AroundInterceptor.java:37)
 
   at 
 com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultA
 ctionInvocation.java:149)
 
   at 
 com.opensymphony.xwork.interceptor.TimerInterceptor.intercept(
 TimerInterceptor.java:66)
 
   at 
 com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultA
 ctionInvocation.java:149)
 
   at 
 com.opensymphony.xwork.DefaultActionProxy.execute(DefaultActio
 nProxy.java:121)
 
   at 
 com.opensymphony.webwork.dispatcher.ServletDispatcher.service(
 ServletDispatcher.java:169)
 
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
 
   at com.evermind[Orion/2.0.2 (build 11157)]._hb.doFilter(.:59)
 
   at 
 com.opensymphony.webwork.lifecycle.RequestLifecycleFilter.doFi
 lter(RequestLifecycleFilter.java:62)
 
   at com.evermind[Orion/2.0.2 (build 11157)]._cub._pod(.:387)
 
   at com.evermind[Orion/2.0.2 (build 11157)]._cub._bmc(.:177)
 
   at com.evermind[Orion/2.0.2 (build 11157)]._ax._ltc(.:666)
 
   at com.evermind[Orion/2.0.2 (build 11157)]._ax._uab(.:191)
 
   at com.evermind[Orion/2.0.2 (build 11157)]._bf.run(.:62)
 
 
 
 
 
 ---
 This sf.net email is sponsored by:ThinkGeek
 Welcome to geek heaven.
 http://thinkgeek.com/sf 
 ___
 Opensymphony-webwork mailing list 
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
 


---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork


RE: [OS-webwork] Testing actions

2003-10-02 Thread Jason Carreira
See below...

 -Original Message-
 From: Samuel Mota [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, October 02, 2003 11:16 AM
 To: [EMAIL PROTECTED]
 Subject: [OS-webwork] Testing actions
 
 
 Hi,
 
 I'm building a test case with JUnit, I'm trying to use the 
 hole WW/XW engine ...
 
 while trying to put an object into the session map I'm 
 getting a NPE ... At my action the code: 
 ActionContext.getContext().put(
 ActionContext.SESSION,
 ActionContext.getContext().   
 getSession().put(Static.USER_SESSION_KEY, user) );

Try getting the Session first, then setting something into it... Why are you trying to 
set something into the ActionContext to replace the Session?

ActionContext context = ActionContext.getContext();
Map session = context.getSession();
session.put(Static.USER_SESSION_KEY, user);

 
 The setUp method from the test case:
   protected void setUp() throws Exception {
 super.setUp();
 Static.setEnvironment();
 XmlConfigurationProvider configurationProvider = 
 new XmlConfigurationProvider( xwork.xml);
 ConfigurationManager.clearConfigurationProviders();
 
 ConfigurationManager.addConfigurationProvider(configurationProvider);
 ConfigurationManager.getConfiguration().reload();
 proxy = 
 ActionProxyFactory.getFactory().createActionProxy(,login,null);
 userLogin = (UserLogin) proxy.getAction();
   }
 
 One test method:
   public void testInvalidLogin() throws Exception {
 proxy.setExecuteResult(false);
 userLogin.setCelulaTecnica(new Integer(1));
 userLogin.setPassword(0);
 assertEquals(Action.ERROR,proxy.execute());
 assertTrue(userLogin.hasErrors());
   }
 
 How can I achive this?
 
 thanks
 
 + Samuel G. Mota
 + [EMAIL PROTECTED]
 + 55 (11) 4417 7093
 + Business Application Dpt.
 + Netset Serviços em Tecnologia
 + a Hypercom Company
 + http://www.hypercom.com
 
 
 
 ---
 This sf.net email is sponsored by:ThinkGeek
 Welcome to geek heaven.
 http://thinkgeek.com/sf 
 ___
 Opensymphony-webwork mailing list 
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
 


---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork


RE: [OS-webwork] List of products using WebWork

2003-10-02 Thread Smith, Scott
Jason

I'd be very interested in a list of sites SPECIFICALLY using Webwork 2
when they come on-line.

Scott Smith 
Technical Specialist II 
TSG HLIS E-Commerce Solution Delivery 
Washington Mutual Bank 
17901 Von Karman, 5th floor 7124MICA 
Irvine, CA 92614 
Office: 949-838-1418
Cell: 949-413-6485


-Original Message-
From: Jason Carreira [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 02, 2003 10:32 AM
To: [EMAIL PROTECTED]
Subject: [OS-webwork] List of products using WebWork

I've added a section on the WebWork page which lists products using
WebWork

http://wiki.opensymphony.com/space/WebWork

Feel free to add yours...

Jason

--
Jason Carreira
Technical Architect, Notiva Corp.
phone:  585.240.2793
  fax:  585.272.8118
email:  [EMAIL PROTECTED]
---
Notiva - optimizing trade relationships (tm)
 


---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork


---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork


Re: [OS-webwork] Accessing request parameters

2003-10-02 Thread Nils Hartmann
I recently added support for doing #reqeuest['foo'], (as well as 
session
and application), but those are for _attributes_ not parameters. This is 
an
easy fix though -- I just have to add another Map (parameter map). What's 
a
good now? How about just params?
Who cares about names, it's the result that counts ;-) For me params is 
ok. Would be great If you add this feature.

Thanks a lot,

Nils



---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork


Re: [OS-webwork] Escaping

2003-10-02 Thread boxed
Pat Lightbody wrote:

There are a few open issues with regards to escaping -- none of which 
all agree how it should be handled. Some want UI tags to escape, some 
want them not to. Some want the URL tag to escape, others don't. I am 
leaning towards this:
 
* UI tags, property, iterate, text, etc should all _escape_ by default
* URL tag should NOT escape by default
* All tags should have an escape attribute (true/false)
* Possibly have global params in webwork.properties to override the 
two defaults (UI  URL)
 
What do you guys think?
 
-Pat
 
I think there is some mistake here. The property tag AND the iterate 
tags can't escape. That will create the following issue:

ww:iterate value=foo
 this is escaped
 ww:property value=thisPropertyIsEscapedTwice/
/ww:iterate
etcetc. It seems that either you haven't thought this through or you put 
it strangely. +1 on all tags having escape attribute though. I do think 
that it might be an issue that there's really two kinds of escaping: 
escaping the body of the tag and escaping the text the tag prints. This 
is rather confusing, and unwanted.

Anders Hovmöller



---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork


Re: [OS-webwork] List of products using WebWork

2003-10-02 Thread Bruce Ritchie
Jason Carreira wrote:
I've added a section on the WebWork page which lists products using
WebWork
http://wiki.opensymphony.com/space/WebWork

Feel free to add yours...
I added Jive Forums to the list.

Regards,

Bruce Ritchie


smime.p7s
Description: S/MIME Cryptographic Signature


[OS-webwork] Localized text messages - with parameters?

2003-10-02 Thread Samuel Mota
Is there some way to get the localized text messages receiving parameters to replace?

Shoud be nice to have a message like this:

myMsg=Your (?) last login was on ?

And them call:

List params = new ArrayList(2);
params.add(username);
params.add(logindate);
addActionError(myMsg,params)

+ Samuel G. Mota
+ [EMAIL PROTECTED]
+ 55 (11) 4417 7093
+ Business Application Dpt.
+ Netset Serviços em Tecnologia
+ a Hypercom Company
+ http://www.hypercom.com



---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork


RE: [OS-webwork] WW2 Tags vs. WW1.x Tags

2003-10-02 Thread Jason Carreira
Title: Message



The 
major changes are:

1) the 
ww:property tag does not do 3 things anymore :-) We now have a ww:push tag as 
well as the ww:property tag
2) a 
few of the tags haven't been ported over or completely finished 
up

  
  -Original Message-From: Thompson, Kris 
  [mailto:[EMAIL PROTECTED] Sent: Thursday, October 02, 2003 
  1:11 PMTo: Opensymphony-Webwork (E-mail)Subject: 
  [OS-webwork] WW2 Tags vs. WW1.x Tags
  In general can one state that most if not all of 
  the WW1.x tags work in WW2 or has there been a major overhaul? 
  Thanks 
  Kris Thompson 


RE: RES: RES: [OS-webwork] Component repository

2003-10-02 Thread Jason Carreira
There's also this:

http://displaytag.sourceforge.net/

Which is very cool...  Mathias Bogaert is on the project team (and works with 
WebWork)... This would be cool to use with WW2 and be able to use Ognl, if possible...

 -Original Message-
 From: Drew McAuliffe [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, October 02, 2003 12:58 PM
 To: [EMAIL PROTECTED]
 Subject: RE: RES: RES: [OS-webwork] Component repository
 
 
 Here's another useful idea. How about a rich text editor 
 component, to take the place of a textarea control? I've seen 
 things like this on PHP message boards. It includes a 
 formatting toolbar as well as the textarea itself, and works 
 just like a miniature wordpad. I don't know how hard this 
 would be to do as a component, but it would certainly be useful.
 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On 
 Behalf Of Francisco Hernandez
 Sent: Thursday, October 02, 2003 1:42 AM
 To: [EMAIL PROTECTED]
 Subject: Re: RES: RES: [OS-webwork] Component repository
 
 
 I need to look into the code but the date picker component works fine 
 with IE, its just Mozilla thats crapping out with it
 
 Pat Lightbody wrote:
  Looks like a problem with the absolute/relative paths -- should be
  trivial to fix.
  
  - Original Message -
  From: Francisco Hernandez [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Tuesday, September 30, 2003 12:18 PM
  Subject: Re: RES: RES: [OS-webwork] Component repository
  
  
  
 im using the latest firdbird myself too, when i click on 
 the arrows to
 
 goto the next/previous month/year I get this:
 
 404 Not Found
 Resource
 /cart/templates/xhtml/calendar/templates/xhtml/calendar/cale
 ndar.html
 not found on this server
 
 [EMAIL PROTECTED] wrote:
 
 Really?! I expected the other way around, as I 
 developed/tested this
 using Mozilla Firebird 0.6! :)
 
 What does the JavaScript console shows?
 
 -Mensagem original-
 De: Francisco Hernandez [mailto:[EMAIL PROTECTED] Enviada em:
 terça-feira, 30 de setembro de 2003 15:51
 Para: [EMAIL PROTECTED]
 Assunto: Re: RES: [OS-webwork] Component repository
 
 
 uh oh, I tried it in Mozilla, and it fails, but works great in IE!
 
 [EMAIL PROTECTED] wrote:
   Okay, the date picker is here:
   http://jira.opensymphony.com/secure/ViewIssue.jspa?key=WW-329
  
   Have fun, and if there are any suggestions, feel free 
 to add them.
  
   Peace,
   -cv
  
   -Mensagem original-
   *De:* Jason Carreira [mailto:[EMAIL PROTECTED]
   *Enviada em:* terça-feira, 30 de setembro de 2003 10:19
   *Para:* [EMAIL PROTECTED]
   *Assunto:* RE: [OS-webwork] Component repository
  
   If people add them to Jira issues, we'll put them in CVS to go
   into
  
  the
  
   distribution...
  
   -Original Message-
   *From:* Drew McAuliffe [mailto:[EMAIL PROTECTED]
   *Sent:* Tuesday, September 30, 2003 2:01 AM
   *To:* [EMAIL PROTECTED]
   *Subject:* RE: [OS-webwork] Component repository
  
   Sure, JIRA is fine, or you can email me at drew 
 (at) lowerunit
  
  dot
  
   com (trying to avoid getting more spam). I've been 
 looking for
  
  one
  
   of these for a long time. It's especially helpful 
 to have a ww
   component. Any idea on if a component repository will be
 created,
   and if so, where it will go on CVS? A great component
 repository
   would really help sell webwork to a lot of people, hitting a
 nice
   sweet spot between tapestry and struts.
  
   Thanks,
  
   Drew
  
   -Original Message-
   *From:* [EMAIL PROTECTED]
   
 [mailto:[EMAIL PROTECTED]
 *On
   Behalf Of [EMAIL PROTECTED]
   *Sent:* Monday, September 29, 2003 5:30 AM
   *To:* [EMAIL PROTECTED]
   *Subject:* RES: [OS-webwork] Component repository
  
   Hi Drew!
  
   I just finished mine, and it's working quite well with
  
  european
  
   (dd/mm/) dates. Should be a breeze to 
 modify them for
 the
   american/british format (mm/dd/). How 
 should I send it
 to
   you? Maybe create an issue in JIRA and attach it?
  
   -cv
  
   -Mensagem original-
   *De:* Drew McAuliffe [mailto:[EMAIL PROTECTED]
   *Enviada em:* sábado, 27 de setembro de 2003 14:51
   *Para:* [EMAIL PROTECTED]
   *Assunto:* RE: [OS-webwork] Component repository
  
   If someone has a datepicker component available, I would
   love
  
  to
  
   get access to it right away.
  
   -Original Message-
   *From:*
 [EMAIL PROTECTED]
  
 [mailto:[EMAIL PROTECTED]
   *On Behalf Of *Jason Carreira
   *Sent:* Friday, September 26, 2003 11:46 AM
   *To:* [EMAIL PROTECTED]
   *Subject:* RE: [OS-webwork] Component repository
  
   I think they should go right into WW2 CVS... Sounds
   like
  
  a
  
   

RE: [OS-webwork] Localized text messages - with parameters?

2003-10-02 Thread Jason Carreira
Check out:

com.opensymphony.xwork.util.LocalizedTextUtil#findText(Class aClass, String aTextName, 
Locale locale, String defaultMessage, Object[] args)

You can use this to get a parameterized message and then add that... If you think we 
need another method or two on the ValidationAware Interface, then create a Jira 
issue...

Jason

 -Original Message-
 From: Samuel Mota [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, October 02, 2003 2:15 PM
 To: [EMAIL PROTECTED]
 Subject: [OS-webwork] Localized text messages - with parameters?
 
 
 Is there some way to get the localized text messages 
 receiving parameters to replace?
 
 Shoud be nice to have a message like this:
 
 myMsg=Your (?) last login was on ?
 
 And them call:
 
 List params = new ArrayList(2);
 params.add(username);
 params.add(logindate);
 addActionError(myMsg,params)
 
 + Samuel G. Mota
 + [EMAIL PROTECTED]
 + 55 (11) 4417 7093
 + Business Application Dpt.
 + Netset Serviços em Tecnologia
 + a Hypercom Company
 + http://www.hypercom.com
 
 
 
 ---
 This sf.net email is sponsored by:ThinkGeek
 Welcome to geek heaven.
 http://thinkgeek.com/sf 
 ___
 Opensymphony-webwork mailing list 
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
 


---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork


Re: [OS-webwork] List of products using WebWork

2003-10-02 Thread Rickard Öberg
Jason Carreira wrote:

I've added a section on the WebWork page which lists products using
WebWork
http://wiki.opensymphony.com/space/WebWork

Feel free to add yours...
I've added our CMS/portal/doc mgmt tool SiteVision to the list.

/Rickard



---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork


Re: [OS-webwork] Escaping

2003-10-02 Thread Pat Lightbody
That was a typo  -- I'd only escape things that didn't have bodies to avoid
that very confusion. What say you?

- Original Message - 
From: boxed [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, October 02, 2003 10:54 AM
Subject: Re: [OS-webwork] Escaping


 Pat Lightbody wrote:

  There are a few open issues with regards to escaping -- none of which
  all agree how it should be handled. Some want UI tags to escape, some
  want them not to. Some want the URL tag to escape, others don't. I am
  leaning towards this:
 
  * UI tags, property, iterate, text, etc should all _escape_ by default
  * URL tag should NOT escape by default
  * All tags should have an escape attribute (true/false)
  * Possibly have global params in webwork.properties to override the
  two defaults (UI  URL)
 
  What do you guys think?
 
  -Pat
 

 I think there is some mistake here. The property tag AND the iterate
 tags can't escape. That will create the following issue:

 ww:iterate value=foo
   this is escaped
   ww:property value=thisPropertyIsEscapedTwice/
 /ww:iterate

 etcetc. It seems that either you haven't thought this through or you put
 it strangely. +1 on all tags having escape attribute though. I do think
 that it might be an issue that there's really two kinds of escaping:
 escaping the body of the tag and escaping the text the tag prints. This
 is rather confusing, and unwanted.

 Anders Hovmöller



 ---
 This sf.net email is sponsored by:ThinkGeek
 Welcome to geek heaven.
 http://thinkgeek.com/sf
 ___
 Opensymphony-webwork mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork



---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork


RE: [OS-webwork] Localized text messages - with parameters?

2003-10-02 Thread Drew McAuliffe
+1 on this. I think there's something like this working for messages
coming from the validation framework, but I'd definitely like to see it
work with normal error messages. Should be pretty simple, using
java.text stuff (though I don't know how it impacts performance).


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Samuel Mota
Sent: Thursday, October 02, 2003 11:15 AM
To: [EMAIL PROTECTED]
Subject: [OS-webwork] Localized text messages - with parameters?


Is there some way to get the localized text messages receiving
parameters to replace?

Shoud be nice to have a message like this:

myMsg=Your (?) last login was on ?

And them call:

List params = new ArrayList(2);
params.add(username);
params.add(logindate);
addActionError(myMsg,params)

+ Samuel G. Mota
+ [EMAIL PROTECTED]
+ 55 (11) 4417 7093
+ Business Application Dpt.
+ Netset Serviços em Tecnologia
+ a Hypercom Company
+ http://www.hypercom.com





---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork


RE: RES: RES: [OS-webwork] Component repository

2003-10-02 Thread Drew McAuliffe
Title: Message



Excellent, I already have something I can use this for. 


Also, 
what about some sort of tree component? I have part of an application that I'd 
like to display using a tree view but haven't had time to investigate it 
further. Does anyone else have any experience with something like this? I 
noticed that InfoGlue (on the projects using webwork page) has some kind of tree 
view, and it looks like it can switch between an applet and html tree view. That 
would be killer as a ww component.

  
  -Original Message-From: 
  [EMAIL PROTECTED] 
  [mailto:[EMAIL PROTECTED] On Behalf Of 
  [EMAIL PROTECTED]Sent: Thursday, October 02, 2003 10:26 
  AMTo: [EMAIL PROTECTED]Subject: 
  RES: RES: RES: [OS-webwork] Component repository
  Hi Drew! 
  Great idea, indeed, and I think it's kinda easy to do - I just 
  need to have a look at Roller's source and grab its HTML editor components, 
  and rework them to be WW2 components.
  Now, I just gotta find me some time to implement that 
  :) 
  []'s -cv 
  -Mensagem original- De: Drew 
  McAuliffe [mailto:[EMAIL PROTECTED]] 
  Enviada em: quinta-feira, 2 de outubro de 2003 13:58 
  Para: [EMAIL PROTECTED] 
  Assunto: RE: RES: RES: [OS-webwork] Component 
  repository 
  Here's another useful idea. How about a rich text editor 
  component, to take the place of a textarea control? 
  I've seen things like this on PHP message boards. It 
  includes a formatting toolbar as well as the textarea itself, and works just like a miniature wordpad. I don't know how 
  hard this would be to do as a component, but it would 
  certainly be useful. 
  -Original Message- From: 
  [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
  On Behalf Of Francisco Hernandez Sent: Thursday, October 02, 2003 1:42 AM To: 
  [EMAIL PROTECTED] Subject: 
  Re: RES: RES: [OS-webwork] Component repository 
  I need to look into the code but the date picker component 
  works fine with IE, its just Mozilla thats crapping 
  out with it 
  Pat Lightbody wrote:  Looks like a 
  problem with the absolute/relative paths -- should be  trivial to fix.   - Original Message -  From: 
  "Francisco Hernandez" [EMAIL PROTECTED]  To: [EMAIL PROTECTED] 
   Sent: Tuesday, September 30, 2003 12:18 PM 
   Subject: Re: RES: RES: [OS-webwork] Component 
  repository   
   im using the 
  latest firdbird myself too, when i click on the arrows to 
  goto the next/previous month/year I get this: 
   404 Not Found 
  Resource /cart/templates/xhtml/calendar/templates/xhtml/calendar/calendar.html 
  not found on this server  [EMAIL PROTECTED] 
  wrote:  Really?! I expected the other way around, as I 
  developed/tested this using Mozilla 
  Firebird 0.6! :)  What does the _javascript_ console shows?  -Mensagem 
  original- De: Francisco Hernandez [mailto:[EMAIL PROTECTED]] Enviada 
  em: terça-feira, 30 de setembro de 2003 
  15:51 Para: 
  [EMAIL PROTECTED] Assunto: Re: RES: [OS-webwork] Component repository 

  uh oh, I tried it in Mozilla, and it fails, but 
  works great in IE!  [EMAIL PROTECTED] wrote:   Okay, the date picker is here:   http://jira.opensymphony.com/secure/ViewIssue.jspa?key=WW-329 
  
  Have fun, and if there are any suggestions, feel free to add them. 
  
  Peace,   -cv 
  -Mensagem original-   *De:* 
  Jason Carreira [mailto:[EMAIL PROTECTED]] 
*Enviada em:* terça-feira, 30 de setembro 
  de 2003 10:19   *Para:* 
  [EMAIL PROTECTED]   *Assunto:* RE: [OS-webwork] Component 
  repository If people add them to Jira issues, we'll put them in 
  CVS to go   into   the  
distribution...
   -Original Message-   *From:* Drew McAuliffe [mailto:[EMAIL PROTECTED]] 
*Sent:* Tuesday, 
  September 30, 2003 2:01 AM  
   *To:* 
  [EMAIL PROTECTED]   *Subject:* RE: [OS-webwork] 
  Component repository   
Sure, JIRA is fine, 
  or you can email me at drew (at) lowerunit  
   dotcom (trying to avoid getting 
  more spam). I've been looking for  
   oneof these for a long time. 
  It's especially helpful to have a ww  
   component. Any idea on if a component repository 
  will be created,  
   and if so, where it will go on CVS? A great 
  component repository   would really help sell 
  webwork to a lot of people, hitting a nice 
sweet spot between 
  tapestry and struts.   
Thanks, 
 
   Drew  

   -Original 
  Message-  
   *From:* 
  [EMAIL PROTECTED]   [mailto:[EMAIL PROTECTED]] 
  *On  
   Behalf Of 
  [EMAIL PROTECTED]  
   *Sent:* Monday, September 
  29, 2003 5:30 AM  
   *To:* 
  [EMAIL PROTECTED]   
  *Subject:* RES: [OS-webwork] Component repository
   Hi Drew!
   I just finished mine, and 
  it's working quite well with   european
  (dd/mm/) dates. Should be a breeze to modify them for the  
   american/british format 
  (mm/dd/). How should I send it to   you? 
  Maybe create an issue in JIRA and attach it?
   -cv
   -Mensagem 
  

RE: [OS-webwork] Localized text messages - with parameters?

2003-10-02 Thread Jason Carreira
If you use getText() from LocaleAware (and you extend ActionSupport or use 
LocaleAwareSupport) then it will use LocalizedTextUtil which does the parsing of the 
variables in the String...

 -Original Message-
 From: Drew McAuliffe [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, October 02, 2003 2:48 PM
 To: [EMAIL PROTECTED]
 Subject: RE: [OS-webwork] Localized text messages - with parameters?
 
 
 +1 on this. I think there's something like this working for messages
 coming from the validation framework, but I'd definitely like 
 to see it work with normal error messages. Should be pretty 
 simple, using java.text stuff (though I don't know how it 
 impacts performance).
 
 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On 
 Behalf Of Samuel Mota
 Sent: Thursday, October 02, 2003 11:15 AM
 To: [EMAIL PROTECTED]
 Subject: [OS-webwork] Localized text messages - with parameters?
 
 
 Is there some way to get the localized text messages 
 receiving parameters to replace?
 
 Shoud be nice to have a message like this:
 
 myMsg=Your (?) last login was on ?
 
 And them call:
 
 List params = new ArrayList(2);
 params.add(username);
 params.add(logindate);
 addActionError(myMsg,params)
 
 + Samuel G. Mota
 + [EMAIL PROTECTED]
 + 55 (11) 4417 7093
 + Business Application Dpt.
 + Netset Serviços em Tecnologia
 + a Hypercom Company
 + http://www.hypercom.com
 
 
 
 
 
 ---
 This sf.net email is sponsored by:ThinkGeek
 Welcome to geek heaven.
 http://thinkgeek.com/sf 
 ___
 Opensymphony-webwork mailing list 
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
 


---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork


[OS-webwork] Same property, 3 textfields

2003-10-02 Thread CVillela
Title: Same property, 3 textfields





Hi everyone! :)


I've got a form like this:


E-mail: [ [EMAIL PROTECTED] ] Type: [Personal ][v]
E-mail: [ [EMAIL PROTECTED] ] Type: [Business ][v]
E-mail: [ ] Type: [Other ][v]


, an Email object:


public class Email {
 private String address;
 private int type;
 // getters and setters
}


, and a List of Email objects in my Action:


public class AddEmailsAction extends ActionSupport {
 private List emails = new ArrayList();
 // getters and setters
}


How can I make WW2 add a new Email object for each row filled in the form? Is it even possible? :)


Peace,
-cv





RE: [OS-webwork] Same property, 3 textfields

2003-10-02 Thread Jason Carreira
Title: Message



Hmm... 
what is that syntax for indexed properties... try field names email(1).address 
and email(1).type, etc...

  
  -Original Message-From: 
  [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 
  Thursday, October 02, 2003 3:24 PMTo: 
  [EMAIL PROTECTED]Subject: [OS-webwork] 
  Same property, 3 textfields
  Hi everyone! :) 
  I've got a form like this: 
  E-mail: [ 
  [EMAIL PROTECTED] ] Type: 
  [Personal ][v] E-mail: [ 
  [EMAIL PROTECTED] ] Type: 
  [Business ][v] E-mail: 
  [ 
  ] Type: [Other ][v] 
  , an Email object: 
  public class Email {  private 
  String address;  private int type; 
   // getters and setters } 
  , and a List of Email objects in my Action: 
  public class AddEmailsAction extends ActionSupport { 
   private List emails = new ArrayList(); 
   // getters and setters } 
  How can I make WW2 add a new Email object for each row filled 
  in the form? Is it even possible? :) 
  Peace, -cv 



RE: [OS-webwork] Same property, 3 textfields

2003-10-02 Thread Jason Carreira
Title: Message



Hmm...I think you'll need to pre-populate your List with empty objects... 
then it might work. 

Or, 
you could have a method, like:

getEmail(int index)

and 


setEmail(int index, Email email)

and 
use that to create a new one for an index out of bounds

Not 
sure... 

  
  -Original Message-From: 
  [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 
  Thursday, October 02, 2003 3:52 PMTo: 
  [EMAIL PROTECTED]Subject: RES: 
  [OS-webwork] Same property, 3 textfields
  Hi Jason! 
  I tried this: 
  #bodytag(Form "action="" "method=post") 
  #tag(TextField "label='E-mail'" 
  "name=emails[0].address") #tag(TextField 
  "label='E-mail'" "name=emails[1].address") #tag(TextField "label='E-mail'" "name=emails[2].address") 
  #tag(Submit "value='Continue'"); #end 
  And it rightly throws an IndexOutOfBounds excecption trying to 
  call AddEmailsAction.getEmails().get(0), .get(1), and get(2) even before 
  letting me set the fields. So, I'm pretty sure this implementation won't work 
  well, but I'm out of ideas... do you have any? I'm free to implement anything 
  that might be needed, my only requirements are to have a List of Email objects 
  when the action finishes execute().
  Again, thanks for the help! :) 
  -cv 
  -Mensagem original- De: Jason 
  Carreira [mailto:[EMAIL PROTECTED]] 
  Enviada em: quinta-feira, 2 de outubro de 2003 16:27 
  Para: [EMAIL PROTECTED] 
  Assunto: RE: [OS-webwork] Same property, 3 textfields 
  
  Hmm... what is that syntax for indexed properties... try field 
  names email(1).address and email(1).type, etc... -Original Message- From: 
  [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
  Sent: Thursday, October 02, 2003 3:24 PM 
  To: [EMAIL PROTECTED] 
  Subject: [OS-webwork] Same property, 3 textfields 
  
  Hi everyone! :) I've got a form like 
  this: E-mail: [ 
  [EMAIL PROTECTED] ] Type: 
  [Personal ][v] E-mail: [ 
  [EMAIL PROTECTED] ] Type: 
  [Business ][v] E-mail: 
  [ 
  ] Type: [Other ][v] , an Email 
  object: public class Email {  private String address;  private 
  int type;  // getters and setters 
  } , and a List of Email 
  objects in my Action: public class AddEmailsAction 
  extends ActionSupport {  private List emails = 
  new ArrayList();  // getters and setters 
  } How can I make WW2 add a new 
  Email object for each row filled in the form? Is it even possible? :) 
  Peace, -cv 



Re: [OS-webwork] List of products using WebWork

2003-10-02 Thread boxed
Jason Carreira wrote:

I've added a section on the WebWork page which lists products using
WebWork
http://wiki.opensymphony.com/space/WebWork

Feel free to add yours...

Jason
 

Added SK Forum.

Anders Hovmöller



---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork


Re: [OS-webwork] Checkbox grouping?

2003-10-02 Thread Francisco Hernandez
I would have the checkbox list as one name, then the textfield as a 
different name, then check whtere Other was selected in the checkboxes 
and if it was just the value from the textfield

[EMAIL PROTECTED] wrote:

Hi all,

I gotta create a form like this:

[ ] Foo
[ ] Bar
[ ] Baz
[ ] Other: [ ]
Being kind of a WW2 newbie, what would be the best way to do that? It'd 
be better if I could keep the other text filled in the textbox in the 
same place on the model (and thus, the model has a String property).

Any ideas gladly appreciated! :)

[]'s
-cv




---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork


Re: [OS-webwork] Another quickie

2003-10-02 Thread Jonas Eriksson
Title: Another quickie



I don't think you can use the tag that way. The 
listKey param specifies the name of the property of the objects in the list 
specified by the list param... see the webwork/docs/tag-doc.htm

For some reason that document is not on wiki, at 
least I have not found it.

Jonas

  - Original Message - 
  From: 
  [EMAIL PROTECTED] 
  To: [EMAIL PROTECTED] 
  
  Sent: Thursday, October 02, 2003 6:42 
  PM
  Subject: [OS-webwork] Another 
  quickie
  
  Hi all :) 
  First, thanks a lot to Jason for answering the 
  previous question (checkbox grouping) so fast. Really helpful! :) 
  Now I'm creating one more component, a select box 
  for gender, which should render something like this: 
   Gender: [Choose 
  one... ][v] 
  In my Velocity template, I tried: 
  #tag(Select "label=gender" "name=gender" 
  "value=gender" "listKey={' ', 'M', 'F'}" "listValue={'Choose 
  one...', 'Male, 
  'Female'}" ) 
  But, so far, no-no. I'm almost certain 
  there's something wrong with the OGNL expressions, but reading the OGNL user's 
  guide I couldn't find any evidence proving it. Any ideas? :)
  []'s -cv 


Re: [OS-webwork] WW2 Tags vs. WW1.x Tags

2003-10-02 Thread boxed
Jason Carreira wrote:

The major changes are:
 
1) the ww:property tag does not do 3 things anymore :-) We now have a 
ww:push tag as well as the ww:property tag

Don't scare me here.. please tell me the property tag only does one 
thing and that there's a tag for that elusive third use!

Anders Hovmöller



---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork


Re: RES: [OS-webwork] Same property, 3 textfields

2003-10-02 Thread Francisco Hernandez
how about iterating through the collection instead of calling the indexes

ww:iterator value=emails
ww:textfield label='E-Mail' name=address
/ww:iterator
just convert that to velocity :)

[EMAIL PROTECTED] wrote:

Hi Jason!

I tried this:

#bodytag(Form action=emails.action method=post)
 #tag(TextField label='E-mail' name=emails[0].address)
 #tag(TextField label='E-mail' name=emails[1].address)
 #tag(TextField label='E-mail' name=emails[2].address)
 #tag(Submit value='Continue');
#end
And it rightly throws an IndexOutOfBounds excecption trying to call 
AddEmailsAction.getEmails().get(0), .get(1), and get(2) even before 
letting me set the fields. So, I'm pretty sure this implementation won't 
work well, but I'm out of ideas... do you have any? I'm free to 
implement anything that might be needed, my only requirements are to 
have a List of Email objects when the action finishes execute().

Again, thanks for the help! :)

-cv

-Mensagem original-
De: Jason Carreira [mailto:[EMAIL PROTECTED]
Enviada em: quinta-feira, 2 de outubro de 2003 16:27
Para: [EMAIL PROTECTED]
Assunto: RE: [OS-webwork] Same property, 3 textfields
Hmm... what is that syntax for indexed properties... try field names 
email(1).address and email(1).type, etc...
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 02, 2003 3:24 PM
To: [EMAIL PROTECTED]
Subject: [OS-webwork] Same property, 3 textfields

Hi everyone! :)
I've got a form like this:
E-mail: [ [EMAIL PROTECTED] ] Type: [Personal  ][v]
E-mail: [ [EMAIL PROTECTED] ] Type: [Business  ][v]
E-mail: [ ] Type: [Other ][v]
, an Email object:
public class Email {
  private String address;
  private int type;
  // getters and setters
}
, and a List of Email objects in my Action:
public class AddEmailsAction extends ActionSupport {
  private List emails = new ArrayList();
  // getters and setters
}
How can I make WW2 add a new Email object for each row filled in the 
form? Is it even possible? :)
Peace,
-cv





---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork


Re: [OS-webwork] Accessing request parameters

2003-10-02 Thread Francisco Hernandez
how about 'parameters'

Pat Lightbody wrote:

#foo grabs from the ActionContext (OgnlContext is what it really is), so
that won't work
I recently added support for doing #reqeuest['foo'], (as well as session
and application), but those are for _attributes_ not parameters. This is an
easy fix though -- I just have to add another Map (parameter map). What's a
good now? How about just params?
-Pat

- Original Message - 
From: Nils Hartmann [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, October 02, 2003 10:17 AM
Subject: Re: [OS-webwork] Accessing request parameters



The request parameters are in the valuestack, so I believe the syntax to
search the stack is #foo.
It doesn't work for me. I call a jsp with http://myhost.com?foo=bla but
ww:property value=#foo/ doesn't return the value. (Regardless whether
the jsp is invoked directly or used as an action's result). The same in
included pages.
nils



---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork


---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork






---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork


RE: [OS-webwork] WW2 Tags vs. WW1.x Tags

2003-10-02 Thread Jason Carreira
Yes, it only does one thing... I couldn't remember what the third thing the old 
property tag used to do was... :-)

 -Original Message-
 From: boxed [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, October 02, 2003 4:25 PM
 To: [EMAIL PROTECTED]
 Subject: Re: [OS-webwork] WW2 Tags vs. WW1.x Tags
 
 
 Jason Carreira wrote:
 
  The major changes are:
   
  1) the ww:property tag does not do 3 things anymore :-) We 
 now have a
  ww:push tag as well as the ww:property tag
 
 Don't scare me here.. please tell me the property tag only does one 
 thing and that there's a tag for that elusive third use!
 
 Anders Hovmöller
 
 
 
 ---
 This sf.net email is sponsored by:ThinkGeek
 Welcome to geek heaven.
 http://thinkgeek.com/sf 
 ___
 Opensymphony-webwork mailing list 
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
 


---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork


Re: [OS-webwork] Value Stack Magic

2003-10-02 Thread Hendrik van der Linde
Hello,

What Adam probably means is that he wants the class instance, instead 
of some field value. I have been puzzling at this too. Suppose you are 
iterating over a List and you want to pass the _whole_ top stack object 
to an action (maybe inside an URL), how do you do that? What I have 
found thus far is that Ognl 'translates' everything to a string (or 
String[]???). It would be nice to know if there is a way to cast, or 
specify the class of the object you want to pass to the action. 
Something like:

a href=ww:url value=editoption.actionww:param name=entry 
value=(EntryClass) that //ww:urledit3/a

Where 'that' is the object at the top of the stack (aka [0] aka that 
;-) ). Is something like this possible? How does Ognl handle type 
casting? If it doesn't how do others handle data objects (Beans)?

greets, Hendrik

On donderdag, okt 2, 2003, at 00:53 Europe/Amsterdam, Matt Ho wrote:

If you're trying to toString() [EMAIL PROTECTED], then call

ww:property value=[1].toString()/

A value stack is essentially a List.  Calling [1] on the stack, 
returns a substack beginning with the element at index 1.  It's only 
when you call methods on the stack that your actual objects will be 
called.

Said another way, let's say I have a value stack that consists of a 
model and an action as follows:

[ model, action ]

here's how the following ognl would resolve:

[0] - a CompoundRoot object that contains our stack, [model, action]

[1] - another CompoundRoot that contains only [action]

[0].toString() - calls toString() on the first object in the value 
stack (excluding the CompoundRoot) that supports the toString() method

[1].foo - call getFoo() on the first object in the value stack 
starting from [action] and excluding the CompoundRoot that supports a 
getFoo() method

I hope this doesn't sound too confusing :\

If you're using Velocity, this can most easily be written as:

$stack.findValue([0]).peek()

Unfortunately, ww:property value=[0].peek()/ won't work as this 
would translate into starting at the top of the value stack (and 
excluding the CompoundRoot), find the first object that has a method 
called peek()

Cheers!

M

Adam Fleming wrote:

I'm trying to get something on the Value Stack from withing a 
ww:iterator tag,
i use this:
ww:property value=[1]
and get something like:
 [ [EMAIL PROTECTED], [EMAIL PROTECTED] ]
What is the OGNL to get theClassIwant?  I'm not looking for some 
property of the class, but the class itself.
thanks!
---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork




---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork


---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork


Re: [OS-webwork] Value Stack Magic

2003-10-02 Thread Pat Lightbody
Yup... that does the trick.

- Original Message - 
From: Hendrik van der Linde [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, October 02, 2003 4:28 PM
Subject: Re: [OS-webwork] Value Stack Magic


 Hello,
 
 What Adam probably means is that he wants the class instance, instead 
 of some field value. I have been puzzling at this too. Suppose you are 
 iterating over a List and you want to pass the _whole_ top stack object 
 to an action (maybe inside an URL), how do you do that? What I have 
 found thus far is that Ognl 'translates' everything to a string (or 
 String[]???). It would be nice to know if there is a way to cast, or 
 specify the class of the object you want to pass to the action. 
 Something like:
 
 a href=ww:url value=editoption.actionww:param name=entry 
 value=(EntryClass) that //ww:urledit3/a
 
 Where 'that' is the object at the top of the stack (aka [0] aka that 
 ;-) ). Is something like this possible? How does Ognl handle type 
 casting? If it doesn't how do others handle data objects (Beans)?
 
 greets, Hendrik
 
 On donderdag, okt 2, 2003, at 00:53 Europe/Amsterdam, Matt Ho wrote:
 
  If you're trying to toString() [EMAIL PROTECTED], then call
 
  ww:property value=[1].toString()/
 
  A value stack is essentially a List.  Calling [1] on the stack, 
  returns a substack beginning with the element at index 1.  It's only 
  when you call methods on the stack that your actual objects will be 
  called.
 
  Said another way, let's say I have a value stack that consists of a 
  model and an action as follows:
 
  [ model, action ]
 
  here's how the following ognl would resolve:
 
  [0] - a CompoundRoot object that contains our stack, [model, action]
 
  [1] - another CompoundRoot that contains only [action]
 
  [0].toString() - calls toString() on the first object in the value 
  stack (excluding the CompoundRoot) that supports the toString() method
 
  [1].foo - call getFoo() on the first object in the value stack 
  starting from [action] and excluding the CompoundRoot that supports a 
  getFoo() method
 
  I hope this doesn't sound too confusing :\
 
  If you're using Velocity, this can most easily be written as:
 
  $stack.findValue([0]).peek()
 
  Unfortunately, ww:property value=[0].peek()/ won't work as this 
  would translate into starting at the top of the value stack (and 
  excluding the CompoundRoot), find the first object that has a method 
  called peek()
 
  Cheers!
 
  M
 
  Adam Fleming wrote:
 
  I'm trying to get something on the Value Stack from withing a 
  ww:iterator tag,
  i use this:
  ww:property value=[1]
  and get something like:
   [ [EMAIL PROTECTED], [EMAIL PROTECTED] ]
  What is the OGNL to get theClassIwant?  I'm not looking for some 
  property of the class, but the class itself.
  thanks!
  ---
  This sf.net email is sponsored by:ThinkGeek
  Welcome to geek heaven.
  http://thinkgeek.com/sf
  ___
  Opensymphony-webwork mailing list
  [EMAIL PROTECTED]
  https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
 
 
 
 
  ---
  This sf.net email is sponsored by:ThinkGeek
  Welcome to geek heaven.
  http://thinkgeek.com/sf
  ___
  Opensymphony-webwork mailing list
  [EMAIL PROTECTED]
  https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
 
 
 
 
 ---
 This sf.net email is sponsored by:ThinkGeek
 Welcome to geek heaven.
 http://thinkgeek.com/sf
 ___
 Opensymphony-webwork mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
 


---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork


Re: [OS-webwork] Accessing request parameters

2003-10-02 Thread Pat Lightbody
Done in CVS.

- Original Message - 
From: Francisco Hernandez [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, October 02, 2003 1:39 PM
Subject: Re: [OS-webwork] Accessing request parameters


 how about 'parameters'

 Pat Lightbody wrote:

  #foo grabs from the ActionContext (OgnlContext is what it really is), so
  that won't work
 
  I recently added support for doing #reqeuest['foo'], (as well as
session
  and application), but those are for _attributes_ not parameters. This is
an
  easy fix though -- I just have to add another Map (parameter map).
What's a
  good now? How about just params?
 
  -Pat
 
  - Original Message - 
  From: Nils Hartmann [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Thursday, October 02, 2003 10:17 AM
  Subject: Re: [OS-webwork] Accessing request parameters
 
 
 
 The request parameters are in the valuestack, so I believe the syntax
to
 search the stack is #foo.
 
 It doesn't work for me. I call a jsp with http://myhost.com?foo=bla but
 ww:property value=#foo/ doesn't return the value. (Regardless
whether
 the jsp is invoked directly or used as an action's result). The same in
 included pages.
 
 nils
 
 
 
 
 ---
 This sf.net email is sponsored by:ThinkGeek
 Welcome to geek heaven.
 http://thinkgeek.com/sf
 ___
 Opensymphony-webwork mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
 
 
 
 
  ---
  This sf.net email is sponsored by:ThinkGeek
  Welcome to geek heaven.
  http://thinkgeek.com/sf
  ___
  Opensymphony-webwork mailing list
  [EMAIL PROTECTED]
  https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
 
 
 





 ---
 This sf.net email is sponsored by:ThinkGeek
 Welcome to geek heaven.
 http://thinkgeek.com/sf
 ___
 Opensymphony-webwork mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork



---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork


Re: [OS-webwork] Advanced URL mapping?

2003-10-02 Thread Mike Cannon-Brookes
Can I just say that all of this advanced cool URL mapping shouldn't be in
WebWork core? It's an extension or addition, that should be shipped
separately? 

(Or more likely just written up in a Wiki document for those who want to use
it?)

M

On 3/10/03 12:22 AM, Cameron Braid ([EMAIL PROTECTED]) penned the
words:

 I have used cocoon before and they provide a cool url mapping techinque
 using matchers.
 
 I will have a think about how we can integrate something like that.
 
 For example,
 
 Syntax aside, I would like to be able to specify a match pattern of :
 
 /action/year/month/day
 
 to parse /article/2003/10/02
 and get a map {action=article,year=2003,month=10,day=02}
 
 Since we are trying to achive a permalink style URL, why are the
 parameter names required in the URL ?
 
 Also, for your original idea
 
 /article/id/10 would probably be better written as /article/10 with a
 matcher /(action)/(id)
 
 This type of pattern will also allow for action namespaces
 
 /namespace/action/id
 
 Then /customer/sale/10 - namespace=customer, action=sale, id=10
 Then /admin/vendor/sale/10 - namespace=/admin/vendor, action=sale,
 id=10
 
 Before we implement these ideas, what other types of URL's do we want to
 try and map ?
 
 Cameron
 
 
 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On
 Behalf Of Jérôme BERNARD
 Sent: Thursday, 2 October 2003 7:21 PM
 To: [EMAIL PROTECTED]
 Subject: RE: [OS-webwork] Advanced URL mapping?
 
 
 Hi Cameron,
 
 The more I think about the CoolURIServletDispatcher, the more
 I think it is too much limited. For example I changed the
 abbreviation syntax from:
 http://myhost.com/article/paramValue1 to
 http://myhost.com/article/articleID/paramValue1 instead of
 http://myhost.com/article/article/paramValue1 .
 
 Why?
 
 Simply because most of the time your action are written that way:
 
 public class LoadArticleAction extends ActionSupport {
   long articleID;
   Article article;
   // getter  setter for the above members
   // other methods omitted...
 }
 
 If you use a parameter named article (by using the same
 parameter name as the one from the action) then you will need
 to use weird method names in order to retreive the real
 object linked to this id.
 
 Anyway, I think we should write a custom ServletDispatcher
 that reads advanced mapping configuration from another xml
 file (or perhaps extends webwork.xml?).
 
 This file could allow to use the sheme explained above but
 also deal with URL including dates (like
 http://myhost.com/2003/10/02).
 
 What do you think about this?
 
 Jérôme.
 
 Selon Cameron Braid [EMAIL PROTECTED]:
 
 I have madea  patch to the servlet dispatcher to allow for
 extensability
 :
 
 the methods that can be overriden are
 
 protected void sendError(HttpServletRequest request,
 HttpServletResponse response, int code, Exception e) protected Map
 getParameterMap(HttpServletRequest request) protected Map
 getSessionMap(HttpServletRequest request) protected Map
 getApplicationMap() protected String
 getActionName(HttpServletRequest
 request) protected String getNameSpace(HttpServletRequest request)
 
 this will allow for the core logic in the service method to
 be re-used 
 from custom servlet based dispatchers, allowing a custom URL and
 parameter mapping scheme to be implemented.
 
 
 Pat / Jason / Others : do we want to include the
 CoolUriServletDispatcher in the core ?
 
 If so, I will modify it to extend the new ServletDispatcher.
 
 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On
 Behalf Of Jerome BERNARD
 Sent: Tuesday, 30 September 2003 4:06 AM
 To: [EMAIL PROTECTED]
 Subject: Re: [OS-webwork] Advanced URL mapping?
 
 
 Hum... I should have a closer look at IDEA then :-)
 Jérôme.
 
 Cameron Braid wrote:
 
 What IDE do you use ?
 
 Eclispe can automatically create delegator calls for you,
 which makes
 tasks like that a piece of cake.
 
 Cam
 
  
 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On
 Behalf Of Jerome BERNARD
 Sent: Monday, 29 September 2003 7:26 PM
 To: [EMAIL PROTECTED]
 Subject: Re: [OS-webwork] Advanced URL mapping?
 
 
 Cameron Braid wrote:
 

 
 Cool idea :)
 
 Though, for the implementaion, wouldn't you have been better
  
 
 to use the

 
 wrapper pattern, rather than dynamic proxies :)
 
  
 
 Sure. I thought about it, but it's quite painful: you have to
 override so many methods :-(
 
 I'll do it tomorrow and update the attachment in the JIRA issue.
 
 Jérôme.
 

 
 Cam
 
 
 
  
 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On
 Behalf Of Jérôme BERNARD
 Sent: Tuesday, 30 September 2003 1:30 AM
 To: [EMAIL PROTECTED]
 Subject: RE: [OS-webwork] Advanced URL mapping?
 
 
 I have created a new issue in JIRA
 (http://jira.opensymphony.com/secure/ViewIssue.jspa?key=WW-326
 ) and submitted a new servlet that extends
 ServletDispatcher and
 provides such a functionality. I 

RE: [OS-webwork] Advanced URL mapping?

2003-10-02 Thread Cameron Braid
I don't mind where it goes.

I can remove the CoolUriServletDispatcher if you want.

Should we setup a WebWork2-extensions project on java.net ?

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On 
 Behalf Of Mike Cannon-Brookes
 Sent: Friday, 3 October 2003 11:51 AM
 To: [EMAIL PROTECTED]
 Subject: Re: [OS-webwork] Advanced URL mapping?
 
 
 Can I just say that all of this advanced cool URL mapping 
 shouldn't be in WebWork core? It's an extension or addition, 
 that should be shipped separately? 
 
 (Or more likely just written up in a Wiki document for those 
 who want to use
 it?)
 
 M
 
 On 3/10/03 12:22 AM, Cameron Braid ([EMAIL PROTECTED]) 
 penned the
 words:
 
  I have used cocoon before and they provide a cool url mapping 
  techinque using matchers.
  
  I will have a think about how we can integrate something like that.
  
  For example,
  
  Syntax aside, I would like to be able to specify a match 
 pattern of :
  
  /action/year/month/day
  
  to parse /article/2003/10/02
  and get a map {action=article,year=2003,month=10,day=02}
  
  Since we are trying to achive a permalink style URL, why are the 
  parameter names required in the URL ?
  
  Also, for your original idea
  
  /article/id/10 would probably be better written as 
 /article/10 with a 
  matcher /(action)/(id)
  
  This type of pattern will also allow for action namespaces
  
  /namespace/action/id
  
  Then /customer/sale/10 - namespace=customer, action=sale, 
 id=10 Then 
  /admin/vendor/sale/10 - namespace=/admin/vendor, action=sale, id=10
  
  Before we implement these ideas, what other types of URL's 
 do we want 
  to try and map ?
  
  Cameron
  
  
  
  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED] 
 On Behalf 
  Of Jérôme BERNARD
  Sent: Thursday, 2 October 2003 7:21 PM
  To: [EMAIL PROTECTED]
  Subject: RE: [OS-webwork] Advanced URL mapping?
  
  
  Hi Cameron,
  
  The more I think about the CoolURIServletDispatcher, the 
 more I think 
  it is too much limited. For example I changed the 
 abbreviation syntax 
  from: http://myhost.com/article/paramValue1 to
  http://myhost.com/article/articleID/paramValue1 instead of
  http://myhost.com/article/article/paramValue1 .
  
  Why?
  
  Simply because most of the time your action are written that way:
  
  public class LoadArticleAction extends ActionSupport {
long articleID;
Article article;
// getter  setter for the above members
// other methods omitted...
  }
  
  If you use a parameter named article (by using the same 
 parameter 
  name as the one from the action) then you will need to use weird 
  method names in order to retreive the real object linked 
 to this id.
  
  Anyway, I think we should write a custom ServletDispatcher 
 that reads 
  advanced mapping configuration from another xml file (or perhaps 
  extends webwork.xml?).
  
  This file could allow to use the sheme explained above but 
 also deal 
  with URL including dates (like http://myhost.com/2003/10/02).
  
  What do you think about this?
  
  Jérôme.
  
  Selon Cameron Braid [EMAIL PROTECTED]:
  
  I have madea  patch to the servlet dispatcher to allow for 
  extensability
  :
  
  the methods that can be overriden are
  
  protected void sendError(HttpServletRequest request, 
  HttpServletResponse response, int code, Exception e) 
 protected Map 
  getParameterMap(HttpServletRequest request) protected Map 
  getSessionMap(HttpServletRequest request) protected Map
  getApplicationMap() protected String
  getActionName(HttpServletRequest
  request) protected String getNameSpace(HttpServletRequest request)
  
  this will allow for the core logic in the service method to
  be re-used
  from custom servlet based dispatchers, allowing a custom URL and 
  parameter mapping scheme to be implemented.
  
  
  Pat / Jason / Others : do we want to include the 
  CoolUriServletDispatcher in the core ?
  
  If so, I will modify it to extend the new ServletDispatcher.
  
  
  -Original Message-
  From: [EMAIL PROTECTED]
  
 [mailto:[EMAIL PROTECTED] On Behalf 
  Of Jerome BERNARD
  Sent: Tuesday, 30 September 2003 4:06 AM
  To: [EMAIL PROTECTED]
  Subject: Re: [OS-webwork] Advanced URL mapping?
  
  
  Hum... I should have a closer look at IDEA then :-) Jérôme.
  
  Cameron Braid wrote:
  
  What IDE do you use ?
  
  Eclispe can automatically create delegator calls for you,
  which makes
  tasks like that a piece of cake.
  
  Cam
  
   
  
  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED] On 
  Behalf Of Jerome BERNARD
  Sent: Monday, 29 September 2003 7:26 PM
  To: [EMAIL PROTECTED]
  Subject: Re: [OS-webwork] Advanced URL mapping?
  
  
  Cameron Braid wrote:
  
 
  
  Cool idea :)
  
  Though, for the implementaion, wouldn't you have been better
   
  
  to use the
 
  
  wrapper pattern, rather than dynamic proxies :)
  
   
  
  Sure. I thought about it, but it's 

RE: [OS-webwork] Value Stack Magic

2003-10-02 Thread Robert Douglass
Suppose you are
iterating over a List and you want to pass the _whole_ top stack object
to an action (maybe inside an URL), how do you do that?

a href=ww:url value=editoption.actionww:param name=entry
value=(EntryClass) that //ww:urledit3/a

I may be completely wrong, but I think you have to start by imagining what
this should look like in the final HTML:

a href=editoption.action?entry=ognl_paramvalue_hereedit3/a

I suspect it isn't a feature of ognl that ww:params inside ww:urls are
strings, but rather the logic of WebWork. This is still a GET request, after
all, which doesn't support passing persisted objects unless you create your
own hack.



---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork