noob question

2010-09-22 Thread sonoerin

I am very new to Wicket, but I have worked thru a few basic tutorials and am
currently reading "Wicket In Action".  I like most every thing I have seen
about Wicket, but I have a particular design problem that I cannot tell if
Wicket supports.

Here is my problem:
My application is a hosted conglomeration of independent sites.   So user A
has an "application" that they log into and can change look/feel that their
customers interact with.  User B also has a website that they access via
URL, interact with along with their customers.  So:

customerA.domain.com
customerB.domain.com


So I am not sure if its best to just have multiple deployments each with
their own Wicket Application/homepage or if there is a way to bundle them
all into a single app that handles each request/response based upon url (for
example).  
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/noob-question-tp2550377p2550377.html
Sent from the Users forum mailing list archive at Nabble.com.

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



how to populate SortableDataProvider

2011-03-22 Thread sonoerin
Hello everyone,

So I feel there is something I am overlooking in all my work on this.  I
have a Wicket 1.4/Spring2.5.6/hibernate 3.2/ app that I cannot get quite
right.  I have a SortableDataProvider that I am trying to populate by:

public class ABCTablePanel extends Panel {

  public ABCTablePanel (String id) {
super(id);
ABCProvider abcProvider = new ABCProvider();
DefaultDataTable table = new DefaultDataTable("abctable", getColumns(),
abcProvider , 10);

add(table);
  }

private List> getColumns() {
  List> result = new
ArrayList>(); 
  result.add( new PropertyColumn(new Model("Abc Description"),
"AbcDescription",
 "AbcDescription" ));
   result.add( new DatePropertyColumn(new Model("Abc Date"), AbcDate",
 "AbcDate" ));
...
 }

}


Then my provider:
public class AbcProvider extends SortableDataProvider {

private List list = new ArrayList( );
private SortableDataProviderComparator comparator = new
SortableDataProviderComparator( );
@SpringBean
private AbcManager abcManager = null;

public AbcProvider( ) {
// The default sorting
setSort( "abc.abcDescription", true );
}

 public void refresh( List list ) {
list.clear( );
list.addAll( abcManager.getAllGaps( ) );
}

@Override
public Iterator iterator( int first, int count ) {
getAllAbcs( );  // method that calls a  manager, calling hibernate,
and populates "list"
List newList = new ArrayList( list );

// Sort the data
Collections.sort( newList, comparator );

// Return the data for the current page - this can be determined
only after sorting
return newList.subList( first, first + count ).iterator( );

}
@Override
public IModel model( final Abc object ) {
return new AbstractReadOnlyModel( ) {
@Override
public AbcgetObject( ) {
return (Abc) object;
}
};
}


When I run this all appears well, except the call is never made to populate
the table. I just get "No Records Found" beneath my column names, and the
debug points are never hit when I refresh or load the page.  

Thank you in advance for any help you can offer.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/how-to-populate-SortableDataProvider-tp3397372p3397372.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: how to populate SortableDataProvider

2011-03-22 Thread sonoerin
I tried changing that list to

   public void refresh( List list ) {
list.clear( );
this.list.addAll( abcManager.getAllGaps( ) );
}

but that didn't seem to make a difference - but I could see how that would
update the wrong list if it was being called.

I can't help but think I have to do something with the DefaultDataTable
columns (even though I am not sure the provider is even being called) as I
am only doing this:

DefaultDataTable table = new DefaultDataTable("abctable", getColumns(),
abcProvider , 10); 
private List>  getColumns() {
List Abc>>  result = new  ArrayList>();
result.add( new PropertyColumn(new Model("Abc Description"), 
"AbcDescription", "AbcDescription" ));
 result.add( new DatePropertyColumn(new Model("Abc Date"), AbcDate",
"AbcDate" )); 


Does the DefaultDataTable  know how to populate each cell with the next
value in the Abc object its being populated?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/how-to-populate-SortableDataProvider-tp3397372p3397546.html
Sent from the Users forum mailing list archive at Nabble.com.

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