Leon Rosenberg ha scritto:
If you want to start a project which performs a better (or more
powerful) attribute management than struts does, feel free to do this
on java.net or sourceforge (I'd even conribute some code :-)) but
don't expect it to become a part of struts anytime.
Err... maybe it
You are opening a real can of worms :-)
The reason struts (and any else framework out there) support the 4
scopes is that those are the four defined by the servlet spec, and
thus available in any container.
Of course each application may and many will have some additional
requirements. After a w
Hi all,
Leons posting about the scopes reminded me of something I have been meaning to
post.
My application is organized into logical modules, such as purchasing,banking,
credit , shoppingcart etc.
There are some variables that we have to use within a module.So,we added a new
scope to our appl
Thanks Niall for the suggestions and feedback.
Both are good solutions, and I'm looking into both of them.
Ed
-Original Message-
From: Niall Pemberton [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 04, 2007 2:54 PM
To: Struts Users Mailing List
Subject: Re: Action name vs. attribut
there are 4 scopes or visibilities/lifecycles of attributes in the
servlet/jsp world.
page : the jsp page, same as local variable in a class.
request: the duration of the request over multiple pages
session: the duration of the user session, over multiple requests
application scope: the whole web
Thanks Leon!!!
Ok I made it using the servletcontext like you have said :-), with this
servlet.getServletContext().setAttribute("objHospital", objHospital);
All works fine, even if the user made a mistake :)
One question:
1- I dont understand something about the servletContext, which is the
p
Hmm,
can you send some code?
What kind of validation do you use? Serverside or js?
I suppose it happens because the validation-whatsoever send the user
directly to use jsp bypassing the action.
If you need a quick and dirty solution, alter you preExecute method to
put the objects into the sessio
Puneet Lakhina wrote:
On 1/4/07, Bolutiwi, Olu <[EMAIL PROTECTED]> wrote:
Hi all, I have the same issue.
I am selecting a list of town names and ids from the database (sorted by
town name) and adding them to a TreeMap or HashMap. TreeMap sorts by
key (in this case its my ids from the databas
I should have said this first, but why are you calling "makeWidgets"
directly? Dojo takes care of that, and if you are using S2 head svn, any
widget used on a page returned from an asynchronous call will be loaded
by S2 automatically.
musachy
André Faria wrote:
Thank's...
But if you call ma
Leon!!! something happen... I applied your solution putting the objects in
the request in the preExecute method of the base action, and all works
fine, but... when the user made a mistake, for example leave a required
field in blank, and the ActionErrors validate method of the ActionForm
return
Thank's...
But if you call makeWidgets() again the input buttons out of the div
that uses ajax tags will be added to the dojo lisneters again, and when
you click in a button they will be execute the same number of post that
you executed makeWidgets...
Musachy Barroso escreveu:
If you set "e
On 1/4/07, Edward Song <[EMAIL PROTECTED]> wrote:
Hi all,
STRUTS 1.2
Got a quick question on the Action "name" and "attribute" properties
name - The name of the form bean associated with this action. This value
must be the name attribute from one of the form-bean elements. This
attribute is
On 1/4/07, Bolutiwi, Olu <[EMAIL PROTECTED]> wrote:
Hi all, I have the same issue.
I am selecting a list of town names and ids from the database (sorted by
town name) and adding them to a TreeMap or HashMap. TreeMap sorts by
key (in this case its my ids from the database) and HashMap messes u
From: Sébastien LABEY [mailto:[EMAIL PROTECTED]
> I know that getParameters().get("myParamater") returns an array of
> objects,
> but isn't it supposed to return not only String[], but arrays of
> Objects
> depending on the type described (if described) for the parameter
> through
> getter and sett
Hi Dave,
Thanks for your answer.
I know that getParameters().get("myParamater") returns an array of objects,
but isn't it supposed to return not only String[], but arrays of Objects
depending on the type described (if described) for the parameter through
getter and setter in the action : if getId
If you set "executeScripts" to "true", in the submit tag, you can put a
javascript section in the returned page, and it will be executed, like:
makeWidgets();
There is an example if this in showcase, in the remote div section.
regards
musachy
André Faria wrote:
I have a problem with Dojo
I have a problem with Dojo in Struts 2.
When the page loads a method dojo named makeWidgets is called, that
method searchs for the dojo widgets and attach the necessary events to
dojo listeners.
Example:
Div 1
href="%{ajaxTest}"/>
the ftl adds some dojo notations dojoType, etc...
The method on
Hello.
When I try to define the following typed variable on a page, I get a
ClassCastException:
Looking at the generated servlet code, the error occurs at this line:
totAquisicao = (java.lang.Double)
_jspx_page_context.findAttribute("totAquisicao");
What am I doing wrong or missing?
Tha
From: Bolutiwi, Olu [mailto:[EMAIL PROTECTED]
> I am selecting a list of town names and ids from the database (sorted
> by town name) and adding them to a TreeMap or HashMap. TreeMap sorts
> by key (in this case its my ids from the database) and HashMap messes
> up the sort order.
>
> How can
Quoting "Bolutiwi, Olu" <[EMAIL PROTECTED]>:
> How can I use a collection that supports key & value, keep it sorted
> and
> use it in my html:select without messing up the sort order.
You can make your keys comparable [1] or put your results in a
collection that does not try to re-sort them.
[1
Hi all, I have the same issue.
I am selecting a list of town names and ids from the database (sorted by
town name) and adding them to a TreeMap or HashMap. TreeMap sorts by
key (in this case its my ids from the database) and HashMap messes up
the sort order.
How can I use a collection that supp
Dave Newton wrote:
From: Ranjan Kumar Baisak [mailto:[EMAIL PROTECTED]
Is there any way to sort all the elements while using html:select?
Sure; sort the collection before you use it in html:select.
Dave
-
To unsubscr
From: Ranjan Kumar Baisak [mailto:[EMAIL PROTECTED]
> Is there any way to sort all the elements while using html:select?
Sure; sort the collection before you use it in html:select.
Dave
-
To unsubscribe, e-mail: [EMAIL PROTECTED
Hi,
Is there any way to sort all the elements while using html:select?
-R
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Hi Andrew,
I ran into similar problems. Anoter developer on
the team wrote a tag. It extracts the paging
information and goes to the database table to find out
the total number of records.
The tag retrieves and displays only "the first
set" of records in accordance with the paging
spec
Making a suggestion is difficult without knowing what tools/tiers or
other specifics are involved.
Our MD4J [1] generated DAOs return implementations of a Page interface
[2] for search queries. A Hibernate-based Page implementation [3] is
also available. This serves generic memory and DB access r
For struts2 tags, checkout
https://issues.apache.org/struts/browse/WW-1569
The problem I have with displaytag is that in an effort to satisfy
everyone's needs, it is infinitely configurable. IMHO, that makes it
hard to figure out and hard to use. The other issue we had with display
tags is t
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Thorsten,
[EMAIL PROTECTED] wrote:
> However, what happens if a user logs
> in, but then submits an arbitrary id - this would enable him to see orders
> from
> other users! How can such security lacks be avoided best?
I'm assuming that you are stori
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Andrew,
Andrew Martin wrote:
> I am interested to know the ‘best’ practice for navigating through
> long lists.
I haven't used Struts-layout, so I'm not sure how my suggestion will
fit-in with your preferred display engine, but here goes, anyway.
We
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> What's the best way to avoid this situation?
Um... Store the user ID with the order # (which you should be doing
anyway) and make sure they match?
Dave
-
To unsubscribe, e-mail
From: Sébastien LABEY [mailto:[EMAIL PROTECTED]
> [...] when I use getParameters().get("id"), I receive a String[]...
"getParameters" is plural; it returns as many "id"s as it can in an array, even
if there's just the one.
Dave
---
1. encode user id in the order id you store in the db:
user-id 123
relative order-id 41
stored order-id = 123-41
this way he has no chance to request an order from another user ever,
since even he sends 51 to check for order 51 of user 456 the system
will look up for 123-51 instead of 456-51.
2.
No, I mean that I am a user and log in as usual. I can see that my orders have
id's such as 5, 10 and 42. Now I trick a little bit and send another id, say 41
(which is an order of another user), and without a check the action would show
me this order. What's the best way to avoid this situation?
Just to clarify things, do you mean another user sending your
sessionId stored in your cookie to the shop?
leon
On 1/4/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Hi,
The question I have is not purely specific to Struts, but I expect that it's a
common problem for Struts users. Suppose yo
Hi,
The question I have is not purely specific to Struts, but I expect that it's a
common problem for Struts users. Suppose you have a web application which is a
shop. You have several users, each of which can have orders, accounting
details, etc. Now a user logs in and you store the the user obje
Hi all,
I've experienced something that I think strange, but I would like to know if
it is a normal behavior.
I'm using Struts 2.0.1 with the default interceptors configuration.
I have a generic Action that implements ParametersAware (and
ServletRequestAware and SessionAware) and I have the gette
Hi all
We're facing a problem with Struts +Ajax tags for getting to specify the href
attribute in the submit tag as per given in one of the S2
documentation/tutorials.
Please refer the link http://struts.apache.org/2.x/docs/ajax-tags.html and go
to Prevent a request section where-in the guys
Hi Andrew,
I suggest using displaytag with its external paging and sorting features
http://displaytag.sourceforge.net/11/tut_externalSortAndPage.html
Gareth
Andrew Martin wrote:
I am interested to know the ‘best’ practice for navigating through long lists.
At the moment we have implemented S
I am interested to know the ‘best’ practice for navigating through long lists.
At the moment we have implemented Struts-layout for this purpose. Our
implementation currently retrieves the full dataset and uses Struts-layout
sorting and navigation pager options to navigate through the results. Ho
Hi,
After playing with it a bit with the sample portlet app on the 2.0.3
trunk code (jboss portal 2.4.1) I finally managed to pass the basic
problems (descriptors, missing JAR files: spring, dwr, spring plugin)
and now I get some strange exception that I do not understand:
..
08:
40 matches
Mail list logo