-
1. Re: T or F? - <s:link/> in dataTable must use @DataModel or
pmuir Oct 23, 2007 10:35 AM (in response to jfrankman)True. You've got something weird going on with your commandLink approach - that doesn't inject the datamodelselection using @In either.
-
2. Re: T or F? - <s:link/> in dataTable must use @DataModel or
jfrankman Oct 23, 2007 10:43 AM (in response to jfrankman)I don't use the h:commandLink in conjunction with the @DataModel or @DataModelSelection. I just use a regular @In annotation in my session bean:
@In(required=false,value = "lineItem") @Out(required = false, value = "lineItem") private ClientTransmittalLineItemVO clientTransmittalLineItemx;
I also wrap my data table inside of a form. Is this a valid approach? -
3. Re: T or F? - <s:link/> in dataTable must use @DataModel or
pmuir Oct 23, 2007 10:45 AM (in response to jfrankman)No.
-
4. Re: T or F? - <s:link/> in dataTable must use @DataModel or
jfrankman Oct 23, 2007 10:56 AM (in response to jfrankman)Do you mean
A. "No", this should not work there is still something weird going on
or
B. "No", I should not be doing it this way even if it does work.
If "A" I would like to figure out way it still works. Unfortunately, we hired an overpriced and under-qualified consultant and he showed us to do it this way. I only came across the @DataModel recently and am still experimenting with it.
If "B" should I assume that I should always use @DataModel or RESTful for clickable lists?
Thanks for your input. -
5. Re: T or F? - <s:link/> in dataTable must use @DataModel or
pmuir Oct 23, 2007 12:00 PM (in response to jfrankman)I was answering your question
Is this a valid approach?
No
So A & B. I have no idea why it works, I suspect some magic glue code somewhere somewhere else.
I would recommend to always use the restful approach. -
6. Re: T or F? - <s:link/> in dataTable must use @DataModel or
jfrankman Oct 23, 2007 12:28 PM (in response to jfrankman)Ok. Thanks again for your input. One more clarification: Are you saying that I should always use a RESTful approach no matter what, or do you still recommend using @DataModel for some situations.
BTW, By RESTful I assume you mean to inject only the object's id and look it up again on the server side. If I misunderstand the term let me know. -
7. Re: T or F? - <s:link/> in dataTable must use @DataModel or
pmuir Oct 24, 2007 5:49 AM (in response to jfrankman)Restful = page parameters. This would always be my approach assuming you don't mind passing the object's identifier to the client.
-
8. Re: T or F? - <s:link/> in dataTable must use @DataModel or
jfrankman Oct 24, 2007 9:53 AM (in response to jfrankman)Ok. It is little more work to do it this way, but I think it is much simpler to understand and diagnose if something goes wrong. I notice that the seam-gen always generates the code this way. If I do go with the RESTful approach then there isn't any need for the @DataModel, right?
-
9. Re: T or F? - <s:link/> in dataTable must use @DataModel or
mheidt Oct 24, 2007 1:08 PM (in response to jfrankman)I'm in search for a best practice as well.
My problem is the following.
Assume you have a datatable like jfrankman.
I already implemented the delete operation with this extended-EL feature by passing the row-variables...in this case lineItem.
But now I'm stuck with the update. The variable passed to the action-method only holds the old value, at least the Clob (the only editable field) is still null.
Then I tried the Injection...still holding the old value.
What is the seam-way to do it?
I don't want to code a lot of actionListeners for all column-fields... -
10. Re: T or F? - <s:link/> in dataTable must use @DataModel or
mheidt Oct 25, 2007 9:04 AM (in response to jfrankman)The issue was the clob.
A string field was being passed as extended EL-parameter.