Re: reset the value of a datetimepicker using java script

2007-05-03 Thread kris16

Hi,
it works fine. Thanks :-)
/Regards Krister


Musachy Barroso wrote:
 
 dojo.widget.byId(dp0).inputNode.value = ;
 
 Use at your own risk, you are using Dojo internals there :)
 
 musachy
 
 On 5/2/07, kris16 [EMAIL PROTECTED] wrote:


 Hi Musachy,
 yes that works thanks. But i do not want to set the value to new Date().
 I want to set i to , or erase the text field from the date so to say.
 Is that possible ?
 /Krister



 Musachy Barroso wrote:
 
  You need to call the setDate(date) method on the *widget* for the
  datepicker, assuming you have a datepicker with the id dp0:
 
  dojo.widget.byId(dp0) .setDate(new Date());
 
  musachy
 
  On 5/2/07, kris16 [EMAIL PROTECTED] wrote:
 
 
  Hi, I am trying to reset the value of a datetimepicker in a jsp page
  using
  struts2 (2.0.6).
 
  I can not reset the value.
 
  See code below.
  The onchange and the call to the Java script function
 (planStatuschanged
  )
  seems to work, but the datetimepicker's value is not set to . If I
 use
  an
  ordinary input tag (input ...) instead of a datetimepicker it works.
 
  I have tried the dojo.widget.byId(statusDateId).setDate() method
  instead
  of :
  formObj.statusDateId.value=;
 
  But that do not work either.
  What am I doing wrong ?
 
 
 
 
  s:select onchange=planStatuschanged(document.formular) ...
  ...
  ...
  id=planStatus/
 
  s:datetimepicker id=statusDateId name=statusDate
  label=Planeringsdatum/
 
 
  function planStatuschanged (formObj) {
  if (formObj.planStatus.options[formObj.planStatus.selectedIndex].value
 ==
  4) {
  formObj.statusDateId.value=;
}
 
  }
  --
  View this message in context:
 
 http://www.nabble.com/reset-the-value-of-a-datetimepicker-using-java-script-tf3680879.html#a10286861
  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
 
 

 --
 View this message in context:
 http://www.nabble.com/reset-the-value-of-a-datetimepicker-using-java-script-tf3680879.html#a10289469
 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
 
 

-- 
View this message in context: 
http://www.nabble.com/reset-the-value-of-a-datetimepicker-using-java-script-tf3680879.html#a10299471
Sent from the Struts - User mailing list archive at Nabble.com.


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



displaying sesion values

2007-05-03 Thread jalal udeen

Hi Sir,


 Im a  beginner in Struts  i have to display the session
value in jsp how can i display that using a struts tag.
i have set session values in action as
session.setAttribute(candidatename,jalal);
i have to display this how can i do this
pls give me the tips for this,


thanks
jalaludeen.h


[S2] s:form tag problems

2007-05-03 Thread Roger Varley

I'm sorry to keep harping on about this but some of the attributes of
the s:form tag used in a .jsp do not render in the output HTML.
Examples are

s:form id=form method=post action=EditOrderUsingSession  disable=true
s:form id=form method=post action=EditOrderUsingSession
onclick=alert('Form')

In both cases, neither the disable or onclick attributes appear in the
rendered HTML

If I've misunderstood the use of the tag or haven't RTFM'd the right
documentation please tell me. If it's a bug, and someone would point
me in the right direction I'll have a stab at fixing it myself. This
is something I need to either get working or start a re-design.

Regards
Roger

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



Flash scope in Struts 2?

2007-05-03 Thread mraible

Does Struts 2 have support for a flash scope - where messages can be easily
stuffed into this scope so they live through a redirect?

Thanks,

Matt
-- 
View this message in context: 
http://www.nabble.com/Flash-scope-in-Struts-2--tf3685114.html#a10300567
Sent from the Struts - User mailing list archive at Nabble.com.


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



Tag library question

2007-05-03 Thread vikas rao

Hi guys,
I have a question regarding the tag libraries which i need to place in the
WEB-INF/tlds folder...Where do i get this .tld file?
I tried to unzip the struts-taglib-1.3.8 file and searched for the .tld
file but i couldnt find it.
Also,
if i include :
%@ taglib prefix=html uri=http://struts.apache.org/tags-html; %

at the top of my .jsp  page, would i still need to have .tld files in my
WEB-INF/tlds folder??

sorry if my question is stupid...i guess there are no dumb questions, only
dumb people who ask them :).
thanx for any help.
vikas.


CRUD with checkboxs

2007-05-03 Thread David Harland
Hi,

What is the recommended approach to having a list of employees as with
the CRUD examples but with each having a checkbox so that when the whole
form is posted you can update each of the employees that have been
selected... 

Thanks

Dave.

__
Ufi Limited 
Registered in England No.  3980770 
Registered Office:  Dearing House, 1 Young Street, Sheffield, S1 4UP 

learndirect Solutions Ltd 
Registered in England No. 5081669 
Registered Office:  Dearing House, 1 Young Street, Sheffield, S1 4UP 

UFI Charitable Trust 
Registered in England No.  3658378 
Registered Charity No.  1081028 
Registered Office:  Dearing House, 1 Young Street, Sheffield, S1 4UP 

This email has been scanned by the MessageLabs Email Security System.

__

Re: Tag library question

2007-05-03 Thread Nuwan Chandrasoma

Hi,

If you using a servlet 2.5 or later container no need to have them, they are 
included with the struts jars, just add the taglib def in your jsp files.


Thanks,

Nuwan


- Original Message - 
From: vikas rao [EMAIL PROTECTED]

To: Struts Users Mailing List user@struts.apache.org
Sent: Thursday, May 03, 2007 8:31 AM
Subject: Tag library question



Hi guys,
I have a question regarding the tag libraries which i need to place in the
WEB-INF/tlds folder...Where do i get this .tld file?
I tried to unzip the struts-taglib-1.3.8 file and searched for the .tld
file but i couldnt find it.
Also,
if i include :
%@ taglib prefix=html uri=http://struts.apache.org/tags-html; %

at the top of my .jsp  page, would i still need to have .tld files in my
WEB-INF/tlds folder??

sorry if my question is stupid...i guess there are no dumb questions, only
dumb people who ask them :).
thanx for any help.
vikas.




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



[S2] Tree lazy loading

2007-05-03 Thread Petit Pas De Lune

Hello.

Is it possible (and  how) to have lazy loading with s:tree tag?
Just want to load subtree when user expand a node.

Thanks.

PPDL


Re: Tag library question

2007-05-03 Thread vikas rao

Servlet 2.5 container? i am using tomcat version 6 as the server, and i'm
thinking thats what you are implying??
In this case, i'd just need to include:
%@ taglib prefix=html uri=http://struts.apache.org/tags


-html %



in my jsp file and have nothnig in my tlds folder??



On 5/3/07, Nuwan Chandrasoma [EMAIL PROTECTED] wrote:


Hi,

If you using a servlet 2.5 or later container no need to have them, they
are
included with the struts jars, just add the taglib def in your jsp files.

Thanks,

Nuwan


- Original Message -
From: vikas rao [EMAIL PROTECTED]
To: Struts Users Mailing List user@struts.apache.org
Sent: Thursday, May 03, 2007 8:31 AM
Subject: Tag library question


 Hi guys,
 I have a question regarding the tag libraries which i need to place in
the
 WEB-INF/tlds folder...Where do i get this .tld file?
 I tried to unzip the struts-taglib-1.3.8 file and searched for the
.tld
 file but i couldnt find it.
 Also,
 if i include :
 %@ taglib prefix=html uri=http://struts.apache.org/tags-html; %

 at the top of my .jsp  page, would i still need to have .tld files in
my
 WEB-INF/tlds folder??

 sorry if my question is stupid...i guess there are no dumb questions,
only
 dumb people who ask them :).
 thanx for any help.
 vikas.



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




Re: Tag library question

2007-05-03 Thread Nuwan Chandrasoma

ops.. sorry my mistake it should be servlet 2.4 or later container,

yes.. having that in your jsp is enough, if you are using struts 1.x

Thanks,

Nuwan

- Original Message - 
From: vikas rao [EMAIL PROTECTED]

To: Struts Users Mailing List user@struts.apache.org
Sent: Thursday, May 03, 2007 9:08 AM
Subject: Re: Tag library question



Servlet 2.5 container? i am using tomcat version 6 as the server, and i'm
thinking thats what you are implying??
In this case, i'd just need to include:
%@ taglib prefix=html uri=http://struts.apache.org/tags


-html %



in my jsp file and have nothnig in my tlds folder??



On 5/3/07, Nuwan Chandrasoma [EMAIL PROTECTED] wrote:


Hi,

If you using a servlet 2.5 or later container no need to have them, they
are
included with the struts jars, just add the taglib def in your jsp files.

Thanks,

Nuwan


- Original Message -
From: vikas rao [EMAIL PROTECTED]
To: Struts Users Mailing List user@struts.apache.org
Sent: Thursday, May 03, 2007 8:31 AM
Subject: Tag library question


 Hi guys,
 I have a question regarding the tag libraries which i need to place in
the
 WEB-INF/tlds folder...Where do i get this .tld file?
 I tried to unzip the struts-taglib-1.3.8 file and searched for the
.tld
 file but i couldnt find it.
 Also,
 if i include :
 %@ taglib prefix=html uri=http://struts.apache.org/tags-html; %

 at the top of my .jsp  page, would i still need to have .tld files in
my
 WEB-INF/tlds folder??

 sorry if my question is stupid...i guess there are no dumb questions,
only
 dumb people who ask them :).
 thanx for any help.
 vikas.



-
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: displaying sesion values

2007-05-03 Thread Nuwan Chandrasoma


http://struts.apache.org/1.2.9/userGuide/struts-bean.html#write

- Original Message - 
From: jalal udeen [EMAIL PROTECTED]

To: user@struts.apache.org
Sent: Thursday, May 03, 2007 7:30 AM
Subject: displaying sesion values



Hi Sir,


 Im a  beginner in Struts  i have to display the session
value in jsp how can i display that using a struts tag.
i have set session values in action as
session.setAttribute(candidatename,jalal);
i have to display this how can i do this
pls give me the tips for this,


thanks
jalaludeen.h



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



ValidatorException: No ValidatorAction named required found for field fieldname

2007-05-03 Thread Sandra Reichert
Hi,

Our web application offers two ways for data input.
The first way is an html from. Here the user can enter record by record.
Validation works fine.
The second way is to import data from a .cvs file. I want to use the
same validation.xml file for the validation of these data.

But this Exception occurs:
org.apache.commons.validator.ValidatorException: No ValidatorAction
named required found for field fieldname
at 
org.apache.commons.validator.Field.handleMissingAction(Field.java:867)
at org.apache.commons.validator.Field.validate(Field.java:843)
at org.apache.commons.validator.Form.validate(Form.java:290)
at org.apache.commons.validator.Validator.validate(Validator.java:354)


Abstract from UploadAction:
//--
InputStream in =
this.getClass().getResourceAsStream(validation.xml);  
ValidatorResources resources = new ValidatorResources(in);
// 
Construct validator based on the loaded
// resources and the form key

Validator validator = new Validator(resources, GeneForm);
// add 
the name bean to the validator as a  // 
resource for
the validations to be performed on.

validator.setParameter(Validator.BEAN_PARAM, importGene);   
// Get 
results of the validation.
ValidatorResults results = null;
results = validator.validate(); // here the exception occurs
//--

Whats`s my mistake?

Thanks a lot
Sandra



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



Re: Struts 2.0.6 with Tomcat 6.0

2007-05-03 Thread Zoran Avtarovski
None at all. We're using it and haven't run into any problems.

Z.

 I am considering the use of Tomcat 6.0 which implements Servlet 2.5 and JSP
 2.1. Should I expect any issues using it with Struts 2.0.6?
 
 Regards,
 Rohit



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



TabbedPannel: So many problems.

2007-05-03 Thread Felipe Rodrigues

Hi Guys,

I'm really trying to use TabbedPannel, but it seems to have lots of problems
when you try to use in a real world WebApp.

For example, I have a TabbedPannel with 6 tabs. Each one is a remote one.
The problem here is, when the user change the tab, I need to update a
session attribute. But TabbedPannel don't have the events support (yet,
because there is an open issue for that), so I changed to refreshOnShow and
executeScripts = true.
Then I got new problems. The default tab is the first one, but struts render
all of them and obviously, execute all its scripts, including the one wich
changes the session attribute. The result is a mess, because the rendering
depends on this attribute value, wich is there only to provide a way to app
recognize what tab is selected.

Another problem is that the first tab is executed once, when everyone is
being redered, and execute again to show its content, since is the one which
will be shown to user. This approach generate lots of Widget ID colision in
the debug output.

Sometimes I wonder if these things happens only in my case, because I can't
find others threads about that in the mail-list.
I'm waitting some answers to make a decision about keep tabbedPannel or
exclude this forever (at least until this stuff be fixed).

Thanks in advance guys,

Felipe
-- 
View this message in context: 
http://www.nabble.com/TabbedPannel%3A-So-many-problems.-tf3686055.html#a10303545
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: [S2] Tree lazy loading

2007-05-03 Thread Musachy Barroso

Did you take a look at showcase? I think there is an example there.

musachy

On 5/3/07, Petit Pas De Lune [EMAIL PROTECTED] wrote:


Hello.

Is it possible (and  how) to have lazy loading with s:tree tag?
Just want to load subtree when user expand a node.

Thanks.

PPDL





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


Re: Struts 2.0.6 with Tomcat 6.0

2007-05-03 Thread Musachy Barroso

I'm using it also. No problems so far.

musachy

On 5/3/07, Zoran Avtarovski [EMAIL PROTECTED] wrote:


None at all. We're using it and haven't run into any problems.

Z.

 I am considering the use of Tomcat 6.0 which implements Servlet 2.5 and
JSP
 2.1. Should I expect any issues using it with Struts 2.0.6?

 Regards,
 Rohit



-
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] Tree lazy loading

2007-05-03 Thread Petit Pas De Lune

On 5/3/07, Musachy Barroso [EMAIL PROTECTED] wrote:


Did you take a look at showcase? I think there is an example there.

musachy



Yes I did.
But in the dynamic tree example, tree is loaded as a whole thing.
I'm trying to implement a dynamic tree where only the subtree
first level is loaded when user expands a node.

PPDL.


Good JScript lib for disabling browser toolbars and good integration with Struts?

2007-05-03 Thread Peter Neu
Hello,

does somebody know a good Java Script library which disables browser tool- 
navigations bars and right mouse clicks for browser windows? I need a
browser window for my app stripped of all basic browser components. 

Best way would be if Struts could already load the java script before the
user sees the first page.


Cheers,
Pete 




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



Re: TabbedPannel: So many problems.

2007-05-03 Thread Musachy Barroso

The first tab is the default one, but you can change that using the
selectedTab in the tabbedPanel tag. Dynamic tabs load their content
automatically, this was mentioned on another thread and was fixed in
WW-1860, adding a preload (defaults to true) attribute to the div tag.
Bear in mind the ajax theme is experimental, so feel free to log jira
tickets for any problem you find and we'll try to fix them for 2.1 (big ajax
overhaul). Thanks for flying with struts ajax theme :)

regards
musachy

On 5/3/07, Felipe Rodrigues [EMAIL PROTECTED] wrote:



Hi Guys,

I'm really trying to use TabbedPannel, but it seems to have lots of
problems
when you try to use in a real world WebApp.

For example, I have a TabbedPannel with 6 tabs. Each one is a remote one.
The problem here is, when the user change the tab, I need to update a
session attribute. But TabbedPannel don't have the events support (yet,
because there is an open issue for that), so I changed to refreshOnShow
and
executeScripts = true.
Then I got new problems. The default tab is the first one, but struts
render
all of them and obviously, execute all its scripts, including the one wich
changes the session attribute. The result is a mess, because the rendering
depends on this attribute value, wich is there only to provide a way to
app
recognize what tab is selected.

Another problem is that the first tab is executed once, when everyone is
being redered, and execute again to show its content, since is the one
which
will be shown to user. This approach generate lots of Widget ID colision
in
the debug output.

Sometimes I wonder if these things happens only in my case, because I
can't
find others threads about that in the mail-list.
I'm waitting some answers to make a decision about keep tabbedPannel or
exclude this forever (at least until this stuff be fixed).

Thanks in advance guys,

Felipe
--
View this message in context:
http://www.nabble.com/TabbedPannel%3A-So-many-problems.-tf3686055.html#a10303545
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] Tree lazy loading

2007-05-03 Thread Musachy Barroso

That dynamic. I don't think the tree supports that, although it wouldn't be
hard to implement, using the collaped topics (heads up, the notification
topics were broken in 2.0.6), and adding the nodes by hand,

http://willcode4beer.com/ware.jsp?set=dojoRpcTree

musachy

On 5/3/07, Petit Pas De Lune [EMAIL PROTECTED] wrote:


On 5/3/07, Musachy Barroso [EMAIL PROTECTED] wrote:

 Did you take a look at showcase? I think there is an example there.

 musachy


Yes I did.
But in the dynamic tree example, tree is loaded as a whole thing.
I'm trying to implement a dynamic tree where only the subtree
first level is loaded when user expands a node.

PPDL.





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


CSS styles for Table Tags

2007-05-03 Thread Olivier THIERRY

Hi,

I use the Table Tags plugin, but I can't find a way to apply CSS classes to
table or thead tags generated by the plugin since there is no cssClass or
similar attribute.
Does anyone have an idea about this ?

Olivier


Displaying bean from action class

2007-05-03 Thread adambomb

Hi, I have a jsp page which displays more than one drop down lists and is
being populated from the database. Now when I click on a submit button after
selecting the values from two dropdowns. it should go and search in the
table and retrieve a collection of rows of that table(based on the values of
two columns) and should display on the same page using logic:iterate. When
I hit 'submit' button, the form bean is populated and validation is done.
After that it goes in the action class and I have : 


if(MyBeanForm.getAction().equalsIgnoreCase(submit))
{
try{
MyFormObject.getResults().size();
return mapping.findforward(success);
}
}
AND the FormBean is like:
public Collection getResults()
{
Session sess=HibernateUtils.getSessionFactory().openSession();
List list=sess.createQuery(Select ds from MyTable ds where ds.firstfield =
+formfirstfield + and ds.secondfield= +formsecondfield).list();
sess.close();
return list;
}

Everthing uptill here is fine, but when I want to display it on the jsp
page, it doesnt seem to retain the values of the request parameters and
executes the query with formfirstfield and formsecondfield as null, and
thus results in null output. 


JSP page tag is like:
logic:iterate id=SOMEID indexId=idx name=SOMENAME property=results
type=sometype
.. ..
/logic:iterate

I think I m missing something in action class to populate the bean but Im
not sure what .


Kindly Help.

-- 
View this message in context: 
http://www.nabble.com/Displaying-bean-from-action-class-tf3686377.html#a10304615
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: Displaying bean from action class

2007-05-03 Thread Martin Gainty

Good Morning

assuming you have the bean ID used for both iterate and bean
logic:iterate ID=SOMEID
   bean:write name=SOMEID property=firstfield/
   bean:write name=SOMEID property=secondfield/
/logic:iterate

in your view assuming you have I would scope to session and not request
action path=/success name=package.yourActionForm scope=session 
type=package.YourActionClass


Keep in mind that Hibernate generates classes based on name specified in 
*.hbm.xml (and not form field designations) ..with that in mind did you 
verify the Table has data records?


HTH/
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: adambomb [EMAIL PROTECTED]

To: user@struts.apache.org
Sent: Thursday, May 03, 2007 9:27 AM
Subject: Displaying bean from action class




Hi, I have a jsp page which displays more than one drop down lists and is
being populated from the database. Now when I click on a submit button 
after

selecting the values from two dropdowns. it should go and search in the
table and retrieve a collection of rows of that table(based on the values 
of
two columns) and should display on the same page using logic:iterate. 
When

I hit 'submit' button, the form bean is populated and validation is done.
After that it goes in the action class and I have :


if(MyBeanForm.getAction().equalsIgnoreCase(submit))
{
try{
MyFormObject.getResults().size();
return mapping.findforward(success);
}
}
AND the FormBean is like:
public Collection getResults()
{
Session sess=HibernateUtils.getSessionFactory().openSession();
List list=sess.createQuery(Select ds from MyTable ds where ds.firstfield 
=

+formfirstfield + and ds.secondfield= +formsecondfield).list();
sess.close();
return list;
}

Everthing uptill here is fine, but when I want to display it on the jsp
page, it doesnt seem to retain the values of the request parameters and
executes the query with formfirstfield and formsecondfield as null, and
thus results in null output.


JSP page tag is like:
logic:iterate id=SOMEID indexId=idx name=SOMENAME 
property=results

type=sometype
.. ..
/logic:iterate

I think I m missing something in action class to populate the bean but Im
not sure what .


Kindly Help.

--
View this message in context: 
http://www.nabble.com/Displaying-bean-from-action-class-tf3686377.html#a10304615

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]



[S1] Form validation woes...

2007-05-03 Thread Dave Newton
Hey,

Working on an S1 app at the moment (shaddup, all a'
ya').

Things are set up a bit weird compared to what I'm
used to; in this case there's an action that uses an
ActionForm that isn't declared in struts-config, and
that ActionForm contains nested ActionForms.

I need to do some validaton on one of the nested
ActionForms and would prefer to put it in
validation.xml, but since neither the parent nor child
forms are declared in struts-config I'm not sure I can
do this.

My naive implementation (define the sub-form
validation in validation.xml and call
subForm.validate(mapping, request) throws an NPE from
inside ValidatorForm.validate().

I've never really even thought of doing anything this
way so I'm unfamiliar with how struts-config and
validation.xml interact (or if they do). All the forms
seem to be instantiated by hand etc. so... I'm afraid
I have to do the validation by hand (which would suck,
because there's a wad of intRanges and validwhens and
the version of validator they're using doesn't seem to
have all the standalone validation routines).

I'm just wondering if what I want to do is (reasonable
and) possible.

Thanks,
Dave


__
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: TabbedPannel: So many problems.

2007-05-03 Thread Felipe Rodrigues

Sounds good. I'm using the workaround display: none and its working as
expected.
I'm learning lots of workaround looking at templates. Each time I got any
issue, I report it, after ask here and get a proff it is really an issue.

But I think we really need a doc telling about these little things about
Ajax theme. I can help you to do that if you want to. Just let me know.

Thanks,

Felipe


Musachy Barroso wrote:
 
 The first tab is the default one, but you can change that using the
 selectedTab in the tabbedPanel tag. Dynamic tabs load their content
 automatically, this was mentioned on another thread and was fixed in
 WW-1860, adding a preload (defaults to true) attribute to the div tag.
 Bear in mind the ajax theme is experimental, so feel free to log jira
 tickets for any problem you find and we'll try to fix them for 2.1 (big
 ajax
 overhaul). Thanks for flying with struts ajax theme :)
 
 regards
 musachy
 
 On 5/3/07, Felipe Rodrigues [EMAIL PROTECTED] wrote:


 Hi Guys,

 I'm really trying to use TabbedPannel, but it seems to have lots of
 problems
 when you try to use in a real world WebApp.

 For example, I have a TabbedPannel with 6 tabs. Each one is a remote one.
 The problem here is, when the user change the tab, I need to update a
 session attribute. But TabbedPannel don't have the events support (yet,
 because there is an open issue for that), so I changed to refreshOnShow
 and
 executeScripts = true.
 Then I got new problems. The default tab is the first one, but struts
 render
 all of them and obviously, execute all its scripts, including the one
 wich
 changes the session attribute. The result is a mess, because the
 rendering
 depends on this attribute value, wich is there only to provide a way to
 app
 recognize what tab is selected.

 Another problem is that the first tab is executed once, when everyone is
 being redered, and execute again to show its content, since is the one
 which
 will be shown to user. This approach generate lots of Widget ID colision
 in
 the debug output.

 Sometimes I wonder if these things happens only in my case, because I
 can't
 find others threads about that in the mail-list.
 I'm waitting some answers to make a decision about keep tabbedPannel or
 exclude this forever (at least until this stuff be fixed).

 Thanks in advance guys,

 Felipe
 --
 View this message in context:
 http://www.nabble.com/TabbedPannel%3A-So-many-problems.-tf3686055.html#a10303545
 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
 
 

-- 
View this message in context: 
http://www.nabble.com/TabbedPannel%3A-So-many-problems.-tf3686055.html#a10305512
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: [s2] Dreamweaver plugin for Struts 2?

2007-05-03 Thread robinbajaj

Hi Jason,
When you say you have Dreamweaver plugin for Struts-1, are you talking about
the one available here ??
http://www.fwasi.com/downloads/

I am just curious to know if there are any free Struts-1 plugins available
for Dreamweaver 8 ? (or
free is just too much to ask for from the outside Eclipse world ?? :-)) 

please update..
robin

Jason Wyatt wrote:
 
 I'm hoping to use Dreamweaver for complex JSP layouts with Struts 2 tags.
 
 I have a Dreamweaver plugin for Struts 1.x but there doesn't seem to be
 one
 for Struts 2 yet.
 
 There seems to be a Dreamweaver plugin for WebWorks and was thinking the
 Struts 2 tags might be close enough to WebWorks for the Dreamwaver
 WebWorks
 plugin to render struts 2 tags in jsp pages.
 
 Has anyone tried this, or have other suggestions?
 
 Thanks in advance,
 Jason
 
 
 -
 Falun Dafa   Truth - Compassion - Forbearance
 
 A mind  body practice under persecution in China
 
 http://www.faluninfo.net
 
 
 
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/%22Disabling%22-struts2-filter-for-some-URL-tf3464284.html#a10305518
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: TabbedPannel: So many problems.

2007-05-03 Thread Musachy Barroso

Sure, the wiki is open for contributions.

musachy

On 5/3/07, Felipe Rodrigues [EMAIL PROTECTED] wrote:



Sounds good. I'm using the workaround display: none and its working as
expected.
I'm learning lots of workaround looking at templates. Each time I got any
issue, I report it, after ask here and get a proff it is really an issue.

But I think we really need a doc telling about these little things about
Ajax theme. I can help you to do that if you want to. Just let me know.

Thanks,

Felipe


Musachy Barroso wrote:

 The first tab is the default one, but you can change that using the
 selectedTab in the tabbedPanel tag. Dynamic tabs load their content
 automatically, this was mentioned on another thread and was fixed in
 WW-1860, adding a preload (defaults to true) attribute to the div tag.
 Bear in mind the ajax theme is experimental, so feel free to log jira
 tickets for any problem you find and we'll try to fix them for 2.1 (big
 ajax
 overhaul). Thanks for flying with struts ajax theme :)

 regards
 musachy

 On 5/3/07, Felipe Rodrigues [EMAIL PROTECTED] wrote:


 Hi Guys,

 I'm really trying to use TabbedPannel, but it seems to have lots of
 problems
 when you try to use in a real world WebApp.

 For example, I have a TabbedPannel with 6 tabs. Each one is a remote
one.
 The problem here is, when the user change the tab, I need to update a
 session attribute. But TabbedPannel don't have the events support (yet,
 because there is an open issue for that), so I changed to refreshOnShow
 and
 executeScripts = true.
 Then I got new problems. The default tab is the first one, but struts
 render
 all of them and obviously, execute all its scripts, including the one
 wich
 changes the session attribute. The result is a mess, because the
 rendering
 depends on this attribute value, wich is there only to provide a way to
 app
 recognize what tab is selected.

 Another problem is that the first tab is executed once, when everyone
is
 being redered, and execute again to show its content, since is the one
 which
 will be shown to user. This approach generate lots of Widget ID
colision
 in
 the debug output.

 Sometimes I wonder if these things happens only in my case, because I
 can't
 find others threads about that in the mail-list.
 I'm waitting some answers to make a decision about keep tabbedPannel or
 exclude this forever (at least until this stuff be fixed).

 Thanks in advance guys,

 Felipe
 --
 View this message in context:

http://www.nabble.com/TabbedPannel%3A-So-many-problems.-tf3686055.html#a10303545
 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



--
View this message in context:
http://www.nabble.com/TabbedPannel%3A-So-many-problems.-tf3686055.html#a10305512
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: [S1] Form validation woes... (SOLVED)

2007-05-03 Thread Dave Newton
Followup:

Overriding getValidationKey(...) fixed it.

--- Dave Newton [EMAIL PROTECTED] wrote:

 Hey,
 
 Working on an S1 app at the moment (shaddup, all a'
 ya').
 
 Things are set up a bit weird compared to what I'm
 used to; in this case there's an action that uses an
 ActionForm that isn't declared in struts-config, and
 that ActionForm contains nested ActionForms.
 
 I need to do some validaton on one of the nested
 ActionForms and would prefer to put it in
 validation.xml, but since neither the parent nor
 child
 forms are declared in struts-config I'm not sure I
 can
 do this.
 
 My naive implementation (define the sub-form
 validation in validation.xml and call
 subForm.validate(mapping, request) throws an NPE
 from
 inside ValidatorForm.validate().
 
 I've never really even thought of doing anything
 this
 way so I'm unfamiliar with how struts-config and
 validation.xml interact (or if they do). All the
 forms
 seem to be instantiated by hand etc. so... I'm
 afraid
 I have to do the validation by hand (which would
 suck,
 because there's a wad of intRanges and validwhens
 and
 the version of validator they're using doesn't seem
 to
 have all the standalone validation routines).
 
 I'm just wondering if what I want to do is
 (reasonable
 and) possible.
 
 Thanks,
 Dave
 
 
 __
 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]
 
 


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

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



Re: How to avoid hard coding input result

2007-05-03 Thread stanlick

I was including the hidden fields in the base.jsp that all my tiles extend.
The reason the

result name=input type=tiles${#parameters.tile}/result

was not being populated is because the hidden fields were NOT in the
specific form that was being POST'ed.  In order for this to work, developers
would have to *remember* to add these hidden fields to all their page
forms!  Gross!!!  Is there a better way to do this?  The hidden fields are
in the HTML, just not part of the request.  Can they be fished from the
ValueStack some other way?

Better yet, is the org.apache.struts2.tiles.StrutsTilesListener stashing the
tiles definition someplace?  This seems like a framework issue relating to
restoring target result if validation fails.

Scott

On 5/2/07, Musachy Barroso [EMAIL PROTECTED] wrote:


I'm not sure what that error is, but you can use OGNL expression on
results,
using ${expression}, and the request parameters are available in
#parameters, so yes, it should work :)

musachy

On 5/2/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

 Are you sure about this technique?  I have the hidden field in my page
and
 I
 can see that it is set to the correct string, however, when this page is
 POSTed, I get the following error.  It appears that the hidden field is
 not
 quite making it into the struts.xml result.


 15:04:38,762  WARN org.apache.tiles.impl.BasicTilesContainer.render:368
-
 Unable to find the definition ''
 May 2, 2007 3:04:38 PM
org.apache.catalina.core.StandardWrapperValveinvoke
 SEVERE: Servlet.service() for servlet default threw exception
 org.apache.tiles.definition.NoSuchDefinitionException:

 On 5/2/07, Musachy Barroso [EMAIL PROTECTED] wrote:
 
  Struts never knows what is *the page* that failed. The action gets an
 http
  request, but it doesn't know what was the page, with the submit in it,
  that
  caused the request. You can pass a hidden field with the name of the
  page(let's say inputPage), and then have a result like this:
 
  result name=input
 type=tiles
 ${#parameters.inputPage}
  /result
 
  musachy
 
  On 5/2/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
  
   How do I get the Action input to return to *the* page that failed
the
   validation?  It could be addPage, UpdatePage, or deletePage.
  
   result name=input
   type=tiles
   *_tileThatFailedValidation_*
   /result
  
   --
   Scott
   [EMAIL PROTECTED]
  
 
 
 
  --
  Hey you! Would you help me to carry the stone? Pink Floyd
 



 --
 Scott
 [EMAIL PROTECTED]




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





--
Scott
[EMAIL PROTECTED]


Re: Tiles 2 woes

2007-05-03 Thread stanlick

stack = (ValueStack) tilesContext.getRequestScope().get(
ServletActionContext.STRUTS_VALUESTACK_KEY);

works from within the Tiles controller!  Now then, stack.getRoot() returns a
CompoundRoot which appears to be a Collection.  Is there a way to know which
element the Action is in?  It appears to be in the zero element, but I'd
like to be certain of this.  Too bad it isn't keyed!

On 5/2/07, Dave Newton [EMAIL PROTECTED] wrote:


--- [EMAIL PROTECTED] wrote:
 In short... workflow.

Oh. I just know about the Tiles/OGNL stuff :)

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]





--
Scott
[EMAIL PROTECTED]


Re: Tiles 2 woes

2007-05-03 Thread Dave Newton
--- [EMAIL PROTECTED] wrote:
 stack = (ValueStack)
 tilesContext.getRequestScope().get(
 ServletActionContext.STRUTS_VALUESTACK_KEY);
 
 works from within the Tiles controller!

Yeah, that's why I posted it :/

 It appears to be in the zero element, but I'd
 like to be certain of this.  

AFAIK this guaranteed; that's how all the S2 tags work
without having to explicitly state which stack value
you're referencing.

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: Tiles Controllers (preparer)

2007-05-03 Thread stanlick

I'm posting this so that the solution is included with the question!  Thanks
d.

stack = (ValueStack) tilesContext.getRequestScope().get(
ServletActionContext.STRUTS_VALUESTACK_KEY);

theAction = getStack().getRoot().get(0);

On 5/1/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:


How can I place a bean on the OGNL from within my Tiles Controller so that
it's properties are available to the S2 custom tags?

--
Scott
[EMAIL PROTECTED]





--
Scott
[EMAIL PROTECTED]


[S2] mapping status 404 to a result page

2007-05-03 Thread Veronica Iturrioz
Hello,
I want to create a global-result to map the servlet response 404 (page 
not found) to a result page (ie /error.jsp). 
Does somebody know how can i do?

thanks in advance.




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

Re: Displaying bean from action class

2007-05-03 Thread adambomb

GoodMorning and Thanks for the reply,
Regarding the hibernate fields and struts form fields, there is no problem
in there. And yes I have changed the scope from request to session.
But Im not clear about the third suggestion you gave.
My jsp is page code is something like this:

html:form action=deploy scope=session
html:select property=formfirstfield
  html:optionsCollection property=firstList label=name
value=id/
/html:select
  html:select property=formsecondfield
  html:optionsCollection property=secondList label=name
value=id/
/html:select

html:submit value=submit property=action/
!-- now this is just the first default row which will always be there to do
extra actions --  
html:select property=thirdfield
html:optionsCollection property=thirdList label=name
value=id/
  /html:select
  html:select property=fourthfield
html:optionsCollection property=fourthList
label=nodename value=nodename/
  /html:select
  html:submit value=Add property=action/
  html:submit value=Delete Multiple property=action/
  html:submit value=Certify Multiple property=action/
!-- this is what should come after submitting, depending upon the nuimber
of rows retrieved by submitting the first two fields --
logic:iterate id=SOMEID indexId=idx name=SOMENAME
property=results type=sometype
   
  %  System.out.println(ITERATION BEING DONE); %
html:select name=SOMEID property=relatedFieldId
indexed=true onchange=
  html:option value=/
  html:optionsCollection name=relatedCollection
label=name value=id/
/html:select
  html:submit value=Update property=action/
  html:submit value=Delete property=action/
  /logic:iterate
/html:form

When I hit submit, it tries to execute the query at iterate but the doesnt
seem to retain the values of the first and second fields and checks those
columns for null values. And thus never enters the iterate tag.
If the above code seems correct to you , plz lemme know what else should I
look in for . Do I have to set some attributes in Action class before
mapping.findforward().




Martin Gainty wrote:
 
 Good Morning
 
 assuming you have the bean ID used for both iterate and bean
 logic:iterate ID=SOMEID
 bean:write name=SOMEID property=firstfield/
 bean:write name=SOMEID property=secondfield/
 /logic:iterate
 
 in your view assuming you have I would scope to session and not request
 action path=/success name=package.yourActionForm scope=session 
 type=package.YourActionClass
 
 Keep in mind that Hibernate generates classes based on name specified in 
 *.hbm.xml (and not form field designations) ..with that in mind did you 
 verify the Table has data records?
 
 HTH/
 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: adambomb [EMAIL PROTECTED]
 To: user@struts.apache.org
 Sent: Thursday, May 03, 2007 9:27 AM
 Subject: Displaying bean from action class
 
 

 Hi, I have a jsp page which displays more than one drop down lists and is
 being populated from the database. Now when I click on a submit button 
 after
 selecting the values from two dropdowns. it should go and search in the
 table and retrieve a collection of rows of that table(based on the values 
 of
 two columns) and should display on the same page using logic:iterate. 
 When
 I hit 'submit' button, the form bean is populated and validation is done.
 After that it goes in the action class and I have :


 if(MyBeanForm.getAction().equalsIgnoreCase(submit))
 {
 try{
 MyFormObject.getResults().size();
 return mapping.findforward(success);
 }
 }
 AND the FormBean is like:
 public Collection getResults()
 {
 Session sess=HibernateUtils.getSessionFactory().openSession();
 List list=sess.createQuery(Select ds from MyTable ds where ds.firstfield 
 =
 +formfirstfield + and ds.secondfield= +formsecondfield).list();
 sess.close();
 return list;
 }

 Everthing uptill here is fine, but when I want to display it on the jsp
 page, it doesnt seem to retain the values of the request parameters and
 executes the query with formfirstfield and formsecondfield as null, and
 thus results in null output.


 JSP page tag is like:
 logic:iterate id=SOMEID indexId=idx name=SOMENAME 
 property=results
 type=sometype
 .. ..
 /logic:iterate

 I think I m missing something in action class to populate the bean but Im
 not sure what .


 Kindly Help.

 -- 
 View this message in context: 
 

Re: Displaying bean from action class

2007-05-03 Thread adambomb

Also Im a bit confused that what is this 'id' attribute for? in iterate tag.


adambomb wrote:
 
 GoodMorning and Thanks for the reply,
 Regarding the hibernate fields and struts form fields, there is no problem
 in there. And yes I have changed the scope from request to session.
 But Im not clear about the third suggestion you gave.
 My jsp is page code is something like this:
 
 html:form action=deploy scope=session
 html:select property=formfirstfield
   html:optionsCollection property=firstList label=name
 value=id/
 /html:select
   html:select property=formsecondfield
   html:optionsCollection property=secondList label=name
 value=id/
 /html:select
 
 html:submit value=submit property=action/
 !-- now this is just the first default row which will always be there to
 do extra actions --  
 html:select property=thirdfield
 html:optionsCollection property=thirdList label=name
 value=id/
   /html:select
   html:select property=fourthfield
 html:optionsCollection property=fourthList
 label=nodename value=nodename/
   /html:select
   html:submit value=Add property=action/
   html:submit value=Delete Multiple property=action/
   html:submit value=Certify Multiple property=action/
 !-- this is what should come after submitting, depending upon the nuimber
 of rows retrieved by submitting the first two fields --
 logic:iterate id=SOMEID indexId=idx name=SOMENAME
 property=results type=sometype

   %  System.out.println(ITERATION BEING DONE); %
 html:select name=SOMEID property=relatedFieldId
 indexed=true onchange=
   html:option value=/
   html:optionsCollection name=relatedCollection
 label=name value=id/
 /html:select
   html:submit value=Update property=action/
   html:submit value=Delete property=action/
   /logic:iterate
 /html:form
 
 When I hit submit, it tries to execute the query at iterate but the doesnt
 seem to retain the values of the first and second fields and checks those
 columns for null values. And thus never enters the iterate tag.
 If the above code seems correct to you , plz lemme know what else should I
 look in for . Do I have to set some attributes in Action class before
 mapping.findforward().
 
 
 
 
 Martin Gainty wrote:
 
 Good Morning
 
 assuming you have the bean ID used for both iterate and bean
 logic:iterate ID=SOMEID
 bean:write name=SOMEID property=firstfield/
 bean:write name=SOMEID property=secondfield/
 /logic:iterate
 
 in your view assuming you have I would scope to session and not request
 action path=/success name=package.yourActionForm scope=session 
 type=package.YourActionClass
 
 Keep in mind that Hibernate generates classes based on name specified in 
 *.hbm.xml (and not form field designations) ..with that in mind did you 
 verify the Table has data records?
 
 HTH/
 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: adambomb [EMAIL PROTECTED]
 To: user@struts.apache.org
 Sent: Thursday, May 03, 2007 9:27 AM
 Subject: Displaying bean from action class
 
 

 Hi, I have a jsp page which displays more than one drop down lists and
 is
 being populated from the database. Now when I click on a submit button 
 after
 selecting the values from two dropdowns. it should go and search in the
 table and retrieve a collection of rows of that table(based on the
 values 
 of
 two columns) and should display on the same page using logic:iterate. 
 When
 I hit 'submit' button, the form bean is populated and validation is
 done.
 After that it goes in the action class and I have :


 if(MyBeanForm.getAction().equalsIgnoreCase(submit))
 {
 try{
 MyFormObject.getResults().size();
 return mapping.findforward(success);
 }
 }
 AND the FormBean is like:
 public Collection getResults()
 {
 Session sess=HibernateUtils.getSessionFactory().openSession();
 List list=sess.createQuery(Select ds from MyTable ds where
 ds.firstfield 
 =
 +formfirstfield + and ds.secondfield= +formsecondfield).list();
 sess.close();
 return list;
 }

 Everthing uptill here is fine, but when I want to display it on the jsp
 page, it doesnt seem to retain the values of the request parameters and
 executes the query with formfirstfield and formsecondfield as null,
 and
 thus results in null output.


 JSP page tag is like:
 logic:iterate id=SOMEID indexId=idx name=SOMENAME 
 property=results
 type=sometype
 .. ..
 

Re: Displaying bean from action class

2007-05-03 Thread Dave Newton
--- adambomb [EMAIL PROTECTED] wrote:
 Also Im a bit confused that what is this 'id'
 attribute for? in iterate tag.


The name of a page scope JSP bean that will contain
the current element of the collection on each
iteration, if it is not null.


It's so you can access the current element of what
you're iterating over; modified from example on the
iterate tag docs:


logic:iterate id=element name=myhashtable
  Current element: bean:write name=element 
   property=value/
/logic:iterate


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]



UTF-8 charset issue

2007-05-03 Thread piloupy GOTTAPIL

Hello,

I have a website using :

- Struts 1.3
- Hibernate 3.2
- Tomcat 5.5
- Java 1.5.0
- MySQL 4.1.22

All my site and my database are encoded in UTF-8.

When I enter in a form the character e-accute, it becomes an 'A' with
a tild, following by a (c) (copyright character). I've made several
tests to find where the problem is.

In the Struts Action which handles the form, I've put this code :

System.out.println(Default Charset :  + Charset.defaultCharset());
System.out.println(request.getParameter(name) +  :  +
request.getParameter(name).getBytes(UTF-8).length);

which gives me :

Default Charset : windows-1252
Ã(c) : 4

It means that somewhere (from the form to the Struts Action), there's
a component which interpret the e-accute character with the latin1
encoding (ISO-8859-1). The result is that it sees TWO characters
(where it should only sees ONE character encoded by TWO bytes). When I
arrive to my Struts Action, my parameter is already the A-tild (c)
encoded IN UTF-8, and then encoded BY 4 bytes.

Anyone can help me to understand the problem and how to solve it ?

Thanks in advance,

piloupy

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



Re: Displaying bean from action class

2007-05-03 Thread adambomb

Got it! .
But my main problem is still intact . Can you plz help in that too.
 \ ../

Dave Newton-4 wrote:
 
 --- adambomb [EMAIL PROTECTED] wrote:
 Also Im a bit confused that what is this 'id'
 attribute for? in iterate tag.
 
 
 The name of a page scope JSP bean that will contain
 the current element of the collection on each
 iteration, if it is not null.
 
 
 It's so you can access the current element of what
 you're iterating over; modified from example on the
 iterate tag docs:
 
 
 logic:iterate id=element name=myhashtable
   Current element: bean:write name=element 
property=value/
 /logic:iterate
 
 
 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]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Displaying-bean-from-action-class-tf3686377.html#a10309146
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: UTF-8 charset issue

2007-05-03 Thread piloupy GOTTAPIL

Hi,

I've accidentally found a solution. I must put the directive on the
top of my pages :

%@ page contentType=text/html; charset=ISO-8859-15 %

because I've put previously :

%@ page contentType=text/html; charset=UTF-8 %

The result of my little trace gives me :

Default Charset : windows-1252
é : 2

I don't really understand why but... it works ^_^;

I'm still interested in knowing the reason, if you have the answer :)

Thanks,

piloupy

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



Re: Displaying bean from action class

2007-05-03 Thread Dave Newton
--- adambomb [EMAIL PROTECTED] wrote:
 But my main problem is still intact.

The form bean is declared with session scope and it's
not retaining the values across requests, and you are
not setting the form values anywhere?

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: Displaying bean from action class

2007-05-03 Thread adambomb

Yep, Thats exactly my problem. I havent set the form values anywhere.


Dave Newton-4 wrote:
 
 --- adambomb [EMAIL PROTECTED] wrote:
 But my main problem is still intact.
 
 The form bean is declared with session scope and it's
 not retaining the values across requests, and you are
 not setting the form values anywhere?
 
 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]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Displaying-bean-from-action-class-tf3686377.html#a10309488
Sent from the Struts - User mailing list archive at Nabble.com.


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



Problem with s:param tag

2007-05-03 Thread Felipe Rodrigues

Hi guys,

Sometimes when I use s:param tag, the value that I got in my action has a 
appended to it. I can treat that by replacing this, but it is not a good
solution.
Does anybody heard anything about that? 
I've looked at the source code of param tag in the Struts source code, and
there is a findValue(String expr) that calls ValueStack.findValue(String
expr) as well. What exactly is that expr (to me seems to be the name we
define in param tag). Anyway, I didn't found anything wrong there, but I
don't know how the value get there.

Thanks again,

Felipe
-- 
View this message in context: 
http://www.nabble.com/Problem-with-%3Cs%3Aparam%3E-tag-tf3687887.html#a10309679
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: Displaying bean from action class

2007-05-03 Thread Dave Newton
--- adambomb [EMAIL PROTECTED] wrote:
 Yep, Thats exactly my problem. I havent set the form
 values anywhere.

If a session form is dropping values somewhere then
probably the program logic you think is happening
isn't really happening... 

IIRC you have a form, submit the form, and go back to
that same form, 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: [S2] s:form tag problems

2007-05-03 Thread Felipe Rodrigues

Hi,

there is issue for that.
It is fixed for 2.0.8 version

You can look at it in the link
https://issues.apache.org/struts/browse/WW-1758
https://issues.apache.org/struts/browse/WW-1758 

regards,

Felipe


Roger Varley wrote:
 
 I'm sorry to keep harping on about this but some of the attributes of
 the s:form tag used in a .jsp do not render in the output HTML.
 Examples are
 
 s:form id=form method=post action=EditOrderUsingSession 
 disable=true
 s:form id=form method=post action=EditOrderUsingSession
 onclick=alert('Form')
 
 In both cases, neither the disable or onclick attributes appear in the
 rendered HTML
 
 If I've misunderstood the use of the tag or haven't RTFM'd the right
 documentation please tell me. If it's a bug, and someone would point
 me in the right direction I'll have a stab at fixing it myself. This
 is something I need to either get working or start a re-design.
 
 Regards
 Roger
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
-- 
View this message in context: 
http://www.nabble.com/-S2--%3Cs%3Aform%3E-tag-problems-tf3685058.html#a10309872
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: CSS styles for Table Tags

2007-05-03 Thread Felipe Rodrigues

Isn't it deprecated?
Just to make sure.

Regards,

Felipe


Olivier THIERRY wrote:
 
 Hi,
 
 I use the Table Tags plugin, but I can't find a way to apply CSS classes
 to
 table or thead tags generated by the plugin since there is no cssClass or
 similar attribute.
 Does anyone have an idea about this ?
 
 Olivier
 
 

-- 
View this message in context: 
http://www.nabble.com/CSS-styles-for-Table-Tags-tf3686504.html#a10309873
Sent from the Struts - User mailing list archive at Nabble.com.


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



Struts Action value empty in IE, but works fine in Firefox

2007-05-03 Thread Manudath Gurudatha

Hi,
I have a JSP which has a corresponding action class in my application based
on Struts (actually I am Struts newbie... so dont know much about it) The
Controller class which handles all the requests can see the action value
as setdefault when I click on next.gif in Mozilla. However, it comes  in
IE. I see several similar incidents on the Web forums, but none have given a
proper solution (Someone said that IE prints some Loading... message which
clears the submit criteria and so on...)

html:image property=action value=setdefault src=next.gif /

Can anyone please tell me what the problem is, and how do I get around it to
make it work on IE?

Thanks,
Manu


Re: Struts Action value empty in IE, but works fine in Firefox

2007-05-03 Thread Musachy Barroso

What version of struts are you using? Can you post your jsp page? Are you
using the ajax theme (is S2)? Based only on what you have said is quite
difficult to guess what the problem is.

regards
musachy

On 5/3/07, Manudath Gurudatha [EMAIL PROTECTED] wrote:


Hi,
I have a JSP which has a corresponding action class in my application
based
on Struts (actually I am Struts newbie... so dont know much about it) The
Controller class which handles all the requests can see the action value
as setdefault when I click on next.gif in Mozilla. However, it comes 
in
IE. I see several similar incidents on the Web forums, but none have given
a
proper solution (Someone said that IE prints some Loading... message
which
clears the submit criteria and so on...)

html:image property=action value=setdefault src=next.gif /

Can anyone please tell me what the problem is, and how do I get around it
to
make it work on IE?

Thanks,
Manu





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


Re: CSS styles for Table Tags

2007-05-03 Thread Olivier THIERRY

Yes, the s:table tag is deprecated, but this is not what I use.
I use the Table Tags plugin :
http://cwiki.apache.org/S2PLUGINS/table-tags.html

2007/5/3, Felipe Rodrigues [EMAIL PROTECTED]:



Isn't it deprecated?
Just to make sure.

Regards,

Felipe


Olivier THIERRY wrote:

 Hi,

 I use the Table Tags plugin, but I can't find a way to apply CSS classes
 to
 table or thead tags generated by the plugin since there is no cssClass
or
 similar attribute.
 Does anyone have an idea about this ?

 Olivier



--
View this message in context:
http://www.nabble.com/CSS-styles-for-Table-Tags-tf3686504.html#a10309873
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: CSS styles for Table Tags

2007-05-03 Thread Shahak Nagiel
For rendering tables, I strongly recommend the SourceForge Display Tag library 
(http://displaytag.sourceforge.net/11/index.html) over Table Tags.  The latter 
offers better Struts and FreeMarker integration, but Display Tag is far more 
evolved from an API perspective and abstracts away a lot of lower-level 
plumbing (like sorting) that Table Tags still requires you to write.


- Original Message 
From: Olivier THIERRY [EMAIL PROTECTED]
To: Struts Users Mailing List user@struts.apache.org
Sent: Thursday, May 3, 2007 1:54:02 PM
Subject: Re: CSS styles for Table Tags

Yes, the s:table tag is deprecated, but this is not what I use.
I use the Table Tags plugin :
http://cwiki.apache.org/S2PLUGINS/table-tags.html

2007/5/3, Felipe Rodrigues [EMAIL PROTECTED]:


 Isn't it deprecated?
 Just to make sure.

 Regards,

 Felipe


 Olivier THIERRY wrote:
 
  Hi,
 
  I use the Table Tags plugin, but I can't find a way to apply CSS classes
  to
  table or thead tags generated by the plugin since there is no cssClass
 or
  similar attribute.
  Does anyone have an idea about this ?
 
  Olivier
 
 

 --
 View this message in context:
 http://www.nabble.com/CSS-styles-for-Table-Tags-tf3686504.html#a10309873
 Sent from the Struts - User mailing list archive at Nabble.com.


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








How to get forward for action (test.do) in servlet filter

2007-05-03 Thread Vinit N

How to get forward for action (test.do) in servlet filter.
-- 
View this message in context: 
http://www.nabble.com/How-to-get-forward-for-action-%28test.do%29-in-servlet-filter-tf3688245.html#a10310889
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: UTF-8 charset issue

2007-05-03 Thread Cristian Lucero

Hi,
or good put this meta in head section
meta http-equiv=Content-Type content=text/html;
charset=ISO-8859-1/meta

On 5/3/07, piloupy GOTTAPIL [EMAIL PROTECTED] wrote:


Hi,

I've accidentally found a solution. I must put the directive on the
top of my pages :

%@ page contentType=text/html; charset=ISO-8859-15 %

because I've put previously :

%@ page contentType=text/html; charset=UTF-8 %

The result of my little trace gives me :

Default Charset : windows-1252
é : 2

I don't really understand why but... it works ^_^;

I'm still interested in knowing the reason, if you have the answer :)

Thanks,

piloupy

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





--
Cristian Lucero


[S2] UTF-8 woes

2007-05-03 Thread meeboo

Hey all

I am trying to submit form data with UTF-8 characters but am having no luck.
The special characters are garbled when inserted in the database from a
s:form for example - this is regardless of what browser I am using. I am
using a page content type declaration for each page, but that doesn't help
at all. Do I need to declare it somewhere else in my Struts 2 application? I
remember that I in my old JSP/Servlet app had to convert certain characters
to special UTF-8 characters before saving Strings etc... but in S2 all I get
is question marks for special characters when I inspect incoming UTF-8
strings.

I am using this content type declaration. 
%@ page contentType=text/html; charset=ISO-8859-15 % 

I also used %@ page pageEncoding=UTF-8 % but to no avail.

Help!

Thanks!
-- 
View this message in context: 
http://www.nabble.com/-S2--UTF-8-woes-tf3688315.html#a10311092
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: [S2] UTF-8 woes

2007-05-03 Thread Cristian Lucero

try this
meta http-equiv=Content-Type content=text/html;
charset=ISO-8859-1/meta


On 5/3/07, meeboo [EMAIL PROTECTED] wrote:



Hey all

I am trying to submit form data with UTF-8 characters but am having no
luck.
The special characters are garbled when inserted in the database from a
s:form for example - this is regardless of what browser I am using. I am
using a page content type declaration for each page, but that doesn't help
at all. Do I need to declare it somewhere else in my Struts 2 application?
I
remember that I in my old JSP/Servlet app had to convert certain
characters
to special UTF-8 characters before saving Strings etc... but in S2 all I
get
is question marks for special characters when I inspect incoming UTF-8
strings.

I am using this content type declaration.
%@ page contentType=text/html; charset=ISO-8859-15 %

I also used %@ page pageEncoding=UTF-8 % but to no avail.

Help!

Thanks!
--
View this message in context:
http://www.nabble.com/-S2--UTF-8-woes-tf3688315.html#a10311092
Sent from the Struts - User mailing list archive at Nabble.com.


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





--
Cristian Lucero


Re: [S2] UTF-8 woes

2007-05-03 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

meeboo,

It's amazing to me that people not only don't read the archives, but
they also don't read the messages posted on the same day or even in the
/same hour/. :(

- -chris

meeboo wrote:
 Hey all
 
 I am trying to submit form data with UTF-8 characters but am having no luck.
 The special characters are garbled when inserted in the database from a
 s:form for example - this is regardless of what browser I am using. I am
 using a page content type declaration for each page, but that doesn't help
 at all. Do I need to declare it somewhere else in my Struts 2 application? I
 remember that I in my old JSP/Servlet app had to convert certain characters
 to special UTF-8 characters before saving Strings etc... but in S2 all I get
 is question marks for special characters when I inspect incoming UTF-8
 strings.
 
 I am using this content type declaration. 
 %@ page contentType=text/html; charset=ISO-8859-15 % 
 
 I also used %@ page pageEncoding=UTF-8 % but to no avail.
 
 Help!
 
 Thanks!
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD4DBQFGOjVa9CaO5/Lv0PARAqQeAJjR3Q4cAAOViTNxlRbVB9jH+/COAJ9bRghJ
Gf3FpAnWCwY9yquHPPsKLw==
=S2nd
-END PGP SIGNATURE-

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



Re: UTF-8 charset issue

2007-05-03 Thread Allen Gilliland
I haven't looked at this in my application yet (but i probably should 
:/), but the struts.properties default config has this ...


### This can be used to set your default locale and encoding scheme
# struts.locale=en_US
struts.i18n.encoding=UTF-8

I would assume that means that struts2 should be trying to set the 
encoding on incoming request objects to UTF-8 or whatever other value 
you may put in there.  It's possible that if something else in your 
application touches the request before struts, like a filter for 
example, then that may be disrupting things.


What you are doing in your jsps is correct, but won't solve your 
problem.  Setting the content type in your jsp is just for identifying 
to the browser what language the response is in.


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

-- Allen


Cristian Lucero wrote:

Hi,
or good put this meta in head section
meta http-equiv=Content-Type content=text/html;
charset=ISO-8859-1/meta

On 5/3/07, piloupy GOTTAPIL [EMAIL PROTECTED] wrote:


Hi,

I've accidentally found a solution. I must put the directive on the
top of my pages :

%@ page contentType=text/html; charset=ISO-8859-15 %

because I've put previously :

%@ page contentType=text/html; charset=UTF-8 %

The result of my little trace gives me :

Default Charset : windows-1252
é : 2

I don't really understand why but... it works ^_^;

I'm still interested in knowing the reason, if you have the answer :)

Thanks,

piloupy

-
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: Displaying bean from action class

2007-05-03 Thread adambomb

Thats true ...


Dave Newton-4 wrote:
 
 --- adambomb [EMAIL PROTECTED] wrote:
 Yep, Thats exactly my problem. I havent set the form
 values anywhere.
 
 If a session form is dropping values somewhere then
 probably the program logic you think is happening
 isn't really happening... 
 
 IIRC you have a form, submit the form, and go back to
 that same form, 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]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Displaying-bean-from-action-class-tf3686377.html#a10311783
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: Displaying bean from action class

2007-05-03 Thread adambomb

Can you tell me what do I have to do in the action class other than
forwarding back to the form page.
If I try to print the values from the action class, I do get the right
values on the console. But when I forward mapping to the same form page. It
doesnt display those values there. bcoz when it tries to execute the query ,
it goes to find against null values.
Can you tell me the steps I require to do what I am trying to do ?
I might be missing just the one required


adambomb wrote:
 
 Thats true ...
 
 
 Dave Newton-4 wrote:
 
 --- adambomb [EMAIL PROTECTED] wrote:
 Yep, Thats exactly my problem. I havent set the form
 values anywhere.
 
 If a session form is dropping values somewhere then
 probably the program logic you think is happening
 isn't really happening... 
 
 IIRC you have a form, submit the form, and go back to
 that same form, 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]
 
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Displaying-bean-from-action-class-tf3686377.html#a10311886
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: [S2] UTF-8 woes

2007-05-03 Thread meeboo

But that other poster was using Struts 1! Also, I am already using 
meta http-equiv=Content-Type content=text/html;
charset=ISO-8859-1/meta 
Has anyone had luck using for example å ä ö in S2 ?

I am a very savvy Struts 2 mailing list user you know :)


meta http-equiv=Content-Type content=text/html;
charset=ISO-8859-1/meta 


Christopher Schultz-2 wrote:
 
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 meeboo,
 
 It's amazing to me that people not only don't read the archives, but
 they also don't read the messages posted on the same day or even in the
 /same hour/. :(
 
 - -chris
 
 meeboo wrote:
 Hey all
 
 I am trying to submit form data with UTF-8 characters but am having no
 luck.
 The special characters are garbled when inserted in the database from a
 s:form for example - this is regardless of what browser I am using. I
 am
 using a page content type declaration for each page, but that doesn't
 help
 at all. Do I need to declare it somewhere else in my Struts 2
 application? I
 remember that I in my old JSP/Servlet app had to convert certain
 characters
 to special UTF-8 characters before saving Strings etc... but in S2 all I
 get
 is question marks for special characters when I inspect incoming UTF-8
 strings.
 
 I am using this content type declaration. 
 %@ page contentType=text/html; charset=ISO-8859-15 % 
 
 I also used %@ page pageEncoding=UTF-8 % but to no avail.
 
 Help!
 
 Thanks!
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.7 (MingW32)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
 
 iD4DBQFGOjVa9CaO5/Lv0PARAqQeAJjR3Q4cAAOViTNxlRbVB9jH+/COAJ9bRghJ
 Gf3FpAnWCwY9yquHPPsKLw==
 =S2nd
 -END PGP SIGNATURE-
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/-S2--UTF-8-woes-tf3688315.html#a10312120
Sent from the Struts - User mailing list archive at Nabble.com.


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



[S2] How to change Invalid field value for field message in tr

2007-05-03 Thread Struts2 Fan

Hi all,

When a form is submitted if there is an integer value and the user enters a
non-integer value, it gives the error Invalid field value for field ..
I want to define it for locale tr
I just couldn't find where to create a new file or where to add the bundles
for them.

Thanks in advance.
-- 
View this message in context: 
http://www.nabble.com/-S2--How-to-change-%22Invalid-field-value-for-field%22-message-in-tr-tf3688720.html#a10312377
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: [S2] UTF-8 woes

2007-05-03 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

meeboo,

meeboo wrote:
 But that other poster was using Struts 1! Also, I am already using 
 meta http-equiv=Content-Type content=text/html;
 charset=ISO-8859-1/meta 
 Has anyone had luck using for example å ä ö in S2 ?

What is the character set actually being used by the request and the
response? Just because you have ISO-8859-1 in your meta tag doesn't
mean that the response is actually being sent and the request is
actually being interpreted as ISO-8859-1.

Here are some things to look at:

1. What does request.getCharacterEncoding return?
2. What does response.getCharacterEncoding return?
3. What does System.getProperty(file.encoding) return?
4. What does your HTTP or AJP listener have configured for
   its default character set? (In Tomcat, the connectors
   can use a default charset when the client does not provide
   one in the request headers).
5. You never mentioned whether you were using GET or POST. There
   is a difference in how the data is decoded.

- -chris

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGOkSH9CaO5/Lv0PARAhC9AJ4rwoZJfegWReU+S5cenabnKOhDhQCgp2yA
sKE5xIBugzsYFhEvKmjE+Qg=
=jLc4
-END PGP SIGNATURE-

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



[s2] problem with action chaining returning input result

2007-05-03 Thread Allen Gilliland
when chaining from one action to another, why is struts2 trying to 
lookup the input result on action2 before ever executing my action method?


i have a simple config, like the examples in the documentation ...

action name=members!* method={1}
class=org.apache.roller.ui.authoring.struts2.Members
result name=list type=tiles.Members/result
/action

action name=invite!* method={1}
class=org.apache.roller.ui.authoring.struts2.MembersInvite
result name=input type=tiles.MembersInvite/result
result name=disabled type=tiles.disabled/result
result name=success type=chainmembers/result
/action

when i execute the 'invite' action it stores an invitation in the db and 
adds an action message to notify the user and then i return SUCCESS, 
which should just chain to the execute() method of my 'members' action 
right?


well when i do this everything works properly in the 'invite' action and 
through debugging i can see that my 'members' action class is 
instantiated as if it's going to be executed, but the execute() method 
is never called and struts2 gives an error about not being able to find 
the input result on my 'members' action.  why is this happening?


No result defined for action 
org.apache.roller.ui.authoring.struts2.Members and result input


-- Allen

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



Re: CSS styles for Table Tags

2007-05-03 Thread Musachy Barroso

I hope Tom is not reading this :). I'd also suggest using displaytag for
now.

musachy

On 5/3/07, Shahak Nagiel [EMAIL PROTECTED] wrote:


For rendering tables, I strongly recommend the SourceForge Display Tag
library (http://displaytag.sourceforge.net/11/index.html) over Table
Tags.  The latter offers better Struts and FreeMarker integration, but
Display Tag is far more evolved from an API perspective and abstracts away a
lot of lower-level plumbing (like sorting) that Table Tags still requires
you to write.


- Original Message 
From: Olivier THIERRY [EMAIL PROTECTED]
To: Struts Users Mailing List user@struts.apache.org
Sent: Thursday, May 3, 2007 1:54:02 PM
Subject: Re: CSS styles for Table Tags

Yes, the s:table tag is deprecated, but this is not what I use.
I use the Table Tags plugin :
http://cwiki.apache.org/S2PLUGINS/table-tags.html

2007/5/3, Felipe Rodrigues [EMAIL PROTECTED]:


 Isn't it deprecated?
 Just to make sure.

 Regards,

 Felipe


 Olivier THIERRY wrote:
 
  Hi,
 
  I use the Table Tags plugin, but I can't find a way to apply CSS
classes
  to
  table or thead tags generated by the plugin since there is no cssClass
 or
  similar attribute.
  Does anyone have an idea about this ?
 
  Olivier
 
 

 --
 View this message in context:
 http://www.nabble.com/CSS-styles-for-Table-Tags-tf3686504.html#a10309873
 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: Problem with s:param tag

2007-05-03 Thread Laurie Harper

Felipe Rodrigues wrote:

Hi guys,

Sometimes when I use s:param tag, the value that I got in my action has a 
appended to it. I can treat that by replacing this, but it is not a good
solution.
Does anybody heard anything about that? 
I've looked at the source code of param tag in the Struts source code, and

there is a findValue(String expr) that calls ValueStack.findValue(String
expr) as well. What exactly is that expr (to me seems to be the name we
define in param tag). Anyway, I didn't found anything wrong there, but I
don't know how the value get there.


The param tag's 'value' attribute is evaluated -- i.e. the value you 
supply is treated as an OGNL expression. See the tag syntax 
documentation for details.


Without seeing an example of this behaviour (i.e. some code/markup that 
reproduces the problem) it's going to be difficult to diagnose. Can you 
come up with a minimal test case that demonstrates the behaviour you're 
describing?


L.

[1] http://struts.apache.org/2.x/docs/tag-syntax.html


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



Re: [S2] How to change Invalid field value for field message in tr

2007-05-03 Thread Laurie Harper

Struts2 Fan wrote:

Hi all,

When a form is submitted if there is an integer value and the user enters a
non-integer value, it gives the error Invalid field value for field ..
I want to define it for locale tr
I just couldn't find where to create a new file or where to add the bundles
for them.


Did you check the documentation for localization of S2 apps, and the 
validation docs?


http://struts.apache.org/2.x/docs/localization.html
http://struts.apache.org/2.x/docs/validation.html

L.


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



Re: [s2] problem with action chaining returning input result

2007-05-03 Thread Laurie Harper

Allen Gilliland wrote:
when chaining from one action to another, why is struts2 trying to 
lookup the input result on action2 before ever executing my action 
method?


i have a simple config, like the examples in the documentation ...

action name=members!* method={1}
class=org.apache.roller.ui.authoring.struts2.Members
result name=list type=tiles.Members/result
/action

action name=invite!* method={1}
class=org.apache.roller.ui.authoring.struts2.MembersInvite
result name=input type=tiles.MembersInvite/result
result name=disabled type=tiles.disabled/result
result name=success type=chainmembers/result
/action

when i execute the 'invite' action it stores an invitation in the db and 
adds an action message to notify the user and then i return SUCCESS, 
which should just chain to the execute() method of my 'members' action 
right?


well when i do this everything works properly in the 'invite' action and 
through debugging i can see that my 'members' action class is 
instantiated as if it's going to be executed, but the execute() method 
is never called and struts2 gives an error about not being able to find 
the input result on my 'members' action.  why is this happening?


No result defined for action 
org.apache.roller.ui.authoring.struts2.Members and result input


Well, firstly, you don't have a result named 'input' on your members 
action... but I guess you're more interested in why Struts is looking 
for it :-)


Does the members action have any conversion or validation configured? 
Struts will automatically forward to the 'input' result if errors occur 
during conversion or validation. If that's not it, you'll need to post 
more details, such as your action code and anything written to the logs 
as the request is being processed.


L.


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



Re: Good JScript lib for disabling browser toolbars and good integration with Struts?

2007-05-03 Thread Laurie Harper

Peter Neu wrote:

does somebody know a good Java Script library which disables browser tool- 
navigations bars and right mouse clicks for browser windows? I need a
browser window for my app stripped of all basic browser components. 


Best way would be if Struts could already load the java script before the
user sees the first page.


You don't mention which Struts version you're using. Struts 2 provides 
some integration with Dojo (through the 'ajax' theme) which can probably 
do what you need as well as any library.


If you're not using S2, or want to use a different library, you should 
be able to do so equally as easily in Struts as any other web app 
environment; just include the appropriate script tags in the head of 
your page.


L.


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



datetimepicker not working in freemarker

2007-05-03 Thread Ron Chan

the datetimepicker does not work in freemarker in the using @s. tag syntax

the same page works fine in jsp

anyone else experienced this?
-- 
View this message in context: 
http://www.nabble.com/datetimepicker-not-working-in-freemarker-tf3688908.html#a10313044
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: datetimepicker not working in freemarker

2007-05-03 Thread Musachy Barroso

not working as in I'm getting an error, or not working as in nothing is
shown?

musachy

On 5/3/07, Ron Chan [EMAIL PROTECTED] wrote:



the datetimepicker does not work in freemarker in the using @s. tag
syntax

the same page works fine in jsp

anyone else experienced this?
--
View this message in context:
http://www.nabble.com/datetimepicker-not-working-in-freemarker-tf3688908.html#a10313044
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: submit tag and handler

2007-05-03 Thread Scott Nesbitt

Anybody have a suggestion on this?  Or do I just need
to wait until the next version of Struts?

Thanks,

Scott

--- Scott Nesbitt [EMAIL PROTECTED] wrote:

 
 Well, I tried this:
 
 function handler(widget, node)
 {
var beforeTopicsArray =
 widget.beforeNotifyTopicsArray;
widget.beforeNotifyTopicsArray = null;
widget.reloadContents();
widget.beforeNotifyTopicsArray =
 beforeTopicsArray;
 }
 
 and now I do not get a stack overflow, but the
 action
 is still not getting called.
 
 Scott
 
 --- Musachy Barroso [EMAIL PROTECTED] wrote:
 
  My bad, the notifyTopics are published inside that
  function so it won't
  work. Warning: Hack ahead :)
  
  var beforeTopicsArray =
  widget.beforeNotifyTopicsArray;
  widget.beforeNotifyTopicsArray = null;
  widget.reloadContents();
  widget.beforeNotifyTopicsArray =
 beforeTopicsArray;
  
  I will add a refreshContent method that will be
  common for all of the
  widgets (and part of the api), with one
  parameter(boolean), to skip the
  publishing of the topics.
  
  musachy
  
  On 5/2/07, Scott Nesbitt [EMAIL PROTECTED]
  wrote:
  
  
   Hmm, this:
  
   function handler(widget, node)
   {
  widget.reloadContents();
   }
  
   Gives Stack overflow at line: 4872
  
   Scott
  
   --- Musachy Barroso [EMAIL PROTECTED] wrote:
  
If you are using submit, or anchor tag you can
  call
reloadContents() on
the widget passed as a parameter, if you are
  using
the div tag, you can call
refresh() on it. These functions are not
  really
part of the api and might
change in the future (although it would be
 nice
  if
they were right?).
   
musachy
   
On 5/2/07, Scott Nesbitt
  [EMAIL PROTECTED]
wrote:


 Yes, I would like to do the request in the
JavaScript
 because I need to do some other work there
  before
the
 request happens.

 If I knew how Struts did the request I would
  just
do
 the same thing at the bottom of my function.

 Scott

 --- Musachy Barroso [EMAIL PROTECTED]
 wrote:

  The whole idea behind the handler
 function
  is
that
  you are going to make
  the request yourself, instead of letting
  struts
do
  it for you. The handler
  is just a plain javascript function like:
 
  function superHandler(widget, domNode) {
//use some other framework to do the
 ajax
request,
  Dojo, Prototype, YUI,
  DWR, JQuery,zillion_framework_name
  }
 
  is that what you are trying to do? do the
request
  yourself?
 
  musachy
 
  On 5/2/07, Scott Nesbitt
[EMAIL PROTECTED]
  wrote:
  
   Does anyone know how to invoke a request
  from
a
  submit
   handler function?
  
  
   I am using a submit tag like this:
  
   div id=t1Div 1/div
   s:url id=ajaxTest
  value=SaveLineup.action
/
   img id=indicator
src=images/indicator.gif
alt=Loading...
style=display:none/
   s:submit type=submit
 theme=ajax
 value=Save
 title=Save all changes.
 cssClass=butstylewide
 targets=t1
 handler=handler
 notifyTopics=/after
 href=%{ajaxTest}
 align=left
 indicator=indicator/
  
   My Javascript looks like this:
  
   function handler(widget, node)
   {
  alert(DEBUG in handler);
   }
  
   dojo.event.topic.subscribe(/after,
  function(data,
   type, e)
   {
  alert(Lineup saved);
   });
  
   The documentation says this:
  
   'handler' is the name of the function
 that
will
  take
   care of making the AJAX request. Dojo's
  widget
and
  dom
   node are passed as parameters).
  
   But I do not see any example of how to
actually do
   that.  I guess it is some Dojo magic but
looking
   through the Dojo documentation has not
  proved
   illuminating.  (BTW, I know if I do not
  have
  handler
   specified it calls the action but I need
  to do
  some
   JavaScript work beforehand.)
  
   Thanks,
  
   Scott
  
  
   
  __
   Do You Yahoo!?
 
=== message truncated ===


__
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: submit tag and handler

2007-05-03 Thread Musachy Barroso

I should have asked this first, if all you want to do is do something before
the request, why don't you use notifyTopics?

musachy

//if you really have to hack around reloadContent, it is defined here:

http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/Bind.js?view=markup

On 5/3/07, Scott Nesbitt [EMAIL PROTECTED] wrote:



Anybody have a suggestion on this?  Or do I just need
to wait until the next version of Struts?

Thanks,

Scott

--- Scott Nesbitt [EMAIL PROTECTED] wrote:


 Well, I tried this:

 function handler(widget, node)
 {
var beforeTopicsArray =
 widget.beforeNotifyTopicsArray;
widget.beforeNotifyTopicsArray = null;
widget.reloadContents();
widget.beforeNotifyTopicsArray =
 beforeTopicsArray;
 }

 and now I do not get a stack overflow, but the
 action
 is still not getting called.

 Scott

 --- Musachy Barroso [EMAIL PROTECTED] wrote:

  My bad, the notifyTopics are published inside that
  function so it won't
  work. Warning: Hack ahead :)
 
  var beforeTopicsArray =
  widget.beforeNotifyTopicsArray;
  widget.beforeNotifyTopicsArray = null;
  widget.reloadContents();
  widget.beforeNotifyTopicsArray =
 beforeTopicsArray;
 
  I will add a refreshContent method that will be
  common for all of the
  widgets (and part of the api), with one
  parameter(boolean), to skip the
  publishing of the topics.
 
  musachy
 
  On 5/2/07, Scott Nesbitt [EMAIL PROTECTED]
  wrote:
  
  
   Hmm, this:
  
   function handler(widget, node)
   {
  widget.reloadContents();
   }
  
   Gives Stack overflow at line: 4872
  
   Scott
  
   --- Musachy Barroso [EMAIL PROTECTED] wrote:
  
If you are using submit, or anchor tag you can
  call
reloadContents() on
the widget passed as a parameter, if you are
  using
the div tag, you can call
refresh() on it. These functions are not
  really
part of the api and might
change in the future (although it would be
 nice
  if
they were right?).
   
musachy
   
On 5/2/07, Scott Nesbitt
  [EMAIL PROTECTED]
wrote:


 Yes, I would like to do the request in the
JavaScript
 because I need to do some other work there
  before
the
 request happens.

 If I knew how Struts did the request I would
  just
do
 the same thing at the bottom of my function.

 Scott

 --- Musachy Barroso [EMAIL PROTECTED]
 wrote:

  The whole idea behind the handler
 function
  is
that
  you are going to make
  the request yourself, instead of letting
  struts
do
  it for you. The handler
  is just a plain javascript function like:
 
  function superHandler(widget, domNode) {
//use some other framework to do the
 ajax
request,
  Dojo, Prototype, YUI,
  DWR, JQuery,zillion_framework_name
  }
 
  is that what you are trying to do? do the
request
  yourself?
 
  musachy
 
  On 5/2/07, Scott Nesbitt
[EMAIL PROTECTED]
  wrote:
  
   Does anyone know how to invoke a request
  from
a
  submit
   handler function?
  
  
   I am using a submit tag like this:
  
   div id=t1Div 1/div
   s:url id=ajaxTest
  value=SaveLineup.action
/
   img id=indicator
src=images/indicator.gif
alt=Loading...
style=display:none/
   s:submit type=submit
 theme=ajax
 value=Save
 title=Save all changes.
 cssClass=butstylewide
 targets=t1
 handler=handler
 notifyTopics=/after
 href=%{ajaxTest}
 align=left
 indicator=indicator/
  
   My Javascript looks like this:
  
   function handler(widget, node)
   {
  alert(DEBUG in handler);
   }
  
   dojo.event.topic.subscribe(/after,
  function(data,
   type, e)
   {
  alert(Lineup saved);
   });
  
   The documentation says this:
  
   'handler' is the name of the function
 that
will
  take
   care of making the AJAX request. Dojo's
  widget
and
  dom
   node are passed as parameters).
  
   But I do not see any example of how to
actually do
   that.  I guess it is some Dojo magic but
looking
   through the Dojo documentation has not
  proved
   illuminating.  (BTW, I know if I do not
  have
  handler
   specified it calls the action but I need
  to do
  some
   JavaScript work beforehand.)
  
   Thanks,
  
   Scott
  
  
   
  __
   Do You Yahoo!?

=== message truncated ===


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


Re: Problem with s:param tag

2007-05-03 Thread Felipe Rodrigues


I'm sorry, but I'm away from my code, so I'll try to reproduce here.
The code is pretty simple.

-- END OF CODE


The JSP:
c:foreach items=somMap var=mapItem

   s:url action=Home!loadHome id=myURL
  s:param name=someAtt value=${mapItem.value.id}/
   /s:url

   s:a href=%{myURL} notifyTopic=myTopic theme=ajax
target=someDivMyLink/s:a

/c:forEach

=

The Action

public class HomeAction {

  private String someAtt;

 public void setSomeAtt(String someAtt){
  //Here someAtt has the value of param, and the appended  .
   this.someAtt = someAtt;
 }

  public String loadHome(){
 // some stuff here.
 return success;
  }

}

-- END OF CODE


I think this cover all things. There is some others details, like all of
that is inside a TabbedPannel, but I don't think this matters.
When I'm debbugging I can see the value in the session represented by this
one ${mapItem.value.id} is ok (without  )
but when I got my breakpoint at setSomeAtt the value has the  as its last
charracter.

So weird, but I'm wondering if no one else have seen this behavior.

If this code is not enougth, let me know and tomorrow I can send you the
real piece of code.

Thanks,


Felipe





Laurie Harper wrote:
 
 Felipe Rodrigues wrote:
 Hi guys,
 
 Sometimes when I use s:param tag, the value that I got in my action has
 a 
 appended to it. I can treat that by replacing this, but it is not a good
 solution.
 Does anybody heard anything about that? 
 I've looked at the source code of param tag in the Struts source code,
 and
 there is a findValue(String expr) that calls ValueStack.findValue(String
 expr) as well. What exactly is that expr (to me seems to be the name we
 define in param tag). Anyway, I didn't found anything wrong there, but I
 don't know how the value get there.
 
 The param tag's 'value' attribute is evaluated -- i.e. the value you 
 supply is treated as an OGNL expression. See the tag syntax 
 documentation for details.
 
 Without seeing an example of this behaviour (i.e. some code/markup that 
 reproduces the problem) it's going to be difficult to diagnose. Can you 
 come up with a minimal test case that demonstrates the behaviour you're 
 describing?
 
 L.
 
 [1] http://struts.apache.org/2.x/docs/tag-syntax.html
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Problem-with-%3Cs%3Aparam%3E-tag-tf3687887.html#a10313557
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: CSS styles for Table Tags

2007-05-03 Thread Shahak Nagiel
Musachy-

No offense to you or Tom, obviously.  I think Table Tags show good potential 
and look forward to seeing them progress.  But for now, I've found Display Tags 
offers a lot more out of the box.

- Original Message 
From: Musachy Barroso [EMAIL PROTECTED]
To: Struts Users Mailing List user@struts.apache.org
Sent: Thursday, May 3, 2007 4:32:02 PM
Subject: Re: CSS styles for Table Tags

I hope Tom is not reading this :). I'd also suggest using displaytag for
now.

musachy

On 5/3/07, Shahak Nagiel [EMAIL PROTECTED] wrote:

 For rendering tables, I strongly recommend the SourceForge Display Tag
 library (http://displaytag.sourceforge.net/11/index.html) over Table
 Tags.  The latter offers better Struts and FreeMarker integration, but
 Display Tag is far more evolved from an API perspective and abstracts away a
 lot of lower-level plumbing (like sorting) that Table Tags still requires
 you to write.


 - Original Message 
 From: Olivier THIERRY [EMAIL PROTECTED]
 To: Struts Users Mailing List user@struts.apache.org
 Sent: Thursday, May 3, 2007 1:54:02 PM
 Subject: Re: CSS styles for Table Tags

 Yes, the s:table tag is deprecated, but this is not what I use.
 I use the Table Tags plugin :
 http://cwiki.apache.org/S2PLUGINS/table-tags.html

 2007/5/3, Felipe Rodrigues [EMAIL PROTECTED]:
 
 
  Isn't it deprecated?
  Just to make sure.
 
  Regards,
 
  Felipe
 
 
  Olivier THIERRY wrote:
  
   Hi,
  
   I use the Table Tags plugin, but I can't find a way to apply CSS
 classes
   to
   table or thead tags generated by the plugin since there is no cssClass
  or
   similar attribute.
   Does anyone have an idea about this ?
  
   Olivier
  
  
 
  --
  View this message in context:
  http://www.nabble.com/CSS-styles-for-Table-Tags-tf3686504.html#a10309873
  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: CSS styles for Table Tags

2007-05-03 Thread Shahak Nagiel
Musachy-

No offense to you or Tom, obviously.  I think Table Tags show good potential 
and look forward to seeing them progress.  But for now, I've found Display Tags 
offers a lot more out of the box.

- Original Message 
From: Musachy Barroso [EMAIL PROTECTED]
To: Struts Users Mailing List user@struts.apache.org
Sent: Thursday, May 3, 2007 4:32:02 PM
Subject: Re: CSS styles for Table Tags

I hope Tom is not reading this :). I'd also suggest using displaytag for
now.

musachy

On 5/3/07, Shahak Nagiel [EMAIL PROTECTED] wrote:

 For rendering tables, I strongly recommend the SourceForge Display Tag
 library (http://displaytag.sourceforge.net/11/index.html) over Table
 Tags.  The latter offers better Struts and FreeMarker integration, but
 Display Tag is far more evolved from an API perspective and abstracts away a
 lot of lower-level plumbing (like sorting) that Table Tags still requires
 you to write.


 - Original Message 
 From: Olivier THIERRY [EMAIL PROTECTED]
 To: Struts Users Mailing List user@struts.apache.org
 Sent: Thursday, May 3, 2007 1:54:02 PM
 Subject: Re: CSS styles for Table Tags

 Yes, the s:table tag is deprecated, but this is not what I use.
 I use the Table Tags plugin :
 http://cwiki.apache.org/S2PLUGINS/table-tags.html

 2007/5/3, Felipe Rodrigues [EMAIL PROTECTED]:
 
 
  Isn't it deprecated?
  Just to make sure.
 
  Regards,
 
  Felipe
 
 
  Olivier THIERRY wrote:
  
   Hi,
  
   I use the Table Tags plugin, but I can't find a way to apply CSS
 classes
   to
   table or thead tags generated by the plugin since there is no cssClass
  or
   similar attribute.
   Does anyone have an idea about this ?
  
   Olivier
  
  
 
  --
  View this message in context:
  http://www.nabble.com/CSS-styles-for-Table-Tags-tf3686504.html#a10309873
  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] problem with action chaining returning input result

2007-05-03 Thread Allen Gilliland



Laurie Harper wrote:

Allen Gilliland wrote:
when chaining from one action to another, why is struts2 trying to 
lookup the input result on action2 before ever executing my action 
method?


i have a simple config, like the examples in the documentation ...

action name=members!* method={1}
class=org.apache.roller.ui.authoring.struts2.Members
result name=list type=tiles.Members/result
/action

action name=invite!* method={1}
class=org.apache.roller.ui.authoring.struts2.MembersInvite
result name=input type=tiles.MembersInvite/result
result name=disabled type=tiles.disabled/result
result name=success type=chainmembers/result
/action

when i execute the 'invite' action it stores an invitation in the db 
and adds an action message to notify the user and then i return 
SUCCESS, which should just chain to the execute() method of my 
'members' action right?


well when i do this everything works properly in the 'invite' action 
and through debugging i can see that my 'members' action class is 
instantiated as if it's going to be executed, but the execute() method 
is never called and struts2 gives an error about not being able to 
find the input result on my 'members' action.  why is this happening?


No result defined for action 
org.apache.roller.ui.authoring.struts2.Members and result input


Well, firstly, you don't have a result named 'input' on your members 
action... but I guess you're more interested in why Struts is looking 
for it :-)


yep, and i don't need an 'input' result on that action.  the baffling 
part to me is why struts2 is even trying to look for that result when 
nothing in my action returns that result.





Does the members action have any conversion or validation configured? 
Struts will automatically forward to the 'input' result if errors occur 
during conversion or validation. If that's not it, you'll need to post 
more details, such as your action code and anything written to the logs 
as the request is being processed.


nope, no conversion or validation.  i ran into the problem with the 
validation interceptor when i first started working with struts2 and 
mistakenly had a validation() method in my action without realizing 
struts2 was going to execute that method without my knowledge, but i 
removed all my old validation() methods so i know it's not that.


i'll post the skeleton of the action class if that will help, but it's 
quite simple.


public class Members extends UIAction implements ParameterAware {

private static Log log = LogFactory.getLog(Members.class);

// raw parameters from request
private Map parameters = Collections.EMPTY_MAP;


public Members() {
log.debug(Instantiating members action);
}

public String execute() {

log.debug(Showing weblog members page);

return LIST;
}

public String save() {

log.debug(Attempting to processing weblog permissions updates);

... do work ...

return LIST;
}

// convenience for accessing a single parameter with a single value
public String getParameter(String key) ...

public Map getParameters() ...

public void setParameters(Map parameters) ...
}


here's the full debugging output from my logs showing that the first 
action successfully completes and returns a SUCCESS result which chains 
to the second action, but I can't figure out what is causing struts2 to 
bail on the chain execution before even calling my action method ...


DEBUG 2007-05-03 14:42:57,717 MembersInvite:save - Invitation 
successfully recorded
DEBUG 2007-05-03 14:42:57,727 ActionChainResult:execute - Chaining to 
action members
DEBUG 2007-05-03 14:42:57,729 DefaultActionProxy:init - Creating an 
DefaultActionProxy for namespace /roller-ui/authoring and action name 
members
DEBUG 2007-05-03 14:42:57,731 ActionConfigMatcher:match - Attempting to 
match 'members' to a wildcard pattern, 32 available
DEBUG 2007-05-03 14:42:57,733 ActionConfigMatcher:match - Path matches 
pattern 'members!*'

DEBUG 2007-05-03 14:42:57,735 Members:init - Instantiating members action
DEBUG 2007-05-03 14:42:57,737 I18nInterceptor:intercept - intercept 
'/roller-ui/authoring/members' {
DEBUG 2007-05-03 14:42:57,739 I18nInterceptor:intercept - 
requested_locale=null
DEBUG 2007-05-03 14:42:57,741 I18nInterceptor:intercept - before 
Locale=en_US
DEBUG 2007-05-03 14:42:57,763 InstantiatingNullHandler:nullPropertyValue 
- Entering nullPropertyValue 
[EMAIL PROTECTED], 
[EMAIL PROTECTED], 
[EMAIL PROTECTED], property=inviteMember]
DEBUG 2007-05-03 14:42:57,775 InstantiatingNullHandler:nullPropertyValue 
- Entering nullPropertyValue 
[EMAIL PROTECTED], 
[EMAIL PROTECTED], 
[EMAIL PROTECTED], property=struts]
DEBUG 2007-05-03 14:42:57,791 FileUploadInterceptor:intercept - 
Bypassing /roller-ui/authoring/ members
DEBUG 2007-05-03 14:42:57,793 StaticParametersInterceptor:intercept - 
Setting static parameters {}
DEBUG 2007-05-03 14:42:57,796 

Re: [s2] problem with action chaining returning input result

2007-05-03 Thread Dave Newton
--- Allen Gilliland [EMAIL PROTECTED] wrote:
 [...] i removed all my old validation() methods so i

 know it's not that.
 
 public class Members extends UIAction 

What does UIAction look like (specifically with
regards to interfaces implements and superclasses)?

There must be *some* reason validation is running.

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] problem with action chaining returning input result

2007-05-03 Thread Allen Gilliland



Dave Newton wrote:

--- Allen Gilliland [EMAIL PROTECTED] wrote:

[...] i removed all my old validation() methods so i



know it's not that.

public class Members extends UIAction 


What does UIAction look like (specifically with
regards to interfaces implements and superclasses)?


UIAction is a base class which all of my actions extend and basically it 
just builds some additional application specific features on top of the 
ActionSupport class.  I won't include the whole thing, but here's a 
sample ...


public abstract class UIAction extends ActionSupport
implements UIActionPreparable, UISecurityEnforced {

// a common result name used to indicate the result should list 
some data

public static final String LIST = list;

// the authenticated user accessing this action, or null if client 
is not logged in

private UserData authenticatedUser = null;

// the weblog this action is intended to work on, or null if no 
weblog specified

private WebsiteData actionWeblog = null;

// page title
protected String pageTitle = null;


public void myPrepare() {
// no-op
}

public String getAbsoluteSiteURL() {
return RollerRuntimeConfig.getAbsoluteContextURL();
}

// access an application config property
public String getProp(String key) {
// first try static config
String value = RollerConfig.getProperty(key);
if(value == null) {
value = RollerRuntimeConfig.getProperty(key);
}

return (value == null) ? key : value;
}

public void addError(String errorKey) {
addActionError(getText(errorKey));
}

public void addError(String errorKey, String param) {
addActionError(getText(errorKey, errorKey, param));
}

public void addError(String errorKey, List args) {
addActionError(getText(errorKey, args));
}

// list of locales to display in web form dropdowns
public List getLocalesList() {
return UIUtils.getLocales();
}

// list of time zones to display in web form dropdowns
public List getTimeZonesList() {
return UIUtils.getTimeZones();
}

}


As I said above, all my actions extend UIAction, so I would think if 
there were a problem there then i would be seeing it on all my actions.


The 2 interfaces it implements are custom interfaces which work 
basically the same way the struts2 XXXAware interfaces work.  They are 
coupled with custom interceptors which take a look at the request/action 
before the action method is executed and do some prework.  This is what 
they look like ...


public interface UIActionPreparable {

public void myPrepare();
}

public interface UISecurityEnforced {

public boolean isUserRequired();

public boolean isWeblogRequired();

public String requiredUserRole();

public short requiredWeblogPermissions();
}


From the debugging output I can see that when struts2 is trying to 
execute the action I am chaining to it never actually gets to my custom 
interceptors, so I don't think the problem is there.  Plus, none of my 
custom interceptors return input as a result.


not sure what else it could be :(

-- Allen




There must be *some* reason validation is running.

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: [s2] problem with action chaining returning input result

2007-05-03 Thread Dave Newton
--- Allen Gilliland [EMAIL PROTECTED] wrote:
 public abstract class UIAction extends ActionSupport

Okay, so now the question is why it thinks there's a
validation error on your subclass-we know *why* it's
trying to validate (ActionSupport implements the
validation interfaces).

Are there *any* validation files (etc) in your app?
Any that are for the model being submitted to the
subclass? Does the superclass implement a validation
method?

Process of elimination :)

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: CSS styles for Table Tags

2007-05-03 Thread Patrick J. Maloney

Shahak Nagiel wrote:

For rendering tables, I strongly recommend the SourceForge Display Tag library 
(http://displaytag.sourceforge.net/11/index.html) over Table Tags.  The latter 
offers better Struts and FreeMarker integration, but Display Tag is far more 
evolved from an API perspective and abstracts away a lot of lower-level 
plumbing (like sorting) that Table Tags still requires you to write.



I've been experimenting with table tags and found that the sorting does 
not work in the provided example...is the example broken or it tabletags?


I also don't like that TT seems to assume that your jsp is in a 
directory one level below the app context...otherwise, it won't find the 
images for the sortable header.  There are classes in the CSS file for 
these images, but they don't appear to be used.


tia


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



Re: [s2] problem with action chaining returning input result

2007-05-03 Thread Allen Gilliland



Dave Newton wrote:

--- Allen Gilliland [EMAIL PROTECTED] wrote:

public abstract class UIAction extends ActionSupport


Okay, so now the question is why it thinks there's a
validation error on your subclass-we know *why* it's
trying to validate (ActionSupport implements the
validation interfaces).

Are there *any* validation files (etc) in your app?
Any that are for the model being submitted to the
subclass? Does the superclass implement a validation
method?


Any validation that is happening would be accidental, I have not 
configured anything to actually try to use the struts2 validation.


This is the top of my config where all the interesting stuff happens, 
everything else is just action definitions and none of my actions 
contain any elements other than results.


!-- Weblogger default package --
package name=weblogger namespace=/roller-ui 
extends=struts-default


!-- Define Tiles result type --
result-types
result-type name=tiles 
class=org.apache.struts2.views.tiles.TilesResult /

/result-types

!-- define our own interceptors and a custom interceptor stack --
interceptors
interceptor name=UIActionInterceptor

class=org.apache.roller.ui.core.util.struts2.UIActionInterceptor /
interceptor name=UISecurityInterceptor

class=org.apache.roller.ui.core.util.struts2.UISecurityInterceptor /
interceptor name=UIActionPrepareInterceptor

class=org.apache.roller.ui.core.util.struts2.UIActionPrepareInterceptor /

interceptor-stack name=rollerStack
interceptor-ref name=defaultStack/
interceptor-ref name=UIActionInterceptor/
interceptor-ref name=UISecurityInterceptor/
interceptor-ref name=UIActionPrepareInterceptor/
/interceptor-stack
/interceptors

!-- use our own interceptor stack which extends the default 
stack --

default-interceptor-ref name=rollerStack/


I can't see any reason why validation would be doing anything at all 
unless somehow the validation interceptor wants to use one of the 
methods in my action class for validation when i didn't intend that.


-- Allen




Process of elimination :)

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: [s2] problem with action chaining returning input result

2007-05-03 Thread Dave Newton
--- Allen Gilliland [EMAIL PROTECTED] wrote:
 I can't see any reason why validation would be doing
 anything at all unless somehow the validation 
 interceptor wants to use one of the methods in my 
 action class for validation when i didn't intend 
 that.

So you have no *-validation.xml files? No methods
named validate*?

Hrm.

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] problem with action chaining returning input result

2007-05-03 Thread Martin Gainty
struts-default.xml has the ability to exclude methods as in this example 
which excludes methods (method1, method2) from validation


interceptor-ref name=defaultStack
param name=validation.excludeMethodsmethod1,method2/param
/interceptor-ref

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: Dave Newton [EMAIL PROTECTED]

To: Struts Users Mailing List user@struts.apache.org
Sent: Thursday, May 03, 2007 9:38 PM
Subject: Re: [s2] problem with action chaining returning input result



--- Allen Gilliland [EMAIL PROTECTED] wrote:

I can't see any reason why validation would be doing
anything at all unless somehow the validation
interceptor wants to use one of the methods in my
action class for validation when i didn't intend
that.


So you have no *-validation.xml files? No methods
named validate*?

Hrm.

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: [s2] problem with action chaining returning input result

2007-05-03 Thread Daniel Ruan

Or maybe the @SkipValidation annotation?

On 5/3/07, Martin Gainty [EMAIL PROTECTED] wrote:


struts-default.xml has the ability to exclude methods as in this example
which excludes methods (method1, method2) from validation

interceptor-ref name=defaultStack
param name=validation.excludeMethodsmethod1,method2/param
/interceptor-ref

Martin--



Re: CSS styles for Table Tags

2007-05-03 Thread Musachy Barroso

Not taken as I'm recommending displaytags also :). Tom needed some tags for
rendering tables using freemarker and that's Tabletags, I'm not sure where
he will take it from there. Hey Tom, are you there? just nod if you can
hear me.

musachy

On 5/3/07, Shahak Nagiel [EMAIL PROTECTED] wrote:


Musachy-

No offense to you or Tom, obviously.  I think Table Tags show good
potential and look forward to seeing them progress.  But for now, I've found
Display Tags offers a lot more out of the box.

- Original Message 
From: Musachy Barroso [EMAIL PROTECTED]
To: Struts Users Mailing List user@struts.apache.org
Sent: Thursday, May 3, 2007 4:32:02 PM
Subject: Re: CSS styles for Table Tags

I hope Tom is not reading this :). I'd also suggest using displaytag for
now.

musachy

On 5/3/07, Shahak Nagiel [EMAIL PROTECTED] wrote:

 For rendering tables, I strongly recommend the SourceForge Display Tag
 library (http://displaytag.sourceforge.net/11/index.html) over Table
 Tags.  The latter offers better Struts and FreeMarker integration, but
 Display Tag is far more evolved from an API perspective and abstracts
away a
 lot of lower-level plumbing (like sorting) that Table Tags still
requires
 you to write.


 - Original Message 
 From: Olivier THIERRY [EMAIL PROTECTED]
 To: Struts Users Mailing List user@struts.apache.org
 Sent: Thursday, May 3, 2007 1:54:02 PM
 Subject: Re: CSS styles for Table Tags

 Yes, the s:table tag is deprecated, but this is not what I use.
 I use the Table Tags plugin :
 http://cwiki.apache.org/S2PLUGINS/table-tags.html

 2007/5/3, Felipe Rodrigues [EMAIL PROTECTED]:
 
 
  Isn't it deprecated?
  Just to make sure.
 
  Regards,
 
  Felipe
 
 
  Olivier THIERRY wrote:
  
   Hi,
  
   I use the Table Tags plugin, but I can't find a way to apply CSS
 classes
   to
   table or thead tags generated by the plugin since there is no
cssClass
  or
   similar attribute.
   Does anyone have an idea about this ?
  
   Olivier
  
  
 
  --
  View this message in context:
 
http://www.nabble.com/CSS-styles-for-Table-Tags-tf3686504.html#a10309873
  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: [S2] populating user roles

2007-05-03 Thread Flemming Seerup
Thanks, that what was I was looking for.  I will   take a look at your 
example,

but I'm also considering just writing my own RolesInterceptor ...

F


Quoting Josh Vickery [EMAIL PROTECTED]:

Flemming, if you are not using JAAS, and don't want to interact with
it, you can fake it by wrapping the HttpServletRequest in a servlet
filter.  This is the method used by SecurityFilter
(http://securityfilter.sourceforge.net/) and is very easy to
implement.

Here are some code snippets:
A filter, applied to /* in web.xml

public void doFilter(ServletRequest request, ServletResponse response,
FilterChain chain) throws IOException, ServletException {
   UserSession  userSession = (UserSession)
session.getAttribute(Constants.USER_SESSION);
request = new JaasRequestWrapper((HttpServletRequest)request, 
userSession);
chain.doFilter(request, response);
}

and then JaasRequestionWrapper.java:

public class JaasRequestWrapper extends HttpServletRequestWrapper {

   private UserSession userSession;
   public JaasRequestWrapper(HttpServletRequest request, UserSession
userSession)
   {
   super(request);
   this.userSession = userSession;
   }

   @Override
   public boolean isUserInRole(String role) {
   return userSession.hasRole(role);
   }
}

Where UserSession, is something that you store in the session at user
login containing a list of roles to check against.


On 5/2/07, Flemming Seerup [EMAIL PROTECTED] wrote:
Am I missing something?   I have a working version of an 
AuthInterceptor, but

still no examples on how to control isUserInRole().

On manning.com I found a lightbody_src.zip from WW in action, but it doesn't
handle roles.
Could anybody tell me the location of Mark Mernards blog?

/Flemming


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







This message was sent using IMP, the Internet Messaging Program.


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



Re: [S2] How to change Invalid field value for field message in tr

2007-05-03 Thread Struts2 Fan

Yes I checked them. I didn't write any validation for these fields. Struts 2
controls double, int, date fields and if they are not valid it writes the
message Invalid field value for field property.intValue . I couldn't find
where the message is defined. So I couldn't write the message for Turkish
locale.

Here is the error message displayed. I didn't write anything for validation.
It is a integer type field.
http://www.nabble.com/file/8209/invalidFieldError.JPG 


-- 
View this message in context: 
http://www.nabble.com/-S2--How-to-change-%22Invalid-field-value-for-field%22-message-in-tr-tf3688720.html#a10317222
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: Struts Action value empty in IE, but works fine in Firefox

2007-05-03 Thread Tapio Holopainen

Have you tried with different property name than 'action'?

I had problems with IE's Javascript when one of my form's hidden field  
name was 'action' (and it worked with Firefox and Opera)


Regards,

- Tapio


On Thu, 03 May 2007 20:53:49 +0300, Musachy Barroso [EMAIL PROTECTED]  
wrote:



What version of struts are you using? Can you post your jsp page? Are you
using the ajax theme (is S2)? Based only on what you have said is quite
difficult to guess what the problem is.

regards
musachy

On 5/3/07, Manudath Gurudatha [EMAIL PROTECTED] wrote:


Hi,
I have a JSP which has a corresponding action class in my application
based
on Struts (actually I am Struts newbie... so dont know much about it)  
The
Controller class which handles all the requests can see the action  
value
as setdefault when I click on next.gif in Mozilla. However, it comes  


in
IE. I see several similar incidents on the Web forums, but none have  
given

a
proper solution (Someone said that IE prints some Loading... message
which
clears the submit criteria and so on...)

html:image property=action value=setdefault src=next.gif /

Can anyone please tell me what the problem is, and how do I get around  
it

to
make it work on IE?

Thanks,
Manu









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