Re: [BEER] Re: Books

2007-04-27 Thread Harring Figueiredo

I never thought of it that way.. but I believe it to be true...

I think that they change so that it will break previous instalation.
Sometimes OS can be a pain. :-)

Hf


On 4/27/07, Wendy Smoak <[EMAIL PROTECTED]> wrote:


On 4/27/07, Harring Figueiredo <[EMAIL PROTECTED]> wrote:

> By th eway he describes the whole thing, I think he meant it literaly,
even
> though he should have used the adjective instead (sadistic). It is
indeed
> very funny!

A former coworker once accused open source developers of changing
stuff not so that it would work better, but simply so they could sell
more books!

--
Wendy

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





--
Sincerely,

Harring Figueiredo
Sr. Software Engineer
Email: [EMAIL PROTECTED]
Telephone: 941-256-0600

"We never become truly spiritual by sitting down and wishing to become so.
You must undertake something so great that you cannot accomplish it
unaided."


Re: [BEER] Re: Books

2007-04-27 Thread Harring Figueiredo

By th eway he describes the whole thing, I think he meant it literaly, even
though he should have used the adjective instead (sadistic). It is indeed
very funny!

hff

On 4/27/07, Dave Newton <[EMAIL PROTECTED]> wrote:


--- maestro <[EMAIL PROTECTED]> wrote:
> The sadist part to it, its the industry standard.

That misspelling is *so* accurate in this case!

:D

I just lol'd out loud.

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]




[s2] upgrade error

2007-04-25 Thread Harring Figueiredo

Did anyone get this error when moving from 2.0.5 to 2.0.6 ?

Unable to load bean: type: class:com.opensymphony.xwork2.ObjectFactory -
bean - jar:file:/home/harringf/install/jakarta-tomcat-5.0.28
/webapps/bh-fl-wp/WEB-INF/lib/struts2-
core-2.0.6.jar!/struts-default.xml:8:69

My stratus-default xml
 8 


and xwork-2.0.1.jar is indeed there.



Thanks for any input.

Harring


Re: [s2]theme="ajax" for form/submit button

2007-04-24 Thread Harring Figueiredo

H... I sm not sure I understood. Maybe the generated code is different
for:


???

If the target is used on the form, it does reference and update the right
form (But I have to IFrames that I need to update and that is the reason I
am using the .

Harring.

On 4/24/07, Musachy Barroso <[EMAIL PROTECTED]> wrote:


I think that's why it doesn't work, the ajax theme uses
getElementBydId(id)
(actually dojo.byId(), anyway) which returns the element in the current
document, for an iframe it should be
window.frames[0].document.getElementById(...).
You can use the notifyTopics attribute and do it yourself inside the
topic.

regards
musachy

On 4/24/07, Harring Figueiredo <[EMAIL PROTECTED]> wrote:
>
> This is the generated code:
>
>  dojoType="struts:Bind" event="onclick" value="Save"
> id="member_login_button_save"label="Save"   name="
button.save"
>   targets="RightPaneWindow"  />
>
> 
>
>
> The div is on a different IFrame.
>
> Harring
>
> On 4/24/07, Harring Figueiredo <[EMAIL PROTECTED]> wrote:
> >
> >
> > Musachy,
> >
> > Thanks for the reply.
> >
> >  I am using only one div with the id.
> >
> > I now tried something else while waiting for the reply:
> >
> > 
> > 
> > 
> > 
> >
> > I then tried to replace the "traget" on the form itself (since it
works
> on
> > the form) with:
> >  > validate="true">
> > and also tried with
> > 
> >
> > Howver I cannot get the rigyht syntax to substitue the correct string.
> >
> > I think that it would work both ways.. But I would prefer to get the
> > ajax/targets working.
> >
> > Harring
> >
> > On 4/24/07, Musachy Barroso <[EMAIL PROTECTED]> wrote:
> > >
> > > After the ajax request completes, for each target in the target list
> > > this
> > > will run:
> > >
> > > dojo.byId("id").innerHTML = text;
> > >
> > > try updating the div content like that, and see what happens. This
is
> a
> > > dumb
> > > question, but are you using the same id for more than one div?
> > >
> > > musachy
> > >
> > > On 4/24/07, Harring Figueiredo <[EMAIL PROTECTED]> wrote:
> > > >
> > > > Folks,
> > > >
> > > > I have a form with a submit button as follows
> > > >
> > > > 
> > > > 
> > > > 
> > > >  targets="RightPaneWindow"
> > > />
> > > > 
> > > > 
> > > >
> > > > On the page itself, I have an IFrame with the
div="RightPaneWindow";
> > > > however, the updated  div is the div in which the form is in.
> > > >
> > > > Any idea?
> > > >
> > > > Thank you in advance,
> > > >
> > > > Harring Figueiredo
> > > >
> > >
> > >
> > >
> > > --
> > > "Hey you! Would you help me to carry the stone?" Pink Floyd
> > >
> >
> >
> >
>



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





--
Sincerely,

Harring Figueiredo
Sr. Software Engineer
Email: [EMAIL PROTECTED]
Telephone: 941-256-0600

"We never become truly spiritual by sitting down and wishing to become so.
You must undertake something so great that you cannot accomplish it
unaided."


Re: [s2]theme="ajax" for form/submit button

2007-04-24 Thread Harring Figueiredo

This is the generated code:






The div is on a different IFrame.

Harring

On 4/24/07, Harring Figueiredo <[EMAIL PROTECTED]> wrote:



Musachy,

Thanks for the reply.

 I am using only one div with the id.

I now tried something else while waiting for the reply:






I then tried to replace the "traget" on the form itself (since it works on
the form) with:

and also tried with


Howver I cannot get the rigyht syntax to substitue the correct string.

I think that it would work both ways.. But I would prefer to get the
ajax/targets working.

Harring

On 4/24/07, Musachy Barroso <[EMAIL PROTECTED]> wrote:
>
> After the ajax request completes, for each target in the target list
> this
> will run:
>
> dojo.byId("id").innerHTML = text;
>
> try updating the div content like that, and see what happens. This is a
> dumb
> question, but are you using the same id for more than one div?
>
> musachy
>
> On 4/24/07, Harring Figueiredo <[EMAIL PROTECTED]> wrote:
> >
> > Folks,
> >
> > I have a form with a submit button as follows
> >
> > 
> > 
> > 
> >  />
> > 
> > 
> >
> > On the page itself, I have an IFrame with the div="RightPaneWindow";
> > however, the updated  div is the div in which the form is in.
> >
> > Any idea?
> >
> > Thank you in advance,
> >
> > Harring Figueiredo
> >
>
>
>
> --
> "Hey you! Would you help me to carry the stone?" Pink Floyd
>





Re: [s2]theme="ajax" for form/submit button

2007-04-24 Thread Harring Figueiredo

Musachy,

Thanks for the reply.

I am using only one div with the id.

I now tried something else while waiting for the reply:






I then tried to replace the "traget" on the form itself (since it works on
the form) with:

and also tried with


Howver I cannot get the rigyht syntax to substitue the correct string.

I think that it would work both ways.. But I would prefer to get the
ajax/targets working.

Harring

On 4/24/07, Musachy Barroso <[EMAIL PROTECTED]> wrote:


After the ajax request completes, for each target in the target list this
will run:

dojo.byId("id").innerHTML = text;

try updating the div content like that, and see what happens. This is a
dumb
question, but are you using the same id for more than one div?

musachy

On 4/24/07, Harring Figueiredo <[EMAIL PROTECTED]> wrote:
>
> Folks,
>
> I have a form with a submit button as follows
>
> 
> 
> 
> 
> 
> 
>
> On the page itself, I have an IFrame with the div="RightPaneWindow";
> however, the updated  div is the div in which the form is in.
>
> Any idea?
>
> Thank you in advance,
>
> Harring Figueiredo
>



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





--
Sincerely,

Harring Figueiredo
Sr. Software Engineer
Email: [EMAIL PROTECTED]
Telephone: 941-256-0600

"We never become truly spiritual by sitting down and wishing to become so.
You must undertake something so great that you cannot accomplish it
unaided."


[s2]theme="ajax" for form/submit button

2007-04-24 Thread Harring Figueiredo

Folks,

I have a form with a submit button as follows


   
   
   
   


On the page itself, I have an IFrame with the div="RightPaneWindow";
however, the updated  div is the div in which the form is in.

Any idea?

Thank you in advance,

Harring Figueiredo


Re: S2 Tag Properties

2007-04-24 Thread Harring Figueiredo

They can the different and serve different purposes.

The name attribute that you have there means that the value will be picked
from

yourAction.getUser().getZip().getCity();

The key will be used to lookup the resources files using the literal string
'user.zip.city', of course.

Hope this helps.

Harring.

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


I notice key is now preferred over getText() and am now curious about
something else.  Is the name attribute necessary when using key?  I would
rather not duplicate myself unless S2 requires it.



--
Scott
[EMAIL PROTECTED]



Re: [S2] Formatting inside Iterator tag

2007-04-24 Thread Harring Figueiredo

Oh Boy,

I am glad to see that I was  not the only one to have this problem :-)

Dave,

Here is how I got it to work:

Edit the struts.properties with the following entry
struts.custom.i18n.resources=translations

Edit the properties file translations.properties with the entry
format.money={0,number,currency}

Make sure that translations.properties is in you classpath.

Note: The filename translations.properties can be any name you choose. I use
that name because that is the place where I place my translated strings. If
you have translated Strings, make sure you place the entry on other files as
well.

Cheers,

Harring.


On 4/24/07, Dave Newton <[EMAIL PROTECTED]> wrote:


--- chengas123 <[EMAIL PROTECTED]> wrote:
> Awesome.  Got it working by adding that to a
> package.properties file. I have no plans to
> internationalize this site and it wasn't immediately
> obvious to me that formatting would fall under the
> category of localization (although I understand why
> it does), so I'm afraid this was an area I hadn't
> made any efforts to learn. Thanks again for the
help.

No problem. I didn't know much about it until a couple
of weeks ago myself until I flailed trying to convert
a couple screens into Chinese and all heck broke
loose. Learned a bit more than I wanted to ;)

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] Difference between actionMessages and actionErrors

2007-04-24 Thread Harring Figueiredo

I was supposed to test the genereated HTML from both. (Laziness got the best
of me).


Here it goes, without testing. I think that the HTML generated is slightly
different so that you
may apply different CSS style sheets to it.


harringf

On 4/24/07, Musachy Barroso <[EMAIL PROTECTED]> wrote:


actionMessages is for general messages, and actionErrors for
errors. . I don't think there are any implications.

regards
musachy

On 4/24/07, Zoran Avtarovski <[EMAIL PROTECTED]> wrote:
>
> A quick question on what the recommended method for displaying general
> messages when using struts 2, actionMessages or actionErrors.
>
> I had a look at the ValidationAware interface and there appears to be no
> difference between the two.
>
> The only difference I could see what that they are accessed by different
> tags.
>
> Which one is recommended? My main concern is are the non-obvious
> implications of choosing one over another.
>
> Z.
>
>
>
> -
> 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: URL parameters separator

2007-04-20 Thread Harring Figueiredo

I am not sure if the DTD declares that (I did not take a look at it), but
basically the way to pass param on a HTML URL is the way it was generated -
Every single HTTP server will not parse the parameters correctly if it is in
the form that you want. If you have some special parser or that is indeed
what you want, I guess you will have to pass the entire parameter as one,
and not have multiple parameter arguments on the c:url.

Cheers,

hf



On 4/20/07, Marcello Savino <[EMAIL PROTECTED]> wrote:


In my jsp i've a code like this:



  
  



The code works good. But the generated url are in this form:

http://localhost:8080/myApp/myAction.do?id=161298&year=2005

Instead of

http://localhost:8080/myApp/myAction.do?id=161298&year=2005

As required by the DTD declared (xhtml 1.0 strict)

Does anybody have some idea to get the right url parameter separator
(&->&) ?
Thanks in advance.
Marcello


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




Re: Can we keep one action file for all jsp files?

2007-04-20 Thread Harring Figueiredo

You can do this by declaring the method that will handle the request.
My suggestion on this is that you should see if you REALLY need only one
action to handle everything. This might make maintenance more difficult and
you might have to mingle member variable that deal with different requests
and make the code more obscure.
Usually I keep the same action class for things that are related.  (e.g.
User login / logout, Password change/reset).

Anyhow: Here is how you can go about configuring stratus.xml to call a
prticular method.

 
  ...


 
  ...


Regards,

hf
On 4/20/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:



Hi,

I have 5-6 Jsp pages and all are inter connected.
If any one make changes, these changes should be display in the database.

In this case, I need only one Action class which can hold or manipulate
all changes from all jsp pages. I am not sure "Can we keep one action file
for all jsp files?"

If yes, then how can we configure struts-config.xml file.
If no, then pls suggest me any altenative solution.

Thanks & Regards,
Prafull Jain



The information contained in this electronic message and any attachments
to this message are intended for the exclusive use of the addressee(s) and
may contain proprietary, confidential or privileged information. If you are
not the intended recipient, you should not disseminate, distribute or copy
this e-mail. Please notify the sender immediately and destroy all copies of
this message and any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient
should check this email and any attachments for the presence of viruses. The
company accepts no liability for any damage caused by any virus transmitted
by this email.

www.wipro.com


Re: Initializing Struts

2007-04-19 Thread Harring Figueiredo

Hi Joseph,

Check the expanded directory of you web application (in Tomcat, it is under
$CATALINA_HOME/webapps).

See if the war file was indeed fully expanded (unzipped).  This could be the
cause of the problem.

If you are using Windows, Tomcat has trouble re-deplying due to file
locking. This causes the war file not to expand correctly.

Regards,
hff.

On 4/19/07, Lavezzo Joseph F <[EMAIL PROTECTED]> wrote:


Updated Error Message:

2007-04-19 15:38:49 ERROR [ActionServlet - initServlet] - The
/WEB-INF/web.xml was not found.
java.net.UnknownHostException: java.sun.com
at
org.apache.commons.digester.Digester.createSAXException(Digester.java:31
81)
at
org.apache.commons.digester.Digester.createSAXException(Digester.java:32
07)
at
org.apache.commons.digester.Digester.resolveEntity(Digester.java:1617)
at
oracle.xml.parser.v2.NonValidatingParser.pushExternalDTD(NonValidatingPa
rser.java:510)
at
oracle.xml.parser.v2.NonValidatingParser.parseDoctypeDecl(NonValidatingP
arser.java:468)
at
oracle.xml.parser.v2.NonValidatingParser.parseProlog(NonValidatingParser
.java:301)
at
oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingPars
er.java:280)
at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:196)
at
org.apache.commons.digester.Digester.parse(Digester.java:1765)
at
org.apache.struts.action.ActionServlet.initServlet(ActionServlet.java:17
85)
at
org.apache.struts.action.ActionServlet.init(ActionServlet.java:349)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at
com.evermind.server.http.HttpApplication.loadServlet(HttpApplication.jav
a:2354)
at
com.evermind.server.http.HttpApplication.findServlet(HttpApplication.jav
a:4795)
at
com.evermind.server.http.HttpApplication.initPreloadServlets(HttpApplica
tion.java:4889)
at
com.evermind.server.http.HttpApplication.initDynamic(HttpApplication.jav
a:1015)
at
com.evermind.server.http.HttpApplication.(HttpApplication.java:549
)
at
com.evermind.server.Application.getHttpApplication(Application.java:890)
at
com.evermind.server.http.HttpServer.getHttpApplication(HttpServer.java:7
07)
at
com.evermind.server.http.HttpSite.getApplication(HttpSite.java:438)
at
com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHa
ndler.java:455)
at
com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:
285)
at
com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:
126)
at
com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(Releasab
leResourcePooledExecutor.java:186)
at java.lang.Thread.run(Thread.java:534)
2007-04-19 15:38:49 ERROR [ActionServlet - init] - Unable to initialize
Struts ActionServlet due to an unexpected exception or error thrown, so
marking the servlet as unavailable.  Most likely, this is due to an
incorrect or missing library dependency.
javax.servlet.ServletException: Error at line 3 char 51: java.sun.com
at
org.apache.struts.action.ActionServlet.initServlet(ActionServlet.java:17
91)
at
org.apache.struts.action.ActionServlet.init(ActionServlet.java:349)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at
com.evermind.server.http.HttpApplication.loadServlet(HttpApplication.jav
a:2354)
at
com.evermind.server.http.HttpApplication.findServlet(HttpApplication.jav
a:4795)
at
com.evermind.server.http.HttpApplication.initPreloadServlets(HttpApplica
tion.java:4889)
at
com.evermind.server.http.HttpApplication.initDynamic(HttpApplication.jav
a:1015)
at
com.evermind.server.http.HttpApplication.(HttpApplication.java:549
)
at
com.evermind.server.Application.getHttpApplication(Application.java:890)
at
com.evermind.server.http.HttpServer.getHttpApplication(HttpServer.java:7
07)
at
com.evermind.server.http.HttpSite.getApplication(HttpSite.java:438)
at
com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHa
ndler.java:455)
at
com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:
285)
at
com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:
126)
at
com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(Releasab
leResourcePooledExecutor.java:186)
at java.lang.Thread.run(Thread.java:534)

-Original Message-
From: Lavezzo Joseph F [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 19, 2007 2:47 PM
To: user@struts.apache.org
Subject: Initializing Struts

I just upgraded to the Struts 1.3.8 and I am having problems with
initializing the struts servlet.  Below is the error message, web.xml
and struts-config.xml

*Error Message
07/04/19 14:28:53 Started
07/04/19 14:28:57 rtr: jsp: init
07/04/19 14:28:58 rtr: action: init
07/04/19 14:29:00 rtr: Error preloading servlet
java

Re: s:select with list from attributes hash map gives list key error

2007-04-19 Thread Harring Figueiredo

This way works too, but you do not have to add it to the attributes. I
believe if you add it to the session, you can retrieve it from the JSP with
the #session notation.

I am glad you got it working.

Hf.
On 4/19/07, Darryl Culverwell <[EMAIL PROTECTED]> wrote:



Got it !!
Defined a method

public Object getAttribute(String key){
return attributes.get(key);
}




Strange that I couldn't access the map values directly...

Thanx guys.


On Thu, 2007-04-19 at 09:33 -0400, Harring Figueiredo wrote:
> Try using the session notation.
>
> i.e 
> On 4/19/07, Darryl Culverwell <[EMAIL PROTECTED]> wrote:
> >
> > Cool! thanx.
> >
> > I am using a generic action, so there is no actual list in the action.
> > All the attributes of the bean are inspected and put into the
attributes
> > map.
> >
> > BTW it does work if there I expose the list in the action directly.
> >
> >
> > On Thu, 2007-04-19 at 06:12 -0700, Dave Newton wrote:
> > > --- Darryl Culverwell <[EMAIL PROTECTED]> wrote:
> > > > attributes['user.status.options'] produces a list of
> > >
> > > > beans that I'm after.
> > > >
> > > > Im doing something like this in my action :
> > > >
> > > > List userStatusOptions = getUserStatusOptions();
> > > > attributes.put("user.status.options",
> > > > userStatusOptions);
> > >
> > > Oh, I thought you said:
> > >
> > > > I have a list of UserStatus beans in my attributes
> > > > map with key=user.status
> > >
> > > Just out of curiosity, why don't you just expose the
> > > list in the action instead of putting it in a map?
> > >
> > > Um... I guess I'm not sure what happens if you provide
> > > a list of non-primitive types to an 
> > > without specifying key/value info; hopefully someone
> > > else will chime in.
> > >
> > > d.
> > >
> > >
> > > __
> > > Do You Yahoo!?
> > > Tired of spam?  Yahoo! Mail has the best spam protection around
> > > http://mail.yahoo.com
> > >
> > --
> > -=Darryl Culverwell=-
> > Cell:  +27 82 494 1678
> > Phone: +21 21 448 1395
> >
> >
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
--
-=Darryl Culverwell=-
Cell:  +27 82 494 1678
Phone: +21 21 448 1395




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





--
Sincerely,

Harring Figueiredo
Sr. Software Engineer
Email: [EMAIL PROTECTED]
Telephone: 941-256-0600

"We never become truly spiritual by sitting down and wishing to become so.
You must undertake something so great that you cannot accomplish it
unaided."


Re: s:select with list from attributes hash map gives list key error

2007-04-19 Thread Harring Figueiredo

Try using the session notation.

i.e  wrote:


Cool! thanx.

I am using a generic action, so there is no actual list in the action.
All the attributes of the bean are inspected and put into the attributes
map.

BTW it does work if there I expose the list in the action directly.


On Thu, 2007-04-19 at 06:12 -0700, Dave Newton wrote:
> --- Darryl Culverwell <[EMAIL PROTECTED]> wrote:
> > attributes['user.status.options'] produces a list of
>
> > beans that I'm after.
> >
> > Im doing something like this in my action :
> >
> > List userStatusOptions = getUserStatusOptions();
> > attributes.put("user.status.options",
> > userStatusOptions);
>
> Oh, I thought you said:
>
> > I have a list of UserStatus beans in my attributes
> > map with key=user.status
>
> Just out of curiosity, why don't you just expose the
> list in the action instead of putting it in a map?
>
> Um... I guess I'm not sure what happens if you provide
> a list of non-primitive types to an 
> without specifying key/value info; hopefully someone
> else will chime in.
>
> d.
>
>
> __
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
--
-=Darryl Culverwell=-
Cell:  +27 82 494 1678
Phone: +21 21 448 1395




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





--
Sincerely,

Harring Figueiredo
Sr. Software Engineer
Email: [EMAIL PROTECTED]
Telephone: 941-256-0600

"We never become truly spiritual by sitting down and wishing to become so.
You must undertake something so great that you cannot accomplish it
unaided."


[S2/S1] Missing Applocation web.xml - redeploy fails

2007-04-18 Thread Harring Figueiredo

Folks,

I am having problems redeploying my web app on tomcat 5.0.28/30. It is
giving me the error: "Missing Applocation web.xml"

I have searched for archives on tomcat and I found several discussions that
point to a file locking problem under windows.

http://www.javaworld.com/javaforums/showflat.php?Cat=&Board=Enterprisejava&Number=5915&page=14&view=collapsed&sb=11&o=&fpart=1


I am not opening files on my application. Is Struts 2 opening and not
closing resource/i18n files and it is the root cause?  The only other
possible class that is opening a file on my web app is the ResourceBundle.

P.S.: This does work in Linux, and the problems is happening in Windos XP,
which leads me to believe that the discussions on the forums are correct.

If anyone is developing on windows, how did you bypass the redeployment
without having to shutdown the server?

Thanks for any insite.

--
Sincerely,

Harring Figueiredo
Sr. Software Engineer
Email: [EMAIL PROTECTED]
Telephone: 941-256-0600

"We never become truly spiritual by sitting down and wishing to become so.
You must undertake something so great that you cannot accomplish it
unaided."


Re: Problem passing form fields with autocompleter

2007-04-12 Thread Harring Figueiredo

I am sure it should NOT be getBar() either. It should be getFoo().

Perhaps there is a bug with the framework on not processing/doing reflection
on hidden fields?

hf.

On 4/12/07, Scott Nesbitt <[EMAIL PROTECTED]> wrote:



Not sure why it should be getBar().  The name of the
hidden field is foo, so shouldn't that be the variable
that has the getter and setter?

Regarding passing the field as a parameter, I am not
too proud for that.  Could you post a little example
code?  I tried to do something like this:


   


And that worked, but I want the value of the foo
field, not a hard-coded value.  How do I specify
another field in the param tag?

Thanks again,

Scott

--- Musachy Barroso <[EMAIL PROTECTED]> wrote:

> You should have a "getBar()" defined on your action,
> not a "getFoo()"
>
> regards
> musachy
>
> On 4/12/07, Scott Nesbitt <[EMAIL PROTECTED]>
> wrote:
> >
> >
> > I have a form with an autocompleter like this:
> >
> >  validate="false">
> >> action="LookupSportsTeam"/>
> >   
> >   >   id="sportsTeam"
> >   keyName="sportsTeamKey"
> >   theme="ajax"
> >   href="%{#autosportsteam}"
> >   cssStyle="width: 500px;"
> >   dropdownHeight="180";
> >   loadMinimumCount="2"
> >   loadOnTextChange="true"
> >   autoComplete="false"
> >   showDownArrow="false"
> >   delay="100"
> >   searchType="substring"
> >   forceValidOption="true"/>
> >   
> >   
> > 
> >
> > I expected that my LookupSportsTeamAction class
> (which
> > extends ActionSupport and has a getter and setter
> on
> > foo) would be able to use the foo member variable.
> > But it is always null, though the sportsTeam
> variable
> > is being set correctly.
> >
> > Any ideas on this?  This works in other pages that
> do
> > not have the autocompleter tag.
> >
> > Thanks,
> >
> > Scott
> >
> >
> >
> >
> >
>


> > Now that's room service!  Choose from over 150,000
> hotels
> > in 45,000 destinations on Yahoo! Travel to find
> your fit.
> > http://farechase.yahoo.com/promo-generic-14795097
> >
> >
>
-
> > 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
>






Be a PS3 game guru.
Get your game face on with the latest PS3 news and previews at Yahoo!
Games.
http://videogames.yahoo.com/platform?platform=120121

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





--
Sincerely,

Harring Figueiredo
Sr. Software Engineer
Email: [EMAIL PROTECTED]
Telephone: 941-256-0600

"We never become truly spiritual by sitting down and wishing to become so.
You must undertake something so great that you cannot accomplish it
unaided."


Re: Problem passing form fields with autocompleter

2007-04-12 Thread Harring Figueiredo

Scott:

I had a similar problem, and I got around it by getting the parameter
myself...
(I know.. a little pain, but got it done)
Let me know if you get the _correct_ way working.

hf.

On 4/12/07, Scott Nesbitt <[EMAIL PROTECTED]> wrote:



I have a form with an autocompleter like this:


  
  
 
  
  


I expected that my LookupSportsTeamAction class (which
extends ActionSupport and has a getter and setter on
foo) would be able to use the foo member variable.
But it is always null, though the sportsTeam variable
is being set correctly.

Any ideas on this?  This works in other pages that do
not have the autocompleter tag.

Thanks,

Scott





Now that's room service!  Choose from over 150,000 hotels
in 45,000 destinations on Yahoo! Travel to find your fit.
http://farechase.yahoo.com/promo-generic-14795097

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





--
Sincerely,

Harring Figueiredo
Sr. Software Engineer
Email: [EMAIL PROTECTED]
Telephone: 941-256-0600

"We never become truly spiritual by sitting down and wishing to become so.
You must undertake something so great that you cannot accomplish it
unaided."


Re: [S2] Testing for size of Collection inside a s:if

2007-04-11 Thread Harring Figueiredo

Dave,

Thank for the reply.

I thought that this would call getIsEmpty(), from other examples I have
seen.

Let me try it again.

hf

On 4/11/07, Dave Newton <[EMAIL PROTECTED]> wrote:


--- Harring Figueiredo <[EMAIL PROTECTED]> wrote:
> 



d.






Sucker-punch spam with award-winning protection.
Try the free Yahoo! Mail Beta.
http://advision.webevents.yahoo.com/mailbeta/features_spam.html

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





--
Sincerely,

Harring Figueiredo
Sr. Software Engineer
Email: [EMAIL PROTECTED]
Telephone: 941-256-0600

"We never become truly spiritual by sitting down and wishing to become so.
You must undertake something so great that you cannot accomplish it
unaided."


[S2] Testing for size of Collection inside a s:if

2007-04-11 Thread Harring Figueiredo

Folks,

How do I call the isEmpty() method (or any other non-bean conforming method)
inside a  tag?

I can test for null as:



But, I also need to test for empty collection.


Thank you in advance.

hf


Re: [S2] s:text help on formatting output

2007-04-11 Thread Harring Figueiredo

DAVE!

THANK YOU SO MUCH FOR THIS  "LITTLE" DETAIL.

It would be nice if the documentation was as CLEAR as your email. (i.e.
where to the format.money, rather then

where:  format.money={0,number,currency}.

To me, coming from Unix world, means a set in which the possible values are
inside the brackets.

Thank you ALL again for your patience, replies, and help!

hf

On 4/11/07, Dave Newton <[EMAIL PROTECTED]> wrote:


--- Harring Figueiredo <[EMAIL PROTECTED]> wrote:
> [...]

Dude, just type it in.

In my properties file:

format.money={0,number,currency}

On my JSP:


  


Rendered output:

$123.00

Switch locale to Chinese (zh_CN, it's the only other
language I know, sorry), rendered output:

¥123.00

I simply don't know what else to tell you.

Wait, that isn't the right symbol. But you get the
point... ar_SA renders as:

ر.س. 123

d.






Now that's room service!  Choose from over 150,000 hotels
in 45,000 destinations on Yahoo! Travel to find your fit.
http://farechase.yahoo.com/promo-generic-14795097

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





--
Sincerely,

Harring Figueiredo
Sr. Software Engineer
Email: [EMAIL PROTECTED]
Telephone: 941-256-0600

"We never become truly spiritual by sitting down and wishing to become so.
You must undertake something so great that you cannot accomplish it
unaided."


Re: [S2] s:text help on formatting output

2007-04-11 Thread Harring Figueiredo

Another thing is that your example, according to the example provided on the
web site, is not correct either.

 



format.money should actually be one of the values { 0, number, currency },
at least that is what it says on the documentation page.

I wish someone from the Struts team would give a better example on this.

Thank you to all that have replied and will still reply.   Solution NOT yet
found.

Harring


On 4/11/07, Harring Figueiredo <[EMAIL PROTECTED]> wrote:



Hi Laurie,

Thanks for the response. I tried what you suggested, and actually did not
get  a value back (empty). Where should I  set the resource string? (I
thought it was _smart_ enough to get from the Locale.

Thank you.

On 4/11/07, Laurie Harper <[EMAIL PROTECTED]> wrote:
>
> Harring Figueiredo wrote:
> > Folks:
> >
> > It is clear that I MUST be doing something wrong, but I have tried all
> the
> > options with the  to format a number.
> >
> > Here is what I have tried:
> >  > value="%{#session.Account.balance}"/>
> >  > value="%{#session.Account.balance}"/>
> > 
> > 
> > 
> > 
> >  .1
> > 
> > 
> >  .1 
> > 
> > 
> >
> >
> > And Here is the Corresponding output on the page:
> > currency
> > format.money
> > currency
> > format.money
> > currency
> > currency
> > currency
> > currency
> > 1003.9
> >
> > What in the world ami I missing?  ( I am wither misreading the
> example, or
> > it is clearly not correct. I hope it is the former)
> >
> > I followed the example on this page:
> > http://struts.apache.org/2.x/docs/text.html
> >
> > Other example
> >
> >  > value="myMoneyValue"/>
> >
> > where
> >
> > format.money={0,number,currency}
> >
> >
> > Thank you in advance for any input.
> >
> > hf
> >
>
> None of your attempts actually follows the example, though; you're using
> 
> Try this:
>
>  
>value="%{#session.Account.balance}"/>
>  
>
> From your sample output it looks like you haven't set up the
> format.money or currency resource strings, either, which you will need
> to do.
>
> L.
>
>
> ---------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
Sincerely,

Harring Figueiredo
Sr. Software Engineer
Email: [EMAIL PROTECTED]
Telephone: 941-256-0600

"We never become truly spiritual by sitting down and wishing to become so.
You must undertake something so great that you cannot accomplish it
unaided."





--
Sincerely,

Harring Figueiredo
Sr. Software Engineer
Email: [EMAIL PROTECTED]
Telephone: 941-256-0600

"We never become truly spiritual by sitting down and wishing to become so.
You must undertake something so great that you cannot accomplish it
unaided."


Re: [S2] s:text help on formatting output

2007-04-11 Thread Harring Figueiredo

Hi Laurie,

Thanks for the response. I tried what you suggested, and actually did not
get  a value back (empty). Where should I  set the resource string? (I
thought it was _smart_ enough to get from the Locale.

Thank you.

On 4/11/07, Laurie Harper <[EMAIL PROTECTED]> wrote:


Harring Figueiredo wrote:
> Folks:
>
> It is clear that I MUST be doing something wrong, but I have tried all
the
> options with the  to format a number.
>
> Here is what I have tried:
>  value="%{#session.Account.balance}"/>
>  value="%{#session.Account.balance}"/>
> 
> 
> 
> 
>  .1
> 
> 
>  .1 
> 
> 
>
>
> And Here is the Corresponding output on the page:
> currency
> format.money
> currency
> format.money
> currency
> currency
> currency
> currency
> 1003.9
>
> What in the world ami I missing?  ( I am wither misreading the example,
or
> it is clearly not correct. I hope it is the former)
>
> I followed the example on this page:
> http://struts.apache.org/2.x/docs/text.html
>
> Other example
>
>  value="myMoneyValue"/>
>
> where
>
> format.money={0,number,currency}
>
>
> Thank you in advance for any input.
>
> hf
>

None of your attempts actually follows the example, though; you're using

 
 

From your sample output it looks like you haven't set up the
format.money or currency resource strings, either, which you will need
to do.

L.


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





--
Sincerely,

Harring Figueiredo
Sr. Software Engineer
Email: [EMAIL PROTECTED]
Telephone: 941-256-0600

"We never become truly spiritual by sitting down and wishing to become so.
You must undertake something so great that you cannot accomplish it
unaided."


Re: S2 life cycle

2007-04-11 Thread Harring Figueiredo

tom:

I have not experience with the ModelDrivenInterface.

What is that you are trying to do? (It it is to keep a bean around to share
between action invocations, have you tried this?

class FirstAction extends ActionSupport{

public String execute(){
  Bean bean = new Bean();
  bean.setWhaterver(...);
  session.setAttribute("MY_BEAN", bean);
}

}


class SecondAction extends ActionSupport{

public String execute(){
  Bean bean = (Bean)= session.getAttribute("MY_BEAN");
  bean.getWahtever();
}

}

Is that what you want to do?

Thanks,

Hf


On 4/11/07, tom tom <[EMAIL PROTECTED]> wrote:


Works but the values get reset all the time, doesnt
stay in the session scope, if I update form in the one
action class and if I try to retrieve from the other
action class the values has been lost.



Should I have to do any extra things


--- Dave Newton <[EMAIL PROTECTED]> wrote:

> --- tom tom <[EMAIL PROTECTED]> wrote:
> > How can I have a reference to the form class
> inside
> > the action class. I did the following
> >
> > 1) Wrote a action class which implements
> > ScopedModelDriven interface, the argo is not null
> > inside setModel(Object arg0)method in the action
> > class but I cant cast into test.TestForm (pojo)
>
> At the very least I believe you should implement
> ScopedModelDriven, not just ScopedModelDriven,
> and
> provide typed accessors:
>
>

http://struts.apache.org/2.x/struts2-core/apidocs/com/opensymphony/xwork2/ModelDriven.html
>

http://struts.apache.org/2.x/struts2-core/apidocs/com/opensymphony/xwork2/interceptor/ScopedModelDriven.html
>
> d.
>
>
>
>
>


> Don't get soaked.  Take a quick peek at the forecast
> with the Yahoo! Search weather shortcut.
> http://tools.search.yahoo.com/shortcuts/#loc_weather
>
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
>
>



  Don't be flakey.  Get Yahoo! Mail for Mobile and always stay
connected to friends.http://mobile.yahoo.com/mail

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





--
Sincerely,

Harring Figueiredo
Sr. Software Engineer
Email: [EMAIL PROTECTED]
Telephone: 941-256-0600

"We never become truly spiritual by sitting down and wishing to become so.
You must undertake something so great that you cannot accomplish it
unaided."


[S2] s:text help on formatting output

2007-04-11 Thread Harring Figueiredo

Folks:

It is clear that I MUST be doing something wrong, but I have tried all the
options with the  to format a number.

Here is what I have tried:






 .1 

 .1 




And Here is the Corresponding output on the page:
currency
format.money
currency
format.money
currency
currency
currency
currency
1003.9

What in the world ami I missing?  ( I am wither misreading the example, or
it is clearly not correct. I hope it is the former)

I followed the example on this page:
http://struts.apache.org/2.x/docs/text.html

Other example



where

format.money={0,number,currency}


Thank you in advance for any input.

hf


Re: S2 s:text Currency Format

2007-04-10 Thread Harring Figueiredo

Dave:

Thank you for the email.

That was exactly what I wrote.

 


It the value does no appear at all.
If there any way we can have output for TLD to see what goes on?

Thank you again for the response.

Harring

On 4/10/07, Dave Newton <[EMAIL PROTECTED]> wrote:


--- Harring Figueiredo <[EMAIL PROTECTED]> wrote:
> How can I format a number with the currency format?
>
> I have taken a look at
> http://struts.apache.org/2.x/docs/text.html and
> still cannot figure out the correct syntax.

Is


  


where

format.money={0,number,currency}

Not the correct syntax?

I ask because it doesn't seem like it's what you're
using:

> I tried this and it does not work.
> 
>   
> 

d.






Don't pick lemons.
See all the new 2007 cars at Yahoo! Autos.
http://autos.yahoo.com/new_cars.html

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





--
Sincerely,

Harring Figueiredo
Sr. Software Engineer
Email: [EMAIL PROTECTED]
Telephone: 941-256-0600

"We never become truly spiritual by sitting down and wishing to become so.
You must undertake something so great that you cannot accomplish it
unaided."


S2 s:text Currency Format

2007-04-10 Thread Harring Figueiredo

How can I format a number with the currency format?

I have taken a look at http://struts.apache.org/2.x/docs/text.html and still
cannot figure out the correct syntax.

This works, but without formatting the output

 


I tried this and it does not work.

 


What am I doing wrong?


Thank you.

--
Sincerely,

Harring Figueiredo
Sr. Software Engineer
Email: [EMAIL PROTECTED]
Telephone: 941-256-0600

"We never become truly spiritual by sitting down and wishing to become so.
You must undertake something so great that you cannot accomplish it
unaided."


Re: what version of struts is better?

2007-04-10 Thread Harring Figueiredo

Struts 2 is the way to go, IMHO.

On 4/10/07, Piero Sartini <[EMAIL PROTECTED]> wrote:


for new projects where you have the choice what to use, I suggest struts2.

On Tuesday 10 April 2007 20:30:21 dire wrote:
> sorry for my English!
>
> in my term paper i want to use Struts. Before this time i don`t have a
deal
> with it. in http://struts.apache.org/ i saw that struts had two
versions. i
> try to found what version is preferable, but can`t...
>
> Can anybody says how many differencies bitween them? Or, at least, tell
me,
> please, where i can found answer for my question.
>
> thanx for your attention!

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





--
Sincerely,

Harring Figueiredo
Sr. Software Engineer
Email: [EMAIL PROTECTED]
Telephone: 941-256-0600

"We never become truly spiritual by sitting down and wishing to become so.
You must undertake something so great that you cannot accomplish it
unaided."


S2 Formattion output with S:tags

2007-04-10 Thread Harring Figueiredo

Folks,

I read http://struts.apache.org/2.x/docs/text.html and could not make sense
on how to display currency format with s:tags

I have an iterator, during the iteration, I would like to set the currency
with the correct format.

If I use:

   


It displays correctly, except that the string is not  currency formatted.
(Note: Amount is of type double: I know...don't ask  :-)

I have tried, by the example on the site:





and tried also some bizarre syntax to no avail.


Thank you for any input.
hff


Re: S2 Action Validation

2007-04-09 Thread Harring Figueiredo

Hi Scott:

All you have to do is:

YouAction{

public String your_execute_method() {

 If(some error){
 / * Chose what is appropriate for you  - Field errors display the message
on top of the field on HTML page*/
   this.addActionError();
   this.addActionMessage()
   this.addFieldError();
   return INPUT ;  /* or ERROR */ and display the same .jsp on the struts
.xml  file
}
}

Please let me know if you still need more clarification/ help.

--
Sincerely,

Harring Figueiredo
Sr. Software Engineer
Email: [EMAIL PROTECTED]

"We never become truly spiritual by sitting down and wishing to become so.
You must undertake something so great that you cannot accomplish it
unaided."

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


I have a situation where an attempt could be made to enter a description
for
an item that already exists in the database.  I am using Hibernate and
suspect the easiest way to prevent this is to use HQL prior to my save.
Beyond this, how do I get an S2 action class to display a message on the
web
page?  My action extends ActionSupport so I see a few methods here that
look
interesting:

getFieldErrors()
getActionErrors()
getActionMessages()
getErrorMessages()

However, I can't tell what I need to add to these Collections as in one
case
it wants the name of the field in error.  This too is unknown since the
name
I give a screen field is not what the name ultimately becomes once
rendered.  It appears the S2 tag expands the name of the field.  I also
see
a ValidationAware interface that can be implemented.

I would be happy to read about the technique if someone could point me in
the right direction.  I cannot seem to find anything on the S2 site when I
need it.  Is there a search facility somewhere?  I would probably post far
fewer questions if the available docs were search-able.  Also, is there a
way to search through the messages from this forum?  I am starting to
wonder
how many of us have personal collections of email messages storing up so
we
can get back to that useful tip someone shared three weeks ago Tuesday!
Does this not work like a NewsGroup?

--
Scott
[EMAIL PROTECTED]



Re: S2: Design Input suggestion

2007-04-05 Thread Harring Figueiredo

Joey,

Thank you so much for you input. I will take a look again at the showcase
application code and see the detail of it. I was not aware that we could
setup interceptors like that -- Your input on this is greatly appreciated.

Regards,

Harring Figueiredo

On 4/5/07, joey <[EMAIL PROTECTED]> wrote:


I don't think you should turn on validation in "edit" mode or "create"
mode.
Validation is only needed in "save" mode.
"edit" mode or "create" mode is just to show field data,no submit.
You can set validation only work for "save" mode like this:
Add
edit,create

in edit or create mode configuration file.
Btw.edit and create could be done in one method.It's more compact.
You can refer to the crud example in the showcase app.

On 4/6/07, Harring Figueiredo <[EMAIL PROTECTED]> wrote:
>
> Folks:
>
>
> I have a form that is rendered by calling an action from a get or a put.
>
> In  "edit" mode, the fields are pre-populated from the POJO (param to
get
> the POJO is passed on the URL GET).
> In "create" mode, the fields are, of course, empty.
>
> The design issue I am having has to do with the Validation.
> If I turn on validation, then when the Action is called for the create
> mode,
> the the validators intercept an reders the form with
> the errors (i.e. "Missing Field Blah")
>
> What is the best way you guys handle this situation?
>
> Thanks in advance.
>
> hff
>





--
Sincerely,

Harring Figueiredo
Sr. Software Engineer
Email: [EMAIL PROTECTED]
Telephone: 941-256-0600

"We never become truly spiritual by sitting down and wishing to become so.
You must undertake something so great that you cannot accomplish it
unaided."


S2: Design Input suggestion

2007-04-05 Thread Harring Figueiredo

Folks:


I have a form that is rendered by calling an action from a get or a put.

In  "edit" mode, the fields are pre-populated from the POJO (param to get
the POJO is passed on the URL GET).
In "create" mode, the fields are, of course, empty.

The design issue I am having has to do with the Validation.
If I turn on validation, then when the Action is called for the create mode,
the the validators intercept an reders the form with
the errors (i.e. "Missing Field Blah")

What is the best way you guys handle this situation?

Thanks in advance.

hff


Re: request.getParameterValues OGNL ?

2007-04-04 Thread Harring Figueiredo

Berger,

I do not know the answer to your question. I think it should be something
simple to.

But my suggestion _as a hack_ for now is to do the following :

1) In your action code:


request.getSession().setAttribute( "MY_MAP", youMap);

2) in your JSP:

 
.. ..


Let me know if anyone came up with the _right_ answer.

Regards,
Harring



On 4/4/07, Will Berger <[EMAIL PROTECTED]> wrote:



I believe the main thing parameterAware does for you is make it so u don't
have to call

Map parameters = ActionContext.getContext().getParameters();

instead

you can call this.getParameter().

my call to getParameter("listOfemails") returns a String[] that I need to
iterate over.  If OGNL cannot handle this, that is fine.  Would love it if
someone could set me straight.

Will



Will Berger wrote:
>
> You asked why would one want to do it this way.  When processing a post
> from a form that has check boxes, being able to specifiy which boxes
were
> checked for a confirmation page is a common occurence.  What I am trying
> to do.  I could create an action class to return an iterator.  A lot of
> work for something so simple.
>
> Will
>
>
> Will Berger wrote:
>>
>> I have seen this page.  I don't see where it shows you how to iterate
>> over an array of strings.  or how to access an array of request
>> parameters. Can you elaborate on your explanation?
>>
>> Will
>>
>>
>> Dave Newton-4 wrote:
>>>
>>> --- Will Berger <[EMAIL PROTECTED]> wrote:
>>>> How does one in struts 2 process a list of req
>>>> parameters using ognl?
>>>
>>> http://struts.apache.org/2.x/docs/ognl.html
>>>
>>> Although I'm not sure why you'd want to do it like
>>> that :/
>>>
>>> d.
>>>
>>>
>>>
>>>
>>>

>>> Food fight? Enjoy some healthy debate
>>> in the Yahoo! Answers Food & Drink Q&A.
>>> http://answers.yahoo.com/dir/?link=list&sid=396545367
>>>
>>> -
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>>
>>
>>
>
>

--
View this message in context:
http://www.nabble.com/request.getParameterValues-OGNL---tf3528203.html#a9847064
Sent from the Struts - User mailing list archive at Nabble.com.


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





--
Sincerely,

Harring Figueiredo
Sr. Software Engineer
Email: [EMAIL PROTECTED]
Telephone: 941-256-0600

"We never become truly spiritual by sitting down and wishing to become so.
You must undertake something so great that you cannot accomplish it
unaided."


Re: S2 life cycle

2007-04-04 Thread Harring Figueiredo

Tom,

I forgot to mention that unlike S1, in S2 the action class does not have to
be thread safe - The action class will be instantiated for each request, and
thus it will have its own instance of the POJO or member variables.
You can pass the "ActionForm", in our case, the POJO object to another
action byt putting the pojo into the session object
[session.setAttribute(..)]

There are 2 types of validation - 1) Using Validators. 2) Implementing a
Validatable interface on your Action. Look at the links provided to you from
previous email.

Hope this helps.

Harring

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


I prefer to achieve it by writing some java code than xml snippet.
Maybe migrating from struts1.x would do this.
If I just wanted to share more than one form within some actions,I must
declared more than one
interceptor.If I achieve it by only java code,I only need write a base
action and extend it.I can write
any get or set shared property methods in the desired scope.

On 4/4/07, tom tom <[EMAIL PROTECTED]> wrote:
>
> Thanks,
>
> Any samples or documenation around for me to refer.
>
> I followed this
>
> http://struts.apache.org/2.x/docs/scoped-model-driven-interceptor.html
>
>
> but didnt work.
>
> Thanks
>
> --- Dave Newton <[EMAIL PROTECTED]> wrote:
>
> > --- tom tom <[EMAIL PROTECTED]> wrote:
> > > How can I have a reference to the form class
> > inside
> > > the action class. I did the following
> > >
> > > 1) Wrote a action class which implements
> > > ScopedModelDriven interface, the argo is not null
> > > inside setModel(Object arg0)method in the action
> > > class but I cant cast into test.TestForm (pojo)
> >
> > At the very least I believe you should implement
> > ScopedModelDriven, not just ScopedModelDriven,
> > and
> > provide typed accessors:
> >
> >
>
>
http://struts.apache.org/2.x/struts2-core/apidocs/com/opensymphony/xwork2/ModelDriven.html
> >
>
>
http://struts.apache.org/2.x/struts2-core/apidocs/com/opensymphony/xwork2/interceptor/ScopedModelDriven.html
> >
> > d.
> >
> >
> >
> >
> >
>
>

> > Don't get soaked.  Take a quick peek at the forecast
> > with the Yahoo! Search weather shortcut.
> > http://tools.search.yahoo.com/shortcuts/#loc_weather
> >
> >
> -
> > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> >
> >
>
>
>
>
>
>
____
> Don't get soaked.  Take a quick peek at the forecast
> with the Yahoo! Search weather shortcut.
> http://tools.search.yahoo.com/shortcuts/#loc_weather
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>





--
Sincerely,

Harring Figueiredo
Sr. Software Engineer
Email: [EMAIL PROTECTED]
Telephone: 941-256-0600

"We never become truly spiritual by sitting down and wishing to become so.
You must undertake something so great that you cannot accomplish it
unaided."


Re: S2 life cycle

2007-04-03 Thread Harring Figueiredo

Tom,

In S2, the ActionForm is the Atcion itself. In other words, whatever you
achieved with Action form you now achieve with the Action itself (And
potentially a POJO).
Maybe an example will help.

class MyA extents ActionSupport{
private String foo;
private String bar;

... execute ()...{

}

/** These methods will be called automagically (introspection) by the
framework, _AS LONG_ as the param matches the
names of your peroperties (foo will be set by calling setFoo(), the same for
barr)
**/
public void setFoo(String paraFoo){
..
}
public void setBar(String paramBar)
..
}


Now, with the class above, you can have a HTML form with the "foo"and "bar"
fields.



If you what to use a complete separate POJO (for re-usability or other
purpose) you can:

clas myFooBar{
  filed pars  (foo, bar)
 setters and getters
}

class MyA extents ActionSupport{
 private myFooBar fooBar;

 public String execute(){}

}


Now, in the HTML page, you have to say name the param myFooBar.foo and
myFooBar.bar

Regards,
Harring
Hope this helps.

Harring
On 4/3/07, tom tom <[EMAIL PROTECTED]> wrote:


Hi All,

What is the life cyle of S2 with regard to
ActionForms,Actions etc

Because S1 got the life cycle where it executes
ActionForm validate method and if success only it goes
to the Action Class.

How this life cycle is addressed in S2, Won't there
any Action form and also validate method's in S2.

If someone wants to have attributes in a seperate bean
instead of the Action class, what is the mechanism.
(How S1 ActionForm is addressed in S2)

in S1 we had the ability to keep forms in any scope
e.g request or session,

In S2 how can this be achieved.?

Is there any documentation written with regard to
this,


Thanks,








Don't pick lemons.
See all the new 2007 cars at Yahoo! Autos.
http://autos.yahoo.com/new_cars.html

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





--
Sincerely,

Harring Figueiredo
Sr. Software Engineer
Email: [EMAIL PROTECTED]
Telephone: 941-256-0600

"We never become truly spiritual by sitting down and wishing to become so.
You must undertake something so great that you cannot accomplish it
unaided."


Re: S2: Use of s:if tag

2007-04-02 Thread Harring Figueiredo

Tom,

Thanks for the reply. I got it working. But in your example, I think you
have a typo (unbalanced } )


   ^
I bet you meant


Thank you again.

Harring


Both way works.

On 4/2/07, tom tom <[EMAIL PROTECTED]> wrote:


I normally use this,



no complications, did you try above

Thanks

--- Harring Figueiredo <[EMAIL PROTECTED]> wrote:

> Mark,
>
> Thank you very much for the reply.
>
> I did slightly different and it works.
>
> 
>
> Thanks again.  I think it would be helpful to place
> something like this on
> the doc pages. I will see if I can get the right to
> edit the wiki pages.
>
> Harring.
>
> On 4/2/07, Mark Menard <[EMAIL PROTECTED]> wrote:
> >
> > On 4/2/07 4:48 PM, "Harring Figueiredo"
> <[EMAIL PROTECTED]> wrote:
> >
> > > 
> >
> > Try 
> >
> >
>
-
> > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > For additional commands, e-mail:
> [EMAIL PROTECTED]
> >
> >
>
>
> --
> Sincerely,
>
> Harring Figueiredo
> Sr. Software Engineer
> Email: [EMAIL PROTECTED]
> Telephone: 941-256-0600
>
> "We never become truly spiritual by sitting down and
> wishing to become so.
> You must undertake something so great that you
> cannot accomplish it
> unaided."
>






Food fight? Enjoy some healthy debate
in the Yahoo! Answers Food & Drink Q&A.
http://answers.yahoo.com/dir/?link=list&sid=396545367

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





--
Sincerely,

Harring Figueiredo
Sr. Software Engineer
Email: [EMAIL PROTECTED]
Telephone: 941-256-0600

"We never become truly spiritual by sitting down and wishing to become so.
You must undertake something so great that you cannot accomplish it
unaided."


Re: S2: Use of s:if tag

2007-04-02 Thread Harring Figueiredo

Mark,

Thank you very much for the reply.

I did slightly different and it works.



Thanks again.  I think it would be helpful to place something like this on
the doc pages. I will see if I can get the right to edit the wiki pages.

Harring.

On 4/2/07, Mark Menard <[EMAIL PROTECTED]> wrote:


On 4/2/07 4:48 PM, "Harring Figueiredo" <[EMAIL PROTECTED]> wrote:

> 

Try 

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





--
Sincerely,

Harring Figueiredo
Sr. Software Engineer
Email: [EMAIL PROTECTED]
Telephone: 941-256-0600

"We never become truly spiritual by sitting down and wishing to become so.
You must undertake something so great that you cannot accomplish it
unaided."


S2: Use of s:if tag

2007-04-02 Thread Harring Figueiredo

Hi Folks,

What is the proper syntax for the tag(the example on
http://struts.apache.org/2.0.6/docs/if.html does not really tell how to get
a object from the session map and test for values.

I have an object on the session map, and I can acess with


However, when I test with





The test passes, when inf fact name is not NULL. I am sure I am now
referencing the variable the correct way.


Thank you for the help.

hff


[S2] Infinite Recursion Detected error

2007-03-28 Thread Harring Figueiredo

Folks,

I am getting the following error:

Infinite recursion detected: [//connect!execute, //conf, //conf] -
[unknown location]

com.opensymphony.xwork2.ActionChainResult.execute(ActionChainResult.java:207)

com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:343)

com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)


The action set up is as follow:




   conf

   


   get_status
   get_role
   
   



   Home.jsp
   


   Home.jsp
   
   

Any help appreciated.

Hf
--


Re: [S2 Tip] Use namespaces to organize your application into logical "modules"

2007-03-23 Thread Harring Figueiredo

Ted,

Thank you so much for sending this out. I was wandering what was the
difference between namespace and package. I guess this explain well.

Thanks !

hff

On 3/23/07, Ted Husted <[EMAIL PROTECTED]> wrote:


Many Struts applications contain hundreds of pages. To help organize
large applications, the Struts configuration is designed around the
notions of "packages" and "namespaces". Each package can set its own
defaults, including a namespace setting.





/example/HelloWorld.jsp






Use the namespace attribute to create logical modules or units of work
within an application, each with its own identifying prefix. In an
accounting application, the actions relating to "payables" might be in
one namespace, and actions relating to "receivables" in another.

Namespaces avoid conflicts between action names. Each namespace can
have it's own "menu" or "help" action, each with its own
implementation. While the prefix appears in the browser URI, the tags
are "namespace aware", so the namespace prefix does not need to be
embedded in forms and links.

-HTH, Ted


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




Re: Class path basic question and FileInputStream

2007-03-20 Thread Harring Figueiredo

Larry:

When you ran the webapp, the container has a _different_ view of the file
system. The "root" of the file system for the web application will the root
of your web app.

The class path you are describing plays no role in finding the
program.xmlfile when you try to open a file the way you are doing.

If you want the classpath to play a role on how to find your file, take a
look at:
http://java.sun.com/j2se/1.5.0/docs/api/
java.util
Class ResourceBundle
Hopes this helps.
hff

On 3/20/07, Zhang, Larry (L.) <[EMAIL PROTECTED]> wrote:


I have a program.xml file phycially located in a directory in my web
project class path in WSAD,then in my jsp I am trying to read this file,
I got an error saying the file is not found. Why? When creating File
file = new File("program.xml"); on earth, which directory does JVM tries
to find out the file? Thanks.

P.S. JSP:

<[EMAIL PROTECTED] language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<[EMAIL PROTECTED] import="java.io.File,java.io.FileInputStream"%>
Hello world.
<%
File file = new File("program.xml");
// JVM will fine out the file in the build directory instead of
from the class path
FileInputStream fis=new FileInputStream(file);
byte b[]=new byte[fis.available()];
fis.read(b);
String s = new String(b);
StringBuffer data = new StringBuffer(s);
System.out.println("Data:\n " + data.toString() + "\n");
%>

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





--
Sincerely,

Harring Figueiredo
Sr. Software Engineer
Email: [EMAIL PROTECTED]
Telephone: 941-256-0600

"We never become truly spiritual by sitting down and wishing to become so.
You must undertake something so great that you cannot accomplish it
unaided."


Re: [BEER] Ruby Roundup (was Is there a mailing list for S2 only?)

2007-03-20 Thread Harring Figueiredo

If you need the following on your project:

1) SOP (Service Oriented Programming)
2) SaaS (Software as a Service)
3) IoC pattern
4) and XML coding with logic

I would not recommend http://www2.sqlonrails.org/ yet,  UNLESS you are
willing to wait for the next version as they claim all of these and more
will be available.

hf

On 3/20/07, Ted Husted <[EMAIL PROTECTED]> wrote:


Should have saved that one for April 1 :)

On 3/20/07, Larry Meadors <[EMAIL PROTECTED]> wrote:
> Forget Ruby, use SQL On Rails.
>
> http://www2.sqlonrails.org/
>
> Larry

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





--
Sincerely,

Harring Figueiredo
Sr. Software Engineer
Email: [EMAIL PROTECTED]
Telephone: 941-256-0600

"We never become truly spiritual by sitting down and wishing to become so.
You must undertake something so great that you cannot accomplish it
unaided."


Re: A suggestion for struts.xml!

2007-03-20 Thread Harring Figueiredo

Even though I would like to have something like this for CLASSPATH in say,
ant scripts,  I would not want something like this in configuration file for
2 reasons:

- Sercuty issues

- When it comes to error messages, struts does not really provide good
messages (I take that this is because the XML parser errors is not filtered
and interpreted ). I would hate to have a member of the development team
drop a .xml file in the config dir and break the deployment for "no" aparent
reason.

Harring

On 3/20/07, joey <[EMAIL PROTECTED]> wrote:


  I think if struts.xml 's element 'include' support wildcard,it will be
better.
For example  I have ten file to be included in struts.xml,now I have to
write
 ten times.But if it has
supported
wildcard,
I would only need write once like this .
  is it possible to support wildcard next version?I think I can deploy my
struts application
easier if so.





--
Sincerely,

Harring Figueiredo
Sr. Software Engineer
Email: [EMAIL PROTECTED]
Telephone: 941-256-0600

"We never become truly spiritual by sitting down and wishing to become so.
You must undertake something so great that you cannot accomplish it
unaided."


Re: Forward a action from one action programmatically in STruts 2.0

2007-03-16 Thread Harring Figueiredo

The way I solve this is by returning the value you want and setting up the
action chain on struts.xml file:

Example:

   class MyAction 1 .. {

   public String execute(){
 if(foo)
 return "foo";
 else
 return "bar";
  }

Then on the Strutus XML file:

  
   FooAction
   BarAction
...


 PS. Make sure you use type="chain"!
 Hope this helps.

Harring
On 3/15/07, arunkumar S <[EMAIL PROTECTED]> wrote:


Hi,

I have a requirement where in the action has to be forwarded based on
certain runtime conditions.The destination will be decided only on the
runtime.
---
if(Input = "Case1" )
forward action1
else
forward action2.
---

Basically i want to acheive a simple forward( requestdispatcher.forward()
) in
ActionClass in Struts 2.0.

How can we acheive this in Struts 2.0. I dont have any API to acheive
this.

Any inputs pls?


Regards,
Arun



Re: initialize java form bean

2007-03-14 Thread Harring Figueiredo

Try
   
   Value you want

Make sure your action has the method that match accessors for the attribute.
In the case above, you need
 public String  setNameOfAttribute(String va){
}

Hope this helps.

Harring

On 3/14/07, Lim Hock-Chai <[EMAIL PROTECTED]> wrote:


is there a way to set a property of a java form bean from
struts-config.xml?

I try to use set-property and it is not working.





--
Sincerely,

Harring Figueiredo
Sr. Software Engineer
Email: [EMAIL PROTECTED]
Telephone: 941-256-0600

"We never become truly spiritual by sitting down and wishing to become so.
You must undertake something so great that you cannot accomplish it
unaided."


[s2] How to pass param to actions from Struts.xml

2007-03-14 Thread Harring Figueiredo

Folks,

Is there a way to pass parameter to an Action using the struts.xml config
file.

1 ) I see that the  has a param attribute. How can I access its
value from within the action?

My action already implements the ParameterAwre interface. However, I am
unable to see the value on the Map provided by the setParameter() IoC call.

2) Is this the same functionality as the the Struts ActionMapping?

Thanks in advance

Harring Figueiredo