Dave:
For a moment I thought I am the only one struggling with this. Thank you
for the clarification. Do you know any tutorial with examples ?
Dave Newton wrote:
--- Roger Varley <[EMAIL PROTECTED]> wrote:
Is there any clear documentation that will explain
when you need to use '%', '$' or
I need away to redirect to Action1 parameters and after processing and
creating an object, I need to pass this object to Action2 for further
processing.
That's what I am doing:
method="getAccountById">
getMessages
true
${a
It's working now. I just changed the redirect-action to chain. I don't
know what's the difference, but it's working.
Mansour wrote:
I need away to redirect to Action1 parameters and after processing
and creating an object, I need to pass this object to Action2 for
how to populate 2 fields in my action with one value ?
for example I need to populate the first name and last name with one
value for searching:
Search Account
I tried this. This is not working.
Thanks
-
To uns
I tried it. It's not working either.
Guillaume Carré wrote:
2007/5/18, Mansour <[EMAIL PROTECTED]>:
how to populate 2 fields in my action with one value ?
for example I need to populate the first name and last name with one
value for searching:
try this:
Sea
Yes, I do have the correct setters for the Account object.
Lance wrote:
Do you have the approptriate getters and setters?
eg
action.getAcc().setFirstName()
action.getAcc().setLastName()
Mansour wrote:
I tried it. It's not working either.
Guillaume Carré wrote:
2007/5/18, Mansour &l
tName, then you could just
hardcode a hidden field:
On 5/18/07, Mansour <[EMAIL PROTECTED]> wrote:
how to populate 2 fields in my action with one value ?
for example I need to populate the first name and last name with one
value for searching:
Search Account
id="fn" />
..
jalal udeen:
We need more info to be able to help. What version of struts are you using. If
you you are using struts 2, then you can use the target attribute in the same
way you use html. So, in your form tag you need to use the attribute target
like this:
for more info about this ch
I am trying to use hibernate with my struts project. The problem I keep
on getting :
javax.servlet.ServletException: org.hibernate.SessionException: Session is
closed!
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:518)
org.apache.struts2.dispatcher.Fi
It's not working. The only thing that is working is the execute part. lol
It waits there for ever, and the page doesn't display the action
results. It only shows the waiting page. Other actions just crach.
/pages/wait.jsp
s, and the operation I am
doing takes only 3-6 seconds. So i give it enough to make sure the
action is over.
Any idea?
Mansour wrote:
It's not working. The only thing that is working is the execute part. lol
It waits there for ever, and the page doesn't display the action
results. It on
I am populating some fields that can be edited and saved. Trying to do
this using ajax. The action is getting called but the form is never
submitted, and the updated data is lost.
value="${acc.fir
l.
See the top of http://struts.apache.org/2.x/docs/ajax-tags.html
Mansour wrote:
I am populating some fields that can be edited and saved. Trying to
do this using ajax. The action is getting called but the form is
never submitted, and t
OK I found my problem. I shouldn't add onClick event to the anchor, but
what do I do to execute a js function when this anchor is clicked. I
tried using onMouseDown, but the same results.
Mansour wrote:
Thank you. That helped but still can not submit a form using an anchor
out side that
I really need help in this. Do I need to use spring with this ?? I am
missing something ?
Mansour wrote:
It's really funny:
If I get the waiting screen it stays there and no further thing is
rendered. If I click refresh, the results I am expecting are
displayed. If I click refresh
he handler="" attribute to call your own js function
before making the request yourself (I haven't tried this though and
can't point to any examples)
Mansour wrote:
OK I found my problem. I shouldn't add onClick event to the anchor,
but what do I do to execute a js function
I need a table that contains anchors. Clicking on this anchors executes
the Action I need. The table is working great in FF but not in IE. IE is
getting the form object correctly put can not submit it. When I click on
the anchor in IE, the page stays there and no action is taken. When I
looked
a form. That might only
work in Firefox. (I make no claim if this is true, as I didn't look it
up)
What I generally use is document.formName.submit().
Hope I helped,
Mike
-----Original Message-
From: Mansour [mailto:[EMAIL PROTECTED]
Sent: Monday, May 21, 2007 12:22 PM
To: Str
"this" is removed from the anchor
tags. Could this be the issue?
Mike
-Original Message-
From: Mansour [mailto:[EMAIL PROTECTED]
Sent: Monday, May 21, 2007 12:53 PM
To: Struts Users Mailing List
Subject: Re: submitting a form using java script on IE
Mike:
I tried this one t
It's working now.
It's my fault. The onclick function needs a return value:
href="javascript://">
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
F
I still don't what wrong with this. I fixed few problems but still can
not get the javascript function to execute when the request is being
made. It send the request but the values for the form are not populated.
Hopefully someone can find out what's wrong with my code.
dojo.event.topic.su
Yes they are submitted provided that the submit button is inside the
form. Here's my code :
value="Save from inside the form w/o ajax">
dojo.event.topic.subscribe("/disableAll" , function(data, type,
No, I can not see any thing logged. Here' the whole JSP. it should give
you an idea about what I am doing. I am trying to save/update an account
and run a JS to disable the inputs.
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ ta
I am still having this problem. Did any one went through some thing
similar when using ajax to submit a form from a link or a submit Button
and when used notifyTopic ?
The problem is that the form fields are never populated in the action !
Any help ?
Mansour wrote:
No, I can not see any
I FOUND IT. Apparently it's not possible to modify the DOM during the
request. But when it's over we can do it:
Here's the code:
dojo.event.topic.subscribe("/disableAll" , function(data , type, request) {
if (type == 'load') {
disableInputs(true);
}
});
---
I can not get datetimepicker to work.
Here's my Code:
and here's the html output:
dojo.require("dojo.widget.DatePicker");
Any Idea? Is there alternative for this one ?
-
To unsubscribe, e-mail: [EMAIL PROT
llo
Try to had at the begining of your jsp.
Julien
2007/5/22, Mansour <[EMAIL PROTECTED]>:
I can not get datetimepicker to work.
Here's my Code:
and here's the html output:
dojo.require("dojo.widget.DatePicker");
saveFormat="rfc&qu
I am trying to use dateTimePicker on one of my pages. When ever it pops
out it shows in a new page (header, footer, navigation .. etc). As if
it's another page by its self. I am using siteMesh in my project and
it's using the layout for the rest of the pages. I thought may be I am
doing somethi
OK, I don't need the solution. All I need is a suggestion and I'll try
it my self.
Mansour wrote:
I am trying to use dateTimePicker on one of my pages. When ever it
pops out it shows in a new page (header, footer, navigation .. etc).
As if it's another page by its self. I am
It was the matter of cleaning the cache. :/
what a time waste ! >:|
Mansour wrote:
OK, I don't need the solution. All I need is a suggestion and I'll try
it my self.
Mansour wrote:
I am trying to use dateTimePicker on one of my pages. When ever it
pops out it shows in a new
Do I need to use or configure spring to get executeAndWait interceptor
working ?
if yes, is there ant pointers or documentation ?
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Dave Newton wrote:
--- Mansour <[EMAIL PROTECTED]> wrote:
Do I need to use or configure spring to get
executeAndWait interceptor working ?
Don't know why you would.
Because that's the only thing i didn't try.
Did you look at the examples in showcase?
This
Dale Newfield wrote:
Mansour wrote:
This was the first thing I did. The waiting page stays, and the
results are never shown unless I hit refresh.
That's appropriate, except that a meta tag in the head of the page
should cause your browser to automatically refresh.
Something like:
ite
refresh themselves every 5 seconds ?
Do You have a way around this ?
Mansour wrote:
Dale Newfield wrote:
Mansour wrote:
This was the first thing I did. The waiting page stays, and the
results are never shown unless I hit refresh.
That's appropriate, except that a meta tag in the he
:
Mansour wrote:
I thought this will be generated automatically by FreeMaker iif you
don't provide your waiting page, according to the documentation.
It should be. When I first started using execAndWait it generated the
page for me automagically, but then later I wanted to tailor the
content,
By the way, why did you include the action in the wait page ?
namespace=""/>"/>
Mansour wrote:
Dale:
That worked just like magic. Thank you.
I was about to create page for wait.jsp that looks exactly like the
mainLayout.jsp and exclude the wait.jsp from the decora
Is there any way to get a behavior like post back in struts?
If not, is there any interest in writing an interceptor that will
emulate this ?
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL
I am trying to setup a value in my session. IT works the first time I
call the action, and breaks the second time.
I get null pointer exception. This code is from my constructor.
Map session = ActionContext.getContext().getSession();
if (session.containsKey("InvoiceManager"))
I think you are asking about the taglib difinition so that you can use
tabletags.
If this is the case, you need to include the jar file in your
WEB-INF/lib and then add:
<%@ taglib prefix="tt" uri="/tabletags"%>
in your jsp.
amir nasr wrote:
Hello All
Is there any body who knows how can i
I found out what I was looking for:
http://struts.apache.org/2.0.6/docs/how-do-we-get-access-to-the-session.html
but still wondering why would ActionContext.getContext().getSession()
returns a session the first time it's called then it returns null?
Mansour wrote:
I am trying to se
I followed the dox and created an Action that implements SessionAware. I
set a break point and found the setSession is never called. Can someone
explain please?
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional comma
OK,
Here's what I was to get so far.
I need to store and retrieve EntityManagers in the session Map.
I am using action chaining. Action 1 can get the session using
ActionContext.getContext.getSession(). However, action 2 always returns
null. To make things easier for myself I created a Top Level
Thank you Dave for replying. I think I need a lot of help on this.
The problem is even if I implement SessionAware, using chaining doesn't
work as the setSession method is never called.
Dave Newton wrote:
--- Mansour <[EMAIL PROTECTED]> wrote:
Still this didn't help. i
the Action constructor.
I am not sure if this was my mistake. I would like to hear form some one.
By the way, can I save models on the ValueStack rather than the session ?
-- Paul
On 5/26/07, Dave Newton <[EMAIL PROTECTED]> wrote:
--- Mansour <[EMAIL PROTECTED]> wrote:
> Tha
Which version of struts are you using?
Yoni Amir wrote:
Hello,
I am working on my first struts application, and I was wondering about
design patterns for communicating between actions.
For example, I have actions A and B. A runs first and creates some
data (e.g.,
a session bean). When B runs,
Yoni Amir wrote:
Hello,
I am working on my first struts application, and I was wondering about
design patterns for communicating between actions.
For example, I have actions A and B. A runs first and creates some
data (e.g.,
You have few opions here, you can you action chaining:
http://struts.
yitzle wrote:
Hi all.
I'm a Struts Newbie here, so I apologize for the stupid question ;)
I'm working on making a fairly large Struts project.
Most data will be passed from one page/JSP to the next.
The login info has to be available on the server at every action.
How do I make a session bean or
Hello every one:
I am trying to access my business layer from Actions. However, I need
to hold a reference to the business layer facade and access it from any
Actions classes. I am saving the reference to servicesFacade in a
session and retrieving it in the Action. I am having no problem with
Hello every one:
I faced this problem and posted it, and never get any thing back. I have
a page that displays dateTimePicker. When the dateTimePicker pops up it
spans the whole page and is displayed in a newpage with header, footer
and navigation bar !
This issue appears sometimes then it disa
widget. The latter is easy to do.
Use the web developer plugin to manipulate the CSS while the popup is
displayed to see if that's the problem.
[1] https://addons.mozilla.org/en-US/firefox/addon/60
Mansour wrote:
Hello every one:
I faced this problem and posted it, and never get an
Jeromy Evans wrote:
Mansour wrote:
Where can I find this folder
struts/dojo/src/widget/templates/DatePicker.html ?
In tomcat work ? In /tmp ?? I searched the wholefile system to check
where does it come from and couldn't find any thing. I understand it
come in the jar files, but before t
I am saving objects in the session. After the browser closes I would
like to clean the remaining junk. How do I achieve this ?
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
s the server every 5
minutes. Each ajax request made by the JavaScript will reset the session
timer on the server.
On 6/5/07, Mansour <[EMAIL PROTECTED]> wrote:
I am saving objects in the session. After the browser closes I would
like to clean the remaining junk. How do I a
santhu123 wrote:
how can i call a struts action classes without pressing the submit button in
a page
Can you give more details? example ??
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL
I am able to submit, and I can see the results back. However, the
results are not inserted into the DIV and replacing the old contents.
It's inserted just before the old contents.
href="%{ajaxSubmit}" theme="ajax" notifyTopics="/updateOrSave"
targets="tasksDIV" />
The new resu
s"%>
it run correctly ,
any suggestion.
Bye.
Mansour <[EMAIL PROTECTED]> wrote: I think you are asking about the taglib difinition so that you can use
tabletags.
If this is the case, you need to include the jar file in your
WEB-INF/lib and then add:
<%@ taglib prefix="tt&q
N 1-59059-695-1)
and "JavaScript, DOM Scripting and Ajax Projects"
(2007, Apress, ISBN 1-59059-816-4)
Java Web Parts - http://javawebparts.sourceforge.net
Supplying the wheel, so you don't have to reinvent it!
Mansour wrote:
Hello every one:
I am trying to access my business layer
I am trying to convert a string into an Object. I can not find
documentation on how to implement the StrutsTypeConverter.
The documentation says:
To create a type converter one would need to extends StrutsTypeConverter.
public class MyConverter extends StrutsTypeConverter {
public Object con
Seriously, no one can answer this one?
OK, the DIV is not updating at all now. Do i need to use JS to manually
set the content of the DIV ?
Shouldn't it update auto magically?
Mansour wrote:
I am able to submit, and I can see the results back. However, the
results are not inserted int
I can see expected out put coming back. And when I view the page source
it's even there in the right place but not rendered on the browser!
On both FF and IE
Mansour wrote:
Seriously, no one can answer this one?
OK, the DIV is not updating at all now. Do i need to use JS to
manuall
inspector.
On 6/15/07, Mansour <[EMAIL PROTECTED]> wrote:
I can see expected out put coming back. And when I view the page source
it's even there in the right place but not rendered on the browser!
On both FF and IE
-
ating the contents of the tbody and
never dispalyed.
When I moved the form tag to surround the whole tasks page it worked
fine. SO this is the new code:
.
Musachy Barroso wrote:
Well, that's all Struts will do, insert the html in the target element
musachy
On 6/15/0
Hello every one:
This question may seem of topic. The reason I am asking this here is
because I am sure some one faced this problem when dealing with struts
and can provide an advice.
I have many objects that are mapped using hibernate to a DB. I need to
update one of these objects (lets call
epends mainly on the complexity of your
entities and the separation of concerns you require.
OK, that's what I have in my business layer. Tere's a facade for my
business layer. The actions can obtain a reference to this facade
through the session by implemeting SessionAware.
I really appreci
Jeromy Evans wrote:
Mansour wrote:
An alternative approach is that you don't allow persistent entities
to be modified within your actions whatsoever and all updates are
applied behind a service layer that performs reattachment and updates.
How do I do this (reattachment and up
Hello every one:
I couldn't find an answer to this simple question on struts doc site.
I need to modify the template for the submit button and remove the
tag surrounding it in ajax theme.
I extracted submit.ftl from struts jar (I am using 2.0.6). Did the
modification I need, and now can not ref
From the documentation
http://struts.apache.org/2.0.8/docs/ajax-tags.html#AjaxTags-submitTag
If the submit button is used inside a form (href is not required on this
case), the form will be submitted asynchronously:
This is note true. It can never submit from inside a form. This will
never a
this page.
Musachy Barroso wrote:
http://cwiki.apache.org/WW/extending-themes.html
musachy
On 6/23/07, Mansour <[EMAIL PROTECTED]> wrote:
Hello every one:
I couldn't find an answer to this simple question on struts doc site.
I need to modify the template for the submit butto
Dave Newton wrote:
--- Mansour <[EMAIL PROTECTED]> wrote:
If the submit button is used inside a form (href is
not required on this case), the form will be
submitted asynchronously:
This is note true. It can never submit from inside a
form. This will never anything. It will neve
Dave Newton wrote:
--- Mansour <[EMAIL PROTECTED]> wrote:
How do I know if there is traffic on the wire?
Use Live HTTP Headers, Firebug, Ethereal, etc.
I used Live HTTP Headers, and there's nothing on the wire. There's no
request.
Did you say that the action
would like to update and save
through an action. The second and third items are firing a request but
not the first one. They are all generated in a loop and have the same code !
Mansour wrote:
Dave Newton wrote:
--- Mansour <[EMAIL PROTECTED]> wrote:
How do I know if there is tra
Dave, the generated IDs are correct. There's the resulting HTML , I dont
see what's wrong with this.
Task Id
Service Name
Unit Count
Rate/Unit
cost
Dave Newton wrote:
--- Dave Newton <[EMAIL PROTECTED]> wrote:
This should cause a form ID collision, which shows a
debug msg, since you'll have multiple forms with the
same ID.
Whoops, didn't see you were iterating over tasks,
which presumably have an ID, so I assume the form IDs
are b
lly and obvious, but using code almost identical to yours (I don't know
how your Action is configured or implemented) I'm having no problems.
d.
- Original Message
From: Mansour <[EMAIL PROTECTED]>
To: Struts Users Mailing List
Sent: Sunday, June 24, 2007 2:06:44 PM
Subj
nd
a duplicate ID that may have caused the collision reported.
Dave Newton wrote:
--- Mansour <[EMAIL PROTECTED]> wrote:
I have deleted the whole folder for the templates.
Did you clear your browser cache?
Did you try to iterate over a list and create a form
Dave Newton wrote:
Is there anything else in your action (an action
property) called "id"?
NO, there's no property called id, but there's are many ids for other
beans (I.E. invoice.id , task.id ...etc).
--- Mansour <[EMAIL PROTECTED]> wrote:
This is fun
This problem is really odd. All the items in the list posts to the same
action, and all the code was generated in loop. HOW can this happen ?
all the submit buttons can submit a request except the first one in the
list!
There's no js event fired !!
Mansour wrote:
Dave Newton wrote
Dave Newton wrote:
--- Mansour <[EMAIL PROTECTED]> wrote:
Btw, I would change this to (minus whatever syntax /
attribute name errors I'm about to make):
...
Cleaner, shorter, and better-formed JSP.
d.
I agree with you. But Now I am gonna remove this t
kup.
- Original Message
From: Mansour <[EMAIL PROTECTED]>
To: Struts Users Mailing List
Sent: Sunday, June 24, 2007 7:02:31 PM
Subject: Re: Submitting a form with ajax submit inside the form
Dave Newton wrote:
--- Mansour <[EMAIL PROTECTED]> wrote:
would the other items in the list generate an event ?
Any way, I will try to modify the html template and try again.
- Original Message ----
From: Mansour <[EMAIL PROTECTED]>
To: Struts Users Mailing List
Sent: Sunday, June 24, 2007 7:37:34 PM
Subject: Re: Submitting a form with ajax s
Dave Newton wrote:
--- Mansour <[EMAIL PROTECTED]> wrote:
Dave Newton wrote:
Probably because the HTML being generated was
invalid; isn't that why you were trying to
customize
the form tag templates?
No, not really. I was trying to customize it so that
I
Dave Newton wrote:
From: Mansour <[EMAIL PROTECTED]>
And here's the result:
That's still not valid HTML; now you have a form and table immediately after a
table tag.
d
I guess in this case I have to modify the form tag and remove this tag
, right
I am trying to extract an int in the prepare method. I am not able to
cast it. This is an example of what I am trying to do:
Map parameters = ActionContext.getContext().getParameters();
Integer task_id = (Integer) parameters.get("task.id");
I wanna try to avoid using Type conversion.
This
Dave Newton wrote:
--- Mansour <[EMAIL PROTECTED]> wrote:
I am trying to extract an int in the prepare method.
I am not able to cast it. This is an example of
what
I am trying to do:
Map parameters =
ActionContext.getContext().getParameters();
Integer task_id = (I
I am trying to iterate over a list and display rows in different style:
...
The resulting code have the class attribute always empty. Like this :
Can any one advice what's wrong ?
-
To unsubscribe, e-mail: [EMAIL
I have been try for few days to create a table that displays data in a
grid layout. This table enables the user to edit and update the data
using AJAX. I am struggling with this with out any luck so far. Can any
one recommend a link or tutorial or at least a hint about doing
something similar
I have been playing with struts for few month and I am comfortable with
it now. One thing I keep on hear, and couldn't manage to understand what
it 's. Many sites and articles compare struts and describe it as an
action based. I know it uses actions but how does this make it better
that event b
Can we use OSUser http://www.opensymphony.com/osuser/ with struts2. If
not is there any other alternatives?
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Do we have an equivalent for OSUser in struts 2?
If NO, can some one recommend a framework that helps building role based
application in an iterative way. In other words I need to build
different services, where each service is an application and deploy and
based on the user role, access is gra
Piero, Thank you. I think this is very close to what I need, if not, maybe I
can just modify it a bit.
Piero Sartini wrote:
On Saturday 07 April 2007 22:15:18 [EMAIL PROTECTED] wrote:
Now since it looks like I am running into compatibility issues, is there
any alternative for this tag lib
Hello Every one:
I have been working on a small application for few days. Just to learn
by doing, how Struts 2 works, and how to design applications for struts
2. My little app is a small billing system to store invoices for
accounts. Each Service (object) belongs to an Invoice which belongs to
Mansour wrote:
Hello Every one:
I have been working on a small application for few days. Just to learn
by doing, how Struts 2 works, and how to design applications for
struts 2. My little app is a small billing system to store invoices
for accounts. Each Service (object) belongs to an Invoice
I am trying to perform some operation on an object, Therefore I need to
pass to the action the object id and the parameters to add for the
operation. I need to set these values before the request reaches the
action class. Do I do this in the interceptor, or just implement
Preperable and Servle
I don't understand this part. Is this list only for advanced users?
No wonder Struts 2 has a small community and poor documentation.
Mansour wrote:
I am trying to perform some operation on an object, Therefore I need
to pass to the action the object id and the parameters to add fo
Thank you Dave:
Dave Newton wrote:
--- Mansour <[EMAIL PROTECTED]> wrote:
I don't understand this part. Is this list only for
advanced users? No wonder Struts 2 has a small
community and poor documentation.
Dude. It's Saturday. Some of us do other things
besides
Dave Newton wrote:
--- Mansour <[EMAIL PROTECTED]> wrote:
I didn't know that I can use hidden fields to pass
objects back.
You can't. All you can get back from an HTML form is a
string. That's just the way HTML works.
In other words, you mean what ever goes
Dave Newton wrote:
--- Mansour <[EMAIL PROTECTED]> wrote:
I thought there's a way like .net of jsf to store
the
object in the session and retrieve when needed.
Of course you can store an object in the session. You
didn't say you wanted to.
As I said, without any informa
I am accessing the DB using JDBC.
Adam Ruggles wrote:
How are you accessing the database? JDBC, Hibernate, Another ORM
solution?
Mansour wrote:
Ok Dave:
you are really helping me a lot. I think I'll have to explain to you
exactly what I am doing, and you give me an advice about how
the logic in it's
place. I will do my best not to put any data access code in the action.
The only things you should put into a session are thing that usually
don't change very often and are session specific.
How do I resolve this then ?
Mansour wrote:
I am accessing t
Adam Ruggles wrote:
Based on your posts I get the idea you don't understand how the MVC
pattern works. I'll try to describe what should be happening.
On the browser a user submits the data he/she wishes to update. That
information is then passed to the action, I prefer to do this with an
ob
1 - 100 of 130 matches
Mail list logo