Hi all!
I have the following code:
s:a id=removeProject theme=ajax notifyTopics=/submitProjectForm
loadingText= targets=workspaceAjaxContent executeScripts=true
onclick=var a = confirm('Are you sure you want to do this?');
if (a) {
var link =
First of all thanks a lot for the fast reply.
The problem with storing something in the session is it that if the user
tried to access two different pages at once in separate windows and had
to login in both, he will be forwarded in both to the last page he tried
to access. I think this is a
I have a custom tag lib i call passing a parameter of a c:out tag.
We don't have jsp expression lang supported so i have to use the c:out
tag to pass the variable into the custom tag but it doesnt' like it.
here is my tag:
tag
nameencodechars/name
Hai,
Can u please send me your complete code regarding this.
--
View this message in context:
http://www.nabble.com/how-to-return-to-originating-jsp-when-rendering-jasperreport-from-struts2-tf4108965.html#a12976873
Sent from the Struts - User mailing list archive at Nabble.com.
FYI I found a solution if anyone else has this issue:
In the custom tag lib where you set your Parameter you need to include
this code:
try {
parameter = (String)
ExpressionUtil.evalNotNull(encodechars, parameter, value,
String.class, this, pageContext);
} catch (Exception
Hi everybody!
Anyone knows why this code results in an increasing number of threads to
RefreshTree action when I use the selector??
script type=text/javascript
dojo.event.topic.subscribe(/submitSelectorForm, function(data,
type, e) {
if (type==before) {
//do something
--- Pablo Vázquez Blázquez [EMAIL PROTECTED]
wrote:
Anyone knows why this code results in an increasing
number of threads to RefreshTree action when I use
the selector??
Because your submit button listens to the published
topic of the select?
script type=text/javascript
There's no perfect solution. You should choose a first-win or last-win
strategy.
Paul
On 10/1/07, Anton Pussep [EMAIL PROTECTED] wrote:
First of all thanks a lot for the fast reply.
The problem with storing something in the session is it that if the user
tried to access two different pages
Thanks for taking the time.. unfortunately, the exceptions are still
percolating up.
Do you have it working?
Brian Trzupek wrote:
I am not 100% sure on this, but I think you need to have
struts.devMode = false in struts.properties.
Give that a whirl.
Brian-
On Sep 30, 2007,
That will work. However, I really need to assign the value to a
variable for use later since one cannot nest the tags. I need to
perform the @s.text so that I can later use that value in a call to
@s.url. I am not sure how I can do that. Any ideas?
Thanks in advance!
-Original
Hi all,
Can anyone confirm that was able to have displaytag nested tables
working in Struts 2?
I followed their nested table example. I don't get any errors but it
does not work either ...
Any experiences?
TIA,
regards,
Giovanni
Is the exception occurring during the call to execute() (or equivalent)
business logic method? This is where the exception handler interceptor
is applied. It seems like the exception you are receiving is from a
rendering phase outside the execution of the actions logic.
/Ian
mikeh96 wrote:
I want to call RefreshTree whenever I change the option in the select
menu. So, I´m simulating a submit with an onchange event (or that´s what
I would like to).
What´s wrong?
Dave Newton escribió:
--- Pablo Vázquez Blázquez [EMAIL PROTECTED]
wrote:
Anyone knows why this code results in
Well, I have found the solution (at least, my solution).
I must destroy topics before publishing it.
Pablo Vázquez Blázquez escribió:
I want to call RefreshTree whenever I change the option in the select
menu. So, I´m simulating a submit with an onchange event (or that´s
what I would like
thanks for looking. I pasted the full stack trace below. I am not using
any home grown action code (yet). This is coming from the
DefaultActionSupport during the rendering stage.
com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:348)
Do I need to
The result is executed after the interceptors and after the action has
executed. Look at the invoke() method on the DefaultActionInvocation
class. Therefore, because your exception is in rendering the result,
the exception is not managed by the interceptor. If you threw the same
exception
Based on the documentation I didn't think so.
The interceptor appears to be correctly persisting the object in the
session. It just seems that the model is not being populated on form
submission.
Is there something obvious I should check to ensure that the model is
being properly populated? Is
Thank you for recommending Prototype. I am trying it right now, and had a
question. When submitting a form (using post), do I have to specify all of the
form elements in the parameters tag? Or is there some all encompassing
function? Here is what I have:
new
Thanks Cesar, but that's doesn't seems to be what I'm looking for. The
c:forEach tag seems to have the same functionality that the s:iterate.
What I need is a simple for, something to populate a s:select tag with a
long list of consecutive integers, not with the values of a collection.
Thanx
Hi Henry,
Just add the following:
postBody: Form.serialize(yourFormId),
to your request.
On 10/1/07, Henry Park [EMAIL PROTECTED] wrote:
new Ajax.Request('Login!show.action',
{
method:'post',
postBody: Form.serialize(yourFormId),
onSuccess:
Thanks for the clarification. Is the solution of extending VelocityResult
and configuring it with a
template name to return (e.g. 404.vm) if the requested template throws the
ResourceNotFoundException
a viable one ? Or is there a way to handle this more elegantly ?
thanks again for your
To use the s:select tag you need to somehow put the consecutive
integers into a collection or Iterator. AFAIK there is no way to
define this collection easily using OGNL or JSTL (something like
comprehension lists in Haskell).
2007/10/1, Marcos Hernandez [EMAIL PROTECTED]:
Thanks Cesar, but
c:forEach var=... begin=... end=... step=...
--- Marcos Hernandez [EMAIL PROTECTED] wrote:
Thanks Cesar, but that's doesn't seems to be what
I'm looking for. The
c:forEach tag seems to have the same functionality
that the s:iterate.
What I need is a simple for, something to populate a
You should be able to use:
c:forEach begin=1 end=10 var=ndx
(*Chris*)
On 10/1/07, Gabriel Belingueres [EMAIL PROTECTED] wrote:
To use the s:select tag you need to somehow put the consecutive
integers into a collection or Iterator. AFAIK there is no way to
define this collection easily
How do I set/display the size of my list in the result of my jsp? I am able
to check for the size in my iterator tag, but I would like to be able to
display the size as a property.
I have tried the following and it didn't work.
s:set name=myListSize value=%{#attr['myList'].size}/
s:property
I'd like to use some of the information found in the cookbook
http://struts.apache.org/2.x/docs/how-do-i-populate-a-form-bean-and-get-
the-value-using-the-taglib.html
But I don't see what/where is BeanUtil.setProperties
Thanks in advance
Thank you Randy, that worked out great.
-Henry
-Original Message-
From: Randy Jonasz [mailto:[EMAIL PROTECTED]
Sent: Monday, October 01, 2007 9:40 AM
To: Struts Users Mailing List
Subject: Re: OT, ajax form submission
Hi Henry,
Just add the following:
postBody:
Yes, that's definitely a valid approach.
I guess the question I have is how are you using the feature? It
looks like you are simply providing a pass-through to view a velocity
template that is the same as the action name. Are you expecting the
user to make a request to a template that will
You are right... I am just trying to catch those rare events.
Now here's something crazy: (and I have checked, and double checked,
restarted server, etc).
BUT if I add a to my action, the exception mapping WORKS. If I take it
away, the exception is
not caught.
action name=*
You are right... I am just trying to catch those rare events.
Now here's something crazy: (and I have checked, and double checked,
restarted server, etc).
BUT if I add a to my action, the exception mapping WORKS. If I take it
away, the exception is not caught.
action name=*
I have no ideas about that one :)
mikeh96 wrote:
You are right... I am just trying to catch those rare events.
Now here's something crazy: (and I have checked, and double checked,
restarted server, etc).
BUT if I add a to my action, the exception mapping WORKS. If I take it
away, the
the previous posting seems to not like the \param\
You are right... I am just trying to catch those rare events.
Now here's something crazy: (and I have checked, and double checked,
restarted server, etc).
BUT if I add a lt;paramgt to my action, the exception mapping WORKS. If I
take it
try:
s:set name=myListSize value=myList.size()/
2007/10/1, Cory D. Wiles [EMAIL PROTECTED]:
How do I set/display the size of my list in the result of my jsp? I am able
to check for the size in my iterator tag, but I would like to be able to
display the size as a property.
I have tried the
I was able to get it like:
s:set name=myListSize value=%{myList.size}/
On 10/1/07, Gabriel Belingueres [EMAIL PROTECTED] wrote:
try:
s:set name=myListSize value=myList.size()/
2007/10/1, Cory D. Wiles [EMAIL PROTECTED]:
How do I set/display the size of my list in the result of my jsp? I
I have a method having the following structure:
public Object myMethod() {
try {
// some code
return theReturnedObject,
}catch{
// some code
}
finally {
// some code
}
}
Please let me know if the following version of code
The blocks you mention achieve different results. In the FIRST block you will
have to add a return statement for when an exception is thrown, this allows you
to set the theReturnedObject to a value for when an exception is thrown. In the
SECOND block if you are modifying theReturnedObject in
I have a ModelDriven action which controls CRUD operations on JPA managed
Entity E. E has a property called ?name? which maps to a database column
with a NOT NULL constraint. I have added a RequiredStringValidator
annotation to my Action to validate that the ?model.name? property is
non-null.
BeanUtil, however, was part of WebWork, IIRC.
--- Rod Bollinger [EMAIL PROTECTED] wrote:
BeanUtils is part of Apache Commons:
http://commons.apache.org/beanutils/
HTH,
-Rod
-Original Message-
From: Whitmire, Tracy Carroll
[mailto:[EMAIL PROTECTED]
Sent: Monday, October 01,
If there is a validation error the code on your action shouldn't be
executed at all, so you wouldn't have this problem. Are you applying
the defaultWorkflow interceptor to your action?
regards
musachy
On 10/1/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
I have a ModelDriven action which
True. The action's execute method is not being called. However, in the
ModelDriven pattern, the invalid (in my case Null) request parameters are
set on the Model during request processing. This is opposed to a
non-ModelDriven action where the parameters would be set on Action
properties.
I haven't tried this, but perhaps changing the order
the interceptors are specified is a potential way out.
--- [EMAIL PROTECTED] wrote:
True. The action's execute method is not being
called. However, in the
ModelDriven pattern, the invalid (in my case Null)
request parameters are
set on
Is there a way to hide .action .do by using filter url-pattern?
For example, I have the following codes:
filter
filter-nametutorial/filter-name
filter-class
org.apache.struts2.dispatcher.FilterDispatcher
/filter-class
/filter
filter-mapping
Since my Model is acquired from the Hibernate session (during the
prepare() Action method), it is a transactional persistent instance.
Note this from the hibernate documentation:
Transactional persistent instances (ie. objects loaded, saved, created or
queried by the Session) may be
Am Montag 01 Oktober 2007 23:33:01 schrieb Emi Lu:
Is there a way to hide .action .do by using filter url-pattern?
Have a look at
http://code.google.com/p/smarturls-s2/wiki/WalkThrough (last paragraph:
Extensionless URLs)
-
* instantiate a temporary bean used for the form only:
BeanUtils.copyProperties(tempBean, yourBean);
That's what I do.
musachy
--
Hey you! Would you help me to carry the stone? Pink Floyd
-
To unsubscribe, e-mail: [EMAIL
Your memory serves you well. WebWork did have the appropriate class and
method. But I don't see it any longer. So how are people doing it now?
Migrating an existing project from Struts1 and it seems like it would be
a logical step in the process. Maybe not.
-Original Message-
From:
That's an interesting idea Dave. I'm using the paramsPrepareStack. It'll
take some investigation to see if that would fix the issue.
best,
Jon French
Programmer
ASRC Management Services
ECOS Development Team
[EMAIL PROTECTED]
970-226-9290
Fort Collins Science Center
US Geological Survey
2150
--- [EMAIL PROTECTED] wrote:
That's an interesting idea Dave. I'm using the
paramsPrepareStack. It'll take some investigation to
see if that would fix the issue.
Shouldn't take much; it might be as simple as adding a
validate/defaultWorkFlow up towards the top (although
I might try just
I only use the beanutils.copy solution on a few places, on the other
cases I always load the object model on the prepare() method if the
id field is set (editing), and then call update or create on the
entity manager in my action method. I never got that problem so I'm
wondering what is different.
I am having a wierd problem where my action calls are not forwarding to the
correct page. Actually it works one time, but when I try to run the same
action again (this time on the same page) it attempts to go to a different
action (i.e. INPUT). Here is how I have it set up:
struts.xml:
Hello,
I have an interesting Struts design requirement and Im a little lost,
would really appreciate help !
I have multiple form beans in my application and a lot of them share
data.
Instead of duplicating the common attributes in each form bean, I am
opting for an more elegant approach, i.e.
On 10/1/07, Kothari, Kailash [EMAIL PROTECTED] wrote:
What I also need is that, when a child form bean is instantiated by
Struts, I want Struts to check if there is an instance of the parent
form bean in the session and if so, pre populate that data from the
parent to the child form bean.
Thanks Piero:
* don't flush the session and destroy the object
This is exactly what I want to do. However, the Hibernate session
automatically flushes when the EntityManager is closed during the
OpenEntityManagerInView filter exit filter operation. I definitely need
the filter in place to
Yes, musachy. I do something very similar. Here is my prepare() method:
public void prepare() throws Exception {
if( this.id==0 ) {
this.entity = new Entity();
} else {
this.entity = this.entityDao.findById(this.id);
}
}
Here is the
Only difference is that I don't use model driven. Is there any setting
to tell hibernate to flush the session when closed or it does that by
default?
musachy
On 10/1/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Yes, musachy. I do something very similar. Here is my prepare() method:
Unfortunately, it appears that xworks validation works not on the
ServletRequest parameters, but on the properties already set on the Action
- or in my case the model bean. So moving the interceptor up the stack
would just break validation.
From the
Yes. It is my understanding the that Hibernate FlushMode MANUAL or NEVER
(deprecated) instructs Hibernate to only flush the session when explitly
instructed to do so. In my case, I assume this means on a call to
EntityManager.flush().
By default, the mode seems to be set to AUTO. I've tried
OK: I've fixed the problem.
I'm not sure why this was the case, but here is what was causing the
problem:
In my ModelDriven action, I had a method like this:
public CollectionProjectType getAllProjectTypes(){
return this.projectTypeDao.getAll();
}
Notice that instead of
Hello, I'm getting this error when trying to use ajax theme
Error: *Could* *not* *load* '*struts*.*widget*.*Bind*'; *last* *tried*
'*__package__*.*js*'
Source File: http://localhost:8080/*struts*/dojo/dojo.*js*
http://localhost:8080/struts/dojo/dojo.js
Line: 94
Searching on google I've
Hi,
I'm unable to make my ajax form work
body
div id='two' style=border: 1px solid yellow;binitial content/b/div
s:form
id=theForm2
cssStyle=border: 1px solid green;
action=cadastro/pessoa_salvarEndereco.action
method=post
theme=ajax
input type='text'
Do you have an s:head theme=ajax/ tag?
--- Moacir Cardoso [EMAIL PROTECTED] wrote:
Hi,
I'm unable to make my ajax form work
body
div id='two' style=border: 1px solid
yellow;binitial content/b/div
s:form
id=theForm2
cssStyle=border: 1px solid green;
I tend to just make my bean a getter/setter on the action and let the
framework take care of it.
However, if you are looking for the equivalent to setProperties/copy etc
look at xwork's
com.opensymphony.xwork2.util.OgnlUtil
Matt
Whitmire, Tracy Carroll wrote:
I'd like to use some of the
This is a free event by and for the developer community in Silicon
Valley. I've been promoting this event within the local Java developer
community. I'll also be leading one technical session at this Code
Camp based on my experiences converting to S2 from WebWork2 and the
ways we use S2 now in our
63 matches
Mail list logo