Retrieving messages from resource bundle

2004-02-17 Thread Vinicius Carvalho
Hi there! I know I can retrieve messages using the  tag. But 
I need to put it inside another third party tag, so It's not working, I 
tried to use  but did not work. Any 
other way? How do I access it using scriptlets?

Thanx

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


Struts and Chinese

2004-02-03 Thread Vinicius Carvalho
	Has anyone here used the struts to work with Chinese language? Do I need 
any special library to deal with DoubleByte Chars??

Thanks

Vinicius

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


Looping through a VO collection

2004-01-26 Thread Vinicius Carvalho
	Hi there! I have a collection of VOs in my request, I'd like to loop 
through it using the  and 
The idea is to create links for a page. But how do I access the properties 
of the VO? Let's suppose I want to build a list of links like this
How do I combine those tags to render such string:

someAction.do?name=VO.getName()&id=VO.getID();

??

Thanks

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


Re: SV: SV: Struts Actions Forms Actions - ?????????

2004-01-26 Thread Vinicius Carvalho
Well I changed my application (last time, next one I'll change framework ;P 
) to fit, and now it works, but thanks for all the help.

At 14:34 26/1/2004, you wrote:
Ok lets look at it.
You have a flow like this
 1.) Selectmodel.jsp -> 2.) listModels.do -> 3.) listmodels.jsp ->
4.)listModels.do -> 5.)listmodels.jsp  ***
Correct ?
From which point doesn't it work anymore, after number 3 ?
Are you using an action for forwarding to Selectmodel.jsp ?
If you could show me your struts-config.xml, I probably would be able to
help you much faster, because
Your flow is extremely simple and should work straight out of the box.
Anyway you must be able to find some log information somewhere.
Cheers
-Oprindelig meddelelse-
Fra: Vinicius Carvalho [mailto:[EMAIL PROTECTED]
Sendt: 26. januar 2004 17:21
Til: Struts Users Mailing List
Emne: Re: SV: Struts Actions Forms Actions - ?
Sorry, I don't think you understood my question.
The problem is not within th 
but  which action is the same that the  on the
other
page will use.
Got it?


| Selectmodel.jsp | -- calls an action (listModels.do) via link -->
forwards to |listmodels.jsp| -- calls an action (listModels.do) via
submit
--> forwards to listmodels.jsp
Got it?





At 14:21 26/1/2004, you wrote:
>Are you using a and are you sure that you are mapping the action to the correct action
>in the  Did you implement the token check and
>forgot about it, so that you actually are getting double form submit
>exceptions ?
>
>I have once had the problem that we implement a token test on form
>submits to catch client double submits, well that's great when you
>update data but when you just view data it's not needed! Cheers
>Tommy
>
>-Oprindelig meddelelse-
>Fra: Vinicius Carvalho [mailto:[EMAIL PROTECTED]
>Sendt: 26. januar 2004 17:07
>Til: [EMAIL PROTECTED]
>Emne: Struts Actions Forms Actions - ?
>
>
> Well, sometimes I wonder if struts is really the best
>framework to use in our application scope, it brought so many problems
>then solutions...
> But now I think its too late.
> Here's my problem (another one in the huge, never-ending list)
>
>I need to call the same Action from a link and a Form, this is simple
>cuz the page rendered is the same, the diff. is that the first time
>it's called
>from a link it renders the form, and a list of default attributes, when
>the
>user submits the form (actually just change a select object) the list
is
>
>changed (the select acts like a filter). Well, problem is its not
>working.
>
>when the user clicks on the link, it fowards to the default error page,
>trying to debug, I've noticed that the controller never gets to the
>desired action (probably cuz the form class, can not get the getter and
>setter for
>its properties, cuz in the first call, the form does not exists yet).
So
>
>what can I do to solve this? If at least the controller where getting
>to
>
>the desired action, but it redirects the user before that.
>
>Thanks
>
>Vinicius
>
>
>-
>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: SV: Struts Actions Forms Actions - ?????????

2004-01-26 Thread Vinicius Carvalho
Sorry, I don't think you understood my question.
The problem is not within th 
but  which action is the same that the  on the other 
page will use.
Got it?



| Selectmodel.jsp | -- calls an action (listModels.do) via link --> 
forwards to |listmodels.jsp| -- calls an action (listModels.do) via submit 
--> forwards to listmodels.jsp

Got it?





At 14:21 26/1/2004, you wrote:
Are you using a 
Did you implement the token check and forgot about it, so that you
actually are getting double form submit exceptions ?
I have once had the problem that we implement a token test on form
submits to catch client double submits, well that's great when you
update data but when you just view data it's not needed!
Cheers
Tommy
-Oprindelig meddelelse-
Fra: Vinicius Carvalho [mailto:[EMAIL PROTECTED]
Sendt: 26. januar 2004 17:07
Til: [EMAIL PROTECTED]
Emne: Struts Actions Forms Actions - ?
Well, sometimes I wonder if struts is really the best framework
to use in
our application scope, it brought so many problems then solutions...
But now I think its too late.
Here's my problem (another one in the huge, never-ending list)
I need to call the same Action from a link and a Form, this is simple
cuz
the page rendered is the same, the diff. is that the first time it's
called
from a link it renders the form, and a list of default attributes, when
the
user submits the form (actually just change a select object) the list is
changed (the select acts like a filter). Well, problem is its not
working.
when the user clicks on the link, it fowards to the default error page,
trying to debug, I've noticed that the controller never gets to the
desired
action (probably cuz the form class, can not get the getter and setter
for
its properties, cuz in the first call, the form does not exists yet). So
what can I do to solve this? If at least the controller where getting to

the desired action, but it redirects the user before that.

Thanks

Vinicius

-
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 Actions Forms Actions - ?????????

2004-01-26 Thread Vinicius Carvalho
	Well, sometimes I wonder if struts is really the best framework to use in 
our application scope, it brought so many problems then solutions...
	But now I think its too late.
	Here's my problem (another one in the huge, never-ending list)

I need to call the same Action from a link and a Form, this is simple cuz 
the page rendered is the same, the diff. is that the first time it's called 
from a link it renders the form, and a list of default attributes, when the 
user submits the form (actually just change a select object) the list is 
changed (the select acts like a filter). Well, problem is its not working.

when the user clicks on the link, it fowards to the default error page, 
trying to debug, I've noticed that the controller never gets to the desired 
action (probably cuz the form class, can not get the getter and setter for 
its properties, cuz in the first call, the form does not exists yet). So 
what can I do to solve this? If at least the controller where getting to 
the desired action, but it redirects the user before that.

Thanks

Vinicius

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


session control

2004-01-26 Thread Vinicius Carvalho
Hi there! I was wondering of how to keep my session clean, I mean, don't 
overload it with a lot of objects. Sometimes I need to register some 
objects in the session scope for a certain group of pages in my 
application, after the client leaves that (could be an item of a menu for 
example), I'd like to destroy every session registred that I won't use in 
my application. I was thinking if is there any Pattern for this? I first 
though in using a filter to check in a associative array, to verify 
whenever the session objects are needed in the current path.
Any suggestions for this?

Thnx

Vinicius 

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


RE: retreiving the labelProperty of an option tag

2004-01-23 Thread Vinicius Carvalho
Thax, I'll try the javascript approach, cuz the collection gets lost, it's 
visible only on request scope for that page, performance issues ;)
But thanks for the hint ;)

At 11:17 23/1/2004, you wrote:
That's correct, the form is only going to submit the value not the label for
the option.  You might use javascript to populate a hidden field with the
label so it gets submitted, if you really wanted to, but it would be much
easier to just look up the label in your action using the value you received
in the form and the collection that populated the list.
-Rob

-Original Message-
From: Vinicius Carvalho [mailto:[EMAIL PROTECTED]
Sent: Friday, January 23, 2004 7:30 AM
To: [EMAIL PROTECTED]
Subject: retreiving the labelProperty of an option tag
Hi there! I have a code to render a select/option that looks like this :

labelProperty="objDescription"/> In my form I have the getter for this, 
that returns the code for the desired Objective. So in my action, when I 
fill the VO, I add the code by: ModelVO.setObjective(form.getObjective()); 
Ok, so far so good. But how do I get the labelProperty for this objective? 
Once my form gets only the property  Thanks Vinicius 
- 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]


retreiving the labelProperty of an option tag

2004-01-23 Thread Vinicius Carvalho
Hi there! I have a code to render a select/option that looks like this :



In my form I have the getter for this, that returns the code for the 
desired Objective.
So in my action, when I fill the VO, I add the code by:
ModelVO.setObjective(form.getObjective());

Ok, so far so good. But how do I get the labelProperty for this objective? 
Once my form gets only the property 

Thanks

Vinicius 

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


Unit Test in struts

2004-01-21 Thread Vinicius Carvalho
	Hi there! I've heard about a tool (like JUnit) but especific to be used 
with struts, where I can test my actions, forms and jsp pages, problem is 
... I cant rememeber the name, does anyone knows about it?

thnx

Vinicius

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


Chart generation Framework

2004-01-20 Thread Vinicius Carvalho
Hi there! Does anyone here uses a chart Framework? I've heard about Cewolf, 
seems to be nice, any suggestions on this?

Thanks

Vinicius

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


Re: Presenting Errors and messages

2004-01-19 Thread Vinicius Carvalho
Couldn't see your technique 

At 11:05 19/1/2004, you wrote:
Hello Vinicius,

Monday, January 19, 2004, 11:29:19 AM, you wrote:

VC> Hi there! Is there another way to present the messages or erros dropped by
VC> ActionMessages/ActionErrors, besides the
VC> / ?
VC> Like a ? If so, what's the name of the bean?
VC> Thanks

VC> Vinicius

Sure there is another way to present errors instead of using the
tag (which is quiet annoying in terms of design). For example I'm using a 
subscription page holding different sections. Therefore I wanted to 
extract errors according to the form bean properties relative to each 
section. I've been using this technique:
   * ..
with this technique, I can extract errors for each property and also 
control de presentation. It's working fine for me (I'm using the CVS 
version of Struts). I hope this will help you. Cheers, Foux 
- 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]


Presenting Errors and messages

2004-01-19 Thread Vinicius Carvalho
Hi there! Is there another way to present the messages or erros dropped by 
ActionMessages/ActionErrors, besides the / ?
Like a ? If so, what's the name of the bean?

Thanks

Vinicius

	

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


html:errors breakline (version 2)

2004-01-16 Thread Vinicius Carvalho
Sorry all! Eudora simply killed my text, sorry, heres the full version

Hi there! I have a page that renders all my erros, called errors.jsp 
(duh!). What I'm trying to do is if the user's session has expired, I'll 
forward him using a javascript, after an alert: Here's how my code looks like:


function sessionExpired(){
alert("");
top.frames.location="index.jsp";
}
function refreshScreen() {

}

Now, let's suppose the session has expired: the code displays this:


function sessionExpired(){
alert("
Session expired! Please login again!

");
top.frames.location="index.jsp";
}
function refreshScreen() {

sessionExpired();


} As you can see, errors property sessionExpiredFunction writes the function to be called. and the errosExpiredString, the warning string. Problem is, I have a new line, before and after it, invalidating my alert() method. Any way to solve this? Or maybe a better solution for the problem? Thanks Vinicius - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

html:errors break line

2004-01-16 Thread Vinicius Carvalho
Hi there! I have a page that renders all my erros, called 
errors.jsp (duh!). What I'm trying to do is if the user's session has 
expired, I'll forward him using a javascript, after an alert: Here's how my 
code looks like:


function sessionExpired(){
alert("");
top.frames.location="index.jsp";
}
function refreshScreen() {

}

Now, let's suppose the session has expired: the code displays this:


function sessionExpired(){
alert("
Session expired! Please login again!

");
top.frames.location="index.jsp";
}
function refreshScreen() {

sessionExpired();


} As you can see, errors property sessionExpiredFunction writes the function to be called. and the errosExpiredString, the warning string. Problem is, I have a new line, before and after it, invalidating my alert() method. Any way to solve this? Or maybe a better solution for the problem? Thanks Vinicius - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: SV: Struts and Action errors

2004-01-15 Thread Vinicius Carvalho
Ok, I got it. But what about the other questions? if I'm in a ActionForm, 
or a requestprocessor ...
At 10:18 15/1/2004, you wrote:
Hi there

Use the saveErrors method in Action, before forwarding to jsp.

Med venlig hilsen

Claus Weng Madsen, Teamleder
TELMORE A/S
Carl Gustavsgade 3, 2630 Taastrup
Telefon 70218700, Mobil 30242875
www.telmore.dk
-Oprindelig meddelelse-
Fra: Vinicius Carvalho [mailto:[EMAIL PROTECTED]
Sendt: 15. januar 2004 12:24
Til: [EMAIL PROTECTED]
Emne: Struts and Action errors
Hi there! I'm a newbie to Struts, and this question may be a
little silly,
sorry.
How exactly do I use action errors? How do I render them? In my
app, I
control the session via RequestProcessor using processPreProcess method.
If
the session is invalid, I create a new error using
ActionErrors errors = new ActionErrors(); errors.add("sessionExpired",
new ActionError("errors.sessionExpired");
Well, and then I redirect the user to the desired login page, and there
I have
But nothing is shown. Also, in my actionForms, in the validate method, I 
add errors using the same syntax and none are shown either. In the Actions 
classes, the examples created by Websphere, I see that everytime those 
actionErrors are saved using a method called saveErrors, but this method 
is not static and belongs to Action class, the other modules does not 
access it. Any help? Thanks 
- 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 and Action errors

2004-01-15 Thread Vinicius Carvalho
	Hi there! I'm a newbie to Struts, and this question may be a little silly, 
sorry.
	How exactly do I use action errors? How do I render them? In my app, I 
control the session via RequestProcessor using processPreProcess method. If 
the session is invalid, I create a new error using
ActionErrors errors = new ActionErrors();
errors.add("sessionExpired",  new ActionError("errors.sessionExpired");

Well, and then I redirect the user to the desired login page, and there I have



But nothing is shown. Also, in my actionForms, in the validate method, I 
add errors using the same syntax and none are shown either.
In the Actions classes, the examples created by Websphere, I see that 
everytime those actionErrors are saved using a method called saveErrors, 
but this method is not static and belongs to Action class, the other 
modules does not access it.

Any help?

Thanks

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


Struts and iframes

2004-01-14 Thread Vinicius Carvalho
Hi there! In our project, at a certain point, we have a table with a form 
in a td, which target is a iframe, code looks like this:



Well, it works fine, almost! The action forwards to the viewModel.jsp, 
which is rendered in the main window. The problem is, when an error is 
captured by the validate() method of the BuildModelForm.java, it returns to 
the page with the forms, but now in the wrong window. So I end up with 2 
forms in my window. Is it possible to solve this? I don't know, maybe by 
changing the target attribute of the request(response??) when an error occurs.

And, BTW, In that jsp, I use this:



In my BuildModelForm, inside the validate model, I have something like this:
if(getDate().length() < 1 || getDate() == null){
errors.add("date",new ActionError("errors.date.required"));
}
and although I have configured the resources bundle, no message is 
displayed, when user lefts it blank (even though it is displayed in the 
wrong window). 

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