Re: [Wicket-user] Modelling HashSets in a CheckBoxMultipleChoice
I am having problems with this CheckBoxMultipleChoice component. I have converted my hashset of roles into a list but it shows the roles as check boxes; rather then choice of roles needed and their roles are correctly selected. I don't know how I can achieve this?!?!? Here is my inner class: public EditBorrowerForm(final String id, final Borrower borrower, final List roles) { super(id, new CompoundPropertyModel(borrower)); add(new Label(firstName)); add(new Label(lastName)); add(new Label(email)); // Create a required text field that edits the borrowers's password final TextField password = new TextField(password); password.setRequired(true); final FormComponentFeedbackBorder passwordFeedback = new FormComponentFeedbackBorder( passwordFeedback); add(passwordFeedback); passwordFeedback.add(password); add(new CheckBox(enabled)); add(new CheckBox(accountExpired)); add(new CheckBox(accountLocked)); add(new CheckBox(credentialsExpired)); List newList = new ArrayList(borrower.getRoles ()); LOG.debug(is newList empty? + newList.isEmpty()); add(new CheckBoxMultipleChoice(roles, newList)); } Your suggestion does not have any values checked. On 4/30/07, Eelco Hillenius [EMAIL PROTECTED] wrote: new ArrayList(yourSet); Eelco On 4/30/07, James Perry [EMAIL PROTECTED] wrote: I am trying to model a hashset in a wicket webpage that allows to edit an user's details. I have a hashset of the user's roles however I cannot model them using the CheckBoxMultipleChoice component. How can I model this hashset so roles can selected and deselected. Thanks in advance, - James - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Modelling HashSets in a CheckBoxMultipleChoice
The default id for the roles are 'user' and 'admin', which I feel does not need rendered to any other values. On 5/2/07, Igor Vaynberg [EMAIL PROTECTED] wrote: is there a reason you are not using a choice renderer? -igor On 5/2/07, James Perry [EMAIL PROTECTED] wrote: I am having problems with this CheckBoxMultipleChoice component. I have converted my hashset of roles into a list but it shows the roles as check boxes; rather then choice of roles needed and their roles are correctly selected. I don't know how I can achieve this?!?!? Here is my inner class: public EditBorrowerForm(final String id, final Borrower borrower, final List roles) { super(id, new CompoundPropertyModel(borrower)); add(new Label(firstName)); add(new Label(lastName)); add(new Label(email)); // Create a required text field that edits the borrowers's password final TextField password = new TextField(password); password.setRequired(true); final FormComponentFeedbackBorder passwordFeedback = new FormComponentFeedbackBorder( passwordFeedback); add(passwordFeedback); passwordFeedback.add(password); add(new CheckBox(enabled)); add(new CheckBox(accountExpired)); add(new CheckBox(accountLocked)); add(new CheckBox(credentialsExpired)); List newList = new ArrayList(borrower.getRoles ()); LOG.debug(is newList empty? + newList.isEmpty()); add(new CheckBoxMultipleChoice(roles, newList)); } Your suggestion does not have any values checked. On 4/30/07, Eelco Hillenius [EMAIL PROTECTED] wrote: new ArrayList(yourSet); Eelco On 4/30/07, James Perry [EMAIL PROTECTED] wrote: I am trying to model a hashset in a wicket webpage that allows to edit an user's details. I have a hashset of the user's roles however I cannot model them using the CheckBoxMultipleChoice component. How can I model this hashset so roles can selected and deselected. Thanks in advance, - James - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Modelling HashSets in a CheckBoxMultipleChoice
Affirmitive, the name is the the primary key in my role table On 5/2/07, Igor Vaynberg [EMAIL PROTECTED] wrote: so role.tostring() is consistent and can be used as id? because that is what will be used to figure out what is selected and what is not. -igor On 5/2/07, James Perry [EMAIL PROTECTED] wrote: The default id for the roles are 'user' and 'admin', which I feel does not need rendered to any other values. On 5/2/07, Igor Vaynberg [EMAIL PROTECTED] wrote: is there a reason you are not using a choice renderer? -igor On 5/2/07, James Perry [EMAIL PROTECTED] wrote: I am having problems with this CheckBoxMultipleChoice component. I have converted my hashset of roles into a list but it shows the roles as check boxes; rather then choice of roles needed and their roles are correctly selected. I don't know how I can achieve this?!?!? Here is my inner class: public EditBorrowerForm(final String id, final Borrower borrower, final List roles) { super(id, new CompoundPropertyModel(borrower)); add(new Label(firstName)); add(new Label(lastName)); add(new Label(email)); // Create a required text field that edits the borrowers's password final TextField password = new TextField(password); password.setRequired(true); final FormComponentFeedbackBorder passwordFeedback = new FormComponentFeedbackBorder( passwordFeedback); add(passwordFeedback); passwordFeedback.add(password); add(new CheckBox(enabled)); add(new CheckBox(accountExpired)); add(new CheckBox(accountLocked)); add(new CheckBox(credentialsExpired)); List newList = new ArrayList(borrower.getRoles ()); LOG.debug(is newList empty? + newList.isEmpty()); add(new CheckBoxMultipleChoice(roles, newList)); } Your suggestion does not have any values checked. On 4/30/07, Eelco Hillenius [EMAIL PROTECTED] wrote: new ArrayList(yourSet); Eelco On 4/30/07, James Perry [EMAIL PROTECTED] wrote: I am trying to model a hashset in a wicket webpage that allows to edit an user's details. I have a hashset of the user's roles however I cannot model them using the CheckBoxMultipleChoice component. How can I model this hashset so roles can selected and deselected. Thanks in advance, - James - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list
Re: [Wicket-user] Modelling HashSets in a CheckBoxMultipleChoice
well, then set a breakpoint in listmultiplechoice.isselected() and see why that returns false where you think it should return true. -igor On 5/2/07, James Perry [EMAIL PROTECTED] wrote: Affirmitive, the name is the the primary key in my role table On 5/2/07, Igor Vaynberg [EMAIL PROTECTED] wrote: so role.tostring() is consistent and can be used as id? because that is what will be used to figure out what is selected and what is not. -igor On 5/2/07, James Perry [EMAIL PROTECTED] wrote: The default id for the roles are 'user' and 'admin', which I feel does not need rendered to any other values. On 5/2/07, Igor Vaynberg [EMAIL PROTECTED] wrote: is there a reason you are not using a choice renderer? -igor On 5/2/07, James Perry [EMAIL PROTECTED] wrote: I am having problems with this CheckBoxMultipleChoice component. I have converted my hashset of roles into a list but it shows the roles as check boxes; rather then choice of roles needed and their roles are correctly selected. I don't know how I can achieve this?!?!? Here is my inner class: public EditBorrowerForm(final String id, final Borrower borrower, final List roles) { super(id, new CompoundPropertyModel(borrower)); add(new Label(firstName)); add(new Label(lastName)); add(new Label(email)); // Create a required text field that edits the borrowers's password final TextField password = new TextField(password); password.setRequired(true); final FormComponentFeedbackBorder passwordFeedback = new FormComponentFeedbackBorder( passwordFeedback); add(passwordFeedback); passwordFeedback.add(password); add(new CheckBox(enabled)); add(new CheckBox(accountExpired)); add(new CheckBox(accountLocked)); add(new CheckBox(credentialsExpired)); List newList = new ArrayList(borrower.getRoles ()); LOG.debug(is newList empty? + newList.isEmpty()); add(new CheckBoxMultipleChoice(roles, newList)); } Your suggestion does not have any values checked. On 4/30/07, Eelco Hillenius [EMAIL PROTECTED] wrote: new ArrayList(yourSet); Eelco On 4/30/07, James Perry [EMAIL PROTECTED] wrote: I am trying to model a hashset in a wicket webpage that allows to edit an user's details. I have a hashset of the user's roles however I cannot model them using the CheckBoxMultipleChoice component. How can I model this hashset so roles can selected and deselected. Thanks in advance, - James - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] Modelling HashSets in a CheckBoxMultipleChoice
I am trying to model a hashset in a wicket webpage that allows to edit an user's details. I have a hashset of the user's roles however I cannot model them using the CheckBoxMultipleChoice component. How can I model this hashset so roles can selected and deselected. Thanks in advance, - James - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user