;s one.
import org.apache.wicket.model.IChainingModel;
import org.apache.wicket.model.IDetachable;
import org.apache.wicket.model.IModel;
/**
* Basic implementation of {...@link IChainingModel} interface.
*
* @author Daniel Stoch
*
*/
public class ChainingModel implements IChainingModel {
/**
create
> one, can you post yours and post a link to it back on this thread?
>
> Thanks!
>
> --
> Jeremy Thomerson
> http://www.wickettraining.com
>
>
>
> On Wed, Sep 30, 2009 at 4:45 PM, Scott Swank wrote:
>
>> I searched the JIRA for IChainingModel and
JIRA for IChainingModel and didn't get any hits. Did
> anyone create a JIRA issue? Here's an implementation of mine.
>
> public class BaseChainingModel implements IChainingModel {
>private static final long serialVersionUID = 1L;
>private Object target;
>
>
I searched the JIRA for IChainingModel and didn't get any hits. Did
anyone create a JIRA issue? Here's an implementation of mine.
public class BaseChainingModel implements IChainingModel {
private static final long serialVersionUID = 1L;
private Object target;
,First of all, I'm using wicket 1.3.5
>
> I'm writing a model and ai need it to be "chaineable". I mean, I need this
> model to contain another model, so my model can obtain the data, for
> example, from a property model.
> Ok, I've been reading and this is solv
Hi all,First of all, I'm using wicket 1.3.5
I'm writing a model and ai need it to be "chaineable". I mean, I need this
model to contain another model, so my model can obtain the data, for
example, from a property model.
Ok, I've been reading and this is solved by t
gt; expression with "object" to get the value out?
>
> -igor
>
> On Thu, Dec 4, 2008 at 7:31 AM, jWeekend <[EMAIL PROTECTED]>
> wrote:
>>
>> John,
>>
>> Well spotted. AbstractPropertyModel implements IChainingModel but breaks
>> its
>&g
... In my rush to get out I hit post instead of preview. Now I've come back
and reviewed it here's a completed and *corrected* version, hopefully a bit
clearer and precise. Excuse any confusion caused.
Jeremy,
AbstractPropertyModel _should_ implement IChainingModel; this tells us
Jeremy,
People will find your blog entry useful, but this issue is a bit more
specific.
AbstractPropertyModel _should_ implement IChainingModel, that's how you know
it _should_ dig values out model objects which r themselves models.
Now try this:
public class TestPropertyModelsChainin
(tmp == object)
break;
object = tmp;
}
return object;
}
John - I think you're right - it is unnecessary to implement IChainingModel
since there is no code in the wicket core codebase that calls it's methods.
Just make sure that if you nest models inside of ot
when you give propertymodel anoter imodel do you have to begin the
expression with "object" to get the value out?
-igor
On Thu, Dec 4, 2008 at 7:31 AM, jWeekend <[EMAIL PROTECTED]> wrote:
>
> John,
>
> Well spotted. AbstractPropertyModel implements IChainingMod
John,
Well spotted. AbstractPropertyModel implements IChainingModel but breaks its
contract :
* Models that implement this interface will support chaining of IModels.
getObject() of a
* IChainingModel should do something like:
*
*
* if ( object instanceof IModel) { return ((IModel)object
Hi,
I'm messing about with nested models and see the IChainingModel interface
which is implemented by the PropertyModels but its methods never actually
seems to be used.
So I'm just checking that I haven't missed anything... for nested models I
don't actually need to impleme
On Monday 12 November 2007 22:13:33 ChuckDeal wrote:
> > You're right. But if you were not using List you could return SortedSet
> > from
> > SortingModel and it would work :)
>
> But then I'd be using a Set instead of a List. DropDownChoice (via
> AbstractChoice) expects the choices model to repr
eded and then the sort would take place.
>
> You're right. But if you were not using List you could return SortedSet
> from
> SortingModel and it would work :)
>
But then I'd be using a Set instead of a List. DropDownChoice (via
AbstractChoice) expects the choices model to repre
On Thursday 08 November 2007 23:28:40 ChuckDeal wrote:
> > Perhaps I didn't get the explanation but why can't you wrap models in
> > this order?
> >
> > AppendingListModel(
> > SortingModel(
> > HibernateListModel()
> > )
> > )
>
> In that order the list would be sorting PRIOR to ap
Johan Compagner wrote:
>
>>
>>
>> SortingModel (IChainingModel) -> AppendingListModel
>> (IComponentAssignmentModel) -> HibernateListModel (database oriented
>> model
>> that returns a list of items from the db, unsorted).
>
>
>
> So
Dmitry Kandalov wrote:
>
> On Wednesday 07 November 2007 01:18:32 ChuckDeal wrote:
>
>> SortingModel (IChainingModel) -> AppendingListModel
>> (IComponentAssignmentModel) -> HibernateListModel (database oriented
>> model
>> that returns a list of items
On Wednesday 07 November 2007 01:18:32 ChuckDeal wrote:
> SortingModel (IChainingModel) -> AppendingListModel
> (IComponentAssignmentModel) -> HibernateListModel (database oriented model
> that returns a list of items from the db, unsorted).
Perhaps I didn't get the explanati
>
>
> SortingModel (IChainingModel) -> AppendingListModel
> (IComponentAssignmentModel) -> HibernateListModel (database oriented model
> that returns a list of items from the db, unsorted).
So the sorting model is the outside one that you give to the component
But if we
is doing X?
>
yes, that's it, roughly.
Johan Compagner wrote:
>
> But what do you give to the component then? And why must is wrap?
>
> johan
>
I don't know if you'll be able to see it from this description, but here is
a specific scenario.
SortingModel (IC
. Previously, I had extended the
> HibernateListModel
> > to
> > make a SortableHibernateListModel, which worked very well. However,
> That
> > style of adding features gets cumbersome as you try to add new features
> > in.
> > For instance, next was a FilterableHi
ed to
> sort).
>
> So, I tried another approach whereby I would chain the operations
> together.
> So, I created a SortingModel that implements the IChainingModel interface
> and then stuck the HibernateListModel inside of it. And that still
> worked.
> But, in another
ch whereby I would chain the operations
> together.
> So, I created a SortingModel that implements the IChainingModel interface
> and then stuck the HibernateListModel inside of it. And that still
> worked.
> But, in another place, the model that I put into the SortingModel
> (IChaini
sort).
So, I tried another approach whereby I would chain the operations together.
So, I created a SortingModel that implements the IChainingModel interface
and then stuck the HibernateListModel inside of it. And that still worked.
But, in another place, the model that I put into the
25 matches
Mail list logo