AutoCompleteTextField Problem Submitting

2010-05-12 Thread Sebastian Gabriel
Hello,
I have an AutoCompleteTextField which works just fine. But when I select any of 
the given values from the list the validator tells me : xxx is not a valid 
value... perhaps you have any idea what I can do.

Code:

 private AutoCompleteTextFieldSubject subject = new 
AutoCompleteTextFieldSubject(subject,
new ModelSubject(event.getSubject()), autoCompleteRenderer) {

/**
 * generated UID.
 */
private static final long serialVersionUID = -928631288762101540L;

@Override
protected IteratorSubject getChoices(String term) {

ListSubject ret = new LinkedListSubject();
ListSubject subjects = controller.getAllSubjects();
for (Subject subject : subjects) {
if (subject.getName().startsWith(term)) {
ret.add(subject);
}
}

return ret.iterator();
}
};

Thanks,
Sebastian

Re: AutoCompleteTextField Problem Submitting

2010-05-12 Thread Sebastian Gabriel
Thanks for your fast answer. 
I have a question about your solution. You say setting the model to null and 
adding a getChoice method would solve the problem. This means that I set the 
AutoCompleteTextField type to String and the String in the 
AutoCompleteTextField has to be unique in order to identify the right object, 
hasn't it?

Thanks
Sebastian


Am 12.05.2010 um 19:26 schrieb Zilvinas Vilutis:

 I had the same problem, its something related to converters or how your text
 value is converted to ( in your case ) Subject - and as there is no
 converter for that - it is just failing.
 
 What I've done is set the model to null and added a method getChoice
 which does the conversion.
 
 This is not very convenient way but it works.
 
 Maybe Igor would have any suggestions how to solve this in a better way?
 
 
 Žilvinas Vilutis
 
 Mobile:   (+370) 652 38353
 E-mail:   cika...@gmail.com
 
 
 On Wed, May 12, 2010 at 7:22 AM, Sebastian Gabriel 
 sebastian.gabr...@hs-augsburg.de wrote:
 
 Hello,
 I have an AutoCompleteTextField which works just fine. But when I select
 any of the given values from the list the validator tells me : xxx is not a
 valid value... perhaps you have any idea what I can do.
 
 Code:
 
 private AutoCompleteTextFieldSubject subject = new
 AutoCompleteTextFieldSubject(subject,
   new ModelSubject(event.getSubject()), autoCompleteRenderer) {
 
   /**
* generated UID.
*/
   private static final long serialVersionUID = -928631288762101540L;
 
   @Override
   protected IteratorSubject getChoices(String term) {
 
   ListSubject ret = new LinkedListSubject();
   ListSubject subjects = controller.getAllSubjects();
   for (Subject subject : subjects) {
   if (subject.getName().startsWith(term)) {
   ret.add(subject);
   }
   }
 
   return ret.iterator();
   }
   };
 
 Thanks,
 Sebastian


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



jWicket Drag'n'Drop

2010-06-06 Thread Sebastian Gabriel
Hello,
I am trying to build a drag and drop component, which display three different 
list and the user should be able to move the listeitems between the different 
lists. 
I have the lists and I'm able to move the items to other lists where they also 
be displayed. My problem is when I drop a listitem into a list the item is 
'cloned' - after drop the item is in the list and also in the place where I 
have dropped it. So this is my first problem and the second is, that an item 
which was dropped onto a list, can't be moved at all, although all three lists 
are instances of the same class. Perhaps somebody has a clue what I'm doing 
wrong.

Thanks
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: jWicket Drag'n'Drop

2010-06-06 Thread Sebastian Gabriel
Well, 
in the onDrop() method of the listcontainer the droppedelement is added to the 
list. At this point I want the element which was dropped to disappear. Because 
if not the element is displayed twice.

Thanks


Am 06.06.2010 um 17:23 schrieb Stefan Lindner:

 Hallo,
 
 what exactly do you mean with cloned?
 
 Stefan
 
 -Ursprüngliche Nachricht-
 Von: Sebastian Gabriel [mailto:sebastian.gabr...@hs-augsburg.de] 
 Gesendet: Sonntag, 6. Juni 2010 13:49
 An: users@wicket.apache.org
 Betreff: jWicket Drag'n'Drop
 
 Hello,
 I am trying to build a drag and drop component, which display three different 
 list and the user should be able to move the listeitems between the different 
 lists. 
 I have the lists and I'm able to move the items to other lists where they 
 also be displayed. My problem is when I drop a listitem into a list the item 
 is 'cloned' - after drop the item is in the list and also in the place where 
 I have dropped it. So this is my first problem and the second is, that an 
 item which was dropped onto a list, can't be moved at all, although all three 
 lists are instances of the same class. Perhaps somebody has a clue what I'm 
 doing wrong.
 
 Thanks
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



jWicket SortableList

2010-06-10 Thread Sebastian Gabriel
Hello, 
I've figured out how to use the jWicket Drag'n'Drop components and the result 
is pretty nice. 
I have four lists, one list is in the beginning filled with elements and the 
user have so choose which element he wants in which list. It works, to drag the 
elements on the three other lists and the element is being added to the list. 
But my problem is that the lists have to be sortable by the user. 
How can I get the position of the element when it is dropped? So I can 
calculate whether it has been dropped above an element or under it. Or does 
jWicket doesn't cover this functionality.

Thanks.

Sebastian
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



scriptaculous SortableListView

2010-06-27 Thread Sebastian Gabriel
Hello, 

My problem is that I have multiple SortableListViews, all of them work fine, 
but I want to have the ability to drag the items between the different ListView 
also. I have tried to work with SortableListViews an DragTargets but then I 
can't sort the list furthermore I don't know how to let the sortablelistview 
allow free dragging not only horizontal or vertical. Perhaps you have some 
ideas?

Thanks
Sebastian
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org