Re: checkbox problem

2010-10-26 Thread Li Ying
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

Re: checkbox problem

2010-10-26 Thread Li Ying
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

Re: checkbox problem

2010-10-26 Thread Ashlon Hill
> 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

Re: checkbox problem

2010-10-26 Thread Ashlon Hill
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

Re: checkbox problem

2010-10-26 Thread Dave Newton
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

Re: checkbox problem

2010-10-26 Thread Peter Bliznak
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

Re: checkbox problem

2010-10-26 Thread Dave Newton
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

Re: checkbox problem

2010-10-26 Thread Peter Bliznak
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

Re: checkbox problem

2010-10-26 Thread Dave Newton
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

Re: checkbox problem

2010-10-26 Thread Peter Bliznak
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

Re: checkbox problem

2010-10-26 Thread satyanarayana katta
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

Re: checkbox problem

2010-10-26 Thread Peter Bliznak
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

Re: checkbox problem

2010-10-26 Thread Dave Newton
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

Re: checkbox problem

2010-10-26 Thread Peter Bliznak
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

Re: checkbox problem

2010-10-26 Thread Dave Newton
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

Re: checkbox problem

2010-10-26 Thread Peter Bliznak
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)

Re: checkbox problem

2010-10-26 Thread Peter Bliznak
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

Re: checkbox problem

2010-10-26 Thread Dave Newton
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

Re: checkbox problem

2010-10-26 Thread Li Ying
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

Re: checkbox problem

2010-10-26 Thread Dave Newton
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

Re: checkbox problem

2010-10-26 Thread Li Ying
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

Re: checkbox problem

2010-10-25 Thread Peter Bliznak
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 >

Re: checkbox problem

2010-10-25 Thread Dave Newton
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

Re: checkbox problem

2010-10-25 Thread Peter Bliznak
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

Re: checkbox problem

2010-10-25 Thread Dave Newton
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

Re: checkbox problem

2010-10-25 Thread Peter Bliznak
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

Re: checkbox problem

2010-10-25 Thread Dave Newton
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

Re: checkbox problem

2010-10-25 Thread Peter Bliznak
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:

Re: checkbox problem

2010-10-25 Thread Dave Newton
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

checkbox problem

2010-10-25 Thread Peter Bliznak
Hi, I have a list over which I am iterating - it has checkbox and other fields. I know I can define array associated with checkbox's values but that only returns values which were checked. In my other column I have date and I have to make that date associated with checkbox's state. How am I suppose

Re: s2 Checkbox problem

2008-10-22 Thread Mead Lai
in the Action, you need a list; List checklist;//getter & setter then, you can get the fieldValue="Y" in the struts tag, from field "checklist" in the Action. and the value is the same value in html tag value="Y". On Wed, Oct 22, 2008 at 3:50 PM, Harden ZHU <[EMAIL PROTECTED]> wrote: > I have a

s2 Checkbox problem

2008-10-22 Thread Harden ZHU
I have a checkbox in jsp: , after html rendering it is shown as , that is good. But once a user selects the checkbox and submits the form, user.contactConfidential is set to true. However, on the database side the value should be stored as 'Y' or 'N'. Is there anyway that I can get user.contact

Re: [S2] Checkbox problem

2008-08-20 Thread Felipe Lorenz
Hi... you can do tag in another tag... cause its a recursive, and well.. Dave can explain better why!! ehehheh sorry.. my english is not good.. But you can try create a new boolean attribute in you action class and "tranform" the bd type ("Y"/"N") to a boolean type (true/false).. Or

[S2] Checkbox problem

2008-08-20 Thread Struts Two
I have a checkbox as follows in a jsp: Once a user selects the checkbox and submits the form,  ccUpdateFlag is set to true. However, on the database side the value is stored as 'Y' or 'N' . So my getCcUpdateFlag returns 'Y' or 'N' depending on the fact ccUpdateFlag is set to true or false. Now

Re: struts2 & displayTag how to use checkBox; Problem: translating the fieldValue

2008-04-30 Thread xianwinwin
ult-input-with-checkbox-to16966533.html >>>>> >>>>> >>>>> Which basically happens when the action is executed without any >>>>> checkbox selected. >>>>> >>>>> >>>>> xianwinwin wrote: >>>

Re: struts2 & displayTag how to use checkBox; Problem: translating the fieldValue

2008-04-30 Thread wild_oscar
ianwinwin wrote: >>>>> >>>>> Hi all, >>>>> >>>>> I have a table with a list of buyers. Each buyer has a checkBox that >>>>> the user can click and decide if he wants to work with them. >>>>> >>>>&g

Re: struts2 & displayTag how to use checkBox; Problem: translating the fieldValue

2008-04-30 Thread xianwinwin
x that >>>> the user can click and decide if he wants to work with them. >>>> >>>> I'm using displayTag and this is my code: >>>> >>>> >>> fieldValue='${entityId}'/> >>>> >>>> I wonder why

Re: struts2 & displayTag how to use checkBox; Problem: translating the fieldValue

2008-04-29 Thread wild_oscar
'm using displayTag and this is my code: >>> >>> >> fieldValue='${entityId}'/> >>> >>> I wonder why I don't get the *value/content* of the userCheck. Instead, >>> I get ${

Re: struts2 & displayTag how to use checkBox; Problem: translating the fieldValue

2008-04-29 Thread xianwinwin
t the *value/content* of the userCheck. Instead, I >> get ${entityId} (this really very string) >> >> any idea how to get the entityId (the number)? >> >> thank you! >> > > -- View this message in context:

Re: struts2 & displayTag how to use checkBox; Problem: translating the fieldValue

2008-04-29 Thread wild_oscar
et the entityId (the number)? > > thank you! > -- View this message in context: http://www.nabble.com/struts2---displayTag-how-to-use-checkBox--Problem%3A-translating-the-fieldValue-tp16945993p16966608.html Sent from the Struts - User mailing list archive at Nabble.com.

Re: struts2 & displayTag how to use checkBox; Problem: translating the fieldValue

2008-04-29 Thread Randy Burgess
r 2008 16:40:19 -0700 (PDT) > To: > Subject: struts2 & displayTag how to use checkBox; Problem: translating the > fieldValue > > > Hi all, > > I have a table with a list of buyers. Each buyer has a checkBox that the > user can click and decide if he wants to work wi

struts2 & displayTag how to use checkBox; Problem: translating the fieldValue

2008-04-28 Thread xianwinwin
eally very string) any idea how to get the entityId (the number)? thank you! -- View this message in context: http://www.nabble.com/struts2---displayTag-how-to-use-checkBox--Problem%3A-translating-the-fieldValue-tp16945993p16945993.html Sent from the Struts - User mailing list archive at

Re: JSP 1.2 ( JSTL EL) and checkbox problem.

2006-02-27 Thread digant . k . joshi
org cc: Subject: Re: JSP 1.2 ( JSTL EL) and checkbox problem. Probably, but it would be safer to use the struts-el jar that comes with 1.2.8. Is there any particular reason you want to use the 1.3.0 version? L. [EMAIL PROTECTED] wrote: > would struts-el v1.3.0/ will work

Re: JSP 1.2 ( JSTL EL) and checkbox problem.

2006-02-27 Thread Laurie Harper
lease respond to "Struts Users Mailing List" To: Struts Users Mailing List cc: Subject:Re: JSP 1.2 ( JSTL EL) and checkbox problem. [EMAIL PROTECTED] wrote: No, I am using jsp version of EL <%@ taglib prefix="c&q

Re: JSP 1.2 ( JSTL EL) and checkbox problem.

2006-02-27 Thread Laurie Harper
avlev" <[EMAIL PROTECTED]> 02/27/2006 02:48 PM Please respond to "Struts Users Mailing List" To: "Struts Users Mailing List" cc: Subject: Re: JSP 1.2 ( JSTL EL) and checkbox problem. On 2/27/06, [EMAIL PROTECTED] <[EMAIL PROTECTE

Re: JSP 1.2 ( JSTL EL) and checkbox problem.

2006-02-27 Thread digant . k . joshi
Subject: Re: JSP 1.2 ( JSTL EL) and checkbox problem. On 2/27/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > We are using tomcat 1.4.30 which in turn has jsp 1.2 version. > JSTL EL works differently in this version meaning For outputting text you should not >

Re: JSP 1.2 ( JSTL EL) and checkbox problem.

2006-02-27 Thread digant . k . joshi
Subject:Re: JSP 1.2 ( JSTL EL) and checkbox problem. [EMAIL PROTECTED] wrote: > No, I am using jsp version of EL > <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"; %> > Do i have to use struts-el for making life

Re: JSP 1.2 ( JSTL EL) and checkbox problem.

2006-02-27 Thread Michael Jouravlev
On 2/27/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > We are using tomcat 1.4.30 which in turn has jsp 1.2 version. > JSTL EL works differently in this version meaning For outputting text you > should not > >

Re: JSP 1.2 ( JSTL EL) and checkbox problem.

2006-02-27 Thread Dave Newton
[EMAIL PROTECTED] wrote: > No, I am using jsp version of EL > <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"; %> > Do i have to use struts-el for making life easier, especially when > using checkbox or radio button controls? > Um, you have to use struts-el if

Re: JSP 1.2 ( JSTL EL) and checkbox problem.

2006-02-27 Thread digant . k . joshi
t way to get struts-el jar/tlds ? Thanks. Digant Dave Newton <[EMAIL PROTECTED]> 02/27/2006 01:50 PM Please respond to "Struts Users Mailing List" To: Struts Users Mailing List cc: Subject:Re: JSP 1.2 ( JSTL EL) and checkbox problem. [EMAIL

Re: JSP 1.2 ( JSTL EL) and checkbox problem.

2006-02-27 Thread Dave Newton
[EMAIL PROTECTED] wrote: > 1. Drop down default value selection should be done based on Form value > "sectorId" and when user chooses any value from drop down, value of > ${sector.sectorId} should populate sectorId. I am getting > ${sector.sectorId}displayed as all of my values in dropdown. >

JSP 1.2 ( JSTL EL) and checkbox problem.

2006-02-27 Thread digant . k . joshi
We are using tomcat 1.4.30 which in turn has jsp 1.2 version. JSTL EL works differently in this version meaning For outputting text you should not using${someVar} but should use Now I have following problems in making ActionForm pass value to Action . 1. Drop down default value selection sho

Re: checkbox problem

2005-03-19 Thread Wendy Smoak
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

checkbox problem

2005-03-19 Thread Hyrum
I have a question for all you experts out there. I have a really big ActionForm which I am trying to re-use for two views. One view is read-only, and the form properties are displayed with c:out, while the editable form is displayed with html:text, etc. This isn't new. My problem is html:checkb

checkbox problem

2005-03-19 Thread Hyrum
I have a question for all you experts out there. I have a really big ActionForm which I am trying to re-use for two views. One view is read-only, and the form properties are displayed with c:out, while the editable form is displayed with html:text, etc. This isn't new. My problem is html:checkb

RE: Checkbox problem again

2005-02-24 Thread Scott Piker
> 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 ---

Checkbox problem again

2005-02-24 Thread Vinicius Caldeira Carvalho
I'm trying to set an checkbox to be disabled. But it's not working anyway <%String enable = String.valueOf(myBean.isEnable)%> Well, that throws an Exception setDisable(boolean). Ok so I tried no errors thrown but It does nothing, it doesn't even outputs the disabled on html tag. Another despe