RE: wicket 1.4 release

2008-10-01 Thread Stefan Lindner
It's clear that it's not possible to estimate the release of 1.4 final. But can 
anybody tell us whether a new snapshot (1.4M4) is in sight?

Stefan

-Ursprüngliche Nachricht-
Von: Timo Rantalaiho [mailto:[EMAIL PROTECTED] 
Gesendet: Donnerstag, 2. Oktober 2008 05:37
An: users@wicket.apache.org
Betreff: Re: wicket 1.4 release

On Wed, 01 Oct 2008, lesterburlap wrote:
> I've searched everywhere and can't find an answer.  I know this is kind of a
> crappy question to ask the developers...
> 
> Is there an estimate for a Wicket 1.4 GA release?  Will it possibly be by
> January 2009?

I think that it's impossible to estimate the releases of a 
volunteer-based open source projects in any meaningful way, 
unfortunately. If others know better, please pipe in.

You can always follow the number of open issues

  
https://issues.apache.org/jira/secure/IssueNavigator.jspa?reset=true&&pid=12310561&fixfor=12313295&resolution=-1&sorter/field=issuekey&sorter/order=DESC

  ( http://tinurl.us/a2b895 )

but there might be some new ones coming in as well. Also 
work continues on 1.3.5 at the same time (fortunately, many 
of the issues can probably be fixed to both at the same time).

Your good patches to the issues are bound to make the 
release happen earlier ;)

> I need to make a decision about whether or not to upgrade to 1.4-m3 from
> 1.3. while intending to upgrade to 1.4 GA prior to my product release in
> January.  I need some stuff that's in 1.4, but I can't release our product
> with beta libraries included.

Fortunately, there is not a lot of special testing for the 
releases, so a milestone is nearly good enough ;) What's more 
problematic with releasing with a milestone dependency are 
the possible API breaks.

Best wishes,
Timo

-- 
Timo Rantalaiho   
Reaktor Innovations Oyhttp://www.ri.fi/ >

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: wicket and hibernate

2008-10-01 Thread overseastars

Hi Flavius

Very impressive. Many thanks. I learnt a lot. But I still have a question.
For example, I know I should use Dao to access the persistence layer. Let's
say I have 2 entities which means two classes in java. I put them in the
source folder. Once I start the server, I guess they wont help me create the
schema and tables because there should be a config file hibernate.cfg.xml.
Now I dont have that file, I have a HibernateUtil.java which contains codes
like following:
public static void main(String[] args) {
// TODO Auto-generated method stub

//  Configuration config = new Configuration().configure();
AnnotationConfiguration config = new AnnotationConfiguration();

config.addAnnotatedClass(com.xingxing.autotable.User.class);
config.addAnnotatedClass(com.xingxing.autotable.Address.class);
config.addAnnotatedClass(com.xingxing.autotable.Person.class);

config.addAnnotatedClass(com.xingxing.autotable.CreditCard.class);
config.setProperty("hibernate.show_sql", "true");
config.setProperty("hibernate.format_sql", "true");
config.setProperty("hibernate.dialect",
"org.hibernate.dialect.MySQLDialect");
config.setProperty("hibernate.connection.driver_class",
"com.mysql.jdbc.Driver");
//  
config.setProperty("hibernate.connection.createDataBaseIfNotExist",
"true");
config.setProperty("hibernate.connection.url",
"jdbc:mysql://localhost/test?createDatabaseIfNotExist=true");
config.setProperty("hibernate.connection.autocommit", "true");
config.setProperty("hibernate.connection.username", "root");
config.setProperty("hibernate.connection.password", "passw0rd");
config.setProperty("c3p0.min_size", "5");
config.setProperty("c3p0.max_size", "20");
config.setProperty("c3p0.timeout", "1800");
config.setProperty("c3p0.max_statements", "50");
config.setProperty("hibernate.hbm2dll.auto", "create");

System.out.println("Creating Tables.");
SchemaExport schemaExport = new SchemaExport(config);
schemaExport.create(true, true);

}


How can I just this code to run my Eclipse Dynamic Web Project so that it
will create the schema and tables

I need more java files?? Or I have to use hibernate.cfg.xml file ?? Even if
the above is not a Main function, I guess I have to call this part from
somewhere in wicket layer? Would you please show me a way..

Regards






Flavius wrote:
> 
> 
> Here's how I do it.
> 
> I have my wicket layer call a service layer, which calls a DAO.
> I'm not a big fan of a lot of layers and I like to keep my projects
> flat.
> 
> So, if you want a list of users on a page, for example, you can
> use any of the canned wicket tables.  Those are pretty nice.
> I use DefaultDataTable unless I need something special.  So in
> your page class you do something like
> 
> DefaultDataTable defaultDataTable = new DefaultDataTable("table",
> columnsList, new SortableUserDataProvider(userFilter), 10);
> 
> If this doesn't make sense look at the DefaultDataTable.java class in the
> wicket examples.
> 
> In my SortableUserDataProvider, I pass in a filter obj depending on what
> the user
> is asking for.  This includes any search criteria, sort options, paging,
> etc.
> 
> My SortableUserDataProvider calls my service.  That preps the hibernate
> query
> and calls my dao.
> 
> So for the SortableUserDataProvider you want to override the iterator()
> method,
> something like:
> 
> public Iterator iterator(int first, int count)
>   {
>   SortParam sp = getSort();
> 
>   userFilter.setFirstRecord(first);
>   userFilter.setRecordsToReturn(count);
>   userFilter.setSortCol(sp.getProperty());
>   userFilter.setSortAsc(sp.isAscending());
> 
>   return UserService.getUsers(userFilter).iterator();
>   }
> 
> I prep my queries in my service layer.  So something like
> 
> Criteria userCriteria = session.createCriteria(User.class)
> .setFirstResult(filter.getFirstRecord())
> //other filter info here as needed
> 
> List userList = userCriteria.list();
> 
> Hibernate returns models and lists of models, and wicket
> uses models and lists of models.  
> 
> The only catch with this is your web layer is getting hibernate
> aware models, not POJOs.  So if it's a closed system where nobody
> else hits your hibernate code, you're fine.  If the service layer
> is an SOA type arch, you'll need to convert your hibernate models
> (or the list), to equivalent pojos on select and vice-versa on saves.
> 
> 
> The only thing I did which I regret was I defined my collections 
> in hibernate as Lists instead of sets.  I did this becau

Re: AjaxSelfUpdatingTimerBehavior - how many of them I can add to one page?

2008-10-01 Thread Jeremy Thomerson
Artur,
  While this is not directly related to your question, you might consider
not using the AjaxSelfUpdatingTimerBehavior at all.  If all you are
refreshing is an IMG tag within a list view, you might consider just adding
your own javascript that reloads that image every N seconds.  Otherwise, you
will incur two hits to the server - one just to repaint the image tag, which
presumably doesn't change because it's pointing to the same URL, and the
second to request the new image, at the same URL.

  Of course, as a side note, anytime you are refreshing an image, you may
want to append a non-used query parameter to the image URL to avoid browser
caching.  Something like:
http://myserver.com/camera1.jpg?timestamp=121212121 (commonly the current
time in milliseconds is used for this).  This can also be done from raw JS
with no Ajax behavior.

Hope this helps,
-- 
Jeremy Thomerson
http://www.wickettraining.com

On Wed, Oct 1, 2008 at 6:40 AM, Artur W. <[EMAIL PROTECTED]> wrote:

>
> Hi!
>
>
> Nino.Martinez wrote:
> >
> > Hmm why not put it on the refreshingview or even the page.. Instead of
> > the cells? Unless it's extremly important the cells are processed at
> > different times I cant see any reason why to have it on individual
> > cells. And it will only clutter your js calls putting extra stress on
> > server and client.
> >
>
> Every cell has a different refresh time. The cells show the pictures from
> different internet's cameras.
>
> Do you know about any limitation when using AjaxSelfUpdatingTimerBehavior?
>
>
> Thanks in advance,
> Artur
>
>
>
> --
> View this message in context:
> http://www.nabble.com/AjaxSelfUpdatingTimerBehavior---how-many-of-them-I-can-add-to-one-page--tp19757365p19758676.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: wicket 1.4 release

2008-10-01 Thread Timo Rantalaiho
On Wed, 01 Oct 2008, lesterburlap wrote:
> I've searched everywhere and can't find an answer.  I know this is kind of a
> crappy question to ask the developers...
> 
> Is there an estimate for a Wicket 1.4 GA release?  Will it possibly be by
> January 2009?

I think that it's impossible to estimate the releases of a 
volunteer-based open source projects in any meaningful way, 
unfortunately. If others know better, please pipe in.

You can always follow the number of open issues

  
https://issues.apache.org/jira/secure/IssueNavigator.jspa?reset=true&&pid=12310561&fixfor=12313295&resolution=-1&sorter/field=issuekey&sorter/order=DESC

  ( http://tinurl.us/a2b895 )

but there might be some new ones coming in as well. Also 
work continues on 1.3.5 at the same time (fortunately, many 
of the issues can probably be fixed to both at the same time).

Your good patches to the issues are bound to make the 
release happen earlier ;)

> I need to make a decision about whether or not to upgrade to 1.4-m3 from
> 1.3. while intending to upgrade to 1.4 GA prior to my product release in
> January.  I need some stuff that's in 1.4, but I can't release our product
> with beta libraries included.

Fortunately, there is not a lot of special testing for the 
releases, so a milestone is nearly good enough ;) What's more 
problematic with releasing with a milestone dependency are 
the possible API breaks.

Best wishes,
Timo

-- 
Timo Rantalaiho   
Reaktor Innovations Oyhttp://www.ri.fi/ >

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: DefaultDataTable with date column

2008-10-01 Thread Jeremy Thomerson
The default java.util.Date converter within Wicket has varied between
releases.  I suggest adding this to the init method of your application
class and controlling the date format yourself if you need a specific
format:

((ConverterLocator) getConverterLocator()).set(Date.class, new
IConverter() {
private static final long serialVersionUID = 1L;
private final DateFormat mFormat = new
SimpleDateFormat("MM/dd/yy hh:mm:ss.SSS");
public Date convertToObject(String value, Locale locale) {
try {
return mFormat.parse(value);
} catch (ParseException e) {
e.printStackTrace();
}
return null;
}

public String convertToString(Date value, Locale locale) {
return mFormat.format(value);
}

});

-- 
Jeremy Thomerson
http://www.wickettraining.com


On Wed, Oct 1, 2008 at 6:15 PM, Phil Grimm <[EMAIL PROTECTED]> wrote:

> Pablo,
>
> I'm displaying a date, pretty much the same way.
> But it only displays the date (eg. 9/13/08).
>columns.add(new PropertyColumn(new Model("Publish Date"),
> "publishDate", "publishDate"));
>
> My "publishDate" field is a java.util.Date.
> I suspect the DataTable is just calling "toString()" on the Date object.
>
> Phil
>
> On Wed, Oct 1, 2008 at 5:44 PM, Pablo S. <[EMAIL PROTECTED]> wrote:
>
> > Sorry, I have not explained more in detail.
> > I know how to format a date, but I'm using the DefaultDataTable component
> > so inside the component is filling the data taking the info from my model
> > object.
> > I have this code:
> >
> > List> columns = new ArrayList>();
> > columns.add(new PropertyColumn(new Model("Delivery Date"),
> > "deliveryDate", "deliveryDate"));
> > ...
> > DefaultDataTable table = new DefaultDataTable("table", columns, new
> > SortableDocumentDataProvider(docs), 8);
> > ...
> >
> > also I have this class:
> >
> > public class SortableDocumentDataProvider extends
> > SortableDataProvider{
> > ...
> >
> > and Document has a Date property, called "deliveryDate"
> >
> > When the html is rendered, the date appears as "00:00" instead of
> > "2000/01/02". The only way I found, to solve this, is adding a String
> > property that represents the date in the format I want, but I suppose
> that
> > should exist a better solution.
> >
> > Thanks
> > Pablo
> > --
> > From: "Edgar Merino" <[EMAIL PROTECTED]>
> > Sent: Wednesday, October 01, 2008 7:28 PM
> > To: 
> > Subject: Re: DefaultDataTable with date column
> >
> >
> >  Use java.text.DateFormat for that matter (take a look at
> SimpleDateFormat
> >> in case you need more control over how you want your date to be
> formatted).
> >>
> >> Edgar Merino
> >>
> >>
> >> Pablo S. escribió:
> >>
> >>> Hi, I would like to know how I can format a value from 1 column that is
> a
> >>> date. I've a sortable dataprovider that contains my object, and one of
> the
> >>> fields is a date. The html table shows the digits of the hour of the
> date
> >>> (example: "00:00") instead of  something like this "2000/02/03"
> >>>
> >>> Thanks
> >>> Pablo
> >>>
> >>>
> >>>
> >>> -
> >>> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>> For additional commands, e-mail: [EMAIL PROTECTED]
> >>>
> >>>
> >>>
> >>
> >> -
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >>
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
> Phil Grimm
> Mobile: (858) 335-3426
> Skype: philgrimm336
>


wicket 1.4 release

2008-10-01 Thread lesterburlap

Hi:

I've searched everywhere and can't find an answer.  I know this is kind of a
crappy question to ask the developers...

Is there an estimate for a Wicket 1.4 GA release?  Will it possibly be by
January 2009?

I need to make a decision about whether or not to upgrade to 1.4-m3 from
1.3. while intending to upgrade to 1.4 GA prior to my product release in
January.  I need some stuff that's in 1.4, but I can't release our product
with beta libraries included.

Again, sorry to bug.

I love Wicket,
LBB
-- 
View this message in context: 
http://www.nabble.com/wicket-1.4-release-tp19772502p19772502.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: wicket and hibernate

2008-10-01 Thread Flavius


Here's how I do it.

I have my wicket layer call a service layer, which calls a DAO.
I'm not a big fan of a lot of layers and I like to keep my projects
flat.

So, if you want a list of users on a page, for example, you can
use any of the canned wicket tables.  Those are pretty nice.
I use DefaultDataTable unless I need something special.  So in
your page class you do something like

DefaultDataTable defaultDataTable = new DefaultDataTable("table",
columnsList, new SortableUserDataProvider(userFilter), 10);

If this doesn't make sense look at the DefaultDataTable.java class in the
wicket examples.

In my SortableUserDataProvider, I pass in a filter obj depending on what the
user
is asking for.  This includes any search criteria, sort options, paging,
etc.

My SortableUserDataProvider calls my service.  That preps the hibernate
query
and calls my dao.

So for the SortableUserDataProvider you want to override the iterator()
method,
something like:

public Iterator iterator(int first, int count)
{
SortParam sp = getSort();

userFilter.setFirstRecord(first);
userFilter.setRecordsToReturn(count);
userFilter.setSortCol(sp.getProperty());
userFilter.setSortAsc(sp.isAscending());

return UserService.getUsers(userFilter).iterator();
}

I prep my queries in my service layer.  So something like

Criteria userCriteria = session.createCriteria(User.class)
.setFirstResult(filter.getFirstRecord())
//other filter info here as needed

List userList = userCriteria.list();

Hibernate returns models and lists of models, and wicket
uses models and lists of models.  

The only catch with this is your web layer is getting hibernate
aware models, not POJOs.  So if it's a closed system where nobody
else hits your hibernate code, you're fine.  If the service layer
is an SOA type arch, you'll need to convert your hibernate models
(or the list), to equivalent pojos on select and vice-versa on saves.


The only thing I did which I regret was I defined my collections 
in hibernate as Lists instead of sets.  I did this because wicket 
takes a list as a param in a lot of places and Lists are generally 
easier to work with.

But hibernate treats Lists as bags and when you are doing eager fetches
on multiple collections, Hibernate will complain.  
It won't let you fetch multiple bags simultaneously.  It used to though.
They keep threatening to fix it.

http://opensource.atlassian.com/projects/hibernate/browse/HHH-1718

-- 
View this message in context: 
http://www.nabble.com/wicket-and-hibernate-tp19767474p19772328.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Having Wicket append #someanchor

2008-10-01 Thread Craig Tataryn
Ahh there's the guy I've been looking for :)

On Wed, Oct 1, 2008 at 8:24 PM, Igor Vaynberg <[EMAIL PROTECTED]>wrote:

> a bump after 6 hours...really?
>
> -igor
>
> On Wed, Oct 1, 2008 at 6:19 PM, Craig Tataryn <[EMAIL PROTECTED]> wrote:
> > *bump*
> >
> > On Wed, Oct 1, 2008 at 2:04 PM, Craig Tataryn <[EMAIL PROTECTED]>
> wrote:
> >
> >> I was wondering if there is a way to have Wicket append some anchor
> >> information to a response page?
> >>
> >> So if I were on: MyPage.html, then they click a submit button and the
> >> server side codes does a setResponsePage(MyPage.class) I would want the
> >> actual page to be MyPage.html#someanchor
> >>
> >> A suggestion on ##wicket was to do a redirect through
> httpServletResponse
> >> and rewrite the url myself, but I wanted to know if Wicket supported
> this a
> >> bit more "out of the box"
> >>
> >> Thanks!
> >>
> >> Craig.
> >>
> >> --
> >> Craig Tataryn
> >> site: http://www.basementcoders.com/
> >> podcast:http://feeds.feedburner.com/TheBasementCoders
> >> irc: ThaDon on freenode #basementcoders, ##wicket, #papernapkin
> >> im: [EMAIL PROTECTED], skype: craig.tataryn
> >>
> >
> >
> >
> > --
> > Craig Tataryn
> > site: http://www.basementcoders.com/
> > podcast:http://feeds.feedburner.com/TheBasementCoders
> > irc: ThaDon on freenode #basementcoders, ##wicket, #papernapkin
> > im: [EMAIL PROTECTED], skype: craig.tataryn
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Craig Tataryn
site: http://www.basementcoders.com/
podcast:http://feeds.feedburner.com/TheBasementCoders
irc: ThaDon on freenode #basementcoders, ##wicket, #papernapkin
im: [EMAIL PROTECTED], skype: craig.tataryn


Re: wicket:link, markup inheritance and packages

2008-10-01 Thread Adriano dos Santos Fernandes

Should I create a Jira issue for this?

(using BookmarkablePageLink works correctly)


Adriano


Adriano dos Santos Fernandes wrote:

Hi!

I've created a BasePage.html/java in directory/package mm.sistema.web. 
Its body is:


   

   
   Home
   ADM0190F
   
   
   

   

   

In same directory I have the HomePage.html, with this body:

   

   
   

   

So far, so good. But my mm.sistema.web.adm.ADM0190F inherits from 
BasePage. When rendering it, an error happens:


   java.lang.NoClassDefFoundError: IllegalName: mm/sistema/web/HomePage
   java.lang.ClassLoader.preDefineClass(ClassLoader.java:476)
   java.lang.ClassLoader.defineClass(ClassLoader.java:614)
   ...

Note llegalName is HomePage. It seems Wicket tries to locate things in 
wrong place.


Is it a Wicket bug, or I'm doing something wrong?

How can I accomplish what I want?

Thanks,


Adriano



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Having Wicket append #someanchor

2008-10-01 Thread Igor Vaynberg
a bump after 6 hours...really?

-igor

On Wed, Oct 1, 2008 at 6:19 PM, Craig Tataryn <[EMAIL PROTECTED]> wrote:
> *bump*
>
> On Wed, Oct 1, 2008 at 2:04 PM, Craig Tataryn <[EMAIL PROTECTED]> wrote:
>
>> I was wondering if there is a way to have Wicket append some anchor
>> information to a response page?
>>
>> So if I were on: MyPage.html, then they click a submit button and the
>> server side codes does a setResponsePage(MyPage.class) I would want the
>> actual page to be MyPage.html#someanchor
>>
>> A suggestion on ##wicket was to do a redirect through httpServletResponse
>> and rewrite the url myself, but I wanted to know if Wicket supported this a
>> bit more "out of the box"
>>
>> Thanks!
>>
>> Craig.
>>
>> --
>> Craig Tataryn
>> site: http://www.basementcoders.com/
>> podcast:http://feeds.feedburner.com/TheBasementCoders
>> irc: ThaDon on freenode #basementcoders, ##wicket, #papernapkin
>> im: [EMAIL PROTECTED], skype: craig.tataryn
>>
>
>
>
> --
> Craig Tataryn
> site: http://www.basementcoders.com/
> podcast:http://feeds.feedburner.com/TheBasementCoders
> irc: ThaDon on freenode #basementcoders, ##wicket, #papernapkin
> im: [EMAIL PROTECTED], skype: craig.tataryn
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Having Wicket append #someanchor

2008-10-01 Thread Craig Tataryn
*bump*

On Wed, Oct 1, 2008 at 2:04 PM, Craig Tataryn <[EMAIL PROTECTED]> wrote:

> I was wondering if there is a way to have Wicket append some anchor
> information to a response page?
>
> So if I were on: MyPage.html, then they click a submit button and the
> server side codes does a setResponsePage(MyPage.class) I would want the
> actual page to be MyPage.html#someanchor
>
> A suggestion on ##wicket was to do a redirect through httpServletResponse
> and rewrite the url myself, but I wanted to know if Wicket supported this a
> bit more "out of the box"
>
> Thanks!
>
> Craig.
>
> --
> Craig Tataryn
> site: http://www.basementcoders.com/
> podcast:http://feeds.feedburner.com/TheBasementCoders
> irc: ThaDon on freenode #basementcoders, ##wicket, #papernapkin
> im: [EMAIL PROTECTED], skype: craig.tataryn
>



-- 
Craig Tataryn
site: http://www.basementcoders.com/
podcast:http://feeds.feedburner.com/TheBasementCoders
irc: ThaDon on freenode #basementcoders, ##wicket, #papernapkin
im: [EMAIL PROTECTED], skype: craig.tataryn


Re: linking to a text ResourceReference

2008-10-01 Thread Ryan McKinley
Thanks igor!

another message of yours helped too:
http://www.nabble.com/Generate-URL-for-a-Resource-depending-on-component-state-td18941798.html

for the record, here is some code for the next guy searching the archives...

public class OpenFlashChart extends Panel implements IResourceListener
{
  static final ResourceReference SWF = new ResourceReference(
OpenFlashChart.class, "open-flash-chart.swf" );

  final WebResource jsonResource;
  final SWFObject swf;

  public OpenFlashChart(String id, final int width, final int height)
  {
this( id, width+"", height+"" );
  }

  public OpenFlashChart(String id, final String width, final String height)
  {
super(id);

final IResourceStream json = new AbstractStringResourceStream(
"text/plain") {
  @Override
  public String getString() {
return "YOUR STRING HERE...";
  }
};

jsonResource = new WebResource() {
  @Override
  public IResourceStream getResourceStream() {
return json;
  }
};
jsonResource.setCacheable(false);

String swfURL = RequestUtils.toAbsolutePath( urlFor( SWF ).toString() );
swf = new SWFObject( "chart", swfURL, "500", "300" );
add( swf );
  }

  @Override
  protected void onBeforeRender() {
CharSequence dataPath =
  RequestCycle.get().urlFor(OpenFlashChart.this,
IResourceListener.INTERFACE);

String data = RequestUtils.toAbsolutePath( dataPath.toString() );

swf.setFlashvar( "data-file", data );
swf.setParam( "allowScriptAccess", "sameDomain" );

super.onBeforeRender();
  }

  /**
   * Actually handle the request
   */
  @Override
  public void onResourceRequested() {
jsonResource.onResourceRequested();
  }
}


On Tue, Sep 30, 2008 at 10:39 PM, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> call urlfor(resourcereference)
>
> -igor
>
> On Tue, Sep 30, 2008 at 6:08 PM, Ryan McKinley <[EMAIL PROTECTED]> wrote:
>> Hello-
>>
>> I know I have seen an example of this somewhere, so i'm feeling kinda silly
>> as I ask for help
>>
>> I am trying to integrate Open Flash Charts (OFC) with wicket.  You pass OFC
>> a url containing json to draw a chart.  Something like:
>>
>>  
>>  var so = new SWFObject("/open-flash-chart.swf", "chart", "500", "300", "9",
>> "#FF");
>>  so.addVariable("data-file", "${TODO -- need to have link to data}" );
>>  so.addParam("allowScriptAccess", "sameDomain");
>>  so.write("my_chart");
>>  
>>
>> I know I can use a global mount point, but I'm looking to do something
>> similar to how JFreeChart works
>> http://cwiki.apache.org/WICKET/jfreechart-and-wicket-example.html
>>
>> Where you have a Chart object in the Component scope and various actions can
>> manipulate it.
>>
>> I can create a WebResource -- but how would I pass the URL to javascript?
>>
>> Any pointers would be great!
>> thanks
>> ryan
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: DefaultDataTable with date column

2008-10-01 Thread Phil Grimm
Pablo,

I'm displaying a date, pretty much the same way.
But it only displays the date (eg. 9/13/08).
columns.add(new PropertyColumn(new Model("Publish Date"),
"publishDate", "publishDate"));

My "publishDate" field is a java.util.Date.
I suspect the DataTable is just calling "toString()" on the Date object.

Phil

On Wed, Oct 1, 2008 at 5:44 PM, Pablo S. <[EMAIL PROTECTED]> wrote:

> Sorry, I have not explained more in detail.
> I know how to format a date, but I'm using the DefaultDataTable component
> so inside the component is filling the data taking the info from my model
> object.
> I have this code:
>
> List> columns = new ArrayList>();
> columns.add(new PropertyColumn(new Model("Delivery Date"),
> "deliveryDate", "deliveryDate"));
> ...
> DefaultDataTable table = new DefaultDataTable("table", columns, new
> SortableDocumentDataProvider(docs), 8);
> ...
>
> also I have this class:
>
> public class SortableDocumentDataProvider extends
> SortableDataProvider{
> ...
>
> and Document has a Date property, called "deliveryDate"
>
> When the html is rendered, the date appears as "00:00" instead of
> "2000/01/02". The only way I found, to solve this, is adding a String
> property that represents the date in the format I want, but I suppose that
> should exist a better solution.
>
> Thanks
> Pablo
> --
> From: "Edgar Merino" <[EMAIL PROTECTED]>
> Sent: Wednesday, October 01, 2008 7:28 PM
> To: 
> Subject: Re: DefaultDataTable with date column
>
>
>  Use java.text.DateFormat for that matter (take a look at SimpleDateFormat
>> in case you need more control over how you want your date to be formatted).
>>
>> Edgar Merino
>>
>>
>> Pablo S. escribió:
>>
>>> Hi, I would like to know how I can format a value from 1 column that is a
>>> date. I've a sortable dataprovider that contains my object, and one of the
>>> fields is a date. The html table shows the digits of the hour of the date
>>> (example: "00:00") instead of  something like this "2000/02/03"
>>>
>>> Thanks
>>> Pablo
>>>
>>>
>>>
>>> -
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Phil Grimm
Mobile: (858) 335-3426
Skype: philgrimm336


Re: DefaultDataTable with date column

2008-10-01 Thread Pablo S.

Sorry, I have not explained more in detail.
I know how to format a date, but I'm using the DefaultDataTable component so 
inside the component is filling the data taking the info from my model 
object.

I have this code:

List> columns = new ArrayList>();
columns.add(new PropertyColumn(new Model("Delivery Date"), 
"deliveryDate", "deliveryDate"));

...
DefaultDataTable table = new DefaultDataTable("table", columns, new 
SortableDocumentDataProvider(docs), 8);

...

also I have this class:

public class SortableDocumentDataProvider extends 
SortableDataProvider{

...

and Document has a Date property, called "deliveryDate"

When the html is rendered, the date appears as "00:00" instead of 
"2000/01/02". The only way I found, to solve this, is adding a String 
property that represents the date in the format I want, but I suppose that 
should exist a better solution.


Thanks
Pablo
--
From: "Edgar Merino" <[EMAIL PROTECTED]>
Sent: Wednesday, October 01, 2008 7:28 PM
To: 
Subject: Re: DefaultDataTable with date column

Use java.text.DateFormat for that matter (take a look at SimpleDateFormat 
in case you need more control over how you want your date to be 
formatted).


Edgar Merino


Pablo S. escribió:
Hi, I would like to know how I can format a value from 1 column that is a 
date. I've a sortable dataprovider that contains my object, and one of 
the fields is a date. The html table shows the digits of the hour of the 
date (example: "00:00") instead of  something like this "2000/02/03"


Thanks
Pablo



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: DefaultDataTable with date column

2008-10-01 Thread Edgar Merino
Use java.text.DateFormat for that matter (take a look at 
SimpleDateFormat in case you need more control over how you want your 
date to be formatted).


Edgar Merino


Pablo S. escribió:
Hi, I would like to know how I can format a value from 1 column that 
is a date. I've a sortable dataprovider that contains my object, and 
one of the fields is a date. The html table shows the digits of the 
hour of the date (example: "00:00") instead of  something like this 
"2000/02/03"


Thanks
Pablo



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DefaultDataTable with date column

2008-10-01 Thread Pablo S.
Hi, I would like to know how I can format a value from 1 column that is a 
date. I've a sortable dataprovider that contains my object, and one of the 
fields is a date. The html table shows the digits of the hour of the date 
(example: "00:00") instead of  something like this "2000/02/03"


Thanks
Pablo



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: RepeatingView: add new component at specified index

2008-10-01 Thread Edgar Merino

Thank you!

Edgar Merino


Igor Vaynberg escribió:

you can override renderiterator() and return one that iterates
chlildren in any order you wish

-igor

On Tue, Sep 30, 2008 at 4:34 PM, Edgar Merino <[EMAIL PROTECTED]> wrote:
  

Hello again,

  I'm using version 1.3.4 (will wait until the generics version reach its
final state), the functionality I need with the RepeatingView is because I
want a BasePage to contain a right panel (represented by a RepeatingView),
where other panels can be added to it. But this may be done extending that
BasePage and then adding the needed panels at the specified index given.
I've seen the MarkupContainer implementation, and it holds its sequence of
elements in an Object (children), but access to it is private (because of
various operations that need to be performed before casting it to a List,
array or leaving it as an object).

  I think this can be accomplished by adding all the needed panels to a List
and call a method at the end of the BasePage's children so all those panels
get added to the RepeatingView in the specified order. Is there some way to
make this automatic from the BasePage, so I can avoid having all the
children of BasePage call that specific method at the end of its
constructor? (perhaps, using a callback? will onBeforeRender() work?).

Edgar Merino



Igor Vaynberg escribió:


in 1.4 there is markupcontainer.swap()

-igor

On Tue, Sep 30, 2008 at 3:40 AM, Edgar Merino <[EMAIL PROTECTED]> wrote:

  

Hello,

 is there any way to control the underlaying Collection a
WebMarkupContainer holds? So I can control where to insert the new
components to be added (with an index, for example). Thanks in advance.

Edgar Merino

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Seamless Wicket

2008-10-01 Thread Paolo Di Tommaso
A really interesting post showing how integrate Wicket in the lastest JBoss
Seam.

http://in.relation.to/Bloggers/SeamlessWicket

Enjoy, Paolo


Re: wicket and hibernate

2008-10-01 Thread Piller Sébastien

Hi,

Have a look at 
http://wicketstuff.org/confluence/display/STUFFWIKI/Wicket-Iolite



overseastars a écrit :

Hi

I just wanna know how to integrate wicket and hibernate??

can someone give me a simple example  even just one entity is ok. I have
my entities(hibernate annotation) ready and I have no ideas of making them
work together. If any buddy can send me an example project, I will really
appreciate it. Thanks in advance.

Regards
  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: About helloworld

2008-10-01 Thread James Carman
If you're using maven, you can run mvn eclipse:eclipse to set up
everything you need to run your project in Eclipse.  Or,
alternatively, you can use the m2eclipse plugin.

On Wed, Oct 1, 2008 at 3:40 PM, overseastars <[EMAIL PROTECTED]> wrote:
>
>
> Thanks Jeremy.
>
> thanks for your recommendations. Since they didnt show exactly how to setup
> their *special* environment, all three tutorials are not really helpful to
> make a small helloworld wicket run in eclipse as a dynamic web
> project..I actually failed many times even if I followed exactly what
> they say.
>
> Anyway, I figured this out by myself. But I still wanna say thank you.
>
>
>
>
> Jeremy Thomerson-5 wrote:
>>
>> I would recommend starting with one of these locations:
>>
>> QuickStart (creates your project and everything needed for a Hello World
>> with Maven):
>> http://wicket.apache.org/quickstart.html
>>
>> Wicket in Action (a must-have resource if you're going to do Wicket
>> programming):
>> http://manning.com/dashorst
>>
>> Hello World instructions:
>> http://wicket.apache.org/examplehelloworld.html
>>
>> --
>> Jeremy Thomerson
>> http://www.wickettraining.com
>>
>>
>>
>> On Wed, Oct 1, 2008 at 1:10 PM, overseastars <[EMAIL PROTECTED]> wrote:
>>
>>>
>>> Hi All
>>>
>>> I dont believe even a helloworld in wicket is so hard. I just simply
>>> created
>>> a new dynamic web project in eclipse and add that wicket1.3.4 jar file
>>> into
>>> the build path. Then I follow the helloworld sample and copy all three
>>> files
>>> into the project, like two java and one html file into the source and
>>> changed the web.xml.
>>>
>>> finally i got nothing but a http404 error. Can anyone give a really
>>> useful
>>> tutorial ? all I need is just a helloworld now, with wicket
>>> 1.3.4...Thanks a lot.
>>> --
>>> View this message in context:
>>> http://www.nabble.com/About-helloworld-tp19766150p19766150.html
>>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>>
>>>
>>> -
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>
>>
>
> --
> View this message in context: 
> http://www.nabble.com/About-helloworld-tp19766150p19767595.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Sequence of wicket (ajax) requests

2008-10-01 Thread rmorrisey

Igor,

I was thinking about doing it with onBeginRequest(), something like:
AIMSSession session = (AIMSSession)getSession();
synchronized (session) {
try {
//Wait for my turn
while (session.hasActiveRequest()) {
session.wait();
}
//My turn
session.setActiveRequest(true);
}
catch (InterruptedException e) {
getLog().error("Interrupted waiting for 
request synch", e);
}
}

and in onEndRequest:
AIMSSession session = (AIMSSession)getSession();
synchronized (session) {
session.setActiveRequest(false);
session.notify();
}

however I got worried that if there is some error and onEndRequest is never
called, my thread will be stuck endlessly. I looked at how wicket
synchronizes the mutator parts; it looks like it does:
RequestCycle.steps()
   RequestCycle.step()
WebRequestCycleProcessor.resolve()
  synchronized(requestCycle.getSession())
  ...
   RequestCycle.detach()
RequestCycle.onEndRequest()

I thought that if I could promote the synchronized() block up to
RequestCycle.steps() it would be the safest solution. Does this seem like it
makes sense?:

private final void steps()
{
synchronized (getSession())
{
try/finally...
}
}

I am testing it out (by placing my custom RequestCycle.java earlier in my
classpath) and it seems to work OK. Can you think of any issues with this
approach? and if not is it possible to open up the "final" or provide some
other mechanism so that I don't have to duplicate RequestCycle in full?


igor.vaynberg wrote:
> 
> sure, in onbeginrequest of your request cycle sync on session
> 
> -igor
> 
> On Wed, Oct 1, 2008 at 9:34 AM, rmorrisey <[EMAIL PROTECTED]> wrote:
>>
>> Igor, Matej, thanks for the replies -
>>
>> I would like to guarantee that only one request cycle is running at a
>> time
>> (for a given wicket session). Is it possible for me to tweak wicket to
>> expanded the part that is synchronized to encompass the RequestCycle's
>> onEndRequest?
>>
>>
>> igor.vaynberg wrote:
>>>
>>> there can be two request cycles running, sure
>>>
>>> it is only the part that accesses and mutates the page is synchronized
>>> for higher throughput
>>>
>>> -igor
>>>
>>> On Wed, Oct 1, 2008 at 9:02 AM, rmorrisey <[EMAIL PROTECTED]> wrote:

 Is it possible for two request cycles to be running on the server
 concurrently against the same page/wicket session (including ajax
 requests)?
 I was thinking that wicket forces the requests to be processed
 sequentially
 (so that the two request cycles can't be handled at the same time), but
 it
 seems like this is not the case
 --
 View this message in context:
 http://www.nabble.com/Sequence-of-wicket-%28ajax%29-requests-tp19763696p19763696.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


>>>
>>> -
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Sequence-of-wicket-%28ajax%29-requests-tp19763696p19764365.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Sequence-of-wicket-%28ajax%29-requests-tp19763696p19767653.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: About helloworld

2008-10-01 Thread overseastars


Thanks Jeremy. 

thanks for your recommendations. Since they didnt show exactly how to setup
their *special* environment, all three tutorials are not really helpful to
make a small helloworld wicket run in eclipse as a dynamic web
project..I actually failed many times even if I followed exactly what
they say.

Anyway, I figured this out by myself. But I still wanna say thank you.




Jeremy Thomerson-5 wrote:
> 
> I would recommend starting with one of these locations:
> 
> QuickStart (creates your project and everything needed for a Hello World
> with Maven):
> http://wicket.apache.org/quickstart.html
> 
> Wicket in Action (a must-have resource if you're going to do Wicket
> programming):
> http://manning.com/dashorst
> 
> Hello World instructions:
> http://wicket.apache.org/examplehelloworld.html
> 
> -- 
> Jeremy Thomerson
> http://www.wickettraining.com
> 
> 
> 
> On Wed, Oct 1, 2008 at 1:10 PM, overseastars <[EMAIL PROTECTED]> wrote:
> 
>>
>> Hi All
>>
>> I dont believe even a helloworld in wicket is so hard. I just simply
>> created
>> a new dynamic web project in eclipse and add that wicket1.3.4 jar file
>> into
>> the build path. Then I follow the helloworld sample and copy all three
>> files
>> into the project, like two java and one html file into the source and
>> changed the web.xml.
>>
>> finally i got nothing but a http404 error. Can anyone give a really
>> useful
>> tutorial ? all I need is just a helloworld now, with wicket
>> 1.3.4...Thanks a lot.
>> --
>> View this message in context:
>> http://www.nabble.com/About-helloworld-tp19766150p19766150.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/About-helloworld-tp19766150p19767595.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



wicket and hibernate

2008-10-01 Thread overseastars

Hi

I just wanna know how to integrate wicket and hibernate??

can someone give me a simple example  even just one entity is ok. I have
my entities(hibernate annotation) ready and I have no ideas of making them
work together. If any buddy can send me an example project, I will really
appreciate it. Thanks in advance.

Regards
-- 
View this message in context: 
http://www.nabble.com/wicket-and-hibernate-tp19767474p19767474.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Having Wicket append #someanchor

2008-10-01 Thread Craig Tataryn
I was wondering if there is a way to have Wicket append some anchor
information to a response page?

So if I were on: MyPage.html, then they click a submit button and the server
side codes does a setResponsePage(MyPage.class) I would want the actual page
to be MyPage.html#someanchor

A suggestion on ##wicket was to do a redirect through httpServletResponse
and rewrite the url myself, but I wanted to know if Wicket supported this a
bit more "out of the box"

Thanks!

Craig.

-- 
Craig Tataryn
site: http://www.basementcoders.com/
podcast:http://feeds.feedburner.com/TheBasementCoders
irc: ThaDon on freenode #basementcoders, ##wicket, #papernapkin
im: [EMAIL PROTECTED], skype: craig.tataryn


Re: About helloworld

2008-10-01 Thread Jeremy Thomerson
I would recommend starting with one of these locations:

QuickStart (creates your project and everything needed for a Hello World
with Maven):
http://wicket.apache.org/quickstart.html

Wicket in Action (a must-have resource if you're going to do Wicket
programming):
http://manning.com/dashorst

Hello World instructions:
http://wicket.apache.org/examplehelloworld.html

-- 
Jeremy Thomerson
http://www.wickettraining.com



On Wed, Oct 1, 2008 at 1:10 PM, overseastars <[EMAIL PROTECTED]> wrote:

>
> Hi All
>
> I dont believe even a helloworld in wicket is so hard. I just simply
> created
> a new dynamic web project in eclipse and add that wicket1.3.4 jar file into
> the build path. Then I follow the helloworld sample and copy all three
> files
> into the project, like two java and one html file into the source and
> changed the web.xml.
>
> finally i got nothing but a http404 error. Can anyone give a really useful
> tutorial ? all I need is just a helloworld now, with wicket
> 1.3.4...Thanks a lot.
> --
> View this message in context:
> http://www.nabble.com/About-helloworld-tp19766150p19766150.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


About helloworld

2008-10-01 Thread overseastars

Hi All

I dont believe even a helloworld in wicket is so hard. I just simply created
a new dynamic web project in eclipse and add that wicket1.3.4 jar file into
the build path. Then I follow the helloworld sample and copy all three files
into the project, like two java and one html file into the source and
changed the web.xml.

finally i got nothing but a http404 error. Can anyone give a really useful
tutorial ? all I need is just a helloworld now, with wicket
1.3.4...Thanks a lot.
-- 
View this message in context: 
http://www.nabble.com/About-helloworld-tp19766150p19766150.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Wicket CMS functionality for updating text and adding links

2008-10-01 Thread unka_hahrry

Hello!

I'm looking for some CMS functionality that that give me the opportunity to
update a text in a given div-tag. My first approach was to put the text into
 tags and then overwrite the corresponding .properties file,
using a textarea for updating the text and BufferedWriter for overwriting
the .properties file.
2 problems occured: 
1) In deployment mode the changes don't take effect (except you set
resourceSettings.setResourcePollFrequency(Duration d))
2) I have no idea how to add a link to this text pointing to a page inside
my application

I also take a look at Brix, the Wicket-based CMS, but there is only little
documentation and examples and so it's difficult for me to understand.

It would be very nice if someone could offer me a possiblity how to solve
this problem.

-- 
View this message in context: 
http://www.nabble.com/Wicket-CMS-functionality-for-updating-text-and-adding-links-tp19765748p19765748.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problem when using AjaxSubmitLinks outside of a Form

2008-10-01 Thread Igor Vaynberg
open a jira issue, looks like a bug to me

-igor

On Wed, Oct 1, 2008 at 10:11 AM, Pieter van Prooijen
<[EMAIL PROTECTED]> wrote:
> Hello,
>
> I'm using an AjaxSubmitLink outside of a Form and want to disable the
> default form processing (validation etc.) when submitting via this link.
> But that doesn't work, the validation is always executed:
>
> add(new AjaxSubmitLink("submit-link", form)
> {
>  {
>setDefaultFormProcessing(false); // Don't validate the input.
>  }
>  // onSubmit() goes here ...
> }
>
> After some digging in the 1.3.4 source,
> it looks like  the defaultFormProcessing property of this link is never
> read by the form, because it can't find the link as the submitting
> component. This happens because the form property of the AjaxSubmitLink
> is never set in the constructor. The constructor of AjaxSubmitLink
> reads:
>
> public AjaxSubmitLink(String id, final Form form)
> {
>  super(id);
>  ...
> }
>
> instead of:
>
> public AjaxSubmitLink(String id, final Form form)
> {
>  super(id, form)
>  ...
> }
>
> Should I report this as a bug or am I forgetting something in my code ?
>
> If necessary I can supply a simple page which shows the problem with a
> textfield and a submit link.
>
> Thank you for your time,
>
> Pieter van Prooijen
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Problem when using AjaxSubmitLinks outside of a Form

2008-10-01 Thread Pieter van Prooijen
Hello,

I'm using an AjaxSubmitLink outside of a Form and want to disable the
default form processing (validation etc.) when submitting via this link.
But that doesn't work, the validation is always executed:

add(new AjaxSubmitLink("submit-link", form)
{
  {
setDefaultFormProcessing(false); // Don't validate the input.
  }
  // onSubmit() goes here ...  
}

After some digging in the 1.3.4 source, 
it looks like  the defaultFormProcessing property of this link is never
read by the form, because it can't find the link as the submitting
component. This happens because the form property of the AjaxSubmitLink
is never set in the constructor. The constructor of AjaxSubmitLink
reads:

public AjaxSubmitLink(String id, final Form form)
{
  super(id);
  ...
}

instead of: 

public AjaxSubmitLink(String id, final Form form)
{
  super(id, form)
  ...
}

Should I report this as a bug or am I forgetting something in my code ?

If necessary I can supply a simple page which shows the problem with a
textfield and a submit link.

Thank you for your time,

Pieter van Prooijen



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: PropertyModel type of key map

2008-10-01 Thread Igor Vaynberg
i think that interface is legacy left over code. open a jira issue to
have it cleaned up.

-igor

On Wed, Oct 1, 2008 at 12:34 AM, dlipski <[EMAIL PROTECTED]> wrote:
>
> Ok, maybe you are right that adding such method to PropertyModel will make it
> bloated, but I think that some model dedicated to work with maps(MapModel ?)
> will be nice feature of Wicket.
>
> I know that questions bellow dont stick to the subject of this thread but
> maybe you can help me with them. Recently i started to 'study' Wicket API
> and Wicket sources and have two questions(so far ;)):
>
> 1)What IChainingModel interface is for ? I thought that it will be used
> inside model implementations in getObject method checkig if nested model
> object is a ChainingModel object but the instance of operator in this
> methods checks against IModel interface (what is correct). If I understand
> Wicket API correctly it is possible to implement some model with chainnig
> ability without implementing IChaininig model - its internal implementation
> of get/setObject methods. Could you explain me what I(or rather my model)
> gain when my model implements IChaininigModel interface ?
>
> 2)When I looked at getTarget() method inside  PropertyModel class I found
> that retriving of model object is done inside a loop. I dont understand why
> PropertyModel cares about how nested model is implemented. Why it cares ?
> because it checks if object returned but nested model is another nested
> model or not. I thought that retriving of model object is responisbility of
> each model class individually and PropertyModel should only check if its
> model object is IModel object (if so return
> ((IModel)myModelObject).getObject) or is it a 'real' model object(if so
> return it).
>
> Answers for this questions will help me implementing my MapModel class.
>
> Tanks for your help,
> Regards Daniel
>
>
> igor.vaynberg wrote:
>>
>> why? because propertymodel is a convinience class only. once we start
>> adding things like this into it it will get bloated. it is pretty easy
>> to roll your own implementing imodel directly.
>>
>> -igor
>>
>> On Tue, Sep 30, 2008 at 10:53 AM, dlipski <[EMAIL PROTECTED]>
>> wrote:
>>>
>>> If there is no option to force (why? I can imagine setMapKeyClass method
>>> in
>>> PropertyModel...) PropertyModel to do this and I have to use different
>>> Model, I would like to ask does Wicket(or one of Wicket subprojects such
>>> as
>>> WicketExtensions) provide such ready to use model ?
>>>
>>> Daniel Lipski
>>>
>>> igor.vaynberg wrote:

 dont use a property model, roll your own

 -igor

 On Tue, Sep 30, 2008 at 8:31 AM, dlipski <[EMAIL PROTECTED]>
 wrote:
>
> Hi
>
> Im trying to 'force' PropertyModel to put into map key different then
> String
> but after few trials I have no idea how to do this.
>
> Example:
> I have field myMap in my page initialized as follows:
>
> Map myMap = new HashMap();
>
> then I create property model for my page(this == page containing myMap
> field):
> PropertyModel p = new PropertyModel (this, "myMap[123]");
>
> now when I execute:
> p.setObject(true);
> model puts into map expected boolean but key is of type String not
> Long.
> How I can force this property model to put with key of choosen class
> (in
> this example Long)?
>
> Regards
> Daniel Lipski
> --
> View this message in context:
> http://www.nabble.com/PropertyModel-type-of-key-map-tp19744489p19744489.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/PropertyModel-type-of-key-map-tp19744489p19747226.html
>>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>>
>>>
>>> -
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>
> --
> View this message in context: 
> http://www.nabble.com/PropertyModel-type-of-key-map-tp19744489p19755807.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---

Re: Inmethod Grid with wicket 1.3

2008-10-01 Thread Jim Pinkham
Nice.

OK, now I'm getting more ideas - I added more columns, but now I'd like some
to use other input controls such as checkbox, radiobutton, datepicker, or
ChoiceList.

I see EditablePropertyColumn has newCellPanel I could override to return
Panels with various input component types in edit mode.

Before I embark on this, perhaps you have some ideas to share about this?

If there is some minor refactoring involved, I'm not afraid to jump in and
help if it also benefits others.

For example, these Panels could benefit from the way TextFieldPanel puts
feedback into title, which suggests to me a new class such as
AbstractEditablePropertyColumn where this could be moved.  I also notice
that CheckBoxColumn has the concern of being a row-selector that could be
separated into RowSelectingCheckBoxColumn, for example (leaving the name
CheckBoxColumn available as the obvious choice for editing any boolean
column).

That could be step one, then once that works, the next step could be for the
light-weight propertycolumn (currently newCell just puts value into
response) to use these same corresponding panels in disabled mode.

I know that's a lot to ask, but it seems a reasonable next level to aim
for...   Thoughts?

Thanks,
-- Jim.

On Tue, Sep 30, 2008 at 2:40 PM, Matej Knopp <[EMAIL PROTECTED]> wrote:

> If you don't use multiple select than you can override
> CheckBoxColumn#newHeader(String componentId) and return panel that
> displays the title you want to show.
>
> -Matej
>
> On Tue, Sep 30, 2008 at 6:11 PM, Jim Pinkham <[EMAIL PROTECTED]> wrote:
> > Got that working.  Now, since I'm using row selection to indicate
> > deletion, and since I've disabled row multiselect (so rows get deleted
> > one-at-a-time), I'd like to give the checkbox column a header: new
> > Model("Delete"), but I don't see a way to do that.  I was able to
> > override getHeaderModel, but isVisible is false in the HeadPanel.
> >
> > Can I visit the component by attribute name somehow to do it?
> >
> > Really appreciate the help - it's starting to look good.  Since I'm
> > using a pageSize of 500, avoiding the page refresh allows me to have
> > super-simple yet snappy interface for non web-savvy proofreaders.
> >
> > Thanks,
> > -- Jim.
> >
> > On Tue, Sep 30, 2008 at 10:27 AM, Matej Knopp <[EMAIL PROTECTED]>
> wrote:
> >> If you want to save the entity, SubmitCancelColumn is indeed the right
> >> place. but you should be overriding the onSubmitted method. As for
> >> custom delete link in SubmitCancelColumn, that might be a bit
> >> problematic as the panel is package private.
> >>
> >> Anyway, I usually don't put the delete link in that column, it doesn't
> >> make much sense IMHO. WhatI do is to add CheckBoxColumn and a separate
> >> delete link that removes all checked items.
> >>
> >> -Matej
> >>
> >> On Tue, Sep 30, 2008 at 3:54 PM, Jim Pinkham <[EMAIL PROTECTED]>
> wrote:
> >>> OK, now a question about using inmethod grid:  (I really like this
> >>> grid, by the way - awesome work Matej!!)
> >>>
> >>> On a grid with some editable columns, I override setItemEdit to use
> >>> the same grid in non-editable mode, and also to save the edits.
> >>>
> >>>if (enableEdits)
> >>>columns.add(new SubmitCancelColumn("esd", new
> Model("Edit")));
> >>>DataGrid grid = new DefaultDataGrid("grid", new
> MyDataSource(), columns) {
> >>>@Override
> >>>public void setItemEdit(IModel rowModel, boolean
> edit) {
> >>>if (enableEdits) {
> >>>super.setItemEdit(rowModel,
> edit);
> >>>if (!edit)
> >>>// dao save row goes
> here
> >>>}
> >>>}
> >>>};
> >>>
> >>> I think the IDataSource is very clear, but it is for loading. For
> >>> updating, is this appropriate, or am I overlooking a simpler/better
> >>> way?
> >>>
> >>> Then, I would like to add a delete link inside the SubmitCancelColumn
> >>> - has anyone already done that?  I'm thinking it would only be visible
> >>> if editMode is false to share the same screen space with the ok/cancel
> >>> icons.
> >>>
> >>> I suppose a blank line to add a new row at the end would be nice too,
> >>> but I think I can figure that out myself...
> >>>
> >>> Thanks,
> >>> -- Jim.
> >>>
> >>> On Mon, Sep 29, 2008 at 5:57 PM, Jim Pinkham <[EMAIL PROTECTED]>
> wrote:
>  That did the trick, thanks a million!
> 
>  On Mon, Sep 29, 2008 at 5:20 PM, Matej Knopp <[EMAIL PROTECTED]>
> wrote:
> > I don't think the grid snapshots in maven are recent enough. You
> > should fetch it from svn and build it yourself if you want to use it.
> > Also keep in mind that grid version for 1.3 is in the 1.3 branch of
> > wicket stuff, not the trunk:
> >
> >
> http://wicket-stuf

Re: Sequence of wicket (ajax) requests

2008-10-01 Thread Igor Vaynberg
sure, in onbeginrequest of your request cycle sync on session

-igor

On Wed, Oct 1, 2008 at 9:34 AM, rmorrisey <[EMAIL PROTECTED]> wrote:
>
> Igor, Matej, thanks for the replies -
>
> I would like to guarantee that only one request cycle is running at a time
> (for a given wicket session). Is it possible for me to tweak wicket to
> expanded the part that is synchronized to encompass the RequestCycle's
> onEndRequest?
>
>
> igor.vaynberg wrote:
>>
>> there can be two request cycles running, sure
>>
>> it is only the part that accesses and mutates the page is synchronized
>> for higher throughput
>>
>> -igor
>>
>> On Wed, Oct 1, 2008 at 9:02 AM, rmorrisey <[EMAIL PROTECTED]> wrote:
>>>
>>> Is it possible for two request cycles to be running on the server
>>> concurrently against the same page/wicket session (including ajax
>>> requests)?
>>> I was thinking that wicket forces the requests to be processed
>>> sequentially
>>> (so that the two request cycles can't be handled at the same time), but
>>> it
>>> seems like this is not the case
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Sequence-of-wicket-%28ajax%29-requests-tp19763696p19763696.html
>>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>>
>>>
>>> -
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>
> --
> View this message in context: 
> http://www.nabble.com/Sequence-of-wicket-%28ajax%29-requests-tp19763696p19764365.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Sequence of wicket (ajax) requests

2008-10-01 Thread rmorrisey

Igor, Matej, thanks for the replies -

I would like to guarantee that only one request cycle is running at a time
(for a given wicket session). Is it possible for me to tweak wicket to
expanded the part that is synchronized to encompass the RequestCycle's
onEndRequest?


igor.vaynberg wrote:
> 
> there can be two request cycles running, sure
> 
> it is only the part that accesses and mutates the page is synchronized
> for higher throughput
> 
> -igor
> 
> On Wed, Oct 1, 2008 at 9:02 AM, rmorrisey <[EMAIL PROTECTED]> wrote:
>>
>> Is it possible for two request cycles to be running on the server
>> concurrently against the same page/wicket session (including ajax
>> requests)?
>> I was thinking that wicket forces the requests to be processed
>> sequentially
>> (so that the two request cycles can't be handled at the same time), but
>> it
>> seems like this is not the case
>> --
>> View this message in context:
>> http://www.nabble.com/Sequence-of-wicket-%28ajax%29-requests-tp19763696p19763696.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Sequence-of-wicket-%28ajax%29-requests-tp19763696p19764365.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: wicket 1.3.4/wicket-contrib-javaee compilation error

2008-10-01 Thread Marc Ende
Yes of course I tried to download the sources from repository. But the
connection (to the svn-repo) was so slow that my client timed out.
So no way to get it...

Anyway, It's good to know that's only a dependency missing.

By the way: I think that it would be a good idea to give a hint
regarding this dependency on the website when offering a jar-download.

m.



Igor Vaynberg schrieb:
> whether or not there is a repository has nothing to do with it
> 
> after you download and mvn install the project it will be in your local repo
> when you add it as a dependency to your project wicket-ioc will be
> brought in via transitive dependency because it is declared in
> javaee's pom.
> 
> -igor
> 
> On Wed, Oct 1, 2008 at 9:02 AM, Marc Ende <[EMAIL PROTECTED]> wrote:
>> a) Thanks for the help, I'll try that tomorrow.
>> b) I _have_ used maven but there is NO repository
>> which contains this wicket-contrib-javaee lib.
>> Can you point me to a repository containing this project?
>>
>> m.
>>
>> Igor Vaynberg schrieb:
>>> you are missing wicket-ioc jar, you should really use maven to manage
>>> your dependencies if you dont know how to do that yourself.
>>>
>>> -igor
>>>
>>> On Wed, Oct 1, 2008 at 3:00 AM, Marc Ende <[EMAIL PROTECTED]> wrote:
 Hi,

 I wanted to use the wicket-contrib-javaee extension to use annotations for
 my beans.
 Following the steps in the doc I have added
   addComponentInstantiationListener(new JavaEEComponentInjector(this));
 to my applications init() method.

 The application-class is an extended AuthenticatedWebApplication because I
 need
 jaas authentication in the application.

 When I tried to compile the application I received the following error:

 [INFO]
 
 [ERROR] BUILD FAILURE
 [INFO]
 
 [INFO] Compilation failure
 D:\java\workspace\itf.as\itf.web\src\main\java\itf\web\ItfWebApplication.java:[36,36]
 cannot access org.apache.wicket.injection.ComponentInjector
 class file for org.apache.wicket.injection.ComponentInjector not found
   addComponentInstantiationListener(new
 JavaEEComponentInjector(this));



 D:\java\workspace\itf.as\itf.web\src\main\java\itf\web\ItfWebApplication.java:[36,36]
 cannot access org.apache.wicket.injection.ComponentInjector
 class file for org.apache.wicket.injection.ComponentInjector not found
   addComponentInstantiationListener(new
 JavaEEComponentInjector(this));

 Does anybody have an Idea? I'm using Wicket 1.3.4, Wicket-Auth-Roles 1.3.4
 and Wicket-contrib-javaee 1.1 (latest downloadable)

 Yours

 Marc

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


>>> -
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>
>>
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 




signature.asc
Description: OpenPGP digital signature


Re: Sequence of wicket (ajax) requests

2008-10-01 Thread Matej Knopp
Ajax requests are queued on the client side, so for same page there
would not be two paralel ajax request. It is possible to have more
queues on the client side, but even if you do that, the requests are
still synced on page serverside.

-Matej

On Wed, Oct 1, 2008 at 6:02 PM, rmorrisey <[EMAIL PROTECTED]> wrote:
>
> Is it possible for two request cycles to be running on the server
> concurrently against the same page/wicket session (including ajax requests)?
> I was thinking that wicket forces the requests to be processed sequentially
> (so that the two request cycles can't be handled at the same time), but it
> seems like this is not the case
> --
> View this message in context: 
> http://www.nabble.com/Sequence-of-wicket-%28ajax%29-requests-tp19763696p19763696.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problem building, and problem with SpringWebApplicationFactory

2008-10-01 Thread Igor Vaynberg
the project builds fine and all tests pass on our teamcity instance:
wicketstuff.org/teamcity
so it must be the patch you applied

-igor

On Wed, Oct 1, 2008 at 5:56 AM, Wilhelmsen Tor Iver <[EMAIL PROTECTED]> wrote:
> I got this error during tests when trying to build latest source from
> trunk:
>
> junit.framework.AssertionFailedError: expected:<304> but was:<200>
>at junit.framework.Assert.fail(Assert.java:47)
>at junit.framework.Assert.failNotEquals(Assert.java:282)
>at junit.framework.Assert.assertEquals(Assert.java:64)
>at junit.framework.Assert.assertEquals(Assert.java:201)
>at junit.framework.Assert.assertEquals(Assert.java:207)
>at
> org.apache.wicket.protocol.http.WicketFilterTest.testNotModifiedResponse
> IncludesExpiresHeader(WicketFilterTest.java:106)
>
> The only difference I have in my source tree is that I have applied the
> "portlet 2.0 patch" so portlet-related classes differ...
>
> However, the real reason I did sync with trunk was to see if it resolved
> an issue we have with SpringWebApplicationFactory complaining that the
> context has more than one WebApplication defined; This is in a web
> application acting as a portlet provider for two portlets, which have
> their own Application classes because of the need to mount bookmarkable
> pages for VIEW/EDIT and using different path selectors for the portlets.
> The exception we get is:
>
> java.lang.IllegalStateException: more then one bean of type
> [org.apache.wicket.protocol.http.WebApplication] found, must have only
> one
>at
> org.apache.wicket.spring.SpringWebApplicationFactory.createApplication(S
> pringWebApplicationFactory.java:112)
>at
> org.apache.wicket.spring.SpringWebApplicationFactory.createApplication(S
> pringWebApplicationFactory.java:86)
>at
> org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:578)
>
> ... though the Javadocs for SpringWebApplicationFactory says you can
> have multiple Applications as ong as you use the beanName parameter,
> which we do.
>
> Any suggestions? Can we bypass the mounting problem by having a URL
> coding strategy which takes care of splitting out the "base path" and
> pass to a delegate of some sort?
>
> - Tor Iver
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Sequence of wicket (ajax) requests

2008-10-01 Thread Igor Vaynberg
there can be two request cycles running, sure

it is only the part that accesses and mutates the page is synchronized
for higher throughput

-igor

On Wed, Oct 1, 2008 at 9:02 AM, rmorrisey <[EMAIL PROTECTED]> wrote:
>
> Is it possible for two request cycles to be running on the server
> concurrently against the same page/wicket session (including ajax requests)?
> I was thinking that wicket forces the requests to be processed sequentially
> (so that the two request cycles can't be handled at the same time), but it
> seems like this is not the case
> --
> View this message in context: 
> http://www.nabble.com/Sequence-of-wicket-%28ajax%29-requests-tp19763696p19763696.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: wicket 1.3.4/wicket-contrib-javaee compilation error

2008-10-01 Thread Igor Vaynberg
whether or not there is a repository has nothing to do with it

after you download and mvn install the project it will be in your local repo
when you add it as a dependency to your project wicket-ioc will be
brought in via transitive dependency because it is declared in
javaee's pom.

-igor

On Wed, Oct 1, 2008 at 9:02 AM, Marc Ende <[EMAIL PROTECTED]> wrote:
> a) Thanks for the help, I'll try that tomorrow.
> b) I _have_ used maven but there is NO repository
> which contains this wicket-contrib-javaee lib.
> Can you point me to a repository containing this project?
>
> m.
>
> Igor Vaynberg schrieb:
>> you are missing wicket-ioc jar, you should really use maven to manage
>> your dependencies if you dont know how to do that yourself.
>>
>> -igor
>>
>> On Wed, Oct 1, 2008 at 3:00 AM, Marc Ende <[EMAIL PROTECTED]> wrote:
>>> Hi,
>>>
>>> I wanted to use the wicket-contrib-javaee extension to use annotations for
>>> my beans.
>>> Following the steps in the doc I have added
>>>   addComponentInstantiationListener(new JavaEEComponentInjector(this));
>>> to my applications init() method.
>>>
>>> The application-class is an extended AuthenticatedWebApplication because I
>>> need
>>> jaas authentication in the application.
>>>
>>> When I tried to compile the application I received the following error:
>>>
>>> [INFO]
>>> 
>>> [ERROR] BUILD FAILURE
>>> [INFO]
>>> 
>>> [INFO] Compilation failure
>>> D:\java\workspace\itf.as\itf.web\src\main\java\itf\web\ItfWebApplication.java:[36,36]
>>> cannot access org.apache.wicket.injection.ComponentInjector
>>> class file for org.apache.wicket.injection.ComponentInjector not found
>>>   addComponentInstantiationListener(new
>>> JavaEEComponentInjector(this));
>>>
>>>
>>>
>>> D:\java\workspace\itf.as\itf.web\src\main\java\itf\web\ItfWebApplication.java:[36,36]
>>> cannot access org.apache.wicket.injection.ComponentInjector
>>> class file for org.apache.wicket.injection.ComponentInjector not found
>>>   addComponentInstantiationListener(new
>>> JavaEEComponentInjector(this));
>>>
>>> Does anybody have an Idea? I'm using Wicket 1.3.4, Wicket-Auth-Roles 1.3.4
>>> and Wicket-contrib-javaee 1.1 (latest downloadable)
>>>
>>> Yours
>>>
>>> Marc
>>>
>>> -
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to get rid of wicket:id in XML output

2008-10-01 Thread Igor Vaynberg
that should work, got a quickstart?

-igor

On Wed, Oct 1, 2008 at 5:24 AM, Stefan Lindner <[EMAIL PROTECTED]> wrote:
> I'm trying to build a dynamic site map according to Michael Sparers
> article
> http://cwiki.apache.org/WICKET/seo-search-engine-optimization.html
> Instead of an HTML page a XML page is used with XML markup looking like
>
>
>http://www.sitemaps.org/schemas/sitemap/0.9";>
>   
>http://www.example.com/
>2005-01-01
>monthly
>0.8
>
>
>
> When I use a ListView for "urlList" and add Labels for "locNode" etc.
> the wicket:id properties are included in the XML output.
>
> How can I get rid of wicket:id? Setting a global
> "getMarkupSettings().setStripWicketTags(true)" does not work.
>
> I use Wicket 1.4M3
>
> Stefan
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: wicket 1.3.4/wicket-contrib-javaee compilation error

2008-10-01 Thread Marc Ende
a) Thanks for the help, I'll try that tomorrow.
b) I _have_ used maven but there is NO repository
which contains this wicket-contrib-javaee lib.
Can you point me to a repository containing this project?

m.

Igor Vaynberg schrieb:
> you are missing wicket-ioc jar, you should really use maven to manage
> your dependencies if you dont know how to do that yourself.
> 
> -igor
> 
> On Wed, Oct 1, 2008 at 3:00 AM, Marc Ende <[EMAIL PROTECTED]> wrote:
>> Hi,
>>
>> I wanted to use the wicket-contrib-javaee extension to use annotations for
>> my beans.
>> Following the steps in the doc I have added
>>   addComponentInstantiationListener(new JavaEEComponentInjector(this));
>> to my applications init() method.
>>
>> The application-class is an extended AuthenticatedWebApplication because I
>> need
>> jaas authentication in the application.
>>
>> When I tried to compile the application I received the following error:
>>
>> [INFO]
>> 
>> [ERROR] BUILD FAILURE
>> [INFO]
>> 
>> [INFO] Compilation failure
>> D:\java\workspace\itf.as\itf.web\src\main\java\itf\web\ItfWebApplication.java:[36,36]
>> cannot access org.apache.wicket.injection.ComponentInjector
>> class file for org.apache.wicket.injection.ComponentInjector not found
>>   addComponentInstantiationListener(new
>> JavaEEComponentInjector(this));
>>
>>
>>
>> D:\java\workspace\itf.as\itf.web\src\main\java\itf\web\ItfWebApplication.java:[36,36]
>> cannot access org.apache.wicket.injection.ComponentInjector
>> class file for org.apache.wicket.injection.ComponentInjector not found
>>   addComponentInstantiationListener(new
>> JavaEEComponentInjector(this));
>>
>> Does anybody have an Idea? I'm using Wicket 1.3.4, Wicket-Auth-Roles 1.3.4
>> and Wicket-contrib-javaee 1.1 (latest downloadable)
>>
>> Yours
>>
>> Marc
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 




signature.asc
Description: OpenPGP digital signature


Sequence of wicket (ajax) requests

2008-10-01 Thread rmorrisey

Is it possible for two request cycles to be running on the server
concurrently against the same page/wicket session (including ajax requests)?
I was thinking that wicket forces the requests to be processed sequentially
(so that the two request cycles can't be handled at the same time), but it
seems like this is not the case
-- 
View this message in context: 
http://www.nabble.com/Sequence-of-wicket-%28ajax%29-requests-tp19763696p19763696.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: RepeatingView: add new component at specified index

2008-10-01 Thread Igor Vaynberg
you can override renderiterator() and return one that iterates
chlildren in any order you wish

-igor

On Tue, Sep 30, 2008 at 4:34 PM, Edgar Merino <[EMAIL PROTECTED]> wrote:
> Hello again,
>
>   I'm using version 1.3.4 (will wait until the generics version reach its
> final state), the functionality I need with the RepeatingView is because I
> want a BasePage to contain a right panel (represented by a RepeatingView),
> where other panels can be added to it. But this may be done extending that
> BasePage and then adding the needed panels at the specified index given.
> I've seen the MarkupContainer implementation, and it holds its sequence of
> elements in an Object (children), but access to it is private (because of
> various operations that need to be performed before casting it to a List,
> array or leaving it as an object).
>
>   I think this can be accomplished by adding all the needed panels to a List
> and call a method at the end of the BasePage's children so all those panels
> get added to the RepeatingView in the specified order. Is there some way to
> make this automatic from the BasePage, so I can avoid having all the
> children of BasePage call that specific method at the end of its
> constructor? (perhaps, using a callback? will onBeforeRender() work?).
>
> Edgar Merino
>
>
>
> Igor Vaynberg escribió:
>>
>> in 1.4 there is markupcontainer.swap()
>>
>> -igor
>>
>> On Tue, Sep 30, 2008 at 3:40 AM, Edgar Merino <[EMAIL PROTECTED]> wrote:
>>
>>>
>>> Hello,
>>>
>>>  is there any way to control the underlaying Collection a
>>> WebMarkupContainer holds? So I can control where to insert the new
>>> components to be added (with an index, for example). Thanks in advance.
>>>
>>> Edgar Merino
>>>
>>> -
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: wicket 1.3.4/wicket-contrib-javaee compilation error

2008-10-01 Thread Igor Vaynberg
you are missing wicket-ioc jar, you should really use maven to manage
your dependencies if you dont know how to do that yourself.

-igor

On Wed, Oct 1, 2008 at 3:00 AM, Marc Ende <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I wanted to use the wicket-contrib-javaee extension to use annotations for
> my beans.
> Following the steps in the doc I have added
>   addComponentInstantiationListener(new JavaEEComponentInjector(this));
> to my applications init() method.
>
> The application-class is an extended AuthenticatedWebApplication because I
> need
> jaas authentication in the application.
>
> When I tried to compile the application I received the following error:
>
> [INFO]
> 
> [ERROR] BUILD FAILURE
> [INFO]
> 
> [INFO] Compilation failure
> D:\java\workspace\itf.as\itf.web\src\main\java\itf\web\ItfWebApplication.java:[36,36]
> cannot access org.apache.wicket.injection.ComponentInjector
> class file for org.apache.wicket.injection.ComponentInjector not found
>   addComponentInstantiationListener(new
> JavaEEComponentInjector(this));
>
>
>
> D:\java\workspace\itf.as\itf.web\src\main\java\itf\web\ItfWebApplication.java:[36,36]
> cannot access org.apache.wicket.injection.ComponentInjector
> class file for org.apache.wicket.injection.ComponentInjector not found
>   addComponentInstantiationListener(new
> JavaEEComponentInjector(this));
>
> Does anybody have an Idea? I'm using Wicket 1.3.4, Wicket-Auth-Roles 1.3.4
> and Wicket-contrib-javaee 1.1 (latest downloadable)
>
> Yours
>
> Marc
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Multiple file upload javascript won't work when using XHTML1.1

2008-10-01 Thread Igor Vaynberg
looks like a bug, go ahead and open a jira issue

-igor

On Wed, Oct 1, 2008 at 12:40 AM, Sergey Podatelev
<[EMAIL PROTECTED]> wrote:
> Hello,
>
> I have my HTML pages configured to be served as XML files, specifically, I
> use XHTML1.1 Strict doctype in HTML files and I send a
> "Content-type:application/xhtml+xml" header (for the browsers that support
> that content-type, that in other words, non-IEs).
>
> The problem is, on MultiFileUploadPage I got a javascript error saying
> "Error: not a file input elemen".
> This happens because in
> org.apache.wicket.markup.html.form.upload.MultiFileUploadField.js @ line 64,
> this check fails:
>
> if( element.tagName == 'INPUT' && element.type == 'file' ){
>
> This happens because in XML, element.tagName is 'input', not 'INPUT'.
> Once I've corrected this, everything went back to normal.
>
> If this isn't a bug, could someone please tell me, what is the best way to
> override this javascript file?
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: AjaxSelfUpdatingTimerBehavior - how many of them I can add to one page?

2008-10-01 Thread Nino Saturnino Martinez Vazquez Wael

Hi Artur

Im not aware of any limitations. But just add a single general timer, 
and add only the pieces that needs to be updated. this should work too. 
What are your Duration?


Artur W. wrote:

Hi!


Nino.Martinez wrote:
  
Hmm why not put it on the refreshingview or even the page.. Instead of 
the cells? Unless it's extremly important the cells are processed at 
different times I cant see any reason why to have it on individual 
cells. And it will only clutter your js calls putting extra stress on 
server and client.





Every cell has a different refresh time. The cells show the pictures from
different internet's cameras.

Do you know about any limitation when using AjaxSelfUpdatingTimerBehavior?


Thanks in advance,
Artur



  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



SV: more than one html file accessible

2008-10-01 Thread Wilhelmsen Tor Iver

Override init() and add

mountBookmarkablePage("/stats", StatisticPage.class);

- Tor Iver

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Problem building, and problem with SpringWebApplicationFactory

2008-10-01 Thread Wilhelmsen Tor Iver
I got this error during tests when trying to build latest source from
trunk:

junit.framework.AssertionFailedError: expected:<304> but was:<200>
at junit.framework.Assert.fail(Assert.java:47)
at junit.framework.Assert.failNotEquals(Assert.java:282)
at junit.framework.Assert.assertEquals(Assert.java:64)
at junit.framework.Assert.assertEquals(Assert.java:201)
at junit.framework.Assert.assertEquals(Assert.java:207)
at
org.apache.wicket.protocol.http.WicketFilterTest.testNotModifiedResponse
IncludesExpiresHeader(WicketFilterTest.java:106)

The only difference I have in my source tree is that I have applied the
"portlet 2.0 patch" so portlet-related classes differ...

However, the real reason I did sync with trunk was to see if it resolved
an issue we have with SpringWebApplicationFactory complaining that the
context has more than one WebApplication defined; This is in a web
application acting as a portlet provider for two portlets, which have
their own Application classes because of the need to mount bookmarkable
pages for VIEW/EDIT and using different path selectors for the portlets.
The exception we get is:

java.lang.IllegalStateException: more then one bean of type
[org.apache.wicket.protocol.http.WebApplication] found, must have only
one
at
org.apache.wicket.spring.SpringWebApplicationFactory.createApplication(S
pringWebApplicationFactory.java:112)
at
org.apache.wicket.spring.SpringWebApplicationFactory.createApplication(S
pringWebApplicationFactory.java:86)
at
org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:578)

... though the Javadocs for SpringWebApplicationFactory says you can
have multiple Applications as ong as you use the beanName parameter,
which we do.

Any suggestions? Can we bypass the mounting problem by having a URL
coding strategy which takes care of splitting out the "base path" and
pass to a delegate of some sort? 

- Tor Iver



How to get rid of wicket:id in XML output

2008-10-01 Thread Stefan Lindner
I'm trying to build a dynamic site map according to Michael Sparers
article
http://cwiki.apache.org/WICKET/seo-search-engine-optimization.html
Instead of an HTML page a XML page is used with XML markup looking like


http://www.sitemaps.org/schemas/sitemap/0.9";>
   
http://www.example.com/
2005-01-01
monthly
0.8



When I use a ListView for "urlList" and add Labels for "locNode" etc.
the wicket:id properties are included in the XML output.

How can I get rid of wicket:id? Setting a global
"getMarkupSettings().setStripWicketTags(true)" does not work.

I use Wicket 1.4M3

Stefan


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Wicket Community Meetup in South Florida?

2008-10-01 Thread James Carman
I believe the commonly-accepted term is "wicketeer" :)

On Wed, Oct 1, 2008 at 7:40 AM, shetc <[EMAIL PROTECTED]> wrote:
>
> I would be interested in organizing a Wicket Community Meetup here in South
> Florida. Are there other Wicket-keepers in the area that would like to get
> together?
> --
> View this message in context: 
> http://www.nabble.com/Wicket-Community-Meetup-in-South-Florida--tp19758680p19758680.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Wicket Community Meetup in South Florida?

2008-10-01 Thread shetc

BTW, I will be attending the SpringOne America 2008 conference from Dec 1st
to the 4th. It will be happening in Hollywood, FL so perhaps something could
be organized at that time.

-- 
View this message in context: 
http://www.nabble.com/Wicket-Community-Meetup-in-South-Florida--tp19758680p19758747.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Wicket Community Meetup in South Florida?

2008-10-01 Thread shetc

I would be interested in organizing a Wicket Community Meetup here in South
Florida. Are there other Wicket-keepers in the area that would like to get
together?
-- 
View this message in context: 
http://www.nabble.com/Wicket-Community-Meetup-in-South-Florida--tp19758680p19758680.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: AjaxSelfUpdatingTimerBehavior - how many of them I can add to one page?

2008-10-01 Thread Artur W.

Hi!


Nino.Martinez wrote:
> 
> Hmm why not put it on the refreshingview or even the page.. Instead of 
> the cells? Unless it's extremly important the cells are processed at 
> different times I cant see any reason why to have it on individual 
> cells. And it will only clutter your js calls putting extra stress on 
> server and client.
> 

Every cell has a different refresh time. The cells show the pictures from
different internet's cameras.

Do you know about any limitation when using AjaxSelfUpdatingTimerBehavior?


Thanks in advance,
Artur



-- 
View this message in context: 
http://www.nabble.com/AjaxSelfUpdatingTimerBehavior---how-many-of-them-I-can-add-to-one-page--tp19757365p19758676.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: AjaxSelfUpdatingTimerBehavior - how many of them I can add to one page?

2008-10-01 Thread Nino Saturnino Martinez Vazquez Wael
Hmm why not put it on the refreshingview or even the page.. Instead of 
the cells? Unless it's extremly important the cells are processed at 
different times I cant see any reason why to have it on individual 
cells. And it will only clutter your js calls putting extra stress on 
server and client.


The wicket reflex game uses the one AjaxSelfUpdatingTimerBehavior pr 
page approach and it works just fine..


Artur W. wrote:

Hi!

I have a RefreshingView.

To each item I add AjaxSelfUpdatingTimerBehavior

item.add(new AjaxSelfUpdatingTimerBehavior(Duration.seconds(10)) {
@Override
protected void onPostProcessTarget(AjaxRequestTarget target) {
 System.out.println("called");
}

In the RefreshingView I have 6 items.

What is strange the method onPostProcessTarget is called only for 1-4 of
them. Is is completely random. But it is never called for all of the items.
I cannot figure out why?

Is is some limitation in Browser or in AjaxSelfUpdatingTimerBehavior?

I use Wicket 1.4M3, and FF3.03 and IE7.

Thanks,
Artur
  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: The Wicket Reflex Game Post thoughts?

2008-10-01 Thread Nino Saturnino Martinez Vazquez Wael
Okay, so I've remade the internals so you now always can click every 
cell so the game should be a lot more stable now. However only active 
cells give points..


Also some of the exploits should be cleaned..


Nino Saturnino Martinez Vazquez Wael wrote:

Hi Guys

One of the major problems with the game are that if you click a 
box(AjaxEventBehavior) while the heartbeat(AbstractAjaxTimerBehavior) 
are in process you will get an error, since the box's component has 
changed and no longer carries that behavior. I've tried to solve this 
by adding a transparent veil to the page once the heartbeat processes, 
it's simply not good enough, it's still possible to get errors. So how 
do I solve this?


I have one idea but im not liking it, all box's could have behaviors 
even if you wont get an score, that way we will not get an error.



This is a potential pitfall if you ever will have two Ajax components 
that can remove the ones behavior, if the user clicks the other while 
loading then it's gonna complain. On the other hand im not sure what 
wicket can do besides throw a runtime exception.




--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: RepeatingView: add new component at specified index

2008-10-01 Thread Edgar Merino

Anyone?


Edgar Merino escribió:

Hello again,

   I'm using version 1.3.4 (will wait until the generics version reach 
its final state), the functionality I need with the RepeatingView is 
because I want a BasePage to contain a right panel (represented by a 
RepeatingView), where other panels can be added to it. But this may be 
done extending that BasePage and then adding the needed panels at the 
specified index given. I've seen the MarkupContainer implementation, 
and it holds its sequence of elements in an Object (children), but 
access to it is private (because of various operations that need to be 
performed before casting it to a List, array or leaving it as an object).


   I think this can be accomplished by adding all the needed panels to 
a List and call a method at the end of the BasePage's children so all 
those panels get added to the RepeatingView in the specified order. Is 
there some way to make this automatic from the BasePage, so I can 
avoid having all the children of BasePage call that specific method at 
the end of its constructor? (perhaps, using a callback? will 
onBeforeRender() work?).


Edgar Merino



Igor Vaynberg escribió:

in 1.4 there is markupcontainer.swap()

-igor

On Tue, Sep 30, 2008 at 3:40 AM, Edgar Merino <[EMAIL PROTECTED]> 
wrote:
 

Hello,

  is there any way to control the underlaying Collection a
WebMarkupContainer holds? So I can control where to insert the new
components to be added (with an index, for example). Thanks in advance.

Edgar Merino

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



wicket 1.3.4/wicket-contrib-javaee compilation error

2008-10-01 Thread Marc Ende

Hi,

I wanted to use the wicket-contrib-javaee extension to use annotations 
for my beans.

Following the steps in the doc I have added
   addComponentInstantiationListener(new JavaEEComponentInjector(this));
to my applications init() method.

The application-class is an extended AuthenticatedWebApplication because 
I need

jaas authentication in the application.

When I tried to compile the application I received the following error:

[INFO] 


[ERROR] BUILD FAILURE
[INFO] 


[INFO] Compilation failure
D:\java\workspace\itf.as\itf.web\src\main\java\itf\web\ItfWebApplication.java:[36,36] 
cannot access org.apache.wicket.injection.ComponentInjector

class file for org.apache.wicket.injection.ComponentInjector not found
   addComponentInstantiationListener(new 
JavaEEComponentInjector(this));




D:\java\workspace\itf.as\itf.web\src\main\java\itf\web\ItfWebApplication.java:[36,36] 
cannot access org.apache.wicket.injection.ComponentInjector

class file for org.apache.wicket.injection.ComponentInjector not found
   addComponentInstantiationListener(new 
JavaEEComponentInjector(this));


Does anybody have an Idea? I'm using Wicket 1.3.4, Wicket-Auth-Roles 
1.3.4 and Wicket-contrib-javaee 1.1 (latest downloadable)


Yours

Marc

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



AjaxSelfUpdatingTimerBehavior - how many of them I can add to one page?

2008-10-01 Thread Artur W.

Hi!

I have a RefreshingView.

To each item I add AjaxSelfUpdatingTimerBehavior

item.add(new AjaxSelfUpdatingTimerBehavior(Duration.seconds(10)) {
@Override
protected void onPostProcessTarget(AjaxRequestTarget target) {
 System.out.println("called");
}

In the RefreshingView I have 6 items.

What is strange the method onPostProcessTarget is called only for 1-4 of
them. Is is completely random. But it is never called for all of the items.
I cannot figure out why?

Is is some limitation in Browser or in AjaxSelfUpdatingTimerBehavior?

I use Wicket 1.4M3, and FF3.03 and IE7.

Thanks,
Artur
-- 
View this message in context: 
http://www.nabble.com/AjaxSelfUpdatingTimerBehavior---how-many-of-them-I-can-add-to-one-page--tp19757365p19757365.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Multiple file upload javascript won't work when using XHTML1.1

2008-10-01 Thread Sergey Podatelev
Hello,

I have my HTML pages configured to be served as XML files, specifically, I
use XHTML1.1 Strict doctype in HTML files and I send a
"Content-type:application/xhtml+xml" header (for the browsers that support
that content-type, that in other words, non-IEs).

The problem is, on MultiFileUploadPage I got a javascript error saying
"Error: not a file input elemen".
This happens because in
org.apache.wicket.markup.html.form.upload.MultiFileUploadField.js @ line 64,
this check fails:

if( element.tagName == 'INPUT' && element.type == 'file' ){

This happens because in XML, element.tagName is 'input', not 'INPUT'.
Once I've corrected this, everything went back to normal.

If this isn't a bug, could someone please tell me, what is the best way to
override this javascript file?


Re: PropertyModel type of key map

2008-10-01 Thread dlipski

Ok, maybe you are right that adding such method to PropertyModel will make it
bloated, but I think that some model dedicated to work with maps(MapModel ?)
will be nice feature of Wicket.

I know that questions bellow dont stick to the subject of this thread but
maybe you can help me with them. Recently i started to 'study' Wicket API
and Wicket sources and have two questions(so far ;)):

1)What IChainingModel interface is for ? I thought that it will be used
inside model implementations in getObject method checkig if nested model
object is a ChainingModel object but the instance of operator in this
methods checks against IModel interface (what is correct). If I understand
Wicket API correctly it is possible to implement some model with chainnig
ability without implementing IChaininig model - its internal implementation
of get/setObject methods. Could you explain me what I(or rather my model)
gain when my model implements IChaininigModel interface ?

2)When I looked at getTarget() method inside  PropertyModel class I found
that retriving of model object is done inside a loop. I dont understand why
PropertyModel cares about how nested model is implemented. Why it cares ?
because it checks if object returned but nested model is another nested
model or not. I thought that retriving of model object is responisbility of
each model class individually and PropertyModel should only check if its
model object is IModel object (if so return
((IModel)myModelObject).getObject) or is it a 'real' model object(if so
return it).

Answers for this questions will help me implementing my MapModel class.

Tanks for your help,
Regards Daniel


igor.vaynberg wrote:
> 
> why? because propertymodel is a convinience class only. once we start
> adding things like this into it it will get bloated. it is pretty easy
> to roll your own implementing imodel directly.
> 
> -igor
> 
> On Tue, Sep 30, 2008 at 10:53 AM, dlipski <[EMAIL PROTECTED]>
> wrote:
>>
>> If there is no option to force (why? I can imagine setMapKeyClass method
>> in
>> PropertyModel...) PropertyModel to do this and I have to use different
>> Model, I would like to ask does Wicket(or one of Wicket subprojects such
>> as
>> WicketExtensions) provide such ready to use model ?
>>
>> Daniel Lipski
>>
>> igor.vaynberg wrote:
>>>
>>> dont use a property model, roll your own
>>>
>>> -igor
>>>
>>> On Tue, Sep 30, 2008 at 8:31 AM, dlipski <[EMAIL PROTECTED]>
>>> wrote:

 Hi

 Im trying to 'force' PropertyModel to put into map key different then
 String
 but after few trials I have no idea how to do this.

 Example:
 I have field myMap in my page initialized as follows:

 Map myMap = new HashMap();

 then I create property model for my page(this == page containing myMap
 field):
 PropertyModel p = new PropertyModel (this, "myMap[123]");

 now when I execute:
 p.setObject(true);
 model puts into map expected boolean but key is of type String not
 Long.
 How I can force this property model to put with key of choosen class
 (in
 this example Long)?

 Regards
 Daniel Lipski
 --
 View this message in context:
 http://www.nabble.com/PropertyModel-type-of-key-map-tp19744489p19744489.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


>>>
>>> -
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/PropertyModel-type-of-key-map-tp19744489p19747226.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/PropertyModel-type-of-key-map-tp19744489p19755807.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]