Re: [S2] File upload in a tabbedpanel?

2007-12-04 Thread Jeromy Evans

Jason Wyatt wrote:

I'm trying to implement a file upload tab in an ajax-themed tabbed panel,
using the  tag.

The file uploading works OK if I view the action directly instead of inside
a tabbedpanel.

However, if I view the file upload page inside an ajax tabbedpanel and try
submitting, with or without a file attached, the relevant action doesn't
seem to get hit anymore, and the enigmatic message "undefined" is displayed
in the tab, with nothing else shown. 


It also appears the interceptors are not being hit.

I've pored over the Nabble archives but haven't been able to find a solution
to this. Has anyone overcome this problem?

Thanks,

Jason

  

Hi Jason,
My guess is that the s:form/s:submit is accidentally inheriting the ajax 
theme when it's inside the tabbed panel/on that page and thus performing 
an XHR post without the multipart.  Did you want to use XHR?  If not, 
try placing a theme=simple explicitly on your form/form's submit button 
to see if that fixes it (or at least isolates it).   I haven't tried a 
multipart XHR via dojo but it must be also possible.


regards,
Jeromy Evans


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



Re: Struts2 examples for request parameters

2007-12-04 Thread Nuwan Chandrasoma

Hi,

Have a look at this blog..

http://www.vitarara.org/cms/struts_2_cookbook/creating_a_login_interceptor

Thanks to Mark :)

Thanks,

Nuwan


Ray wrote:

pavan kumargss 写道:

Hai

i am working struts2

i used the ServletRequestAware,ServletResponseAware,
SessionAware  Interfaces ..
But i don' t understand how to use the ParameterAwate interface

i tryed it like using setParameters() and getParameters()..
i get the null values only..

  

Maybe I misunderstood the function by the method name.
So... If I want to check the input data with my own Interceptor before 
invoke the real action class.
How can I get the input data in my own Interceptor. I mean the data 
inputed in the JSP like username, password etc.

Would someone show a little example.
Thx.




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



Re: How my own Interceptor get the parameters from JSP

2007-12-04 Thread Nuwan Chandrasoma

Hi,

Some code like this.

   public String execute() throws Exception {

   String[] name = (String[])parameterMap.get("username");
   System.out.println("usernamein the page is:"+name[0]);

   String[] datenow = (String[])parameterMap.get("dateNow");
   System.out.println("datenow in the page is:"+datenow[0]);


   return SUCCESS;
   }

Thanks,

Nuwan

Ray wrote:

Nuwan Chandrasoma Wrote:

Hi,

Its returning a string array. :)

Thanks,

Nuwan


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



String array?
And How can I get the "username" value which I just input in the JSP?
I am almost crazy about this.
Thx Ray

-
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]



DisplayTag - How to do sort?

2007-12-04 Thread quinquin2209

I have just downloaded the DisplayTag and try with the sort function. I do
the following:




 

When I click on the column header, it displays "Nothing found to display".
The URL has been changed to
http://localhost:8080/test/jsp/folderList.jsp?d-49653-s=0&d-49653-o=2&d-49653-p=1

My folderList.jsp is actually called up through the URL: 

http://locahost:8080/test/Folder/list.action 

as defined in the struts.xml. How can I do such that the sorting can be done
as expected?



-- 
View this message in context: 
http://www.nabble.com/DisplayTag---How-to-do-sort--tf4947714.html#a14165999
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: How my own Interceptor get the parameters from JSP

2007-12-04 Thread Ray

Nuwan Chandrasoma Wrote:

Hi,

Its returning a string array. :)

Thanks,

Nuwan


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



String array?
And How can I get the "username" value which I just input in the JSP?
I am almost crazy about this.
Thx  
   Ray


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



Re: Struts2 examples for request parameters

2007-12-04 Thread Ray

pavan kumargss 写道:

Hai

i am working struts2

i used the ServletRequestAware,ServletResponseAware,
SessionAware  Interfaces ..
But i don' t understand how to use the ParameterAwate interface

i tryed it like using setParameters() and getParameters()..
i get the null values only..

  

Maybe I misunderstood the function by the method name.
So... If I want to check the input data with my own Interceptor before 
invoke the real action class.
How can I get the input data in my own Interceptor. I mean the data 
inputed in the JSP like username, password etc.

Would someone show a little example.
Thx.

--
Ray Chen(陈磊)
Email:[EMAIL PROTECTED]
Blog: http://clraychen.blogcn.com


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



Re: How my own Interceptor get the parameters from JSP

2007-12-04 Thread Nuwan Chandrasoma

Hi,

Its returning a string array. :)

Thanks,

Nuwan

Ray wrote:
I tried to use getInvocationContext.getparameters this method return a 
Map. when I use Map's get method by key"username"

I got a result like "@1c98b2"
what's going on?
Thx




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



Struts2 examples for request parameters

2007-12-04 Thread pavan kumargss
Hai

i am working struts2

i used the ServletRequestAware,ServletResponseAware,
SessionAware  Interfaces ..
But i don' t understand how to use the ParameterAwate interface

i tryed it like using setParameters() and getParameters()..
i get the null values only..


How my own Interceptor get the parameters from JSP

2007-12-04 Thread Ray
I tried to use getInvocationContext.getparameters this method return a 
Map. when I use Map's get method by key"username"

I got a result like "@1c98b2"
what's going on?
Thx

--
Ray Chen(陈磊)
Email:[EMAIL PROTECTED]
Blog: http://clraychen.blogcn.com


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



How to solve the limitation of tag

2007-12-04 Thread DJR

As is know to all,  tag has a "buttonCssStyle"
attribute, which will make all buttons look in a unified style. But how can
we make each button in a different style just like the image showed below:
http://www.nabble.com/file/p14163637/optiontransvertical.png 
-- 
View this message in context: 
http://www.nabble.com/How-to-solve-the-limitation-of-%3Cs%3Aoptiontransferselect%3E-tag-tf4946943.html#a14163637
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: Scrollbar problem with tabbed panel in Struts2

2007-12-04 Thread quinquin2209

Thanks for reply

Yes. The content of the tab remains, just the scrollbar appears/disappears. 

I have tried an experiment in the tabbed panel example in struts2-showcase
as follow:

1. Open file example2.jsp located at 
struts2-showcase-2.0.11\ajax\tabbedpanel
2. Edit the tab content of tab with label "test1" such that it exceeds panel
size
3. Run tomcat and visit that page. You will find that tab "test1" has scroll
bar shown correctly
4. Click on tab header "test1". You will find the scroll bar disappear. Only
the content remains
5. Click on tab header "test1" again. The scroll bar re-appear.

This problem also occurs if you switch from one tab to another tab.

Queenie


newton.dave wrote:
> 
> --- Martin Gainty <[EMAIL PROTECTED]> wrote:
>> when current pane exceeds panel scrollbar is shown
> is correct
> 
> I believe the issue is that the scrollbar appears and
> disappears when the tab is clicked.
> 
>> From: "quinquin2209"
>>> However, if I click on the tab-header of the
> currently opened tab, the
>>> scrollbar disappear. It appears again if i click
> that tab-header again.
> 
> The content of the tab remains, just the scrollbar
> appears/disappears?
> 
> d.
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Scrollbar-problem-with-tabbed-panel-in-Struts2-tf4942576.html#a14163615
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] File upload in a tabbedpanel?

2007-12-04 Thread Jason Wyatt
I'm trying to implement a file upload tab in an ajax-themed tabbed panel,
using the  tag.

The file uploading works OK if I view the action directly instead of inside
a tabbedpanel.

However, if I view the file upload page inside an ajax tabbedpanel and try
submitting, with or without a file attached, the relevant action doesn't
seem to get hit anymore, and the enigmatic message "undefined" is displayed
in the tab, with nothing else shown. 

It also appears the interceptors are not being hit.

I've pored over the Nabble archives but haven't been able to find a solution
to this. Has anyone overcome this problem?

Thanks,

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]



Re: Struts2: tabbedPanel with no cssStyle bug?

2007-12-04 Thread elentz

> If doLayout is true the height css attribute is mandatory.  It applis 
> cssStyle directly to every tab.
> If doLayout is false, the height is determined by the content and varies 
> tab-to-tab.
> 
> I'm not sure what you were hoping for by setting doLayout=true but not 
> setting cssStyle.  I presume it's applying a zero height.
> http://struts.apache.org/2.0.11/docs/ajax-tags.html#AjaxTags-tabbedPanelTag

I wasn't using doLayout as it doesn't show in Eclipse's properties for that
tag.  I checked the source and it is valid so I tried all combinations of
with and without doLayout and with and without cssStyle and found that now
it works without having the cssStyle and with or without doLayout - it all
looks and acts the same.  I used to have the NiftyTags.js and was calling it
as seen on the demo.  Maybe that was causing the problem?  Anyway, I can't
duplicate it now so on to other things.  Thanks for the help.

-- 
View this message in context: 
http://www.nabble.com/Struts2%3A-tabbedPanel-with-no-cssStyle-bug--tf4944709.html#a14160899
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: Action call not calling action method

2007-12-04 Thread Martin Gainty
Henry

difficult to say without seeing the interceptor stack from
struts-default.xml
Please post to group

M--
LA County ..465 square miles of constantly interfacing humanity - Dragnet
quote from Dan Ackroyd

- Original Message -
From: "Henry Park" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Sent: Tuesday, December 04, 2007 11:48 AM
Subject: Action call not calling action method


Hello everyone, I am having a really strange issue.  In my application I
have a menu bar and a main content area. The menu bar and main content
area are populated separately using an Ajax call to their respective
action methods. They are automatically called/populated when I log into
my application.  So when I log in, the main content area and menu bar
are successfully displayed.

When I first log into my application, everything gets loaded properly
and the appropriate action methods are called.  However when I try to
call my menu action again, it does not call my action method.  For
example, if my action call looks like this:


getUrl("MenuAction!list.action")


and my Menu Action class looks like this:


public class MenuAction extends ActionSupport implements Preparable {

  public void prepare() throws Exception {
log.debug("in prepare");
  }

  public String doList() {
log.debug("doList");
return SUCCESS;
  }
}


It enters my 'prepare()' method but does not enter my doList() method.
But on the first initial call, it does enter doList().  It seems like I
can only 'get into' the doList() method once. I even entered the action
call manually in my browser address bar but it still only enters my
prepare() method.

Here is the really strange part... on my development machine, everything
works perfectly. All the methods get called successfully.  The above
only happens when I access it from a different computer. Any ideas? I've
been trying to figure this out for days.

-
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: Struts2: tabbedPanel with no cssStyle bug?

2007-12-04 Thread Jeromy Evans

elentz wrote:

Has anyone else had the experience that using a tabbedPanel with no cssStyle
specifying width and height doesn't work?

For example, this works:


This doesn't work:


It would seem that both should work.  By not working I mean that the tabs
appear but no content within any of the children .

  
If doLayout is true the height css attribute is mandatory.  It applis 
cssStyle directly to every tab.
If doLayout is false, the height is determined by the content and varies 
tab-to-tab.


I'm not sure what you were hoping for by setting doLayout=true but not 
setting cssStyle.  I presume it's applying a zero height.

http://struts.apache.org/2.0.11/docs/ajax-tags.html#AjaxTags-tabbedPanelTag

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



Re: R: R: my execute method of action class is getting executed twice

2007-12-04 Thread Dave Newton
--- "Gigliotti, Andrea" <[EMAIL PROTECTED]> wrote:
> I tried to remove the javascript confirm message, and now it work fine!

Btw, I'm in the camp of the other comment that said you're probably
submitting it twice (without knowing, since you didn't post the complete
code). If you're doing a submit from within the handler somewhere and not
returning false to the "onclick" attribute then it will be submitted by both
your handler and via a regular form submission.

d.


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



Re: Question s:if and java variables in jsp scriplets

2007-12-04 Thread Dave Newton
Just use the status variable; that's more or less one of the reasons it's
there :)

d.

--- Marc Eckart <[EMAIL PROTECTED]> wrote:

> Hi,
> 
> I have another Problem connected to the iterator problem :-)
> 
> I have some java variables in my jsp side which do some counting for
> navigation purposes.
> I need these to decide if I want to render a tableheader (in case of the
> first element of the collection) or not.
> 
> We can't put all entries in one table, because we fold some entries, so a
> single entry has to be hidden if necessary.
> 
> I tried  and  but both did not work.
> Can I use scriptlet variables in s:if or is there another way to realize
> this?
> 
> Thanks in advance and best regards,
> Marc
> 
> __
> 
> 
> <%
> int personCount = 1;
> int accountCount = 0;
> int attorneyCount = 0;
> int top=43;
> %>
>  status="rowstatus"
> id="account">
> 
> <% trclass = "odd"; %>
> 
> 
> <% trclass = "even"; %>
>   
> 
> <%
> count++;
> accountCount++;
> info =
> showHeader+"|"+personCount+"|"+accountCount+"|"+attorneyCount+"|v";
> top += 22;
> %>
> 
> 
style="width:920px;margin-bottom:0px;position:absolute;visibility:visible;left:64px;top:<%=
> top %>px;">
>  value="n|1|2|0|v" />
>  style="width:920px;">
> 
> 
> 
>  style="color:#444;width:130px;">Konto
> BLZ
> Konto Nr
> Konto Typ
> 
> 
> 
> 
> 
>  onclick="setRowColor(5)">
> 
>  id="customer5" style="padding:0px;margin-left:17px;" />
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 


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



Question s:if and java variables in jsp scriplets

2007-12-04 Thread Marc Eckart
Hi,

I have another Problem connected to the iterator problem :-)

I have some java variables in my jsp side which do some counting for
navigation purposes.
I need these to decide if I want to render a tableheader (in case of the
first element of the collection) or not.

We can't put all entries in one table, because we fold some entries, so a
single entry has to be hidden if necessary.

I tried  and  but both did not work.
Can I use scriptlet variables in s:if or is there another way to realize
this?

Thanks in advance and best regards,
Marc

__


<%
int personCount = 1;
int accountCount = 0;
int attorneyCount = 0;
int top=43;
%>


<% trclass = "odd"; %>


<% trclass = "even"; %>
  

<%
count++;
accountCount++;
info =
showHeader+"|"+personCount+"|"+accountCount+"|"+attorneyCount+"|v";
top += 22;
%>







Konto
BLZ
Konto Nr
Konto Typ




















Re: Struts2: tabbedPanel with no cssStyle bug?

2007-12-04 Thread elentz

Oh yeah, I'm using 2.0.11
-- 
View this message in context: 
http://www.nabble.com/Struts2%3A-tabbedPanel-with-no-cssStyle-bug--tf4944709.html#a14156081
Sent from the Struts - User mailing list archive at Nabble.com.


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



Struts2: tabbedPanel with no cssStyle bug?

2007-12-04 Thread elentz

Has anyone else had the experience that using a tabbedPanel with no cssStyle
specifying width and height doesn't work?

For example, this works:


This doesn't work:


It would seem that both should work.  By not working I mean that the tabs
appear but no content within any of the children .

-- 
View this message in context: 
http://www.nabble.com/Struts2%3A-tabbedPanel-with-no-cssStyle-bug--tf4944709.html#a14156079
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: Struts2: Nested Iterators

2007-12-04 Thread Marc Eckart
Ah perfect. I looked at the tag reference on the struts2 page and there was
the var attribute.
I'm actually using 2.0.8. So this can not work :-)

Thank you very much :-)

Marc

2007/12/4, Dave Newton <[EMAIL PROTECTED]>:
>
> S2.0.mumble uses the "id" attribute to name the current iteration object.
> S2.1 uses "var". Depends on what version you're using, I guess.
>
> d.
>
> --- Marc Eckart <[EMAIL PROTECTED]> wrote:
>
> > I tried this with the var in the iterator tag and tomcat e.g. jasper
> > complained about that var is not defined in the tag. Is it deprecated or
> > new
> > or something like this. Maybe I have to update my struts jar?
> >
> > Marc
> >
> > 2007/12/4, Dave Newton <[EMAIL PROTECTED]>:
> > >
> > > Sure.
> > >
> > > Did you try it and had an issue, or did you think it would be quicker
> to
> > > wait
> > > for a response on the list?
> > >
> > > d.
> > >
> > > --- Marc Eckart <[EMAIL PROTECTED]> wrote:
> > >
> > > > Hi,
> > > >
> > > > I have a common problem :-) I have a collection of Objects and these
> > > > Objects
> > > > also contains Collections. How can I iterate through the child
> > > collection?
> > > >
> > > > Something like this:
> > > >
> > > >  > > > status="rowstatus"
> > > > var="account">
> > > >
> > > >
> > > >  status="rowstatus"
> > > > var="attorney">
> > > >
> > > > 
> > > >
> > > >
> > > >
> > > >
> > > > Is this possible?
> > > >
> > > > Best Regards,
> > > > Marc
> > > >
> > >
> > >
> > > -
> > > 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: Struts2: Nested Iterators

2007-12-04 Thread Dave Newton
S2.0.mumble uses the "id" attribute to name the current iteration object.
S2.1 uses "var". Depends on what version you're using, I guess.

d.

--- Marc Eckart <[EMAIL PROTECTED]> wrote:

> I tried this with the var in the iterator tag and tomcat e.g. jasper
> complained about that var is not defined in the tag. Is it deprecated or
> new
> or something like this. Maybe I have to update my struts jar?
> 
> Marc
> 
> 2007/12/4, Dave Newton <[EMAIL PROTECTED]>:
> >
> > Sure.
> >
> > Did you try it and had an issue, or did you think it would be quicker to
> > wait
> > for a response on the list?
> >
> > d.
> >
> > --- Marc Eckart <[EMAIL PROTECTED]> wrote:
> >
> > > Hi,
> > >
> > > I have a common problem :-) I have a collection of Objects and these
> > > Objects
> > > also contains Collections. How can I iterate through the child
> > collection?
> > >
> > > Something like this:
> > >
> > >  > > status="rowstatus"
> > > var="account">
> > >
> > >
> > >  > > var="attorney">
> > >
> > > 
> > >
> > >
> > >
> > >
> > > Is this possible?
> > >
> > > Best Regards,
> > > Marc
> > >
> >
> >
> > -
> > 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: Struts2: Nested Iterators

2007-12-04 Thread Marc Eckart
I tried this with the var in the iterator tag and tomcat e.g. jasper
complained about that var is not defined in the tag. Is it deprecated or new
or something like this. Maybe I have to update my struts jar?

Marc

2007/12/4, Dave Newton <[EMAIL PROTECTED]>:
>
> Sure.
>
> Did you try it and had an issue, or did you think it would be quicker to
> wait
> for a response on the list?
>
> d.
>
> --- Marc Eckart <[EMAIL PROTECTED]> wrote:
>
> > Hi,
> >
> > I have a common problem :-) I have a collection of Objects and these
> > Objects
> > also contains Collections. How can I iterate through the child
> collection?
> >
> > Something like this:
> >
> >  > status="rowstatus"
> > var="account">
> >
> >
> >  > var="attorney">
> >
> > 
> >
> >
> >
> >
> > Is this possible?
> >
> > Best Regards,
> > Marc
> >
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: [struts] [S2] SiteMesh: let the user choose to see a page undecorated

2007-12-04 Thread Dale Newfield

setecastronomy wrote:

I want to give the user the possibility, for some result pages, to choose to
see them undecorated.


Easiest solution is to select a different decorator based on a parameter

com.opensymphony.module.sitemesh.mapper.ParameterDecoratorMapper

-Dale

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



Re: Struts2: Nested Iterators

2007-12-04 Thread Dave Newton
Sure.

Did you try it and had an issue, or did you think it would be quicker to wait
for a response on the list?

d.

--- Marc Eckart <[EMAIL PROTECTED]> wrote:

> Hi,
> 
> I have a common problem :-) I have a collection of Objects and these
> Objects
> also contains Collections. How can I iterate through the child collection?
> 
> Something like this:
> 
>  status="rowstatus"
> var="account">
> 
> 
>  var="attorney">
> 
> 
> 
>
> 
> 
> Is this possible?
> 
> Best Regards,
> Marc
> 


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



Struts2: Nested Iterators

2007-12-04 Thread Marc Eckart
Hi,

I have a common problem :-) I have a collection of Objects and these Objects
also contains Collections. How can I iterate through the child collection?

Something like this:








   


Is this possible?

Best Regards,
Marc


localization issue for Italian language (package_it.properties)

2007-12-04 Thread Gigliotti, Andrea
If you have struts 2.0.11 or 2.0.9 you can deploy the
struts2-blank-2.0.11.war file located into the "apps" folder (ex.
C:\struts-2.0.11\apps).
Before deploying the web app you have to rename the file
package_es.properties in package_it.properties.
In this way you will see the bug, that is you'll get all jsp pages in
the tomcat server O.S. language, rather than web client language(it or
en-us).
Now i'm sure that it's a bug of struts 2 framework!
How can I fix it?

Andrea

**
Le informazioni contenute in questa comunicazione sono riservate e
destinate esclusivamente alla/e persona/e o all'ente/i a cui sono
stati indirizzati. Se questa comunicazione Vi e' pervenuta per errore,
siete pregati di informare il mittente rispondendo a questa mail.

Questa nota conferma inoltre che questa mail e' stata verificata da un
opportuno programma contro la presenza di virus informatici.

This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the sender.

This footnote also confirms that this email message has been swept by
appropriate software for the presence of computer viruses.
**

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



RE: DefaultObjectTypeDeterminer never invoked. Why??

2007-12-04 Thread Daniel Pfeifer
Maybe I should add that I also tried to do it the old-fashion way by the
Action-conversion.properties-file and of course my Bean-class has a
default no-arg constructor.

-Original Message-
From: Daniel Pfeifer [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 04, 2007 11:40 AM
To: user@struts.apache.org
Subject: DefaultObjectTypeDeterminer never invoked. Why??

I've got a problem which I suspect depends on some issue with
configuration.

I have an Action-class:

public class ClassifyFieldsAction extends ActionSupport {
private String templateGroup;
@KeyProperty(value = "name")   // have tried to have these
annotations on the property-methods, also
@CreateIfNull(value = true)
@Element(value = ClassifyFieldsFormBean.class)
private List classifyFieldsFormBeans = new ArrayList();

public List getClassifyFieldsFormBeans() {
return classifyFieldsFormBeans;
}

public void setClassifyFieldsFormBeans(List classifyFieldsFormBeans)
{
this.classifyFieldsFormBeans = classifyFieldsFormBeans;
}

public String execute() throws Exception {
   ClassifyFieldsFormBean o;
   o = new ClassifyFieldsFormBean("one", 1);
   classifyFieldsFormBeans.add(o);
   o = new ClassifyFieldsFormBean("two", 2);
   classifyFieldsFormBeans.add(o);

   return SUCCESS;
}
}

A JSP:

...





...


And the ClassifyFieldsFormBean.java looks like this:

public class ClassifyFieldsFormBean implements Serializable {
   private String name;
   private Integer number;

   ... getters and setters and a constructor here
}



I followed the example posted on the Struts 2-page, however, the I get
the right number of textfields but they are not filled in. I also set a
break-point in the DefaultObjectTypeDeterminer and it's never invoked
for some reason.

Does anybody have an idea why?

/D

-
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: R: R: my execute method of action class is getting executed twice

2007-12-04 Thread Dave Newton
What JavaScript confirm message?

*Please* post the complete code.

And stop copying me; replying to the list is fine.

d.

--- "Gigliotti, Andrea" <[EMAIL PROTECTED]> wrote:

> I tried to remove the javascript confirm message, and now it work fine!
> 
> I still have the localization problem with the package_it.properties file.
> This is a bug for sure!
> 
> Andrea
> 
> -Messaggio originale-
> Da: Dave Newton [mailto:[EMAIL PROTECTED]
> Inviato: martedì 4 dicembre 2007 15.38
> A: Gigliotti, Andrea
> Oggetto: Re: R: my execute method of action class is getting executed twice
> 
> Okay, now post the rest of it: the action
> configuration, the HTML/JSP, any additional
> JavaScript, etc.
> 
> d.
> 
> --- "Gigliotti, Andrea"
> <[EMAIL PROTECTED]> wrote:
> 
> > Below my configuration:
> >
> > O.S. Windows XP Pro (ITA)
> > Tomcat 5.0.27
> > JDKL 1.5.0.12
> > IE 6.0
> >
> >
> > Action's code:
> > - - - - - - - - - - - - -
> > package it.kappapackaging.com.action.visits;
> >
> > import java.sql.Connection;
> > import java.sql.DriverManager;
> >
> > import com.opensymphony.xwork2.ActionSupport;
> >
> > import it.kappapackaging.com.dao.VisitDao;
> > import it.kappapackaging.com.db.DBConnection;
> >
> > /**
> >  * Base Action class for the Tutorial package.
> >  */
> > public class Delete extends
> > it.kappapackaging.com.action.ActionBase {
> >
> >
> > public String execute() throws Exception {
> >
> > VisitDao vis = new VisitDao();
> > vis.setBean(request);
> >
> > if(vis.deleteBean() == 1) return SUCCESS;
> > else return ERROR;
> >
> > }
> >
> > }
> > - - - - - - - - - - - - -- - - - - - - - - - - - -
> > Method's code in class VisitDao:
> >
> > public int deleteBean() {
> > java.sql.Statement s = null;
> > String sql = "";
> > //Connection conn = null;
> > int ret = 0;
> > try {
> > //conn = DBConnection.getAccessConnection();
> > s =
> >
> DBConnection.getAccessConnection().createStatement();
> > //s = conn.createStatement();
> > sql = "DELETE FROM Visits";
> > sql += " WHERE vis_mill = '" +
> > decodeMill(mill_code) + "'";
> > sql += " AND vis_customer_code = " +
> > customerCode;
> > sql += " AND vis_date = Format('" + visitDate +
> > "', 'mm/dd/')";
> > sql += " AND vis_oper = '" + oper + "'";
> > sql += " AND vis_type = " + typeCode;
> > sql += " AND vis_inser = Format('" + visitInser +
> > "', 'mm/dd/ HH:mm:ss')";
> > ret = s.executeUpdate(sql);
> > //DBConnection.getAccessConnection().commit();
> > } catch (SQLException e) {
> > // TODO Auto-generated catch block
> > e.printStackTrace();
> > }
> > finally {
> > try {
> > if(s != null) s.close();
> > //conn.close();
> > } catch (SQLException e) {
> > e.printStackTrace();
> > }
> > }
> > return ret;
> >
> > }
> > - - - - - - - - - - - - -
> >
> > The class ActionBase extends ActionSupport.
> > The action's execute method is called twice!
> >
> > Andrea
> >
> > -Messaggio originale-
> > Da: Dave Newton [mailto:[EMAIL PROTECTED]
> > Inviato: martedì 4 dicembre 2007 15.08
> > A: Struts Users Mailing List
> > Oggetto: Re: my execute method of action class is
> > getting executed twice
> >
> > --- giglian <[EMAIL PROTECTED]>
> > wrote:
> > > The method return the number of rows deleted.
> >
> > What method does? A method being called by
> > execute()?
> >
> > > I thought was a bug of my application, but now i'm
> > > thinking it's a bug of struts 2 framework. I hope
> > > will be fix very soon.
> >
> > That's certainly possible, but I've certainly never
> > seen an extra call to execute() for no reason.
> >
> > Did you post your configuration and action code in
> > question?
> >
> > d.
> >
> >
> >
> -
> > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> >
> >
> >
> **
> > Le informazioni contenute in questa comunicazione
> > sono riservate e
> > destinate esclusivamente alla/e persona/e o
> > all'ente/i a cui sono
> > stati indirizzati. Se questa comunicazione Vi e'
> > pervenuta per errore,
> > siete pregati di informare il mittente rispondendo a
> > questa mail.
> >
> > Questa nota conferma inoltre che questa mail e'
> > stata verificata da un
> > opportuno programma contro la presenza di virus
> > informatici.
> >
> > This email and any files tran

Action call not calling action method

2007-12-04 Thread Henry Park
Hello everyone, I am having a really strange issue.  In my application I
have a menu bar and a main content area. The menu bar and main content
area are populated separately using an Ajax call to their respective
action methods. They are automatically called/populated when I log into
my application.  So when I log in, the main content area and menu bar
are successfully displayed.  

When I first log into my application, everything gets loaded properly
and the appropriate action methods are called.  However when I try to
call my menu action again, it does not call my action method.  For
example, if my action call looks like this:


getUrl("MenuAction!list.action")


and my Menu Action class looks like this:


public class MenuAction extends ActionSupport implements Preparable {

  public void prepare() throws Exception {
log.debug("in prepare");
  }

  public String doList() {
log.debug("doList");
return SUCCESS;
  }
}


It enters my 'prepare()' method but does not enter my doList() method.
But on the first initial call, it does enter doList().  It seems like I
can only 'get into' the doList() method once. I even entered the action
call manually in my browser address bar but it still only enters my
prepare() method.

Here is the really strange part... on my development machine, everything
works perfectly. All the methods get called successfully.  The above
only happens when I access it from a different computer. Any ideas? I've
been trying to figure this out for days.

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



[S2] SiteMesh: let the user choose to see a page undecorated

2007-12-04 Thread setecastronomy

I'm using Struts 2 with siteMesh.
I developed a simple application  which can be summerized in a page form fro
making different kinds of query and a small number of result pages.
I want to give the user the possibility, for some result pages, to choose to
see them undecorated.
It should work like the print firnedly verison of a web page, which cuts out
some parts of the page.
I tryed the following:
- the action which is invoked checks if the user wants a decorated page and
give a different result such as /myPage.jsp or /nodecorate/myPage.jsp
accordingly.

In fact tin my siteMesh installation requests to /nodecorate/*  are exluded
from being decorated.

This solution cannot work because the request on which siteMesh decides what
to do is that directed to the action, which is the same in both cases and it
is not inside the /nodecorate folder.

So I'm wondering which is the cleanest way to obtain what I want.

Thank you
Filippo
-- 
View this message in context: 
http://www.nabble.com/-S2--SiteMesh%3A-let-the-user-choose-to-see-a-page-undecorated-tf4943974.html#a14153476
Sent from the Struts - User mailing list archive at Nabble.com.


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



R: R: my execute method of action class is getting executed twice

2007-12-04 Thread Gigliotti, Andrea
I tried to remove the javascript confirm message, and now it work fine!

I still have the localization problem with the package_it.properties file.
This is a bug for sure!

Andrea

-Messaggio originale-
Da: Dave Newton [mailto:[EMAIL PROTECTED]
Inviato: martedì 4 dicembre 2007 15.38
A: Gigliotti, Andrea
Oggetto: Re: R: my execute method of action class is getting executed twice

Okay, now post the rest of it: the action
configuration, the HTML/JSP, any additional
JavaScript, etc.

d.

--- "Gigliotti, Andrea"
<[EMAIL PROTECTED]> wrote:

> Below my configuration:
>
> O.S. Windows XP Pro (ITA)
> Tomcat 5.0.27
> JDKL 1.5.0.12
> IE 6.0
>
>
> Action's code:
> - - - - - - - - - - - - -
> package it.kappapackaging.com.action.visits;
>
> import java.sql.Connection;
> import java.sql.DriverManager;
>
> import com.opensymphony.xwork2.ActionSupport;
>
> import it.kappapackaging.com.dao.VisitDao;
> import it.kappapackaging.com.db.DBConnection;
>
> /**
>  * Base Action class for the Tutorial package.
>  */
> public class Delete extends
> it.kappapackaging.com.action.ActionBase {
>
>
>   public String execute() throws Exception {
>
>   VisitDao vis = new VisitDao();
>   vis.setBean(request);
>
>   if(vis.deleteBean() == 1) return SUCCESS;
>   else return ERROR;
>
>   }
>
> }
> - - - - - - - - - - - - -- - - - - - - - - - - - -
> Method's code in class VisitDao:
>
> public int deleteBean() {
>   java.sql.Statement s = null;
>   String sql = "";
>   //Connection conn = null;
>   int ret = 0;
>   try {
>   //conn = DBConnection.getAccessConnection();
>   s =
>
DBConnection.getAccessConnection().createStatement();
>   //s = conn.createStatement();
>   sql = "DELETE FROM Visits";
>   sql += " WHERE vis_mill = '" +
> decodeMill(mill_code) + "'";
>   sql += " AND vis_customer_code = " +
> customerCode;
>   sql += " AND vis_date = Format('" + visitDate +
> "', 'mm/dd/')";
>   sql += " AND vis_oper = '" + oper + "'";
>   sql += " AND vis_type = " + typeCode;
>   sql += " AND vis_inser = Format('" + visitInser +
> "', 'mm/dd/ HH:mm:ss')";
>   ret = s.executeUpdate(sql);
>   //DBConnection.getAccessConnection().commit();
>   } catch (SQLException e) {
>   // TODO Auto-generated catch block
>   e.printStackTrace();
>   }
>   finally {
>   try {
>   if(s != null) s.close();
>   //conn.close();
>   } catch (SQLException e) {
>   e.printStackTrace();
>   }
>   }
>   return ret;
>
>   }
> - - - - - - - - - - - - -
>
> The class ActionBase extends ActionSupport.
> The action's execute method is called twice!
>
> Andrea
>
> -Messaggio originale-
> Da: Dave Newton [mailto:[EMAIL PROTECTED]
> Inviato: martedì 4 dicembre 2007 15.08
> A: Struts Users Mailing List
> Oggetto: Re: my execute method of action class is
> getting executed twice
>
> --- giglian <[EMAIL PROTECTED]>
> wrote:
> > The method return the number of rows deleted.
>
> What method does? A method being called by
> execute()?
>
> > I thought was a bug of my application, but now i'm
> > thinking it's a bug of struts 2 framework. I hope
> > will be fix very soon.
>
> That's certainly possible, but I've certainly never
> seen an extra call to execute() for no reason.
>
> Did you post your configuration and action code in
> question?
>
> d.
>
>
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
>
>
>
**
> Le informazioni contenute in questa comunicazione
> sono riservate e
> destinate esclusivamente alla/e persona/e o
> all'ente/i a cui sono
> stati indirizzati. Se questa comunicazione Vi e'
> pervenuta per errore,
> siete pregati di informare il mittente rispondendo a
> questa mail.
>
> Questa nota conferma inoltre che questa mail e'
> stata verificata da un
> opportuno programma contro la presenza di virus
> informatici.
>
> This email and any files transmitted with it are
> confidential and
> intended solely for the use of the individual or
> entity to whom they
> are addressed. If you have received this email in
> error please notify
> the sender.
>
> This footnote also confirms that this email message
> has been swept by
> appropriate software for the presence of computer
> viruses.
>
**
>



Re: Scrollbar problem with tabbed panel in Struts2

2007-12-04 Thread Dave Newton
--- Martin Gainty <[EMAIL PROTECTED]> wrote:
> when current pane exceeds panel scrollbar is shown
is correct

I believe the issue is that the scrollbar appears and
disappears when the tab is clicked.

> From: "quinquin2209"
>> However, if I click on the tab-header of the
currently opened tab, the
>> scrollbar disappear. It appears again if i click
that tab-header again.

The content of the tab remains, just the scrollbar
appears/disappears?

d.


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



Re: Scrollbar problem with tabbed panel in Struts2

2007-12-04 Thread Martin Gainty
when current pane exceeds panel scrollbar is shown  is correct
please display code

M--
- Original Message -
From: "quinquin2209" <[EMAIL PROTECTED]>
To: 
Sent: Tuesday, December 04, 2007 6:29 AM
Subject: Scrollbar problem with tabbed panel in Struts2


>
> Hi All,
>
> I have used the tabbed panel provided by Struts2. When the content within
> the current pane exceed the panel size, scrollbar is shown as expected.
> However, if I click on the tab-header of the currently opened tab, the
> scrollbar disappear. It appears again if i click that tab-header again.
>
> Do anyone know how can I solve this problem?
>
> Thanks in advance
>
> Queenie
> --
> View this message in context:
http://www.nabble.com/Scrollbar-problem-with-tabbed-panel-in-Struts2-tf49425
76.html#a14149025
> 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]



R: my execute method of action class is getting executed twice

2007-12-04 Thread Gigliotti, Andrea
Below my configuration:

O.S. Windows XP Pro (ITA)
Tomcat 5.0.27
JDKL 1.5.0.12
IE 6.0


Action's code:
- - - - - - - - - - - - -
package it.kappapackaging.com.action.visits;

import java.sql.Connection;
import java.sql.DriverManager;

import com.opensymphony.xwork2.ActionSupport;

import it.kappapackaging.com.dao.VisitDao;
import it.kappapackaging.com.db.DBConnection;

/**
 * Base Action class for the Tutorial package.
 */
public class Delete extends it.kappapackaging.com.action.ActionBase {


public String execute() throws Exception {

VisitDao vis = new VisitDao();
vis.setBean(request);

if(vis.deleteBean() == 1) return SUCCESS;
else return ERROR;

}

}
- - - - - - - - - - - - -- - - - - - - - - - - - -
Method's code in class VisitDao:

public int deleteBean() {
java.sql.Statement s = null;
String sql = "";
//Connection conn = null;
int ret = 0;
try {
//conn = DBConnection.getAccessConnection();
s = 
DBConnection.getAccessConnection().createStatement();
//s = conn.createStatement();
sql = "DELETE FROM Visits";
sql += " WHERE vis_mill = '" + decodeMill(mill_code) + 
"'";
sql += " AND vis_customer_code = " + customerCode;
sql += " AND vis_date = Format('" + visitDate + "', 
'mm/dd/')";
sql += " AND vis_oper = '" + oper + "'";
sql += " AND vis_type = " + typeCode;
sql += " AND vis_inser = Format('" + visitInser + "', 
'mm/dd/ HH:mm:ss')";
ret = s.executeUpdate(sql);
//DBConnection.getAccessConnection().commit();
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
finally {
try {
if(s != null) s.close();
//conn.close();
} catch (SQLException e) {
e.printStackTrace();
}
}
return ret;

}
- - - - - - - - - - - - -

The class ActionBase extends ActionSupport.
The action's execute method is called twice!

Andrea

-Messaggio originale-
Da: Dave Newton [mailto:[EMAIL PROTECTED]
Inviato: martedì 4 dicembre 2007 15.08
A: Struts Users Mailing List
Oggetto: Re: my execute method of action class is getting executed twice

--- giglian <[EMAIL PROTECTED]> wrote:
> The method return the number of rows deleted.

What method does? A method being called by execute()?

> I thought was a bug of my application, but now i'm
> thinking it's a bug of struts 2 framework. I hope
> will be fix very soon.

That's certainly possible, but I've certainly never
seen an extra call to execute() for no reason.

Did you post your configuration and action code in
question?

d.


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


**
Le informazioni contenute in questa comunicazione sono riservate e
destinate esclusivamente alla/e persona/e o all'ente/i a cui sono
stati indirizzati. Se questa comunicazione Vi e' pervenuta per errore,
siete pregati di informare il mittente rispondendo a questa mail.

Questa nota conferma inoltre che questa mail e' stata verificata da un
opportuno programma contro la presenza di virus informatici.

This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the sender.

This footnote also confirms that this email message has been swept by
appropriate software for the presence of computer viruses.
**

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



Re: my execute method of action class is getting executed twice

2007-12-04 Thread Dave Newton
--- giglian <[EMAIL PROTECTED]> wrote:
> The method return the number of rows deleted.

What method does? A method being called by execute()?

> I thought was a bug of my application, but now i'm
> thinking it's a bug of struts 2 framework. I hope 
> will be fix very soon.

That's certainly possible, but I've certainly never
seen an extra call to execute() for no reason.

Did you post your configuration and action code in
question?

d.


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



Re: my execute method of action class is getting executed twice

2007-12-04 Thread Ing. Andrea Vettori
I think you should check if it's the browser that submits the form two  
times.



I thought was a bug of my application, but now i'm thinking it's a  
bug of

struts 2 framework.
I hope will be fix very soon.
Regards

Andrea


xniit2003 wrote:


Hi,

I am new in struts2.
In my action class I declared some global fields and one execute
method.This class extends another class, which extends Actionsupport
class. Now my execute method is getting processed twice.
From this execute method, execution goes to some other method,  
which also

getting processed twice.

Can anyone faced similar situation.



--
Ing. Andrea Vettori
Consulente per l'Information Technology



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



Re: my execute method of action class is getting executed twice

2007-12-04 Thread giglian

Hi,
I have the same problem, you can look at my message of November 30.
However see below the bug I posted:

"my web app have an action to delete one row in a MS Access table (access
though sun.jdbc.odbc.JdbcOdbcDriver).
The method return the number of rows deleted.
The first time it's executed, it return the right number of deleted rows: 1.
The action after reading the method result, it return SUCCESS, but rather to
call the result page (jsp page), the controller, with no reason, call once
again, the same method.
This time, of course, it return 0 because the row is already deleted and the
action return ERROR.
Finally, even if the delete operation execute succesfully, the web app
display the error message.
I have other action with methods that insert and update rows and they work
fine!
All methods have the same program logic except for the sql statement
(INSERT, UPDATE, DELETE, ...)"

I thought was a bug of my application, but now i'm thinking it's a bug of
struts 2 framework.
I hope will be fix very soon.
Regards

Andrea


xniit2003 wrote:
> 
> Hi,
> 
> I am new in struts2.
> In my action class I declared some global fields and one execute
> method.This class extends another class, which extends Actionsupport
> class. Now my execute method is getting processed twice.
> From this execute method, execution goes to some other method, which also
> getting processed twice.
> 
> Can anyone faced similar situation.
> 
> Thanks
> 

-- 
View this message in context: 
http://www.nabble.com/my-execute-method-of-action-class-is-getting-executed-twice-tf4927568.html#a14151247
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] Different Annotated Validations for different action methods

2007-12-04 Thread Thilo Ettelt

It seems to me I've found the solution:

Add this to your action declaration:


true
actionMethodHere


Have fun! :)


- Thilo

This works for me, but

Am 04.12.2007 um 13:24 schrieb Martin Gilday:


I posted about this a while back.  Nobody seemed to have an annotation
based solution, only going back to XML.


- Original message -
From: "Thilo Ettelt" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Date: Tue, 4 Dec 2007 13:01:15 +0100
Subject: [s2] Different Annotated Validations for different action
methods

Hey all,

I'm trying to figure out how to validate my action methods  
differently.


For example I've got a modeldriven User bean with the following two
annotated methods

@Validations(...)
- processLogin

@Validations(...)
- processSignup



Now I want the first annotation to only check for the username and
password, but the second annotation is supposed to check for other
things like email too.

However when I call the appropriate action mapping which calls
processSignup it processes both Validations, which results in a
invalid email address error for the login in addition to the wrong
username and password.

So how can I separate the two validatio annotations without needing
separate classes?


- Thilo

--
Mit freundlichen Grüßen,

Thilo Ettelt  Telefon: +49-421-6265-111
Carmunity.com GmbHTelefax: +49-421-6265-100
Mary-Astell-Strasse 2 E-Mail: [EMAIL PROTECTED]
28359 Bremen  http://www.carmunity.de/

Developer (YourVids)

Handelsregisternummer: HRB 19256 beim AG Bremen
Geschäftsführer:
Dipl.-Wirt.-Ing. W. Schlösser
Dipl-Ing. Frank Rothgänger
Bennet Bock


-
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]



--
Mit freundlichen Grüßen,

Thilo Ettelt  Telefon: +49-421-6265-111
Carmunity.com GmbHTelefax: +49-421-6265-100
Mary-Astell-Strasse 2 E-Mail: [EMAIL PROTECTED]
28359 Bremen  http://www.carmunity.de/

Developer (YourVids)

Handelsregisternummer: HRB 19256 beim AG Bremen
Geschäftsführer:
Dipl.-Wirt.-Ing. W. Schlösser
Dipl-Ing. Frank Rothgänger
Bennet Bock


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



Re: Problem developing a tag using Struts 2 Arch for Tags

2007-12-04 Thread Dave Newton
--- victor sosa <[EMAIL PROTECTED]> wrote:
> Yes, I did see the S2 iterator tag, I see that 
> there isn't any while or for into the code, I 
> suppose that the code repeat using the return 
> of the method. but How to uses it? I try twice 
> but the code never iterate using the return 
> value of the #start() and #end() method

I'm not sure what you mean by "using the return
value..." of the start() and end() methods.

Start() and end() return booleans indicating whether
or not the tag should "continue" its operations. The
start() method is what creates the iterator (and saves
it for future reference). It then checks if there are
objects to iterate over, if it does, it pushes the
"next" (in this case, the first) object onto the
stack.

End() does the same thing; this is where (AFAICT) the
bulk of the iteration is done. When there aren't any
objects left to iterate over it does some cleanup and
goes away.

What in particular isn't clicking for you?

This aside, I'm not sure why you're creating a JSON
object like this. There are several JSON libraries
already available for both Java and JavaScript that
will create JSON representation via a single method
call.

d.


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



Re: [s2] Different Annotated Validations for different action methods

2007-12-04 Thread Martin Gilday
I posted about this a while back.  Nobody seemed to have an annotation
based solution, only going back to XML.


- Original message -
From: "Thilo Ettelt" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Date: Tue, 4 Dec 2007 13:01:15 +0100
Subject: [s2] Different Annotated Validations for different action
methods

Hey all,

I'm trying to figure out how to validate my action methods differently.

For example I've got a modeldriven User bean with the following two  
annotated methods

@Validations(...)
- processLogin

@Validations(...)
- processSignup



Now I want the first annotation to only check for the username and  
password, but the second annotation is supposed to check for other  
things like email too.

However when I call the appropriate action mapping which calls  
processSignup it processes both Validations, which results in a  
invalid email address error for the login in addition to the wrong  
username and password.

So how can I separate the two validatio annotations without needing  
separate classes?


- Thilo

-- 
Mit freundlichen Grüßen,

Thilo Ettelt  Telefon: +49-421-6265-111
Carmunity.com GmbHTelefax: +49-421-6265-100
Mary-Astell-Strasse 2 E-Mail: [EMAIL PROTECTED]
28359 Bremen  http://www.carmunity.de/

Developer (YourVids)

Handelsregisternummer: HRB 19256 beim AG Bremen
Geschäftsführer:
Dipl.-Wirt.-Ing. W. Schlösser
Dipl-Ing. Frank Rothgänger
Bennet Bock


-
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]



[s2] Different Annotated Validations for different action methods

2007-12-04 Thread Thilo Ettelt

Hey all,

I'm trying to figure out how to validate my action methods differently.

For example I've got a modeldriven User bean with the following two  
annotated methods


@Validations(...)
- processLogin

@Validations(...)
- processSignup



Now I want the first annotation to only check for the username and  
password, but the second annotation is supposed to check for other  
things like email too.


However when I call the appropriate action mapping which calls  
processSignup it processes both Validations, which results in a  
invalid email address error for the login in addition to the wrong  
username and password.


So how can I separate the two validatio annotations without needing  
separate classes?



- Thilo

--
Mit freundlichen Grüßen,

Thilo Ettelt  Telefon: +49-421-6265-111
Carmunity.com GmbHTelefax: +49-421-6265-100
Mary-Astell-Strasse 2 E-Mail: [EMAIL PROTECTED]
28359 Bremen  http://www.carmunity.de/

Developer (YourVids)

Handelsregisternummer: HRB 19256 beim AG Bremen
Geschäftsführer:
Dipl.-Wirt.-Ing. W. Schlösser
Dipl-Ing. Frank Rothgänger
Bennet Bock


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



Resolved! about linking two autocompleters using topics

2007-12-04 Thread Giovanni Azua

Hi Jeromy,

Many thanks for your response!

Jeromy Evans wrote:
I don't use dojo's autocompleter myself, but after a quick look at the 
javascript source for the widget (ComboBox) I can see there's a public 
method setSelectedValue(value) which may help, although it's not clear 
to me which component of the ComboBox is updatedThe js source is 
pretty horrible.
By doing detective work on the scattered documentation finally found a 
working solution!
might not be the most beautiful one but works for me. It is not the most 
beautiful one
because the target Ajax Action returns only one value so I had to 
hardcode the key
to be e.g. "value" and by knowing this key in the action and in the 
javascript then I use
the autocompleter setSelectedKey("value") and then it displays it 
properly. I also
hide the fact that the text field is an autocompleter by using the 
showDownArrow="false".


For the records please find all the  relevant sources below.

Many thanks!

Best regards,
Giovanni

Setup:

Struts 2.1.1 built from sources recently approx 25.11.2007
JSON plugin 0.19

Example request/response:
Request:
AjaxGetExchangeRates.action?historicBook0Key=AZN%20GB.GBP.LON.1.00.stock&historicBook1Key=AZN%20GB.GBP.LON.1.00.stock
Response:
{"eurosPerListedUnit0":{"1.393":"value"},"eurosPerListedUnit1":{"1.393":"value"}}

 struts.xml ***


  class="com.sag.optimizer.ui.web.action.ajax.Ajax{1}Action">

 
  


 AjaxGetExchangeRatesAction ***

public
class AjaxGetExchangeRatesAction
extends ActionSupport
{
   
//

   // public
   
//

   /**
* @return the eurosPerListedUnit0
*/
   public final Map
   getEurosPerListedUnit0()
   {
   Map myMap = new HashMap();
   
myMap.put(String.valueOf(calculateExchangeRate(theHistoricBook0Key)),
   "value");  
   return myMap;

   }

   
//

   /**
* @param aHistoricBook0Key the historicBook0Key to set
*/
   public final void
   setHistoricBook0Key(String aHistoricBook0Key)
   {
   theHistoricBook0Key = aHistoricBook0Key;
   }

   
//

   /**
* @return the eurosPerListedUnit1
*/
   public final Map
   getEurosPerListedUnit1()
   {
   Map myMap = new HashMap();
   
myMap.put(String.valueOf(calculateExchangeRate(theHistoricBook1Key)),
   "value");  
   return myMap;

   }

   
//

   /**
* @param aHistoricBook1Key the historicBook1Key to set
*/
   public final void
   setHistoricBook1Key(String aHistoricBook1Key)
   {
   theHistoricBook1Key = aHistoricBook1Key;
   }

   
//

   // private
   
//

   private double
   calculateExchangeRate(String aHistoricBookKey)
   {  
   ...
   }   
  
   
//

   // members
   
//

   private String theHistoricBook0Key;
   private String theHistoricBook1Key;
  
   private static final long serialVersionUID = 1L;

}

 mypage.jsp **

<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>


dojo.event.topic.subscribe("/afterExchangeRateReloaded", function(data, request, widget)
 {
//data : text returned from request
//request: XMLHttpRequest object
//widget: widget that published the topic
widget.setSelectedKey("value");
}); theme="%{currentTheme}"> ... valueNotifyTopics="/changedHistoricBook0" searchType="substring" label="Historic Book 1" cssStyle="width: 250px;" dropdownHeight="180" name="historicBook0" list="historicBooks" listKey="id" listValue="name" /> valueNotifyTopics="/changedHistoricBook1" searchType="substring" label="Historic Book 2" cssStyle="width: 250px;" dropdownHeight="180" name="historicBook1" list="historicBooks" listKey="id" listValue="name" /> ... cssStyle="width: 250px;" href="%{#exchangeRates}" listenTopics="/changedHistoricBook0" label="Currency Rate 1" name="eurosPerListedUnit0" autoComplete="false" afterNotifyTopics="/afterExchangeRateReloaded" /> cssStyle="width: 250px;" href="%{#exchangeRates}" listenTopics="/changedHistoricBook1" label="Currency Rate 2" name="eurosPerListedUnit1" autoComplet

Scrollbar problem with tabbed panel in Struts2


Hi All,

I have used the tabbed panel provided by Struts2. When the content within
the current pane exceed the panel size, scrollbar is shown as expected.
However, if I click on the tab-header of the currently opened tab, the
scrollbar disappear. It appears again if i click that tab-header again. 

Do anyone know how can I solve this problem?

Thanks in advance

Queenie
-- 
View this message in context: 
http://www.nabble.com/Scrollbar-problem-with-tabbed-panel-in-Struts2-tf4942576.html#a14149025
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: Problem developing a tag using Struts 2 Arch for Tags


Sorry about the while is just a code for test, because I don't know exactly
how S2 work for the iterator tag. I am aware about the code ;) 

Yes, I did see the S2 iterator tag, I see that there isn't any while or for
into the code, I suppose that the code repeat using the return of the
method. but How to uses it? I try twice but the code never iterate using the
return value of the #start() and #end() method


newton.dave wrote:
> 
> Well, you call "iterateOverItems" which has the
> following code:
> 
>> while (iterator.hasNext()){
>> Object currentItem = iterator.next();
>> valueStack.push(currentItem);
>> LOG.debug("item: " + currentItem);
>> }
> 
> That just loops over the collection and pushes each
> onto the stack; I guess I'm not sure what you expected
> that code to do.
> 
> Did you look at the code for the S2 iterator tag? That
> would probably give you a hint about how to accomplish
> what you want.
> 
> Here's a hint: don't iterate over the entire
> collection at once. "start" begins the iteration.
> "end" sees if there's more to iterate over.
> 
> d.
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Problem-developing-a-tag-using-Struts-2-Arch-for-Tags-tf4939292.html#a14148747
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: about linking two autocompleters using topics [never surrender :)]


Giovanni Azua wrote:

hi,

I have been recently asking how to achieve that changing the value of
autocompleter A, triggers an Ajax reload of autocompleter B and make
the only item returned as selected on B i.e. displayed in its 
textInputNode.


I followed directions from:
http://struts.apache.org/2.x/docs/ajax-and-javascript-recipes.html#AjaxandJavaScriptRecipes-Linktwoautocompleters%252Cusingtopics 



and the reload works okay but making the only element in the ComboBox
selected and displayed in autocompleter textInputNode is the remaining 
issue.


Trying to hack some javascript that will do, below is the code to the 
closest I've got.
I manage that after the reload the autocompleter displays "kaki" big 
deal! but not yet

to display the only item out of the ComboBox.

Ehh please help :)

regards,
Giovanni


Hi Giovanni,

I don't use dojo's autocompleter myself, but after a quick look at the 
javascript source for the widget (ComboBox) I can see there's a public 
method setSelectedValue(value) which may help, although it's not clear 
to me which component of the ComboBox is updatedThe js source is 
pretty horrible.


My approach would be to start firebug, load your page and place a 
breakpoint in your callback function.  When the callback is fired, use 
firebug's DOM inspection to browse for public methods in the widget 
instance returned by dojo.widget.byId() and see if there's anything 
useful.  Use the watch to call methods directly.


Hope that helps,
Jeromy Evans



* mypage.jsp 


 dojo.event.topic.subscribe("/after", function(data, type, request)
 {
//data : text returned from request
//request: XMLHttpRequest object
//widget: widget that published the topic
// alert(widget.optionsListNode.childNodes.length);
// alert('happened');
if (type == "load")
{
var widget = dojo.widget.byId("eurosPerListedUnit0");
alert(widget.comboBoxValue.size);
widget.textInputNode.value = "kaki";
}
// widget.textInputNode.value = widget.comboBoxValue.value;
 }); 



theme="%{currentTheme}">
   valueNotifyTopics="/changedHistoricBook0" searchType="substring" 
label="Historic Book 1" cssStyle="width: 250px;" dropdownHeight="180" 
name="historicBook0" list="historicBooks" listKey="id" 
listValue="name" />  ...
   listenTopics="/changedHistoricBook0"
   label="Currency Rate 1" cssStyle="width: 250px;" 
name="eurosPerListedUnit0" autoComplete="false" notifyTopics="/after" />

   ...
   


-
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]



about linking two autocompleters using topics [never surrender :)]


hi,

I have been recently asking how to achieve that changing the value of
autocompleter A, triggers an Ajax reload of autocompleter B and make
the only item returned as selected on B i.e. displayed in its textInputNode.

I followed directions from:
http://struts.apache.org/2.x/docs/ajax-and-javascript-recipes.html#AjaxandJavaScriptRecipes-Linktwoautocompleters%252Cusingtopics

and the reload works okay but making the only element in the ComboBox
selected and displayed in autocompleter textInputNode is the remaining 
issue.


Trying to hack some javascript that will do, below is the code to the 
closest I've got.
I manage that after the reload the autocompleter displays "kaki" big 
deal! but not yet

to display the only item out of the ComboBox.

Ehh please help :)

regards,
Giovanni

* mypage.jsp 


 dojo.event.topic.subscribe("/after", function(data, type, request)
 {
//data : text returned from request
//request: XMLHttpRequest object
//widget: widget that published the topic
// alert(widget.optionsListNode.childNodes.length);
// alert('happened');
if (type == "load")
{
var widget = dojo.widget.byId("eurosPerListedUnit0");
alert(widget.comboBoxValue.size);
widget.textInputNode.value = "kaki";
}
// widget.textInputNode.value = widget.comboBoxValue.value;
}); theme="%{currentTheme}"> valueNotifyTopics="/changedHistoricBook0" searchType="substring" label="Historic Book 1" cssStyle="width: 250px;" dropdownHeight="180" name="historicBook0" list="historicBooks" listKey="id" listValue="name" /> ... listenTopics="/changedHistoricBook0" label="Currency Rate 1" cssStyle="width: 250px;" name="eurosPerListedUnit0" autoComplete="false" notifyTopics="/after" /> ... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Datagrid in Struts2


Hi All,

I am using Struts 2 and I wanna develop a datagrid as that provided in
Struts Layout. I have couple of questions:

1. Is that I can't use Struts Layout in Struts 2? If it can be used? How to
set up?
2. If Struts Layout cannot be used in Struts 2, is there any similar plugin
that provide data grid? 
3. For instance, I have found a plugin called TableTags. Although it is easy
to create a table using this plugin, is it possible to add checkbox to each
row? How?

Thanks in advance 

Queenie
-- 
View this message in context: 
http://www.nabble.com/Datagrid-in-Struts2-tf4942372.html#a14148385
Sent from the Struts - User mailing list archive at Nabble.com.


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



DefaultObjectTypeDeterminer never invoked. Why??

I've got a problem which I suspect depends on some issue with
configuration.

I have an Action-class:

public class ClassifyFieldsAction extends ActionSupport {
private String templateGroup;
@KeyProperty(value = "name")   // have tried to have these
annotations on the property-methods, also
@CreateIfNull(value = true)
@Element(value = ClassifyFieldsFormBean.class)
private List classifyFieldsFormBeans = new ArrayList();

public List getClassifyFieldsFormBeans() {
return classifyFieldsFormBeans;
}

public void setClassifyFieldsFormBeans(List classifyFieldsFormBeans)
{
this.classifyFieldsFormBeans = classifyFieldsFormBeans;
}

public String execute() throws Exception {
   ClassifyFieldsFormBean o;
   o = new ClassifyFieldsFormBean("one", 1);
   classifyFieldsFormBeans.add(o);
   o = new ClassifyFieldsFormBean("two", 2);
   classifyFieldsFormBeans.add(o);

   return SUCCESS;
}
}

A JSP:

...





...


And the ClassifyFieldsFormBean.java looks like this:

public class ClassifyFieldsFormBean implements Serializable {
   private String name;
   private Integer number;

   ... getters and setters and a constructor here
}



I followed the example posted on the Struts 2-page, however, the I get
the right number of textfields but they are not filled in. I also set a
break-point in the DefaultObjectTypeDeterminer and it's never invoked
for some reason.

Does anybody have an idea why?

/D

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



[S2] s:property escape attribute


- The s:property tag escapes html markup characters, which is very nice.
- On the other hand it creates html character entities of non-ascii
characters, which is ugly and unnecessary, as I already have UTF-8 as
character encoding of the page.

"escape=true" does both, "escape=false" does neither.
Is there a struts.properties setting to disable unnecessary character
entities, so that we can have the best of both worlds?

kuvera


-
http://javatar.hu Java EE programming 
-- 
View this message in context: 
http://www.nabble.com/-S2--s%3Aproperty-escape-attribute-tf4942365.html#a14148361
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] problem with datetimepicker and locale

I have a web application localized with several languages (en, fr, es).

My problem is: the DataTimePicker display the calendar with the locale
of the system (a French Windows, the month is always written in French)
under IE7 (which an English locale is defined).

And under FireFox (with the Quick local switcher plug-in) the calendar
is defined with the correct language (the month is in the correct
language)

 

How DateTimePicker determines the locale to be use?

 

How I can define the DateTimePicker to use always the browser locale?

 

The problem exists in 2.0.9 and 2.1.0

 

Regards

Arnaud



dynaactionform is getting null using struts tiles


Hi,
your help in this regard is very much appreciated.

my strutus-config entry is
   



as you see, the forward is to a tiles definition, which looks like 




  


  
  

my jsp code looks like:

<%
  DynaActionForm form
=((DynaActionForm)request.getAttribute("homePortalSelectionForm"));
  if (form!=null){
  System.out.println(form.toString());
  }else{
System.out.println("form is null");
  }
%>






I am getting the display "form is null".  Because of this, if i use
 of any form variables, nothing is displayed.

if i forward it to the jsp straight in the struts-config instead of to a
tiles defintion, i am getting the form and the variables are displayed. so
what am i doing wrong in using the tiles definition?

Please help.

thanks
nags.

-- 
View this message in context: 
http://www.nabble.com/dynaactionform-is-getting-null-using-struts-tiles-tf4941863.html#a14146910
Sent from the Struts - User mailing list archive at Nabble.com.


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