Dear All,
I have a form which is master-detail type containing customer information as
master and also warehouse information as detail. For one customer it may
contain more than one warehouse.
The Customer model class is as follows:
package model;
:
:
public class Customer {
Hi,
since your customer's data are in session, i think you can use the
session scope to display these data for the warehouses. Otherwise, you
can also use hidden fields for warehouses data to simulate an input but
don't use these data in your action if your use case is not meant to
update
i want to display activities dynamically which can be increase or decrease on
struts 2 framework and that depend on the Locale (like English or French) .
dynamically means user can be expend or collapse (add or delete) activity at
run time.
I have two properties file:
messages.properties:
Hi cellterry:
I think your problem is very general.
What you need is a chance to reload some data, when the
validation get failed and the page is displayed again.
I think this document can help you:
http://struts.apache.org/2.2.1/docs/inputconfig-annotation.html
Another solution is:
1, Implement interface [ValidationWorkflowAware] in your Action class
2, In method [getInputResultName], you can load all the data you need,
and then, return constant [INPUT] as the result name.
Actually, In my application, I am using this solution in a little different
By the way, you can read source code of
[com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor] to
see how these 2 solutions get work.
-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands,
I would not mix tag directive with action logic.
Why don't you simply put localization keys inside ListItem value and
after retrieve your localized values inside through struts tags?
For example:
arraylist.add(new ListItem(Activity, activity.name));
s:text name=%{getText(activity.name)}/
or
Thank you.
This helps to solve the problem,, Li Ying.
Terry.
Li Ying-2 wrote:
Hi cellterry:
I think your problem is very general.
What you need is a chance to reload some data, when the
validation get failed and the page is displayed again.
I think this document can help you:
Hi All,
I have a generic question about Struts2Interceptor,since Struts2 is itself
in term of Interceptor and most of the required interceptors are there
placed.
My question is how many of us are using custom Interceptor which are there
in production enviornment.my idea is to get some broad
couldn't get the Post-Redirect-Get (PRG) working. The result
type=redirectAction does not translate into a browser redirection.
I've tried to debug the code, and only could find following method
implementation, that suggest me that an http redirection
_is_not_supported_:
package
I don't think I've deployed an app without at least one or two custom
interceptors.
On Tuesday, October 12, 2010, aum strut aum.str...@gmail.com wrote:
Hi All,
I have a generic question about Struts2Interceptor,since Struts2 is itself
in term of Interceptor and most of the required
Ugh, implementing Prepareable seems more palatable to me than throwing
the same logic into somethingnthat returns the inputnresult name.
Dave
On Tuesday, October 12, 2010, cellterry cellte...@gmail.com wrote:
Thank you.
This helps to solve the problem,, Li Ying.
Terry.
Li Ying-2 wrote:
Every app I've written has custom interceptors (and of course custom
interceptor stacks).
Don't fear interceptors, they are your friends.
On Tue, Oct 12, 2010 at 12:17 PM, aum strut aum.str...@gmail.com wrote:
Hi All,
I have a generic question about Struts2Interceptor,since Struts2 is itself
At Preparable timing it does not have the customer data (customer=null) so
that I cannot retrieve warehouse information by customer ID.
Terry.
Dave Newton-6 wrote:
Ugh, implementing Prepareable seems more palatable to me than throwing
the same logic into somethingnthat returns the
I am truely agree but can give me some example where you have applied them
just to get me an idea may be lacing imagination this time
:)
On Tue, Oct 12, 2010 at 10:40 PM, Greg Lindholm greg.lindh...@gmail.comwrote:
Every app I've written has custom interceptors (and of course custom
It does if you use the prepare params prepare stack.
On Tuesday, October 12, 2010, cellterry cellte...@gmail.com wrote:
At Preparable timing it does not have the customer data (customer=null) so
that I cannot retrieve warehouse information by customer ID.
Terry.
Dave Newton-6 wrote:
Hello,
I'm using an action which implements the ModelDriven interface where my
model is a hibernate POJO (e.g. Customer). In this Customer I have a
OneToMany relationship with another hibernate POJO (e.g. Address)...
/** persistent field */
@OneToMany(mappedBy=customer,
I don't know about sets; personally I'd use a map so you actually have a way
to access them by something meaningful, like an ID. Then you use map-based
property field names (it's [] or (), with the key inside, I forget which off
the top of my head). I think () is for indexed, so I'd aim for []
Here are some that I've used in recent project:
AuthenticationInterceptor to check if user is signed in.
HibernateInterceptor to manage Hibernate session lifecycles
LoggingInterceptor for custom logging
HandsetPropertiesInterceptor for injecting properties into the request
based on User-Agent
Hi to all, i'm developing a S1 application that has a form with upload file
control. I know that, by default, when you upload a file, it stores
temporally in a temp directory that normally is web directory. I know that
after that, the file is deleted, so i wanna know if exists a way to tell
struts
Does the (temporary!!) files get deleted automatically? I though that
we have to delete it with some additional code.
Can any one make clear on this.
Also in validation part, I didn't find a way file names in the file
input box reload automatically after validation fail. It is possible to
On Tuesday, October 12, 2010, Anjib Mulepati wrote:
Also in validation part, I didn't find a way file names in the file input box
reload automatically after validation fail. It is possible to do with normal
HTML tag INPUT TYPE=file
No. That's just how browsers work; it's a security
I've generated some XML in an action, and I'd like to direct the user to
download it. It should be have as if they clicked a link pointing to the
dynamic xml, eg: /yourfile.xml .
Any pointers on how to accomplish this?
gove...@students.kennesaw.edu
That's really Helpful Greg
On Wed, Oct 13, 2010 at 12:21 AM, Greg Lindholm greg.lindh...@gmail.comwrote:
Here are some that I've used in recent project:
AuthenticationInterceptor to check if user is signed in.
HibernateInterceptor to manage Hibernate session lifecycles
LoggingInterceptor
Which version of Struts?!
Stream result if Struts 2, handle the headers and return null if Struts 1.
On Tuesday, October 12, 2010, Grant Overby
gove...@students.kennesaw.edu wrote:
I've generated some XML in an action, and I'd like to direct the user to
download it. It should be have as if
Interface [Preparable] is another choice to implement
the data loading logic.
But, in some case, the data loading logic need to access the
parameters value to know what data should be loaded.
And, unfortunately, the interceptor [prepare] is configured
before interceptor [params] in the default
You can generate your XML dynamically, and then write it to the response stream.
If you set the response headers correctly, the browser should treat
this response as a file downloading.
Code in your action looks like this:
public String execute() {
String xmlStr = generateXML();
27 matches
Mail list logo