I've encountered a rather annoying issue. To select the language in which our
labels should be displayed, we use fmt:setLocale. Everything works fine,
everybody's happy.
But. To validate our forms, we use DynaValidator. In our webapp, we have 1
form which has only 1 field. When validation
I want to use ajax within Struts to realize following function,there is a
textfield an a submit button which use register a username in a JSP
page,then you can put you name into textfield and click register button,then
will call ajax to search name is exist,if exist,there will be a message
behind
2007/4/23, [EMAIL PROTECTED] [EMAIL PROTECTED]:
Hi Antonio --
I have been teaching for the past couple weeks and now returning to
S2/Tiles. I would like to understand how Tiles affects the S2 lifecycle.
AFAIK Tiles affects S2 only in rendering the results. What I mean is
if you are using a
A quick question on what the recommended method for displaying general
messages when using struts 2, actionMessages or actionErrors.
I had a look at the ValidationAware interface and there appears to be no
difference between the two.
The only difference I could see what that they are accessed by
^\w{2}-\w{6}(-\w{2}){0,5}$ | ^[0-9]{4,6}$
^\\w{2}-\\w{6}(-\\w{2}){0,5}|([0-9]{4,6})$;
Are different you are missing the ^ sign after the | operator...
Please read the regular expression book properly ..
-Original Message-
From: Ferruh Zamangör [mailto:[EMAIL PROTECTED]
Hi
I notice that there have been a few threads over the last couple of
days where people have been talking about implementing login
authentication via a Struts2 interceptor. Could someone simply outline
the reason why they would want to do it this way rather than using
container authentication?
On 4/23/07, piloupy GOTTAPIL [EMAIL PROTECTED] wrote:
Hi,
I'd like to do something like this in a JSP file :
html-el:link href=${contact.mail}Email Link/html-el:link
where contact.mail is a key from my MessageResources.properties.
I think the solution is quite simple, but I can't find how to
On 4/24/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
I've encountered a rather annoying issue. To select the language in which our
labels should be displayed, we use fmt:setLocale. Everything works fine,
everybody's happy.
But. To validate our forms, we use DynaValidator. In our webapp,
TestDateAction.java
public class TestDateAction extends ActionSupport {
private Date singleDate;
private Map mapDate;
private List listDate;
@Override
public String execute() throws Exception {
return
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
David,
Sullivan, David wrote:
I am assuming that I wont. However many of the examples I have seen
using the interceptor framework use Springs IoC container and I probably
wont be using that given the EJB3 specification (Glassfish and Toplink)
You can just ignore it.
musachy
On 4/23/07, red phoenix [EMAIL PROTECTED] wrote:
I want to use ajax in struts2,but when run my code like
http://localhost:8080/test/index.html,it raise following Javascript error:
Line:95
Char:1
Error:Could not load 'dojo.widget.html.Tooltip':last tried
Thank you all. The solution of Niall works. I was trying to get the
fmt taglib work for nearly 2 days... without success.
But I really prefer the solution of Niall, since it doesn't oblige me
to declare another taglib.
I really thank you guys for your help.
piloupy
On 4/24/07, Niall Pemberton
Others can chime in as well, but from my experience in the past,
container-managed authentication is a little too rigid and doesn't offer
anywhere near the flexibility of a custom-brewed authentication/authorization
scheme. That's not to say a custom scheme need be entirely proprietary; we
Hey all
I have an action class which handles file uploads via a setter method:
private File uploadedMovie = null;
public void setUploadedMovie(File uploadedMovie) {this.uploadedMovie =
uploadedMovie;}
The problem is that I can't set the name of the uploaded file before it is
saved to the
please supply the applicationContext.xml definition for 'testDate'
e.g. web..xml
action name=springExample class=springAction
result name=success
/WEB-INF/view/springExample.jsp
/result
/action
beans default-autowire=autodetect
bean id=thingManager
--- meeboo [EMAIL PROTECTED] wrote:
private File uploadedMovie = null;
public void setUploadedMovie(File uploadedMovie)
{this.uploadedMovie =
uploadedMovie;}
The problem is that I can't set the name of the
uploaded file before it is
saved to the drive. I can specify the path but the
file
--- Martin Gainty [EMAIL PROTECTED] wrote:
please supply the applicationContext.xml definition
for 'testDate'
Huh?
I'd be more likely to think it has something to do
with not using the s:form.../ tag, but I've never
been entirely sure what the relationship between it
and the input tags really
I would like to enable/disable the datetimepicker when
the user selects certain radio buttons. Here is my
tag:
s:datetimepicker name=untildate
displayWeeks=4
displayFormat= MM-dd-/
I can disable (and clear) the textbox next to the
calendar icon like
Mark Menard wrote:
s:text name=format.dates:param name=value value=orderDate
//s:text
That will do the date, there are some other formats listed on the Wiki I
think. *shrug*
Mark
When I put the exact text you gave me into my .jsp the text format.date is
printed out to the page.
What I need to do to load the filter-class from custon jar or war file ?
I am getting this exception :
Apr 24, 2007 10:16:09 AM EDT Error HTTP BEA-101165 Could not load
user defined filter in web.xml:
ServletContext(id=31649343,name=dlymags,context-path=/dlymags)
Assign an id to your datepicker, lets say dp1 and do this:
dojo.widget.byId(dp1).disable();
to enable it:
dojo.widget.byId(dp1).enable();
musachy
On 4/24/07, Scott Nesbitt [EMAIL PROTECTED] wrote:
I would like to enable/disable the datetimepicker when
the user selects certain radio
--- chengas123 [EMAIL PROTECTED] wrote:
Can this be any properties file or are you referring
to struts.properties?
It needs to be one of the normal properties files used
for messages etc. that S2 searches for, where you keep
the rest of your messages/properties. (So no, I don't
think
Works great!
Thanks, Musachy.
Scott
--- Musachy Barroso [EMAIL PROTECTED] wrote:
Assign an id to your datepicker, lets say dp1 and
do this:
dojo.widget.byId(dp1).disable();
to enable it:
dojo.widget.byId(dp1).enable();
musachy
On 4/24/07, Scott Nesbitt [EMAIL PROTECTED]
I'm not a struts2 user (unfortunately) but this seems bad to me. From
what I see of the s2 tags, they abstract you from the fact that dojo is
being used under the hood.
Should struts2 have it's own core js that proxies through to the dojo
implementation?
Scott Nesbitt wrote:
Works great!
On 4/24/07 8:49 AM, Shahak Nagiel [EMAIL PROTECTED] wrote:
Others can chime in as well, but from my experience in the past,
container-managed authentication is a little too rigid and doesn't offer
anywhere near the flexibility of a custom-brewed authentication/authorization
scheme. That's
redundantactionMessages is for general messages, and actionErrors for
errors./redundant . I don't think there are any implications.
regards
musachy
On 4/24/07, Zoran Avtarovski [EMAIL PROTECTED] wrote:
A quick question on what the recommended method for displaying general
messages when using
Dave Newton-4 wrote:
--- chengas123 [EMAIL PROTECTED] wrote:
Can this be any properties file or are you referring
to struts.properties?
It needs to be one of the normal properties files used
for messages etc. that S2 searches for, where you keep
the rest of your
http://www.koders.com/javascript/fidFF0542A22748F79D50156F4B75564D76676002D4.aspx
I would suggest using struts.widgets.HTMLDynArchCalendar
whcih inherits from dojo.widget.DomWidget
which has the enable()
and disable() methods
M--
This email message and any files transmitted with it contain
In the beginning I think that was the idea(I wasn't around at that time so
don't take my word for it :) ), as of 2.1 we are moving all these ajax
tags to a dojo plugin, so they are dojo specific. If there was another
implementation, it would be better to have a common interface, but just
working
That widget is long gone :) (since 2.0.3 I think)
musachy
On 4/24/07, Martin Gainty [EMAIL PROTECTED] wrote:
http://www.koders.com/javascript/fidFF0542A22748F79D50156F4B75564D76676002D4.aspx
I would suggest using struts.widgets.HTMLDynArchCalendar
whcih inherits from dojo.widget.DomWidget
--- chengas123 [EMAIL PROTECTED] wrote:
Awesome. Got it working by adding that to a
package.properties file. I have no plans to
internationalize this site and it wasn't immediately
obvious to me that formatting would fall under the
category of localization (although I understand why
it
I guess you're looking for custom validation. You can find it surfing at
http://struts.apache.org/2.x/docs/home.html
By the way, in your code, aren't you missing the s:form tag? Struts forms
are similar to HTML forms. You must wrap the ui components in a s:form,
except in special cases.
Hi guys,
Can I somehow change the button (e.g. addAllToLeft) of a
Optiontransferselect to some image? I imagine it can be done by changing the
ftl, but I'd like some clues to do that. Would be great to define some id
for these buttons, then we could change it by css.
How about that?
Thanks,
Hi-
So we're using ForwardAction for URIs that can just link to a JSP page
and don't need a customized Struts Action to perform tasks ahead of
time. When a user connects to our website, we essentially direct the
user to the default main page, which is protected, so they have to log
in first
I was supposed to test the genereated HTML from both. (Laziness got the best
of me).
guess
Here it goes, without testing. I think that the HTML generated is slightly
different so that you
may apply different CSS style sheets to it.
/guess
harringf
On 4/24/07, Musachy Barroso [EMAIL PROTECTED]
I notice key is now preferred over getText() and am now curious about
something else. Is the name attribute necessary when using key? I would
rather not duplicate myself unless S2 requires it.
s:textfield name=user.zip.city key=user.zip.city size=40
readonly=true /
--
Scott
[EMAIL
Harring Figueiredo wrote:
guess
Here it goes, without testing. I think that the HTML generated is
slightly
different so that you
may apply different CSS style sheets to it.
/guess
Bingo. That is exactly the reason for the two. Direct from my style sheet:
span.actionMessage {
Oh Boy,
I am glad to see that I was not the only one to have this problem :-)
Dave,
Here is how I got it to work:
Edit the struts.properties with the following entry
struts.custom.i18n.resources=translations
Edit the properties file translations.properties with the entry
They can the different and serve different purposes.
The name attribute that you have there means that the value will be picked
from
yourAction.getUser().getZip().getCity();
The key will be used to lookup the resources files using the literal string
'user.zip.city', of course.
Hope this
If the name is null, and there is a key, it will be used as the name. So,
no, you don't need to duplicate it.
musachy
On 4/24/07, Harring Figueiredo [EMAIL PROTECTED] wrote:
They can the different and serve different purposes.
The name attribute that you have there means that the value will
Hi,
I am using Struts 1.3. We have several struts forms which are
pre-populated from a database.
My questions is, if I want to provide the user with a way to reset the
form to the initial values which were populated from the database. Is
there any API or method calls for that. Or maybe some kind
Another important difference between ActionMessages and ActionErrors
has to do with how the Validation interceptor works.
If you add an ActionError in the 'validate' method (or before the
ValidationInterceptor get ahold of the request) of a ValidationAware
action, the interceptor will see
Chaudhary, Harsh [EMAIL PROTECTED] wrote:
Hi,
I am using Struts 1.3. We have several struts forms which are
pre-populated from a database.
My questions is, if I want to provide the user with a way to reset the
form to the initial values which were populated from the database.
It sounds
Adam,
It sounds like you have your protected logic in the JSP. If so, then the
JSP will always be rendered. You should instead put such security logic in
the application, such as in the Struts Controller. It's no good putting it
on the JSP.
Paul
On 4/24/07, Adam Gordon [EMAIL PROTECTED] wrote:
Yea, that's what I was thinking too. I was just wondering if Struts (or
some other API) has a built-in caching mechanism. Thanks though,
Harsh.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Paul Benedict
Sent: Tuesday, April 24, 2007 4:55 PM
To: Struts
I have 3 struts applications (.war ) inside one .ear.
One of these application's classes extend a base class that is defined
in an external .jar.
Somehow if I deploy the three applications separately everything works
fine,
But once I deploy only the .ear, it fails when creating the extended
Folks,
I have a form with a submit button as follows
s:form action=member_login.action theme=ajax validate=true
s:textfield key=username /
s:password key=password showPassword=false/
s:submit key=button.save theme=ajax targets=RightPaneWindow /
s:reset key=button.reset/
/s:form
On
After the ajax request completes, for each target in the target list this
will run:
dojo.byId(id).innerHTML = text;
try updating the div content like that, and see what happens. This is a dumb
question, but are you using the same id for more than one div?
musachy
On 4/24/07, Harring
For what it's worth we use a combination of both JAAS and a custom
AuthInterceptor.
JAAS handles authentication and the AuthInterceptor manages authorisation.
This leverages off the strength of JAAS and has the flexibility required for
our needs.
A couple of sources of useful information are:
Musachy,
Thanks for the reply.
I am using only one div with the id.
I now tried something else while waiting for the reply:
s:set nameframe value=LoginWindow/
s:if test=hasActionErrors
s:set nameframe value=RightPaneWindow/
/s:if
I then tried to replace the traget on the form itself (since
Hi,
I've following global result to handle authentication.
global-results
result name=login type=chain
param name=actionNamelogin/param
param name=namespace/home/param
param name=methodinput/param
/result
...
/global-results
For most part this works fine. The only problem with this is
I'm trying to extend the standard struts.xml by using includes but tomcat is
throwing errors.
I found some info on the mail lists pointing to an error in xwork and that
it was fixed in 2.08. When I went looking to download a nightly build there
were only 2.10 builds.
My question is what's the
Is the target div on a different frame?
musachy
On 4/24/07, Harring Figueiredo [EMAIL PROTECTED] wrote:
Musachy,
Thanks for the reply.
I am using only one div with the id.
I now tried something else while waiting for the reply:
s:set nameframe value=LoginWindow/
s:if test=hasActionErrors
This is the generated code:
td colspan=2div align=rightinput type=submit
dojoType=struts:Bind event=onclick value=Save
id=member_login_button_savelabel=Save name=button.save
targets=RightPaneWindow /
/div
The div is on a different IFrame.
Harring
On 4/24/07,
I think that's why it doesn't work, the ajax theme uses getElementBydId(id)
(actually dojo.byId(), anyway) which returns the element in the current
document, for an iframe it should be
window.frames[0].document.getElementById(...).
You can use the notifyTopics attribute and do it yourself inside
--- Zoran Avtarovski [EMAIL PROTECTED] wrote:
I found some info on the mail lists pointing to an
error in xwork and that it was fixed in 2.08. When I
went looking to download a nightly build there
were only 2.10 builds.
.10 is bigger than .08. The fix is probably still in
it.
d.
H... I sm not sure I understood. Maybe the generated code is different
for:
form target=someT ..?
then for :
s:submit targets=someT /
???
If the target is used on the form, it does reference and update the right
form (But I have to IFrames that I need to update and that is the reason I
am
The targets won't be updated if they are in another frame, you can do
something like this:
s:submit theme=ajax notifyTopics=/updateIframe /
script
dojo.event.topics.subscribe(/updateIframe, function(data, type, e) {
if(type == load) {
//use iframe index or name here
Thanks for the big call Dave.
My concern was that 10 may introduce more issues than it solved. So I
should've said What's the easiest and least disruptive way to fix the
problem?
Z.
--- Zoran Avtarovski [EMAIL PROTECTED] wrote:
I found some info on the mail lists pointing to an
error in
--- Zoran Avtarovski [EMAIL PROTECTED] wrote:
Thanks for the big call Dave.
;)
My concern was that 10 may introduce more issues
than it solved. So I should've said What's the
easiest and least disruptive way to fix the
problem?
I haven't updated that far either... An XWork person
will
Hello Dave Newton,
I confirm that i define the testDate in my applicationContext.xml file.
And if you use s:form/ tag. the magic thing is still happen .
Null date become today in map.
Best regards,
=== At 2007-04-24,
I'm trying to figure out a way to access the Struts 2 action messages in a
Freemarker template. I copied the following code from the Struts template
directory, into my Freemarker view, but the action errors do not show up,
which tells me I must not be using the correct variable.
[#if
Hi!
The page is not found when we clicked on Initializing Actions from
Spring from
http://struts.apache.org/2.x/docs/why-would-we-want-to-create-action-objects-from-the-spring-configuration.html
Do you have any idea of what could be the problem?
Hi!
I have action classes configured in struts.xml and the DataSource,
SessionFactory, DAO objects configured in Spring's
applicationContext.xml.
How can I reference the DAO objects in my action class?
Please advise, thank you!
64 matches
Mail list logo