Re: ListView, Ajax and Forms

2009-12-15 Thread Bert
I keep talking to myself ;) Fixed the problem more or less by adding the following behavior to the form components: public class RetainingFormUpdateBehavior extends AjaxFormComponentUpdatingBehavior { public RetainingFormUpdateBehavior() { super("onblur"); } @Override pr

Re: ListView, Ajax and Forms

2009-12-15 Thread Bert
I went back from the ListView to a RefreshingView, wrote a little Model to implement equals() on top of a CPM and added a ReuseIfModelsEqualStrategy to the RefreshingView (called adressblock) : adressblock.setItemReuseStrategy(new ReuseIfModelsEqualStrategy()); I don't see an issue with old items

Re: Listview in a listview refresh with AjaxLink don't work

2009-11-17 Thread pieter claassen
Pedro, Improved version now works. Here is my onclick for the AjaxFallBackLink. Much of it I think is not best practice. Any tips on making this code better? Thanks a million for your help! P AjaxFallbackLink up = new AjaxFallbackLink("up") { @Override public void onCl

Re: Listview in a listview refresh with AjaxLink don't work

2009-11-15 Thread wicketnewuser
I don't see your up link in the html markup. Doesn't look like you have enough info here. If you are moving your question row up are you updating the list for the listview. Also you are updating questionpanel with ajax target . I think it would have to be your listview. I would use ajaxsubmitlink

Re: Listview in a listview refresh with AjaxLink don't work

2009-11-15 Thread pieter claassen
Hi Pedro, Here it is. So, I basically move the question up or down the array. public void moveQuestionUp(QuestionBase question) { int idx = questions.indexOf(question); if (idx > 0) { questions.remove(question); questions.add(idx - 1, question);

Re: Listview in a listview refresh with AjaxLink don't work

2009-11-14 Thread Pedro Santos
Can you send the moveQuestionUp implementation? On Sat, Nov 14, 2009 at 9:03 PM, pieter claassen wrote: > I am trying to follow wicket in action advice P263 but > > I have a ListView in a ListView with a panel added to my inner > listview. On that panel, I have an AjaxLink and I want to move ite

Re: ListView for only one element. Something wrong.

2009-10-20 Thread Nicolas Melendez
Hi,Thanks for your answer. (i reed it a time ago, but i never said thanks) NM On Fri, Oct 9, 2009 at 6:51 AM, Sven Meier wrote: > Hi Nicolas, > > use more models: > > -- > class MyPage: > private IModel businessObjects; > > private

Re: ListView for only one element. Something wrong.

2009-10-08 Thread Sven Meier
Hi Nicolas, use more models: -- class MyPage: private IModel businessObjects; private MyPanel myPanel; myPanel = new MyPanel(businessObjects); this.add(myPanel); - class

Re: ListView for only one element. Something wrong.

2009-10-08 Thread Nicolas Melendez
Hi: Sven, thanks for replying! I've added some code below. -- class MyPage: private List businessObjectList; private MyPanel myPanel; myPanel = new MyPanel(businessObjectList); this.add(myPanel); ... -> target.addComponent(myPanel

Re: ListView for only one element. Something wrong.

2009-10-08 Thread Sven Meier
Hi Nicolas, you can just use a WebMarkupContainer and recreate its children on each request in #onBeforeRender(). But the question is: why do you need to refresh your components at all? It seems you don't use models correctly. Show us some code. Sven Nicolas Melendez wrote: Hi, i want to

Re: ListView Validation

2009-08-17 Thread Major Péter
Yes, with the setReuseItems(true) you just enabled that, the list won't forget the contents on validation fail. If you would like to use custom validation messages, check out the Application.properties file in wicket.jar, there you can see the original messages, and also the format of message

Re: ListView Validation

2009-08-17 Thread jpalmer1026
I have setReuseItems set to true but I'm still only seeing the generic Wicket validation messages and not the custom validation messages that I created. Is there a way to display custom validation messages to items in a ListView? jWeekend wrote: > > see setReuseItems on ListView. > > Regards

Re: ListView Validation

2009-08-17 Thread jWeekend
see setReuseItems on ListView. Regards - Cemal jWeekend OO & Java Technologies, Wicket Training and Development http://jWeekend.com jpalmer1026 wrote: > > I'm trying to display a validation message for an item contained in a list > view but the validation message isn't getting displayed. Is

Re: ListView inside Form: retrieving the listview's model

2009-08-12 Thread bferr
In your validator, invoke Form.visitFormComponents(FormComponent.IVisitor visitor) The IVisitor will check getInput() vs the other formComponent.getModelObject() Marcel Bonnet wrote: > > Thanks for helping. > In fact I was trying to validate the ListView's model. I thought that each > time w

Re: ListView inside Form: retrieving the listview's model

2009-08-12 Thread Marcel Bonnet
*SOLVED*. I found what was wrong. In case anyone needs a component like this, the main updated code is: final Model dataModel = new Model(); dataModel.setObject(data); ListView listView = new ListView("list", dataModel) { protected void populateItem(ListItem item) { final IModel

Re: ListView inside Form: retrieving the listview's model

2009-08-12 Thread Marcel Bonnet
Thanks for helping. In fact I was trying to validate the ListView's model. I thought that each time we press the Submit button the new choice selected in each DropDownChoice in the ListView's rows would be submited and filled inside the Model of the ListView, meaning the model would now have the ne

Re: ListView inside Form: retrieving the listview's model

2009-08-11 Thread bferr
The model of your listView has to be LoadableDetachable so that the listView retrieves the new list values each time. Also the setReuseItems() might have to be false. I don't think you're doing form validation within the ListView correct? Marcel Bonnet wrote: > > Hi everybody, I'm new in

Re: listview and windowmodal

2009-05-03 Thread Per Newgro
No problem. This is a common technique in working with wicket. Define the component once and exchange the modelobject. Just my 1 EURO. Cheers Per - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional comm

Re: Re: listview and windowmodal

2009-05-02 Thread pickeu
;De: Per Newgro >A: users@wicket.apache.org >Sujet: Re: listview and windowmodal >item.add(new AjaxLink("updateuser") { > @Override > public void onClick(AjaxRequestTarget target) { >modal1.setModel(item.getModel()); // <-- set th

Re: listview and windowmodal

2009-05-02 Thread Per Newgro
item.add(new AjaxLink("updateuser") { @Override public void onClick(AjaxRequestTarget target) { modal1.setModel(item.getModel()); // <-- set the "selected by item" bean here modal1.show(target); } }); - To unsubscribe,

Re: Re: listview and windowmodal

2009-05-02 Thread pickeu
>Create the modalwindow outside of listview (in page). Set the the user >provided by item to the modal window. >That should do the trick. > >Cheers >Per thx, But how can i set the user in the modal window excepted during the setPageCreator ? --

Re: listview and windowmodal

2009-05-02 Thread Per Newgro
pic...@netcourrier.com schrieb: hi, i'm a beginner in Wicket and i'm trying this framework. first i'm building un CRUD application for users. I have a UserBasePage listing all users using a listView. each line is made of the name of the user and an edit link. All i want to do is to edit the us

Re: Listview and Link sometimes fail to get objects from DB

2009-02-12 Thread Igor Vaynberg
so getmodelobject() returns another imodel? you should really look into a dataview instead of a listview - it will make things easier to understand. a listview does not expect a list of imodels, it expects a list of objects. each item then wraps each object in a imodel that can retrieve it if nee

Re: Listview and Link sometimes fail to get objects from DB

2009-02-12 Thread pieter claassen
Hi Igor, Am I screwing up because I thought I did convert all my code to use only webmodels? Maybe I still fail to understand the database-wicket integration part. First I get all objects from the database: List templates = getTemplateFactory().getAll(); But they are fat and need to be wrapped

Re: Listview and Link sometimes fail to get objects from DB

2009-02-12 Thread Igor Vaynberg
this code is very bad, you should use models so that you do not end up serializing your entities... item.setModel(new CompoundPropertyModel( item.getmodel() )); ... item.add(new Link("edit" , item.getmodel() ) { @Override public void o

Re: Listview and Link sometimes fail to get objects from DB

2009-02-12 Thread Martin Makundi
What happens if you run a debugger and debug line-by-line? Put a breakpoint somewhere where the null value appears from. It looks like something else than a wicket bug. ** Martin 2009/2/12 pieter claassen : > The value "first" is a field on a template, that is retrieved as one > template from the

Re: Listview and Link sometimes fail to get objects from DB

2009-02-12 Thread pieter claassen
The value "first" is a field on a template, that is retrieved as one template from the list of all templates, from a db4o database using a DAO class. List templates = getTemplateFactory().getAll(); So, this list is *always* retrieved correctly. Each of the templates are correctly backed by a data

Re: Listview and Link sometimes fail to get objects from DB

2009-02-12 Thread Martin Makundi
Where do you set the value "first"? ** Martin 2009/2/12 pieter claassen : > Listviews with Links in them, sometimes fail to retrieve the object in the > onClick() method the first time around. When I reload the page, the code > works fine. > > Here is a test. In the listview below, I load the pag

Re: ListView vs DropDownChoice with Generics

2008-11-25 Thread Jeremy Thomerson
I have come across the same issue - is there any valid reason for the "? extends T" - it would be much simpler if it were just List. On Tue, Nov 25, 2008 at 10:36 AM, slowery23 <[EMAIL PROTECTED]>wrote: > > I have created a subclass to LoadableDetachableModel to retrieve a list of > objects out o

Re: ListView model is CompoundPropertyModel>

2008-11-21 Thread Jeremy Thomerson
There's a few ways: - Use PropertyListView - or override ListView and return return new CompoundPropertyModel(super.getListItemModel(model, index)); (which is what the PropertyListView does) - or put this on your first line: item.setModel(new CompoundPropertyModel(item.getModel()

Re: ListView model is CompoundPropertyModel>

2008-11-21 Thread kan
How to get appropriate item model inside populateItem method? Why ListView cannot do it automatically? 2008/11/21 Igor Vaynberg <[EMAIL PROTECTED]>: > item's model needs to be compound, not listview's > > -igor > > On Fri, Nov 21, 2008 at 9:45 AM, kan <[EMAIL PROTECTED]> wrote: >> ListView model i

Re: ListView model is CompoundPropertyModel>

2008-11-21 Thread Igor Vaynberg
item's model needs to be compound, not listview's -igor On Fri, Nov 21, 2008 at 9:45 AM, kan <[EMAIL PROTECTED]> wrote: > ListView model is CompoundPropertyModel> > And when I populate items such what: > > protected void populateItem(final ListItem item) > { > item.add(new Label("fullName")); >

Re: listview produce duplicate value.

2008-10-23 Thread Igor Vaynberg
which get method are you referring to?? are you using ajax?? -igor On Thu, Oct 23, 2008 at 10:51 AM, overseastars <[EMAIL PROTECTED]> wrote: > > Hi > > My listview is printing duplicate valueswhy?? > > I found that my get method is working well. just printing result is > incor

Re: ListView broken?

2008-10-23 Thread James Carman
How about just use PropertyListView? On Thu, Oct 23, 2008 at 9:39 AM, pieter claassen <[EMAIL PROTECTED]> wrote: > Guys, thanks for all your feedback. You were right. > > Cheers, > Pieter > > On Oct 23, 2008, at 2:44 PM, Jeremy Thomerson wrote: > >> Johan nailed it... here are your bad lines: >> >

Re: ListView broken?

2008-10-23 Thread pieter claassen
Guys, thanks for all your feedback. You were right. Cheers, Pieter On Oct 23, 2008, at 2:44 PM, Jeremy Thomerson wrote: Johan nailed it... here are your bad lines: System.out.println("+++"+ item.getModelObject().getClass().getName()); final QuestionAndAnswer qanda = (QuestionAndAnswer

Re: ListView broken?

2008-10-23 Thread Jeremy Thomerson
Johan nailed it... here are your bad lines: System.out.println("+++"+ item.getModelObject().getClass().getName()); final QuestionAndAnswer qanda = (QuestionAndAnswer) item.getModelObject(); setModel(new CompoundPropertyModel(qanda)); That should just be changed to: item.setModel(

Re: ListView broken?

2008-10-23 Thread Johan Compagner
What are you doing there? You get a model object from the listitem And then you are calling setmodel(compound) on the listview itself? Why is that then you are changing the model of the listview inside the loop that it goes over them creating listitems! On 10/23/08, pieter claassen <[EMAIL PROTECT

Re: ListView broken?

2008-10-23 Thread Serkan Camurcuoglu
I suspect there may be a strange interaction with compound property models, since the name of your listview is questions and you also have a getQuestions() method in your upper level model object.. I'm just guessing but can you try to change the name of your listview to "questionList" instead of "

Re: ListView broken?

2008-10-23 Thread James Carman
So, what does it print when you print out the class name? On Thu, Oct 23, 2008 at 6:24 AM, pieter claassen <[EMAIL PROTECTED]> wrote: > Ok, I might be doing something thats not ok but . there are not two > ListViews on this page (there are 3 forms? Is this a problem?) > ClassCastException is t

Re: ListView broken?

2008-10-23 Thread pieter claassen
Ok, I might be doing something thats not ok but . there are not two ListViews on this page (there are 3 forms? Is this a problem?) ClassCastException is throw at System.out.println("") package com.musmato.wicket.pages.templates; import java.util.Arrays; import org.apache.wicket.mar

Re: ListView broken?

2008-10-23 Thread Martijn Dashorst
The classcastexception happens on retrieving the N-th item from the list. The class cast tries to cast the model object of the listview to a List. Apparently the argument to the listview is not a List, but somethign that returns a QuestionAndAnswer. Are you looking at the correct ListView (i.e. ar

Re: ListView broken?

2008-10-23 Thread Dipu
pass , sorry i have no clue On Thu, Oct 23, 2008 at 10:37 AM, pieter claassen <[EMAIL PROTECTED]>wrote: > Ok, I added; > > public class Debug { >public static void debug(List list) { >for (Object item : list) { >System.out.println("++DEBUG++: " + >

Re: ListView broken?

2008-10-23 Thread pieter claassen
Ok, I added; public class Debug { public static void debug(List list) { for (Object item : list) { System.out.println("++DEBUG++: " + item.getClass().toString()); } } and called debug just before I returned my ArrayList of

Re: ListView broken?

2008-10-23 Thread Dipu
can't you check what exactly is being returned by template.getQuestions() and if its a list what are the items in it On Thu, Oct 23, 2008 at 10:10 AM, pieter claassen <[EMAIL PROTECTED]>wrote: > Hi Dipu, > > I tried that but when I do the following: > >protected void populateI

Re: ListView broken?

2008-10-23 Thread pieter claassen
Hi Dipu, I tried that but when I do the following: protected void populateItem(ListItem item) { System.out.println("+++" + item.getModelObject().getClass().getName()); final QuestionAndAnswer qanda = (QuestionAndAnswer) item.getModelObject(); I find that I now get

Re: ListView broken?

2008-10-23 Thread pieter claassen
Comments inline: On Oct 23, 2008, at 10:59 AM, Serkan Camurcuoglu wrote: it seems like template.getQuestions() returns a model which has a QuestionAndAnswer instance instead of a list as its model object.. This is the code in template that returns an arraylist. public ArrayList get

Re: ListView broken?

2008-10-23 Thread Serkan Camurcuoglu
it seems like template.getQuestions() returns a model which has a QuestionAndAnswer instance instead of a list as its model object.. The code on the line where the exception is thrown is: return ((List)listView.getModelObject()).get(index); which indicates that your problem is trying to cast a Q

Re: ListView broken?

2008-10-23 Thread Dipu
looks like template.getQuestions() is returning a list with items in it which is not of the type QuestionAndAnswer try iterating through the list and logging the class name of each item in it Dipu On Thu, Oct 23, 2008 at 9:46 AM, pieter claassen <[EMAIL PROTECTED]>wrote: > I am getting a cl

Re: ListView - modify css for some column

2008-09-29 Thread Igor Vaynberg
you populate all components inside the listview yourself, so just attach one to the td -igor On Mon, Sep 29, 2008 at 9:23 AM, radovan <[EMAIL PROTECTED]> wrote: > > > > Thies Edeling wrote: >> >> radovan wrote: >>> Hallo community, my code looks like this: >>> >>> listView = new ListView(

Re: ListView - modify css for some column

2008-09-29 Thread Korbinian Bachl - privat
you should use DataTable instead of ListView for that; there you can easily manipulate by overriding the getCSS() function of the columns. Best, Korbinian radovan schrieb: Hallo community, my code looks like this: listView = new ListView("collectionIterator", listOfMy

Re: ListView - modify css for some column

2008-09-29 Thread radovan
Thies Edeling wrote: > > radovan wrote: >> Hallo community, my code looks like this: >> >> listView = new ListView("collectionIterator", >> listOfMyItems) { >> >> @Override >> protected void populateItem(ListItem item) { >> MyItem

Re: ListView - modify css for some column

2008-09-29 Thread Thies Edeling
radovan wrote: Hallo community, my code looks like this: listView = new ListView("collectionIterator", listOfMyItems) { @Override protected void populateItem(ListItem item) { MyItem myItem = (MyItem) item.getDefaultModelObject();

RE: ListView and Serialization

2008-09-23 Thread Alexander Anguiano
Fyi: If figured it out, if anyone is interested. By the way, I worked on this for quite a while and only decided to post when I was getting no where. I thought I could use the models somehow, I couldn't figure out how to use them here and I don't think it is possible. What I did is I created uni

RE: listview

2008-09-09 Thread Patel, Sanjay
Thanks. This is what I want. -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 09, 2008 5:01 PM To: users@wicket.apache.org Subject: Re: listview use a gridview -igor On Tue, Sep 9, 2008 at 1:30 PM, Patel, Sanjay <[EMAIL PROTECTED]> wrote

Re: listview

2008-09-09 Thread Igor Vaynberg
use a gridview -igor On Tue, Sep 9, 2008 at 1:30 PM, Patel, Sanjay <[EMAIL PROTECTED]> wrote: > Hi, > > I have a list of String that I want to display using ListView in three > different columns of table. I don't want to split list into three lists > and use three different ListViews. I just want

Re: ListView in Forms

2008-08-11 Thread Markus Haspl
hi, thanks. this works :-) avajon On Sat, Aug 9, 2008 at 1:11 AM, brian.diekelman <[EMAIL PROTECTED]> wrote: > > > There are a few things going on here... try this and see if it does what > you > want it to do. If so reply back and I'll explain what the underlying issue > was: > > TextFiel

Re: ListView in Forms

2008-08-08 Thread brian.diekelman
There are a few things going on here... try this and see if it does what you want it to do. If so reply back and I'll explain what the underlying issue was: TextField propertiesName = new TextField("name",new PropertyModel(pluginProperties, "name")); TextField propertiesValue = new TextField("v

Re: ListView in Forms

2008-08-07 Thread Igor Vaynberg
On Thu, Aug 7, 2008 at 1:36 AM, Markus Haspl <[EMAIL PROTECTED]> wrote: > no, there aren't any errors. > > but i don't understand why i have to use propertiesName.getModelObject(); in > the onSubmit() method. Because there may be hundrets of propertiesName in > the ListView/Form. well, it is the w

Re: ListView in Forms

2008-08-07 Thread Markus Haspl
no, there aren't any errors. but i don't understand why i have to use propertiesName.getModelObject(); in the onSubmit() method. Because there may be hundrets of propertiesName in the ListView/Form. Would it be better to make a Forms in a ListView? But then i need for every Form a submit-button.

RE: ListView in Forms

2008-08-06 Thread Hoover, William
That is an issue in itself ;o) -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 06, 2008 1:00 PM To: users@wicket.apache.org Subject: Re: ListView in Forms listviews dont use item reuse strategies... -igor On Wed, Aug 6, 2008 at 9:25 AM, Hoover

Re: ListView in Forms

2008-08-06 Thread Igor Vaynberg
if there are no errors then you are not using your models properly TextField propertiesName = new TextField("name",new Model(pluginProperties.getName())); to get a value back with a model like that you would have to call propertiesName.getModelObject() -igor On Wed, Aug 6, 2008 at 8:27 AM, Mar

Re: ListView in Forms

2008-08-06 Thread Igor Vaynberg
> thresholdLevel; >break; >case LT: > isValid = activeMessage.getLevel() < > thresholdLevel; >break; >case GT: >

RE: ListView in Forms

2008-08-06 Thread Hoover, William
n isValid; } } } -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 06, 2008 11:04 AM To: users@wicket.apache.org Subject: Re: ListView in Forms add a feedbackpanel and see if there are any validation errors -igor On Wed, Aug 6

Re: ListView in Forms

2008-08-06 Thread Markus Haspl
i thought i have to use it when i need the updatet values... On Wed, Aug 6, 2008 at 4:28 PM, Hoover, William <[EMAIL PROTECTED]> wrote: > Why do you use propertiesList.setReuseItems(true)? > > -Original Message- > From: Markus Haspl [mailto:[EMAIL PROTECTED] > Sent: Wednesday, August 06,

Re: ListView in Forms

2008-08-06 Thread Markus Haspl
there are no valiation errors. with info() i get the old values. info(""+property.getName()+": "+property.getValue()+" == "+property.isDefaultProperty()); On Wed, Aug 6, 2008 at 5:03 PM, Igor Vaynberg <[EMAIL PROTECTED]>wrote: > add a feedbackpanel and see if there are any validation errors > >

Re: ListView in Forms

2008-08-06 Thread Igor Vaynberg
add a feedbackpanel and see if there are any validation errors -igor On Wed, Aug 6, 2008 at 7:19 AM, Markus Haspl <[EMAIL PROTECTED]> wrote: > hi, > > first, i'm a very newbie to wicket... I want to add a ListView in a Form. > The ListView has two Texfields and one Checkbox each row. When i submi

RE: ListView in Forms

2008-08-06 Thread Hoover, William
Why do you use propertiesList.setReuseItems(true)? -Original Message- From: Markus Haspl [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 06, 2008 10:20 AM To: users@wicket.apache.org Subject: ListView in Forms hi, first, i'm a very newbie to wicket... I want to add a ListView in a Fo

RE: ListView is not gettting updated

2008-05-02 Thread Patel, Sanjay
Thanks a lot. It works now. I appreciate. Sanjay. -Original Message- From: Johan Compagner [mailto:[EMAIL PROTECTED] Sent: Friday, May 02, 2008 9:53 AM To: Wicket Users List Subject: Re: ListView is not gettting updated final MyObject object = (MyObject

Re: ListView is not gettting updated

2008-05-02 Thread Johan Compagner
adio on the group. > > Please let me know the better way of doing this. > > Thanks, > Sanjay. > > -Original Message----- > From: Johan Compagner [mailto:[EMAIL PROTECTED] > Sent: Wednesday, April 30, 2008 7:27 PM > To: users@wicket.apache.org > Subject: Re: ListView is not

RE: ListView is not gettting updated

2008-05-02 Thread Patel, Sanjay
Does anyone have any input on this? Help will be appreciated. Thanks, Sanjay -Original Message- From: Patel, Sanjay [mailto:[EMAIL PROTECTED] Sent: Thursday, May 01, 2008 8:52 AM To: users@wicket.apache.org Subject: RE: ListView is not gettting updated I set model of the radio on the

RE: ListView is not gettting updated

2008-05-01 Thread Patel, Sanjay
, 2008 7:27 PM To: users@wicket.apache.org Subject: Re: ListView is not gettting updated And thats logical, your code looks weird. You cant set the model of a radio also on the group. Then the submit will update the selected in the radio groups model. Butthen the radio model is also uopdated. So that

Re: ListView is not gettting updated

2008-04-30 Thread Johan Compagner
IL PROTECTED] > Sent: Wednesday, April 30, 2008 2:02 PM > To: users@wicket.apache.org > Subject: Re: ListView is not gettting updated > > listview.setreuseitems(true), read listview's javadoc > > -igor > > On Wed, Apr 30, 2008 at 10:59 AM, Patel, Sanjay <[EMAIL PR

RE: ListView is not gettting updated

2008-04-30 Thread Patel, Sanjay
il 30, 2008 2:02 PM To: users@wicket.apache.org Subject: Re: ListView is not gettting updated listview.setreuseitems(true), read listview's javadoc -igor On Wed, Apr 30, 2008 at 10:59 AM, Patel, Sanjay <[EMAIL PROTECTED]> wrote: > > Hi, > > I am using ListView and and

Re: ListView is not gettting updated

2008-04-30 Thread Igor Vaynberg
listview.setreuseitems(true), read listview's javadoc -igor On Wed, Apr 30, 2008 at 10:59 AM, Patel, Sanjay <[EMAIL PROTECTED]> wrote: > > Hi, > > I am using ListView and and each item in the listview is RadioGroup. Now > the problem is, If radio1 is selected and I select radio2 and submit >

Re: ListView + SubmitLink + RequiredTextField

2008-04-25 Thread Maurice Marrink
You can use setDefaultFormProcessing(false) on the submitlink. That way you can manually trigger the validation of a single component. Maurice On Fri, Apr 25, 2008 at 3:45 PM, nanotech <[EMAIL PROTECTED]> wrote: > > Hi All, > I have a Required TextField and SubmitLink inside a ListView (which i

Re: ListView + SubmitLink + RequiredTextField

2008-04-25 Thread Martijn Dashorst
submit works on forms not fields. This is basic HTML. So you need to make each row a form instead of all rows in the form. Martijn On 4/25/08, nanotech <[EMAIL PROTECTED]> wrote: > > Hi All, > I have a Required TextField and SubmitLink inside a ListView (which is > dynamic). When I click the

Re: ListView and Threading

2008-04-21 Thread Edvin Syse
Hi Lars, Thank you for the great explanation. I'll read up on Threading and get this one right :)) -- Edvin lars vonk skrev: The iteraton is called with synchronized(tlds) { ... } around, but maybe that's not enough? Should I wrap all calls to setXXX in TldChecker with a synchronized, or even

Re: ListView and Threading

2008-04-21 Thread lars vonk
> > The iteraton is called with synchronized(tlds) { ... } around, but maybe > that's not enough? Should I wrap all calls to setXXX in TldChecker with a > synchronized, or even put synchronized directly on the getters/setters of > Tld? It is important that the read and write operation synchronize

Re: ListView and Threading

2008-04-21 Thread Edvin Syse
Yes, if you want to have an invisible component made visible again via AJAX you have to call setOutputMarkupPlaceholderTag(true) on it, or wrap it in a WebMarkupContainer that is always visible and refresh the container. The component was never fully rendered or returned via AJAX without being v

Re: ListView and Threading

2008-04-21 Thread John Krasnay
On Mon, Apr 21, 2008 at 05:32:08PM +0200, Edvin Syse wrote: > > I know that getVisible() might be called multiple times during a > page-render, so I'm beginning to think that maybe it returns false on the > call that decides wether to include the markup, and then true later on, > creating the m

Re: ListView and Threading

2008-04-21 Thread Edvin Syse
lars vonk wrote: Hi, How is the "done" and "available" flag set in the Tld class by the TldChecker? Since you are using a separate Thread that sets these flags : /* Iterate over the tlds and instantiate a TldChecker */ for(Tld tld : tlds) e.execute(new TldChecker(tld, query)); // Args c

Re: ListView and Threading

2008-04-21 Thread lars vonk
Hi, How is the "done" and "available" flag set in the Tld class by the TldChecker? Since you are using a separate Thread that sets these flags : /* Iterate over the tlds and instantiate a TldChecker */ > for(Tld tld : tlds) >e.execute(new TldChecker(tld, query)); // Args could be for > in

Re: ListView with images and getting absolut path

2008-04-09 Thread Maurice Marrink
URL url = getServletContext().getResource("/WEB-INF/templates/"); will give you a url instead of a file path if that is of any help. You can use getServletContext from within your application. Using tomcat i find this is usually a jndi url. Maurice On Wed, Apr 9, 2008 at 8:49 AM, Igor Vaynberg <[

Re: ListView with images and getting absolut path

2008-04-08 Thread Igor Vaynberg
there are RequestUtils that can convert a wicket relative url to an absolute one, if thats what you are asking. there is no better way for you to get the src because direct access to WEB-INF is not allowed, so you do have to stream it using a middleman such as Image component instead of having the

Re: ListView params from 1.2 to 1.3 - detached data

2008-04-04 Thread Scott Swank
The 2nd constructor, below, takes an id & IModel. http://wicketstuff.org/wicket13doc/org/apache/wicket/markup/html/list/ListView.html ListView(java.lang.String id) ListView(java.lang.String id, IModel model) ListView(java.lang.String id, java.util.List list) - Scott On Fri, Apr 4, 2008 at 9:07

Re: ListView with a Set instead of a List

2008-04-01 Thread Al Maw
// Simply: IModel listModel = new AbstractReadOnlyModel() { public Object getObject() { return new ArrayList(mySet); } }; // Or if you want to wrap a property model (not that this is as nice): IModel listModel = new PropertyModel(bean, "mySetHere") { public Object getObject() {

Re: ListView with a Set instead of a List

2008-04-01 Thread reikje
1> True, but why is it important that is has to be the same collection? I only care about changes being propagated to the ListItems, I don't care if they are contained in a Set within the Model or in a List given to the ListView. In other words, if you are saying, that you have to give the same Li

Re: ListView with a Set instead of a List

2008-03-31 Thread Johan Compagner
1> because you dont have that detacheable list in the listview?? You are just giving a ArrayList directly to the listview 2> i dont see exactly where you call getModelObject on in onsubmit but i guess thats on page? Then it is loaded yes, this has nothing to do with the listview model. On 3/28/08

Re: ListView only ListItem markup with setRenderBodyOnly

2008-03-30 Thread Martijn Dashorst
Use item.setRenderBodyOnly(true) instead Martijn On 3/30/08, reikje <[EMAIL PROTECTED]> wrote: > > Let's say I have a ListView with this markup: > > > | > > [[L

Re: ListView not updating when changed

2008-03-27 Thread Igor Vaynberg
yes, that way in modal window's close callback you have access to the ajax request target -igor On Thu, Mar 27, 2008 at 1:39 PM, taygolf <[EMAIL PROTECTED]> wrote: > > Can I change my popup window from a standard popup window to a modal window. > would that allow me to do what I am wanting to

Re: ListView not updating when changed

2008-03-27 Thread taygolf
Can I change my popup window from a standard popup window to a modal window. would that allow me to do what I am wanting to do. All I want to do is have a main page. on that main page click a link. the link will bring up a popup or a modal window, or a hidden div or what ever that will allow me

Re: ListView not updating when changed

2008-03-27 Thread Igor Vaynberg
i suppose you can try issuing a window.opener.wicket.ajax.get request to trigger an ajax request, but i am not sure how and if xmlhttprequest works across windows... -igor On Thu, Mar 27, 2008 at 7:56 AM, taygolf <[EMAIL PROTECTED]> wrote: > > I would have thought there was another way to do th

Re: ListView not updating when changed

2008-03-27 Thread taygolf
I would have thought there was another way to do this. I can not refresh the whole page because I have other textfields and I will lose the data entered in them on a page refresh. I just want to refresh the markupcontainer that the ListView is in. I guess I need to look into change my popup cla

Re: ListView not updating when changed

2008-03-26 Thread Igor Vaynberg
since its in a different page there isnt much you can do except something like outputting window.opener.refresh(); window.close(); after the form has been submitted -igor On Wed, Mar 26, 2008 at 6:39 PM, taygolf <[EMAIL PROTECTED]> wrote: > > The popup is a different page. Just a simple pa

Re: ListView not updating when changed

2008-03-26 Thread taygolf
The popup is a different page. Just a simple page with 2 textfields and a few check boxes and a submit button and I submit it via a regular post right now but I can change that to ajax if that is what I need to do. igor.vaynberg wrote: > > your popup is a different page or a div inside the cur

Re: ListView not updating when changed

2008-03-26 Thread Igor Vaynberg
your popup is a different page or a div inside the current page? do you submit the form in it via ajax or a regular post? -igor On Wed, Mar 26, 2008 at 3:00 PM, taygolf <[EMAIL PROTECTED]> wrote: > > THanks for explaining it to me igor. I have been doing some searching about > my other problem

Re: ListView not updating when changed

2008-03-26 Thread taygolf
THanks for explaining it to me igor. I have been doing some searching about my other problem. Again my new problem is that I really do not want this listview to refresh on a timer. Here is the process of my app. The user can click on a link that says add member. that link inturn creates a popup pa

Re: ListView not updating when changed

2008-03-26 Thread Igor Vaynberg
On Wed, Mar 26, 2008 at 6:57 AM, taygolf <[EMAIL PROTECTED]> wrote: > > that worked prefect Thanks for the help. I decided to go with the Model > example. I do have a few more questions though. First why cant I use a > PropertyModel instead of a AbstractReadOnlyModel. I tried to do this: > > Ne

RE: ListView not updating when changed

2008-03-26 Thread taygolf
that worked prefect Thanks for the help. I decided to go with the Model example. I do have a few more questions though. First why cant I use a PropertyModel instead of a AbstractReadOnlyModel. I tried to do this: New Label("kmname", new PropertyModel(kmd, "name"); but that did not work. I am gue

Re: ListView not updating when changed

2008-03-25 Thread Igor Vaynberg
ListView lv = new PropertyListView("rows", kmList) { public void populateItem(final ListItem item) { item.add(new Label("kmname")); item.add(new Label("kmsec")); item.add(new Label("kmroles")

<    1   2   3   >