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
/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
.
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
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
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;
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
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
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
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
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
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
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
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?
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_
=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
* 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
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
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
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
: 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
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
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
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 {
// выполняется поиск и опрос
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
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
-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
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
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
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
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
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:
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
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
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
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
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
=${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
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; /
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
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
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
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
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
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
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
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:
-
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
47 matches
Mail list logo