I think so.
In the final, if you want to submit any data to member of a list, the
[name] of the HTML element should be something like:
"listName[indexNumber].propertyName"
Or strust2 can not know where this parameter should be applied to.
If your code can work, the first thing should check is:
If
Actually, I have tested these sample codes before I sent it to you,
and it worked very well.
If it not working on your environment, maybe something else is getting wrong.
Does any exception message appeared?
2010/10/27 Peter Bliznak :
> Thanks for your time but what you show me is exactly what I
> Dave/Peter,
>
> Was the issue resolved due to names of methods and properties not matching?
>
> Curious,
> Ashlon
>
>
> On Tue, Oct 26, 2010 at 2:42 PM, Peter Bliznak wrote:
>
>> Yep, got it ... I really didn't realize that method of referring to stuff
>> on
>> OLGN stack could make such a diffe
Dave/Peter,
Was the issue resolved due to names of methods and properties not matching?
Curious,
Ashlon
On Tue, Oct 26, 2010 at 2:42 PM, Peter Bliznak wrote:
> Yep, got it ... I really didn't realize that method of referring to stuff
> on
> OLGN stack could make such a difference.
> All works
No problem! It's always a mystery until it isn't :)
Dave
On Tue, Oct 26, 2010 at 3:42 PM, Peter Bliznak wrote:
> Yep, got it ... I really didn't realize that method of referring to stuff on
> OLGN stack could make such a difference.
> All works now, thanks Dave!
>
>
>
> On Tue, Oct 26, 2010 at 3
Yep, got it ... I really didn't realize that method of referring to stuff on
OLGN stack could make such a difference.
All works now, thanks Dave!
On Tue, Oct 26, 2010 at 3:23 PM, Dave Newton wrote:
> And I told you why you're having that problem. The difference between
> your code ("doesn't wo
And I told you why you're having that problem. The difference between
your code ("doesn't work") and Ying's code ("does work") tells you the
same thing. And if you understand how things like the
tag work, you understand why it displays correctly, even though it
fails on the submit. Yes?
Dave
On
In the email above I was typing fast ans made mistakes but in code I have
everything OK.
As I`ve said I can load list and show all records and column with checkboxes
is displayed correctly as well.
It is only when I try to get list back after submit I have problem.
On Tue, Oct 26, 2010 at 3:05 P
Your names are wrong; if you're trying to reference a property of a
member in a list, you need to reference the list--how else would it
know what it's supposed to set? Think of OGNL names the exact same way
you'd use a Java name.
The type conversion documentation covers this (somewhat obliquely,
I
Nopebasically first line in the action is to call getter on that
list and it is already null . man :-(
On Tue, Oct 26, 2010 at 2:33 PM, satyanarayana katta
wrote:
> R u by any chance creating the new list in the action class. If so it
> won't work and u will get null.
>
> Sent from m
R u by any chance creating the new list in the action class. If so it won't
work and u will get null.
Sent from my iPhone
On Oct 26, 2010, at 10:23 AM, Peter Bliznak wrote:
> Opps...damn gmail.
>
> As I've said I am using pretty much same approach as it was suggested above
> by the other pos
Opps...damn gmail.
As I've said I am using pretty much same approach as it was suggested above
by the other poster.
I have list:
private List workOrderTaskList;
with getter and setter'
EAch : WorkOrderTask have :
Long id;
boolean completed ;// checkbox
with getters and setter's
in jsp iterate
On Tue, Oct 26, 2010 at 12:50 PM, Peter Bliznak wrote:
> As I've said I am using pretty much same approach as it was suggested above
> by the other poster. I have list.
Well, both Ying and I do it in a way that works, so I'd suggest
there's at least *some* difference in our approaches. Without any
As I've said I am using pretty much same approach as it was suggested above
by the other poster.
I have list.
On Tue, Oct 26, 2010 at 12:20 PM, Dave Newton wrote:
> This question has been asked and answered quite a few times. I agree
> the documentation should reflect this; as we're a volu
This question has been asked and answered quite a few times. I agree
the documentation should reflect this; as we're a volunteer group all
assistance is appreciated. Feel free to file a CLA and update the docs
to accurately reflect current behavior, and add entries to the FAQ if
it addresses a typi
Thanks for your time but what you show me is exactly what I was already
doing but inputted changes are NOT being seen in that list when I tried
to post it. That was my question or rather problem
On Tue, Oct 26, 2010 at 4:32 AM, Li Ying wrote:
> My way to solve this kind of problem:
>
> (1)
Listen I googled quite a while before I asked here and all I saw was sea of
lost souls asking same question dating back to 2007...but NOT answers...if
it is so simple and obvious then why docs for checkbox are not mentioning
this trivial case. .. BTW would you please point me to the site where
Oh, I understand. Definitely agree; I think the OP just isn't aware of
some S2 functionality and/or best practices, that's all.
Dave
On Tuesday, October 26, 2010, Li Ying wrote:
> I mean:
>
> Representing associated data by a DTO class and then holding DTO
> instances in one List
>
> is better t
I mean:
Representing associated data by a DTO class and then holding DTO
instances in one List
is better than
Holding data in several separated Lists each represent one column.
2010/10/26 Dave Newton :
> On Tue, Oct 26, 2010 at 4:32 AM, Li Ying wrote:
>> I think this is a better design, becau
On Tue, Oct 26, 2010 at 4:32 AM, Li Ying wrote:
> I think this is a better design, because the data modal is more
> compliant with OO principles.
Better than what?
(And as an aside, there's nothing particularly OO about what's
essentially a struct, although from a pragmatic viewpoint,
particularl
My way to solve this kind of problem:
(1) Use a DTO class as the data modal for columns of each row.
Every column is represented by one property of the DTO class.
For example:
public class Info {
private boolean use;
private String name;
private int id;
// getter
Sounds good I will try it first thing in the morning.
Thank you for your time spent with me
Peter.
On Mon, Oct 25, 2010 at 10:44 PM, Dave Newton wrote:
> Ultimately they're all going to handle it more-or-less the same way:
> persistent state on the server, or hidden fields in the form. If the
>
Ultimately they're all going to handle it more-or-less the same way:
persistent state on the server, or hidden fields in the form. If the
code is invisible to the developer, I don't see much of a difference.
I also gave you another option: use a map, keyed by an ID, with an object value.
On Monda
checked CheckboxInterceptor and see what it does. I guess no way around it
PS as for what I checked before - that was lift and wicked..somehow I found
it friendlier but hey that might be just my opinion :-)
On Mon, Oct 25, 2010 at 10:09 PM, Dave Newton wrote:
> Hidden parameters are the only
Hidden parameters are the only way to get a value for an unchecked
checkbox, that's just how HTML works. But yes, you're wrong; the
checkbox interceptor does the work for you. Please read the
documentation and just try it.
Dave
(Cumbersome? Compared to what?)
On Monday, October 25, 2010, Peter B
Sorry about "of course" we have over two dozens of s1 apps and evaluating if
s2 makes sense to switch to or go with something else.
And for that we have over 50 items to cover to see how difficult/easy it is
in s2.
I am really surprise that such a trivial task has to be done using hidden
parameters
Same way they're generated now, with the checkbox tag, or by hand. Or use a map.
And there's no "of course": people use both versions.
Dave
On Monday, October 25, 2010, Peter Bliznak wrote:
> Hi Dave,
> using S2 of course.
> not sure I am getting what you suggested. I have dynamic list and have
Hi Dave,
using S2 of course.
not sure I am getting what you suggested. I have dynamic list and have no
idea what size is going to be (inside my jsp which was created prior to that
call)-- how would you then create hidden parameters dynamically?
On Mon, Oct 25, 2010 at 9:19 PM, Dave Newton wrote:
Which version of Struts?
Struts 2 uses a hidden field to deal with default (unchecked) values.
Struts 1 ActionForms used the reset() method to pre-load default
values.
Dave
On Mon, Oct 25, 2010 at 9:16 PM, Peter Bliznak wrote:
> Hi,
> I have a list over which I am iterating - it has checkbox an
From: "Hyrum" <[EMAIL PROTECTED]>
Here's the problem: My read-only view has the box checked. When I
forward
to the editable view, it's corresponding Controller calls reset and wipes
out that checkboxes value so that when it displays, it is unchecked.
Write your reset method so that it only reset
> disabled="<%myBean.isEnable%>"/>
>
> no errors thrown but It does nothing, it doesn't even outputs the
disabled on html tag.
>
"does nothing" means what? Nothing rendered, or does it render an
tag without the disabled flag?
I think you want to use !myBean.isEnable().
- Scott
---
31 matches
Mail list logo