is the user cancelling still sending a request to the server and hence you
are trying to return an error - if so i'd assume the http connection has been
terminated and therefore you can't send an http response back.
if its just logged but doesn't stop user experience then leave it.
To:
if you don't use AJAX then you can only do the standard get/post based on form
submission which is a synchronous call.
you can use AJAX functionality straight from plain old javascript without using
DOJO or other javascript libraries - its just those libs make it easier.
adam
Date:
i dont use the osiv filter i just make sure the DAO object method returns the
objects initialised correctly (i.e. all lazy collections that are to be
accessed are initialised) for how its going to be used - i might have a DAO
method to return the plain object with no collections initialised
window.open is not a synchronous command and hence the window.print is
occurring before the jasper report is actually rendered and you need to issue
the window.print on the new window which i doubt it is given you're calling it
from the parent window.
you need to be able to test that the new
i'm not sure what tests can be done on the variable created from the
window.open - if you can test for it being loaded and are able to issue a print
against the actual new window then that would be simplest otherwise...if the
call to the jasper report could output an html page containing the
this
adam pinder wrote:
window.open is not a synchronous command and hence the window.print is
occurring before the jasper report is actually rendered and you need to
issue the window.print on the new window which i doubt it is given you're
calling it from the parent window.
you
can u please send that java script file to
me.(nagarjunabatt...@gmail.com)
adam pinder wrote:
i think all interactions using window.print require the user to at least
acknowledge that they want to print. i've only used javascript inside a
pdf to be able to print without user
make sure you only add additional jars into the web app itself and avoid
(mostly) adding jars into common library folders.
i use struts2 and hibernate3 but not tiles and have no problems like yours.
adam
Date: Thu, 10 Feb 2011 14:53:52 +0530
Subject: Decent tutorial or working example of
i would start with the struts2 sample app, get it working then add hibernate3
(this adds a lot of new jars) get struts2 and hibernate3 working then add
tiles2 and get that working - don't try and throw them all in together then try
to work out which one is causing the issue.
Date: Thu, 10
Anjib,
i'd certainly take a look at hibernate, i've been using it for a while now and
find it easy enough and functionally rich enough for most things.
adam
Date: Tue, 7 Dec 2010 14:36:01 -0500
From: anji...@hotmail.com
To: user@struts.apache.org
Subject: Connection Pooling with
Hi Li / Maurizio,
thanks for your replies - i did receive the answer from another user yesterday
too, he sent the following
Actually, I found the solution, and it works for me:
http://old.nabble.com/-S2--2.2.1-possible-freemarker-template-bug-td29462347.html
Just add this to your
maybe your xml does not match the struts2 DTD (defined at top of struts.xml) -
try checking xml in something like XMLSpy for invalid xml as error says.
Date: Wed, 20 Oct 2010 10:34:01 +0900
Subject: Re: Can't deploy on server
From: liying.cn.2...@gmail.com
To: user@struts.apache.org
are you using?
The default theme in Struts2.2.1 is [xhtml].
Maybe you need change the default theme or the theme of your tag to [simple].
Can you show us your setting file(struts.xml and so on) and your jsp code?
2010/10/19 adam pinder apin...@hotmail.co.uk:
I have just
I have just upgraded struts2 version from 2.0.11 to 2.2.1 and one issue seems
to be that i have amended templates
actionerror.ftl
actionmessage.ftl
and they were placed into WebContent\template\simple folder in the web app and
with 2.0.11 they overrided the templates in the struts2 core
i've only used jfreechart with struts2 (not portlets) and its more to do with
the way the result is returned than the action class itself.
in struts.xml i have
result-type name=chart class=org.apache.struts2.dispatcher.ChartResult/
and then referenced in action definition
if you're new to struts why don't you use struts2 its far better and less
intrusive code wise.
Date: Tue, 28 Sep 2010 09:03:51 +0530
Subject: Re: Accessing User input in execute ( ) method
From: hareend...@gmail.com
To: user@struts.apache.org
Guys,
Thnks for all replies. I'm
one action per function or functional area is probably best.
you can then tailor the validation and responses more easily.
adam
Date: Fri, 24 Sep 2010 10:35:42 +0100
Subject: How to structure a struts2 application
From: darrenkarst...@gmail.com
To: user@struts.apache.org
Hi,
Date: Sun, 12 Sep 2010 18:04:38 -0400
Subject: Re: Array Input Fields
From: davelnew...@gmail.com
To: user@struts.apache.org
Look at the type conversion docs: there's a difference between using
[] and () in the JSP names.
On Sunday, September 12, 2010, adam pinder apin
chris_mawata_str...@mathcove.net wrote:
On 9/10/2010 1:08 PM, adam pinder wrote:
public User getUser(int occ)
Should the getter not return the collection rather than a single User?
Chris
-
To unsubscribe, e-mail: user
Using Struts 2.0.11
I have a jsp that creates elements like
input type=text id=user[1].name name=user[1].name value=smith
size=20 /
etc
when the form is submitted to the server i want the parameters interceptor to
set the values on each user object so i have a method
your action could implement ServletRequestAware then it has access to the full
request including posted content.
adam
From: arunkumar.bopp...@gmail.com
Date: Fri, 30 Jul 2010 15:31:15 +0530
Subject: Re: Reading input stream (xml)
To: user@struts.apache.org
Request to this
if your security is simple - fixed roles to access certain actions...
i created a custom role interceptor added it to the interceptor stack and then
just added struts.xml definitions with
interceptor-ref name=stackWithRoles
param name=customRole.allowedRolesmember/param
can't you specify a filename in the result config in the struts.xml file,
albeit it the same for each result.
Date: Wed, 14 Apr 2010 09:57:54 +0800
From: haoniu...@gmail.com
To: user@struts.apache.org
Subject: Re: struts PDF
You can't. One
put them before action definitions.
adam
Date: Tue, 6 Apr 2010 00:47:22 -0700
From: rakeshknai...@gmail.com
To: user@struts.apache.org
Subject: struts 2 global result problem
hi
I am using struts2.1.6 in my application.i want to use global
have you got the correct cascade setting on the parent object
i use the xml files for hibernate rather than the @ syntax in java classes and
i can set cascade=all which means when i save/update the parent the children
are also saved or updated.
also remember that for hibernate to realise
turn on the parameterinterceptor logging and make sure as mentioned that
1) the values you expect for each child are being sent to the server (id and
name)
2) the parameter names are correct for setting each child
i had some issues getting lists of items to be updated by form submission
in log4j.properties file (same location as struts.xml and hibernate config
files)
add
log4j.logger.com.opensymphony.xwork2.interceptor.ParametersInterceptor=debug
this will output param name/value pairs being posted from your page.
From:
set the rootlogger to warn
log4j.rootLogger=warn, stdout
rather than debug
you should only get a parameterinterceptor log entry every time you post
something to the server
From: brgrandj...@live.fr
To: user@struts.apache.org
Subject: RE: CRUD
seems like form definition isn't in struts config file or properly defined
Date: Thu, 1 Apr 2010 11:45:42 +
To: user@struts.apache.org
Subject: Error creating form bean struts 1.2 + weblogic 8.1 + myeclipse 5.5
From: nanukh...@rediffmail.com
so it looks like your issue is more to do with the child values not being set
by Struts
there have been a few postings about using the [] notation on field names to
get struts to assign the values properly.
in struts1 i found it worked fine, however in struts2 i've not really seen it
try amp; instead of
Date: Wed, 31 Mar 2010 08:41:39 -0700
From: pankajj.j...@gmail.com
To: user@struts.apache.org
Subject: Regular expressions - Email Validation
In struts I have regular expression for validating email like this -
EMail
i prefer pagination to be db based so there is a minimum amount of data
retrieved and held in memory. i.e. only retrieve what you will display. don't
retrieve 200 records in memory and page through them.
adam
Date: Mon, 29 Mar 2010 03:07:25 -0700
the select state restored ? As of now , they take the
default value even after making a different selection.
regards,
Pundarik
On Wed, Mar 24, 2010 at 11:29 PM, adam pinder wrote:
as long as you are simply re-displaying the same form associated with the
same action it should work like any
the only thing i have different is a space before and after the = in the
resource file
apart from that i'm using getText as you are.
adam
Date: Tue, 23 Mar 2010 11:12:19 -0700
Subject: Weird behavior in getText()
From: thechrispr...@gmail.com
as long as you are simply re-displaying the same form associated with the same
action it should work like any other page - the input fields are struts2 tags
and there are getters for each property in the action it should retrieve the
value and re-display them
i have a similar thing and it
hibernate can use parameterised statements out of the box and handles the
encoding of values to stop sql injection.
you can use names like
:orgId
in an sql statement and set either the value with a set statement or by setting
an object containing a getOrgId method and hibernate will
you want to save the options in the select not a selected option...
if you make the select a multiple select and in javascript you select all
options are all the option values sent to the server against the same
parameter name (turn on parameter interceptor logging to check)...
if
use hibernate its definitely worth trying.
the SQL queries can be parameterised and the parameter names can refer to
fields in an object, it handles the escaping of values to be sql safe.
From: gustavo.felisbe...@wit-software.com
To:
Store the data entered in an object and have it in the session, making the
get/set for the object do a get/put into the session.
they can change to their hearts content.
Date: Wed, 17 Mar 2010 02:52:50 +0530
Subject: Can we some how persist form
you have a list of elements, how do you pass the Id of the
element you want to display in other page with a s:submit???
(I cant use javascript)
2010/3/6 Adam Pinder apin...@hotmail.co.uk
Any form textfield will be submitted when page submitted which is
effectively a parameter.
Adam
is it a file on the client side or server side ?
if client side, you can specify a result type in the struts.xml but the user
will be prompted to save the file as its a security risk to write it without
there confirmation.
server side, just use plain java code in jsp to write and
to
redirect the output of *out *to a file and not to STDOUT or so.
thanks
abhi
On Fri, Mar 5, 2010 at 2:10 PM, adam pinder apin...@hotmail.co.uk wrote:
is it a file on the client side or server side ?
if client side, you can specify a result type in the struts.xml
, It is a file on server side,
I could have written plain java code in JSP, but that will loose the benefit
of jsp and also rework on my end, I am sure there must be a method to
redirect the output of *out *to a file and not to STDOUT or so.
thanks
abhi
On Fri, Mar 5, 2010 at 2:10 PM, adam pinder
are you sure its not your appserver logging and not struts logging.
adam
Date: Fri, 5 Mar 2010 11:02:07 +0100
From: carl.ballant...@cast-info.es
To: user@struts.apache.org
Subject: RE: Struts 2, Log4J and turning off WARNING messages
Thanks Raghuveer,
I already have the
You don't redirect on validation errors.
A jsp page form is associated with an action, the same jsp is
displayed on validation errors then the action and jsp will re-
display the erroneous values automatically. Redirect on success is
more common.
Adam
On 5 Mar 2010, at 21:37, Siddiq Syed
Any form textfield will be submitted when page submitted which is
effectively a parameter.
Adam
On 5 Mar 2010, at 19:46, lucas owen sr.ilus...@gmail.com wrote:
Hi Struts users:
I'm wondering if it is possible to pass a parameter inside a
s:submit tag.
I'm working with the following
i think you can name the resource bundle files appropriately for the locale and
put them in the same package as the action classes.
look at the I18n Interceptor
adam
Date: Thu, 4 Mar 2010 11:19:53 +0530
Subject: Locale and custom variables
From:
why did you choose to use jquery rather than just normal struts select and let
the action class create an array of objects (i use an object that has a
key/value pair)
i haven't used jquery but not sure what extra it adds.
adam
Date: Thu, 4 Mar
.
Now I have to use this jquery select box to complete this task fast.
or else i need to write so much code to do this task.
Thanks
RS
adam pinder wrote:
why did you choose to use jquery rather than just normal struts select and
let the action class create an array of objects (i
use an alias in the getName call like so
s:property value=getName('US')/
this will still call getName but pass the string US then make the class
method getName do the locale related work.
you can't pass an object in a property call as far as i know only a
primitive/string.
i
just pass an alias to the locale in the parameter
s:property value=getName('US')/
and let the getName class handle the actual locale.
adam
Date: Thu, 4 Mar 2010 18:20:19 +0100
Subject: Re: Passing parameters to s:property
From: lukasz.len...@googlemail.com
To:
I personally use the standard a tag not the struts one and use struts to
populate the tooltip with s:text so a href=... title=s:text some
link text/a
not sure the struts a really adds much as the href is likely to be just the
action name not the full URL anyway.
adam
use a smaller font for the dropdown content or abbreviate the text or can the
option value be the long text and the displayed value be much shorter ?
Subject: RE: horizontal scroll in
Date: Wed, 3 Mar 2010 09:22:46 -0500
From:
Alex,
just checked my code again and it required me to handle the parameters myself -
i added some code into the prepare method and checked request parameters and
updated the arraylist myself (it was a while ago i had this problem).
In struts1 it would have worked, i couldn't get it to
in case anyone else encounters similar issue.
i forced the locale to en_GB (using datetimepicker with dd/mm/ format) by
adding it into struts.xml and now it works.
what was happening was that the dates on the url were not being converted into
java.util.Date fields because they were
BACKGROUND:
I have the following line in a jsp page that is shown after login
s:action name=TeamActivity!execute executeResult=falses:param
name=actionfind/s:params:param
name=teamActivity.selectedActivityMyActivity/s:params:param
name=teamActivity.dateFrom value=dateFrom/s:param
Alex,
i used the following and it worked ok with struts2.
In JSP :-
s:textfield name=opportunity.opportunityItem[0].quantity value=12 size=5
maxlength=5 theme=simple cssClass=mandatory
onblur=setListPrice(%{#rowstatus.index})/
In Action, i have a get/set for opportunity which is an
57 matches
Mail list logo