Re: Interceptors and thread-safety

2007-04-15 Thread Laurie Harper

Shahak Nagiel wrote:

The "Writing Interceptors" guide pretty clearly states that "Interceptors are shared between requests 
and must be thread-safe."   However, there are some Interceptors--such as execAndWait and roles--which accept 
parameters (e.g. "delay" and "allowedRoles") and which, ostensibly at least--use simple setter 
methods to apply these to instance variables.  So, how can these be thread-safe if new Interceptors aren't being 
instantiated for every request?


Because the parameters don't come from (or vary with) the request. 
Interceptor parameters are passed in once, when the interceptor is 
instantiated. That same instance is then applied to each request for 
which it's configured.


L.


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



Re: tiles-defs.xml and extended attributes...

2007-04-15 Thread Antonio Petrelli

2007/4/13, Rod Bollinger <[EMAIL PROTECTED]>:

Is there a way to define these extended attributes in my TLD file or would
this require an extension to the tiles-config_1_3.dtd (not really
preferable)? What is the correct procedure for declaring these "extra"
attributes such that they are considered "valid"?


I think that you should use  instead of , that takes
 elements too.

Antonio

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



Re: [S2] Date validator error!

2007-04-15 Thread Laurie Harper
Note that what is logged is not and error; it's logged as a WARNING. 
These warnings are usually noise (I have my logging configuration set up 
to suppress them, so I never see them). Are you seeing a problem other 
than the warning in the logs?


L.

Telmo Costa wrote:

Hi everyone,

 


I have the following configuration for a java.util.Date field:

 




01/01/1990

01/01/2000





 


But, when running it I got the following exception:

 


14/Abr/2007 17:42:50 com.opensymphony.xwork2.util.OgnlUtil
internalSetProperty

WARNING: Caught OgnlException while setting property 'max' on type
'com.opensymphony.xwork2.validator.validators.DateRangeFieldValidator'.

java.lang.NoSuchMethodException: setMax(java.lang.String)

at
ognl.OgnlRuntime.callAppropriateMethod(OgnlRuntime.java:810)

at ognl.OgnlRuntime.setMethodValue(OgnlRuntime.java:964)

 


The DateRangeFieldValidator has setters for "min" and "max" with
"java.util.Date" but ognl is trying to set a string.

 


I'm I doing anything wrong?

 


Tks a lot





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



Re: Posting Java 5 Enum values

2007-04-15 Thread Laurie Harper

Adam Ruggles wrote:
I have an object that contains a Java 5 enum class.  I'm having problems 
getting this to post back to my action.  Is there any documentation on 
how to do this?  Do I need to create a custom type 
converter/annotation/properties file?


I'm not sure what you mean by 'getting this to post back to my action'. 
If you are trying to update a property whose type is an enum using a 
form POST or something similar the yes, you will need a custom converter 
for that. If that's not what you want to do, please post more details.


L.


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



Re: [Struts2] How to right align the label for a text field?

2007-04-15 Thread Laurie Harper

Neil Aggarwal wrote:

Hello:

I am sure this has been asked before, but I am just
not finding the answer.  I have searched the web
and the archives of this list to no avail.

I want to make some labels of an input form align
to the right instead of the left.

Here is an example:








Here is what the page looks like:
https://tweb.retcgroup.com/thymeleweb/test/ThemeTest.action

I want the label Short: to appear to the right of its table
cell instead of the left.


Two options:

1) simply define a CSS rule to set the text alignment as you want

2) customize the theme to include appropriate inline-CSS or an 
align='right' on the  for the label.


More info on modifying themes and templates is here:


http://struts.apache.org/2.x/docs/themes-and-templates.html

L.


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



Re: validwhen not working

2007-04-15 Thread Laurie Harper

Dave Newton wrote:

--- Glenn Wilson <[EMAIL PROTECTED]> wrote:

[client-side validwhen]


IIRC there is no client-side validation for validwhen,
but you'd want to confirm that (although you may have
already ;)


Dave is correct. The validwhen rule is server-side only. Just to confirm ;-)

L.


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



Re: Struts testing

2007-04-15 Thread Laurie Harper

puchacz wrote:

Hi

I would like to ask if You (as Struts programmers) see some + or - of
testing Struts? I know JSF where I can test  all components as a standalone
programs. How it looks in Struts? If in Struts are a lot of dependencies
which make Struts testing hard to test? 


It depends somewhat on which version of Struts you're talking about. 
Generally, Struts 2 makes testing easier by reducing dependencies 
through well defined abstraction interfaces.


For Struts 1 actions, it's a bit trickier since they generally expect 
certain HTTP Servlet-specific objects to be available. You will 
generally want to keep your actions as simple as possible and move most 
of your application/business logic into POJO service classes to make 
unit testing easier.


You can also use tools such as Cactus and HtmlUnit to help with creating 
integration tests and such. Mock frameworks such as the one Martin 
mentioned can also be a good choice.


L.



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



Re: intercept return, and Interceptor implementing ServletRequestAware

2007-04-15 Thread Mansour

Dave Newton wrote:

--- Mansour <[EMAIL PROTECTED]> wrote:
  

What's the point then of having an action, if the
intercept method is going to execute the action. Why



  

don't I just put the action code in an interceptor ?



Because interceptors are normally called for *groups*
of actions, not just one... just like it says in the
first couple of paragraphs at the top of:

http://struts.apache.org/2.x/docs/interceptors.html

For instance, "validation" is a cross-cutting concern.
So it makes sense to move it away from the code that
decides what to to with the validated data.

  
GOTCHA, so if I have a common method in all the action and I need to 
execute some code that is generic to all of them, then makes scenes to 
put in an interceptor. coool.


Ok, another question. If I have an custom interceptor does this sop 
another interceptor from execution. For example, I have this code:


   public String intercept(ActionInvocation invocation) throws Exception {
   AccountAction action = (AccountAction)invocation.getAction();
   return action.execute();
   }

shouldn't the interceptor that's responsible for setting the values on 
the action, gets executed too ?

in my case it's not. Why? here' my config:


 
   /pages/accountView.jsp
/pages/exception.jsp
/pages/accountView.jsp
   




Of course you *could* put all your action code into an
interceptor and define an interceptor stack for every
action-that-no-longer-had-an-action. There are many
ways to make things harder--don't get me wrong, I
applaud your efforts to find them.
  


I am trying to make things easier :P but definitely always interested in 
finding a harder way :P

You could put all your action code into filters, then
you wouldn't even need servlets. Or put everything
inside a JSP, then you wouldn't even need to compile
or worry about whether or not your container
hot-deploys.
  
This will be a great idea. But then I will never be using struts. You 
know, it has to be used in a away or another. Someone must use it. It's 
unfair for the opensource community to write softwares and no one uses 
them. :P lol



d.


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


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


  



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



Re: intercept return, and Interceptor implementing ServletRequestAware

2007-04-15 Thread Dave Newton
--- Mansour <[EMAIL PROTECTED]> wrote:
> What's the point then of having an action, if the
> intercept method is going to execute the action. Why

> don't I just put the action code in an interceptor ?

Because interceptors are normally called for *groups*
of actions, not just one... just like it says in the
first couple of paragraphs at the top of:

http://struts.apache.org/2.x/docs/interceptors.html

For instance, "validation" is a cross-cutting concern.
So it makes sense to move it away from the code that
decides what to to with the validated data.

Of course you *could* put all your action code into an
interceptor and define an interceptor stack for every
action-that-no-longer-had-an-action. There are many
ways to make things harder--don't get me wrong, I
applaud your efforts to find them.

You could put all your action code into filters, then
you wouldn't even need servlets. Or put everything
inside a JSP, then you wouldn't even need to compile
or worry about whether or not your container
hot-deploys.

d.


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

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



Re: [OT] Re: Preparable or interceptors - is there a better mailing list than this ? some thing for total newbies.

2007-04-15 Thread Mansour

I have one more question related to this thread.
Let's say I need to write a web app to access and configure a server, 
and these app has to modify the configuration files on this server. How 
would you deal with this ? Write a persistence code so that you can hold 
a reference for each file, or you would let the OS do it's job ?



Dave Newton wrote:

--- Mansour <[EMAIL PROTECTED]> wrote:
  

So I have to get away from OO in order to do this.



Nope.

Nobody is saying you *can't* do it like you are
describing. And it'll work great, until you want to:

(a) Change how your objects are persisted (say,
switching to iBatis, or Spring-based JDBC, etc.)

(b) Test parts of your logic/app/flow without having
to use a real database (for instance, to simulate
failures, operate on arbitrary data, create
pathological use cases, etc.).

  

So, no point in doing things OO ?



Depends. Is it non-OOP to separate concerns? The
representation of my data is not related to how it is
persisted. If how I store my data *does* undergo a
change it's like to be a very large infrastructural
headache.

I would rather change well-defined persistence
interface classes than modify all my POJOs where I
have an additional set of concerns in the code.

I'd argue that compositing objects (POJO, service
impl, whatever) is more OOP than tightly coupling two
(largely) unrelated concerns.

  

I know it pays of,  but do I have to learn and use
many frameworks to get a simple application working?



Nope.

You can do everything by hand: roll your own
persistence layer, do your own type conversion, write
HTML by hand, etc.

To quote from the S1 home page:

{quote}
Is Struts the best choice for every project?

No. If you need to write a very simple application,
with a handful of pages, then you might consider a
"Model 1" solution that uses only server pages.

But, if you are writing a more complicated
application, with dozens of pages, that need to be
maintained over time, then Struts can help. For more
about whether Model 1 or MVC/Model 2 is right for you,
see Understanding JavaServer Pages Model 2
architecture.
{quote}

S2 goes a long way to lowering the entry barrier
(compared to S1) but I don't feel it's the best choice
for simple use cases, particularly if you're not
already familiar with Java's host of supporting
frameworks: there is a steep learning curve to writing
a full-stack Java web-app if you're starting from
ground zero.

Personally I don't recommend it unless you have a
decent non-technical reason ("My boss said I have to
use Java" or "This hot chick said she'd go out with me
if I used Struts 2" etc.) or a decent techical reason
("Everything else we have is in Java" or "I already
know everything about Spring and Hibernate; it would
be quicker" or "All we can deploy on is Tomcat" etc.)

d.


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


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


  



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



Re: intercept return, and Interceptor implementing ServletRequestAware

2007-04-15 Thread Mansour

Musachy Barroso wrote:

http://struts.apache.org/2.x/docs/interceptors.html

http://struts.apache.org/2.x/docs/writing-interceptors.html



What 's the point then of having an action, if the intercept method is 
going to execute the action. Why don't I just put the action code in an 
interceptor ?







On 4/15/07, Mansour <[EMAIL PROTECTED]> wrote:


I can not figure out how to configure an interceptor. What does the
returned string represents ? I mean if I have an action that has one or
more interceptors, how would the returned string of the interceptor
affects the execution of this action ?

Any examples ?



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








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



Re: intercept return, and Interceptor implementing ServletRequestAware

2007-04-15 Thread Musachy Barroso

http://struts.apache.org/2.x/docs/interceptors.html

http://struts.apache.org/2.x/docs/writing-interceptors.html


On 4/15/07, Mansour <[EMAIL PROTECTED]> wrote:


I can not figure out how to configure an interceptor. What does the
returned string represents ? I mean if I have an action that has one or
more interceptors, how would the returned string of the interceptor
affects the execution of this action ?

Any examples ?



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





--
"Hey you! Would you help me to carry the stone?" Pink Floyd


intercept return, and Interceptor implementing ServletRequestAware

2007-04-15 Thread Mansour
I can not figure out how to configure an interceptor. What does the 
returned string represents ? I mean if I have an action that has one or 
more interceptors, how would the returned string of the interceptor 
affects the execution of this action ?


Any examples ?



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



Re: Preparable or interceptors - is there a better mailing list than this ? some thing for total newbies.

2007-04-15 Thread Mansour

Adam Ruggles wrote:
As far as interceptors look at the docs/source code.  If your writing 
your own interceptor then you can control when it is executed.


So here is a scenario for you.  Two users are working on the same 
account.  User 1 updates the address.  Now user 2 updates the 
address.  Since you are not re-fetching the data from the database, 
user 1 will not know of the change.  Even if he/she refreshes the page.


I am aware of this. However, I am willing to implement (learn hibernate) 
but for now, and just to get started, I need to write a small 
application (Every person learn in different way). I can not start 
learning many frameworks at the same time, and I would like to focus 
only in struts2. In the future, I'll re-factor my code or modify it to 
suit struts2, and by  then I will learn how to design applications for 
struts2.
  
So far, I am convinced that it's not easier than jsf or .net, and before 
designing a business logic you should keep in mind that it's only to be 
used with Struts2. Unlike other frameworks. May be because this is the 
only MVC2 I am trying to discover.

I 'll keep on trying to get where I want in struts2 and I'll let you know.

After all, thank you. You and Dave were allot of help. I need your 
opinion about this design. Is that the only disadvantage of this design ?




Mansour wrote:

Adam Ruggles wrote:
The problem with the store in session solution is what if two people 
are working on the same account at the same time?

Hummm,
Good point. But wait ! what's wrong with this ? they don't have 
access to each other sessions.  May be store it in the request ?


Now how do I get a variable from the page and store it in the request 
or session through an interceptor.

example:

public String intercept(ActionInvocation invocation) throws Exception {
   //I need to get some variable from the page called account 
that holds an object of Account
AccountAction action = 
(AccountAction)invocation.getAction();

  action.setAccount( theAccountFromThePage);
  return "beer";
   }


And how do I know if the Interceptor being processed before of after 
the action ?






Mansour wrote:

Dave Newton wrote:

--- Mansour <[EMAIL PROTECTED]> wrote:
 

I see what you mean now. and after I call update,
then I have to populate it again to redisplay the modified 
account. There's now not to re-select form the DB.



Unless it's stored in session or the form contained
all the data you needed to re-display I don't see how
reloading the bean could be avoided.
  


Perfect, now we are talking. So, I can store the Account obj in a 
request or session.
What I am going to do, write an interceptor to set the account in 
the request, and I think this should do it.

right ?

Can I push it into the stack ? Is there away ?



d.


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

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


  



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




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





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




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






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



Re: [OT] [RANT] Re: Preparable or interceptors - is there a better mailing list than this ? some thing for total newbies.

2007-04-15 Thread Mansour
I am not familiar with Oracle, but in mysql it allows you to set 
constraints. :)




Martin Gainty wrote:

Musachy-
I just created this DB under Oracle

#so I re-configed the pfile (path/initDBNAME.ora) with these params
#MCG change UNDO_MANAGEMENT to AUTO
UNDO_MANAGEMENT = AUTO

#either replace "%AVAILABLE_SID%" with your database name OR hardcode 
as you see here

db_name=%AVAILABLE_SID%

sql>shutdown immediate
sql>startup nomount pfile = "path/initDBNAME.ora"
sql>create database startup logfile -
group 1 ('%ORACLE_HOME%\oradata\%AVAILABLE_SID%\redo1.log') size 10M, -
group 2 ('%ORACLE_HOME%\oradata\%AVAILABLE_SID%\redo2.log') size 10M, -
group 3 ('%ORACLE_HOME%\oradata\%AVAILABLE_SID%\redo3.log') size 10M -
character set  WE8ISO8859P1 -
national character set utf8 -
datafile '%ORACLE_HOME%\oradata\%AVAILABLE_SID%\system.dbf' -
   size 50M -
   autoextend on -
   next 10M maxsize unlimited -
   extent management local -
sysaux datafile '%ORACLE_HOME%\oradata\%AVAILABLE_SID%\sysaux.dbf' -
   size 10M -
   autoextend on -
   next 10M -
   maxsize unlimited -
undo tablespace undo -
   datafile '%ORACLE_HOME%\oradata\%AVAILABLE_SID%\undo.dbf' -
   size 10M -
default temporary tablespace temp -
   tempfile '%ORACLE_HOME%\oradata\%AVAILABLE_SID%\temp.dbf' -
   size 10M;

sql>CREATE TABLE Person (ID NUMBER(4,1) PRIMARY KEY, firstName 
VARCHAR(45) NOT NULL,lastName VARCHAR(45) NOT NULL);


I noticed at the end of SQL I see ENGINE=InnoDB
Could you indicate what ENGINE=InnoDB is supposed to accomplish???

Thanks,
Martin--
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please 
notify

the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.

- Original Message - From: "Mansour" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Sent: Sunday, April 15, 2007 11:01 AM
Subject: Re: [OT] [RANT] Re: Preparable or interceptors - is there a 
better mailing list than this ? some thing for total newbies.




Musachy Barroso wrote:

I was looking to encapsulate all the behavior of the account in an
account object. So the object updates its self.




I'd say  must people don't use that pattern anymore.


I see. So I have to get away from OO in order to do this. I have to 
create a class called services, that has methods like:


populate (Account acc)

and update(Account acc) and ...

That's fine with me. I was a C language programmer before, and 
familiar with 1928 programming style, Where you pass a pointer to a 
struct  to a method and let it do the operation on it. :)

So, no point in doing things OO ?



That was my question. I have to go through all this coding and write 
all

these extra classes to be able to update info. right ? And I have to
change the bussiness logic (AccountService) to suit this design.




It pays off to have a persistence layer, instead of mixing it up 
with you
object model. I'm using JPA on top of Toplink and I'm quite happy 
with it,

here is a tutorial, CRUD-like that you might want to take a look at:


I know it pays of,  but do I have to learn and use many frameworks to 
get a simple application working ?




http://struts.apache.org/2.x/docs/struts-2-spring-2-jpa-ajax.html

musachy
There must be a way to do this with going through all this extra 
coding and framework.




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





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





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



RE: How to change "targets" attribute for submit button from java script?

2007-04-15 Thread Shekhar Yadav
Thanks, using targetsArray works.

I was not sure if it safe and future safe, so I was bit hesitant in
using targetsArray.

Regards,
Shekhar

-Original Message-
From: Musachy Barroso [mailto:[EMAIL PROTECTED] 
Sent: Monday, April 09, 2007 3:25 PM
To: Struts Users Mailing List
Subject: Re: How to change "targets" attribute for submit button from
java script?

The widget for the submit button will have a "targets" string field, but
you
want to change the "targetsArray" field, given:



you can do this:

var widget = dojo.widget.byId("mybutton");
widget.targetsArray = ["id1", "id2"];

regards
musachy

On 4/9/07, Shekhar Yadav <[EMAIL PROTECTED]> wrote:
>
> I have been trying to do this:
>
>
>
> function submitNext() {
>
> var tabId = $("nextPage").value;
>
> submit_next = document.getElementById(tabId);
>
> var cells = submit_next.getElementsByTagName("input");
>
> for (var i = 0; i < cells.length; i++) {
>
> id = cells[i].id;
>
> if ( id == "submit_next") {
>
> cells[i].targets = tabId;
>
> alert(cells[i].targets);
>
> cells[i].click();
>
> }
>
> }
>
> }
>
>
>
> The attempt to set targets in the above function does not work. In
alert
> it does display the changed targets value, but the click seems to not
> find it.
>
>
>
> The reason I am trying to do this is to create tabbed pages, where the
> content of the each tab has a submit button that should only update
its
> tab on clicking submit. Now, as the tabs have generated id from java
> script, I need to modify the targets attribute on the fly.
>
>
>
> I have been struggling with this for last 4-5 days; any help would be
> greatly appreciated.
>
>
>
> Thanks,
>
> Shekhar Yadav
>
>
>
> ---
>
> Tea, what else !!
>
>
>
>


-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd


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



[Struts2] How to right align the label for a text field?

2007-04-15 Thread Neil Aggarwal
Hello:

I am sure this has been asked before, but I am just
not finding the answer.  I have searched the web
and the archives of this list to no avail.

I want to make some labels of an input form align
to the right instead of the left.

Here is an example:








Here is what the page looks like:
https://tweb.retcgroup.com/thymeleweb/test/ThemeTest.action

I want the label Short: to appear to the right of its table
cell instead of the left.

Can someone help me?

Thanks,
Neil

--
Neil Aggarwal, (832)245-7314, www.JAMMConsulting.com
FREE! Eliminate junk email and reclaim your inbox.
Visit http://www.spammilter.com for details.


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



Re: [OT] [RANT] Re: Preparable or interceptors - is there a better mailing list than this ? some thing for total newbies.

2007-04-15 Thread Dave Newton
Please start new threads for new topics.

--- Martin Gainty <[EMAIL PROTECTED]> wrote:
> I noticed at the end of SQL I see ENGINE=InnoDB
> Could you indicate what ENGINE=InnoDB is supposed to
> accomplish???

InnoDB is one of the MySQL engines (contrast with
MyISAM, for example) that handles referential
integrity properly (and a few other things).

d.


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

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



Re: Struts testing

2007-04-15 Thread Martin Gainty

Puchacz--
I would suggest using MockStrutsTestCase
http://strutstestcase.sourceforge.net/api/servletunit/struts/MockStrutsTestCase.html
dziekuje,
Martin--

This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.

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

To: 
Sent: Sunday, April 15, 2007 6:00 AM
Subject: Struts testing




Hi

I would like to ask if You (as Struts programmers) see some + or - of
testing Struts? I know JSF where I can test  all components as a 
standalone

programs. How it looks in Struts? If in Struts are a lot of dependencies
which make Struts testing hard to test?

Thanx
--
View this message in context: 
http://www.nabble.com/Struts-testing-tf3579046.html#a1982

Sent from the Struts - User mailing list archive at Nabble.com.


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





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



Re: [OT] [RANT] Re: Preparable or interceptors - is there a better mailing list than this ? some thing for total newbies.

2007-04-15 Thread Martin Gainty

Musachy-
I just created this DB under Oracle

#so I re-configed the pfile (path/initDBNAME.ora) with these params
#MCG change UNDO_MANAGEMENT to AUTO
UNDO_MANAGEMENT = AUTO

#either replace "%AVAILABLE_SID%" with your database name OR hardcode as you 
see here

db_name=%AVAILABLE_SID%

sql>shutdown immediate
sql>startup nomount pfile = "path/initDBNAME.ora"
sql>create database startup logfile -
group 1 ('%ORACLE_HOME%\oradata\%AVAILABLE_SID%\redo1.log') size 10M, -
group 2 ('%ORACLE_HOME%\oradata\%AVAILABLE_SID%\redo2.log') size 10M, -
group 3 ('%ORACLE_HOME%\oradata\%AVAILABLE_SID%\redo3.log') size 10M -
character set  WE8ISO8859P1 -
national character set utf8 -
datafile '%ORACLE_HOME%\oradata\%AVAILABLE_SID%\system.dbf' -
   size 50M -
   autoextend on -
   next 10M maxsize unlimited -
   extent management local -
sysaux datafile '%ORACLE_HOME%\oradata\%AVAILABLE_SID%\sysaux.dbf' -
   size 10M -
   autoextend on -
   next 10M -
   maxsize unlimited -
undo tablespace undo -
   datafile '%ORACLE_HOME%\oradata\%AVAILABLE_SID%\undo.dbf' -
   size 10M -
default temporary tablespace temp -
   tempfile '%ORACLE_HOME%\oradata\%AVAILABLE_SID%\temp.dbf' -
   size 10M;

sql>CREATE TABLE Person (ID NUMBER(4,1) PRIMARY KEY, firstName VARCHAR(45) 
NOT NULL,lastName VARCHAR(45) NOT NULL);


I noticed at the end of SQL I see ENGINE=InnoDB
Could you indicate what ENGINE=InnoDB is supposed to accomplish???

Thanks,
Martin--
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.

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

To: "Struts Users Mailing List" 
Sent: Sunday, April 15, 2007 11:01 AM
Subject: Re: [OT] [RANT] Re: Preparable or interceptors - is there a better 
mailing list than this ? some thing for total newbies.




Musachy Barroso wrote:

I was looking to encapsulate all the behavior of the account in an
account object. So the object updates its self.




I'd say  must people don't use that pattern anymore.


I see. So I have to get away from OO in order to do this. I have to create 
a class called services, that has methods like:


populate (Account acc)

and update(Account acc) and ...

That's fine with me. I was a C language programmer before, and familiar 
with 1928 programming style, Where you pass a pointer to a struct  to a 
method and let it do the operation on it. :)

So, no point in doing things OO ?



That was my question. I have to go through all this coding and write all

these extra classes to be able to update info. right ? And I have to
change the bussiness logic (AccountService) to suit this design.




It pays off to have a persistence layer, instead of mixing it up with you
object model. I'm using JPA on top of Toplink and I'm quite happy with 
it,

here is a tutorial, CRUD-like that you might want to take a look at:


I know it pays of,  but do I have to learn and use many frameworks to get 
a simple application working ?




http://struts.apache.org/2.x/docs/struts-2-spring-2-jpa-ajax.html

musachy
There must be a way to do this with going through all this extra coding 
and framework.




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





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



Re: Preparable or interceptors - is there a better mailing list than this ? some thing for total newbies.

2007-04-15 Thread Adam Ruggles
As far as interceptors look at the docs/source code.  If your writing 
your own interceptor then you can control when it is executed.


So here is a scenario for you.  Two users are working on the same 
account.  User 1 updates the address.  Now user 2 updates the address.  
Since you are not re-fetching the data from the database, user 1 will 
not know of the change.  Even if he/she refreshes the page.


Mansour wrote:

Adam Ruggles wrote:
The problem with the store in session solution is what if two people 
are working on the same account at the same time?

Hummm,
Good point. But wait ! what's wrong with this ? they don't have access 
to each other sessions.  May be store it in the request ?


Now how do I get a variable from the page and store it in the request 
or session through an interceptor.

example:

public String intercept(ActionInvocation invocation) throws Exception {
   //I need to get some variable from the page called account that 
holds an object of Account

AccountAction action = (AccountAction)invocation.getAction();
  action.setAccount( theAccountFromThePage);
  return "beer";
   }


And how do I know if the Interceptor being processed before of after 
the action ?






Mansour wrote:

Dave Newton wrote:

--- Mansour <[EMAIL PROTECTED]> wrote:
 

I see what you mean now. and after I call update,
then I have to populate it again to redisplay the modified 
account. There's now not to re-select form the DB.



Unless it's stored in session or the form contained
all the data you needed to re-display I don't see how
reloading the bean could be avoided.
  


Perfect, now we are talking. So, I can store the Account obj in a 
request or session.
What I am going to do, write an interceptor to set the account in 
the request, and I think this should do it.

right ?

Can I push it into the stack ? Is there away ?



d.


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

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


  



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




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





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




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



Re: tks for help, but more question for html:javascript

2007-04-15 Thread john lee
tks frank, it works.
   
  john

"Frank W. Zammetti" <[EMAIL PROTECTED]> wrote:
  Hmm, I've never actually used the html:javascript tag, so I'm not sure 
what its intended purpose is, or how it works... seems like the docs is 
talking about validation, so yeah, maybe it's not applicable... 
although, one thing I notice here... let's assume it DOES work just like 
a plain old   tag does... om that case, the contents of your .js 
file might cause a problem because it's not Javascript really, it's 
HTML... If you make source.js just the following:

   function showme() {
   alert("pls try");
   return false;
   }

...then it MAY work... if it still doesn't, I'd not use the 
html:javascript tag at all, just use a plain  tag... looks to me 
like your just trying to import the .js file, and I can't think of a 
good reason to use a Struts tag for something as basic as that anyway.

Frank

P.S. - I'd bet it's not a problem, but it's unusual to see the taglib 
declarations within the markup of the page... they are usually prior to 
the opening  tag... again, may not be a problem the way you have 
it, but I'd move them up, just to be safe.


john lee wrote:
> Frank/Musachy,
>
>   tks for your help, after i change OnSubmit to lower case, it works. But 
> when i try to test html:javascript, give me more erros, is html:javascript 
> only used for validor only, and can not used as regular javascript for 
> include?
>
>   tks in advance
>
>   john
>
>   The error message:
>
>   Error: missing } in XML expression
> Source File: /source.js
> Line: 4, Column: 20
> Source Code:
> alert("pls try");
>
>
>   source.js
>
>   
>   
>   function showme() {
>   alert("pls try");
>   return false;
>   }
>  
> 
> 
> Search.jsp
> 
> 
> 
> 
> 
> 
> 
>   
>   :
>   
> 
> 
> 
> 
> 
> -
> Ahhh...imagining that irresistible "new car" smell?
> Check outnew cars at Yahoo! Autos.

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM/Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Author of "Practical Ajax Projects With Java Technology"
(2006, Apress, ISBN 1-59059-695-1)
Java Web Parts - http://javawebparts.sourceforge.net
Supplying the wheel, so you don't have to reinvent it!

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



   
-
Ahhh...imagining that irresistible "new car" smell?
 Check outnew cars at Yahoo! Autos.

Re: Struts 2.0.6 != Shale?

2007-04-15 Thread Craig McClanahan

On 4/15/07, Nicolas Lanquetin <[EMAIL PROTECTED]> wrote:


So, question: Are these the same frameworks? Is Shale a codename for
Struts 2?


No, they are not the same.  No, it is not a codename.

The Shale codebase started in a sandbox of the Struts project, and was
proposed to the Struts committers as a basis for "Struts 2".  The
Struts committers chose a different path for that (the merger with
WebWork), and Shale became its own top level project at Apache
().

Craig

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



Parameters Not Set

2007-04-15 Thread Zach Calvert

I think there is a problem with struts 2 relating to the
ParametersInterceptor .  On random occasion, I will receive

Apr 15, 2007 11:47:32 AM
com.opensymphony.xwork2.interceptor.ParametersInterceptor
setParameters
SEVERE: ParametersInterceptor - [setParameters]: Unexpected Exception
catched: Error setting expression 'companySearch' with value
'[Ljava.lang.String;@1f38d7d'


This means that my ActionSupport will not get any of its values set.
The side effects include invalid data, failed validation, and a
horrible user experience.


Anyone have any ideas?

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



Re: Preparable or interceptors - is there a better mailing list than this ? some thing for total newbies.

2007-04-15 Thread Mansour

Adam Ruggles wrote:
The problem with the store in session solution is what if two people 
are working on the same account at the same time?

Hummm,
Good point. But wait ! what's wrong with this ? they don't have access 
to each other sessions.  May be store it in the request ?


Now how do I get a variable from the page and store it in the request or 
session through an interceptor.

example:

public String intercept(ActionInvocation invocation) throws Exception {
   //I need to get some variable from the page called account that 
holds an object of Account
  
  AccountAction action = (AccountAction)invocation.getAction();

  action.setAccount( theAccountFromThePage);

  return "beer";

   }


And how do I know if the Interceptor being processed before of after the 
action ?






Mansour wrote:

Dave Newton wrote:

--- Mansour <[EMAIL PROTECTED]> wrote:
 

I see what you mean now. and after I call update,
then I have to populate it again to redisplay the modified account. 
There's now not to re-select form the DB.



Unless it's stored in session or the form contained
all the data you needed to re-display I don't see how
reloading the bean could be avoided.
  


Perfect, now we are talking. So, I can store the Account obj in a 
request or session.
What I am going to do, write an interceptor to set the account in the 
request, and I think this should do it.

right ?

Can I push it into the stack ? Is there away ?



d.


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

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


  



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




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





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



Re: [s2] eclipse plugin

2007-04-15 Thread Angelo zerr

Ok
thank you for your answer.
It's shame for me.
But if you are interested by Akrogen, don't hesitate to write me.

Regards Angelo

2007/4/15, Musachy Barroso <[EMAIL PROTECTED]>:


I haven't really seen it working (just saw the website). I wrote eclipse
plugins in another life so I don't want to feel the temptation of wanting
to
contribute :)

musachy

On 4/15/07, Angelo zerr <[EMAIL PROTECTED]> wrote:
>
> hi musachy,
>
> thank you for having given the information about Eclipse plugin.
>
> Have you seen Akrogen plugin? Do you find the idea is good?
> Akrogen plugin is not finished, but I think today we can use for
generate
> simple component.
>
> But if you want another features, tell me, and I will try to develop it.
> The documentation is not finsihed, but I'm writing documentation.
>
> Angelo
>
> 2007/4/15, Musachy Barroso <[EMAIL PROTECTED]>:
> >
> > that was it :)
> >
> > musachy
> >
> > On 4/15/07, Angelo zerr <[EMAIL PROTECTED]> wrote:
> > >
> > > Hi
> > > Today, I don't think there is  Eclipse plugin which exist for
struts2.
> > > But I'm developping Eclipse plugin Akrogen
> > > http://akrogen.sourceforge.net/for generate any component of
> > > framework.
> > >
> > > With Akrogen you can create your own components catalog.
> > > So you can write your Wizard page with XML/XUL description.
> > > If you are interested by topic and help me to write the struts
> > component,
> > > you can write me.
> > >
> > > Regards Angelo
> > >
> > >
> > >
> > > 2007/4/15, Musachy Barroso <[EMAIL PROTECTED]>:
> > > >
> > > > Search the mail archives, I think somebody mentioned a plugin some
> > time
> > > > ago
> > > >
> > > > musachy
> > > >
> > > > On 4/15/07, Pedro Herrera <[EMAIL PROTECTED]> wrote:
> > > > >
> > > > >
> > > > > Is there an eclipse plugin for Struts 2 ?
> > > > >
> > > > > Thks
> > > > >
> > > > > Pedro Herrera
> > > > > --
> > > > > View this message in context:
> > > > >
http://www.nabble.com/-s2--eclipse-plugin-tf3579536.html#a10002404
> > > > > Sent from the Struts - User mailing list archive at Nabble.com.
> > > > >
> > > > >
> > > > >
> > -
> > > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > "Hey you! Would you help me to carry the stone?" Pink Floyd
> > > >
> > >
> >
> >
> >
> > --
> > "Hey you! Would you help me to carry the stone?" Pink Floyd
> >
>



--
"Hey you! Would you help me to carry the stone?" Pink Floyd



Re: [s2] eclipse plugin

2007-04-15 Thread Musachy Barroso

I haven't really seen it working (just saw the website). I wrote eclipse
plugins in another life so I don't want to feel the temptation of wanting to
contribute :)

musachy

On 4/15/07, Angelo zerr <[EMAIL PROTECTED]> wrote:


hi musachy,

thank you for having given the information about Eclipse plugin.

Have you seen Akrogen plugin? Do you find the idea is good?
Akrogen plugin is not finished, but I think today we can use for generate
simple component.

But if you want another features, tell me, and I will try to develop it.
The documentation is not finsihed, but I'm writing documentation.

Angelo

2007/4/15, Musachy Barroso <[EMAIL PROTECTED]>:
>
> that was it :)
>
> musachy
>
> On 4/15/07, Angelo zerr <[EMAIL PROTECTED]> wrote:
> >
> > Hi
> > Today, I don't think there is  Eclipse plugin which exist for struts2.
> > But I'm developping Eclipse plugin Akrogen
> > http://akrogen.sourceforge.net/for generate any component of
> > framework.
> >
> > With Akrogen you can create your own components catalog.
> > So you can write your Wizard page with XML/XUL description.
> > If you are interested by topic and help me to write the struts
> component,
> > you can write me.
> >
> > Regards Angelo
> >
> >
> >
> > 2007/4/15, Musachy Barroso <[EMAIL PROTECTED]>:
> > >
> > > Search the mail archives, I think somebody mentioned a plugin some
> time
> > > ago
> > >
> > > musachy
> > >
> > > On 4/15/07, Pedro Herrera <[EMAIL PROTECTED]> wrote:
> > > >
> > > >
> > > > Is there an eclipse plugin for Struts 2 ?
> > > >
> > > > Thks
> > > >
> > > > Pedro Herrera
> > > > --
> > > > View this message in context:
> > > > http://www.nabble.com/-s2--eclipse-plugin-tf3579536.html#a10002404
> > > > Sent from the Struts - User mailing list archive at Nabble.com.
> > > >
> > > >
> > > >
> -
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > >
> > > >
> > >
> > >
> > > --
> > > "Hey you! Would you help me to carry the stone?" Pink Floyd
> > >
> >
>
>
>
> --
> "Hey you! Would you help me to carry the stone?" Pink Floyd
>





--
"Hey you! Would you help me to carry the stone?" Pink Floyd


Re: [OT] [RANT] Re: Preparable or interceptors - is there a better mailing list than this ? some thing for total newbies.

2007-04-15 Thread Adam Ruggles
The problem with the store in session solution is what if two people are 
working on the same account at the same time?


Mansour wrote:

Dave Newton wrote:

--- Mansour <[EMAIL PROTECTED]> wrote:
 

I see what you mean now. and after I call update,
then I have to populate it again to redisplay the modified account. 
There's now not to re-select form the DB.



Unless it's stored in session or the form contained
all the data you needed to re-display I don't see how
reloading the bean could be avoided.
  


Perfect, now we are talking. So, I can store the Account obj in a 
request or session.
What I am going to do, write an interceptor to set the account in the 
request, and I think this should do it.

right ?

Can I push it into the stack ? Is there away ?



d.


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

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


  



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




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



Re: [OT] [RANT] Re: Preparable or interceptors - is there a better mailing list than this ? some thing for total newbies.

2007-04-15 Thread Mansour

Dave Newton wrote:

--- Mansour <[EMAIL PROTECTED]> wrote:
  

I see what you mean now. and after I call update,
then I have to populate it again to redisplay the 
modified account. There's now not to re-select form 
the DB.



Unless it's stored in session or the form contained
all the data you needed to re-display I don't see how
reloading the bean could be avoided.
  


Perfect, now we are talking. So, I can store the Account obj in a 
request or session.
What I am going to do, write an interceptor to set the account in the 
request, and I think this should do it.

right ?

Can I push it into the stack ? Is there away ?



d.


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


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


  



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



Re: [OT] [RANT] Re: Preparable or interceptors - is there a better mailing list than this ? some thing for total newbies.

2007-04-15 Thread Dave Newton
--- Mansour <[EMAIL PROTECTED]> wrote:
> I see what you mean now. and after I call update,
> then I have to populate it again to redisplay the 
> modified account. There's now not to re-select form 
> the DB.

Unless it's stored in session or the form contained
all the data you needed to re-display I don't see how
reloading the bean could be avoided.

d.


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

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



Re: [OT] [RANT] Re: Preparable or interceptors - is there a better mailing list than this ? some thing for total newbies.

2007-04-15 Thread Mansour

Dave Newton wrote:

--- Mansour <[EMAIL PROTECTED]> wrote:
  
The Account data is to be populated the view, 
through AccountAction. Now how do I update (get my

hand on the Account) that needs to be updated.



If you are attempting to update an account and you
have an ID, as we've already said, S2 *instantiates an
Account class for you*.

Call the update (or whatever) method on the object.

You're done.

  
I see what you mean now. and after I call update, then I have to 
populate it again to redisplay the modified account.

There's now not to re-select form the DB.


Assuming your update logic is correct.

d.


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


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


  



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



Re: [OT] [RANT] Re: Preparable or interceptors - is there a better mailing list than this ? some thing for total newbies.

2007-04-15 Thread Dave Newton
--- Mansour <[EMAIL PROTECTED]> wrote:
> The Account data is to be populated the view, 
> through AccountAction. Now how do I update (get my
> hand on the Account) that needs to be updated.

If you are attempting to update an account and you
have an ID, as we've already said, S2 *instantiates an
Account class for you*.

Call the update (or whatever) method on the object.

You're done.

Assuming your update logic is correct.

d.


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

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



Re: [OT] Re: Preparable or interceptors - is there a better mailing list than this ? some thing for total newbies.

2007-04-15 Thread Mansour

Dave Newton wrote:

--- Mansour <[EMAIL PROTECTED]> wrote:
  

I was looking to encapsulate all the behavior of the
account in an account object. So the object updates 
its self.



There's no reason you *can't* do that, but the
architecture overlords will not be pleased.

S2 doesn't care about what else is in the object in
question, as long as it exposes appropriate get/set
methods for the form values you're interested in.

So if you had an object that looked like:

public class Employee {
private String fname; // ...and get/set
private String lname; // ...and get/set
public void save() {
// Does DB stuff...
}
}

you could still use:



in your JSP.

  


That exactly what i did.


Then in your action:

public String execute() throws Exception {
// ...
getEmployee().save();
// ...
}

  


That what I am looking for, but with out the extra fat.

In jsf there's a view, a backing bean, and POJO. However, the backing 
bean holds the POJO and controls it base on user input. In struts2, I 
have to write a persistence code, so that the operations on the POJO can 
be performed in a similar way.  What is the way around writing these 
extra classes which will involve modifying my existing code ?




Again, accountService is another class. So I have to
split the attr form the behavior of each object in 
two classes. right?



You probably *should* but you don't have to.

  
And I have to change the bussiness logic 
(AccountService) to suit this design.



Depends on how you implement AccountService, I guess.

A lot of people using S2 take advantage of Spring and
its support for several persistence paradigms[1].
While I prefer iBatis or Hibernate, JDBC is another
Spring built-in option.

As an example, a Hibernate version of an Employee CRUD
action might consist of (at least) the following:

- An S2 Action: tells application where to go and why.
- An IEmployeeService: wraps up persistence
functionality.
  


This is what I am trying to avoid writing at this point.
I need only action and POJO.


- An Employee object: very simply POJO.

In turn, the IEmployeeService implementation might
contain an IEmployeeDao. Since my most recent project
have been Hibernate-based I use a modified
HibernateTools template to generate the DAO and its
interface.

I'll tell my IEmployeeService impl to save the current
employee:

getEmployeeService().saveOrUpdate(getEmployee());

My Hibernate impl of IEmployeeService.saveOrUpdate()
will look more or less like:

Session session = getSessionFactory().openSession();
Transaction tx = session.beginTransaction();
session.saveOrUpdate(employee);
tx.commit();
session.close();

Your JDBC impl of IEmployeeService.saveOrUpdate()
might look like (pseudo-code):

if (employee.id == null) {
// Build SQL update string.
} else {
// Build SQL insert string.
}

That's what you're currently putting in the Employee
object.

Why don't I think that's a good idea? It tightly
couples your data to how you deal with your data.
Isn't that what OOP is for? In theory, yes. In
practice, it just doesn't work out that well,
particularly in Java.

Now, you could put persistence stuff in your object
via an interface; I'd be less irritated with that, so
Employee would have an IEmployeeService in it, which
could then be called (internally) by Employee. Meh.

Again, for simple use-cases, I don't think it matters.
Java architect cowboys get all bent-out-of-shape when
they see code like that, but... let's face it, if it's
never going to change, or you're not doing "real"
enterprise work, or (insert several other use-cases
where I don't care) I just don't think it matters.

d.

[1] *ding ding ding* I got to say paradigm today, and
it isn't even noon yet.


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


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


  



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



[OT] Re: Preparable or interceptors - is there a better mailing list than this ? some thing for total newbies.

2007-04-15 Thread Dave Newton
--- Mansour <[EMAIL PROTECTED]> wrote:
> So I have to get away from OO in order to do this.

Nope.

Nobody is saying you *can't* do it like you are
describing. And it'll work great, until you want to:

(a) Change how your objects are persisted (say,
switching to iBatis, or Spring-based JDBC, etc.)

(b) Test parts of your logic/app/flow without having
to use a real database (for instance, to simulate
failures, operate on arbitrary data, create
pathological use cases, etc.).

> So, no point in doing things OO ?

Depends. Is it non-OOP to separate concerns? The
representation of my data is not related to how it is
persisted. If how I store my data *does* undergo a
change it's like to be a very large infrastructural
headache.

I would rather change well-defined persistence
interface classes than modify all my POJOs where I
have an additional set of concerns in the code.

I'd argue that compositing objects (POJO, service
impl, whatever) is more OOP than tightly coupling two
(largely) unrelated concerns.

> I know it pays of,  but do I have to learn and use
> many frameworks to get a simple application working?

Nope.

You can do everything by hand: roll your own
persistence layer, do your own type conversion, write
HTML by hand, etc.

To quote from the S1 home page:

{quote}
Is Struts the best choice for every project?

No. If you need to write a very simple application,
with a handful of pages, then you might consider a
"Model 1" solution that uses only server pages.

But, if you are writing a more complicated
application, with dozens of pages, that need to be
maintained over time, then Struts can help. For more
about whether Model 1 or MVC/Model 2 is right for you,
see Understanding JavaServer Pages Model 2
architecture.
{quote}

S2 goes a long way to lowering the entry barrier
(compared to S1) but I don't feel it's the best choice
for simple use cases, particularly if you're not
already familiar with Java's host of supporting
frameworks: there is a steep learning curve to writing
a full-stack Java web-app if you're starting from
ground zero.

Personally I don't recommend it unless you have a
decent non-technical reason ("My boss said I have to
use Java" or "This hot chick said she'd go out with me
if I used Struts 2" etc.) or a decent techical reason
("Everything else we have is in Java" or "I already
know everything about Spring and Hibernate; it would
be quicker" or "All we can deploy on is Tomcat" etc.)

d.


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

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



Re: [OT] [RANT] Re: Preparable or interceptors - is there a better mailing list than this ? some thing for total newbies.

2007-04-15 Thread Mansour

Musachy Barroso wrote:

I see. So I have to get away from OO in order to do this. I have to
create a class called services, that has methods like:




That's arguable, but it would be outside the scope of this mailing list.




I know it pays of,  but do I have to learn and use many frameworks to
get a simple application working ?




I think you asked how to do it, and we are giving you tips based on 
our own

experience, there is a zillion ways of doing what you are asking.

musachy
Great, that 's how I designed the classes for the logic: I have a class 
called Account and it contains all the operations and data that an 
account would need: updateInvoice(somefileds), 
updateAccount(somefileds). The Account data is to be populated the view, 
through AccountAction. Now how do I update (get my hand on the Account) 
that needs to be updated.


One idea was to pass back the account obj to the controller, but if I 
pass it back it has to be a string !!
another idea was to pass back the accID. Ok, then I have to retireve the 
whole account data from the data base, just to update something, which 
not an option.
third idea was to use a persistence objects. Well how many things do I 
have to learn and use to get this small app working. On the other hand, 
I would really like to use OO, meaning encapsulate the behavior in the 
Account Obj.



Next, I am gonna try to find a way to push the Account in the view on 
the stack and access it back from the Action.
Or may be just store it again in the request. Which is not struts for ! 
right? isn't it to hide the access and code with request and session ...


If you have an idea, then let me know.





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



[OT] Re: Preparable or interceptors - is there a better mailing list than this ? some thing for total newbies.

2007-04-15 Thread Dave Newton
--- Mansour <[EMAIL PROTECTED]> wrote:
> I was looking to encapsulate all the behavior of the
> account in an account object. So the object updates 
> its self.

There's no reason you *can't* do that, but the
architecture overlords will not be pleased.

S2 doesn't care about what else is in the object in
question, as long as it exposes appropriate get/set
methods for the form values you're interested in.

So if you had an object that looked like:

public class Employee {
private String fname; // ...and get/set
private String lname; // ...and get/set
public void save() {
// Does DB stuff...
}
}

you could still use:



in your JSP.

Then in your action:

public String execute() throws Exception {
// ...
getEmployee().save();
// ...
}

> Again, accountService is another class. So I have to
> split the attr form the behavior of each object in 
> two classes. right?

You probably *should* but you don't have to.

> And I have to change the bussiness logic 
> (AccountService) to suit this design.

Depends on how you implement AccountService, I guess.

A lot of people using S2 take advantage of Spring and
its support for several persistence paradigms[1].
While I prefer iBatis or Hibernate, JDBC is another
Spring built-in option.

As an example, a Hibernate version of an Employee CRUD
action might consist of (at least) the following:

- An S2 Action: tells application where to go and why.
- An IEmployeeService: wraps up persistence
functionality.
- An Employee object: very simply POJO.

In turn, the IEmployeeService implementation might
contain an IEmployeeDao. Since my most recent project
have been Hibernate-based I use a modified
HibernateTools template to generate the DAO and its
interface.

I'll tell my IEmployeeService impl to save the current
employee:

getEmployeeService().saveOrUpdate(getEmployee());

My Hibernate impl of IEmployeeService.saveOrUpdate()
will look more or less like:

Session session = getSessionFactory().openSession();
Transaction tx = session.beginTransaction();
session.saveOrUpdate(employee);
tx.commit();
session.close();

Your JDBC impl of IEmployeeService.saveOrUpdate()
might look like (pseudo-code):

if (employee.id == null) {
// Build SQL update string.
} else {
// Build SQL insert string.
}

That's what you're currently putting in the Employee
object.

Why don't I think that's a good idea? It tightly
couples your data to how you deal with your data.
Isn't that what OOP is for? In theory, yes. In
practice, it just doesn't work out that well,
particularly in Java.

Now, you could put persistence stuff in your object
via an interface; I'd be less irritated with that, so
Employee would have an IEmployeeService in it, which
could then be called (internally) by Employee. Meh.

Again, for simple use-cases, I don't think it matters.
Java architect cowboys get all bent-out-of-shape when
they see code like that, but... let's face it, if it's
never going to change, or you're not doing "real"
enterprise work, or (insert several other use-cases
where I don't care) I just don't think it matters.

d.

[1] *ding ding ding* I got to say paradigm today, and
it isn't even noon yet.


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

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



Re: [OT] [RANT] Re: Preparable or interceptors - is there a better mailing list than this ? some thing for total newbies.

2007-04-15 Thread Musachy Barroso

I see. So I have to get away from OO in order to do this. I have to
create a class called services, that has methods like:




That's arguable, but it would be outside the scope of this mailing list.




I know it pays of,  but do I have to learn and use many frameworks to
get a simple application working ?




I think you asked how to do it, and we are giving you tips based on our own
experience, there is a zillion ways of doing what you are asking.

musachy
--
"Hey you! Would you help me to carry the stone?" Pink Floyd


Re: [s2] eclipse plugin

2007-04-15 Thread Angelo zerr

hi musachy,

thank you for having given the information about Eclipse plugin.

Have you seen Akrogen plugin? Do you find the idea is good?
Akrogen plugin is not finished, but I think today we can use for generate
simple component.

But if you want another features, tell me, and I will try to develop it.
The documentation is not finsihed, but I'm writing documentation.

Angelo

2007/4/15, Musachy Barroso <[EMAIL PROTECTED]>:


that was it :)

musachy

On 4/15/07, Angelo zerr <[EMAIL PROTECTED]> wrote:
>
> Hi
> Today, I don't think there is  Eclipse plugin which exist for struts2.
> But I'm developping Eclipse plugin Akrogen
> http://akrogen.sourceforge.net/for generate any component of
> framework.
>
> With Akrogen you can create your own components catalog.
> So you can write your Wizard page with XML/XUL description.
> If you are interested by topic and help me to write the struts
component,
> you can write me.
>
> Regards Angelo
>
>
>
> 2007/4/15, Musachy Barroso <[EMAIL PROTECTED]>:
> >
> > Search the mail archives, I think somebody mentioned a plugin some
time
> > ago
> >
> > musachy
> >
> > On 4/15/07, Pedro Herrera <[EMAIL PROTECTED]> wrote:
> > >
> > >
> > > Is there an eclipse plugin for Struts 2 ?
> > >
> > > Thks
> > >
> > > Pedro Herrera
> > > --
> > > View this message in context:
> > > http://www.nabble.com/-s2--eclipse-plugin-tf3579536.html#a10002404
> > > Sent from the Struts - User mailing list archive at Nabble.com.
> > >
> > >
> > >
-
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
> >
> > --
> > "Hey you! Would you help me to carry the stone?" Pink Floyd
> >
>



--
"Hey you! Would you help me to carry the stone?" Pink Floyd



Re: [OT] [RANT] Re: Preparable or interceptors - is there a better mailing list than this ? some thing for total newbies.

2007-04-15 Thread Mansour

Musachy Barroso wrote:

I was looking to encapsulate all the behavior of the account in an
account object. So the object updates its self.




I'd say  must people don't use that pattern anymore.


I see. So I have to get away from OO in order to do this. I have to 
create a class called services, that has methods like:


populate (Account acc)

and update(Account acc) and ...

That's fine with me. I was a C language programmer before, and familiar 
with 1928 programming style, Where you pass a pointer to a struct  to a 
method and let it do the operation on it. :)

So, no point in doing things OO ?



That was my question. I have to go through all this coding and write all

these extra classes to be able to update info. right ? And I have to
change the bussiness logic (AccountService) to suit this design.




It pays off to have a persistence layer, instead of mixing it up with you
object model. I'm using JPA on top of Toplink and I'm quite happy with 
it,

here is a tutorial, CRUD-like that you might want to take a look at:


I know it pays of,  but do I have to learn and use many frameworks to 
get a simple application working ?




http://struts.apache.org/2.x/docs/struts-2-spring-2-jpa-ajax.html

musachy
There must be a way to do this with going through all this extra coding 
and framework.




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



Re: [s2] eclipse plugin

2007-04-15 Thread Musachy Barroso

that was it :)

musachy

On 4/15/07, Angelo zerr <[EMAIL PROTECTED]> wrote:


Hi
Today, I don't think there is  Eclipse plugin which exist for struts2.
But I'm developping Eclipse plugin Akrogen
http://akrogen.sourceforge.net/for generate any component of
framework.

With Akrogen you can create your own components catalog.
So you can write your Wizard page with XML/XUL description.
If you are interested by topic and help me to write the struts component,
you can write me.

Regards Angelo



2007/4/15, Musachy Barroso <[EMAIL PROTECTED]>:
>
> Search the mail archives, I think somebody mentioned a plugin some time
> ago
>
> musachy
>
> On 4/15/07, Pedro Herrera <[EMAIL PROTECTED]> wrote:
> >
> >
> > Is there an eclipse plugin for Struts 2 ?
> >
> > Thks
> >
> > Pedro Herrera
> > --
> > View this message in context:
> > http://www.nabble.com/-s2--eclipse-plugin-tf3579536.html#a10002404
> > Sent from the Struts - User mailing list archive at Nabble.com.
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
> "Hey you! Would you help me to carry the stone?" Pink Floyd
>





--
"Hey you! Would you help me to carry the stone?" Pink Floyd


Re: validwhen not working

2007-04-15 Thread Dave Newton
--- Glenn Wilson <[EMAIL PROTECTED]> wrote:
> [client-side validwhen]

IIRC there is no client-side validation for validwhen,
but you'd want to confirm that (although you may have
already ;)

d.


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

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



Re: [s2] eclipse plugin

2007-04-15 Thread Angelo zerr

Hi
Today, I don't think there is  Eclipse plugin which exist for struts2.
But I'm developping Eclipse plugin Akrogen
http://akrogen.sourceforge.net/for generate any component of
framework.

With Akrogen you can create your own components catalog.
So you can write your Wizard page with XML/XUL description.
If you are interested by topic and help me to write the struts component,
you can write me.

Regards Angelo



2007/4/15, Musachy Barroso <[EMAIL PROTECTED]>:


Search the mail archives, I think somebody mentioned a plugin some time
ago

musachy

On 4/15/07, Pedro Herrera <[EMAIL PROTECTED]> wrote:
>
>
> Is there an eclipse plugin for Struts 2 ?
>
> Thks
>
> Pedro Herrera
> --
> View this message in context:
> http://www.nabble.com/-s2--eclipse-plugin-tf3579536.html#a10002404
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
"Hey you! Would you help me to carry the stone?" Pink Floyd



Re: [s2] eclipse plugin

2007-04-15 Thread Musachy Barroso

Search the mail archives, I think somebody mentioned a plugin some time ago

musachy

On 4/15/07, Pedro Herrera <[EMAIL PROTECTED]> wrote:



Is there an eclipse plugin for Struts 2 ?

Thks

Pedro Herrera
--
View this message in context:
http://www.nabble.com/-s2--eclipse-plugin-tf3579536.html#a10002404
Sent from the Struts - User mailing list archive at Nabble.com.


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





--
"Hey you! Would you help me to carry the stone?" Pink Floyd


validwhen not working

2007-04-15 Thread Glenn Wilson
Hi all, new to using validator. I have validator working on most of my 
applicaiton but having a problem doing a "validwhen". I've been using the 
examples in the "Jakarta Struts Cookbook".


Here is my question(s):

I've noticed that javascript code is generated unique to the form name. 
However, when I setup a "validwhen" for  the form no form specific 
javascript code gets generated. If I include "date" in the "depends" 
attribute I do get javascript code to do the date validation but nothing to 
deal with the validwhen?


So in my example, I have a page called Spiffs. The form name is SpiffsForm 
and I've included the  
tag in the page. I have two date/text fields (startDate,endDate) which are 
optional however, when one is populated the other date field needs to be 
populated.


The validation.xml file reads




 
 test
 ((spiffFilter.endDateAsString == null) or (*this* != 
null))

 



 
 test
 ((spiffFilter.startDateAsString == null) or (*this* != 
null))

 



I'm using Struts 1.3.5 with validator 1.3.0 on a Tomcat 5.5 instance.

Any help would be appreciated.
-Glenn

_
Mortgage rates near historic lows. Refinance $200,000 loan for as low as 
$771/month* 
https://www2.nextag.com/goto.jsp?product=10035&url=%2fst.jsp&tm=y&search=mortgage_text_links_88_h27f8&disc=y&vers=689&s=4056&p=5117



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



Re: [OT] [RANT] Re: Preparable or interceptors - is there a better mailing list than this ? some thing for total newbies.

2007-04-15 Thread Musachy Barroso

I was looking to encapsulate all the behavior of the account in an
account object. So the object updates its self.




I'd say  must people don't use that pattern anymore.


That was my question. I have to go through all this coding and write all

these extra classes to be able to update info. right ? And I have to
change the bussiness logic (AccountService) to suit this design.




It pays off to have a persistence layer, instead of mixing it up with you
object model. I'm using JPA on top of Toplink and I'm quite happy with it,
here is a tutorial, CRUD-like that you might want to take a look at:

http://struts.apache.org/2.x/docs/struts-2-spring-2-jpa-ajax.html

musachy
--
"Hey you! Would you help me to carry the stone?" Pink Floyd


[s2] eclipse plugin

2007-04-15 Thread Pedro Herrera

Is there an eclipse plugin for Struts 2 ?

Thks

Pedro Herrera
-- 
View this message in context: 
http://www.nabble.com/-s2--eclipse-plugin-tf3579536.html#a10002404
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: [OT] [RANT] Re: Preparable or interceptors - is there a better mailing list than this ? some thing for total newbies.

2007-04-15 Thread Mansour

Adam Ruggles wrote:
Based on your posts I get the idea you don't understand how the MVC 
pattern works.  I'll try to describe what should be happening.


On the browser a user submits the data he/she wishes to update.  That 
information is then passed to the action, I prefer to do this with an 
object.  So in your action you would have a public void 
setAccount(Account account); method.  On your form you would have 
fields with names like account.id, account.description, ...


I was looking to encapsulate all the behavior of the account in an 
account object. So the object updates its self.
Now for this example I'm going to use the default execute method.  So 
in the public String execute() throws Exception {...} method your 
going to have an account object.  Now if you want to update this 
account you pass it to your service layer which might have a method 
that looks like this.  accountService.update(account);


Again, accountService is another class. So I have to split the attr form 
the behavior of each object in two classes. right?
Inside the account service you'll be talking to your DAOs.  So you 
might have an update method in your DAO.  accountDAO.update(account).  
Now since your using JDBC you have control of the sql statement.  So 
one method of building the sql statement without having to load the 
account object from the database would be to check for nulls.  So say 
I only wanted to update the description.  Everything else is 
unchanged.  So in my DAO update method I would check for non-null 
fields and add the ones that are not null to the sql statement.  Then 
execute the statement.


That was my question. I have to go through all this coding and write all 
these extra classes to be able to update info. right ? And I have to 
change the bussiness logic (AccountService) to suit this design.




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



Re: Tiles 2 Lifecycycle

2007-04-15 Thread Antonio Petrelli

2007/4/13, stanlick <[EMAIL PROTECTED]>:


Antonio --

Can you explain this using this example?


I am sorry, I did not understand you and gave you a bad answer.
But I am wondering what you exactly wanted: do you want to inject
beans in Tiles definitions, or JSP pages? Or possibly in the view
preparer?

Antonio

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



Re: Struts 2.0.6 != Shale?

2007-04-15 Thread Antonio Petrelli

2007/4/15, Nicolas Lanquetin <[EMAIL PROTECTED]>:

So, question: Are these the same frameworks? Is Shale a codename for
Struts 2?


Absolutely not!
Shale is a component-based framework, based on JSF.
Struts 2 is an MVC framework based on WebWork.

Antonio

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



Re: Validation Random Failures

2007-04-15 Thread Zach Calvert

Actually no.  I'm simply using "Required" validation on text boxes
(simple string input).

On 4/15/07, Adam Ruggles <[EMAIL PROTECTED]> wrote:

I haven't tracked it down yet, but I think it is in the type
converters.  Are you using dates or decimal values on your forms?

Zach Calvert wrote:
> Has anyone figured out why Validation randomly fails???
>
> On 4/14/07, Adam Ruggles <[EMAIL PROTECTED]> wrote:
>> I'm having a similar problem.  I'm extending the ActionSupport object
>> and I have no validation specified and I'm experiencing the same issue.
>> I did enable validation and the results didn't change.  The application
>> was previously built on webwork2 where I didn't experience these issues
>> at all.
>>
>> I don't know if it has been logged as a bug. Because it happens randomly
>> I haven't been able to find out where it's dying.
>>
>> Zach Calvert wrote:
>> > I'm receiving random/spontaneous failures of validation on valid
>> > entries.  I can use the browser back button, re-submit the same data,
>> > and sometimes get it accepted.  I'm using simple Required strings:
>> > @Validations(
>> > requiredStrings = {
>> > @RequiredStringValidator(type =
>> > ValidatorType.SIMPLE, fieldName =
>> > "company", message = "You must enter a value for company.",
>> > shortCircuit = true, trim = true)}
>> > )
>> >
>> > I'm curious if there is a bug logged that I haven't found, a patch, or
>> > a new jar I need to download.  I'm using struts2-core-2.0.6.jar and
>> > freemarker-2.3.8.jar
>> >
>> >
>> > Anyone have any input?
>> >
>> >
>> >
>> > Thanks,
>> > Zach Calvert
>> >
>> > -
>> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>> > For additional commands, e-mail: [EMAIL PROTECTED]
>> >
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


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




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



Struts 2.0.6 != Shale?

2007-04-15 Thread Nicolas Lanquetin
I always though Shale was a codename for the new Struts 2.0. However, I 
am a little bit confused now that I've seen that there a two different 
websites:


1) http://struts.apache.org/2.0.6/
2) http://shale.apache.org/


I also see two download section for both, Struts 2 and Shale:

1) http://struts.apache.org/download.cgi#struts206
2) http://apache.rmplc.co.uk/shale/


I did a lot of reading, and I concluded that Struts 2 must be different 
from Shale, since Struts2 is based on WebWork2 and Shale is using a JSF 
approach.


So, question: Are these the same frameworks? Is Shale a codename for 
Struts 2?


Thanx for your reply,
Nic

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



Re: Preparable or interceptors - is there a better mailing list than this ? some thing for total newbies.

2007-04-15 Thread Dave Newton
Just to add on a bit to Adam's detailed explanation...

--- Adam Ruggles <[EMAIL PROTECTED]> wrote:
> So in your action you would have a public void 
> setAccount(Account account); method. On your form
> you would have fields with names like account.id, 
> account.description, ...

S2 will create an Account object and populate the
Account with the form values. Whether or not you're
updating or creating an Account, as Adam said, is
determined by whether or not the account ID is set.

Much of this is discussed in the CRUD tutorial:

http://struts.apache.org/2.x/docs/crud-demo-i.html

Looking at it now I can see there are some things that
should be updated, but just reading it without
implementing it might still be helpful. The showcase
app is also a decent place to look for some types of
information.

d.


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

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



Struts testing

2007-04-15 Thread puchacz

Hi

I would like to ask if You (as Struts programmers) see some + or - of
testing Struts? I know JSF where I can test  all components as a standalone
programs. How it looks in Struts? If in Struts are a lot of dependencies
which make Struts testing hard to test? 

Thanx 
-- 
View this message in context: 
http://www.nabble.com/Struts-testing-tf3579046.html#a1982
Sent from the Struts - User mailing list archive at Nabble.com.


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