have you got the correct cascade setting on the parent object
i use the xml files for hibernate rather than the @ syntax in java classes and
i can set cascade=all which means when i save/update the parent the children
are also saved or updated.
also remember that for hibernate to realise
Dear Adam,
I wrote a CascadeType.ALL in my @OneToMany annotation:
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
@JoinTable(name = PARENT_CHILD, joinColumns = { @JoinColumn(name =
PARENT_ID) }, inverseJoinColumns = { @JoinColumn(name = CHILD_ID) })
public SetChild
Given the model you presented in the first post, your problem seems to
be that the posted values have not the correct name for the children's
form fields. The parameters names you would need are
id
name
values[0].id
values[0].name
values[1].id
values[2].name
...
for the parameters interceptor to
Dear René
I changed my jsp page so as to integrate the following block:
s:iterator value=parent.values status=rowstatus
s:hidden name=parent.values[%{#rowstatus.index}].id value=%{id} /
s:textfield name=parent.values[%{#rowstatus.index}].name value=%{name} /
/s:iterator
which
turn on the parameterinterceptor logging and make sure as mentioned that
1) the values you expect for each child are being sent to the server (id and
name)
2) the parameter names are correct for setting each child
i had some issues getting lists of items to be updated by form submission
Dear Adam,
I just added a public Child getValues(int idx) in the Parent class definition
but it is never called.
Could u explain to me where and how can I turn on the parameterinterceptor
logging? In the struts.xml file?
thks a lot
bruno
From: apin...@hotmail.co.uk
To:
in log4j.properties file (same location as struts.xml and hibernate config
files)
add
log4j.logger.com.opensymphony.xwork2.interceptor.ParametersInterceptor=debug
this will output param name/value pairs being posted from your page.
From:
Hi All,
I am a newbee to struts and trying some hands on it. I was just trying to
develop a simple login form but getting following exception on initial run only.
-
SEVERE: Error creating form bean of
Hi All,
I am a newbee to struts and trying some hands on it. I was just trying to
develop a simple login form but getting following exception on initial run only.
-
SEVERE: Error creating form bean of
Hi All,
I am a newbee to struts and trying some hands on it. I was just trying to
develop a simple login form but getting following exception on initial run
only.
-
SEVERE: Error creating form bean of
thks adam but I got now thousand thousand of lines
I am afraid that I won't be able to read its before the end of the world in
2012..
I saw very quicky an exception at the beginning..
How can I limit this huge quantity of lines?
here is my log4j.properties file:
set the rootlogger to warn
log4j.rootLogger=warn, stdout
rather than debug
you should only get a parameterinterceptor log entry every time you post
something to the server
From: brgrandj...@live.fr
To: user@struts.apache.org
Subject: RE: CRUD
seems like form definition isn't in struts config file or properly defined
Date: Thu, 1 Apr 2010 11:45:42 +
To: user@struts.apache.org
Subject: Error creating form bean struts 1.2 + weblogic 8.1 + myeclipse 5.5
From: nanukh...@rediffmail.com
Here are exceptions I got after submitting:
Entering getProperty()
Error setting value
ognl.NoSuchPropertyException: java.util.HashSet.0
...
Entering getProperty()
Error setting value
ognl.NoSuchPropertyException: java.util.HashSet.0
at
Thks a lot Adam it is now more concise:
Setting params
Setting params id = [ 1 ]
Setting params id = [ 1 ] method:saveOrUpdate = [ Submit ] name = [ Parent1
] parent.values[0].id = [ 2 ] parent.values[0].name = [ Child2 ]
parent.values[1].id = [ 1 ] parent.values[1].name = [ Child1 ]
Here is my Child class definition:
@Entity
@Table(name=CHILD)
public class Child {
private Long id;
private String name;
@Id
@GeneratedValue
@Column(name=CHILD_ID)
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
@Column(name=NAME)
public String getName() {
so it looks like your issue is more to do with the child values not being set
by Struts
there have been a few postings about using the [] notation on field names to
get struts to assign the values properly.
in struts1 i found it worked fine, however in struts2 i've not really seen it
Hi All,
I am new to struts2 and need small help on how i can bypass calling prepare
method before any other method. In my case i am trying to call customized
method before prepare method to set some values. I did set method in my
struts.xml but it is still calling prepare(). I want this prepare
I'm trying to use the OGNL support in Struts 2.0.14 to set some parameter
values in the jFreeChart plugin's chart result type. But I keep getting
errors because it appears to be expecting all properties to be Strings, even
if the OGNL doesn't return a String. I'm using:
action
What is it that calls your customized set method? If it's form parameter
data, move the prepare interceptor below the params interceptor in your
interceptor stack.
(*Chris*)
On Thu, Apr 1, 2010 at 11:04 AM, jayakumar ala alajay...@gmail.com wrote:
Hi All,
I am new to struts2 and need small
Hi All,
I am a newbee to struts and trying some hands on it. I was just trying to
develop a simple login form but getting following exception on initial run
itself.
-
SEVERE: Error creating form bean of
---BeginMessage---
Hi All,
I am a newbee to struts and trying some hands on it. I was just trying to
develop a simple login form but getting following exception on initial run only.
-
SEVERE: Error
Hi,
I have quite complex object conversions in my actions. I usually convert
a JSON object to a struts form that I send to an action.
ListTagSet tagSetList;
Where TagSet has own List of Tags for example.
tagSetList = [{name:'ts1', tags: [{name: t1},{name: t2},{name:
t3}]},{name:'ts1', tags:
In all cases, thks a lot for helping me because I was absolutely unable to
find a solution.
I will try to test what u suggest but I must admit that I am a little bit
frustrated and disappointed with the ModelDriven interface.
I am also trying to do the same thing with Spring, I hope to be more
Extend ActionSupport or one of its subclasses, override the
prepare( ) method, to call your customized method, then call
super.prepare( ).
-Original Message-
From: jayakumar ala [mailto:alajay...@gmail.com]
Sent: Thursday, April 01, 2010 2:05 PM
To: Struts Users Mailing List
Thanks... I got to know how to handle this.
On Thu, Apr 1, 2010 at 1:21 PM, Kawczynski, David
david_kawczyn...@merck.com wrote:
Extend ActionSupport or one of its subclasses, override the
prepare( ) method, to call your customized method, then call
super.prepare( ).
-Original
Hi guys,
This is a question for Struts Tiles group.
I've created more than one layout JSP for the site as there are more that one
layout for the site. But I also want to have kind of a parent layout JSP which
has references to all global resources - like javascript files etc. How can
this be
you can get/string widths with struts-2.1.8 ChartResult
public String getWidth() {
return width;
}
public void setWidth(String width) {
this.width = width;
}
http://struts.apache.org/download.cgi
hth
Martin Gainty
Hi
I had a weird problem earlier where, if my pojo had a variable of type
Date, struts was looking for setVariable(String) instead of a
setVariable(Date) for browser locale = es_Cl. I wrote a custom type handler
to solve this problem. Now am stuck with the same problem where I have a
Unfortunately, we're not up to 2.1.8 yet. And this really struck me as more
of an OGNL problem of not being able to pass on an int as an int than a
plugin problem.
(*Chris*)
On Thu, Apr 1, 2010 at 2:29 PM, Martin Gainty mgai...@hotmail.com wrote:
you can get/string widths with struts-2.1.8
30 matches
Mail list logo