you have to overwrite the toString method in class Book, and then
iterate over the List to complete the xml. somthing like this:
[...]
public String toString() {
return bookid + id + /idname + name + /name/book;
}
[...]
public String list() {
StringBuffer sb = new
you can use xstream there are quite a few tools out there can help you
achieve object-XML.
The xstream site is here http://xstream.codehaus.org/
On 6/29/07, Jorge Martín Cuervo [EMAIL PROTECTED] wrote:
you have to overwrite the toString method in class Book, and then
iterate over the List to
Hi.
I have upgraded to struts 1.2.9 and dont have validator.xml and
validator-rules.xml.
Could this be why my struts app does not work? Do I need validator? I have the
jar in my lib.
Soren, DK
Hi,
If you have used the validator plug-in in you struts-confg, you need these 2
files, i dont think its a must if you havent used the plug-in
Thanks,
Nuwan
- Original Message -
From: Søren Blidorf [EMAIL PROTECTED]
To: Struts Users Mailing List user@struts.apache.org
Sent:
Thanks Jeff and Gorka for the competent (and fast) replies!
if you are using Struts there is a transparent solution
for that: HDIV
It sound very interesting. I will sure have a closer look at it. Thanks
for the great reference!
The rule of web applications (heck...all multi-tiered apps) is
Hi All,
I am using struts 2.0 for the first time. what i undersatnd is we have
actionname-validation.xml file where in we define the validation rules.
In my current project i am having one action class called
ApplicantAction.java where i have defines two action methods for two
separate form
Hi,
Someone knows how to set a blank before a label of a select tag?
State:
and not
State:
the label value is read from a configuration file
And more, how to have the label without the : character?
State
Thanks for a kindly reply!
--
View this message in context:
You can set set up specific validation for specific methods
eg actionname-actionnamemethodname-validation.xml
Have a look at the mailreader application there are examples.
Regards
Dave.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: 29 June 2007 11:14
To:
Hi,
Try to add a nbsp; infront of the label and see, i havent dont it but just
give a try.
You can remove the : just edit the select tag template, i think is in the
controlheader-core.ftl file, but not sure :)
Thanks,
Nuwan
- Original Message -
From: TonyD [EMAIL PROTECTED]
To:
Hi Angelo,
thanks for your help . I am using the JSPTagControl in my JSP as:
jsptabcontrol:tabControl name=PERSONNE_TABCONTROL
width=800px
height=100%
jsptabcontrol:tabPage name=IDENTITY_TABPAGE
But then that means that my tabbed JSP would have code for all the tabs
..How does it identify which tab code to open ??
WongTseng [EMAIL PROTECTED]
06/29/2007 05:28 PM
Please respond to
Struts Users Mailing List user@struts.apache.org
To
Struts Users Mailing List user@struts.apache.org
cc
The action which is mapped to the url status.do should forward to the jsp in
which you have used the JSPTagControl. In this way several actions can share
a single tabbed jsp. So don't put the content of the a tab in a separate
jsp.
2007/6/29, Kavita Mehta [EMAIL PROTECTED]:
Hi Angelo,
thanks
I already tried nbsp; it doesn't work.
controlheader-core.ftl isn't a project file but a struct file, I need this
functionality only for by project not for the other projects.
I hope to find something else about my first problem, thankyou for the
reply.
nuwan chandrasoma-2 wrote:
Hi,
Hi
thank you Wong dor your response. You have right.
So in your url you must add parameter tabPageInputHiddenName into url like
this :
/status.do.do?tabPageInputHiddenName_PERSONNE_TABCONTROL=ADRESS_TABPAGE
I have explain it at
Hi All,
As there is no concept of Action form beans in struts 2.0 we have to define
the field attributes in the Action class.
I am using the same action class for two form submission, is there any way
of configuring form beans to this actions.
For example if my first form has fields name,
--- TonyD [EMAIL PROTECTED] wrote:
I already tried nbsp; it doesn't work.
Do you literally want a single space before each of
your labels? You might be better served using CSS.
controlheader-core.ftl isn't a project file but a
struct file, I need this functionality only for by
project not
--- [EMAIL PROTECTED] wrote:
is there any way of defining this fields attribute
in two separate bean classes and configure with the
appropriate action?
Use regular JavaBeans and use the appropriate bean in
the JSP form and configure validation for each
bean/method combination.
That's a
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Søren,
Søren Blidorf wrote:
I have upgraded to struts 1.2.9 and don't have validator.xml and
validator-rules.xml.
validator-rules (in the 1.2 branch) somewhat recently moved into the
struts-core.jar file. You should change your plug-in property to
--- [EMAIL PROTECTED] wrote:
In the action class i defined a attribute called
public PersonalDetailForm getForm() {
return form;
}
public void setForm(PersonalDetailForm form) {
this.form = form;
}
PersonalDetailForm form;
and the jsp looks
Hi Dave,
Thanks for your reply.
I tried defining a java bean as below
public class PersonalDetailForm implements Serializable {
String name;
String dob;
String city;
public PersonalDetailForm() {}
// also defined all the getter setter methods
}
In the action class i
I've used to doing something like this in Ruby on Rails:
if @object.updateAttributes(params[:object])
flash[:notice]=Update succesful!
redirect_to :action='list'
else ...
Now that I'm using Struts 2 for a project I tried doing something similar:
try {
objectService.save(getObject());
Thanks David it worked...
Dave Newton
[EMAIL PROTECTED]
o.com
A good article is up right now on JavaWorld.com that addresses some of
Struts' best practices.
http://www.javaworld.com/javaworld/jw-09-2004/jw-0913-struts.html
Sean Conlon
Credera
www.credera.com
Direct: 972.692.0010
Mobile: 254.644.3587
[EMAIL PROTECTED]
The Power of Perspective
Hi,
I am new to struts. I am using struts 1.3.8 for my project. Where can
I found the appropriate best practices to maintain while devlopment. I found
lot of material while browsing but wasn't able to figure out which was the
good one.
My doubt is I am using a bean for every oracle
I am trying to develop my first web application.
For authentication and authorization, I choose JAAS and followed this guide
http://www.mooreds.com/jaas.html http://www.mooreds.com/jaas.html
I am also using Struts as my MVC. I am having trouble implementing
authorization, though. As far as
Thanks for the Article. I read the article, In the section of DTO he said to
use either BeanUtils copy properties or do data type convesrions in the
setter methods. I wish to handle it with dataType conversions in setter
methods and that was my doubt. I cant make two way conversion i mean from
On 6/25/07, Mansour [EMAIL PROTECTED] wrote:
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 =
I would argue against making interfaces for all your DAOs unless you
know up front that you will be creating multiple implementations. So
long as you don't make any of the methods on your DAOs static, it is
an easy matter to extract interfaces from them at a later point, when
and if you need to
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Toni,
Toni Lyytikäinen wrote:
Is there a mechanism to pass messages from actions that survive a
redirect? Or should I just put them into the users session?
The session or the URL of the target page are really the only ways to do
this.
- -chris
--- Christopher Schultz wrote:
Toni Lyytikäinen wrote:
Is there a mechanism to pass messages from actions
that survive a redirect? Or should I just put them
into the users session?
The session or the URL of the target page are really
the only ways to do this.
Take a look at the value stack via the debug tag.
Usually the property tag will keep stepping through the value stack
until a getter for the property is found (the object for the current
iteration is placed on the top of the value stack). Although, if you
are explicitly defining the object
It uses the HttpServletRequest.isUserInRole() method. One way to populate
this is with a Filter that wraps the request with an
HttpServletRequestWrapper.
(*Chris*)
On 6/29/07, wild_oscar [EMAIL PROTECTED] wrote:
I am trying to develop my first web application.
For authentication and
Exactly.
(*Chris*)
On 6/29/07, wild_oscar [EMAIL PROTECTED] wrote:
Do you mean implementing a HttpServletRequestWrapper and overriding its
isUserInRole so that it finds the user and its roles in the httpsession
(where I stored the Principals)?
Chris Pratt wrote:
It uses the
Do you mean implementing a HttpServletRequestWrapper and overriding its
isUserInRole so that it finds the user and its roles in the httpsession
(where I stored the Principals)?
Chris Pratt wrote:
It uses the HttpServletRequest.isUserInRole() method. One way to populate
this is with a
I have an application using S1, S2, and other component layers, all of which
use Locale. At application startup, the InitializerFilter reads the user's
previously stored Locale preference from a cookie. Then we are saving the
Locale in the session. It works very well except for one glitch.
Hello,
My struts1 app is using sslext for https switch. How to upgrade it to struts2?
Thanks,
peter
-
Building a website is a piece of cake.
Yahoo! Small Business gives you all the tools to get online.
Hi,
I'm trying to implement a Poll register form.
The Poll object have PollOptionList pollOptions; property.
How should I show pollOptions in my form, in way that struts can bind the
data with my PollAction.poll property?
I've tried this, but it's not binding:
@s.textfield name=poll.name /
Another option would be to convert your List to an XML Document
or Node object in your action.
public org.w3c.dom.Node list() {
// create XML books Document
// iterate through list adding book Nodes to it
return booksNode;
}
From reading the javadoc in the
hi
you are welcome. it's every body's right. But it seems your right to think
other people are making noise of dor like an insect.
2007/6/29, Angelo zerr [EMAIL PROTECTED]:
Hi
thank you Wong dor your response. You have right.
So in your url you must add parameter tabPageInputHiddenName into
On the tutorial says that the framework automatically populates the
action beans. How does the framework do this? Is there a way to tweak
the way it populates the the beans?
For example if a user sends a number and I, for a strange reason would
like to pupulate the bean with twice that number,
Complete example here
http://forums.opensymphony.com/thread.jspa?threadID=50841tstart=0
M--
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed. If you have received this email message in
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 some problems validating a form with validator framework under
struts 1.3.
After submitting, it forwards to success page even if the fields
were not filled properly.
(No exceptions are thrown).
Here's some of my code:
STRUTS-CONFIG.XML
form-beans
...
form-bean
I'm using Struts 2 - I have an action class that implements the SessionAware
interface. How do I invalidate the session? I dont see any invalidate()
method there. Is just calling session.clear() enough? Does that just remove
entries from the session map or does it call the invalidate() method on
--- Ramon Xuriguera i Albareda wrote:
VALIDATION.XML
formset
form name=subjectForm
FORMBEAN (SubjectForm.java)
It extends ValidationActionForm
Subclassing ValidationActionForm means that the form
name attribute in validation.xml would be the action
path, not the bean name. You want
--- Srinivas.N. [EMAIL PROTECTED] wrote:
How do I invalidate the session?
You'd probably need to implement ServletRequestAware
[1] and get the session from the request.
and get the session from there.
You could use ServletActionContext [2] but that might
have a negative impact on testability;
I'm not sure if I completely understand what exactly you are trying to do, but
on the Bean, why not just have something like this:
public void setUserInput(Long num){
this.userInput = num * 2L;
}
If this does not help, please give more information.
- Sean
That magic starts happening in
http://struts.apache.org/2.0.8/struts2-core/apidocs/com/opensymphony/xwork2/interceptor/ParametersInterceptor.html
ParametersInterceptor . Take a look at the javadocs and source to see how
its done. You could then extend the class or write a new interceptor which
48 matches
Mail list logo