RE: Tiles putList question
That worked like a charm. Thank you Antonio! Rick -Original Message- From: Antonio Petrelli [mailto:[EMAIL PROTECTED] Sent: Sunday, December 31, 2006 6:43 AM To: Struts Users Mailing List Subject: Re: Tiles putList question Rick Mangi ha scritto: > Hello list, > > I am trying to use a putList in tiles to insert a list of pre-defined > tile definitions. > > >value="/tiles/spaDetails/displayTile.jsp" /> > > >/> >type="definition" /> > > > I will try to adapt a code posted by Eric Rank in a later message (thanks Eric): HTH Antonio - 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: preInvokeJS does not work for tag
Hi Celio "preInvokeJS" will only work while using the ajax theme, if you are not using it, then the regular "onclick" attribute will do. regards musachy The Célio Cidral Junior wrote: Hi Musachy, 2007/1/2, Musachy Barroso <[EMAIL PROTECTED]>: What version are you using? using head svn , I modified showcase's remote link first example to this: Update 'Div 1' and 'Div 2', publish topic '/after', use indicator and it shows "test". "preInvokeJS" is deprecated. If you are using head svn, use "notifyTopics" instead. See showcase for examples, or this link: http://struts.apache.org/2.x/docs/ajax-tags.html I don't know much about ajax (well, almost nothing), but using the ajax theme in my case is not a kludge? Regards, Célio. - 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] struts2-portlet application problems
Hi, I have downloaded the struts2-portlet sample application, both versions 2.0.1 and a nightly build of 2.0.2 but it fails to start. It does not even have the struts.xml file /WEB-INF/classes, but the file xwork.xml instead. if I rename this file to struts.xml then it complaints: 14:26:46,844 ERROR [ConfigurationUtil] Unable to find parent package struts-portlet-default on the console. The daily build of 2.0.2 does not even have dependencies filled. If I update them that I even get some stacktraces. Issue WW-1407 discusses similar problems, is marked as resolved 3 months ago, but the issue still remains. I am trying to run it under JBoss 4.0.5 and have plans to test it under Websphere. Can anybody help me with this? Dariusz Wojtas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] - access to the action from a JSP page
why do I get this error ? java.lang.ClassCastException: org.apache.struts.validator.BeanValidatorForm at com.traveldesk.actions.MyRequestAction.AddRequest( MyRequestAction.java:49) public ActionForward AddRequest(...) { SubmitRequestForm submitRequestForm = (SubmitRequestForm)form; } public class SubmitRequestForm extends ValidatorForm { .. } SInce because SubmitRequestForm is of ValidatorForm type, I cant use (SubmitRequestForm)form Please help.
error
why do I get this error ? java.lang.ClassCastException: org.apache.struts.validator.BeanValidatorForm at com.traveldesk.actions.MyRequestAction.AddRequest( MyRequestAction.java:49) public ActionForward AddRequest(...) { SubmitRequestForm submitRequestForm = (SubmitRequestForm)form; } public class SubmitRequestForm extends ValidatorForm { .. } SInce because SubmitRequestForm is of ValidatorForm type, I cant use (SubmitRequestForm)form Please help.
Re: [S2] - access to the action from a JSP page
I wanted to access some complex object from the action inside the JSP page. My idea was to get access to the action, then to the object instance. Possibly this can be fixed by exposing the property as a ascriptlet variable and then casting it, ut I just wanted to know if this is allowed directly. Dariusz Wojtas On 1/3/07, Dave Newton <[EMAIL PROTECTED]> wrote: From: Dariusz Wojtas [mailto:[EMAIL PROTECTED] > I know how to access it using tags, but what I want is to access it > with plain Java inside a scriptle area. > Something similar to this: > > <% > MyTestAction act = ... ? > %> Why? Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: I think I want to convert to S2 !
> From: Rick Schumeyer [mailto:[EMAIL PROTECTED] > I'm really tempted to give S2 a serious try. FWIW I've had *very* few problems getting things to work with S2; I am using both Tiles and Hibernate with almost no problems. I have been quite happy with almost everything so far. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [S2] - access to the action from a JSP page
From: Dariusz Wojtas [mailto:[EMAIL PROTECTED] > I know how to access it using tags, but what I want is to access it > with plain Java inside a scriptle area. > Something similar to this: > > <% > MyTestAction act = ... ? > %> Why? Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[S2] - Struts2, portlets and Websphere Portal
Hello, We are just considering libraries to be used in a new project that is supposed to be a portlet application and work in Websphere 6.x Portal version. I have heard some comments about issues with Struts 1.x in this environment. What does it look like in Struts 2? Are there any issues with using it also with sitemesh in such app? I have downloaded the portlet sample app for struts 2 and will try to run it, but I would also ask for opinions of people that have some experience in it. Thanks in advance Dariusz Wojtas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts2 conversion error message.
Hi, Nuwan, Thanks for quick reply. Yes, I know this tech for validator. I saw this in 'WebWork in Action" before. However, it seems the 'fieldName' property cannot observable for conversion error. If you make the message something like this: xwork.default.invalid.fieldvalue = Invalid field value for field ${getText(fieldName)}. Struts reports an exception: java.lang.IllegalArgumentException: can't parse argument number getText(fieldName) java.text.MessageFormat.makeFormat(MessageFormat.java:1339) java.text.MessageFormat.applyPattern(MessageFormat.java:458) java.text.MessageFormat.(MessageFormat.java:350) Any suggestion? 2007/1/4, Nuwan Chandrasoma <[EMAIL PROTECTED]>: Hi, Yes it is possible . take a look at this tutorial http://struts.apache.org/2.x/docs/localizing-output.html Thansks, Nuwan. - Original Message - From: "Ruimo Uno" <[EMAIL PROTECTED]> To: Sent: Wednesday, January 03, 2007 11:57 AM Subject: Struts2 conversion error message. > Hi, > > I'm evaluating Struts-2.0.1. > > The default error message for conversion error is > 'xwork.default.invalid.fieldvalue' and it shows something like the > following message: > > Invalid field value for field "user.age". > > But the 'user.age' is confusing for end users. Moreover, it is > difficult to undestand for non-native people. Of course, you can > override the message by preparing error message for each field: > > invalid.fieldvalue.user.age = Age is invalid. > > But in this manner, the message explodes because it requires message by > field. > > invalid.fieldvalue.user.name = User name is invalid. > invalid.fieldvalue.user.age = Age is invalid. > ... > > So, my question is "Is it possible to access the field name from > message file?" I want to construct the message something like this: > > xwork.default.invalid.fieldvalue = Invalid field value for field > "${getText(fieldName)}". > user.age = Age > user.name = User name > > Thanks, > > -- > Ruimo Uno > (Shisei Hanai) > > - > 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] -- Ruimo Uno (Shisei Hanai) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts2 conversion error message.
Hi, Yes it is possible . take a look at this tutorial http://struts.apache.org/2.x/docs/localizing-output.html Thansks, Nuwan. - Original Message - From: "Ruimo Uno" <[EMAIL PROTECTED]> To: Sent: Wednesday, January 03, 2007 11:57 AM Subject: Struts2 conversion error message. Hi, I'm evaluating Struts-2.0.1. The default error message for conversion error is 'xwork.default.invalid.fieldvalue' and it shows something like the following message: Invalid field value for field "user.age". But the 'user.age' is confusing for end users. Moreover, it is difficult to undestand for non-native people. Of course, you can override the message by preparing error message for each field: invalid.fieldvalue.user.age = Age is invalid. But in this manner, the message explodes because it requires message by field. invalid.fieldvalue.user.name = User name is invalid. invalid.fieldvalue.user.age = Age is invalid. ... So, my question is "Is it possible to access the field name from message file?" I want to construct the message something like this: xwork.default.invalid.fieldvalue = Invalid field value for field "${getText(fieldName)}". user.age = Age user.name = User name Thanks, -- Ruimo Uno (Shisei Hanai) - 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: preInvokeJS does not work for tag
Hi Musachy, 2007/1/2, Musachy Barroso <[EMAIL PROTECTED]>: What version are you using? using head svn , I modified showcase's remote link first example to this: Update 'Div 1' and 'Div 2', publish topic '/after', use indicator and it shows "test". "preInvokeJS" is deprecated. If you are using head svn, use "notifyTopics" instead. See showcase for examples, or this link: http://struts.apache.org/2.x/docs/ajax-tags.html I don't know much about ajax (well, almost nothing), but using the ajax theme in my case is not a kludge? Regards, Célio. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Struts2 conversion error message.
Hi, I'm evaluating Struts-2.0.1. The default error message for conversion error is 'xwork.default.invalid.fieldvalue' and it shows something like the following message: Invalid field value for field "user.age". But the 'user.age' is confusing for end users. Moreover, it is difficult to undestand for non-native people. Of course, you can override the message by preparing error message for each field: invalid.fieldvalue.user.age = Age is invalid. But in this manner, the message explodes because it requires message by field. invalid.fieldvalue.user.name = User name is invalid. invalid.fieldvalue.user.age = Age is invalid. ... So, my question is "Is it possible to access the field name from message file?" I want to construct the message something like this: xwork.default.invalid.fieldvalue = Invalid field value for field "${getText(fieldName)}". user.age = Age user.name = User name Thanks, -- Ruimo Uno (Shisei Hanai) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to reduce redundant form code in JSPs?
Hi, > There are lots of ways :-) You didn't list what technologies you're > using, but here are some possibilities: > > - if you're using JSP 2.0, you could create a tag file to represent each > type of form field and encapsulate the common markup there > > - you could write a JSP Custom Tag to emit the markup (though I don't > recommend that, since altering the markup then involves recompiling) > > - if you're using Tiles, you could create a tile definition to > encapsulate the common markup > > - if you're using Struts 2, you could create a Struts 2 component / tag > to handle this > > - you could use a plain ol' jsp:include tag or @include directive Im using Struts 1 without tiles. I took a look at all the options and finally created a JSP2 tag file - this approach is great because you don't need to recompile code in case of changes and the designer can change the layout by only modifying the tag file (basically a JSP fragment), without having to modify code. Thanks for your help, Thorsten - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Sitemesh and utf-8
Hi again. I'm using Resin. I made a jsp located at a path where no decorator for Sitemesh is defined. Il this jsp doesn't return any accent, it works correctly. But If the jsp returns an accent, I got : [10:27:50.032] java.lang.IllegalStateException: http://localhost/accent/accent.do: tried to write 1346 bytes with content-length 1316 (At 'f', char=102). [10:27:50.032] at com.caucho.server.connection.ResponseStream.lengthException(ResponseStream.java:551) [10:27:50.032] at com.caucho.server.connection.ResponseStream.setBufferOffset(ResponseStream.java:362) [10:27:50.032] at com.caucho.vfs.i18n.UTF8Writer.write(UTF8Writer.java:155) [10:27:50.032] at com.caucho.server.connection.ToByteResponseStream.flushCharBuffer(ToByteResponseStream.java:469) [10:27:50.032] at com.caucho.server.connection.ToByteResponseStream.flushBuffer(ToByteResponseStream.java:422) [10:27:50.032] at com.caucho.server.connection.ResponseStream.flush(ResponseStream.java:582) [10:27:50.032] at com.caucho.server.connection.ResponseStream.flushChar(ResponseStream.java:630) [10:27:50.032] at com.caucho.server.connection.ResponseWriter.flush(ResponseWriter.java:180) [10:27:50.032] at com.opensymphony.module.sitemesh.filter.PageFilter.writeOriginal(PageFilter.java:192) [10:27:50.032] at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:67) [10:27:50.032] at com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:70) [10:27:50.032] at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:173) [10:27:50.032] at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:229) [10:27:50.032] at com.caucho.server.hmux.HmuxRequest.handleRequest(HmuxRequest.java:420) ... and the jsp is not printed completly (I got ...). If I disable completly Sitemesh filter, no more exception and the content is correctly redered. So it seem that when no decorators are defined, Sitemesh change content-length with a wrong value Just a question : I decided to build my application entirely in utf-8. Have any body done the same ? Does it work correctly ? I wanted to do this for having no more encoding problems. It seem to be the right solution because utf-8 can represent any character. But finally, I got a lot of problems -- Mike Baroukh --- Cardiweb - 31 Rue de Mogador Paris IXeme 06 63 57 27 22 - 01 53 21 82 63 - Jabber: [EMAIL PROTECTED] http://www.cardiweb.com --- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with encoding
I was just going to recommend the same app. Works for me with 3.2 But there is also a standalone JNLP app. Works perfectly. Dariusz Wojtas On 1/3/07, Antonio Petrelli <[EMAIL PROTECTED]> wrote: Mike Baroukh ha scritto: > Do you know if there is a way to tell him to do it automatically ? > It's strange that Eclipse default properties editor doesnt handle this > automatically, isn't it ? Try this: http://propedit.sourceforge.jp/index_en.html I used it a while ago with Eclipse 3.1. It seems not to be updated, so I don't know if it works. Ciao Antonio - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with encoding
Mike Baroukh ha scritto: Do you know if there is a way to tell him to do it automatically ? It's strange that Eclipse default properties editor doesnt handle this automatically, isn't it ? Try this: http://propedit.sourceforge.jp/index_en.html I used it a while ago with Eclipse 3.1. It seems not to be updated, so I don't know if it works. Ciao Antonio - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with encoding
>UTF-8 encoding isn't legal for resource properties files; they have to be ASCII-encoded with Unicode escapes for non-ASCII characters. >Use the JDK utility 'native2ascii' to convert them from UTF-8 to the correct encoding and syntax and see if that helps. Yes, it works. I wasn't aware of it. I use Eclipse for editing. Do you know if there is a way to tell him to do it automatically ? It's strange that Eclipse default properties editor doesnt handle this automatically, isn't it ? What would be nice is if there is a way for Struts2 to do the samething than naitive2ascii on the fly Property files are hard to read now ... Thanks a lot ! Mike Laurie Harper a écrit : Mike Baroukh wrote: Hi. I have a problem with accents. My project is entirely in utf-8 : jsps, java sources, resources properties Depending on the way I put accents in my jsp, it works or not : work : - directly in the jsp source - with s:property -> converted with à by freemarker. - in input box of s:textfield -> converted with à by freemarker. don't work with : - in label attribute of any ui tag, if I use %{getText('xx')}. - with s:text. I use a filter that force encoding to utf-8. I also add page pageEncoding="UTF-8" to the jsp. With or without SiteMesh, no difference. Has anybody any idea on what's wrong ? Thanks for any help. UTF-8 encoding isn't legal for resource properties files; they have to be ASCII-encoded with Unicode escapes for non-ASCII characters. Use the JDK utility 'native2ascii' to convert them from UTF-8 to the correct encoding and syntax and see if that helps. L. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Mike Baroukh --- Cardiweb - 31 Rue de Mogador Paris IXeme 06 63 57 27 22 - 01 53 21 82 63 - Jabber: [EMAIL PROTECTED] http://www.cardiweb.com --- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to reduce redundant form code in JSPs?
On 1/2/07, Laurie Harper <[EMAIL PROTECTED]> wrote: [EMAIL PROTECTED] wrote: - if you're using Struts 2, you could create a Struts 2 component / tag to handle this Not using S2 yet, but, WW 2.2 that S2 is based on has tag themes for the form tags. You can write your own theme extensions of base form tags to follow your convention for form field layout. I'd be surprised if that capability was lost in the merger. You can look at the xhtml theme as an example. It might even do something close enough to what you want already. I seem to recall that it layed out form fields as table rows with label in one column and field in adjacent column of same table row. -Van -- - Mike "Van" Riper [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]