Thanks Dave,
Yes, the <s:property.../> isn't supposed to be there.... Thanks for
pointing this out. Indeed, it has to be an object there, in order to
do the remove from the collection. Since this value-type component
(entry) does not have a primary key to look it up from, I am a bit at
a loss how to continue from here.
If you don't mind, could you explain a little bit further? I have
successfully removed entity object from collections before because all
I neede was the primary key to be passed to the delete action. Then
inside the action I did the look up using the key and removed the
object. But with this type of object I have hit a roadblock.
I appreciate any further help.
This is the class:
@Embeddable
public class JournalEntry {
@org.hibernate.annotations.Parent
private GoalToAchieve goalToAchieve;
@Column(length = 255, nullable = false)
private String entry;
@Temporal(TemporalType.TIMESTAMP)
@Column(nullable = false, updatable = false)
private Date insertDate = new Date();
....plus the appropriate getters and setters..
On Sun, Jul 12, 2009 at 5:03 PM, Dave Newton<[email protected]> wrote:
> Dimitrios Christodoulakis wrote:
>>
>> I tried adding one more column like this, hoping the entry property
>> will be available to the DeleteEntry action via the mini-form.
>>
>> <display:column>
>> <s:form action="DeleteEntry">
>> <s:property value="entry"/>
>> <s:hidden name="id" value="%{goalToAchieve.id}" />
>> <s:submit value="Remove"/>
>> </s:form>
>> </display:column>
>
> What's that <s:property.../> supposed to be doing?
>
> It's not a form field; there's no entry reference being passed back. Even if
> it *was* a form field it's still not passing a *reference* back--forms
> *only* submit strings. Always. If you want an actual *entry* object there
> either needs to be some type conversion, database retrieval, etc.
>
> Dave
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]