[S2] Change struts-default.xml content

2007-10-24 Thread Igor Vlasov
Hello. I want to change some information in struts-default.xml. I can move it to classes directoty and do any change:-) Is there any more sofisticated method to do the same from struts.xml? For example i want to change TextProvider: From bean type=com.opensymphony.xwork2.TextProvider

Re: [S2] Change struts-default.xml content

2007-10-25 Thread Igor Vlasov
/classes/struts.xml:10:109 cilquirm wrote: you can redefine it in your struts.xml, much like how you would specify the object factory to override the default object factory . -a Igor Vlasov wrote: Hello. I want to change some information in struts-default.xml. I can move

Re: [S2] Change struts-default.xml content

2007-10-25 Thread Igor Vlasov
. I tried looking in the source, but I couldn't find how to configure the textProvider. The two pre-configured ones both use the same class so one wouldn't note any difference. Maybe someone on the list can help you out more. Apologies, -a Igor Vlasov wrote: This action cause

Re: [S2] Change struts-default.xml content

2007-10-26 Thread Igor Vlasov
it all they need. What is your usecase for having your own TextProvider? That class is only used in a few places, so perhaps what you really need is just to override the appropriate methods on your Action. Don On 10/26/07, Igor Vlasov [EMAIL PROTECTED] wrote: The class

Re: [S2] Problem while retrieving data from JSP

2007-10-26 Thread Igor Vlasov
I think you must put the ID's in hidden fields and then they will fill up with id's from your collection on jsp page In save method wou will analyse the recieved data. kaouki wrote: Hi, I get this bean in my action in order to modify it in my jsp: Catalogue { Long id; String title;

Re: struts2 actionerror actionmessage

2007-10-26 Thread Igor Vlasov
Try to use lt;result name=success type=chain doThing/result This will invoke ChainInterceptor that wiil copy SIMILAR(by name and type) objects in both actions. And error mesages also. Please, look at ChainInterceptor source. cuong.van.truong wrote: I have this actions in the same

Re: Why does update action fire on load

2007-10-26 Thread Igor Vlasov
I use action name=login_* class=login method={1} result name=inputlogin.jsp/result result name=errorlogin.jsp/result result name=success/pages/main.jsp/result result name=success2/pages/dashboard.jsp/result /action zul;jami wrote: I have two methods in action

Re: Struts 2 - compatibility between JSTL xml tags and Struts 2

2007-10-26 Thread Igor Vlasov
This action occures when call jsp directly and use lt;s:... / tags on it. You must call to Action class before and forward to jsp view page with lt;s:... / tags Riccardo Mollame wrote: Here's it to you: java.lang.NullPointerException at

Re: Problem while setting object directly from s:select tag

2007-10-26 Thread Igor Vlasov
The list property targets to model with data for rendering lt;select tag. In lt;option tag you recieve Item.toString as value attribute. After post Struts cannot set this value to user.item property. I think you must use in itemId as value for lt;option value attibute and use s:select

Re: Why does update action fire on load

2007-10-26 Thread Igor Vlasov
struts.xml as you said also my action fires execute and also update. I do not want to fire update.Pls help Igor Vlasov wrote: I use action name=login_* class=login method={1} result name=inputlogin.jsp/result result name=errorlogin.jsp/result result name

Re: struts2 validation - wildcard mappings and the submit tag method parameter

2007-10-26 Thread Igor Vlasov
use @SkipValidation annotation for methods, which you do not need to validate. This affects on StrutsValidationFramework For validate() method you must manually analyse the situation and skip its executing. Lindell, Andrew wrote: The problem I'm having is getting validation to run when

Re: Validation Best Practices?

2007-10-26 Thread Igor Vlasov
I use validate() method from ActionSupport for complex bussines validation.(it works in WorkFlowInterceptor). Sometime, for trivial fields, i can use Struts ValidationFramework.(it works after ParameterInterceptor) Sean Kleinjung-2 wrote: Hey, I have a question concerning where

Re: [S 1.3]IncludeAction or any other Alternative?

2007-10-26 Thread Igor Vlasov
Try to use servletFilter from servlet specification with apropriate mapping enthucoder wrote: I have a requirement, where on each page load, I hit some Servlet or Action (Can be modified accordingly). Should i use a IncludeAction here or there is a better or elegant way to achieve this?

Re: Why does update action fire on load

2007-10-26 Thread Igor Vlasov
login_update.jspa is called or press on input type=submit name=method:update / zul;jami wrote: After deleting the second binding also I got the same error. Igor Vlasov wrote: You have to delete second binding... zul;jami wrote: I have not deleted.instead I gave action name=login_

Re: Why does update action fire on load

2007-10-26 Thread Igor Vlasov
=login method=update result name=success/pages/dashboard.jsp/result /action But still update is fired when logging in. What do you mean by result name=success2. Both methods return SUCCESS only. Igor Vlasov wrote: Are you sure that you delete: action name

Re: Why does update action fire on load

2007-10-26 Thread Igor Vlasov
* class=login method={1} result name=inputlogin.jsp/result result name=errorlogin.jsp/result result name=success/pages/main.jsp/result result name=success2/pages/dashboard.jsp/result /action BUt still update is fired on login. Igor Vlasov wrote: If you use only

Re: Manual definet attribute in lt;s:textfield?

2007-10-29 Thread Igor Vlasov
May be it would be useful to make struts tags implements javax.servlet.jsp.tagext.DynamicAttributes interface. Then we can declare a tag handler accepts additional attributes with dynamic names. Laurie Harper wrote: Igor Vlasov wrote: Hello I want to add a user defined HTML attribute

Netbeans 6.0 Editor Error with struts2 library

2008-01-16 Thread Igor Vlasov
Hello. I have installed a netbeans 6 on jdk6u4 and all recent updates for it. Then i Try to implement an interface in my custom class. public class Site1AuthAction implements ServletRequestAware{ public void setServletRequest(HttpServletRequest request) { } } I get strarge editor

Re: [OT] Re: Netbeans 6.0 Editor Error with struts2 library

2008-01-16 Thread Igor Vlasov
If I write: @Override public void setServletRequest(HttpServletRequest request) { this.req = request; } then I got method does not override or implement a method from a supertype newton.dave wrote: What happens if you annotate it with @Override? d. --- Igor Vlasov [EMAIL

Re: Netbeans 6.0 Editor Error with struts2 library

2008-01-16 Thread Igor Vlasov
: Igor Vlasov [EMAIL PROTECTED] To: user@struts.apache.org Sent: Wednesday, January 16, 2008 11:00 AM Subject: Netbeans 6.0 Editor Error with struts2 library Hello. I have installed a netbeans 6 on jdk6u4 and all recent updates for it. Then i Try to implement an interface in my custom

Re: Netbeans 6.0 Editor Error with struts2 library

2008-01-17 Thread Igor Vlasov
It works Thanks a lot:jumping::clap::handshake: Tan Mook Kuen wrote: Have you try 1) close netbeans 2) delete the cache folder under user home/.netbeans/6.0/var/ ? 3) open netbeans again. HTH On Jan 17, 2008 3:26 PM, Igor Vlasov [EMAIL PROTECTED] wrote

NULL Session object after execAndWait interceptor

2007-10-10 Thread Igor Vlasov
I found a strange behaviour in action after execAndWait interceptor. I have 1. lt;action name=doSearch class=s2.action.SearchAction lt;interceptor-ref name=basicStack/ lt;interceptor-ref name=execAndWait lt;param name=delay2000lt;/param lt;param

Re: [S2] ExecAndWait interceptor : request.getSession() null

2007-10-10 Thread Igor Vlasov
public class SearchAction extends ActionSupport implements ServletRequestAware { protected HttpServletRequest request; private HttpSession sess; public String execute() throws Exception{ /*I*/ sess = request.getSession();// not NULL ! try { // выполняется поиск и опрос

[S2] Manually obtain previous action parameters after action chaining?

2007-10-10 Thread Igor Vlasov
I have action one and it calls action two throw: result name=success type=chain two/result I can use ChainingInterceptor to copy properties of one action to two action. I get behaviour : one.param-two.param. But the property param must be in javaBeans specification(have setter and getter

Re: [S2] Manually obtain previous action parameters after action chaining?

2007-10-10 Thread Igor Vlasov
I try this in action two.execute(): ValueStack stack=ActionContext.getContext().getValueStack(); CompoundRoot root = stack.getRoot(); List list = new ArrayList(root); This list does not contain my previous action one. It contains only TextProviderObject. Can you write how to grab

Re: Manually obtain previous action parameters after action chaining?

2007-10-10 Thread Igor Vlasov
-questions.html On 10/10/07, Igor Vlasov [EMAIL PROTECTED] wrote: I have action one and it calls action two throw: result name=success type=chain two/result I can use ChainingInterceptor to copy properties of one action to two action. I get behaviour : one.param-two.param

Re: Manually obtain previous action parameters after action chaining?

2007-10-11 Thread Igor Vlasov
be a simple Object(). I need an ability to make : prev=(ActionOne)getPreviousAction(); Laurie Harper wrote: Igor Vlasov wrote: Copying of properties with ChainingInterceptor working GOOD. OK, good that something is working well. What's not clear is what *isn't* working... Can you post code

[S2] Simple loop 1..20 with with iterator tag?

2007-10-11 Thread Igor Vlasov
In documentation thre is an example: lt;s:iterator status=stat value={1,2,3,4,5} lt;!-- grab the index (start with 0 ... ) -- lt;s:property value=#stat.index / lt;!-- grab the top of the stack which should be the -- lt;!-- current iteration value (0, 1, ... 5) -- lt;s:property

Re: [S2] Simple loop 1..20 with with iterator tag?

2007-10-11 Thread Igor Vlasov
I must use struts iterator and use struts variables with iterator index variables. Like this from 1 to 20 selected=SELECTED nuwan chandrasoma-2 wrote: Hi, why dont you use JSTL Thanks, Nuwan Igor Vlasov wrote: In documentation thre is an example: lt

Re: Manually obtain previous action parameters after action chaining?

2007-10-11 Thread Igor Vlasov
work, because the interceptor doesn't pass the HttpRequest object but a map the proxies the attributes in request scope. If the Action needs access to the session attributes, then implement setSession(Map). -Ted. On 10/11/07, Igor Vlasov [EMAIL PROTECTED] wrote: 1. I have actionOne

How to set object to value stack from jsp?

2007-10-11 Thread Igor Vlasov
I have an object in session nad want to use it in jsp struts tag as a top object. I do not want to create action for geting it from session and putting it to action property. How can i put a value from session to the top of value stack ? -- View this message in context:

ExecuteAndWait interceptor position?

2007-10-14 Thread Igor Vlasov
Hello. In Struts Documentation i found that Because of the nature of this interceptor, it must be the last interceptor in the stack. and in struts-default.xml i found lt;interceptor-stack name=executeAndWaitStack lt;interceptor-ref name=execAndWait lt;param

Dynamic form parameters and validation/workflow interceptor?

2007-10-15 Thread Igor Vlasov
Hello In my form i have common parameters like s:textfield name=searchData.nights maxlength=2 size=2 / and some dynamic parameters - inputs added throw Javascript Code. For common parameters i have ParametersInterceptor. It puts values in searchData object properties. Then i want to add array

Re: Dynamic form parameters and validation/workflow interceptor?

2007-10-16 Thread Igor Vlasov
I put it in validate method because this parameters must be readed when the form is submited. And when the form is submited the validate method is called. Igor Vlasov wrote: Hello In my form i have common parameters like s:textfield name=searchData.nights maxlength=2 size=2

Manual definet attribute in lt;s:textfield?

2007-10-17 Thread Igor Vlasov
Hello I want to add a user defined HTML attribute to lt;s:textfield. Example of rendered HTML control: lt;input type=text userDefinedAttribute=true/. How can I do this? if i write lt;s:textfield name=customer.cus_surname size=20 userDefinedAttribute=true / I recieve an error. -- View

Add additional button near s:textfield in xhtml theme ?

2007-10-17 Thread Igor Vlasov
Hello. I have lt;s:form action=customer method='post' theme=xhtml lt;s:textfield name=customer.cus_name size=20 label=Surname / lt;s:submit value=OK name=apply /s:submit lt;/s:form and i want to show additional button near lt;s:textfield/. For example :lt;input type=button

Re: Add additional button near s:textfield in xhtml theme ?

2007-10-17 Thread Igor Vlasov
=${parameters.name?default()?html}_find value=Correct onclick=doCorrection() #include /${parameters.templateDir}/xhtml/controlfooter.ftl / /pre Igor Vlasov wrote: Hello. I have lt;s:form action=customer method='post' theme=xhtml lt;s:textfield name=customer.cus_name size=20 label=Surname

Re: struts2 validation for only one method in action

2007-10-17 Thread Igor Vlasov
And how to disable the SERVER side validation when delete button clicked ? ros wrote: Java Script validation fro button disabled by s:submit cssClass=button method=delete key=button.delete onclick=document.getElementById('ticketForm').onsubmit = null; /

Disable validation when delete button is pressed

2007-10-17 Thread Igor Vlasov
Hello. I have s:form action=customer method='post' theme=xhtml s:textfield name=customer.cus_email size=20 label=E-mail / s:submit value=OK. name=VIEWtheme=simple /s:submit s:submit value=Delete name=DEL theme=simple/s:submit /s:form and CustomerCRUD-validation: validators

Re: struts2 validation for only one method in action

2007-10-17 Thread Igor Vlasov
button is pressed and NOT validate when DEL button is pressed. ros wrote: For struts it's interceptor-ref name=validation cancel,execute,delete,edit,list,print /interceptor-ref Hope this helps. ros Igor Vlasov wrote: And how to disable the SERVER side

Re: Disable validation when delete button is pressed

2007-10-18 Thread Igor Vlasov
an Roughley wrote: you can always use s:submit name=method:delete value=Delete / and s:submit value=Execute / - then you don't need the logic to determine which button was clicked in the execute() method, and you can use the validation config below. Original Post Igor Vlasov wrote

Re: struts2 validation for only one method in action

2007-10-18 Thread Igor Vlasov
config below. /ian Igor Vlasov wrote: This is not a solution. I have 2 submit button in one form: one for save and another for delete. All of them submit the form data to execute() method. There I can determine which button was pressed and do an appropriate bussines action

How to change excludeMethods parameter for validationInterceptor ?

2007-10-19 Thread Igor Vlasov
Hello. I want to change excludeMethods parameter for validationInterceptor in defaultStack. For one action I can use lt;interceptor-ref name=defaultStack lt;param name=validation.excludeMethodsinput,delete,browselt;/param lt;param

S2 i18n wrong locale selection!

2008-07-02 Thread Igor Vlasov
Hello, I did a sample s2 page with multilanguage. I did sample.properties for action for [default,en,ru,es,de] I have default language=ru for server. Then I change accept-language to [az|en] in FF browser. When i enter the page with s:text

Do we have such alternative?

2008-07-14 Thread Igor Vlasov
Hello. Some days ago I looked in source code of project in ASP.net 2. Here I saw a good architectural alternative to: lt;%@ include file=/include/header.jsp % body lt;%@ include file=/include/footer.jsp % It looks like this: Page 1: lt;%@ CodeFile=EditUsers.aspx.cs

Re: Do we have such alternative?

2008-07-14 Thread Igor Vlasov
Piero Sartini-3 wrote: Hello, Do we have some similar mechanism is JSP 2 + struts2? Or Do i must use struts2++ library? JSP can not do that out of the box. But there are very good solutions available. Have a look at Sitemesh or Tiles2: -

Why we need struts.action.extension property

2008-07-18 Thread Igor Vlasov
Hello. I wrote a simple s2 application. I described a filter in web.xml filter filter-namestruts2/filter-name filter-classorg.apache.struts2.dispatcher.FilterDispatcher/filter-class /filter filter-mapping filter-namestruts2/filter-name url-pattern*.jspa/url-pattern