RogerV wrote:
So could someone explain either how to make the s:optiontransferselect
work with the sj:submit tag or suggest a way that I can post a form from
within a sj:tab tag and have the response page display within the
confines of the same sj:tab
Firstly the javascript used
Hi
I've got a problem with the s:optiontransferselect tag.
s:head/
s:form
s:optiontransferselect
/
s:submit type=button
/s:form
If I process the wrapping form using the s:submit tag then I see the two
columns auto-selected and the populated arrays are submitted back to my
action -
Hi
I've been experimenting with using Springs scoped Proxy beans to handle my
session bean management rather than using the more normal SessionAware
interface,
bean id = diagnosticContext
class=com.blackbox.genesis.services.diagnostics.DiagnosticContext
scope=session
Hi
I'm trying to iterate over a collection of Enums of type Authority using
s:iterator value=userDTO.authorities status=authstatus
s:property value=name/
s:if test=!#authstatus.last,/s:if
Chris Pratt wrote:
You might try s:property value=name()/. I'm not sure if it will work,
but OGNL has the ability to call methods by their full name.
Thanks Chris, s:property value=name()/ works a treat.
Regards
--
View this message in context:
Dave Newton-6 wrote:
Seems more a JavaScript question... Does the click handler eventually
return
false so the browser won't actually follow the link?
The doDelete() function is my on-click handler which opens the dialog
created by the sj:dialog tag. I was assuming (probably
DNewfield wrote:
The magic is all in:
script type=text/javascript
src=/GenesisNg-Web/struts/optiontransferselect.js/script
So I'd suggest looking in there and maybe setting some javascript
breakpoints to see exactly what's happening on submit.
Ok - looking at the page with
Lukasz Lenart wrote:
2011/1/4 RogerV roger.var...@googlemail.com:
Ok - looking at the page with Firebug reports Failed to load source for:
http://localhost:8080/GenesisNg-Web/struts/optiontransferselect.js; so
that
probably explains why things aren't working as expected. Now the question
Hi
Is it possible to conditionally trigger a validator such that if
conditionA then use ValidatorX else use ValidatorY within the validation
framework out of the box?
I have a scenario where a user is entering a serial number as a license key.
They can either enter a full serial number which
Dave Newton-6 wrote:
Validators aren't called when *you* call a method, its not like they
cause byte-code to be inserted.
Dave
Ok - bad choice of words. Validation annotations are processed by the
AnnotationValidationInterceptor. How it decides what to process I find a bit
hazy. There
Sparecreative wrote:
We use the interceptor for interrogating a legacy database where we have
no control over the execution or timing of the query.
We basically have an API we call and then wait in hope.
I have to say that I've found the interceptor to be inconsistent at best.
For
Hi
I've just upgraded to 2.2.1 from 2.1.8 and I guess I must have missed a
piece of documentation somewhere. My IDE (Eclipse Helios) is now flagging
all my .jsp files as being in error. Specifically, it complains that it
cannot find the tag library descriptor /struts-tags (%@ taglib prefix=s
Maurizio Cucchiara wrote:
At first glance everything would seems correctly configured (except
for that unnecessary RequiredFieldValidator).
Did you try it in a more recent version (like 2.2.1)?
Hi Maurizo,
I've upgraded to 2.2.1 and the behaviour has changed slightly, but still
doesn't
When defining my own CustomValidator, when I come to register my new
validator in validators.xml located on the classpath will I loose the
built-in validators or must I copy a default validators.xml from somewhere
and amend that?
REgards
--
View this message in context:
Maurizio Cucchiara wrote:
Ok,
try this
@VisitorFieldValidator(fieldName = YOUR FIELD NAME, appendPrefix =
true, message = YOUR MESSAGE)
Struts should use Field Name like a prefix for every invalid element
inside the annotated object.
This doesn't work as I would expect;
Maurizio Cucchiara wrote:
Sorry,
I meant annotated *classes*
Sure, BaseAction - all other actions extend this;
@ParentPackage(value = admin)
@Result(name=start,location=add-new-user-flow.jsp)
public class AddNewUserFlow extends ActionSupport implements SessionAware,
Preparable,
I'm trying to use the VistorFieldValidator via annotation. The validator is
being called ok, but using @VisitorFieldValidator() all the error messages
are prefixed with the word null. If I use
@VisitorFieldValidator(appendPrefix=false) then I don't get any error
messages at all.
Why am I getting
Maurizio Cucchiara wrote:
According with documentation appendPrefix Determines whether the field
name
of this field validator should be prepended to the field name of the
visited
field to determine the full field name when an error occurs
this link should be useful
Maurizio Cucchiara wrote:
You're right... there is something wrong in the way IE6 handles buttons.
Why don't you simply use:
s:submit type=submit value=Next/
s:submit type=submit value=Menu method=menu/
Thanks for the confirmation Maurizio, I thought I was going mad. Your
Maurizio Cucchiara wrote:
Could you post the generated html?
Posted below. Thanks for the typo nudge Dave, I hadn't spotted that because
it actually works! The additional data in the html above what I posted in
the .jsp file comes from Sitemesh decorators.
Regards
!DOCTYPE html PUBLIC
Hi
I guess this is not strictly a Struts problem, but I thought someone here
might have seen this. When I display the jsp page listed below in Firefox,
IE8, Safari and Chrome, pressing Menu gives me a no such method menu()
exception which is expected since the underlying action has no menu()
Hi
I have a requirement to present the user with a list of files stored on the
server, and then download the files selected to the user. If the user
selects a single file - no problem. However if the user selects multiple
files, then, unless anyone knows different, all the files have to be sent
Li Ying wrote:
My suggestion:
(1)I believe you can use ZipOutputStream to output the zipped data to
the response OutputStream directly, instead of a temp file. So no temp
file need to be created.
Hmm, write to the response.outputStream directly from within my action? That
would work
Hi
I'm setting up a new Struts 2 project - the first time I've started from
scratch in ages. I think it must be age, but I seem to have forgotten a lot
of the basics :(
Could someone look at my struts.xml and tell me why the config-browser
plugin shows that I'm using the default stack rather
li wei-4 wrote:
Hi RogerV
I don't think config-browser plugin tells you which stack are you using,
it just show you all of actions in namespaces you have configured,
of course, including default namespace
It lists the interceptors in the order that they are configured, so I would
Li Ying wrote:
Why you define paramsPrepareParamsStack again?
I believe it is already defined in the default configuration file,
you can just use it.
That's what I think I'm trying to do with the struts.xml ;
struts
constant name=struts.enable.DynamicMethodInvocation
rahulmohan wrote:
The page is correct. It supports only a single conversation as of now. I
have a modified version which supports multiple conversations. Couldn't
get around to committing it so far. Will be happy to share the code
informally.
Given that it's me who is bleating
Hi Rahul,
Please send it to rogerdotvarleyatgooglemaildotcom
Thanks
Roger
--
View this message in context:
http://old.nabble.com/Struts-2%2C-Session-Management-and-%22WorkFlow%22.-tp29726121p29736089.html
Sent from the Struts - User mailing list archive at Nabble.com.
Hi,
I have a use case, where after the user logs in to the application
(handled by Spring Security) I need to start a setup wizard comprising
three views and their associated actions. These must be processed in strict
sequence and the user must not be allowed to break out by either typing a
URL
Paweł Wielgus wrote:
In an interceptor You can check if a user is logged in,
so it's easy to have wizzard immediate after login
and only login page if user is not logged in.
Then after user is logged in You can check if wizzard is completed and
if not redirect him at current wizzard
Paweł Wielgus wrote:
Every form needs to have all necessary ids as hidden fields.
That way, posting a form will always update appropriate object with
appropriate data.
Agreed, but how do you check that the hidden ids that come back with the
submit are the ones that
you sent in the
Hi Pawel,
Paweł Wielgus wrote:
Agreed, but how do you check that the hidden ids that come back with the
submit are the ones that
you sent in the first place? It's not that hard to use something like
HttpClient to send malicious POST's
Yes, it's possible but not likely, in general users
Dave Newton-6 wrote:
Correct--the essence of implementation is just a dual-layer context with
the additional key passed back and forth (I assume for every request).
Hi Dave,
Doesn't seem too complicated to implement :) - but given this conversation
from Jan 2009
RogerV wrote:
Dave Newton-6 wrote:
Correct--the essence of implementation is just a dual-layer context
with
the additional key passed back and forth (I assume for every request).
Hi Dave,
Doesn't seem too complicated to implement :) - but given this
conversation from Jan
rahulmohan wrote:
Exactly! I think scope plugin solves your problem. The conversation
support in scope plugin is not as rich as that in seam, but can serve as
the starting point. I have fixed a couple of bugs in the scope plugin and
I am working on some enhancements in scope plugin
Is there a way of specifying the start directory to be used when the user
hits the browse button? As far as I can see, the system remembers where
it was looking last time, but this seems to be when the file selector was
last used, regardless of which particular instance was used. (i.e if I have
5
abhishek jain-11 wrote:
Hi friends,
I need urgent help, i have developed an application but when i run that on
server i get the following error,
I am using Tomcat 5.5 and Struts 1.1 , i develpoed application using
Myeclipse, do i need to optimize application by removing some libraries
Top of my head ... you either do not have a getMessage() method in your
action, or you do, but the value is blank/null.
Post your action code.
Regards
--
View this message in context:
http://old.nabble.com/Problem-with-figuring-out-Convention-Plugin-tp29058926p29073975.html
Sent from the
I know that Tomcat supports Comet. I was wondering if I had to do anything
different in Struts to be able to use Comet. Are you saying that by simply
enabling Comet in Tomcat, or using any other Comet enabled servlet
container, Struts will *just* work?
Regards
--
View this message in context:
Hi
Does Struts 2 have support for (or plans for supporting) either Comet
processing or HTML5 WebSockets. Googling suggests that the answer for Comet
may be no, but the latest page I've found that states this, is from 2008!
Regards
--
View this message in context:
Hi
While building the functionality of my web-app served up by Apache Tomcat, I
use
meta http-equiv=expires content=0
meta http-equiv=cache-control content=no-cache
meta http-equiv=pragma content=no-cache
in all my pages to ensure that requests to the pages with dynamic content
(most
James Cook-13 wrote:
I two would like to hear about solutions to this, after a quick Google,
I found most people have it the other way with their JS files being
cached and not reflecting there changes.
I think that either I haven't explained clearly or we're misunderstanding
each other
James Cook-13 wrote:
Nope, no misunderstanding. All I was saying was that people seem to
experience the opposite to what you are experiencing. Like you said,
they have what you want...
I don't suppose that you happen to have one of your google searches to hand
do you? I'm obviously
How do/can I intercept the There is no Action mapped ... error so I can
re-direct my users in a similair fashion to the global-exception handling.
(I've currently got java.lang.Exception mapped to catch everything, but it
doesn't intercept There is no Action mapped ...)
Regards
--
View this
I'm using the ExecWait interceptor in a couple of places. I've noticed that
while the long running process is in progress, every time the wait screen
polls the action I get [WARN,TokenHelper] Could not find token mapped to
token name struts.token in my logs.
I was wondering why? Is there some
Hantsy Bai-2 wrote:
于 2010/5/22 0:29, Burton Rhodes 写道:
I think I saw a message a while back that commented about using Spring
3 (and Spring Security 3) with Struts 2.1.8 framework. Is this
possible? If so, how?
Currently using Spring Plugin 2.1.8 with Spring Security 3 without
Has anyone come across this before?
Scenario: After logging in, user runs Struts 2 action that displays a .jsp
page that uses Struts2-Jquery tags to create a tabbed display that make Ajax
calls to access their content from other struts actions. Walk away and let
the session expire. Clicking on
dcabasson wrote:
Why not doing that on the server side, using the s:token approach? That
would prevent double submit on the server side.
As an aside to this, is there a similair technique for detecting multiple
GET requests for the same action?
I've got one particular action that
Paweł Wielgus wrote:
Hi,
try to follow this example:
http://poulwiel.blogspot.com/2009/09/config-browser-plugin-in-struts2.html
I was using config-browser - that's how I knew the interceptor stack didn't
contain my custom interceptors. In the end, I've solved it - I needed the
For a long while I've been building forms along the lines of
s:form
..
s:submit id=submit type=button label=Continue action=processForm/
s:submit id=cancel type=button label=Cancel
action=goSomewhereElseWithoutSubmittingTheForm/
which has worked well. Until today. Today I needed to prevent
Andy Law wrote:
pFollowing on from my previous question
(http://old.nabble.com/Some-Spring-Struts-questions-td28533505.html) about
injecting objects orthogonal to actions into the environment where jsps
can see them, I now have an interceptor that does what I want it do
(Yay! - thanks
dcabasson wrote:
Why not doing that on the server side, using the s:token approach? That
would prevent double submit on the server side.
I thought about it. Googling for info showed support for both methods. I
took the javascript approach
because (a) it looked easier and (b) if using
Ok - I'm having a bad start to the day and this is driving me nuts. I'm using
the Convention plugin, and below I've attached a copy of my struts.xml. As
you can see I've got two custom interceptors which I'm adding to a copy of
the param-prepare-param stack.
Through logging I can see that my two
Fabio Perfetti wrote:
Hi all, anyone can suggest me how implement a simple authorization
process?
I looked for Shiro but i am looking for something simple simple
simple...an
interceptor?
Have a nice day
I'd suggest that you take a look at Spring Security. It can be
James Cook-13 wrote:
Oh, did you want your action as a spring managed bean? Ah I think i
massively miss read you. You want to inject predefined values etc?
If you want Spring to create your action class (as opposed to Struts
creating them) then you need to define your action in the
Jake Vang wrote:
If you want Spring to create your action class (as opposed to Struts
creating them) then you need to define your action in the
applicationContext.xml file.
how do you do that? here's a couple of ways i have tried that do NOT work.
1) Add constant
Luis Martín Canaval Sánchez wrote:
I would like to know that aswell, so far I have been using javascript with
jquery that is the lib that I use
// somewhere inside the initial function
$(input:text:visible:first).focus();
// or
$(#othercontol).focus();
// if the first control is
Hi
I'm trying to use the accordion tag for the first time, and it's all pretty
much working. However I have a couple of niggling problems and I'm hoping
that someone can point me in the right direction.
The first is a minor niggle. The default behaviour when the jsp is displayed
for the first
RogerV wrote:
The first is a minor niggle. The default behaviour when the jsp is
displayed for the first time is for the first accordionItem to be open.
I'd like the initial state to be all closed.
OK - setting sj:accordion active=false collapsible=true/ seems to take
care of this one
The documentation says that the checkbox interceptor Looks for a hidden
identification field that specifies the original value of the checkbox. If
the checkbox isn't submitted, insert it into the parameters as if it was
with the value of 'false'.
Should the interceptor work with s:checkboxlist
So if it's looking for a string, let's make sure you're giving it one,
and not the .toString of an empty map that it got from your prepare method:
s:checkboxlist name=%{'selectedroles'} list=%{availableroles}
value=%{preselectedroles}/
I must admit I don't understand what you expect this to
Alex Rodriguez Lopez wrote:
Roger,
you can use a list as setSelectedRoles(ListString selectedRoles) that
will get filled with multiple Strings, this way you can iterate it
easily without having to split the comma separated string.
Yes, you're absolutely correct. Struts will
DNewfield wrote:
Sorry you had such difficulty. If you have any specific suggestions for
the documentation, please help us improve it so that it can better help
the next person...
I'd be happy to contribute my sample .jsp and action.java code that will
illustrate how to get the
Anyone know what the current status of this plugin is. Back in December 2009,
Musachy posted that it needed fixing to work with Spring WebFlow 2.0. Does
anyone know if this has been done, before I start trying to use it?
Regards
--
View this message in context:
Upasana Sharma wrote:
listValue=%{getText('myCategory.'+toString())}
this way i can change the select display value from .properties file
in .properties i have to use
myCategory.ELECTRIC= Electric
Neat. I'm trying to do the same thing with the s:radio tag.
s:radio
DNewfield wrote:
On 5/3/10 2:54 AM, RogerV wrote:
s:form
s:checkboxlist name=selectedroles list=%{availableroles}
value=%{preselectedroles}/
s:submit type=button label=Add/
/s:form
So what html does this generate for the client to render/submit?
The rendering is a bit odd, which
Usually the error message you listed means the OGNL expression you
provided for some argument did not evaluate correctly, thus some
required piece of information is not available. Please post your tag
usage again and I'll take a look.
It's amazing what a calming effect a weekend and
Could somone suggest why this works
@Result(name=identify, type=redirectAction,
location=connect,params={reference,%{serialNumber}})
and this doesn't
@Result(name=identify, type=chain,
location=connect,params={reference,%{serialNumber}})
and what I need to do to get the chain to work (I don't
I'm trying to get Spring Security 3.0 working with a Struts 2.0.18 web-app
that uses the Convention plugin using a customised login form. So far I've
got
form-login login-page=/login default-target-url=/startup
always-use-default-target=false
What tools/techniques are people using these days to build menus for their
struts applications, particularly where menu/sub-menu contents are dynamic?
Is the struts-menu project still active/relevant or is everyone rolling
their own? How about Jquery and Json?
I'm about to start a new greenfield
Where is the latest documentation for using Struts 2 tags? I had a problem
earlier in the week trying to use the optiontransferselect tag which I still
haven't been able to get working. Earlier today, I started trying to get the
checkboxlist tag to work with a mapString,String and I'm still
I'm using the RedirectMessageInterceptor from
http://glindholm.wordpress.com/2008/07/02/preserving-messages-across-a-redirect-in-struts-2.
In the first application I used it in, which is a standard out of the box
struts 2 application it works as expected.
I'm now using it in a project that uses
Is there a known issue with this tag or am I missing something obvious? I've
been struggling to get this to work so after googling I copied the example
from
http://www.roseindia.net/struts/struts2/struts2uitags/optiontransferselect-tag.shtml
which worked. However as soon as I try to change the
mgainty wrote:
the site you mentioned has incorrect null list list examples
the correct examples are located at
http://struts.apache.org/2.0.14/struts2-core/apidocs/org/apache/struts2/components/OptionTransferSelect.html
better to populate list atrribute with valid values such as
OK - I think I've found out what is happening, and I think that there may be
a bug in OGNL-2.7.3.
The error occurs when Struts/Ognl is trying to assign user entered values
back into a user object through the action.
When I try to process the jsp of the failing action, Ognl calls
satyanarayana katta wrote:
Issue with logger. Suppress the messages at the logger level will
resolve the issue.
It's not an unwanted error message I'm complaining about - the action
crashes and I get the stacktrace in the browser window.
I've managed to upgrade the Debian server so
Hi
I've a webapp that was developed on a windows XP box and runs fine, both
within my Eclipse IDE and as a standalone. After creating a .war file and
deploying to a Debian Lenny box, everything works except one action which
throws a NoSuchMethodException in ognl.OgnlRuntime. The same action
Just to prove to myself that I'm not going mad, I've added a
System.out.println message to the method that Ognl is complaining about and
a second System.out.println message at the start of the application to prove
that I am running the same version. I see both messages running under
Windows and
Hi
I'm iterating over a list in my jsp. The relevant code looks like;
s:iterator status=blockStatus value=blocks var=block
s:select
label=blocks[%{#blockStatus.index}].name
name=blocks[%{#blockStatus.index}].value
Hi
I'm trying to develop an action mapper type of action. The action analyses
the incoming parameters and based on those I want to dynamically select the
action to handle the next step. So what I'm trying to do is to set a string
field called location with the string name of the action and using
Alex Rodriguez Lopez wrote:
I had similar problems with labels, most times they where related to
themes.
http://struts.apache.org/2.x/docs/themes-and-templates.html
For example, if you turn on simple theme you'll have to provide your own
tags for the labels as struts won't generate
DNewfield wrote:
Felipe A. Lorenz wrote:
Im not sure that you can use it (instanceof).
The problem might not be with instanceof but rather StringElement. Did
you try a fully qualified classname?
Sorry about the delay in replying, but it's a 6 day Easter break in my
locale.
Hi
I've been tasked with debugging a mis-behaving app based on struts 2.0.12
with a WEB-INF/lib list of dependant jars that would make you weep. Rather
than trying to fight this, I thought I'd try the easy approach first.
So, where can I find either a config-browser plugin jar that's compatible
I'm trying to do something similair to the example given in
http://struts.apache.org/2.x/docs/iterator.html where I'm trying to pass
each iterator value to an action. I'm using Struts 2.0.18 and the Convention
plugin.
I know that assigning value=value is confusing, but this is from the
middle
In a jsp page, I can let the action decide the CSS class of any given element
by including class=s:property value=class/ which will return the value
of the getClass() method in my action.
I now want to do the same thing while iterating through a list using the
s:iterator tag. I need to pass the
Hi
I have a collection of objects, each one contains a boolean flag, and I'm
displaying these via a JSP as a list via an interator. Struts is converting
the boolean fields into the strings true and false, I'd like to be able
to
1) display them as Y and N
2) convert back to true and false when
Hi
I'm having a problem trying to get the correct syntax for an OR test.
s:if test=%{typeAsString=='BOOL'} || %{typeAsString=='ENUM'} selects
nothing, whereas
s:if test=%{typeAsString=='BOOL'} selects values as expected as does
s:if test=%{typeAsString=='ENUM'}
Regards
--
View this message
Johannes Geppert wrote:
Try it with this:
s:url id=url action=get-ccf-data method=getParameterList
s:param name=displayGroups:property//s:param
/s:url
When I try this, it fails because the s:param tag is not closed properly.
In an attempt to go back to basics I've
Damn - how do I get Nabble to stop interrpretting my code examples as HTML?
--
View this message in context:
http://old.nabble.com/How-to-nest-Struts-Tags-tp27062761p27073760.html
Sent from the Struts - User mailing list archive at Nabble.com.
Johannes Geppert wrote:
Sorry I forgot to close the Tag
s:url id=url action=get-ccf-data method=getParameterList
s:param name=displayGroups:property//s:param
/s:url
Thank you Johannes, that works and when I use %{url} I've now got the
parameters as well!
Hi
s:iterator status=stat value=config.groupList
s:url id=url1 action=get-ccf-data method=getParameterList
s:param name=displayGroup value=what goes here?/
/s:url
s:a href=%{url1}s:property//s:a
/s:iterator
The iterator is returning a string value on each iteration - what's
the value of s:property/
Regards
2010/1/7 RogerV roger.var...@googlemail.com:
Hi
s:iterator status=stat value=config.groupList
s:url id=url1 action=get-ccf-data method=getParameterList
s:param name=displayGroup value=what goes here?/
/s:url
s:a href=%{url1}s:property//s:a
RogerV wrote:
Gabriel Belingueres-2 wrote:
The s:iterator tag (without the var attribute) push the current item
to the top of the ValueStack.
s:property/ will get the value from the top of the stack.
IMHO, I think this is a bad coding idiom. I don't like to think too
much where
Musachy Barroso wrote:
If they are in the same package that should work, all I can advise is
to put a breakpoint in ConventionUnknownHandler, line 301 and see what
is going on.
Hi Musachy
At line 301 if (result == null resultCode != null) result is an instance
of
Hi
I'm displaying a list of objects that allows the user to edit any/all
entities in the list. How do I configure the validation framework
(preferably via annotation) so that when the list is submitted back into my
action, each entity is individually validated.
Regards
--
View this message in
I'm trying to get action chaining to work as described in the section
chaining at http://struts.apache.org/2.1.6/docs/convention-plugin.html. My
Foo action and bar actions are listed below. What happens is that when Foo
is called, it correctly displays foo.jsp. When foo.jsp is submitted it fills
If I have global results correctly configured - should they appear when I
examine my app, which uses the convention plugin, with
config-browser/index.action?
--
View this message in context:
http://old.nabble.com/Convention-Plugin---Global-Results-tp26606826p26606826.html
Sent from the Struts -
Chris Pratt wrote:
Like Neil suggested, use attrib.length() The extra parens cause OGNL to
call getAttrib().length() rather than getAttrib().getLength().
(*Chris*)
Thanks, that does work in that the textfield re-sizes according to the
length of the string. Doesn't help unfortunately
Could someone show me the correct way to insert a string field length into
the size attribute of a s:textfield element.
Regards
--
View this message in context:
http://old.nabble.com/OGNL-expression-help-tp26373897p26373897.html
Sent from the Struts - User mailing list archive at Nabble.com.
Message-
From: RogerV [mailto:roger.var...@googlemail.com]
Sent: Monday, November 16, 2009 10:29 AM
To: user@struts.apache.org
Subject: OGNL expression help
Could someone show me the correct way to insert a string
field length into
the size attribute of a s:textfield element
1 - 100 of 127 matches
Mail list logo