I put some @Conversion(), @Element(value = java.lang.Long.class) and
@TypeConversion(rule = ConversionRule.COLLECTION, converter =
java.lang.Long) in my Action and it's not working better.
So I set the convertion in a properties file with :
Element_idsCommerciaux=java.lang.Long
and it is
Hi all,
I have a very strange thing. I have a multiple select in my JSP, and a
ListLong of ids in my Action. When I submit the form, I iterate on that
List of Long, and I have this error :
java.lang.ClassCastException: java.lang.String
Struts has String in the List instead of Long. The strange
Hi,
Thanks for your reply.
What I can't understand is why it works in some environments, and no others.
The war is the same.
And why do you say that the generic type of the idsCommerciaux list
is not available at runtime ? I defined it as a ListLong in the Action.
So Struts should know that it
Hi all,
I'm getting erros with my Struts 2 web application using Firefox 3.
Everything is ok with others navigators.
With FF3, it shows randomly javascript errors saying my JS var is undefined.
here is a sample of code :
s:url id=ajaxCtiUrl namespace=/ action=ctiAjaxAction /
s:url
Sometimes I got this errors to :
symbol 'dojo.rpc' is not defined after loading '__package__.js'
Fichier Source : http://localhost:8080/crm/struts/dojo/dojo.js
Ligne : 1
--
View this message in context:
http://www.nabble.com/Firefox-3-and-JSON-random-errors-tp20249211p20249553.html
Sent from
Or you can use Decorators :
display:table name=list
decorator=mypackage.decorator.MyDecorator
display:column titleKey=colName
property=attrNameNotInBean/
/display:table
public class MyDecorator extends TableDecorator {
public
In the lasts versions (since 2.0.9 I guess), all AJAX are in dojo plugin.
So you need to include %@ taglib uri=/struts-dojo-tags prefix=sx%
and sx:head/
and call :sx:datetimepicker .../
Michaël
dipti RealSoftInc [EMAIL PROTECTED]
16/10/2007 08:09
Veuillez répondre à
Struts Users Mailing
Hi all,
I just give up the datetimepicker component, due to a 2s more page load
time. I put anoter JS calendar (YUI calendar), but the problem is that in my
Actions I have java.util.Date attributes. So I need to format my Date into a
String that the calendar will understand (dd/MM/ in my
Thanks for your answer.
The s:date tag is fine, but how to pass it to a s:textfield tag ?
s:textfield id=date name=date
size=10 maxlength = 10
value=s:date name=myDate format=%{getText('date.format')}//
maxmil wrote:
You can call a static method using the OGNL syntax.
Ok sorry for stupid question, I have found :)
s:date name=myDate format=%{getText('date.format')} var
=myDateFormatted/
s:textfield id=date name=date
size=10 maxlength = 10
value=${myDateFormatted}/
mleneveut wrote:
Thanks for your answer.
The s:date tag is fine, but how
Hi all,
We have an Action redirecting to several JSP, depending on the customer.
But the forms of these JSP are different : some fields are added/removed
in some JSP.
So the automatic validation fails for those fields not existing in some
JSP.
We bypass the problem by copying the Action
an expression like you normally
would )
mleneveut wrote:
Hi all,
We have an Action redirecting to several JSP, depending on the customer.
But the forms of these JSP are different : some fields are added/removed
in some JSP.
So the automatic validation fails for those fields not existing
Je serai absent(e) du 24/08/2007 au 12/09/2007.
Google ? Search in nabble's forum ?
http://www.nabble.com/how-to-use-confirmdialog-box-tf4303548.html#a12249806
kushi [EMAIL PROTECTED]
22/08/2007 08:56
Veuillez répondre à
Struts Users Mailing List user@struts.apache.org
A
user@struts.apache.org
cc
Objet
how to use confirm dialog box
1) How can values in the value stack be sent among actions, so that they
are
available in the final web page?
Put your values in HttpSession
wild_oscar [EMAIL PROTECTED]
22/08/2007 16:48
Veuillez répondre à
Struts Users Mailing List user@struts.apache.org
A
user@struts.apache.org
cc
Add the result type :
action name=action1 class=MyCalss
result type=redirectActionaction2/result
/action
action name=action2 class=MyCalss2
...
/action
(redirect-action if you are in version before 2.0.9)
Sawan [EMAIL PROTECTED]
21/08/2007 08:50
Veuillez répondre à
Struts Users
s:hidden name=bucket/
s:a href=javascript:delete('${Bucket}');Delete/a
script
function delete(id) {
if(confirm('sure ?')) {
document.forms[0].bucket.value = id;
document.forms[0].action =
deletebucketaction.action;
/2007 14:23
Veuillez répondre à
Struts Users Mailing List user@struts.apache.org
A
user@struts.apache.org
cc
Objet
Re: RE Action within Action result
Thanks mleneveut,
Its working for simple action calling, But I have a request variable in my
URL and if I simply redirect to the specified
Hi,
I had the same problem, and added in my struts.xml :
interceptor-ref name=validation
param name=excludeMethodsexecute,
input,back,cancel,browse, detail, delete, goAdd, goModif, view/param
/interceptor-ref
interceptor-ref name=workflow
Hi,
Copy the struts.jar templates into your application (at the root,
WebContent/templates for exemple), and modify the
WebContent/template/simple/*.ftl files at your convenience.
Session A Mwamufiya [EMAIL PROTECTED]
13/08/2007 08:57
Veuillez répondre à
Struts Users Mailing List
Did you set this in your struts.xml ?
constant name=struts.objectFactory value=spring /
or
constant name=struts.objectFactory value=
org.myorg.mySpringContextFactory /
For Autowiring, it's enable by default. But you can customise it :
http://struts.apache.org/2.0.9/docs/spring-plugin.html
In your Action, add an String attribute named editingFlag with a getter
and a setter. Set the value (true or false) of editingFlag in the
method forwarding to your JSP.
In the JSP :
s:textfield name=name label=Name readonly=${editingFlag)/
Session A Mwamufiya [EMAIL PROTECTED]
13/08/2007
Hi,
I try to add the execAndWait interceptor in my application. But now the
request.getSession() returns null so my app crash in the first Action.
What did I miss ?
interceptor name=login
class=org.myorg.coordination.interceptor.LoginInterceptor /
interceptor-stack name=crmStack
I use displaytag too. All works fine.
Did you set the requestUri param ?
display:table name=myListInStack decorator=
org.myorg.DecoratorOfMyList requestURI=myAction.action
Regards,
Manuel Correa [EMAIL PROTECTED]
09/08/2007 17:54
Veuillez répondre à
Struts Users Mailing List
By setting the requestURI=myAction.action pointing to your current
action (which you used to come to this page), you will have no problem.
DisplayTag will just add some parameters (page, sort, ...). You just have
to map this action method to this div/tab/... (so one action or method for
each
The Change() method is rather doing nothing, just modifying a flag :
script type=text/javascript
function Change(){
document.forms[0].change.value = '1';
}
/script
My validattion xml is simple, it is just a requiredstring on the select
item :
validators
field
Hi,
When I submit a numeric in a form, the validation accepts only comma
numbers (12,34) (I'm with a French locale). If a set 12.34, the validation
failed and I have the message : Invalid field value for field xx
But when a submit 12,34 and another field has an error, it comes back to my
JSP
Hi,
I try to validate a double, but it generates this in my JSP :
// field name: familleProduit.chargeTravail
// validator name: double
if (form.elements['familleProduit.chargeTravail']) {
field = form.elements['familleProduit.chargeTravail'];
var
You could do redirection after your first action.
myFirstAction.jsp : form + submit buton to MyFirstAction.process()
MyFirstAction {
private String myAttribute;
execute() : initialize myAttribute and redirect to success =
myFirstAction.jsp
process() : do stuff on myAtrribute submitted in
Hi,
When I click the calendar picture of my datetimepicker tag (the input is
empty), the calendar shows up normally. I pick a date, all is ok.
But if I then delete the choosen date in the input, and click again on the
calendar, all the dates are NaN. As if the displayFormat was in trouble.
Is
@struts.apache.org
A
Struts Users Mailing List user@struts.apache.org
cc
Objet
Re: [S2] Error datetimepicker when erase input and click again calendar
When you delete the date in the input, do you delete the whole thing?
or juts a part of it?
musachy
On 8/6/07, mleneveut [EMAIL PROTECTED] wrote
Here is a sample application containing the test pages :
http://oughacom.free.fr/Java/Test.war
mleneveut wrote:
The Change() method is rather doing nothing, just modifying a flag :
script type=text/javascript
function Change(){
document.forms[0].change.value = '1';
}
/script
Here is a sample application containing the test pages :
http://oughacom.free.fr/Java/Test.war
mleneveut wrote:
Hi,
I try to validate a double, but it generates this in my JSP :
// field name: familleProduit.chargeTravail
// validator name: double
Here is a sample application containing the test pages :
http://oughacom.free.fr/Java/Test.war
mleneveut wrote:
The whole string.
If I clicked the date 06/08/2007, I have 06/08/2007 in the input, I
delete all to have an empty string , I click on the calendar, it appears
with all days
Hi,
I have a select list in my form, and when I submit the form, the
javascript client validation passes, but the server validation failed. It
comes back to my JSP with the required field error message.
The weird thing is that in my action the field is well filled (I put a
breakpoint in an
Hi,
When I submit a numeric in a form, the validation accepts only dotted
numbers (12,34) (I'm with a French locale). If a set 12.34, the validation
failed and I have the message : Invalid field value for field xx
But when a submit 12,34 and another field has an error, I come back to my
JSP
Hi,
There is a Tabbedpanel in the UI Tag's doc
(http://struts.apache.org/2.x/docs/tabbedpanel.html) but this seems to
have disappeard in v2.1.0.
Is there a new packaged way of handeling tabs in JSP ?
Thanks.
Hi,
I try to validate a double, but it generates this in my JSP :
// field name: familleProduit.chargeTravail
// validator name: double
if (form.elements['familleProduit.chargeTravail']) {
field = form.elements['familleProduit.chargeTravail'];
var
Same with int validation.
field name=familleProduit.chargeTravail
field-validator type=int
message key=errors.int/
/field-validator
/field
generates :
// field name: familleProduit.chargeTravail
// validator name: int
if
I had the same problem, and I put #146; instead of ' in my .properties.
Ragards,
Michaël
TonyD [EMAIL PROTECTED]
12/07/2007 14:29
Veuillez répondre à
Struts Users Mailing List user@struts.apache.org
A
user@struts.apache.org
cc
Objet
How to display the ' character from a .properties file
I have some kind of errors in the showcase app I just cleaned/recompiled :
in IE 6 :
DEBUG: DEPRECATED: dojo.event replaced by dojo.event.* -- will be removed
in version: 0.5
DEBUG: DEPRECATED: dojo.io replaced by dojo.io.* -- will be removed in
version: 0.5
DEBUG: failed loading
Hi,
I updated the source code, done a mvn clean and recompile
(mvn)/redeploy the jars, and I have the same errors :
XP/IE 6 :
DEBUG: DEPRECATED: dojo.event replaced by dojo.event.* -- will be removed
in version: 0.5
DEBUG: DEPRECATED: dojo.io replaced by dojo.io.* -- will be removed in
Hi all,
I try to insert a datetimepicker tag in my JSP, and I have the following
javascript error :
symbol 'struts.widget' is not defined after loading '__package__.js'
here is my JSP :
%@ taglib uri=/struts-dojo-tags prefix=sx%
sx:head /
s:form action=contacts
table border=0 width=100%
Maybe with this : sx:head theme=ajax/ instead of sx:head /
theme is not in the DTD of sx:head
Check to see if you have scriptaculos.js included as well as you dojo
scripts...I was getting a problem with firefox in relation to this.
Andrew
Where do I have to have this scriptaculos.js ?
In Firefox I have this :
DEBUG: DEPRECATED: dojo.event replaced by dojo.event.* -- will be removed
in version: 0.5
DEBUG: DEPRECATED: dojo.io replaced by dojo.io.* -- will be removed in
version: 0.5
But nothing in IE.
Just to say, the datepicker is working fine (it opens, I can choose a
date,
I get all the SVN workspace this morning, I didn't have it before...
I resolved the javascript bug saying unterminated string by modifing the
head.ftl : I set the , before each parameter, elsewhere whe have a ,
for the last parameter.
script language=JavaScript type=text/javascript
// Dojo
Hi all,
I try to separate the modules of my app in differents xml files, but the
extends seems to have problems.
Struts.xml :
struts
constant name=struts.enable.DynamicMethodInvocation value=false
/
constant name=struts.objectFactory value=spring /
constant name=struts.devMode
Hi,
With this declaration, your server has to have acces to the Internet, to
download the tld and so one. If you don't have this acces, try to download
the tld file, add it in your WEB-INF/tld folder, and add the mapping in
your web.xml.
Regards,
Michaël
Balazs Michnay [EMAIL PROTECTED]
Hi all,
I don't find any documentation on that, so I post here.
I would like to create my own tag (in Struts 1 I extend
org.apache.struts.taglib.html.BaseFieldTag for example) to display a
table. In fact I would like to put some HTML around displayTag.
How could I do ? Where are the new
Kikoolol.
Thanks for your help, but if you had read my question, you will have
understood that we don't care what will be in my tag. In do know that
displayTag is not Struts...
By the way, I found my mistake. Tags does'nt more exist, it is themes and
templates.
So here is my JSP :
Hi,
I have some errors too, in 2.1.0 (build 25/04) version.
I had to add the tiles type (result-type name=tiles
class=org.apache.struts2.views.tiles.TilesResult/) in the
default-struts.xml, because it was not inherite from my struts.xml
The bad configuration :
struts.xml :
struts
constant
Hi all,
I try to insert my AuthentificatedInterceptor in the stack, but now
nothing works.
First, I had a login page, with login/password fields, and the LoginAction
getted well the parameters' value.
Now, with my new Interceptor, the LoginAction gets empty values from my
login and password
the
localized message printed at the user, not the fieldName...
Can't we do that ?
Regards,
Michaël
Just to make sure,
did you tried %{getText('login.login')} ?
because fieldName you give you the fieldName, that is loginInput.
Best,
Felipe
MLENEVEUT wrote:
Anyone ? :(
Michaël
Hi all,
With Struts 2.0.6, I try to have validation message with localization.
For example, I have a login form, with a loginInput input text :
s:form action=login validate=true theme=xhtml
s:textfield label=%{getText('login.login')} name=loginInput/
/s:form
I have a validation on it :
Hi all,
I tried to customize the errors.prefix, suffix, header and footer, but
they are not taken into account.
How to do in Struts 2 ?
I just put this in my package.properties :
errors.footer=tr
errors.header=/tr
errors.prefix=td
errors.suffix=/td
Thanks,
Regards,
Michaël.
Hi all,
I would like to do as in Struts 1 with DispathAction : create a parent
Action, which each other action extends, and each request/action passes by
this parent action, and I could so add there the generic validations (user
logged, etc...)
How could I do ?
I tried this :
My parent
I was talking about a dynamic mecanism. In Struts 1, I never called
super.dispathMethod() : the CRMAction.dispatchMethod() was first called by
Struts, then my return super.dispatchMethod() was returning the
ActionForward returned by my called Action.
public class CRMAction extends
Anyone ? :(
Michaël
Hi all,
With Struts 2.0.6, I try to have validation message with localization.
For example, I have a login form, with a loginInput input text :
s:form action=login validate=true theme=xhtml
s:textfield label=%{getText('login.login')} name=loginInput/
/s:form
I have a
58 matches
Mail list logo