Re: struts2 + Tiles, whypages shrink in top center ?

2010-03-29 Thread Lukasz Lenart
2010/3/29 A. Lotfi majidna...@yahoo.com

 I tried all the browsers but still small, plz take a look here :

 http://osp105.mit.edu:8084/Struts2Tiles/welcomeLink.action

Did check the source of your page in browser? It's a mess, duplicated
body and so on. Check your tiles, only main page (the layout) should
have body tag. The reset has to be just a html snippet - no html, body
tags.


Regards
--
Łukasz
http://www.lenart.org.pl/
Kapituła Javarsovia 2010
http://javarsovia.pl

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: [Struts 2.1.8.1] Internationalization: how to remain in the current page ?

2010-03-29 Thread Alex Rodriguez Lopez
Thanks Zoran for sharing your approach, greatly appreciated, I'm 
thinking about implementing a similar interceptor, and maybe replace the 
i18n one so work is done implicitly with only a change in struts.xml and 
the new interceptor.


Em 29-03-2010 02:58, Zoran Avtarovski escreveu:

Hi Guys,

We simplified it for struts to use a simple interceptor. Can’t show the
exact code due to legal crap, but here’s the overview.

In our base action we have a String called requestString, with
appropriate getters and setters. We also have a MapString, String of
unsafe URL’s and their safe counterparts. For example if the unsafe url
was deleteObject.action it’s safe option would be listObject.action

The interceptor uses the following code:

if(unsafeUrls.get(request.getRequestURI()) != null)
responseUrl = unsafeUrls.get(request.getRequestURI());
else
responseUrl = request.getRequestURI();


StringBuffer rStr = new StringBuffer(responseUrl);
rStr.append(“?”);
for (Iterator iter = request.getParameterMap().keySet().iterator();
iter.hasNext();) {

String key = (String) iter.next();
if (!request_locale.equalsIgnoreCase(key)) {
if (request.getParameter(key) != null) { // you can also include
your own parameter specific exceptions. With the tag we used to have
a comma delimited list of excluded parameters.
rStr.append(key);
rStr.append(=);
rStr.append((String) request.getParameter(key));
rStr.append();
}

}
}

action.setRequestString(sStr.toString());



And then on the page we have:

div class=”localeFlag”a
href=${requestString}request_locale=${localeOpt.lang} img
src=${pageContext.request.contextPath}/image/icons/${localeOpt.lang}_flag.gif
alt=s:text name=%{“select.”+ attr.localeOpt.lang} /
title=s:text name=%{“select.”+ attr.localeOpt.lang} / //a/div


I had to modify the code to satisfy our people but let me know if you
have any questions. We use a complex parameter filtering process to
unsure that security isn’t compromised.

We’ve had to do quite a bit of i18n which has involved implementing DB
based properties and tighter integration with S2 and spring.

Z.





Hi Zoran,

would you mind sharing the code of this tag? It would be helpful to me,
as somehow I've been able to link to the same sction with an empty url
tag but unable to retain params. Thanks!

Em 24-03-2010 22:42, Zoran Avtarovski escreveu:
  I wrote a small custom tag which builds the link with the existing
action
  and parameters. This way it just reloads the page. I also included a
  parameter that wouldn’t allow the change (a jQuery dialog would
give the
  user feed back) to take place if there might me an issue with system
  integrity – for example submitting a form twice.

  Z.
 
  hi,
  I have a quick and basic question.
  Regarding internationalization, whenever a user clicks on a link
with a flag,
  i want to change the locale (language)
  of the web application.
  That works well with the i18n interceptor.
  However i always redirect the user to the home page (home.jsp)
when i do that
  because that is how i have setup the input result :
  action name=changeLanguage class=ServicesAction
  method=changeLocale
  result name=input/home/home.jsp/result
  /action
 
  My JSP looks like this :
  s:url id=url action=changeLanguage.action
  s:param name=request_localefr/s:param
  /s:url
  s:a href=%{url} theme=xhtmlimg
  src=%=request.getContextPath()%/images/flag_fr.png //s:a
 
  So my question is :
  how do you specify the current page in the input result name ?
  so that the user stays on the current page when he changes languages.
  Thanks for helping.
 
 




-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org




-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Pagination with Struts 2.1.8 ?

2010-03-29 Thread Celinio Fernandes
Hi, 
This is a classic requirement.
I have this table, in a JSP, that I have created with the table html tag and 
that i have filled using the s:iterator.
This s:iterator tag iterates over an ArrayList defined in my action.
There are too many lines and I need to add some pagination functionality to it.
What solutions are out there and which one do you recommend ? 
Thanks for your feedback.


  

Re: Pagination with Struts 2.1.8 ?

2010-03-29 Thread Alex Rodriguez Lopez

Display tag, works like a charm:

http://displaytag.sourceforge.net/1.2/tut_basic.html

Works with lists and handles pagination, data export, I recommend it!

Em 29-03-2010 11:07, Celinio Fernandes escreveu:

Hi,
This is a classic requirement.
I have this table, in a JSP, that I have created with thetable  html tag and that i 
have filled using thes:iterator.
Thiss:iterator  tag iterates over an ArrayList defined in my action.
There are too many lines and I need to add some pagination functionality to it.
What solutions are out there and which one do you recommend ?
Thanks for your feedback.






-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: [Struts 2.1.8.1] Internationalization: how to remain in the current page ?

2010-03-29 Thread Denis Cabasson

Hi,

We use a simple and empty s:url includeParam=get/ tag to loop back 
to the current action/url.


The only thing you have to look for are those unsafe urls: we don't 
have any unsafe urls in our application, thanks to an extensive POST 
then GET approach. Whenever some action is done in the application 
(through a POST), we process this action, update the relevant stuff in 
the database, and issue a redirect answer to a GET url, that will 
display the result of the action. That way, we can reload the current 
page (be it for switching language or just a browser reload) without any 
issue. This approach takes care of the bookmarking issue as well. I 
think this approach way more robust that tinkering with URLs to define 
safe and unsafe URLs.


We had to do a bit a workaround code so that on the redirect to a GET, 
we don't lose all of our context. We actually save the current action in 
the session, and when the get comes back, pop it out of the session to 
place it in the stack. If somebody is interested, I can share that code


Denis.

Le 2010-03-29 04:55, Alex Rodriguez Lopez a écrit :
Thanks Zoran for sharing your approach, greatly appreciated, I'm 
thinking about implementing a similar interceptor, and maybe replace 
the i18n one so work is done implicitly with only a change in 
struts.xml and the new interceptor.


Em 29-03-2010 02:58, Zoran Avtarovski escreveu:

Hi Guys,

We simplified it for struts to use a simple interceptor. Can’t show the
exact code due to legal crap, but here’s the overview.

In our base action we have a String called requestString, with
appropriate getters and setters. We also have a MapString, String of
unsafe URL’s and their safe counterparts. For example if the unsafe url
was deleteObject.action it’s safe option would be listObject.action

The interceptor uses the following code:

if(unsafeUrls.get(request.getRequestURI()) != null)
responseUrl = unsafeUrls.get(request.getRequestURI());
else
responseUrl = request.getRequestURI();


StringBuffer rStr = new StringBuffer(responseUrl);
rStr.append(“?”);
for (Iterator iter = request.getParameterMap().keySet().iterator();
iter.hasNext();) {

String key = (String) iter.next();
if (!request_locale.equalsIgnoreCase(key)) {
if (request.getParameter(key) != null) { // you can also include
your own parameter specific exceptions. With the tag we used to have
a comma delimited list of excluded parameters.
rStr.append(key);
rStr.append(=);
rStr.append((String) request.getParameter(key));
rStr.append();
}

}
}

action.setRequestString(sStr.toString());



And then on the page we have:

div class=”localeFlag”a
href=${requestString}request_locale=${localeOpt.lang} img
src=${pageContext.request.contextPath}/image/icons/${localeOpt.lang}_flag.gif 


alt=s:text name=%{“select.”+ attr.localeOpt.lang} /
title=s:text name=%{“select.”+ attr.localeOpt.lang} / //a/div


I had to modify the code to satisfy our people but let me know if you
have any questions. We use a complex parameter filtering process to
unsure that security isn’t compromised.

We’ve had to do quite a bit of i18n which has involved implementing DB
based properties and tighter integration with S2 and spring.

Z.





Hi Zoran,

would you mind sharing the code of this tag? It would be helpful 
to me,
as somehow I've been able to link to the same sction with an 
empty url

tag but unable to retain params. Thanks!

Em 24-03-2010 22:42, Zoran Avtarovski escreveu:
  I wrote a small custom tag which builds the link with the existing
action
  and parameters. This way it just reloads the page. I also included a
  parameter that wouldn’t allow the change (a jQuery dialog would
give the
  user feed back) to take place if there might me an issue with system
  integrity – for example submitting a form twice.

  Z.
 
  hi,
  I have a quick and basic question.
  Regarding internationalization, whenever a user clicks on a link
with a flag,
  i want to change the locale (language)
  of the web application.
  That works well with the i18n interceptor.
  However i always redirect the user to the home page (home.jsp)
when i do that
  because that is how i have setup the input result :
  action name=changeLanguage class=ServicesAction
  method=changeLocale
  result name=input/home/home.jsp/result
  /action
 
  My JSP looks like this :
  s:url id=url action=changeLanguage.action
  s:param name=request_localefr/s:param
  /s:url
  s:a href=%{url} theme=xhtmlimg
  src=%=request.getContextPath()%/images/flag_fr.png //s:a
 
  So my question is :
  how do you specify the current page in the input result name ?
  so that the user stays on the current page when he changes 
languages.

  Thanks for helping.
 
 





-

To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org





RE: Pagination with Struts 2.1.8 ?

2010-03-29 Thread adam pinder

 
i prefer pagination to be db based so there is a minimum amount of data 
retrieved and held in memory. i.e. only retrieve what you will display. don't 
retrieve 200 records in memory and page through them.
 
adam



 Date: Mon, 29 Mar 2010 03:07:25 -0700
 From: cel...@yahoo.com
 Subject: Pagination with Struts 2.1.8 ?
 To: user@struts.apache.org

 Hi,
 This is a classic requirement.
 I have this table, in a JSP, that I have created with the 
html tag and that i have filled using the .
 This tag iterates over an ArrayList defined in my action.
 There are too many lines and I need to add some pagination functionality to 
 it.
 What solutions are out there and which one do you recommend ?
 Thanks for your feedback.


 
_
Do you have a story that started on Hotmail? Tell us now
http://clk.atdmt.com/UKM/go/195013117/direct/01/
-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: [Struts 2.1.8.1] Internationalization: how to remain in the current page ?

2010-03-29 Thread Alex Rodriguez Lopez

Great remarks Denis, thanks!
Didn't know about includeParams=get... already changed things to use 
that, works great! Simple and elegant solution, I too think urls like 
url/delete?id=# should be best avoided.


Using your approach (that is, closer to http specs, no deletes using GET 
method), how do you do it in the case of wanting to show the user a list 
of entities and direct links for deleting each one? I have my urls 
exposed because I use simple url to a deleting action with an ID as a 
GET param, how do you generate a link (or several in the same page) to 
a deleting action through POST? Do you always have to use forms?


Sorry if this has gone a little bit too off-topic.

Em 29-03-2010 13:14, Denis Cabasson escreveu:

Hi,

We use a simple and empty s:url includeParam=get/ tag to loop back
to the current action/url.

The only thing you have to look for are those unsafe urls: we don't
have any unsafe urls in our application, thanks to an extensive POST
then GET approach. Whenever some action is done in the application
(through a POST), we process this action, update the relevant stuff in
the database, and issue a redirect answer to a GET url, that will
display the result of the action. That way, we can reload the current
page (be it for switching language or just a browser reload) without any
issue. This approach takes care of the bookmarking issue as well. I
think this approach way more robust that tinkering with URLs to define
safe and unsafe URLs.

We had to do a bit a workaround code so that on the redirect to a GET,
we don't lose all of our context. We actually save the current action in
the session, and when the get comes back, pop it out of the session to
place it in the stack. If somebody is interested, I can share that code

Denis.

Le 2010-03-29 04:55, Alex Rodriguez Lopez a écrit :

Thanks Zoran for sharing your approach, greatly appreciated, I'm
thinking about implementing a similar interceptor, and maybe replace
the i18n one so work is done implicitly with only a change in
struts.xml and the new interceptor.

Em 29-03-2010 02:58, Zoran Avtarovski escreveu:

Hi Guys,

We simplified it for struts to use a simple interceptor. Can’t show the
exact code due to legal crap, but here’s the overview.

In our base action we have a String called requestString, with
appropriate getters and setters. We also have a MapString, String of
unsafe URL’s and their safe counterparts. For example if the unsafe url
was deleteObject.action it’s safe option would be listObject.action

The interceptor uses the following code:

if(unsafeUrls.get(request.getRequestURI()) != null)
responseUrl = unsafeUrls.get(request.getRequestURI());
else
responseUrl = request.getRequestURI();


StringBuffer rStr = new StringBuffer(responseUrl);
rStr.append(“?”);
for (Iterator iter = request.getParameterMap().keySet().iterator();
iter.hasNext();) {

String key = (String) iter.next();
if (!request_locale.equalsIgnoreCase(key)) {
if (request.getParameter(key) != null) { // you can also include
your own parameter specific exceptions. With the tag we used to have
a comma delimited list of excluded parameters.
rStr.append(key);
rStr.append(=);
rStr.append((String) request.getParameter(key));
rStr.append();
}

}
}

action.setRequestString(sStr.toString());



And then on the page we have:

div class=”localeFlag”a
href=${requestString}request_locale=${localeOpt.lang} img
src=${pageContext.request.contextPath}/image/icons/${localeOpt.lang}_flag.gif

alt=s:text name=%{“select.”+ attr.localeOpt.lang} /
title=s:text name=%{“select.”+ attr.localeOpt.lang} / //a/div


I had to modify the code to satisfy our people but let me know if you
have any questions. We use a complex parameter filtering process to
unsure that security isn’t compromised.

We’ve had to do quite a bit of i18n which has involved implementing DB
based properties and tighter integration with S2 and spring.

Z.





Hi Zoran,

would you mind sharing the code of this tag? It would be helpful to me,
as somehow I've been able to link to the same sction with an empty url
tag but unable to retain params. Thanks!

Em 24-03-2010 22:42, Zoran Avtarovski escreveu:
 I wrote a small custom tag which builds the link with the existing
action
 and parameters. This way it just reloads the page. I also included a
 parameter that wouldn’t allow the change (a jQuery dialog would
give the
 user feed back) to take place if there might me an issue with system
 integrity – for example submitting a form twice.

 Z.
 
  hi,
  I have a quick and basic question.
  Regarding internationalization, whenever a user clicks on a link
with a flag,
  i want to change the locale (language)
  of the web application.
  That works well with the i18n interceptor.
  However i always redirect the user to the home page (home.jsp)
when i do that
  because that is how i have setup the input result :
  action name=changeLanguage class=ServicesAction
  method=changeLocale
  result name=input/home/home.jsp/result
  

Re: struts2 + Tiles, whypages shrink in top center ?

2010-03-29 Thread sandeep kotha
Hi Lenard

Taking view source from your page i see width attribute is missing for your
table. Set the width attribute to 100% that will fix your issue.

Pasted is your view source with width attribute. This could help you.



!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
   http://www.w3.org/TR/html4/loose.dtd;

html
head
meta http-equiv=Content-Type content=text/html; charset=UTF-8
titleWelcome/title
/head
body
table   border=1 cellpadding=2 cellspacing=2 align=center
width=100%

tr
td height=30 colspan=2
div align=center style=font-weight:boldTV
shows/div

/td
/tr
tr
td height=250



a
href=/Struts2Tiles/friendsLink.action;jsessionid=92B2AD20EC639C7635D69D297037F8AF
Friends/abr
a
href=/Struts2Tiles/officeLink.action;jsessionid=92B2AD20EC639C7635D69D297037F8AF
The Office/abr

/td
td width=350

!DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN 
http://www.w3.org/TR/html4/loose.dtd;
html
head
meta http-equiv=Content-Type content=text/html; charset=ISO-8859-1
titleInsert title here/title
/head

body
Welcome Guest.
/body
/html
/td
/tr
tr
td height=30 colspan=2
div align=centercopy; vaannila.com/div

/td
/tr
/table
/body
/html






On 29 March 2010 11:45, Lukasz Lenard lukasz.len...@googlemail.com wrote:

 2010/3/29 A. Lotfi majidna...@yahoo.com
 
  I tried all the browsers but still small, plz take a look here :
 
  http://osp105.mit.edu:8084/Struts2Tiles/welcomeLink.action

 Did check the source of your page in browser? It's a mess, duplicated
 body and so on. Check your tiles, only main page (the layout) should
 have body tag. The reset has to be just a html snippet - no html, body
 tags.


 Regards
 --
 Łukasz
 http://www.lenart.org.pl/
 Kapituła Javarsovia 2010
 http://javarsovia.pl

 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org




Re: Pagination with Struts 2.1.8 ?

2010-03-29 Thread Celinio Fernandes
Thanks. I already read about it but does it work well with Struts 2 ?


--- On Mon, 3/29/10, Alex Rodriguez Lopez alo...@flordeutopia.pt wrote:


From: Alex Rodriguez Lopez alo...@flordeutopia.pt
Subject: Re: Pagination with Struts 2.1.8 ?
To: user@struts.apache.org
Date: Monday, March 29, 2010, 4:32 AM


Display tag, works like a charm:

http://displaytag.sourceforge.net/1.2/tut_basic.html

Works with lists and handles pagination, data export, I recommend it!

Em 29-03-2010 11:07, Celinio Fernandes escreveu:
 Hi,
 This is a classic requirement.
 I have this table, in a JSP, that I have created with thetable  html tag 
 and that i have filled using thes:iterator.
 Thiss:iterator  tag iterates over an ArrayList defined in my action.
 There are too many lines and I need to add some pagination functionality to 
 it.
 What solutions are out there and which one do you recommend ?
 Thanks for your feedback.





-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org




  

Re: Pagination with Struts 2.1.8 ?

2010-03-29 Thread Alex Rodriguez Lopez

Em 29-03-2010 15:09, Celinio Fernandes escreveu:

Thanks. I already read about it but does it work well with Struts 2 ?



Yes, I'm using it with S2. Include it in JSPs like this
%@ taglib uri=http://displaytag.sf.net; prefix=display %

then, for example for a listing of users:

display:table pagesize=10 sort=list defaultsort=1

 uid=user

name=users

  requestURI=user_list.action



  display:column sortable=true

  titleKey=label.name property=name

  href=user_input.action paramId=id

  paramProperty=userID/

%-- other columns of users --%

/display:table

This assumes you have a list of beans called users in your action, 
with a propertry named name, with getters/setters.


Of course, if performance is a problem pagination would be best done at 
DB level as Adam suggested.




--- On Mon, 3/29/10, Alex Rodriguez Lopezalo...@flordeutopia.pt  wrote:


From: Alex Rodriguez Lopezalo...@flordeutopia.pt
Subject: Re: Pagination with Struts 2.1.8 ?
To: user@struts.apache.org
Date: Monday, March 29, 2010, 4:32 AM


Display tag, works like a charm:

http://displaytag.sourceforge.net/1.2/tut_basic.html

Works with lists and handles pagination, data export, I recommend it!

Em 29-03-2010 11:07, Celinio Fernandes escreveu:

Hi,
This is a classic requirement.
I have this table, in a JSP, that I have created with thetable   html tag and that 
i have filled using thes:iterator.
Thiss:iterator   tag iterates over an ArrayList defined in my action.
There are too many lines and I need to add some pagination functionality to it.
What solutions are out there and which one do you recommend ?
Thanks for your feedback.






-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org








-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: struts 2 display tag export problem

2010-03-29 Thread GTCulbreth

Hi Rakesh,

Did you get your answer to this question?

If not, are your export classes in your displayTag.properties file set.  If
you don't want anything special you would need:
export.excel.class=org.displaytag.export.excel.DefaultHssfExportView 
export.pdf.class=org.displaytag.export.DefaultPdfExportView 

and so on.  Also these cannot be set using the setProperty statement

Hope this helps.



Rakesh K nair wrote:
 
 
 Hi
 
 I am using following code for exporting all data from a table to excel and
 pdf. It works ok with the columns, but I can´t export the footer and
 caption tag.
 
 
 %@ taglib prefix=s uri=/struts-tags%
 %@ taglib prefix=sx uri=/struts-dojo-tags%
 %@ taglib uri=http://displaytag.sf.net; prefix=display%
 jsp:directive.page import=org.displaytag.sample.* /
 
 
 display:table name=sessionScope.persons  export=true pagesize=2
 
   display:setProperty name=export.excel.filename value=Person
 List.xls/
 display:setProperty name=export.pdf.filename value=Person
 List.pdf/
 
 display:setProperty name=decorator.media.pdf  
 value=org.displaytag.sample.decorators.ItextTotalWrapper /
 display:setProperty name=decorator.media.excel
 value=org.displaytag.sample.decorators.HssfTotalWrapper /
 
   display:setProperty name=export.pdf value=true /
   display:setProperty name=export.excel value=true /
   display:setProperty name=export.csv value=false /
   display:setProperty name=export.xml value=false /
 
   display:caption media=html
   strongA Caption/strong
 /display:caption
   display:caption media=excel pdfA Caption/display:caption
   
   display:footer media=html
   tr
 td colspan=4strongSample footer/strong/td
   /tr
 /display:footer
   display:footer media=excel pdfSample footer/display:footer
   
   display:column property=id title=ID /
   display:column property=name  title=NAME/
   
   
 /display:table
 
 
 Expecting your kind interaction
 
 Thanks in advance
 
 Rakesh
 

-- 
View this message in context: 
http://old.nabble.com/struts-2-display-tag-export-problem-tp27819962p28070772.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: struts2 + Tiles, whypages shrink in top center ?

2010-03-29 Thread A. Lotfi
I put the  width attribute to 100%
 
but look how it looks now :
http://osp105.mit.edu:8084/Struts2Tiles/welcomeLink.action


--- On Mon, 3/29/10, sandeep kotha sandeep4u.ko...@gmail.com wrote:


From: sandeep kotha sandeep4u.ko...@gmail.com
Subject: Re: struts2 + Tiles, whypages shrink in top center ?
To: Struts Users Mailing List user@struts.apache.org, 
lukasz.len...@gmail.com
Date: Monday, March 29, 2010, 10:04 AM


Hi Lenard

Taking view source from your page i see width attribute is missing for your
table. Set the width attribute to 100% that will fix your issue.

Pasted is your view source with width attribute. This could help you.



!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
   http://www.w3.org/TR/html4/loose.dtd;

html
    head
        meta http-equiv=Content-Type content=text/html; charset=UTF-8
            titleWelcome/title
    /head
    body
        table   border=1 cellpadding=2 cellspacing=2 align=center
width=100%

            tr
                td height=30 colspan=2
                    div align=center style=font-weight:boldTV
shows/div

                /td
            /tr
            tr
                td height=250



a
href=/Struts2Tiles/friendsLink.action;jsessionid=92B2AD20EC639C7635D69D297037F8AF
Friends/abr
a
href=/Struts2Tiles/officeLink.action;jsessionid=92B2AD20EC639C7635D69D297037F8AF
The Office/abr

                /td
                td width=350

!DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN 
http://www.w3.org/TR/html4/loose.dtd;
html
head
meta http-equiv=Content-Type content=text/html; charset=ISO-8859-1
titleInsert title here/title
/head

body
Welcome Guest.
/body
/html
                /td
            /tr
            tr
                td height=30 colspan=2
                    div align=centercopy; vaannila.com/div

                /td
            /tr
        /table
    /body
/html






On 29 March 2010 11:45, Lukasz Lenard lukasz.len...@googlemail.com wrote:

 2010/3/29 A. Lotfi majidna...@yahoo.com
 
  I tried all the browsers but still small, plz take a look here :
 
  http://osp105.mit.edu:8084/Struts2Tiles/welcomeLink.action

 Did check the source of your page in browser? It's a mess, duplicated
 body and so on. Check your tiles, only main page (the layout) should
 have body tag. The reset has to be just a html snippet - no html, body
 tags.


 Regards
 --
 Łukasz
 http://www.lenart.org.pl/
 Kapituła Javarsovia 2010
 http://javarsovia.pl

 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org





  

Re: struts2 + Tiles, whypages shrink in top center ?

2010-03-29 Thread sandeep kotha
it occupies entire screen right how do you want your screen to look like ?
can you send me a screen shot it may help better

On 29 March 2010 23:24, A. Lotfi majidna...@yahoo.com wrote:

 I put the  width attribute to 100%

 but look how it looks now :
 http://osp105.mit.edu:8084/Struts2Tiles/welcomeLink.action


 --- On Mon, 3/29/10, sandeep kotha sandeep4u.ko...@gmail.com wrote:


 From: sandeep kotha sandeep4u.ko...@gmail.com
 Subject: Re: struts2 + Tiles, whypages shrink in top center ?
 To: Struts Users Mailing List user@struts.apache.org,
 lukasz.len...@gmail.com
 Date: Monday, March 29, 2010, 10:04 AM


 Hi Lenard

 Taking view source from your page i see width attribute is missing for your
 table. Set the width attribute to 100% that will fix your issue.

 Pasted is your view source with width attribute. This could help you.



 !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
http://www.w3.org/TR/html4/loose.dtd;

 html
 head
 meta http-equiv=Content-Type content=text/html; charset=UTF-8
 titleWelcome/title
 /head
 body
 table   border=1 cellpadding=2 cellspacing=2 align=center
 width=100%

 tr
 td height=30 colspan=2
 div align=center style=font-weight:boldTV
 shows/div

 /td
 /tr
 tr
 td height=250



 a

 href=/Struts2Tiles/friendsLink.action;jsessionid=92B2AD20EC639C7635D69D297037F8AF
 Friends/abr
 a

 href=/Struts2Tiles/officeLink.action;jsessionid=92B2AD20EC639C7635D69D297037F8AF
 The Office/abr

 /td
 td width=350

 !DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN 
 http://www.w3.org/TR/html4/loose.dtd;
 html
 head
 meta http-equiv=Content-Type content=text/html; charset=ISO-8859-1
 titleInsert title here/title
 /head

 body
 Welcome Guest.
 /body
 /html
 /td
 /tr
 tr
 td height=30 colspan=2
 div align=center© vaannila.com/div

 /td
 /tr
 /table
 /body
 /html






 On 29 March 2010 11:45, Lukasz Lenard lukasz.len...@googlemail.com
 wrote:

  2010/3/29 A. Lotfi majidna...@yahoo.com
  
   I tried all the browsers but still small, plz take a look here :
  
   http://osp105.mit.edu:8084/Struts2Tiles/welcomeLink.action
 
  Did check the source of your page in browser? It's a mess, duplicated
  body and so on. Check your tiles, only main page (the layout) should
  have body tag. The reset has to be just a html snippet - no html, body
  tags.
 
 
  Regards
  --
  Łukasz
  http://www.lenart.org.pl/
  Kapituła Javarsovia 2010
  http://javarsovia.pl
 
  -
  To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
  For additional commands, e-mail: user-h...@struts.apache.org
 
 







Re: struts2 + Tiles, whypages shrink in top center ?

2010-03-29 Thread A. Lotfi
yes I want the page to occupy the whole screen.
 
thanks

 On Mon, 3/29/10, sandeep kotha sandeep4u.ko...@gmail.com wrote:


From: sandeep kotha sandeep4u.ko...@gmail.com
Subject: Re: struts2 + Tiles, whypages shrink in top center ?
To: Struts Users Mailing List user@struts.apache.org
Date: Monday, March 29, 2010, 2:01 PM


it occupies entire screen right how do you want your screen to look like ?
can you send me a screen shot it may help better

On 29 March 2010 23:24, A. Lotfi majidna...@yahoo.com wrote:

 I put the  width attribute to 100%

 but look how it looks now :
 http://osp105.mit.edu:8084/Struts2Tiles/welcomeLink.action


 --- On Mon, 3/29/10, sandeep kotha sandeep4u.ko...@gmail.com wrote:


 From: sandeep kotha sandeep4u.ko...@gmail.com
 Subject: Re: struts2 + Tiles, whypages shrink in top center ?
 To: Struts Users Mailing List user@struts.apache.org,
 lukasz.len...@gmail.com
 Date: Monday, March 29, 2010, 10:04 AM


 Hi Lenard

 Taking view source from your page i see width attribute is missing for your
 table. Set the width attribute to 100% that will fix your issue.

 Pasted is your view source with width attribute. This could help you.



 !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
    http://www.w3.org/TR/html4/loose.dtd;

 html
     head
         meta http-equiv=Content-Type content=text/html; charset=UTF-8
             titleWelcome/title
     /head
     body
         table   border=1 cellpadding=2 cellspacing=2 align=center
 width=100%

             tr
                 td height=30 colspan=2
                     div align=center style=font-weight:boldTV
 shows/div

                 /td
             /tr
             tr
                 td height=250



 a

 href=/Struts2Tiles/friendsLink.action;jsessionid=92B2AD20EC639C7635D69D297037F8AF
 Friends/abr
 a

 href=/Struts2Tiles/officeLink.action;jsessionid=92B2AD20EC639C7635D69D297037F8AF
 The Office/abr

                 /td
                 td width=350

 !DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN 
 http://www.w3.org/TR/html4/loose.dtd;
 html
 head
 meta http-equiv=Content-Type content=text/html; charset=ISO-8859-1
 titleInsert title here/title
 /head

 body
 Welcome Guest.
 /body
 /html
                 /td
             /tr
             tr
                 td height=30 colspan=2
                     div align=center© vaannila.com/div

                 /td
             /tr
         /table
     /body
 /html






 On 29 March 2010 11:45, Lukasz Lenard lukasz.len...@googlemail.com
 wrote:

  2010/3/29 A. Lotfi majidna...@yahoo.com
  
   I tried all the browsers but still small, plz take a look here :
  
   http://osp105.mit.edu:8084/Struts2Tiles/welcomeLink.action
 
  Did check the source of your page in browser? It's a mess, duplicated
  body and so on. Check your tiles, only main page (the layout) should
  have body tag. The reset has to be just a html snippet - no html, body
  tags.
 
 
  Regards
  --
  Łukasz
  http://www.lenart.org.pl/
  Kapituła Javarsovia 2010
  http://javarsovia.pl
 
  -
  To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
  For additional commands, e-mail: user-h...@struts.apache.org
 
 








  

S2 s:form in interator really slow

2010-03-29 Thread Greg Lindholm
Struts 2.1.8

I had one page in the application I'm working on which was really
really slow... it was taking 4-5 seconds to render the jsp page.
It's a very simple page, just a list of 10 to 15 items that are
iterated over and each one gets a form with one hidden field and a
button.

It appears it's the s:form tag that is is culprit.

Here is the original:

s:iterator value=#action.userConnectionsPaged
s:if test=typeNoConnection
div class=section
s:form action=AddConnection theme=simple
s:hidden name=userId value=%{userId} theme=simple/
s:submit cssClass=button key=FindConnections.action.addConnection
theme=simple/
/s:form
/div
/s:if
/s:iterator

Here what I replaced it with to make it run fast:

s:iterator value=#action.userConnectionsPaged
s:if test=typeNoConnection
div class=section
form action='s:url action=AddConnection /' 
input type=hidden name=userId value='${userId}' /
input type=submit name=FindConnections.action.addConnection
value='s:text name=FindConnections.action.addConnection/'
class=button/
/form
/div
/s:if
/s:iterator

That was the only change I made to the page and now there is no
noticeable delay in rendering the page.

Anyone have any idea what would cause the s:form  tag to take so
long?   Is there a bug or something with it?
Is there any additional information I can provide to help someone
figure out what is going on?

I've seen reports on this mailing list of slow rendering of jsp pages
but never encountered myself before.

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: struts2 + Tiles, whypages shrink in top center ?

2010-03-29 Thread Lukasz Lenart
2010/3/29 A. Lotfi majidna...@yahoo.com:
 I put the  width attribute to 100%

 but look how it looks now :
 http://osp105.mit.edu:8084/Struts2Tiles/welcomeLink.action

It took the whole page width, as you wanted but you still mixing body
elements as Sandeep Kotha showed you. Maybe you should start with some
HTML tutorial?


Regards
-- 
Łukasz
http://www.lenart.org.pl/
Kapituła Javarsovia 2010
http://javarsovia.pl

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Pagination with Struts 2.1.8 ?

2010-03-29 Thread Zoran Avtarovski
We use display tag extensively and it ties into S2 really well.

We¹ve set it up to use DB based pagination so you only load the items you
need and it ties into S2 i18n properties.

We also use jqGrid which is based on jQuery and works really well where you
want ajax based tables.

Z.
 
 Thanks. I already read about it but does it work well with Struts 2 ?
 
 
 --- On Mon, 3/29/10, Alex Rodriguez Lopez alo...@flordeutopia.pt wrote:
 
 
 From: Alex Rodriguez Lopez alo...@flordeutopia.pt
 Subject: Re: Pagination with Struts 2.1.8 ?
 To: user@struts.apache.org
 Date: Monday, March 29, 2010, 4:32 AM
 
 
 Display tag, works like a charm:
 
 http://displaytag.sourceforge.net/1.2/tut_basic.html
 
 Works with lists and handles pagination, data export, I recommend it!
 
 Em 29-03-2010 11:07, Celinio Fernandes escreveu:
  Hi,
  This is a classic requirement.
  I have this table, in a JSP, that I have created with thetable  html tag
 and that i have filled using thes:iterator.
  Thiss:iterator  tag iterates over an ArrayList defined in my action.
  There are too many lines and I need to add some pagination functionality to
 it.
  What solutions are out there and which one do you recommend ?
  Thanks for your feedback.
 
 
 
 
 
 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org
 
 
 
 



Re: Translation Properties

2010-03-29 Thread Celinio Fernandes
Hi,
I use Babel Fish, which is a freeware and written in Java.
It is available here :


http://www.softpedia.com/get/Others/Home-Education/Babel-Fish.shtml


It's pretty cool.

--- On Fri, 3/26/10, CRANFORD, CHRIS chris.cranf...@setech.com wrote:

From: CRANFORD, CHRIS chris.cranf...@setech.com
Subject: Translation Properties
To: Struts Users Mailing List user@struts.apache.org
Date: Friday, March 26, 2010, 10:15 AM


I was curious if anyone else has come across a wonderful tool to help
manage your applicationMessages translations for the various locales you
use in your Struts applications?  Our project continues to expand into
other locales and trying to manage upwards of 15+ languages with over
3000 messages per locale is getting to be a slight headache.  

Chris


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org