[S2] SiteMesh: let the user choose to see a page undecorated
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]
[S2] formatting informations in properties files
In my jsp pages I often need to limit the number of decimals and I learnt how to create a properties file with the same name of the action and use the s:text tag: I ended up with many properties files which have most the same formatting informations. I wonder if there is a smarter and centralized way to store the formatting informations used in different jsp pages associated to different actions. Thanks Filippo -- View this message in context: http://www.nabble.com/-S2--formatting-informations-in-properties-files-tf4554313.html#a12996857 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
If Tag: testing for an enumerated value
Somewhere I have the following enumeration public enum Interval { GENERIC, MONTH, YEAR; } The action has the following method: public Interval getInterval() {return iInterval;} I supposed I could test the enumerated value inside my jsp in the following way: anno but it doesn't work. The only solution I found was to to insert a boolean isYear() method inside the action combined with a Can you suggest a better way? Thanks Filippo -- View this message in context: http://www.nabble.com/If-Tag%3A-testing-for-an-enumerated-value-tf4527832.html#a12919403 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] DateTimePicker and css
I use some css inside the web application I'm developing with Struts 2. In one form I have some dateTimePicker fields. Unfortunately when I open a calendar it is not formatted very well due to the fact that the table margin and cell padding set in the css are different from the default one for displaying a good-looking calendar. The final result is that there are holes between the header, the body and the footer of the calendar. I think the only way to solve the problem is to create a special css which overwrite the values of margin and padding fixing them to zero: I have already tried to change the parameter cssClass and templaceCssPath but I was unsuccessful, maybe becuase I made something wrong. Thanks for any help. Filippo -- View this message in context: http://www.nabble.com/-S2--DateTimePicker-and-css-tf4488385.html#a12799904 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] can somebody help on DoubleSelect ?
Some days ago I posted a message for a problem on the DoubleSelect but I received no answers. I retry again hoping to be more lucky. Here is the link to the original message: http://www.nabble.com/-S2--Doubleselect-inconsistent-if-using-%27back%27-button-tf4317705.html#a12294147 Doubleselect inconsistent It is a bad thing because if the user pushes the 'back' button on the browser the DoubleSelect can be in an inconsistent state. It is easy to make it work again but it is very boring when you have to fill forms quickly and easily. Some days ago I searched extesively on internet to check if somebody else had had the same problem, but I found no one. Maybe it is a problem confined in my S2 release (should be 2.06). Thanks again Filippo -- View this message in context: http://www.nabble.com/-S2--can-somebody-help-on-DoubleSelect---tf4423314.html#a12617107 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] Doubleselect inconsistent if using 'back' button
I'm using Struts 2.0.6 I noticed the following behaviour of the doubleselect UI tag, present also in the Struts showcase. A non default item is choosen in the first select and something else is choosen in the linked select. After submit if one returns to the form page using the 'back' button in the browser the content of the double select is inconsistent. What I mean is that the first select reflects the choice you made, while the second select shows the first element connected to the default value of the first select. For example on the Struts showcase the double select default values are: South Florida Somebody submits North, Oregon, then pushes 'back'. The double select now shows North (the previous choice) Florida (inconsitent, Florita is in the South). Surely changing the first select forward and backward a consistent state is restored, but it is a potential source of input errors. Thanks Filippo -- View this message in context: http://www.nabble.com/-S2--Doubleselect-inconsistent-if-using-%27back%27-button-tf4317705.html#a12294147 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[S2] How to disable/hide ui components with javascript
Hello, I'm moving the first steps with S2. I'm going to build a form with many input components. Some of them should be disabled or hidden based upon the selection of a radio button. In a pure jsp scenario where html tags are used I can link some javascript function which uses style.display = 'none' or 'block' for those components I want to hide. Don't know if it is a valid way with S2 too and above all I don't know how to link javascript code to the S2 tags. Can you suggest an howto or an example ? Thanks Filippo -- View this message in context: http://www.nabble.com/-S2--How-to-disable-hide-ui-components-with-javascript-tf4193237.html#a11924834 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DateTimePicker doesn't work with siteMesh
I would like to share the following experience. I decided to make some experiments on the dateTimePicker tag on my test site where I also use Sitemesh with a very complex layout. On IE 6 there was no way to see the calendar window and pushing the small calendar icon the layout of the page was partially ruined. I thought it was a bad interaction between my css and the dateTimePicker and started investigating. After some hours of useless try and error I focused my attention on the exception list inside the decorator.xml of the Struts showcase. I inserted some of those exceptions (those related to dojo and struts) in the decorator.xml of my test application and finally I could see the calendar window. Still have to resolve other css-related problems. So, according to my experience if you use Sitemesh and datetimepicker together you have to remember to use exceptions in the decorator.xml and I couldn't find this advice in the little documentation I have found. Besides the css-related problems I have now (it seems there too much padding than that needed by dateTimePicker somewhere in the application css) let me think the tag is not so easy to use as expected becuase other themes and layouts can interfere with it. Hoping it helps. -- View this message in context: http://www.nabble.com/DateTimePicker-doesn%27t-work-with-siteMesh-tf3963074.html#a11247072 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Investigating the ValueStack
In order to better understand the ValueStack I wrote the following code to explore it: ValueStack myStack = ActionContext.getContext().getValueStack(); out.println("Stack size " + myStack.size() + ""); java.util.Map myMap = myStack.getContext(); for (Object pollo : myMap.keySet()) { Object value = myMap.get(pollo); out.print(""); out.println(pollo.toString() + " - "); if (value != null) { out.println(value.toString()); } } The results are much different from what I was expecting to see. First there is no notion of the different level of the satck. Second lots of objects accessible inside the jsp with struts tag and related to action properties are not present. Thanks Filippo -- View this message in context: http://www.nabble.com/Investigating-the-ValueStack-tf3951442.html#a11210514 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Best practices with struts 2.0
I'm new to Struts 2.0 and I have to difficulties in finding good tutorials. I have many doubts on the best way to perform some actions. For example I have the following line inside one jsp page: It accesses a property in the action of integer type. They are minutes but I wuold like to represent them as XX:YY where XX are the hours. Surely I can code the function "getMontlyDeltaMinutesAs_XX_YY_String" in the action but I would mix model and presentation. I think it is better to use a special tag for formatting but I have no idea on how to do it. The OGNL stack is somewhat misterious to me so I'm looking for a code snippet to display everything on it. I was quite surprised jsp variables such as <%! String aName = "Filippo";%> are not known to struts tags. Is there a way to use them, for example, inside an tag ? Thanks for any help -- View this message in context: http://www.nabble.com/Best-practices-with-struts-2.0-tf3928006.html#a11139897 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]