Re: [OT] Re: Best Tool to develop html pages

2008-02-05 Thread Lukasz Lenart
Maybe not the best, but very good - MyEclipse Regards -- Lukasz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Multiple submit buttons in a single JSP

2008-02-07 Thread Lukasz Lenart
Hi, You can use s:submit value=Save method=save/ s:submit value=Update method=update/ s:submit value=Show method=show/ and Action class with three methods, the same like execute() http://struts.apache.org/2.x/docs/submit.html Regards -- Lukasz http://www.linkedin.com/in/lukaszlenart

Re: Basic setup question (tiles 2)

2008-02-11 Thread Lukasz Lenart
Did you follow docs configuration as in http://struts.apache.org/2.x/docs/tiles-plugin.html ? Regards -- Lukasz http://www.linkedin.com/in/lukaszlenart - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,

Re: Basic setup question (tiles 2)

2008-02-11 Thread Lukasz Lenart
It is better to add dependency for Tiles plugin, it will download all needed jars for you: dependency groupIdorg.apache.struts/groupId artifactIdstruts2-tiles-plugin/artifactId version2.0.9/version /dependency Regards -- Lukasz

Re: [OT] Re: Javascript problem

2008-02-11 Thread Lukasz Lenart
Did you put such code inside page header's tags? Regards -- Lukasz http://www.linkedin.com/in/lukaszlenart - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Javascript problem

2008-02-11 Thread Lukasz Lenart
Try to put your JavaScript in page header and use onload header script window.onload = function() { alert('hi'); alert(document.getElementById('id')); } /script /header Regards -- Lukasz http://www.linkedin.com/in/lukaszlenart

Re: Source for Struts Tiles Plugin?

2008-02-12 Thread Lukasz Lenart
Hi, By default, Tiles2 use tiles.xml, you can add additional config files via DEFINITIONS_CONFIG - http://tiles.apache.org/config-reference.html Please check also DTD for tiles.xml, it was changed. Regards -- Lukasz http://www.linkedin.com/in/lukaszlenart

Re: Struts + Maven + Eclipse problem

2008-02-12 Thread Lukasz Lenart
Set package namespace to / package name=default extends=struts-default namespace=/ Regards -- Lukasz http://www.linkedin.com/in/lukaszlenart - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

Re: Basic setup question (tiles 2)

2008-02-12 Thread Lukasz Lenart
Thanks for clarification! Regards -- Lukasz http://www.linkedin.com/in/lukaszlenart - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Basic setup question (tiles 2)

2008-02-12 Thread Lukasz Lenart
Hi, I've probably found the problem, struts-tiles-plugin doesn't depend on tiles-jsp. You have to manually added it your pom.xml, like below: dependency groupIdorg.apache.tiles/groupId artifactIdtiles-jsp/artifactId version2.0.4/version

Re: struts2+Spring+Hibernate Integration

2008-02-21 Thread Lukasz Lenart
Hi, Download Spring 2 libraries and put in your WEB-INF/lib folder Regards -- Lukasz http://www.linkedin.com/in/lukaszlenart - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Struts 2 and SOA

2008-02-26 Thread Lukasz Lenart
Hi, I think, it will be better if try to use XFire / CXF or Axis2, you can create simple POJO and expose it as WebService and from the other side you can use such POJO in your Struts2 actions. And of course you can use Spring to initialize it and inject to your actions ;-) If you want to have

Re: Struts 2 and SOA

2008-02-26 Thread Lukasz Lenart
Hi, It is too complex to answer in one post ;-), but you almost answer all your questions ;-) I don't know all the details about your system (will it be base on some J2EE App server?), but for example: - you can implement all your core business logic as simple POJO's base on Spring, it will allow

Re: good tutorial recommendation

2008-02-29 Thread Lukasz Lenart
Hi, You can use also maven2 (2.0.8) mvn archetype:create and you will have some option to chose (8, 19-23) Regards -- Lukasz http://www.linkedin.com/in/lukaszlenart - To unsubscribe, e-mail: [EMAIL PROTECTED] For

Re: Problem with returning SUCCESS from execute

2008-03-04 Thread Lukasz Lenart
*class* StrutsExample { Your class should extend ActionSupport or return Action.SUCCESS (not SUCCESS) Regards -- Lukasz http://www.linkedin.com/in/lukaszlenart - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

Re: DispatchAction nonexisting method

2008-03-06 Thread Lukasz Lenart
Hi Subclass the DispatchAction and override getMethod() like below Method getMethodName() { Method method = super.getMethod(); if (method == null) { method = clazz.getMethod(unspecified, types); } return method; } Regards -- Lukasz

Re: Preserve datas in form

2008-03-06 Thread Lukasz Lenart
Hi, How do you forward to jsp, simple forward or maybe redirect? Could you give some example? Regards -- Lukasz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: [S2] Mapping a result string for all the actions

2008-03-10 Thread Lukasz Lenart
Hi, You can use global-results http://struts.apache.org/2.0.6/docs/result-configuration.html Regards -- Lukasz http://www.linkedin.com/in/lukaszlenart - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,

Re: accessing path_info

2008-03-12 Thread Lukasz Lenart
Hi Maybe this will help http://www.lunatech-research.com/archives/2005/07/29/struts-urls Regards -- Lukasz http://www.linkedin.com/in/lukaszlenart - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail:

[S2] Maven2 and validation.xml

2008-03-12 Thread Lukasz Lenart
Hi, I'm using maven2 to build my Struts2 application and how to solve the problem with coping *-validation.xml files to target directory? All my *-validation.xml files are next to action classes, in the same package / directory (src/main/java/pl/org/lenart/s2) but they are no copied in to target

Re: [S2] Maven2 and validation.xml

2008-03-12 Thread Lukasz Lenart
Resource files are supposed to be in the resources folder... Just put them there with the same path as your java class, and everything should be copied where it's supposed to. If that does not fit your Yes, I did that but I was wondering how it should be, the good practice in case of Struts

Re: Exception in Validation

2008-03-16 Thread Lukasz Lenart
Hi, How do you start your project? With maven2 maybe? The xml file have to be in the same output directory, next to compiled class. If you use maven2, put your xml in to folder resources with the same path as for action class. Regards -- Lukasz http://www.linkedin.com/in/lukaszlenart

Re: Exception in Validation

2008-03-16 Thread Lukasz Lenart
Ok, check if xml file is in WebRoot/WEB-INF/classes/path Regards -- Lukasz http://www.linkedin.com/in/lukaszlenart - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Struts2 Annotation based Validation

2008-03-17 Thread Lukasz Lenart
Hi, Error messages are stored in request, you have to subclass ActionSupport and add some mechanism to store messages in session. Regards -- Lukasz http://www.linkedin.com/in/lukaszlenart - To unsubscribe, e-mail: [EMAIL

Re: Struts2 Annotation based Validation

2008-03-17 Thread Lukasz Lenart
In Struts2 error messages are stored in the ValueStack in an object Yes, I made mistake, I've mean in request scope, not in request object ;-) Regards -- Lukasz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

Re: Struts2 Annotation based Validation

2008-03-18 Thread Lukasz Lenart
But when I enter the value in the textbox and click submit again, the validation error for next is displayed correctly but entered value disappears in the textbox which is abnormal . Maybe you are redirecting to the next page? Could you paste snippet for your struts.xml and jsp? Regards

Re: Custom validation with Struts2

2008-03-18 Thread Lukasz Lenart
request = ServletActionContext.getRequest(); String tmp = ; try { tmp = request.getParameter(cardNo); Integer i = this.getCardNo(); if (tmp != null tmp.length() 0) {

Re: Struts2 Annotation based Validation

2008-03-18 Thread Lukasz Lenart
form name=myForm method=post action=MyAction.do validate=true/ tr td width=115First Name/td td width=142input type=text name=firstName

Re: Struts2 Annotation based Validation

2008-03-18 Thread Lukasz Lenart
tds:password name=pwd label=Your Password//td By default s:password tag don't shows value of your password, you can change such behaviour by adding attribute showPassword=true, but you should consider security issue. Regards -- Lukasz http://www.linkedin.com/in/lukaszlenart

Re: Custom validation with Struts2

2008-03-18 Thread Lukasz Lenart
I'm not sure were is the problem but I've just checked such simple example below and everything is ok. Maybe you should consider to use Long instead of Integer, because when you enter more then 2147483647 to the field you will get some strange value back to the input (because you loose precision

Re: About ActionErrors.GLOBAL_ERROR

2008-03-19 Thread Lukasz Lenart
Hi, Maybe something like this: logic:messagesPresent name=%=Globals.ERROR_KEY% table width=480 id=ErrorsTableId class=ErrorsTable html:messages id=error name=%=Globals.ERROR_KEY% tr tdbean:write name=error //td /tr /html:messages /table /logic:messagesPresent logic:messagesPresent

Re: sorry for this test

2008-03-19 Thread Lukasz Lenart
email. But apparently the email didn't got to the users, i haven't received it. That's how it works! You will don't get your emails back, but any else will get ;-) Regards -- Lukasz http://www.linkedin.com/in/lukaszlenart

Re: File Upload Size

2008-03-19 Thread Lukasz Lenart
Hi, You can subclass FileUploadInterceptor and override acceptFile(File file, String contentType, String inputName, ValidationAware validation, Locale locale) method Regards -- Lukasz http://www.linkedin.com/in/lukaszlenart

Re: File Upload Size

2008-03-19 Thread Lukasz Lenart
Does your action implements ValidationAware interface? Regards -- Lukasz http://www.linkedin.com/in/lukaszlenart - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: File Upload Size

2008-03-20 Thread Lukasz Lenart
No it doesn't Maybe that's the problem, FileUploadInterceptor check if action implements it and add error messages. If you implement it, remember to add result name=input. Regards -- Lukasz http://www.linkedin.com/in/lukaszlenart

Re: Best Pratices for Access Restriction and Authentication?

2008-03-20 Thread Lukasz Lenart
I just read bout about Acegi (http://www.acegisecurity.org/). As far as i understand this framework would provide mechanisms for authentication and authorization (which also will be going to be a topic in a later project stage). In its documentation i read that it's working with spring.

Re: Struts2 Annotation based Validation

2008-03-26 Thread Lukasz Lenart
Is it possible for me to have multilingual Validations using Annotation Based Validations in Struts2 ? Yes, you can, just add key = some.error.message to your annotation, like below @RequiredStringValidator(key = some.key) public void setFirstName(String firstName) {

Re: Struts2 Annotation based Validation

2008-03-26 Thread Lukasz Lenart
Hi, You mess too many thing, please try like this: @RequiredStringValidator(key = error.required, message = Please enter a value for First name) error.required = ${fieldName} is required! Regards -- Lukasz http://www.linkedin.com/in/lukaszlenart

Re: s:if Problem

2008-03-26 Thread Lukasz Lenart
s:if test=%{kzAuftr == Constants.ORDER_STATUS_EMPTY } s:if test=%{#kzAuftr == @[EMAIL PROTECTED] } and check this link, section Accessing static properties http://struts.apache.org/2.x/docs/ognl-basics.html Regards -- Lukasz http://www.linkedin.com/in/lukaszlenart

Re: Struts2 Annotation based Validation

2008-03-27 Thread Lukasz Lenart
Im not sure where to place my properties file. I almost always put my messages to file named package.properties in the same folder as my action's classes. Regards -- Lukasz http://www.linkedin.com/in/lukaszlenart - To

Re: Client Side Validation with Struts

2008-03-29 Thread Lukasz Lenart
Hi, Could you be more specific, which Struts version? If you use onsubmit event, you should do that like this: onsubmit=JavaScript: return validate(); where validate() has to return true or false. Regards -- Lukasz http://www.linkedin.com/in/lukaszlenart

Re: Client Side Validation with Struts

2008-03-31 Thread Lukasz Lenart
Hello. I am using Struts 1.3.8. The issue is not one of making the Javascript work (it is working correctly), but rather preventing a Struts action from being called. Is this possible given that the action of a form is a Struts action? I'm not sure if I understand you, but all you have to

Re: Help with tutorial

2008-04-02 Thread Lukasz Lenart
Hi, org.hibernate.AnnotationException: java.lang.NoSuchMethodException: As for me, such fragment says that you maybe made some miss typo with method name, in class or in Spring xml file Regards -- Lukasz http://www.linkedin.com/in/lukaszlenart

Re: Actionerrors the Store Interceptor

2008-04-02 Thread Lukasz Lenart
Hi, I think the best solution is to develop two Interceptors, one will run after action invocation and will store messages in session or some other objects from given request key. And second one, which will be run before action invocation, that will retrieve such stored messages from session and

Re: Actionerrors the Store Interceptor

2008-04-02 Thread Lukasz Lenart
Umm, that's what the Store Interceptor is. Not exactly, you have to specify for which action store the messages, and for which retrieve them back. There is no magic, everything hand coded ;-) Regards -- Lukasz http://www.linkedin.com/in/lukaszlenart

Re: xml based validation vs Annotations based validation

2008-04-03 Thread Lukasz Lenart
Hi, Wanted to get opinion from the struts2 user community if there are any advantages/disadvantages of using one approach over another (Xml vs Annotation based validation). Nope ;-) There is no one good answer for your question, because it depends ;-) For me, the best thing is, you can

Re: Security @ Struts2, using Acegy or Inspector

2008-04-03 Thread Lukasz Lenart
Hi, so, if I extend this action, the action will query and get security permission from database.. because i prefer database driven .. You can do this with Acegi and even combine database with LDAP or with something else. I have used such solution in my projects. but i thinking a

Re: [S2] Struts with Web Services

2008-04-03 Thread Lukasz Lenart
Hi, 1. Is this login web service something that is actually commonly used? Yes and no, mainly because WS is session-less and you have to manage the session token by your self. We use such approach internally, through ssl and we manage session expirations by hand. 2. Is this what a web

Re: [S2] Struts with Web Services

2008-04-04 Thread Lukasz Lenart
http://www.ja-sig.org/products/cas/ -Wes Do you have some experience with that? It looks quite interesting ;-) Regards -- Lukasz http://www.linkedin.com/in/lukaszlenart - To unsubscribe, e-mail: [EMAIL PROTECTED] For

Re: Tiles in 1.3.9

2008-04-04 Thread Lukasz Lenart
Hi, struts-config action-mappings action path=/baselayout forward=.tiles-defs/ /action-mappings tiles-defs.xml definition name=.tiles-defs path=/jsp/baseLayout.jsp There is good practice to start Tiles definitions with dot - .tiles-defs I don't see ant

Re: struts.xml

2008-04-09 Thread Lukasz Lenart
Well this give me some info, but for example it does not explain what all the valid values of the type attribute are and what each value means. Is this documented anywhere ? Look into the struts2-core.jar and find struts-default.xml, that will give more information, then you can look

Re: Local Host Error

2008-04-10 Thread Lukasz Lenart
Hello. To preface I am very new to using Apache. I am attempting to experiment locally, however I cannot connect to local host nor the 127.0.0.1 directly. I am looking to try and get the IT works! Apache Are you using Skype? By default, Skype block port 80 and 443, disable such port in Skype

Re: Most popular classes to be used in Struts

2008-04-10 Thread Lukasz Lenart
Hi, Some home work? ;-) What are the most popular classes to be used in Struts? ActionSupport? Regards -- Lukasz http://www.linkedin.com/in/lukaszlenart - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

Re: Most popular classes to be used in Struts

2008-04-10 Thread Lukasz Lenart
ActionSupport? Ugh... sorry this came from xwork ;-) Regards -- Lukasz http://www.linkedin.com/in/lukaszlenart - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: how to handle an action with parameter?

2008-04-10 Thread Lukasz Lenart
Hi, Define setter setCategory(String value) for NewsAction Regards -- Lukasz http://www.linkedin.com/in/lukaszlenart - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: POJO Action Class

2008-04-12 Thread Lukasz Lenart
Error says : Action class not found Could you show your struts.xml? Regards -- Lukasz http://www.linkedin.com/in/lukaszlenart - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: POJO Action Class

2008-04-12 Thread Lukasz Lenart
Class and config looks ok, could paste the whole stack trace? When you get such error, when starting conatiner or when requesting the action? Could you also show how you call the action in web browser? Regards -- Lukasz http://www.linkedin.com/in/lukaszlenart

Re: POJO Action Class

2008-04-12 Thread Lukasz Lenart
Look carefully at the first line of the output. You have misspelled User. (*Chris*) Exactly, action name=LoginUser class=com.prayog.apps.LoginUesr You have better eye then my :D Regards -- Lukasz http://www.linkedin.com/in/lukaszlenart

Re: POJO Action Class

2008-04-12 Thread Lukasz Lenart
Hi, Try to look into C:/ide/eclipse/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/HelloWorld/WEB-INF/classes/ and see if you have there compiled class in package com.prayog.apps.LoginUser Regards -- Lukasz http://www.linkedin.com/in/lukaszlenart

Re: POJO Action Class

2008-04-12 Thread Lukasz Lenart
no only java file is there!! Source file shouldn't be there, but in src folder. I don't know how WTP works, but it looks it's a configuration problem. Sorry I can't help you. Regards -- Lukasz http://www.linkedin.com/in/lukaszlenart

Re: Problems with default-action-ref (I was sent this message before with wrong subject...)

2008-04-13 Thread Lukasz Lenart
This ocurred with someone too? No, for me works like charm, maybe because I'm using 2.1.1-SNAPSHOT ;-) default-action-ref name=index/ !-- base action, which will redirect to user defined default page -- action name=index

Re: Problems with default-action-ref (I was sent this message before with wrong subject...)

2008-04-13 Thread Lukasz Lenart
Hi once again and to clarify default-class-ref is used when you did not specified the class for you action like below: action name=index result type=index/index.jsp/result /action and default-action-ref is used when Struts could not find the action name for given http request, e.g

Re: Problems with default-action-ref (I was sent this message before with wrong subject...)

2008-04-13 Thread Lukasz Lenart
That's why I re-opened the bug for S2.0. As I understood, only for S2.0, because for 2.1 the tag default-action-ref is working fine (I already test it)? Regards -- Lukasz http://www.linkedin.com/in/lukaszlenart - To

Re: Problems with default-action-ref (I was sent this message before with wrong subject...)

2008-04-14 Thread Lukasz Lenart
the s2.1 version is only avaiable from subversion? If you using Maven, you can Apache Snapshot repo http://people.apache.org/repo/m2-snapshot-repository/ or download struts2-blank.war from here

Re: action not getting called from struts-config

2008-04-14 Thread Lukasz Lenart
When i invoke /sendmail action, nothing is shown..I mean it displays only Maybe /sendmail.do will better? How did you map struts servlet in web.xml? Regards -- Lukasz http://www.linkedin.com/in/lukaszlenart - To

Re: [S2] Selecting value in radio elements

2008-04-16 Thread Lukasz Lenart
Hi, After some experiments, I found the solution: s:radio list=#{'Y':'Yes','N':'No'} name=r2 s:param name=valueN/s:param /s:radio Just look into riadiomap.ftl template and everything will be clear (especially for Freemarker developers ;-) Regards -- Lukasz

Re: Problem with Validation framework

2008-04-24 Thread Lukasz Lenart
action name=LookupUser class=com.intuit.sbfw.action.mc.UserLookupAction UserLookupAction-validation.xml is in the same path as class above? 2) I see this message when I invoke my very first action: INFO [ActionValidatorManagerFactory] Detected AnnotationActionValidatorManager,

Exclude interceptor

2008-04-29 Thread Lukasz Lenart
Hi, Today I've been presenting Struts2 to member of Warsaw JUG and I got such question: it is possible to exclude interceptor for given action? As I know no, but maybe I'm wrong. The only way is to define interceptor for each action and omit for given one. Regards -- Lukasz

Re: How to build Struts 2.0.11.1?

2008-05-08 Thread Lukasz Lenart
Hi, I'm unsatisfied that not all tests are ok but I'll look for that separately. Probably you have problem with DataTimePickerTagTest, if yes, don't borrow, there is some problem with Locale settings to parse data. I've tried to figure what it is, but till now I don't know how to solve the

Re: Dojo taglib?

2008-05-13 Thread Lukasz Lenart
Hi, To use the AJAX tags from 2.1 on you must: Reading http://struts.apache.org/2.x/docs/ajax-tags.html, this claims You should read much more careful Regards -- Lukasz http://www.linkedin.com/in/lukaszlenart http://jdn.pl/blog/416 http://www.lenart.org.pl/

Missing @Result in 2.1.x

2008-05-14 Thread Lukasz Lenart
Hi, I'm trying to use annotation to configure my action, but as I noticed, is only available in Struts 2.0.x. What about 2.1.x? The only option is to use Codebehind plugin? Thanks in advance -- Lukasz http://www.linkedin.com/in/lukaszlenart http://jdn.pl/blog/416 http://www.lenart.org.pl/

Re: Missing @Result in 2.1.x

2008-05-14 Thread Lukasz Lenart
Yes ;-) So, than, how can I use different methods from my Action class? Is it possible? Thanks in advance -- Lukasz http://www.linkedin.com/in/lukaszlenart http://jdn.pl/blog/416 http://www.lenart.org.pl/

Re: How to skip validation for a particular button

2008-05-19 Thread Lukasz Lenart
I have 4 buttons in one page and I have written one validaton xml file like this :- action_class - validation.xml But for one specific button I want to skip validation process. Is there anybody know how to do that. Do you have different methods for each button? If so prepare separated

Re: struts 2 radio tag selected default

2008-06-04 Thread Lukasz Lenart
Hi, s:radio list=#{'true':'Yes', 'false':'No'} name=employee.active value=%{employee.active}/ or s:radio list=#{'true':'Yes', 'false':'No'} name=employee.active value=true/ Regards -- Lukasz http://www.lenart.org.pl/

Re: After Visiting URL with Query String, Query String Appears on Every Link

2008-06-07 Thread Lukasz Lenart
Hi 2008/6/7 Pandolf [EMAIL PROTECTED]: @s.url id=todayDashboardUrl action=encounters Add includeParams=none to this tag or globally set struts.url.includeParams=none in struts.xml or struts.properties Regards -- Lukasz http://www.lenart.org.pl/

Re: [Struts2] Convention Plugin

2008-06-07 Thread Lukasz Lenart
Hi, You have to configure struts to tell where your actions are: filter filter-nameaction2/filter-name filter-classorg.apache.struts2.dispatcher.FilterDispatcher/filter-class init-param param-nameactionPackages/param-name

Re: Reading Application Resource saved as UTF8 file and showing polish characters in browser

2008-06-09 Thread Lukasz Lenart
Hi, 2008/6/9 Raghuveer [EMAIL PROTECTED]: Is it possible in struts to configure the controller to read the application resource file which is saved as UTF8 format? You can use filter from Spring filter filter-nameencodingFilter/filter-name

Re: Parameter question

2008-06-09 Thread Lukasz Lenart
Hi, 2008/6/9 Stanley, Eric [EMAIL PROTECTED]: Dave, Thanks. So if I understand you, I can set all my url's that don't use params to excludeParams, but leave the ones that use params alone? Also, where do I set the constant? Im sure its just me, but this doesn't seem like a wise usage

Re: How to force a default locale in Struts2?

2008-06-09 Thread Lukasz Lenart
Hi You can set constant struts.locale=en_US in struts.properties or struts.xml or web.xml http://struts.apache.org/2.x/docs/strutsproperties.html Regards -- Lukasz http://www.lenart.org.pl/

Re: Modifying session attributes in Struts 2

2008-06-10 Thread Lukasz Lenart
Hi, I think the best solution is to implement SessionAware interface and setSession() method, then you will either add or remove values from map. Like below: public class IndexAction implements Action, SessionAware { private MapString,Object session; public void

Re: Custom interceptor not firing

2008-06-10 Thread Lukasz Lenart
Hi, 2008/6/10 Gamble, Wesley (WG10) [EMAIL PROTECTED]: As far as I can tell from looking at _Struts 2 in Action_, I constructed my class correctly. It is named CompanyIdentificationInterceptor. The name is not important, did you implement com.opensymphony.xwork2.interceptor.Interceptor

Re: How to set session data based on request parameters and how to retrieve session values correctly via OGNL

2008-06-10 Thread Lukasz Lenart
Hello! 2008/6/10 Gamble, Wesley (WG10) [EMAIL PROTECTED]: 1) I would like to set some session key-value pairs in response to a request parameter so that I can count on these session variables throughtout my application. Should I use an interceptor for this? How does the interceptor get

Re: How to set session data based on request parameters and how to retrieve session values correctly via OGNL

2008-06-10 Thread Lukasz Lenart
2008/6/10 Gamble, Wesley (WG10) [EMAIL PROTECTED]: But I want this to happen for every action - and it is dependent on the request data that comes in. Then you should implement Interceptor and investigate ActionInvocation.getInvocationContext() .getParameters() Regards -- Lukasz

Re: struts editor

2008-06-10 Thread Lukasz Lenart
2008/6/11 Lalchandra Rampersaud [EMAIL PROTECTED]: it's not for configuring struts, i just need something visual to design my pages. As I know, you have to only configure MyEclipse to use Struts2 Tag Library and then it will be available on component palette, but I don't remmeber how to do

Re: How to set session data based on request parameters and how to retrieve session values correctly via OGNL

2008-06-10 Thread Lukasz Lenart
2008/6/10 Gamble, Wesley (WG10) [EMAIL PROTECTED]: Should ActionInvocation.getInvocationContext().getParameters() give me a Map of request parameters or do I need to pull the HttpServletRequest object in another way? No, just use getParameters() to get raw parameters access Regards --

Re: ApplicationAware not triggering setApplication? Or, how best to reference a Connection pool?

2008-06-11 Thread Lukasz Lenart
My understanding is that the webwork API for ApplicationAware means that the interceptor will have it's setApplication(Map applicationData); triggered when the interceptor is run, thereby giving me access to the applicationcontext. ApplicationAware should be used with Actions not with

Re: expressions in s:a tag attributes

2008-06-18 Thread Lukasz Lenart
Hi, Try s:iterator value=codes s:a href=# onmouseover=ddrivetip('%{codeDescription}', 300) onmouseout=hideddrivetip() s:property value=code/ /s:a /s:iterator Regards -- Lukasz http://www.lenart.org.pl/ - To

Re: retriving polish characters from URL Query string

2008-06-18 Thread Lukasz Lenart
Hi, First of all, isn't possible to encode Polish characters with ISO-8859-1, you have to use ISO-8859-2 or UTF-8. It's mean, that the parent web application has to send user_id, name parameters encoded with ISO-8859-2 or UTF-8. Without that it will be not possible to decode such strings.

Re: default result name other than SUCCESS?

2008-06-18 Thread Lukasz Lenart
Hi, 2008/6/18 Chris Pratt [EMAIL PROTECTED]: I'm not sure if the work-around will work. Looking at the code, it doesn't appear that changing the result type after the action has executed has any effect. Did you already implement it? Could you show the code? It should be the last interceptor

Re: default result name other than SUCCESS?

2008-06-18 Thread Lukasz Lenart
The result has already been rendered after invoke() has been called. Are you sure? I think it wasn't. Regards -- Lukasz http://www.lenart.org.pl/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail:

Re: Wildcard mappings with subdirectories / folders?

2008-06-18 Thread Lukasz Lenart
Hi, Here's my configs - however, the rules are not matching at all - I have my JSP's in WEB-INF/jsp/coconut/(blah.jsp) and WEB-INF/jsp/public/(blah.jsp). action name=coconut/* interceptor-ref name=mystack / result

Re: default result name other than SUCCESS?

2008-06-18 Thread Lukasz Lenart
Yes. This is pretty fundamental for interceptors, AFAIK. http://struts.apache.org/2.x/docs/writing-interceptors.html Wow! I've been reading such page many times, but I see such note first time ;-) Thanks to open my eyes! Regards -- Lukasz http://www.lenart.org.pl/

Re: simple struts tag to eval OGNL

2008-06-18 Thread Lukasz Lenart
I didn't know that. but actually, I was kind of looking for something that would stay in the page. It wouldn't be for debugging, but some simple logic in the page for creating the html. s:debug/ ? Regards -- Lukasz http://www.lenart.org.pl/

Re: simple struts tag to eval OGNL

2008-06-18 Thread Lukasz Lenart
Hi, I'm using something like this: s:radio name=employee.employeeType key=label.employee.type list=employeeTypes listKey=shortcut listValue=name() required=true/ in action I have public EmployeeType[] getEmployeeTypes() { return EmployeeType.values(); }

Re: simple struts tag to eval OGNL

2008-06-18 Thread Lukasz Lenart
p.s. to call the static values() method of the enum, struts.ognl.allowStaticMethodAccess must be set to true in struts.properties or struts.xml Thanks, I've also learned something new ;-) Regards -- Lukasz http://www.lenart.org.pl/

Re: S2: validation notation on DATE (object that has a Date field)

2008-06-19 Thread Lukasz Lenart
Hi, Did you try @RequiredFieldValidator(type = ValidatorType.SIMPLE, fieldName = customfield, message = You must enter a value for field.) ? Regards -- Lukasz http://www.lenart.org.pl/ - To unsubscribe, e-mail: [EMAIL

Re: Struts 2 Page Ctrl+R

2008-06-21 Thread Lukasz Lenart
This worked fine before using Struts 1 and my guess is that it was because the form was present in session. Is there any way to make this work in Struts 2 ? You can check Scope Plugin http://cwiki.apache.org/S2PLUGINS/scope-plugin.html maybe it will be helpful Regards -- Lukasz

Re: [S2] Validator Framework

2008-06-23 Thread Lukasz Lenart
Hi, Struts2 use XWork Validation Framework, so you can use it http://www.opensymphony.com/xwork/wikidocs/Validation%20Framework.html Regards -- Lukasz http://www.lenart.org.pl/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For

Re: s:submit name attribute problem

2008-06-23 Thread Lukasz Lenart
Hi, s:submit name=action action=Submit method=getReport value=Submit/ Just look for source of your page and you will see why. If you want to use either method or action (not both), maybe it will be better to add hidden field? Regards -- Lukasz http://www.lenart.org.pl/

Re: S2: validation notation on DATE (object that has a Date field)

2008-06-23 Thread Lukasz Lenart
I did, and it doesn't work, when I click submit, I immediately get a red message next to the required fields...but not next to the date. That strange, I made a test and it works, I've annotated at setter level @RequiredFieldValidator(message = Date is required) public Date getToday() {

  1   2   3   4   5   6   7   8   9   10   >