Re: Wicket database access

2008-02-22 Thread Nino Saturnino Martinez Vazquez Wael
Wicket will not force any method or framework down your throat, wicket 
is a web framework. It's completely up to yourself to decide which way 
you want to go.. Its probably why you get so differentiated answers.


Whether you use spring or databinder or something else is up to you.


regards Nino


wjser wrote:

I'm frustrated, because i didn't any answer to my question. I searched the
wicket documentation and the web, but found no information.

Nowadays no serios web application can be developed without database access
and a no developer should be forced to use an object-relational mapper.

I wann describe a requirement to be more precisely. 
Howto edit a dataset in a database in a form? The form looks like this:






  
Any examples?




dtoffe wrote:
  

Take a look at JPersist (http://www.jpersist.org/). You can do plain
JDBC and/or POJO oriented data access, and it's more code oriented that
framework oriented, if this makes sense. I think it's easier to understand
for people coming from years of desktop database development and when you
have to access legacy databases with heavy usage of complex stored
procedures.
Disclaimer, I don't know nor use Spring or Hibernate, just didn't
liked them.

Daniel


wjser wrote:


Hi all,

i have a simple question.
How can i access a database from wicket?
I don't want to use any object-relational mapper like hibernate or
ibatis.
I wanna use plain old sql/jdbc.

thanks in advance.

  



  


--
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: Where to find the Wicket DTD file?

2008-02-22 Thread Nino Saturnino Martinez Vazquez Wael

look in jira as I wrote..



 
http://svn.apache.org/repos/asf/wicket/trunk/jdk-1.4/wicket/wicket-xhtml1-strict.dtd 



MYoung wrote:

...place the following in your HTML template...
  

http://wicket.sourceforge.net/";
xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">



That doesn't seem to make it stop the warnings.  Seems Amsteras actually
validates and it wants to have the DTD. Is there a Wicket DTD File
somewhere?  Here is its Eclipse Preference to the real DTDs:

http://www.nabble.com/file/p15620940/amsteras.png 




robert.mcguinness wrote:
  

MYoung wrote:


Is it available somewhere?  I need it for validation in the Eclipse
Amsteras HTML editor and to get rid of all its warning about wicket tags
in html file.

  

...place the following in your HTML template...

http://wicket.sourceforge.net/";
xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">

...this should remove the warnings in Eclipse.  






  


--
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: Wicket database access

2008-02-22 Thread Florian Sperber

Hi wjser,

> I'm frustrated, because i didn't any answer to my question. I 
searched the

> wicket documentation and the web, but found no information.

since Wicket is a "Web-Application"-Framework many believe, that it 
should focus on especially that area.


Wicket provides very good tools to do data manipulation and allows you 
to choose whichever Framework you want to use for Database-Access.


Have a look at
  http://databinder.net/site/show/overview
or just write your own jdbc-Backend.

> Nowadays no serios web application can be developed without database 
access

> and a no developer should be forced to use an object-relational mapper.

Please explain what you mean here. Wicket goes the Java-Way and so using 
objects for any data manipulation seems to be the right thing.


Kind regards
Florian Sperber



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



Re: Wicket database access

2008-02-22 Thread dtoffe

Perhaps this examples can help you:

http://wicketstuff.org/wicket13/repeater/;jsessionid=685F6D6B394FDC490370784672E4A8C0?wicket:bookmarkablePage=%3Aorg.apache.wicket.examples.repeater.FormPage

Daniel


dtoffe wrote:
> 
> If I understand you correctly, what you want to do is something alike
> to editing an MSAccess table, not even using JDBC or SQL, just messing
> with the raw data, is this correct ??  I don't think you can do this with
> Wicket, and even if possible, I don't believe this to be a good practice.
> 
> Cheers,
> 
> Daniel
> 
> 
> 
> wjser wrote:
>> 
>> I'm frustrated, because i didn't any answer to my question. I searched
>> the wicket documentation and the web, but found no information.
>> 
>> Nowadays no serios web application can be developed without database
>> access and a no developer should be forced to use an object-relational
>> mapper.
>> 
>> I wann describe a requirement to be more precisely. 
>> Howto edit a dataset in a database in a form? The form looks like this:
>> 
>> 
>> 
>> 
>> 
>>   
>> Any examples?
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Wicket-database-access-tp15613515p15629629.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: Can i add multiple lines to a node-link in tree?

2008-02-22 Thread Thomas Kappler
Hi Per,

did you try using a wicket.markup.html.basic.MultiLineLabel?

If your tree nodes have more than one component, encapsulate them into
a Panel and return instances of that from
BaseTree.newNodeComponent(String id, IModel model).

Cheers,
Thomas

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



Re: Wicket database access

2008-02-22 Thread dtoffe

If I understand you correctly, what you want to do is something alike to
editing an MSAccess table, not even using JDBC or SQL, just messing with the
raw data, is this correct ??  I don't think you can do this with Wicket, and
even if possible, I don't believe this to be a good practice.

Cheers,

Daniel



wjser wrote:
> 
> I'm frustrated, because i didn't any answer to my question. I searched the
> wicket documentation and the web, but found no information.
> 
> Nowadays no serios web application can be developed without database
> access and a no developer should be forced to use an object-relational
> mapper.
> 
> I wann describe a requirement to be more precisely. 
> Howto edit a dataset in a database in a form? The form looks like this:
> 
> 
> 
> 
> 
>   
> Any examples?
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Wicket-database-access-tp15613515p15629469.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]



how to create the component dynamic?

2008-02-22 Thread laiqinyi
 Well, I wanne build a Survey-System!
Now there're some Questions in the Survey-System, and will default some 
answer-item for user to choice!
following is the example of Question
1,It's the weather good today?(A.B.C. would be radio)
  A.yes, Sunny
  B.no, Rainy
  C.so so
I think all the component shall be created at run time! but some question has 5 
items some has 3 items,
some is a TextField which filled by user, some is CheckBox or Radio.
How to do with this?

Mead

 
 
 

Re: How to make a Form work both Ajax and no Ajax?

2008-02-22 Thread richardwilko

You could use an AjaxFallbackButton on your form, eg:

AjaxFallbackButton a = new AjaxFallbackButton("id", form)
{
@Override
protected void onSubmit(AjaxRequestTarget target, Form 
form)
{
//normal stuff

if(target != null)
{
//ajax stuff
}
}
};
form.add(a);


which should work with and without ajax.

Richard



MYoung wrote:
> 
> I have the Ajax stuff working in my form.  I want to use the same form
> (placed on a WebPage) to handle when JS is off, I override the onSubmit()
> for when JS is off.  But this must be wrong because the
> AjaxFormSubmitBehavior no longer gets call, only the onSubmit is called.
> 
> Form f = new Form("f", new CompoundPropertyModel(this)) {
>   @Override
>   public void onSubmit() {
>   handleRatingChanged(null);   // good when JS if off, 
> but how to
> make the Ajax stuff work
>// when JS
> is back on?
>   }
> };
> f.setOutputMarkupId(true);
> f.add(new TextField("rating", Integer.class));
> add(f);
>   
> //
> // Ajax stuff, after the onSubmit is overridden in the form, this
> is no longer work!
> //
> f.add(new AjaxFormSubmitBehavior("onsubmit") {
>   @Override
>   protected void onSubmit(AjaxRequestTarget target) {
>   handleRatingChanged(target);
>   }
>   @Override
>   protected void onError(AjaxRequestTarget target) {
>   
>   }
>   @Override
>   protected IAjaxCallDecorator getAjaxCallDecorator() {
>   return new AjaxCallDecorator() {
>   public CharSequence decorateScript(CharSequence 
> script) {
>   return script + " return false;";   
>   }
>   };
>   }
> });
> 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-make-a-Form-work-both-Ajax-and-no-Ajax--tp15628207p15630129.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 database access

2008-02-22 Thread Igor Vaynberg
google is your friend

http://www.stardeveloper.com/articles/display.html?article=2003090401&page=1

-igor


On Fri, Feb 22, 2008 at 1:22 AM, wjser <[EMAIL PROTECTED]> wrote:
>
>  I just want to communicate with a database (i.e. Mysql) like fetching data
>  from the DBMS and insert/update datasets. I have/want to use JDBC and SQL
>  for fetching and inserting the data into the database.
>  I don't know how to do this.
>
>
>
>
>  Florian Sperber wrote:
>  >
>  > Hi wjser,
>  >
>  >  > I'm frustrated, because i didn't any answer to my question. I
>  > searched the
>  >  > wicket documentation and the web, but found no information.
>  >
>  > since Wicket is a "Web-Application"-Framework many believe, that it
>  > should focus on especially that area.
>  >
>  > Wicket provides very good tools to do data manipulation and allows you
>  > to choose whichever Framework you want to use for Database-Access.
>  >
>  > Have a look at
>  >http://databinder.net/site/show/overview
>  > or just write your own jdbc-Backend.
>  >
>  >  > Nowadays no serios web application can be developed without database
>  > access
>  >  > and a no developer should be forced to use an object-relational mapper.
>  >
>  > Please explain what you mean here. Wicket goes the Java-Way and so using
>  > objects for any data manipulation seems to be the right thing.
>  >
>  > Kind regards
>  > Florian Sperber
>  >
>  >
>  >
>  > -
>  > To unsubscribe, e-mail: [EMAIL PROTECTED]
>  > For additional commands, e-mail: [EMAIL PROTECTED]
>  >
>  >
>  >
>
>  --
>  View this message in context: 
> http://www.nabble.com/Wicket-database-access-tp15613515p15630127.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 database access

2008-02-22 Thread wjser

i do know how to handle JDBC. The problem is that i don't know how to use
JDBC inside Wicket. 
I think that i have to implement IDataProvider wich would fetch the data
from the database, but i don't know how to do this. I also don't know how to
insert data into the database which come from a form.



igor.vaynberg wrote:
> 
> google is your friend
> 
> http://www.stardeveloper.com/articles/display.html?article=2003090401&page=1
> 
> -igor
> 
> 
> On Fri, Feb 22, 2008 at 1:22 AM, wjser <[EMAIL PROTECTED]> wrote:
>>
>>  I just want to communicate with a database (i.e. Mysql) like fetching
>> data
>>  from the DBMS and insert/update datasets. I have/want to use JDBC and
>> SQL
>>  for fetching and inserting the data into the database.
>>  I don't know how to do this.
>>
>>
>>
>>
>>  Florian Sperber wrote:
>>  >
>>  > Hi wjser,
>>  >
>>  >  > I'm frustrated, because i didn't any answer to my question. I
>>  > searched the
>>  >  > wicket documentation and the web, but found no information.
>>  >
>>  > since Wicket is a "Web-Application"-Framework many believe, that it
>>  > should focus on especially that area.
>>  >
>>  > Wicket provides very good tools to do data manipulation and allows you
>>  > to choose whichever Framework you want to use for Database-Access.
>>  >
>>  > Have a look at
>>  >http://databinder.net/site/show/overview
>>  > or just write your own jdbc-Backend.
>>  >
>>  >  > Nowadays no serios web application can be developed without
>> database
>>  > access
>>  >  > and a no developer should be forced to use an object-relational
>> mapper.
>>  >
>>  > Please explain what you mean here. Wicket goes the Java-Way and so
>> using
>>  > objects for any data manipulation seems to be the right thing.
>>  >
>>  > Kind regards
>>  > Florian Sperber
>>  >
>>  >
>>  >
>>  > -
>>  > To unsubscribe, e-mail: [EMAIL PROTECTED]
>>  > For additional commands, e-mail: [EMAIL PROTECTED]
>>  >
>>  >
>>  >
>>
>>  --
>>  View this message in context:
>> http://www.nabble.com/Wicket-database-access-tp15613515p15630127.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/Wicket-database-access-tp15613515p15630608.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 database access

2008-02-22 Thread Florian Sperber

http://wicketstuff.org/wicket13/repeater


Kind regards
Florian Sperber

wjser schrieb:

i do know how to handle JDBC. The problem is that i don't know how to use
JDBC inside Wicket. 
I think that i have to implement IDataProvider wich would fetch the data

from the database, but i don't know how to do this. I also don't know how to
insert data into the database which come from a form.



igor.vaynberg wrote:

google is your friend

http://www.stardeveloper.com/articles/display.html?article=2003090401&page=1

-igor


On Fri, Feb 22, 2008 at 1:22 AM, wjser <[EMAIL PROTECTED]> wrote:

 I just want to communicate with a database (i.e. Mysql) like fetching
data
 from the DBMS and insert/update datasets. I have/want to use JDBC and
SQL
 for fetching and inserting the data into the database.
 I don't know how to do this.




 Florian Sperber wrote:
 >
 > Hi wjser,
 >
 >  > I'm frustrated, because i didn't any answer to my question. I
 > searched the
 >  > wicket documentation and the web, but found no information.
 >
 > since Wicket is a "Web-Application"-Framework many believe, that it
 > should focus on especially that area.
 >
 > Wicket provides very good tools to do data manipulation and allows you
 > to choose whichever Framework you want to use for Database-Access.
 >
 > Have a look at
 >http://databinder.net/site/show/overview
 > or just write your own jdbc-Backend.
 >
 >  > Nowadays no serios web application can be developed without
database
 > access
 >  > and a no developer should be forced to use an object-relational
mapper.
 >
 > Please explain what you mean here. Wicket goes the Java-Way and so
using
 > objects for any data manipulation seems to be the right thing.
 >
 > Kind regards
 > Florian Sperber
 >
 >
 >
 > -
 > To unsubscribe, e-mail: [EMAIL PROTECTED]
 > For additional commands, e-mail: [EMAIL PROTECTED]
 >
 >
 >

 --
 View this message in context:
http://www.nabble.com/Wicket-database-access-tp15613515p15630127.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]








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



Re: How can I refresh a "parent" Page after using PopupCloseLink in a popup window?

2008-02-22 Thread Edvin Syse

class mypopupcloselink extends popupcloselink {
  oncomponenttag(tag) {
 super.oncomponenttag(tag);
 tag.put("onclick","window.parent.refresh();");
  }
}


Thanks :) Why didn't I think of this.. arghfl :)

-- Edvin

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



Re: Wicket database access

2008-02-22 Thread wjser

I just want to communicate with a database (i.e. Mysql) like fetching data
from the DBMS and insert/update datasets. I have/want to use JDBC and SQL
for fetching and inserting the data into the database. 
I don't know how to do this.  


Florian Sperber wrote:
> 
> Hi wjser,
> 
>  > I'm frustrated, because i didn't any answer to my question. I 
> searched the
>  > wicket documentation and the web, but found no information.
> 
> since Wicket is a "Web-Application"-Framework many believe, that it 
> should focus on especially that area.
> 
> Wicket provides very good tools to do data manipulation and allows you 
> to choose whichever Framework you want to use for Database-Access.
> 
> Have a look at
>http://databinder.net/site/show/overview
> or just write your own jdbc-Backend.
> 
>  > Nowadays no serios web application can be developed without database 
> access
>  > and a no developer should be forced to use an object-relational mapper.
> 
> Please explain what you mean here. Wicket goes the Java-Way and so using 
> objects for any data manipulation seems to be the right thing.
> 
> Kind regards
> Florian Sperber
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Wicket-database-access-tp15613515p15630127.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 database access

2008-02-22 Thread Kai Mutz
[EMAIL PROTECTED] <> wrote:
> i do know how to handle JDBC. The problem is that i don't know how to
> use JDBC inside Wicket. I think that i have to implement
> IDataProvider wich would fetch the data from the database, but i
> don't know how to do this. I also don't
> know how to
> insert data into the database which come from a form.

Take a look at the wicket phonebook example and replace the hibernate/ibatis
DAO implementation by a JDBC DAO

http://wicketstuff.org/confluence/display/STUFFWIKI/wicket-phonebook/

HTH, Kai


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



[WUG] copenhagen next meetup?

2008-02-22 Thread Nino Saturnino Martinez Vazquez Wael

So lets decide for a day soon? Next week?


I have an additional idea for topics:

Wicket contribs finding them(wiki)? Using them(wicketstuff maven repo)...
Constructing your own contrib?

And my personal idea, wicket-spring-jpa maven archetype. Now I havent 
done anything on this yet. But maybe we can start at the WUG.





regards

--
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: how to create the component dynamic?

2008-02-22 Thread Nino Saturnino Martinez Vazquez Wael

repeater / listview.. And panels with form components.

I actually started a survey thing some time ago.. The hard part is if 
you want to have paths/trackbacks...


regards Nino.

laiqinyi wrote:

 Well, I wanne build a Survey-System!
Now there're some Questions in the Survey-System, and will default some 
answer-item for user to choice!
following is the example of Question
1,It's the weather good today?(A.B.C. would be radio)
  A.yes, Sunny
  B.no, Rainy
  C.so so
I think all the component shall be created at run time! but some question has 5 
items some has 3 items,
some is a TextField which filled by user, some is CheckBox or Radio.
How to do with this?

Mead

 
 
 
  


--
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: AjaxFormSubmitBehavior and setDefaultFormProcessing(false)?

2008-02-22 Thread Juha Alatalo
In this case I have to visit different page when browse is chosen. When 
I come back form is cleared, isn't it?


- Juha

Igor Vaynberg wrote:

if you are opening everything via ajax why do you need to submit the
entire form? the values are all still there in the browser window...
so dont use ajaxformsubmitbehavor but a regular ajax behavior

-igor


On Thu, Feb 21, 2008 at 3:57 AM, Juha Alatalo
<[EMAIL PROTECTED]> wrote:

Hi,

 I have created a dropDownChoice component where the last option is
 "browse"  == opens new page where user can make queries. (Similar to
 "look in" field in search panel of Windows XP, where user can select
 some default folders or can choose browse to give an exact folder)

 Because there is also other fields, form hast to be posted when opening
 new page from browse ==> AjaxFromSubmitBehavior("onchange"). Only
 problem is that I can't call setDefaultFormProcessing(false) in
 ajaxFormSubmitBehavior like I can do with Buttons. I would like to do
 validation only when user presses save button, not when he chooses to
 browse information for one field.

 Is there some way to solve this problem?

 - Juha


 -
 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: Accessing prototype scoped panel beans using @SpringBean annotation

2008-02-22 Thread Stefan Fußenegger

Hi Tom,

I'd suggest not to use Spring to manage panels. You should rather create a
new panel for every page and request. You should use Spring to manage your
services and inject those into your panels.

Best regards, Stefan



Tom John wrote:
> 
> Hi,
> 
> First of all let me apologise for the length of this post, I thought I
> should include too much info rather than too little.
> 
> I'm using wicket-1.3.1, Spring 2.5.1 on JDK1.5 and Jetty6.1.6.  My goal is
> to define 1..n Panels in my Spring application context then access them
> from within a test page using @SpringBean annotations.
> 
> applicationContext.xml contains:
> 
> 
> 
> 
> 
> TestPage class is as follows:
> 
> 
> public class TestPage extends WebPage {
> 
> @SpringBean(name="testPanel1")
> private TestPanel testPanel1;
> 
> public TestPage() {
> add(testPanel1);
> }
> }
> 
> 
> And TestPanel class is as follows:
> 
> 
> public class TestPanel extends Panel implements ITestPanel {
> 
> private TestForm form;
> 
> public TestPanel(String id) {
> super(id);
> 
> form = new TestForm("testForm");
> form.setTestFormField("oranges");
> add(form);
> }
> 
> private class TestForm extends Form {
> private String testFormField;
> 
> public TestForm(String id) {
> super(id);
> add(new TextField("testFormField", new PropertyModel(this,
> "testFormField")));
> }
> 
> protected void onSubmit() {
> PageParameters params = new PageParameters();
> params.add("testFormField", testFormField);
> }
> 
> public void setTestFormField(String testFormField) {
> this.testFormField = testFormField;
> }
> }
> }
> 
> 
> So, the problem is that when I hit http://localhost:8080/ the
> "add(testPanel1);" line in the constructor for TestPage causes the
> following exception to be thrown:
> 
> 
> WicketMessage: Error attaching this container for rendering: [Page class =
> com.example.TestPage, id = 0, version = 0]
> 
> Root cause:
> 
> java.lang.IllegalArgumentException: Protected method: onBeforeRender()V
> at net.sf.cglib.proxy.MethodProxy$1.invoke(MethodProxy.java:55)
> at
> org.apache.wicket.proxy.LazyInitProxyFactory$CGLibInterceptor.intercept(LazyInitProxyFactory.java:318)
> at
> WICKET_com.example.TestPanel$$EnhancerByCGLIB$$504480a9.onBeforeRender()
> at org.apache.wicket.Component.internalBeforeRender(Component.java:995)
> at org.apache.wicket.Component.beforeRender(Component.java:1027)
> at
> org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1513)
> at org.apache.wicket.Component.onBeforeRender(Component.java:3657)
> at org.apache.wicket.Page.onBeforeRender(Page.java:1402)
> at org.apache.wicket.Component.internalBeforeRender(Component.java:995)
> at org.apache.wicket.Component.beforeRender(Component.java:1027)
> at org.apache.wicket.Component.prepareForRender(Component.java:2139)
> at org.apache.wicket.Page.renderPage(Page.java:870)
> at
> org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:231)
> at
> org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:103)
> at
> org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1172)
> at org.apache.wicket.RequestCycle.step(RequestCycle.java:1241)
> at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1316)
> at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
> at
> org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:354)
> at
> org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:121)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
> at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
> at
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:367)
> at
> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
> at
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
> at
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
> at org.mortbay.jetty.Server.handle(Server.java:295)
> at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:503)
> at
> org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:827)
> at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:511)
> at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:210)
> at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:379)
> at
> org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:226)
> at
> org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
> 
> Complete stack:
> 
> org.apache.wicket.WicketRuntimeException: Error attaching this container
> for rendering: [

RE: Wicket database access

2008-02-22 Thread Maeder Thomas
If you're looking for automatic mapping from the database to the web,
you might be better off with something like Ruby on Rails. What I
believe you're asking for is simply outside the scope of Wicket. That
said, there is no magic in Wicket. You access a database as you would in
any other Java application (i.e. do JDBC or use a ORM or whatever
tickles your fancy).

BTW, I am very pleased that Wicket does not adress accessing the
database. We (the product I'm developing) happen to get our data from a
bunch of services located somewhere outside the Webserver, so any
database access architecture inside Wicket (a la Seam) would be a
useless complication for us.

Thomas

> -Original Message-
> From: wjser [mailto:[EMAIL PROTECTED] 
> Sent: Freitag, 22. Februar 2008 10:49
> To: users@wicket.apache.org
> Subject: Re: Wicket database access
> 
> 
> i do know how to handle JDBC. The problem is that i don't 
> know how to use JDBC inside Wicket. 
> I think that i have to implement IDataProvider wich would 
> fetch the data from the database, but i don't know how to do 
> this. I also don't know how to insert data into the database 
> which come from a form.
> 
> 
> 

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



Re: how to create the component dynamic?

2008-02-22 Thread Stefan Fußenegger

Hi Mead,

I'd say that wicket is a real cool choice to accomplish this (I know what
I'm talking about as I hacked such a tool in PHP years ago in my programming
infancy ;) )

There is no general answer though. But for different question types you
could do

if (type == DROP_DOWN_QUESTION) add(new DropDownQuestionPanel("panel",
question);
else if (type == RADIO_QUESTION) add(new RadioQuestionPanel("panel",
question);
// you got the idea

you could also create the panels dynamically by giving a type such as
"com.foo.questiontype.DropDown" using reflection. This way you could create
a quite flexible solution, where you could drop in just another jar to add
new question types.

If it comes to different numbers of possibilities, RepeatingView might be a
good choice.

Best regards and good luck




Mead-2 wrote:
> 
>  Well, I wanne build a Survey-System!
> Now there're some Questions in the Survey-System, and will default some
> answer-item for user to choice!
> following is the example of Question
> 1,It's the weather good today?(A.B.C. would be radio)
>   A.yes, Sunny
>   B.no, Rainy
>   C.so so
> I think all the component shall be created at run time! but some question
> has 5 items some has 3 items,
> some is a TextField which filled by user, some is CheckBox or Radio.
> How to do with this?
> 
> Mead
> 
>  
>  
>  
> 


-
---
Stefan Fußenegger
http://talk-on-tech.blogspot.com // looking for a nicer domain ;)
-- 
View this message in context: 
http://www.nabble.com/how-to-create-the-component-dynamic--tp15630091p15631519.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]



usage of AbortWithHttpStatusException

2008-02-22 Thread Stefan Fußenegger

Hi,

How is AbortWithHttpStatusException meant to be used? I expected that this
exception would result in a (e.g.) 404 error page to be shown. However, all
I get is an empty page. Any ideas on how I can get a nice, custom error page
to show up?

Cheers, Stefan

btw: i'm using jetty if this is important.

-
---
Stefan Fußenegger
http://talk-on-tech.blogspot.com // looking for a nicer domain ;)
-- 
View this message in context: 
http://www.nabble.com/usage-of-AbortWithHttpStatusException-tp15631513p15631513.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-auth-roles problem

2008-02-22 Thread Ted Roeloffzen
I've made a webapplication class that extends from
AuthenticatedWebApplication in the wicket-auth-roles project version 1.3.1
I've implemented the needed methods, such as getHomePage, getSignInPageClass
and getWebSessionClass. They all return the appropiate class.
On the homepage i've added the annotation: @AuthorizeInstantiation(Roles.*
USER*)

but when i run the application and go to the URL, it goes directly to the
homepage and the loginpage isn't called. This isn't supposed to happen,
because you need the user rol to get there.

Does anyone have an idea about what i'm doing wrong?


Re: Wicket-auth-roles problem

2008-02-22 Thread richardwilko

A few questions:

1) does your session extend AuthenticatedWebSession
2) if so what does your getRoles() method in your web session look like
3) presumably you mean @AuthorizeInstantiation(Roles.USER) - without the
stars?
4) do you manually set any of the options on getSecuritySettings() in your
webapplication class (afaik you shouldn't, i don't)

Richard



Ted Roeloffzen-2 wrote:
> 
> I've made a webapplication class that extends from
> AuthenticatedWebApplication in the wicket-auth-roles project version 1.3.1
> I've implemented the needed methods, such as getHomePage,
> getSignInPageClass
> and getWebSessionClass. They all return the appropiate class.
> On the homepage i've added the annotation: @AuthorizeInstantiation(Roles.*
> USER*)
> 
> but when i run the application and go to the URL, it goes directly to the
> homepage and the loginpage isn't called. This isn't supposed to happen,
> because you need the user rol to get there.
> 
> Does anyone have an idea about what i'm doing wrong?
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Wicket-auth-roles-problem-tp15631688p15632086.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: Combining Ajax and non Ajax pages

2008-02-22 Thread steviezz

Guys - thanks for your continued help with this, but I'm still having some
problems with:  

   "Attempt to set model object on null model of component." 
  
I now have some code cut down to the simplest possible example (attempting
to follow the advice given already): 


public class AreaChoiceModel extends LoadableDetachableModel {
protected Object load() {
return ((WholSession) Session.get()).getAreaList();
}
}


public class WholSession extends WebSession {

private IModel areaModel = new AreaChoiceModel();

public WholSession(Request request) {
super(request);
}

protected void onDetach() {
areaModel = null;
}

public IModel getAreaModel() {
return areaModel;
}

public List getAreaList() {
return ((WholApplication) getApplication()).getAreas();
}
}



public class PanelSearch extends FormComponentPanel {

public PanelSearch(String id) {
super(id, ((WholSession) Session.get()).getAreaModel());
add(new SearchForm("searchForm"));
add(new FeedbackPanel("feedback"));
}   

private class SearchForm extends Form { 

public SearchForm(String id) {
 super(id);
 DropDownChoice areas = new DropDownChoice("areas",
((WholSession)
   Session.get()).getAreaModel(), new
ChoiceRenderer("name", "id"));
areas.setOutputMarkupId(true);
add(areas);
}

protected void onSubmit() {
System.out.println("onSubmit called");
};
}
}


Page with panel and form loads OK with selection box populated with my top
level Area list (I've removed everything else).  

Clicking the button results in the error: 

WicketMessage: Method onFormSubmitted of interface
org.apache.wicket.markup.html.form.IFormSubmitListener targeted at component
[MarkupContainer [Component id = searchForm, page =
sds.whol.wicket.pages.Index, path =
0:panelSearch:searchForm.PanelSearch$SearchForm, isVisible = true,
isVersioned = false]] threw an exception

Root cause:

java.lang.IllegalStateException: Attempt to set model object on null model
of component: panelSearch:searchForm:areas
at org.apache.wicket.Component.setModelObject(Component.java:2850)


I'm obviously still missing something important here (or maybe I've cut out
too much code :-}).  I suspect it's something very simple, so any further
pointers welcome. 

Note - I've now bought the Wicket In Action eBook, so may have this worked
out once I've had time to study it in some detail. 

Thanks again. 

 



Michael O'Cleirigh wrote:
> 
> Hello,
> 
> This error happens because the intermediary panel between the form and 
> the drop down choice does not have a model.
> 
> Changing the PanelSearch constructor to call super (id, new Model()) 
> should fix the problem.
> 
> You might also want your form panel to extend FormComponentPanel instead 
> to get better validation support.
> 
> Mike
>> Or you did not set the model on the dropdown.
>>
>> Maurice
>>
>> On Thu, Feb 21, 2008 at 8:44 PM, Maurice Marrink <[EMAIL PROTECTED]>
>> wrote:
>>   
>>> Looks like at least one of the models in the session is not properly
>>>  initialized.
>>>  You have to do something like
>>>  private IModel model=new WhateverModel(null);
>>>  in your session.
>>>
>>>  Maurice
>>>
>>>
>>>
>>>  On Thu, Feb 21, 2008 at 8:41 PM, steviezz <[EMAIL PROTECTED]>
>>> wrote:
>>>  >
>>>  >  Now getting
>>>  >
>>>  >  RequestCycle.logRuntimeException(1399) | Attempt to set model object
>>> on null
>>>  >  model of component: panelSearch:form:parentAreas
>>>  >  java.lang.IllegalStateException: Attempt to set model object on null
>>> model
>>>  >  of component: panelSearch:form:parentAreas
>>>  > at
>>> org.apache.wicket.Component.setModelObject(Component.java:2850)
>>>  >
>>>  >
>>>  >
>>>  >
>>>  >
>>>  >
>>>  >  Mr Mean wrote:
>>>  >  >
>>>  >  > Don't add wicket components to the session, use models.
>>>  >  > for example
>>>  >  > class MySession extends WebSession
>>>  >  > {
>>>  >  >  private IModel dropdown1=new WhateverModel(null); //etc for the
>>> others
>>>  >  >  // add getters() for models
>>>  >  > }
>>>  >  >
>>>  >  > class PanelSearch extends Panel
>>>  >  > {
>>>  >  >  public PanelSearch(String id)
>>>  >  > {
>>>  >  >  super(id);
>>>  >  >  add(new
>>>  >  >
>>> DropDownChoice("dropdown1",((MySession)Session.get()).getDropdown1(),myChoices)
>>>  >  > }
>>>  >  > }
>>>  >  >
>>>  >  > class SomePage extends WebPage
>>>  >  > {
>>>  >  >  public SomePage()
>>>  >  > {
>>>  >  >  super();
>>>  >  >  add(new PanelSearch("search"));
>>>  >  > }
>>>  >  > }
>>>  >  >
>>>  >  > The trick is always using the shared models in your session, that
>>> is
>>>  

OutOfMemoryError (not PermGen) in PageSavingThread

2008-02-22 Thread Meetesh Karia

Hi all,

We're getting an OutOfMemoryError (Wicket 1.3.1 on Tomcat 5.5.17 with 
Sun JVM 1.5.0_06-b05) in the PageSavingThread occasionally and I was 
just wondering if anyone had seen this before.  Is it likely just a 
side-effect of some other problem in our application?  Or is this an 
issue with how the pages are written out in wicket.


Exception in thread "PageSavingThread-wicketFilter" 
java.lang.OutOfMemoryError

   at sun.misc.Unsafe.allocateMemory(Native Method)
   at java.nio.DirectByteBuffer.(DirectByteBuffer.java:99)
   at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:288)
   at sun.nio.ch.Util.getTemporaryDirectBuffer(Util.java:56)
   at sun.nio.ch.IOUtil.write(IOUtil.java:69)
   at sun.nio.ch.FileChannelImpl.write(FileChannelImpl.java:651)
   at 
org.apache.wicket.protocol.http.pagestore.DiskPageStore$SessionEntry.savePage(DiskPageStore.java:246)
   at 
org.apache.wicket.protocol.http.pagestore.DiskPageStore.flushPagesToSaveList(DiskPageStore.java:885)
   at 
org.apache.wicket.protocol.http.pagestore.DiskPageStore$PageSavingThread.run(DiskPageStore.java:948)


Thanks in advance,
Meetesh


Re: Wicket-auth-roles problem

2008-02-22 Thread Ted Roeloffzen
Thanks for the feedback, but i already figured out what i did wrong.
Can somebody get me a brown bag, because i forgot to call super.init() in
the init method of the webapplication class

Ted


2008/2/22, richardwilko <[EMAIL PROTECTED]>:
>
>
> A few questions:
>
> 1) does your session extend AuthenticatedWebSession
> 2) if so what does your getRoles() method in your web session look like
> 3) presumably you mean @AuthorizeInstantiation(Roles.USER) - without the
> stars?
> 4) do you manually set any of the options on getSecuritySettings() in your
> webapplication class (afaik you shouldn't, i don't)
>
> Richard
>
>
>
> Ted Roeloffzen-2 wrote:
> >
> > I've made a webapplication class that extends from
> > AuthenticatedWebApplication in the wicket-auth-roles project version
> 1.3.1
> > I've implemented the needed methods, such as getHomePage,
> > getSignInPageClass
> > and getWebSessionClass. They all return the appropiate class.
> > On the homepage i've added the annotation:
> @AuthorizeInstantiation(Roles.*
> > USER*)
> >
> > but when i run the application and go to the URL, it goes directly to
> the
> > homepage and the loginpage isn't called. This isn't supposed to happen,
> > because you need the user rol to get there.
> >
> > Does anyone have an idea about what i'm doing wrong?
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Wicket-auth-roles-problem-tp15631688p15632086.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 database access

2008-02-22 Thread James Carman
One thing you might want to consider is that Wicket's form support is
very good at editing "beans" (stuff with getters/setters) which means
you're going to have to transform data from your JDBC ResultSets into
a Java objects.  That sounds a lot like ORM to me and there are great
frameworks out there for that.  It's not that people or frameworks try
to cram ORM down your throat; it's that ORM is a proven solution to a
common problem.  With the combination of spring/hibernate/wicket, I
can whip together a form that updates a database (with validation) and
a screen that shows you query results (with paging, sorting) within a
half hour (maybe shorter if I don't take time to sip coffee :).  What
you need is a nice quickstart platform for doing
spring/hibernate/wicket that gets all the gruntwork done for you up
front.  I think they were working on a mvn archetype for that.  If
not, I was thinking about writing one myself.


On 2/22/08, wjser <[EMAIL PROTECTED]> wrote:
>
>  i do know how to handle JDBC. The problem is that i don't know how to use
>  JDBC inside Wicket.
>  I think that i have to implement IDataProvider wich would fetch the data
>  from the database, but i don't know how to do this. I also don't know how to
>  insert data into the database which come from a form.
>
>
>
>
>  igor.vaynberg wrote:
>  >
>  > google is your friend
>  >
>  > 
> http://www.stardeveloper.com/articles/display.html?article=2003090401&page=1
>  >
>  > -igor
>  >
>  >
>  > On Fri, Feb 22, 2008 at 1:22 AM, wjser <[EMAIL PROTECTED]> wrote:
>  >>
>  >>  I just want to communicate with a database (i.e. Mysql) like fetching
>  >> data
>  >>  from the DBMS and insert/update datasets. I have/want to use JDBC and
>  >> SQL
>  >>  for fetching and inserting the data into the database.
>  >>  I don't know how to do this.
>  >>
>  >>
>  >>
>  >>
>  >>  Florian Sperber wrote:
>  >>  >
>  >>  > Hi wjser,
>  >>  >
>  >>  >  > I'm frustrated, because i didn't any answer to my question. I
>  >>  > searched the
>  >>  >  > wicket documentation and the web, but found no information.
>  >>  >
>  >>  > since Wicket is a "Web-Application"-Framework many believe, that it
>  >>  > should focus on especially that area.
>  >>  >
>  >>  > Wicket provides very good tools to do data manipulation and allows you
>  >>  > to choose whichever Framework you want to use for Database-Access.
>  >>  >
>  >>  > Have a look at
>  >>  >http://databinder.net/site/show/overview
>  >>  > or just write your own jdbc-Backend.
>  >>  >
>  >>  >  > Nowadays no serios web application can be developed without
>  >> database
>  >>  > access
>  >>  >  > and a no developer should be forced to use an object-relational
>  >> mapper.
>  >>  >
>  >>  > Please explain what you mean here. Wicket goes the Java-Way and so
>  >> using
>  >>  > objects for any data manipulation seems to be the right thing.
>  >>  >
>  >>  > Kind regards
>  >>  > Florian Sperber
>  >>  >
>  >>  >
>  >>  >
>  >>  > -
>  >>  > To unsubscribe, e-mail: [EMAIL PROTECTED]
>  >>  > For additional commands, e-mail: [EMAIL PROTECTED]
>  >>  >
>  >>  >
>  >>  >
>  >>
>  >>  --
>  >>  View this message in context:
>  >> http://www.nabble.com/Wicket-database-access-tp15613515p15630127.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/Wicket-database-access-tp15613515p15630608.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: AjaxFormSubmitBehavior and setDefaultFormProcessing(false)?

2008-02-22 Thread Juha Alatalo
Of course I could, but I would like to create dropDownChoice I was 
describing.


- Juha

Maurice Marrink wrote:

Can't you use an AjaxSubmitLink?

Maurice

On Thu, Feb 21, 2008 at 12:57 PM, Juha Alatalo
<[EMAIL PROTECTED]> wrote:

Hi,

 I have created a dropDownChoice component where the last option is
 "browse"  == opens new page where user can make queries. (Similar to
 "look in" field in search panel of Windows XP, where user can select
 some default folders or can choose browse to give an exact folder)

 Because there is also other fields, form hast to be posted when opening
 new page from browse ==> AjaxFromSubmitBehavior("onchange"). Only
 problem is that I can't call setDefaultFormProcessing(false) in
 ajaxFormSubmitBehavior like I can do with Buttons. I would like to do
 validation only when user presses save button, not when he chooses to
 browse information for one field.

 Is there some way to solve this problem?

 - Juha


 -
 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: Accessing prototype scoped panel beans using @SpringBean annotation

2008-02-22 Thread Ned Collyer


Stefan Fußenegger wrote:
> 
> Hi Tom,
> 
> I'd suggest not to use Spring to manage panels. You should rather create a
> new panel for every page and request. You should use Spring to manage your
> services and inject those into your panels.
> 
> Best regards, Stefan
> 

Hi Stephan :) (I work with Tom)

We have a work around for this specific problem, and it still involves
spring, but not using panels directly.

Basically the situation is as follows.

We have a main wicket project which is published as a jar.

There are also other modules also published as "plugin" jars.

We launch these with an embedded jetty instance.

The problem is the Main project contains the page instances, and the other
jars contain the panels.

The Main project has no idea about which panels are available, as these will
be determined at run time by whatever has been configured (thru spring). 
The main jar has no knowledge of which panel classes exist - so we cannot
really instantiate new ones using plain old java.

There are a few ways to approach this, ie, having some class loader which
resolves given string "class references", and those strings are wired in
through spring.  This works - but feels a bit hacky.

Our workaround is .. somewhat similar - we basically have a panel factory in
the plugin that instantiate a panel and return it.  We can then wire these
panel factories thru spring to a given page.

This turns out to be quite elegant - however it would be nice if we had the
ability to wire "plugin" panels to the main jar directly without this
factory.

Rgds

Ned
-- 
View this message in context: 
http://www.nabble.com/Accessing-prototype-scoped-panel-beans-using-%40SpringBean-annotation-tp15627974p15632893.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]



ant-based example project?

2008-02-22 Thread palun

Hi all,

I just downloaded Wicket 1.3.1 and now I want to use Ant for building my app
and deploying it to Tomcat.  I thought it would be easy to find a good
example of an Ant-based project. But no. Everything seems to be all Maven...  

My question is: Is there a good example of an ant-based wicket project for
wicket-newbies? (If someone has such a project lying around, would you
consider making it available?)  

Many thanks!
/ulf

PS. I love Wicket, it's excellent! But I am afraid many potential users are
probably lost simply due to its tight connection to Maven, and that is a
shame... The point is: Wicket is so easy to use that it is "within reach"
also for less experienced programmers. -- Why ruin that with Maven? (Just
look at all the threads about Maven-related problems. We should be talking
Wicket here, not Maven. (Ohh, I know I'm in deep now...))


-- 
View this message in context: 
http://www.nabble.com/ant-based-example-project--tp15632894p15632894.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 database access

2008-02-22 Thread Nino Saturnino Martinez Vazquez Wael

Inline answer...

James Carman wrote:

One thing you might want to consider is that Wicket's form support is
very good at editing "beans" (stuff with getters/setters) which means
you're going to have to transform data from your JDBC ResultSets into
a Java objects.  That sounds a lot like ORM to me and there are great
frameworks out there for that.  It's not that people or frameworks try
to cram ORM down your throat; it's that ORM is a proven solution to a
common problem.  With the combination of spring/hibernate/wicket, I
can whip together a form that updates a database (with validation) and
a screen that shows you query results (with paging, sorting) within a
half hour (maybe shorter if I don't take time to sip coffee :).  What
you need is a nice quickstart platform for doing
spring/hibernate/wicket that gets all the gruntwork done for you up
front.  I think they were working on a mvn archetype for that.  If
not, I was thinking about writing one myself.

  
Yeah, I wanted to create the wicket-spring-jpa-hibernate archetype. But 
nothing has been done yet. It'll be the next thing I do. We could work 
together on this if you wanted to?




On 2/22/08, wjser <[EMAIL PROTECTED]> wrote:
  

 i do know how to handle JDBC. The problem is that i don't know how to use
 JDBC inside Wicket.
 I think that i have to implement IDataProvider wich would fetch the data
 from the database, but i don't know how to do this. I also don't know how to
 insert data into the database which come from a form.




 igor.vaynberg wrote:
 >
 > google is your friend
 >
 > http://www.stardeveloper.com/articles/display.html?article=2003090401&page=1
 >
 > -igor
 >
 >
 > On Fri, Feb 22, 2008 at 1:22 AM, wjser <[EMAIL PROTECTED]> wrote:
 >>
 >>  I just want to communicate with a database (i.e. Mysql) like fetching
 >> data
 >>  from the DBMS and insert/update datasets. I have/want to use JDBC and
 >> SQL
 >>  for fetching and inserting the data into the database.
 >>  I don't know how to do this.
 >>
 >>
 >>
 >>
 >>  Florian Sperber wrote:
 >>  >
 >>  > Hi wjser,
 >>  >
 >>  >  > I'm frustrated, because i didn't any answer to my question. I
 >>  > searched the
 >>  >  > wicket documentation and the web, but found no information.
 >>  >
 >>  > since Wicket is a "Web-Application"-Framework many believe, that it
 >>  > should focus on especially that area.
 >>  >
 >>  > Wicket provides very good tools to do data manipulation and allows you
 >>  > to choose whichever Framework you want to use for Database-Access.
 >>  >
 >>  > Have a look at
 >>  >http://databinder.net/site/show/overview
 >>  > or just write your own jdbc-Backend.
 >>  >
 >>  >  > Nowadays no serios web application can be developed without
 >> database
 >>  > access
 >>  >  > and a no developer should be forced to use an object-relational
 >> mapper.
 >>  >
 >>  > Please explain what you mean here. Wicket goes the Java-Way and so
 >> using
 >>  > objects for any data manipulation seems to be the right thing.
 >>  >
 >>  > Kind regards
 >>  > Florian Sperber
 >>  >
 >>  >
 >>  >
 >>  > -
 >>  > To unsubscribe, e-mail: [EMAIL PROTECTED]
 >>  > For additional commands, e-mail: [EMAIL PROTECTED]
 >>  >
 >>  >
 >>  >
 >>
 >>  --
 >>  View this message in context:
 >> http://www.nabble.com/Wicket-database-access-tp15613515p15630127.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/Wicket-database-access-tp15613515p15630608.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]


  


--
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]



Problem with multiwindow app

2008-02-22 Thread legol

Hi all!!!

I have application with 2 pages. First page lists users names and each
element of list is link to second page that shows user details. I want to
have this second page shown in other tab or window. Everything works fine
when I click one user link, detail page is loaded and i can operate on it.
But when i click on i.e. 5 links in very short time and 5 tabs are opened i
get 'page expired' on each of them. Thanks to logs I discovered that when i
open page in other tab or window it renders twice. Maybe this is the
problem. Do you have any idea how to solve it? 

pzdr,
Legol
-- 
View this message in context: 
http://www.nabble.com/Problem-with-multiwindow-app-tp15632896p15632896.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 database access

2008-02-22 Thread James Carman
On 2/22/08, Nino Saturnino Martinez Vazquez Wael
<[EMAIL PROTECTED]> wrote:
> Inline answer...
>
>
>  James Carman wrote:
>  > One thing you might want to consider is that Wicket's form support is
>  > very good at editing "beans" (stuff with getters/setters) which means
>  > you're going to have to transform data from your JDBC ResultSets into
>  > a Java objects.  That sounds a lot like ORM to me and there are great
>  > frameworks out there for that.  It's not that people or frameworks try
>  > to cram ORM down your throat; it's that ORM is a proven solution to a
>  > common problem.  With the combination of spring/hibernate/wicket, I
>  > can whip together a form that updates a database (with validation) and
>  > a screen that shows you query results (with paging, sorting) within a
>  > half hour (maybe shorter if I don't take time to sip coffee :).  What
>  > you need is a nice quickstart platform for doing
>  > spring/hibernate/wicket that gets all the gruntwork done for you up
>  > front.  I think they were working on a mvn archetype for that.  If
>  > not, I was thinking about writing one myself.
>  >
>  >
>
> Yeah, I wanted to create the wicket-spring-jpa-hibernate archetype. But
>  nothing has been done yet. It'll be the next thing I do. We could work
>  together on this if you wanted to?

That would be great!  Would this be part of Wicket that's hosted at
Apache or at Sourceforge (wicket-stuff I believe it's called)?

I am really getting into this Wicket thing and I think that anything I
can do to help make others see the light would be time well spent.
>
>
>
>  > On 2/22/08, wjser <[EMAIL PROTECTED]> wrote:
>  >
>  >>  i do know how to handle JDBC. The problem is that i don't know how to use
>  >>  JDBC inside Wicket.
>  >>  I think that i have to implement IDataProvider wich would fetch the data
>  >>  from the database, but i don't know how to do this. I also don't know 
> how to
>  >>  insert data into the database which come from a form.
>  >>
>  >>
>  >>
>  >>
>  >>  igor.vaynberg wrote:
>  >>  >
>  >>  > google is your friend
>  >>  >
>  >>  > 
> http://www.stardeveloper.com/articles/display.html?article=2003090401&page=1
>  >>  >
>  >>  > -igor
>  >>  >
>  >>  >
>  >>  > On Fri, Feb 22, 2008 at 1:22 AM, wjser <[EMAIL PROTECTED]> wrote:
>  >>  >>
>  >>  >>  I just want to communicate with a database (i.e. Mysql) like fetching
>  >>  >> data
>  >>  >>  from the DBMS and insert/update datasets. I have/want to use JDBC and
>  >>  >> SQL
>  >>  >>  for fetching and inserting the data into the database.
>  >>  >>  I don't know how to do this.
>  >>  >>
>  >>  >>
>  >>  >>
>  >>  >>
>  >>  >>  Florian Sperber wrote:
>  >>  >>  >
>  >>  >>  > Hi wjser,
>  >>  >>  >
>  >>  >>  >  > I'm frustrated, because i didn't any answer to my question. I
>  >>  >>  > searched the
>  >>  >>  >  > wicket documentation and the web, but found no information.
>  >>  >>  >
>  >>  >>  > since Wicket is a "Web-Application"-Framework many believe, that it
>  >>  >>  > should focus on especially that area.
>  >>  >>  >
>  >>  >>  > Wicket provides very good tools to do data manipulation and allows 
> you
>  >>  >>  > to choose whichever Framework you want to use for Database-Access.
>  >>  >>  >
>  >>  >>  > Have a look at
>  >>  >>  >http://databinder.net/site/show/overview
>  >>  >>  > or just write your own jdbc-Backend.
>  >>  >>  >
>  >>  >>  >  > Nowadays no serios web application can be developed without
>  >>  >> database
>  >>  >>  > access
>  >>  >>  >  > and a no developer should be forced to use an object-relational
>  >>  >> mapper.
>  >>  >>  >
>  >>  >>  > Please explain what you mean here. Wicket goes the Java-Way and so
>  >>  >> using
>  >>  >>  > objects for any data manipulation seems to be the right thing.
>  >>  >>  >
>  >>  >>  > Kind regards
>  >>  >>  > Florian Sperber
>  >>  >>  >
>  >>  >>  >
>  >>  >>  >
>  >>  >>  > 
> -
>  >>  >>  > To unsubscribe, e-mail: [EMAIL PROTECTED]
>  >>  >>  > For additional commands, e-mail: [EMAIL PROTECTED]
>  >>  >>  >
>  >>  >>  >
>  >>  >>  >
>  >>  >>
>  >>  >>  --
>  >>  >>  View this message in context:
>  >>  >> http://www.nabble.com/Wicket-database-access-tp15613515p15630127.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/Wicket-database-access-tp15613515p15630608.html
>  >>
>  >> Sent f

Re: ant-based example project?

2008-02-22 Thread C.

On Fri, 2008-02-22 at 05:02 -0800, palun wrote:
> Hi all,
> 
> I just downloaded Wicket 1.3.1 and now I want to use Ant for building my app
> and deploying it to Tomcat.  I thought it would be easy to find a good
> example of an Ant-based project. But no. Everything seems to be all Maven...  
> 
> My question is: Is there a good example of an ant-based wicket project for
> wicket-newbies? (If someone has such a project lying around, would you
> consider making it available?)  
> 


If you don't know how to use ant why would you want to use it?  Ok.. if
you *really* want to use ant.. iirc

mvn ant:ant

Good luck

./C


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



Wicket 1.3.x DatePicket drop-in replacement

2008-02-22 Thread Paolo Di Tommaso
Guys,

as stated in the migration 1.3 migration guide I'm trying to use the drop-in
replacement for the old (JSCalendar based) DatePicker.

http://cwiki.apache.org/WICKET/migrate-13.html#Migrate-1.3-DatePicker

But the download jar named "wicket-contrib-datepicker-1.2.jar" still make
references to 1.2.x wicket classes (wicket.xxx.Xxx classes) so I'm unable to
use together the wicket 1.3 core classes.


Is there a distribution of the previous DatePicker that works with Wicket
1.3 ?


Thank you,


Paolo


Re: Wicket database access

2008-02-22 Thread Nino Saturnino Martinez Vazquez Wael



James Carman wrote:

On 2/22/08, Nino Saturnino Martinez Vazquez Wael
<[EMAIL PROTECTED]> wrote:
  

Inline answer...


 James Carman wrote:
 > One thing you might want to consider is that Wicket's form support is
 > very good at editing "beans" (stuff with getters/setters) which means
 > you're going to have to transform data from your JDBC ResultSets into
 > a Java objects.  That sounds a lot like ORM to me and there are great
 > frameworks out there for that.  It's not that people or frameworks try
 > to cram ORM down your throat; it's that ORM is a proven solution to a
 > common problem.  With the combination of spring/hibernate/wicket, I
 > can whip together a form that updates a database (with validation) and
 > a screen that shows you query results (with paging, sorting) within a
 > half hour (maybe shorter if I don't take time to sip coffee :).  What
 > you need is a nice quickstart platform for doing
 > spring/hibernate/wicket that gets all the gruntwork done for you up
 > front.  I think they were working on a mvn archetype for that.  If
 > not, I was thinking about writing one myself.
 >
 >

Yeah, I wanted to create the wicket-spring-jpa-hibernate archetype. But
 nothing has been done yet. It'll be the next thing I do. We could work
 together on this if you wanted to?



That would be great!  Would this be part of Wicket that's hosted at
Apache or at Sourceforge (wicket-stuff I believe it's called)?

  
I think the first version probably would be located at wicketstuff. If 
devs then say okay, we could then move it to the core project (i think) 
or to the place where the other archetypes are.



I am really getting into this Wicket thing and I think that anything I
can do to help make others see the light would be time well spent.
  

Welcome to the wicket movement:) I feel exactly the same.


 > On 2/22/08, wjser <[EMAIL PROTECTED]> wrote:
 >
 >>  i do know how to handle JDBC. The problem is that i don't know how to use
 >>  JDBC inside Wicket.
 >>  I think that i have to implement IDataProvider wich would fetch the data
 >>  from the database, but i don't know how to do this. I also don't know how 
to
 >>  insert data into the database which come from a form.
 >>
 >>
 >>
 >>
 >>  igor.vaynberg wrote:
 >>  >
 >>  > google is your friend
 >>  >
 >>  > 
http://www.stardeveloper.com/articles/display.html?article=2003090401&page=1
 >>  >
 >>  > -igor
 >>  >
 >>  >
 >>  > On Fri, Feb 22, 2008 at 1:22 AM, wjser <[EMAIL PROTECTED]> wrote:
 >>  >>
 >>  >>  I just want to communicate with a database (i.e. Mysql) like fetching
 >>  >> data
 >>  >>  from the DBMS and insert/update datasets. I have/want to use JDBC and
 >>  >> SQL
 >>  >>  for fetching and inserting the data into the database.
 >>  >>  I don't know how to do this.
 >>  >>
 >>  >>
 >>  >>
 >>  >>
 >>  >>  Florian Sperber wrote:
 >>  >>  >
 >>  >>  > Hi wjser,
 >>  >>  >
 >>  >>  >  > I'm frustrated, because i didn't any answer to my question. I
 >>  >>  > searched the
 >>  >>  >  > wicket documentation and the web, but found no information.
 >>  >>  >
 >>  >>  > since Wicket is a "Web-Application"-Framework many believe, that it
 >>  >>  > should focus on especially that area.
 >>  >>  >
 >>  >>  > Wicket provides very good tools to do data manipulation and allows 
you
 >>  >>  > to choose whichever Framework you want to use for Database-Access.
 >>  >>  >
 >>  >>  > Have a look at
 >>  >>  >http://databinder.net/site/show/overview
 >>  >>  > or just write your own jdbc-Backend.
 >>  >>  >
 >>  >>  >  > Nowadays no serios web application can be developed without
 >>  >> database
 >>  >>  > access
 >>  >>  >  > and a no developer should be forced to use an object-relational
 >>  >> mapper.
 >>  >>  >
 >>  >>  > Please explain what you mean here. Wicket goes the Java-Way and so
 >>  >> using
 >>  >>  > objects for any data manipulation seems to be the right thing.
 >>  >>  >
 >>  >>  > Kind regards
 >>  >>  > Florian Sperber
 >>  >>  >
 >>  >>  >
 >>  >>  >
 >>  >>  > -
 >>  >>  > To unsubscribe, e-mail: [EMAIL PROTECTED]
 >>  >>  > For additional commands, e-mail: [EMAIL PROTECTED]
 >>  >>  >
 >>  >>  >
 >>  >>  >
 >>  >>
 >>  >>  --
 >>  >>  View this message in context:
 >>  >> http://www.nabble.com/Wicket-database-access-tp15613515p15630127.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/Wicket-database-access-tp

Re: Accessing prototype scoped panel beans using @SpringBean annotation

2008-02-22 Thread Stefan Fußenegger

What do you mean by "directly"? Do you want to inject the panels rather than
the factories? You could probably try to write your own annotation and use a
custom org.apache.wicket.injection.IFieldValueFactory



Ned Collyer wrote:
> 
> 
> Stefan Fußenegger wrote:
>> 
>> Hi Tom,
>> 
>> I'd suggest not to use Spring to manage panels. You should rather create
>> a new panel for every page and request. You should use Spring to manage
>> your services and inject those into your panels.
>> 
>> Best regards, Stefan
>> 
> 
> Hi Stephan :) (I work with Tom)
> 
> We have a work around for this specific problem, and it still involves
> spring, but not using panels directly.
> 
> Basically the situation is as follows.
> 
> We have a main wicket project which is published as a jar.
> 
> There are also other modules also published as "plugin" jars.
> 
> We launch these with an embedded jetty instance.
> 
> The problem is the Main project contains the page instances, and the other
> jars contain the panels.
> 
> The Main project has no idea about which panels are available, as these
> will be determined at run time by whatever has been configured (thru
> spring).  The main jar has no knowledge of which panel classes exist - so
> we cannot really instantiate new ones using plain old java.
> 
> There are a few ways to approach this, ie, having some class loader which
> resolves given string "class references", and those strings are wired in
> through spring.  This works - but feels a bit hacky.
> 
> Our workaround is .. somewhat similar - we basically have a panel factory
> in the plugin that instantiate a panel and return it.  We can then wire
> these panel factories thru spring to a given page.
> 
> This turns out to be quite elegant - however it would be nice if we had
> the ability to wire "plugin" panels to the main jar directly without this
> factory.
> 
> Rgds
> 
> Ned
> 


-
---
Stefan Fußenegger
http://talk-on-tech.blogspot.com // looking for a nicer domain ;)
-- 
View this message in context: 
http://www.nabble.com/Accessing-prototype-scoped-panel-beans-using-%40SpringBean-annotation-tp15627974p15632905.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: ant-based example project?

2008-02-22 Thread Ryan Gravener
http://qwicket.sf.net

On 22/02/2008, palun <[EMAIL PROTECTED]> wrote:
>
> Hi all,
>
> I just downloaded Wicket 1.3.1 and now I want to use Ant for building my app
> and deploying it to Tomcat.  I thought it would be easy to find a good
> example of an Ant-based project. But no. Everything seems to be all Maven...
>
>
> My question is: Is there a good example of an ant-based wicket project for
> wicket-newbies? (If someone has such a project lying around, would you
> consider making it available?)
>
> Many thanks!
> /ulf
>
> PS. I love Wicket, it's excellent! But I am afraid many potential users are
> probably lost simply due to its tight connection to Maven, and that is a
> shame... The point is: Wicket is so easy to use that it is "within reach"
> also for less experienced programmers. -- Why ruin that with Maven? (Just
> look at all the threads about Maven-related problems. We should be talking
> Wicket here, not Maven. (Ohh, I know I'm in deep now...))
>
>
> --
> View this message in context:
> http://www.nabble.com/ant-based-example-project--tp15632894p15632894.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]
>
>


-- 
Ryan Gravener
http://ryangravener.com

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



Re: Wicket database access

2008-02-22 Thread James Carman
On 2/22/08, Nino Saturnino Martinez Vazquez Wael
<[EMAIL PROTECTED]> wrote:
>
> I think the first version probably would be located at wicketstuff. If
>  devs then say okay, we could then move it to the core project (i think)
>  or to the place where the other archetypes are.
>

The only problem with this approach is that any existing code that
comes into Apache from the outside world is supposed to go through the
Apache Incubator to make sure that it is "clean" with respect to
intellectual property rights and everything.  At least this is my
understanding.  It might be wiser to actually begin the project within
the Wicket repository in a branch or something.

>
>  > I am really getting into this Wicket thing and I think that anything I
>  > can do to help make others see the light would be time well spent.
>  >
>
> Welcome to the wicket movement:) I feel exactly the same.
>
> >>
>  >>  > On 2/22/08, wjser <[EMAIL PROTECTED]> wrote:
>  >>  >
>  >>  >>  i do know how to handle JDBC. The problem is that i don't know how 
> to use
>  >>  >>  JDBC inside Wicket.
>  >>  >>  I think that i have to implement IDataProvider wich would fetch the 
> data
>  >>  >>  from the database, but i don't know how to do this. I also don't 
> know how to
>  >>  >>  insert data into the database which come from a form.
>  >>  >>
>  >>  >>
>  >>  >>
>  >>  >>
>  >>  >>  igor.vaynberg wrote:
>  >>  >>  >
>  >>  >>  > google is your friend
>  >>  >>  >
>  >>  >>  > 
> http://www.stardeveloper.com/articles/display.html?article=2003090401&page=1
>  >>  >>  >
>  >>  >>  > -igor
>  >>  >>  >
>  >>  >>  >
>  >>  >>  > On Fri, Feb 22, 2008 at 1:22 AM, wjser <[EMAIL PROTECTED]> wrote:
>  >>  >>  >>
>  >>  >>  >>  I just want to communicate with a database (i.e. Mysql) like 
> fetching
>  >>  >>  >> data
>  >>  >>  >>  from the DBMS and insert/update datasets. I have/want to use 
> JDBC and
>  >>  >>  >> SQL
>  >>  >>  >>  for fetching and inserting the data into the database.
>  >>  >>  >>  I don't know how to do this.
>  >>  >>  >>
>  >>  >>  >>
>  >>  >>  >>
>  >>  >>  >>
>  >>  >>  >>  Florian Sperber wrote:
>  >>  >>  >>  >
>  >>  >>  >>  > Hi wjser,
>  >>  >>  >>  >
>  >>  >>  >>  >  > I'm frustrated, because i didn't any answer to my question. 
> I
>  >>  >>  >>  > searched the
>  >>  >>  >>  >  > wicket documentation and the web, but found no information.
>  >>  >>  >>  >
>  >>  >>  >>  > since Wicket is a "Web-Application"-Framework many believe, 
> that it
>  >>  >>  >>  > should focus on especially that area.
>  >>  >>  >>  >
>  >>  >>  >>  > Wicket provides very good tools to do data manipulation and 
> allows you
>  >>  >>  >>  > to choose whichever Framework you want to use for 
> Database-Access.
>  >>  >>  >>  >
>  >>  >>  >>  > Have a look at
>  >>  >>  >>  >http://databinder.net/site/show/overview
>  >>  >>  >>  > or just write your own jdbc-Backend.
>  >>  >>  >>  >
>  >>  >>  >>  >  > Nowadays no serios web application can be developed without
>  >>  >>  >> database
>  >>  >>  >>  > access
>  >>  >>  >>  >  > and a no developer should be forced to use an 
> object-relational
>  >>  >>  >> mapper.
>  >>  >>  >>  >
>  >>  >>  >>  > Please explain what you mean here. Wicket goes the Java-Way 
> and so
>  >>  >>  >> using
>  >>  >>  >>  > objects for any data manipulation seems to be the right thing.
>  >>  >>  >>  >
>  >>  >>  >>  > Kind regards
>  >>  >>  >>  > Florian Sperber
>  >>  >>  >>  >
>  >>  >>  >>  >
>  >>  >>  >>  >
>  >>  >>  >>  > 
> -
>  >>  >>  >>  > To unsubscribe, e-mail: [EMAIL PROTECTED]
>  >>  >>  >>  > For additional commands, e-mail: [EMAIL PROTECTED]
>  >>  >>  >>  >
>  >>  >>  >>  >
>  >>  >>  >>  >
>  >>  >>  >>
>  >>  >>  >>  --
>  >>  >>  >>  View this message in context:
>  >>  >>  >> 
> http://www.nabble.com/Wicket-database-access-tp15613515p15630127.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/Wicket-database-access-tp15613515p15630608.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 database access

2008-02-22 Thread Nino Saturnino Martinez Vazquez Wael



James Carman wrote:

On 2/22/08, Nino Saturnino Martinez Vazquez Wael
<[EMAIL PROTECTED]> wrote:
  

I think the first version probably would be located at wicketstuff. If
 devs then say okay, we could then move it to the core project (i think)
 or to the place where the other archetypes are.




The only problem with this approach is that any existing code that
comes into Apache from the outside world is supposed to go through the
Apache Incubator to make sure that it is "clean" with respect to
intellectual property rights and everything.  At least this is my
understanding.  It might be wiser to actually begin the project within
the Wicket repository in a branch or something.
  

Okay, lets ask the devs if it's okay todo it that way:)

 > I am really getting into this Wicket thing and I think that anything I
 > can do to help make others see the light would be time well spent.
 >

Welcome to the wicket movement:) I feel exactly the same.


 >>  > On 2/22/08, wjser <[EMAIL PROTECTED]> wrote:

 >>  >
 >>  >>  i do know how to handle JDBC. The problem is that i don't know how to 
use
 >>  >>  JDBC inside Wicket.
 >>  >>  I think that i have to implement IDataProvider wich would fetch the 
data
 >>  >>  from the database, but i don't know how to do this. I also don't know 
how to
 >>  >>  insert data into the database which come from a form.
 >>  >>
 >>  >>
 >>  >>
 >>  >>
 >>  >>  igor.vaynberg wrote:
 >>  >>  >
 >>  >>  > google is your friend
 >>  >>  >
 >>  >>  > 
http://www.stardeveloper.com/articles/display.html?article=2003090401&page=1
 >>  >>  >
 >>  >>  > -igor
 >>  >>  >
 >>  >>  >
 >>  >>  > On Fri, Feb 22, 2008 at 1:22 AM, wjser <[EMAIL PROTECTED]> wrote:
 >>  >>  >>
 >>  >>  >>  I just want to communicate with a database (i.e. Mysql) like 
fetching
 >>  >>  >> data
 >>  >>  >>  from the DBMS and insert/update datasets. I have/want to use JDBC 
and
 >>  >>  >> SQL
 >>  >>  >>  for fetching and inserting the data into the database.
 >>  >>  >>  I don't know how to do this.
 >>  >>  >>
 >>  >>  >>
 >>  >>  >>
 >>  >>  >>
 >>  >>  >>  Florian Sperber wrote:
 >>  >>  >>  >
 >>  >>  >>  > Hi wjser,
 >>  >>  >>  >
 >>  >>  >>  >  > I'm frustrated, because i didn't any answer to my question. I
 >>  >>  >>  > searched the
 >>  >>  >>  >  > wicket documentation and the web, but found no information.
 >>  >>  >>  >
 >>  >>  >>  > since Wicket is a "Web-Application"-Framework many believe, that 
it
 >>  >>  >>  > should focus on especially that area.
 >>  >>  >>  >
 >>  >>  >>  > Wicket provides very good tools to do data manipulation and 
allows you
 >>  >>  >>  > to choose whichever Framework you want to use for 
Database-Access.
 >>  >>  >>  >
 >>  >>  >>  > Have a look at
 >>  >>  >>  >http://databinder.net/site/show/overview
 >>  >>  >>  > or just write your own jdbc-Backend.
 >>  >>  >>  >
 >>  >>  >>  >  > Nowadays no serios web application can be developed without
 >>  >>  >> database
 >>  >>  >>  > access
 >>  >>  >>  >  > and a no developer should be forced to use an 
object-relational
 >>  >>  >> mapper.
 >>  >>  >>  >
 >>  >>  >>  > Please explain what you mean here. Wicket goes the Java-Way and 
so
 >>  >>  >> using
 >>  >>  >>  > objects for any data manipulation seems to be the right thing.
 >>  >>  >>  >
 >>  >>  >>  > Kind regards
 >>  >>  >>  > Florian Sperber
 >>  >>  >>  >
 >>  >>  >>  >
 >>  >>  >>  >
 >>  >>  >>  > 
-
 >>  >>  >>  > To unsubscribe, e-mail: [EMAIL PROTECTED]
 >>  >>  >>  > For additional commands, e-mail: [EMAIL PROTECTED]
 >>  >>  >>  >
 >>  >>  >>  >
 >>  >>  >>  >
 >>  >>  >>
 >>  >>  >>  --
 >>  >>  >>  View this message in context:
 >>  >>  >> 
http://www.nabble.com/Wicket-database-access-tp15613515p15630127.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/Wicket-database-access-tp15613515p15630608.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 

Re: OutOfMemoryError (not PermGen) in PageSavingThread

2008-02-22 Thread Henrik Lundahl
Hi

One thing you can check is if you have any references (instance variables,
possibly implicit) to pages from your component hierarchy. That seems to
cause memory leaks in the serialization. I reported a Jira issue about this
yesterday (https://issues.apache.org/jira/browse/WICKET-1365).

Another thing could of course be that there isn't enough memory to store all
the concurrent sessions. If you still run out of memory after increasing the
limit with the same load, this shouldn't be it, though.


BR,
Henrik



2008/2/22, Meetesh Karia <[EMAIL PROTECTED]>:
>
> Hi all,
>
> We're getting an OutOfMemoryError (Wicket 1.3.1 on Tomcat 5.5.17 with
> Sun JVM 1.5.0_06-b05) in the PageSavingThread occasionally and I was
> just wondering if anyone had seen this before.  Is it likely just a
> side-effect of some other problem in our application?  Or is this an
> issue with how the pages are written out in wicket.
>
> Exception in thread "PageSavingThread-wicketFilter"
> java.lang.OutOfMemoryError
> at sun.misc.Unsafe.allocateMemory(Native Method)
> at java.nio.DirectByteBuffer.(DirectByteBuffer.java:99)
> at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:288)
> at sun.nio.ch.Util.getTemporaryDirectBuffer(Util.java:56)
> at sun.nio.ch.IOUtil.write(IOUtil.java:69)
> at sun.nio.ch.FileChannelImpl.write(FileChannelImpl.java:651)
> at
>
> org.apache.wicket.protocol.http.pagestore.DiskPageStore$SessionEntry.savePage
> (DiskPageStore.java:246)
> at
>
> org.apache.wicket.protocol.http.pagestore.DiskPageStore.flushPagesToSaveList
> (DiskPageStore.java:885)
> at
>
> org.apache.wicket.protocol.http.pagestore.DiskPageStore$PageSavingThread.run
> (DiskPageStore.java:948)
>
> Thanks in advance,
>
> Meetesh
>


Re: ant-based example project?

2008-02-22 Thread richardwilko

Hi,

We dont use maven for wicket, and use ant, instead.  However we are using an
very uncommon app server so our project layout wouldn't really help you.

I don't see why it should be a problem to use ant tho, just make sure you
have the required wicket jars available and compile as normal, im pretty
sure you could make it output a war file for you to deploy to your app
server too, but i dont know much about ant.

Having said that I found that using maven is an easy way to get up and
running, this webcast might help you:
http://herebebeasties.com/2007-10-07/wicket-quickstart/

richard



palun wrote:
> 
> Hi all,
> 
> I just downloaded Wicket 1.3.1 and now I want to use Ant for building my
> app and deploying it to Tomcat.  I thought it would be easy to find a good
> example of an Ant-based project. But no. Everything seems to be all
> Maven...  
> 
> My question is: Is there a good example of an ant-based wicket project for
> wicket-newbies? (If someone has such a project lying around, would you
> consider making it available?)  
> 
> Many thanks!
> /ulf
> 
> PS. I love Wicket, it's excellent! But I am afraid many potential users
> are probably lost simply due to its tight connection to Maven, and that is
> a shame... The point is: Wicket is so easy to use that it is "within
> reach" also for less experienced programmers. -- Why ruin that with Maven?
> (Just look at all the threads about Maven-related problems. We should be
> talking Wicket here, not Maven. (Ohh, I know I'm in deep now...))
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/ant-based-example-project--tp15632894p15633221.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: OutOfMemoryError (not PermGen) in PageSavingThread

2008-02-22 Thread Meetesh Karia

Thanks Henrik,

We don't store Page references (we use getPage()) except in one case but 
that's a reference to the current page.  I did come across this 
information about a JVM bug:


http://bugs.sun.com/bugdatabase/view_bug.do;jsessionid=414ae2ad0e65bfabc12f25012527?bug_id=4879883

It looks like there's a property we can try but that it's not 
necessarily and ideal (or even acceptable?) solution?  Sun devs say this 
was fixed in 1.4 but people have been complaining about it in 1.5 and 1.6.


Some more information on this:

http://osdir.com/ml/java.bdbje.general/2005-05/msg00027.html

So, we'll give it a shot and report back to the list (in case others 
come across this problem).  Though ... it does concern me some that we 
would have used up 64mb of direct memory writing out pages.  It appears 
as though the memory is deallocated using a separate thread (in 
java.nio.DirectByteBuffer) so it's possible that wicket is writing out 
pages and using up the direct memory before it can be cleaned up.


Meetesh

Henrik Lundahl wrote:

Hi

One thing you can check is if you have any references (instance 
variables, possibly implicit) to pages from your component hierarchy. 
That seems to cause memory leaks in the serialization. I reported a 
Jira issue about this yesterday 
(https://issues.apache.org/jira/browse/WICKET-1365).


Another thing could of course be that there isn't enough memory to 
store all the concurrent sessions. If you still run out of memory 
after increasing the limit with the same load, this shouldn't be it, 
though.



BR,
Henrik



2008/2/22, Meetesh Karia <[EMAIL PROTECTED] 
>:


Hi all,

We're getting an OutOfMemoryError (Wicket 1.3.1 on Tomcat 5.5.17 with
Sun JVM 1.5.0_06-b05) in the PageSavingThread occasionally and I was
just wondering if anyone had seen this before.  Is it likely just a
side-effect of some other problem in our application?  Or is this an
issue with how the pages are written out in wicket.

Exception in thread "PageSavingThread-wicketFilter"
java.lang.OutOfMemoryError
at sun.misc.Unsafe.allocateMemory(Native Method)
at java.nio.DirectByteBuffer.(DirectByteBuffer.java:99)
at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:288)
at sun.nio.ch.Util.getTemporaryDirectBuffer(Util.java:56)
at sun.nio.ch.IOUtil.write(IOUtil.java:69)
at sun.nio.ch.FileChannelImpl.write(FileChannelImpl.java:651)
at

org.apache.wicket.protocol.http.pagestore.DiskPageStore$SessionEntry.savePage(DiskPageStore.java:246)
at

org.apache.wicket.protocol.http.pagestore.DiskPageStore.flushPagesToSaveList(DiskPageStore.java:885)
at

org.apache.wicket.protocol.http.pagestore.DiskPageStore$PageSavingThread.run(DiskPageStore.java:948)

Thanks in advance,

Meetesh




Re: OutOfMemoryError

2008-02-22 Thread Thomas Singer
You can try to see if its any page in particular that causes this. Or of its something general... Also you need to watch out for objects that just keep growing in number.. 


None of our classes has an unexpected high instance count.

It's a little abstract to use a profiler as it will not give you a clear idea as everything originates in class[] int[] etc... 


Of course.

Tom


Nino Saturnino Martinez Vazquez Wael wrote:
You can try to see if its any page in particular that causes this. Or of 
its something general... Also you need to watch out for objects that 
just keep growing in number..


It's a little abstract to use a profiler as it will not give you a clear 
idea as everything originates in class[] int[] etc...


regards Nino

Thomas Singer wrote:

Be sure to checkout the wiki for gotchas and tips:

http://cwiki.apache.org/WICKET/wicket-and-jmeter.html

http://cwiki.apache.org/WICKET/wicket-and-jmeter-with-regular-expressions.html 




Already done, but what we can get? An OOME in our application with the 
heapdump. Well, we already have one and the most used objects appear 
to come from Wicket (char[], byte[], String, [], HashMap$Entry, 
XMLTag, ValueMap, ComponentTag, RawMarkup, HashMap$EntrySet, int[], 
short[] just to name the largest).


--
Best regards,
Thomas Singer
_
SyntEvo GmbH
www.syntevo.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: OutOfMemoryError

2008-02-22 Thread Thomas Singer
Well, our application class (derived from 
org.apache.wicket.protocol.http.WebApplication) occurs near the top of the 
list when sorting by retained size, but our code does not contain dynamic 
elements. For me it looks strange, that there exist 3 instances of our 
application class (we don't create them).


Tom

Maeder Thomas wrote:
Thomas, 


the memory footprint per class usually doesn't really allow to pinpoint
the reference that causes a memory leak (usually the top entries are
char[], String, etc.). For that, you need to trace back to the reference
that should not be there. We use YourKit to great benefit (do I get
goodies now, comrades?). Yourkit can show the "retained size" of an
object. If one of your Objects shows up near the top of the list, that
is a good candidate.

alternatively, the hprof dump would be more helpful than HTML.

(some other) Thomas




As already written a couple of weeks ago, we regularly get 
OutOfMemoryErrors with our Wicket-based website. I've finally 
got a heapdump.hprof and no entry above 3kByte size is from 
our code. If someone from the Wicket team is interested, I 
can send the html-instance information sorted by size or 
instance count.




-
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: OutOfMemoryError

2008-02-22 Thread Nino Saturnino Martinez Vazquez Wael



Thomas Singer wrote:
You can try to see if its any page in particular that causes this. Or 
of its something general... Also you need to watch out for objects 
that just keep growing in number.. 


None of our classes has an unexpected high instance count.

Im not sure if youve already done this. So thats why you need to poke 
around with jmeter, hit the different pages(in different tests) maybe 
thousands of times(if its a very small leak). Then the difference should 
be more clear. I once had an error that originated in a hashmap that 
locked session context, it was very hard to find and was not our error 
but a 3rd party I used 4 very long days for finding the problem...
It's a little abstract to use a profiler as it will not give you a 
clear idea as everything originates in class[] int[] etc... 


Of course.

Tom


Nino Saturnino Martinez Vazquez Wael wrote:
You can try to see if its any page in particular that causes this. Or 
of its something general... Also you need to watch out for objects 
that just keep growing in number..


It's a little abstract to use a profiler as it will not give you a 
clear idea as everything originates in class[] int[] etc...


regards Nino

Thomas Singer wrote:

Be sure to checkout the wiki for gotchas and tips:

http://cwiki.apache.org/WICKET/wicket-and-jmeter.html

http://cwiki.apache.org/WICKET/wicket-and-jmeter-with-regular-expressions.html 





Already done, but what we can get? An OOME in our application with 
the heapdump. Well, we already have one and the most used objects 
appear to come from Wicket (char[], byte[], String, [], 
HashMap$Entry, XMLTag, ValueMap, ComponentTag, RawMarkup, 
HashMap$EntrySet, int[], short[] just to name the largest).


--
Best regards,
Thomas Singer
_
SyntEvo GmbH
www.syntevo.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]




--
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: OutOfMemoryError

2008-02-22 Thread Thomas Singer
Right, I did not run JMeter for hours to find our some growing instance 
count. Until now I used the heapdump I've got from an OOME on our production 
system. Although this does not show the *increasing* instance count, but I 
can take a look at the instance count and object size at the time of the 
OOME. Shouldn't that help to find out the problematic instance(s)?


Tom

Nino Saturnino Martinez Vazquez Wael wrote:



Thomas Singer wrote:
You can try to see if its any page in particular that causes this. Or 
of its something general... Also you need to watch out for objects 
that just keep growing in number.. 


None of our classes has an unexpected high instance count.

Im not sure if youve already done this. So thats why you need to poke 
around with jmeter, hit the different pages(in different tests) maybe 
thousands of times(if its a very small leak). Then the difference should 
be more clear. I once had an error that originated in a hashmap that 
locked session context, it was very hard to find and was not our error 
but a 3rd party I used 4 very long days for finding the problem...
It's a little abstract to use a profiler as it will not give you a 
clear idea as everything originates in class[] int[] etc... 


Of course.

Tom


Nino Saturnino Martinez Vazquez Wael wrote:
You can try to see if its any page in particular that causes this. Or 
of its something general... Also you need to watch out for objects 
that just keep growing in number..


It's a little abstract to use a profiler as it will not give you a 
clear idea as everything originates in class[] int[] etc...


regards Nino

Thomas Singer wrote:

Be sure to checkout the wiki for gotchas and tips:

http://cwiki.apache.org/WICKET/wicket-and-jmeter.html

http://cwiki.apache.org/WICKET/wicket-and-jmeter-with-regular-expressions.html 






Already done, but what we can get? An OOME in our application with 
the heapdump. Well, we already have one and the most used objects 
appear to come from Wicket (char[], byte[], String, [], 
HashMap$Entry, XMLTag, ValueMap, ComponentTag, RawMarkup, 
HashMap$EntrySet, int[], short[] just to name the largest).


--
Best regards,
Thomas Singer
_
SyntEvo GmbH
www.syntevo.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]






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



RE: usage of AbortWithHttpStatusException

2008-02-22 Thread Hoover, William
If you would like to have custom Http error pages you can update the wicket 
filter-mapping in your web.xml to the following (notice the dispatchers):


WicketFilter
/*
REQUEST
ERROR



404
/404


This is assuming that you have mapped "/404" in your WebApplication:

mount(new HybridUrlCodingStrategy("/404", PageNotFound.class));

PageNotFound.java WebPage:

@Override
protected void configureResponse() {

getWebRequestCycle().getWebResponse().getHttpServletResponse().setStatus(HttpServletResponse.SC_NOT_FOUND);
}

-Original Message-
From: Stefan Fußenegger [mailto:[EMAIL PROTECTED]
Sent: Friday, February 22, 2008 5:51 AM
To: users@wicket.apache.org
Subject: usage of AbortWithHttpStatusException



Hi,

How is AbortWithHttpStatusException meant to be used? I expected that this
exception would result in a (e.g.) 404 error page to be shown. However, all
I get is an empty page. Any ideas on how I can get a nice, custom error page
to show up?

Cheers, Stefan

btw: i'm using jetty if this is important.

-
---
Stefan Fußenegger
http://talk-on-tech.blogspot.com // looking for a nicer domain ;)
-- 
View this message in context: 
http://www.nabble.com/usage-of-AbortWithHttpStatusException-tp15631513p15631513.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: OutOfMemoryError

2008-02-22 Thread Thomas Singer
I've did some further investigation and the largest objects seem to be the 
settings from org.apache.wicket.Application, particular the markupCache.


Tom


Thomas Singer wrote:
Well, our application class (derived from 
org.apache.wicket.protocol.http.WebApplication) occurs near the top of 
the list when sorting by retained size, but our code does not contain 
dynamic elements. For me it looks strange, that there exist 3 instances 
of our application class (we don't create them).


Tom

Maeder Thomas wrote:

Thomas,
the memory footprint per class usually doesn't really allow to pinpoint
the reference that causes a memory leak (usually the top entries are
char[], String, etc.). For that, you need to trace back to the reference
that should not be there. We use YourKit to great benefit (do I get
goodies now, comrades?). Yourkit can show the "retained size" of an
object. If one of your Objects shows up near the top of the list, that
is a good candidate.

alternatively, the hprof dump would be more helpful than HTML.

(some other) Thomas




As already written a couple of weeks ago, we regularly get 
OutOfMemoryErrors with our Wicket-based website. I've finally got a 
heapdump.hprof and no entry above 3kByte size is from our code. If 
someone from the Wicket team is interested, I can send the 
html-instance information sorted by size or instance count.




-
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: Problem with multiwindow app

2008-02-22 Thread Maurice Marrink
Do you by any chance have an img tag in your html without a src
element or one where src="".
I learned the hardway that this triggers the browser to send a second
request to wicket for the same page.

Maurice

On Fri, Feb 22, 2008 at 2:07 PM, legol <[EMAIL PROTECTED]> wrote:
>
>  Hi all!!!
>
>  I have application with 2 pages. First page lists users names and each
>  element of list is link to second page that shows user details. I want to
>  have this second page shown in other tab or window. Everything works fine
>  when I click one user link, detail page is loaded and i can operate on it.
>  But when i click on i.e. 5 links in very short time and 5 tabs are opened i
>  get 'page expired' on each of them. Thanks to logs I discovered that when i
>  open page in other tab or window it renders twice. Maybe this is the
>  problem. Do you have any idea how to solve it?
>
>  pzdr,
>  Legol
>  --
>  View this message in context: 
> http://www.nabble.com/Problem-with-multiwindow-app-tp15632896p15632896.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: Combining Ajax and non Ajax pages

2008-02-22 Thread Maurice Marrink
I can see the following problems:
-you have put the list of area's for the dropdown in the session, this
is fine but not required.
 What you should have done is put a model in the session that will
contain a single area.
-you are only providing the dropdown with the options it has, not with
the model it should use to store the selection.
 use something like this
DropDownChoice areas = new
DropDownChoice("areas",>((WholSession)Session.get()).getAreaSelectionModel()<,
(WholSession)Session.get()).getAreaModel(), new ChoiceRenderer("name",
"id"));
where getAreaSelectionModel() is the model which contains the selected
area (see point 1)

The constructor you are using expects an IComponentInheritedModel
higher up the component tree.

Maurice

On Fri, Feb 22, 2008 at 1:44 PM, steviezz <[EMAIL PROTECTED]> wrote:
>
>  Guys - thanks for your continued help with this, but I'm still having some
>  problems with:
>
>"Attempt to set model object on null model of component."
>
>  I now have some code cut down to the simplest possible example (attempting
>  to follow the advice given already):
>
>
>  public class AreaChoiceModel extends LoadableDetachableModel {
> protected Object load() {
> return ((WholSession) Session.get()).getAreaList();
> }
>  }
>
>
>  public class WholSession extends WebSession {
>
> private IModel areaModel = new AreaChoiceModel();
>
> public WholSession(Request request) {
> super(request);
> }
>
> protected void onDetach() {
> areaModel = null;
> }
>
> public IModel getAreaModel() {
> return areaModel;
> }
>
> public List getAreaList() {
> return ((WholApplication) getApplication()).getAreas();
> }
>  }
>
>
>
>  public class PanelSearch extends FormComponentPanel {
>
> public PanelSearch(String id) {
> super(id, ((WholSession) Session.get()).getAreaModel());
> add(new SearchForm("searchForm"));
> add(new FeedbackPanel("feedback"));
> }
>
> private class SearchForm extends Form {
>
> public SearchForm(String id) {
>  super(id);
>  DropDownChoice areas = new DropDownChoice("areas",
>  ((WholSession)
>Session.get()).getAreaModel(), new
>  ChoiceRenderer("name", "id"));
> areas.setOutputMarkupId(true);
> add(areas);
> }
>
> protected void onSubmit() {
> System.out.println("onSubmit called");
> };
> }
>  }
>
>
>  Page with panel and form loads OK with selection box populated with my top
>  level Area list (I've removed everything else).
>
>  Clicking the button results in the error:
>
>  WicketMessage: Method onFormSubmitted of interface
>  org.apache.wicket.markup.html.form.IFormSubmitListener targeted at component
>  [MarkupContainer [Component id = searchForm, page =
>  sds.whol.wicket.pages.Index, path =
>  0:panelSearch:searchForm.PanelSearch$SearchForm, isVisible = true,
>  isVersioned = false]] threw an exception
>
>  Root cause:
>
>
>  java.lang.IllegalStateException: Attempt to set model object on null model
>  of component: panelSearch:searchForm:areas
>
> at org.apache.wicket.Component.setModelObject(Component.java:2850)
>
>
>  I'm obviously still missing something important here (or maybe I've cut out
>  too much code :-}).  I suspect it's something very simple, so any further
>  pointers welcome.
>
>  Note - I've now bought the Wicket In Action eBook, so may have this worked
>  out once I've had time to study it in some detail.
>
>  Thanks again.
>
>
>
>
>
>
>
>  Michael O'Cleirigh wrote:
>  >
>  > Hello,
>  >
>  > This error happens because the intermediary panel between the form and
>  > the drop down choice does not have a model.
>  >
>  > Changing the PanelSearch constructor to call super (id, new Model())
>  > should fix the problem.
>  >
>  > You might also want your form panel to extend FormComponentPanel instead
>  > to get better validation support.
>  >
>  > Mike
>  >> Or you did not set the model on the dropdown.
>  >>
>  >> Maurice
>  >>
>  >> On Thu, Feb 21, 2008 at 8:44 PM, Maurice Marrink <[EMAIL PROTECTED]>
>  >> wrote:
>  >>
>  >>> Looks like at least one of the models in the session is not properly
>  >>>  initialized.
>  >>>  You have to do something like
>  >>>  private IModel model=new WhateverModel(null);
>  >>>  in your session.
>  >>>
>  >>>  Maurice
>  >>>
>  >>>
>  >>>
>  >>>  On Thu, Feb 21, 2008 at 8:41 PM, steviezz <[EMAIL PROTECTED]>
>  >>> wrote:
>  >>>  >
>  >>>  >  Now getting
>  >>>  >
>  >>>  >  RequestCycle.logRuntimeException(1399) | Attempt to set model object
>  >>> on null
>  >>>  >  model of component: panelSearch:form:parentAreas
>  >>>  >  java.lang.IllegalStateException: Attempt to set model object on null

AutoCompleteTextField user selection

2008-02-22 Thread Bushby

I have an AutoCompleteTextField which searches for a person object.  When a
person is selected from the auto complete, I want to update the panel and
the model with the person’s information.  I have tried adding an
AjaxFormComponentUpdatingBehavior, but it gets called twice.  Once with the
text entered by the user, and the second with the text from the auto
complete.  How do I capture just the selection event?  

Thanks

-- 
View this message in context: 
http://www.nabble.com/AutoCompleteTextField-user-selection-tp15634452p15634452.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 database access

2008-02-22 Thread trames

I too am new to Wicket, and wanted to start using it without having to learn
a persistance tool. I have never used a framework before, just JSP and
Servlets.  I tried dabbling a little with JPA, but found it confusing -
especially when working with tables whose primary keys have more than one
field.  I use MyEclipse within Eclipse, and that helped me some.  

My app was mostly inquiry only into a legacy database created in SQL Server. 
I come from an AS400/ISeries background.  We took the database from that
system and converted to SQL Server. This app had a search panel, and several
repeaters that took you to more detail.

What I did from the JPA experience was create a java class for most of my
tables and also a detachable model class for those that made sense.   I have
one DAO - Data Access Object - a class that would connect to DB via JDBC and
using SQL populate (map from DB to) the objects.  This DAO had several
methods that either populated the table object with one row, or another
method that would create a LIST object containing several rows.  I would use
these LIST objects to populate whatever Wicket repeater you wanted to use. I
found it much better/faster to create a java class for just the fields that
the LIST needed, and then through the selected LIST row, I would get the
larger chunk of data to populate a panel.  The LIST would always contain the
"keys" I needed to get the larger chunk from the DAO.

The table to object java classes (I guess you could call them beans)
contained all the fields in the SQL result set that I was going to use,
getters and setters, and a build method.  I found placing the build method
within the bean was much easier than doing it in the DAO.  The DAO
instantiated the object and called the build method - passing the resultset
as a parameter. 

I hope this makes sense. It took my quite a while to get to this point, and
was the most difficult part of learning Wicket. You have to play with it a
bit to see exactly where you want to call your DAO and build your data
objects.  I do want to learn a persistance tool and integrate that since
most Wicket users tend to use this practice.  I am by no means "good" at
using Wicket yet, but have a thurst to dig deeper.  I just bought the Wicket
In Action book and hope that this will do the trick.


-- 
View this message in context: 
http://www.nabble.com/Wicket-database-access-tp15613515p15634454.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 database access

2008-02-22 Thread Igor Vaynberg
while wicket has first class support for editing beans, it is by no
means the only way. it is quiet trivial to create a ColumnModel that
is like a property model but reads data from a resultset object and
populates a prepared statement object...

all im saying is that you dont have to box yourself into the bean mindset

-igor

On Fri, Feb 22, 2008 at 4:50 AM, James Carman
<[EMAIL PROTECTED]> wrote:
> One thing you might want to consider is that Wicket's form support is
>  very good at editing "beans" (stuff with getters/setters) which means
>  you're going to have to transform data from your JDBC ResultSets into
>  a Java objects.  That sounds a lot like ORM to me and there are great
>  frameworks out there for that.  It's not that people or frameworks try
>  to cram ORM down your throat; it's that ORM is a proven solution to a
>  common problem.  With the combination of spring/hibernate/wicket, I
>  can whip together a form that updates a database (with validation) and
>  a screen that shows you query results (with paging, sorting) within a
>  half hour (maybe shorter if I don't take time to sip coffee :).  What
>  you need is a nice quickstart platform for doing
>  spring/hibernate/wicket that gets all the gruntwork done for you up
>  front.  I think they were working on a mvn archetype for that.  If
>  not, I was thinking about writing one myself.
>
>
>
>
>  On 2/22/08, wjser <[EMAIL PROTECTED]> wrote:
>  >
>  >  i do know how to handle JDBC. The problem is that i don't know how to use
>  >  JDBC inside Wicket.
>  >  I think that i have to implement IDataProvider wich would fetch the data
>  >  from the database, but i don't know how to do this. I also don't know how 
> to
>  >  insert data into the database which come from a form.
>  >
>  >
>  >
>  >
>  >  igor.vaynberg wrote:
>  >  >
>  >  > google is your friend
>  >  >
>  >  > 
> http://www.stardeveloper.com/articles/display.html?article=2003090401&page=1
>  >  >
>  >  > -igor
>  >  >
>  >  >
>  >  > On Fri, Feb 22, 2008 at 1:22 AM, wjser <[EMAIL PROTECTED]> wrote:
>  >  >>
>  >  >>  I just want to communicate with a database (i.e. Mysql) like fetching
>  >  >> data
>  >  >>  from the DBMS and insert/update datasets. I have/want to use JDBC and
>  >  >> SQL
>  >  >>  for fetching and inserting the data into the database.
>  >  >>  I don't know how to do this.
>  >  >>
>  >  >>
>  >  >>
>  >  >>
>  >  >>  Florian Sperber wrote:
>  >  >>  >
>  >  >>  > Hi wjser,
>  >  >>  >
>  >  >>  >  > I'm frustrated, because i didn't any answer to my question. I
>  >  >>  > searched the
>  >  >>  >  > wicket documentation and the web, but found no information.
>  >  >>  >
>  >  >>  > since Wicket is a "Web-Application"-Framework many believe, that it
>  >  >>  > should focus on especially that area.
>  >  >>  >
>  >  >>  > Wicket provides very good tools to do data manipulation and allows 
> you
>  >  >>  > to choose whichever Framework you want to use for Database-Access.
>  >  >>  >
>  >  >>  > Have a look at
>  >  >>  >http://databinder.net/site/show/overview
>  >  >>  > or just write your own jdbc-Backend.
>  >  >>  >
>  >  >>  >  > Nowadays no serios web application can be developed without
>  >  >> database
>  >  >>  > access
>  >  >>  >  > and a no developer should be forced to use an object-relational
>  >  >> mapper.
>  >  >>  >
>  >  >>  > Please explain what you mean here. Wicket goes the Java-Way and so
>  >  >> using
>  >  >>  > objects for any data manipulation seems to be the right thing.
>  >  >>  >
>  >  >>  > Kind regards
>  >  >>  > Florian Sperber
>  >  >>  >
>  >  >>  >
>  >  >>  >
>  >  >>  > 
> -
>  >  >>  > To unsubscribe, e-mail: [EMAIL PROTECTED]
>  >  >>  > For additional commands, e-mail: [EMAIL PROTECTED]
>  >  >>  >
>  >  >>  >
>  >  >>  >
>  >  >>
>  >  >>  --
>  >  >>  View this message in context:
>  >  >> http://www.nabble.com/Wicket-database-access-tp15613515p15630127.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/Wicket-database-access-tp15613515p15630608.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: AjaxFormSubmitBehavior and setDefaultFormProcessing(false)?

2008-02-22 Thread Igor Vaynberg
ok, enter a jira rfe

-igor


On Fri, Feb 22, 2008 at 2:41 AM, Juha Alatalo
<[EMAIL PROTECTED]> wrote:
> In this case I have to visit different page when browse is chosen. When
>  I come back form is cleared, isn't it?
>
>  - Juha
>
>
>
>  Igor Vaynberg wrote:
>  > if you are opening everything via ajax why do you need to submit the
>  > entire form? the values are all still there in the browser window...
>  > so dont use ajaxformsubmitbehavor but a regular ajax behavior
>  >
>  > -igor
>  >
>  >
>  > On Thu, Feb 21, 2008 at 3:57 AM, Juha Alatalo
>  > <[EMAIL PROTECTED]> wrote:
>  >> Hi,
>  >>
>  >>  I have created a dropDownChoice component where the last option is
>  >>  "browse"  == opens new page where user can make queries. (Similar to
>  >>  "look in" field in search panel of Windows XP, where user can select
>  >>  some default folders or can choose browse to give an exact folder)
>  >>
>  >>  Because there is also other fields, form hast to be posted when opening
>  >>  new page from browse ==> AjaxFromSubmitBehavior("onchange"). Only
>  >>  problem is that I can't call setDefaultFormProcessing(false) in
>  >>  ajaxFormSubmitBehavior like I can do with Buttons. I would like to do
>  >>  validation only when user presses save button, not when he chooses to
>  >>  browse information for one field.
>  >>
>  >>  Is there some way to solve this problem?
>  >>
>  >>  - Juha
>  >>
>  >>
>  >>  -
>  >>  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.x DatePicket drop-in replacement

2008-02-22 Thread Igor Vaynberg
there is wicket-datetime that has a yui datepicker

there is also wicket-stuff-calendar (or something that is
wicket-*-calendar) that uses dhtml gooies datepicker

-igor


On Fri, Feb 22, 2008 at 5:15 AM, Paolo Di Tommaso
<[EMAIL PROTECTED]> wrote:
> Guys,
>
>  as stated in the migration 1.3 migration guide I'm trying to use the drop-in
>  replacement for the old (JSCalendar based) DatePicker.
>
>  http://cwiki.apache.org/WICKET/migrate-13.html#Migrate-1.3-DatePicker
>
>  But the download jar named "wicket-contrib-datepicker-1.2.jar" still make
>  references to 1.2.x wicket classes (wicket.xxx.Xxx classes) so I'm unable to
>  use together the wicket 1.3 core classes.
>
>
>  Is there a distribution of the previous DatePicker that works with Wicket
>  1.3 ?
>
>
>  Thank you,
>
>
>  Paolo
>

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



Wicket LinkTree subtree collapse/expand

2008-02-22 Thread Sebastiaan van Erk

Hi,

I'm trying to have a wicket LinkTree collapse and expand subtrees when I 
click on the respective nodes. I have the following code:


tree = new LinkTree("tree", createTreeModel()) {
@Override
			protected void onNodeLinkClicked(final TreeNode node, final BaseTree 
tree, final AjaxRequestTarget target) {

if (!node.isLeaf()) {
if 
(tree.getTreeState().isNodeExpanded(node)) {
collapseAll(node);
} else {
expandAll(node);
}
tree.updateTree(target);
} else {
	System.out.println(Arrays.toString(((DefaultMutableTreeNode) 
node).getUserObjectPath()));

}
}
};


with the methods expandAll/collapseAll as follows:

protected void collapseAll(final TreeNode treeNode) {
tree.getTreeState().collapseNode(treeNode);
for (final Enumeration e = treeNode.children(); 
e.hasMoreElements();) {
collapseAll((TreeNode) e.nextElement());
}
}

protected void expandAll(final TreeNode treeNode) {
tree.getTreeState().expandNode(treeNode);
for (final Enumeration e = treeNode.children(); 
e.hasMoreElements();) {
expandAll((TreeNode) e.nextElement());
}
}

However, I keep getting the following errors (specifically, this happens 
when I collapse a subtree first, and then collapse a subtree of which 
the other subtree is a sibling):


java.lang.IllegalStateException: No Page found for component 
[MarkupContainer [Component id = 200, page = , path = 
200.AbstractTree$TreeItem]]

 at org.apache.wicket.Component.getPage(Component.java:1639)
 at 
org.apache.wicket.ajax.AjaxRequestTarget.respondComponent(AjaxRequestTarget.java:689)
 at 
org.apache.wicket.ajax.AjaxRequestTarget.respondComponents(AjaxRequestTarget.java:605)
 at 
org.apache.wicket.ajax.AjaxRequestTarget.respond(AjaxRequestTarget.java:520)
 at 
org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:103)
 at 
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1172)

 at org.apache.wicket.RequestCycle.step(RequestCycle.java:1241)
 at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1316)
 at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
 at 
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:354)
 at 
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:194)
 at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
 at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
 at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
 at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
 at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
 at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
 at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
 at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
 at 
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)

 at java.lang.Thread.run(Thread.java:595)

Does anybody have any ideas what I'm doing wrong and what the correct 
way to implement this is?


Regards,
Sebastiaan


smime.p7s
Description: S/MIME Cryptographic Signature


Re: OutOfMemoryError

2008-02-22 Thread Igor Vaynberg
how big is it? its just a cache of markup files

-igor


On Fri, Feb 22, 2008 at 7:04 AM, Thomas Singer <[EMAIL PROTECTED]> wrote:
> I've did some further investigation and the largest objects seem to be the
>  settings from org.apache.wicket.Application, particular the markupCache.
>
>  Tom
>
>
>
>
>  Thomas Singer wrote:
>  > Well, our application class (derived from
>  > org.apache.wicket.protocol.http.WebApplication) occurs near the top of
>  > the list when sorting by retained size, but our code does not contain
>  > dynamic elements. For me it looks strange, that there exist 3 instances
>  > of our application class (we don't create them).
>  >
>  > Tom
>  >
>  > Maeder Thomas wrote:
>  >> Thomas,
>  >> the memory footprint per class usually doesn't really allow to pinpoint
>  >> the reference that causes a memory leak (usually the top entries are
>  >> char[], String, etc.). For that, you need to trace back to the reference
>  >> that should not be there. We use YourKit to great benefit (do I get
>  >> goodies now, comrades?). Yourkit can show the "retained size" of an
>  >> object. If one of your Objects shows up near the top of the list, that
>  >> is a good candidate.
>  >>
>  >> alternatively, the hprof dump would be more helpful than HTML.
>  >>
>  >> (some other) Thomas
>  >>
>  >>
>  >> 
>  >> 
>  >>> As already written a couple of weeks ago, we regularly get
>  >>> OutOfMemoryErrors with our Wicket-based website. I've finally got a
>  >>> heapdump.hprof and no entry above 3kByte size is from our code. If
>  >>> someone from the Wicket team is interested, I can send the
>  >>> html-instance information sorted by size or instance count.
>  >>>
>  >>
>  >> -
>  >> 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 LinkTree subtree collapse/expand

2008-02-22 Thread Igor Vaynberg
looks like a bug in the tree, please file a jira issue

-igor


On Fri, Feb 22, 2008 at 9:57 AM, Sebastiaan van Erk <[EMAIL PROTECTED]> wrote:
> Hi,
>
>  I'm trying to have a wicket LinkTree collapse and expand subtrees when I
>  click on the respective nodes. I have the following code:
>
> tree = new LinkTree("tree", createTreeModel()) {
> @Override
> protected void onNodeLinkClicked(final TreeNode node, 
> final BaseTree
>  tree, final AjaxRequestTarget target) {
> if (!node.isLeaf()) {
> if 
> (tree.getTreeState().isNodeExpanded(node)) {
> collapseAll(node);
> } else {
> expandAll(node);
> }
> tree.updateTree(target);
> } else {
> 
> System.out.println(Arrays.toString(((DefaultMutableTreeNode)
>  node).getUserObjectPath()));
> }
> }
> };
>
>
>  with the methods expandAll/collapseAll as follows:
>
> protected void collapseAll(final TreeNode treeNode) {
> tree.getTreeState().collapseNode(treeNode);
> for (final Enumeration e = treeNode.children(); 
> e.hasMoreElements();) {
> collapseAll((TreeNode) e.nextElement());
> }
> }
>
> protected void expandAll(final TreeNode treeNode) {
> tree.getTreeState().expandNode(treeNode);
> for (final Enumeration e = treeNode.children(); 
> e.hasMoreElements();) {
> expandAll((TreeNode) e.nextElement());
> }
> }
>
>  However, I keep getting the following errors (specifically, this happens
>  when I collapse a subtree first, and then collapse a subtree of which
>  the other subtree is a sibling):
>
>  java.lang.IllegalStateException: No Page found for component
>  [MarkupContainer [Component id = 200, page = , path =
>  200.AbstractTree$TreeItem]]
>   at org.apache.wicket.Component.getPage(Component.java:1639)
>   at
>  
> org.apache.wicket.ajax.AjaxRequestTarget.respondComponent(AjaxRequestTarget.java:689)
>   at
>  
> org.apache.wicket.ajax.AjaxRequestTarget.respondComponents(AjaxRequestTarget.java:605)
>   at
>  org.apache.wicket.ajax.AjaxRequestTarget.respond(AjaxRequestTarget.java:520)
>   at
>  
> org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:103)
>   at
>  
> org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1172)
>   at org.apache.wicket.RequestCycle.step(RequestCycle.java:1241)
>   at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1316)
>   at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
>   at
>  org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:354)
>   at
>  org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:194)
>   at
>  
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>   at
>  
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>   at
>  
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
>   at
>  
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
>   at
>  org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
>   at
>  org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
>   at
>  
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>   at
>  org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
>   at
>  org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
>   at
>  
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
>   at
>  org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
>   at java.lang.Thread.run(Thread.java:595)
>
>  Does anybody have any ideas what I'm doing wrong and what the correct
>  way to implement this is?
>
>  Regards,
>  Sebastiaan
>

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



Re: Combining Ajax and non Ajax pages

2008-02-22 Thread Igor Vaynberg
also

protected void onDetach() {
   areaModel = null;
   }

should be just areaModel.detach();

ondetach() is called every request on the session so you are actually
nulling the model at the end of the request

-igor


On Fri, Feb 22, 2008 at 7:10 AM, Maurice Marrink <[EMAIL PROTECTED]> wrote:
> I can see the following problems:
>  -you have put the list of area's for the dropdown in the session, this
>  is fine but not required.
>   What you should have done is put a model in the session that will
>  contain a single area.
>  -you are only providing the dropdown with the options it has, not with
>  the model it should use to store the selection.
>   use something like this
>  DropDownChoice areas = new
>  
> DropDownChoice("areas",>((WholSession)Session.get()).getAreaSelectionModel()<,
>
> (WholSession)Session.get()).getAreaModel(), new ChoiceRenderer("name",
>  "id"));
>  where getAreaSelectionModel() is the model which contains the selected
>  area (see point 1)
>
>  The constructor you are using expects an IComponentInheritedModel
>  higher up the component tree.
>
>  Maurice
>
>
>
>  On Fri, Feb 22, 2008 at 1:44 PM, steviezz <[EMAIL PROTECTED]> wrote:
>  >
>  >  Guys - thanks for your continued help with this, but I'm still having some
>  >  problems with:
>  >
>  >"Attempt to set model object on null model of component."
>  >
>  >  I now have some code cut down to the simplest possible example (attempting
>  >  to follow the advice given already):
>  >
>  >
>  >  public class AreaChoiceModel extends LoadableDetachableModel {
>  > protected Object load() {
>  > return ((WholSession) Session.get()).getAreaList();
>  > }
>  >  }
>  >
>  >
>  >  public class WholSession extends WebSession {
>  >
>  > private IModel areaModel = new AreaChoiceModel();
>  >
>  > public WholSession(Request request) {
>  > super(request);
>  > }
>  >
>  > protected void onDetach() {
>  > areaModel = null;
>  > }
>  >
>  > public IModel getAreaModel() {
>  > return areaModel;
>  > }
>  >
>  > public List getAreaList() {
>  > return ((WholApplication) getApplication()).getAreas();
>  > }
>  >  }
>  >
>  >
>  >
>  >  public class PanelSearch extends FormComponentPanel {
>  >
>  > public PanelSearch(String id) {
>  > super(id, ((WholSession) Session.get()).getAreaModel());
>  > add(new SearchForm("searchForm"));
>  > add(new FeedbackPanel("feedback"));
>  > }
>  >
>  > private class SearchForm extends Form {
>  >
>  > public SearchForm(String id) {
>  >  super(id);
>  >  DropDownChoice areas = new DropDownChoice("areas",
>  >  ((WholSession)
>  >Session.get()).getAreaModel(), new
>  >  ChoiceRenderer("name", "id"));
>  > areas.setOutputMarkupId(true);
>  > add(areas);
>  > }
>  >
>  > protected void onSubmit() {
>  > System.out.println("onSubmit called");
>  > };
>  > }
>  >  }
>  >
>  >
>  >  Page with panel and form loads OK with selection box populated with my top
>  >  level Area list (I've removed everything else).
>  >
>  >  Clicking the button results in the error:
>  >
>  >  WicketMessage: Method onFormSubmitted of interface
>  >  org.apache.wicket.markup.html.form.IFormSubmitListener targeted at 
> component
>  >  [MarkupContainer [Component id = searchForm, page =
>  >  sds.whol.wicket.pages.Index, path =
>  >  0:panelSearch:searchForm.PanelSearch$SearchForm, isVisible = true,
>  >  isVersioned = false]] threw an exception
>  >
>  >  Root cause:
>  >
>  >
>  >  java.lang.IllegalStateException: Attempt to set model object on null model
>  >  of component: panelSearch:searchForm:areas
>  >
>  > at org.apache.wicket.Component.setModelObject(Component.java:2850)
>  >
>  >
>  >  I'm obviously still missing something important here (or maybe I've cut 
> out
>  >  too much code :-}).  I suspect it's something very simple, so any further
>  >  pointers welcome.
>  >
>  >  Note - I've now bought the Wicket In Action eBook, so may have this worked
>  >  out once I've had time to study it in some detail.
>  >
>  >  Thanks again.
>  >
>  >
>  >
>  >
>  >
>  >
>  >
>  >  Michael O'Cleirigh wrote:
>  >  >
>  >  > Hello,
>  >  >
>  >  > This error happens because the intermediary panel between the form and
>  >  > the drop down choice does not have a model.
>  >  >
>  >  > Changing the PanelSearch constructor to call super (id, new Model())
>  >  > should fix the problem.
>  >  >
>  >  > You might also want your form panel to extend FormComponentPanel instead
>  >  > to get better validation support.
>  >  >
>  >  > Mike
>  >  >> Or you did not set the model on the dropdown.
>  

Re: Wicket LinkTree subtree collapse/expand

2008-02-22 Thread Sebastiaan van Erk

Ok, thanks for the quick reply. :-)

https://issues.apache.org/jira/browse/WICKET-1366

Regards,
Sebastiaan

Igor Vaynberg wrote:

looks like a bug in the tree, please file a jira issue

-igor


On Fri, Feb 22, 2008 at 9:57 AM, Sebastiaan van Erk <[EMAIL PROTECTED]> wrote:

Hi,

 I'm trying to have a wicket LinkTree collapse and expand subtrees when I
 click on the respective nodes. I have the following code:

tree = new LinkTree("tree", createTreeModel()) {
@Override
protected void onNodeLinkClicked(final TreeNode node, 
final BaseTree
 tree, final AjaxRequestTarget target) {
if (!node.isLeaf()) {
if 
(tree.getTreeState().isNodeExpanded(node)) {
collapseAll(node);
} else {
expandAll(node);
}
tree.updateTree(target);
} else {

System.out.println(Arrays.toString(((DefaultMutableTreeNode)
 node).getUserObjectPath()));
}
}
};


 with the methods expandAll/collapseAll as follows:

protected void collapseAll(final TreeNode treeNode) {
tree.getTreeState().collapseNode(treeNode);
for (final Enumeration e = treeNode.children(); 
e.hasMoreElements();) {
collapseAll((TreeNode) e.nextElement());
}
}

protected void expandAll(final TreeNode treeNode) {
tree.getTreeState().expandNode(treeNode);
for (final Enumeration e = treeNode.children(); 
e.hasMoreElements();) {
expandAll((TreeNode) e.nextElement());
}
}

 However, I keep getting the following errors (specifically, this happens
 when I collapse a subtree first, and then collapse a subtree of which
 the other subtree is a sibling):

 java.lang.IllegalStateException: No Page found for component
 [MarkupContainer [Component id = 200, page = , path =
 200.AbstractTree$TreeItem]]
  at org.apache.wicket.Component.getPage(Component.java:1639)
  at
 
org.apache.wicket.ajax.AjaxRequestTarget.respondComponent(AjaxRequestTarget.java:689)
  at
 
org.apache.wicket.ajax.AjaxRequestTarget.respondComponents(AjaxRequestTarget.java:605)
  at
 org.apache.wicket.ajax.AjaxRequestTarget.respond(AjaxRequestTarget.java:520)
  at
 
org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:103)
  at
 org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1172)
  at org.apache.wicket.RequestCycle.step(RequestCycle.java:1241)
  at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1316)
  at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
  at
 org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:354)
  at
 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:194)
  at
 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
  at
 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  at
 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
  at
 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
  at
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
  at
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
  at
 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
  at
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
  at
 org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
  at
 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
  at
 org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
  at java.lang.Thread.run(Thread.java:595)

 Does anybody have any ideas what I'm doing wrong and what the correct
 way to implement this is?

 Regards,
 Sebastiaan



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



smime.p7s
Description: S/MIME Cryptographic Signature


Re: OutOfMemoryError

2008-02-22 Thread Thomas Singer
We have two wicket applications running. The MarkupCache for syntevo.com is 
more than 40MB large ("retained size" in YourKit), the other much less 
frequently used 630kB.


Tom


Igor Vaynberg wrote:

how big is it? its just a cache of markup files

-igor



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



Re: OutOfMemoryError

2008-02-22 Thread Igor Vaynberg
hrm, that seems high (unless you have that many .html files). do you
guys have some nonstandard resource finders/markup providers?

-igor


On Fri, Feb 22, 2008 at 10:16 AM, Thomas Singer <[EMAIL PROTECTED]> wrote:
> We have two wicket applications running. The MarkupCache for syntevo.com is
>  more than 40MB large ("retained size" in YourKit), the other much less
>  frequently used 630kB.
>
>  Tom
>
>
>
>  Igor Vaynberg wrote:
>  > how big is it? its just a cache of markup files
>  >
>  > -igor
>
>
>
>
> -
>  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: OutOfMemoryError

2008-02-22 Thread Thomas Singer

hrm, that seems high (unless you have that many .html files).


We don't have that large or many .html files.


do you
guys have some nonstandard resource finders/markup providers?


Do you mean something like own MarkupFilters? But they only change XmlTags, 
they don't generate new ones.


We also have some own AutoLinkResolver.AbstractAutolinkResolverDelegate.

Tom


Igor Vaynberg wrote:

hrm, that seems high (unless you have that many .html files). do you
guys have some nonstandard resource finders/markup providers?

-igor


On Fri, Feb 22, 2008 at 10:16 AM, Thomas Singer <[EMAIL PROTECTED]> wrote:

We have two wicket applications running. The MarkupCache for syntevo.com is
 more than 40MB large ("retained size" in YourKit), the other much less
 frequently used 630kB.

 Tom



 Igor Vaynberg wrote:
 > how big is it? its just a cache of markup files
 >
 > -igor




-
 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: OutOfMemoryError

2008-02-22 Thread Igor Vaynberg
i meant something like

IResourceStreamProvider
IMarkupResourceStreamProvider
IMarkupCacheKeyProvider

stuff like that? there has to be a reason why the cache is
growing...or is it hovering around 40 megs?

-igor

On Fri, Feb 22, 2008 at 10:36 AM, Thomas Singer <[EMAIL PROTECTED]> wrote:
> > hrm, that seems high (unless you have that many .html files).
>
>  We don't have that large or many .html files.
>
>
>  > do you
>  > guys have some nonstandard resource finders/markup providers?
>
>  Do you mean something like own MarkupFilters? But they only change XmlTags,
>  they don't generate new ones.
>
>  We also have some own AutoLinkResolver.AbstractAutolinkResolverDelegate.
>
>  Tom
>
>
>
>
>  Igor Vaynberg wrote:
>  > hrm, that seems high (unless you have that many .html files). do you
>  > guys have some nonstandard resource finders/markup providers?
>  >
>  > -igor
>  >
>  >
>  > On Fri, Feb 22, 2008 at 10:16 AM, Thomas Singer <[EMAIL PROTECTED]> wrote:
>  >> We have two wicket applications running. The MarkupCache for syntevo.com 
> is
>  >>  more than 40MB large ("retained size" in YourKit), the other much less
>  >>  frequently used 630kB.
>  >>
>  >>  Tom
>  >>
>  >>
>  >>
>  >>  Igor Vaynberg wrote:
>  >>  > how big is it? its just a cache of markup files
>  >>  >
>  >>  > -igor
>  >>
>  >>
>  >>
>  >>
>  >> -
>  >>  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: Combining Ajax and non Ajax pages

2008-02-22 Thread steviezz

Thankyou guys.  I have this sample working now with a simple one area
dropdown.  

The challenge now is to get it all hanging together again with the multiple
related Ajax dropdowns.  

I'm still not exactly comfortable with the concept of the models. Wicket in
Action appears to have a good chapter on this, so plenty of reading for me
to do.  No doubt I'll be back with more questions at some point.  

Thanks again for the speedy help so far - this list appears to be generally
excellent. 

Steve 

 


igor.vaynberg wrote:
> 
> also
> 
> protected void onDetach() {
>areaModel = null;
>}
> 
> should be just areaModel.detach();
> 
> ondetach() is called every request on the session so you are actually
> nulling the model at the end of the request
> 
> -igor
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Combining-Ajax-and-non-Ajax-pages-tp15587166p15640583.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: OutOfMemoryError

2008-02-22 Thread Nino Saturnino Martinez Vazquez Wael



Thomas Singer wrote:
Right, I did not run JMeter for hours to find our some growing 
instance count. Until now I used the heapdump I've got from an OOME on 
our production system. Although this does not show the *increasing* 
instance count, but I can take a look at the instance count and object 
size at the time of the OOME. Shouldn't that help to find out the 
problematic instance(s)?


That does not give that much information you really need to look at a 
linechart or something, especially something that shows when gc are run 
and then you can start to figure out what could be the problem.. Real 
memory leaks cant really happen i java(AFAIK), but what can are that 
some static things keeps a lock on some resources  after they should be 
freed. Then they cant be collected by gc, and dada a memory leak. Since 
the application will continue to produce more resources which cannot be 
cleaned. Now they may be very small, and things can be triggered from 
everywhere in the application so theres A LOT to watch out for.. This is 
where a profiler and jmeter can help a little, but in the end it still 
feels a lot like looking at tea leaf's.. But if you dissect it, with 
jmeter and a profiler you will find the problem in the end.


BTW, as I remember it jprobe[1] has a freeversion, which is adequate..



[1]=http://javaboutique.internet.com/reviews/jprobe_5/figure_2.jpg


regards nino


Tom

Nino Saturnino Martinez Vazquez Wael wrote:



Thomas Singer wrote:
You can try to see if its any page in particular that causes this. 
Or of its something general... Also you need to watch out for 
objects that just keep growing in number.. 


None of our classes has an unexpected high instance count.

Im not sure if youve already done this. So thats why you need to poke 
around with jmeter, hit the different pages(in different tests) maybe 
thousands of times(if its a very small leak). Then the difference 
should be more clear. I once had an error that originated in a 
hashmap that locked session context, it was very hard to find and was 
not our error but a 3rd party I used 4 very long days for finding the 
problem...
It's a little abstract to use a profiler as it will not give you a 
clear idea as everything originates in class[] int[] etc... 


Of course.

Tom


Nino Saturnino Martinez Vazquez Wael wrote:
You can try to see if its any page in particular that causes this. 
Or of its something general... Also you need to watch out for 
objects that just keep growing in number..


It's a little abstract to use a profiler as it will not give you a 
clear idea as everything originates in class[] int[] etc...


regards Nino

Thomas Singer wrote:

Be sure to checkout the wiki for gotchas and tips:

http://cwiki.apache.org/WICKET/wicket-and-jmeter.html

http://cwiki.apache.org/WICKET/wicket-and-jmeter-with-regular-expressions.html 







Already done, but what we can get? An OOME in our application with 
the heapdump. Well, we already have one and the most used objects 
appear to come from Wicket (char[], byte[], String, [], 
HashMap$Entry, XMLTag, ValueMap, ComponentTag, RawMarkup, 
HashMap$EntrySet, int[], short[] just to name the largest).


--
Best regards,
Thomas Singer
_
SyntEvo GmbH
www.syntevo.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]






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




--
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: OutOfMemoryError

2008-02-22 Thread Igor Vaynberg
it would be helpful if you could make a yourkit snapshot. that is what
most of us use

there is also a way to clear the markup cache through jmx, maybe you
can try that and see if it frees that 40mb...

-igor

On Fri, Feb 22, 2008 at 11:38 AM, Thomas Singer <[EMAIL PROTECTED]> wrote:
> > IResourceStreamProvider
>  > IMarkupResourceStreamProvider
>  > IMarkupCacheKeyProvider
>
>  No, our code does not use such stuff.
>
>
>  > there has to be a reason why the cache is
>  > growing...or is it hovering around 40 megs?
>
>  I just take a look at a heapdump of 74MB.
>
>  Tom
>
>
>
>
>  Igor Vaynberg wrote:
>  > i meant something like
>  >
>  > IResourceStreamProvider
>  > IMarkupResourceStreamProvider
>  > IMarkupCacheKeyProvider
>  >
>  > stuff like that? there has to be a reason why the cache is
>  > growing...or is it hovering around 40 megs?
>  >
>  > -igor
>  >
>  > On Fri, Feb 22, 2008 at 10:36 AM, Thomas Singer <[EMAIL PROTECTED]> wrote:
>  >>> hrm, that seems high (unless you have that many .html files).
>  >>  We don't have that large or many .html files.
>  >>
>  >>
>  >>  > do you
>  >>  > guys have some nonstandard resource finders/markup providers?
>  >>
>  >>  Do you mean something like own MarkupFilters? But they only change 
> XmlTags,
>  >>  they don't generate new ones.
>  >>
>  >>  We also have some own AutoLinkResolver.AbstractAutolinkResolverDelegate.
>  >>
>  >>  Tom
>  >>
>  >>
>  >>
>  >>
>  >>  Igor Vaynberg wrote:
>  >>  > hrm, that seems high (unless you have that many .html files). do you
>  >>  > guys have some nonstandard resource finders/markup providers?
>  >>  >
>  >>  > -igor
>  >>  >
>  >>  >
>  >>  > On Fri, Feb 22, 2008 at 10:16 AM, Thomas Singer <[EMAIL PROTECTED]> 
> wrote:
>  >>  >> We have two wicket applications running. The MarkupCache for 
> syntevo.com is
>  >>  >>  more than 40MB large ("retained size" in YourKit), the other much 
> less
>  >>  >>  frequently used 630kB.
>  >>  >>
>  >>  >>  Tom
>  >>  >>
>  >>  >>
>  >>  >>
>  >>  >>  Igor Vaynberg wrote:
>  >>  >>  > how big is it? its just a cache of markup files
>  >>  >>  >
>  >>  >>  > -igor
>  >>  >>
>  >>  >>
>  >>  >>
>  >>  >>
>  >>  >> -
>  >>  >>  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]
>
>

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



Re: OutOfMemoryError

2008-02-22 Thread Thomas Singer

IResourceStreamProvider
IMarkupResourceStreamProvider
IMarkupCacheKeyProvider


No, our code does not use such stuff.


there has to be a reason why the cache is
growing...or is it hovering around 40 megs?


I just take a look at a heapdump of 74MB.

Tom


Igor Vaynberg wrote:

i meant something like

IResourceStreamProvider
IMarkupResourceStreamProvider
IMarkupCacheKeyProvider

stuff like that? there has to be a reason why the cache is
growing...or is it hovering around 40 megs?

-igor

On Fri, Feb 22, 2008 at 10:36 AM, Thomas Singer <[EMAIL PROTECTED]> wrote:

hrm, that seems high (unless you have that many .html files).

 We don't have that large or many .html files.


 > do you
 > guys have some nonstandard resource finders/markup providers?

 Do you mean something like own MarkupFilters? But they only change XmlTags,
 they don't generate new ones.

 We also have some own AutoLinkResolver.AbstractAutolinkResolverDelegate.

 Tom




 Igor Vaynberg wrote:
 > hrm, that seems high (unless you have that many .html files). do you
 > guys have some nonstandard resource finders/markup providers?
 >
 > -igor
 >
 >
 > On Fri, Feb 22, 2008 at 10:16 AM, Thomas Singer <[EMAIL PROTECTED]> wrote:
 >> We have two wicket applications running. The MarkupCache for syntevo.com is
 >>  more than 40MB large ("retained size" in YourKit), the other much less
 >>  frequently used 630kB.
 >>
 >>  Tom
 >>
 >>
 >>
 >>  Igor Vaynberg wrote:
 >>  > how big is it? its just a cache of markup files
 >>  >
 >>  > -igor
 >>
 >>
 >>
 >>
 >> -
 >>  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]



Re: OutOfMemoryError

2008-02-22 Thread Nino Saturnino Martinez Vazquez Wael
To help out more, id really need to see some memory line charts, and 
test plan.. And code...


regards Nino

Nino Saturnino Martinez Vazquez Wael wrote:



Thomas Singer wrote:
Right, I did not run JMeter for hours to find our some growing 
instance count. Until now I used the heapdump I've got from an OOME 
on our production system. Although this does not show the 
*increasing* instance count, but I can take a look at the instance 
count and object size at the time of the OOME. Shouldn't that help to 
find out the problematic instance(s)?


That does not give that much information you really need to look at a 
linechart or something, especially something that shows when gc are 
run and then you can start to figure out what could be the problem.. 
Real memory leaks cant really happen i java(AFAIK), but what can are 
that some static things keeps a lock on some resources  after they 
should be freed. Then they cant be collected by gc, and dada a memory 
leak. Since the application will continue to produce more resources 
which cannot be cleaned. Now they may be very small, and things can be 
triggered from everywhere in the application so theres A LOT to watch 
out for.. This is where a profiler and jmeter can help a little, but 
in the end it still feels a lot like looking at tea leaf's.. But if 
you dissect it, with jmeter and a profiler you will find the problem 
in the end.


BTW, as I remember it jprobe[1] has a freeversion, which is adequate..



[1]=http://javaboutique.internet.com/reviews/jprobe_5/figure_2.jpg


regards nino


Tom

Nino Saturnino Martinez Vazquez Wael wrote:



Thomas Singer wrote:
You can try to see if its any page in particular that causes this. 
Or of its something general... Also you need to watch out for 
objects that just keep growing in number.. 


None of our classes has an unexpected high instance count.

Im not sure if youve already done this. So thats why you need to 
poke around with jmeter, hit the different pages(in different tests) 
maybe thousands of times(if its a very small leak). Then the 
difference should be more clear. I once had an error that originated 
in a hashmap that locked session context, it was very hard to find 
and was not our error but a 3rd party I used 4 very long days for 
finding the problem...
It's a little abstract to use a profiler as it will not give you a 
clear idea as everything originates in class[] int[] etc... 


Of course.

Tom


Nino Saturnino Martinez Vazquez Wael wrote:
You can try to see if its any page in particular that causes this. 
Or of its something general... Also you need to watch out for 
objects that just keep growing in number..


It's a little abstract to use a profiler as it will not give you a 
clear idea as everything originates in class[] int[] etc...


regards Nino

Thomas Singer wrote:

Be sure to checkout the wiki for gotchas and tips:

http://cwiki.apache.org/WICKET/wicket-and-jmeter.html

http://cwiki.apache.org/WICKET/wicket-and-jmeter-with-regular-expressions.html 








Already done, but what we can get? An OOME in our application 
with the heapdump. Well, we already have one and the most used 
objects appear to come from Wicket (char[], byte[], String, 
[], HashMap$Entry, XMLTag, ValueMap, ComponentTag, 
RawMarkup, HashMap$EntrySet, int[], short[] just to name the 
largest).


--
Best regards,
Thomas Singer
_
SyntEvo GmbH
www.syntevo.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]






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






--
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: AutoCompleteTextField user selection

2008-02-22 Thread Martin Funk
Hi Michal,

could you come up with some code?

mf

2008/2/22, Bushby <[EMAIL PROTECTED]>:
>
>
> I have an AutoCompleteTextField which searches for a person object.  When
> a
> person is selected from the auto complete, I want to update the panel and
> the model with the person's information.  I have tried adding an
> AjaxFormComponentUpdatingBehavior, but it gets called twice.  Once with
> the
> text entered by the user, and the second with the text from the auto
> complete.  How do I capture just the selection event?
>
> Thanks
>
>
> --
> View this message in context:
> http://www.nabble.com/AutoCompleteTextField-user-selection-tp15634452p15634452.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]
>
>


Howto use .xhtml instead of .html for template file extension

2008-02-22 Thread MYoung

I follow this: 

http://cwiki.apache.org/confluence/display/WICKET/Use+a+different+extension+for+template+files

added this to MyPage:

@Override
public String getMarkupType() {
return "xhtml";
}

and it doesn't work.  Firefox wants to download the file instead of showing
the page.
http://www.nabble.com/file/p15641885/no-go-xhtml.jpg 

IE7 cannot even download the file.

What am I doing wrong?
-- 
View this message in context: 
http://www.nabble.com/Howto-use-.xhtml-instead-of-.html-for-template-file-extension-tp15641885p15641885.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: Combining Ajax and non Ajax pages

2008-02-22 Thread steviezz

Now getting much closer - but not 100% there yet. 

Code with 3 dropdowns for area / country / region now looks like below. 

I don't set the model for the Panel, like:  

setModel(((WholSession) Session.get()).getAreaModel());

I have 3 models - one for each dropdown - and not sure how to add them all
or combine them (or if this is possible).

I'm setting each of the models in the session.  The area list is always the
big master list of top level areas, and intially the others are empty, so: 

private List areaList = ((WholApplication)
getApplication()).getAreas();
private List countryList = Collections.EMPTY_LIST;
private List regionList = Collections.EMPTY_LIST;

Then in the onchange in the AjaxFormComponentUpdatingBehavior I can do: 

protected void onUpdate(AjaxRequestTarget target) {
 // Reset the country dropdown when the area changes
 Area area = ((AreaChoiceModel) areasDDC.getModel()).getArea(); 

 List lst = new ArrayList(area.getAreas()); 

 countriesDDC.setChoices(lst);  
 ((WholSession) Session.get()).setCountryList(lst);
 countriesDDC.clearInput();
 regionsDDC.clearInput();
 target.addComponent(countriesDDC);
}

which is manually setting the countryDDC choices by getting the countries
from the selected Area. 

This all works - selections survive page refreshes, going backwards and
forwards from the results page to the home page, etc. 

But the current problems are: 

1.  if I select an area + country + region combo - eg, N America - USA -
Alabama and sumbit, then change to a country with no recorded regions - eg,
N America - Bermuda - the region box clears OK with 

  regionsDDC.clearInput();   

but the region model in the session sticks as the previously stored Alabama. 
Obviously, I'm not setting the region model in the session correctly, and
I'm not sure how to make this automatic - hence the bits of hard coded stuff
I've resorted to to get this far. 

2.  The "please choose" options go missing after the first time I select
things - eg, selecting N America defaults to Bermuda. 

I suspect these issues can be solved if I can work out how to get multiple
models registered in the session so they update automatically like the
examples provided earlier.  




public class WholSession extends WebSession {

private IModel areaModel = new AreaChoiceModel();
private IModel regionModel = new AreaChoiceModel();
private IModel countryModel = new AreaChoiceModel();

private List areaList = ((WholApplication)
getApplication()).getAreas();
private List countryList = Collections.EMPTY_LIST;
private List regionList = Collections.EMPTY_LIST;

public WholSession(Request request) {
super(request);
}

protected void onDetach() {
areaModel.detach();
regionModel.detach();
countryModel.detach();
}

public IModel getAreaModel() {
return areaModel;
}

public List getAreaList() {
return areaList;
}

public void setAreaList(List areaList) {
this.areaList = areaList;
}

public IModel getRegionModel() {
return regionModel;
}

public IModel getCountryModel() {
return countryModel;
}

public List getCountryList() {
return countryList;
}

public void setCountryList(List countryList) {
this.countryList = countryList;
}

public List getRegionList() {
return regionList;
}

public void setRegionList(List regionList) {
this.regionList = regionList;
}

public void setRegionModel(IModel regionModel) {
this.regionModel = regionModel;
}
}



public class AreaChoiceModel extends Model {

private Area area; 

public AreaChoiceModel() {
}

public AreaChoiceModel(Area area) {
logger.debug("AreaChoiceModel " + area);
this.area = area;
}

public Object getObject() {
return area;
}

public void setObject(Object object) {
if (object != null) { 
area = (Area) object;   
}
}

public void detach() {
// do nothing - we want to save selected
// area between sessions
}

public Area getArea() {
return area;
}
}


public class PanelSearch extends PanelBase {

public PanelSearch(String id) {
super(id);

// setModel(((WholSession)

Re: Tabular form validation problem with FormTester

2008-02-22 Thread Martin Makundi
Hi!

Is there a bug in handling the first listView row submitted using
WicketTester/FormTester?

Regardless of the original values displayed on the first row of the
listView, the textField.getConvertedInput() and
checkbox.getConvertedInput() return null and false values at the form
validator, respectively.

If I surpass the validator, the form is submitted just fine. It is
only in the validator where the problem occurs and it is on the first
row only (i.e., elements "listView:0:todo" and
"listView:0:description"). Other rows submitted using the FormTester
seem to work just fine so far.

Is this a bug or am I using it improperly? Here is the test code; the
rest of the code remains the same as previously in the thread "Tabular
form validation problem with checkboxes" (all the previous advices
taken, though):

  public void testThatCheckingARowButLeavingTheDescriptionEmptyResultsInError()
{
tester.startPage(Todos.class);
FormTester formTester = tester.newFormTester(Todos.TODO_FORM);
formTester.setValue("listView:3:todo", "true"); // I do not touch
row 0 but those items' default values are not received by the
validator
formTester.submit();
tester.assertRenderedPage(Todos.class);
String testString = new
Localizer().getString("checked_but_description_missing", new Todos());
System.out.println("testString=" + testString);
tester.assertErrorMessages(new String[] { testString, } );
  }


**
Martin

2008/2/21, Igor Vaynberg <[EMAIL PROTECTED]>:
> this line: textRequired = (Boolean) checkBox.getModelObject(); should not work
>
>  you are inside a validator, that means models haven not been updated
>  yet. models are only updated once all type conversion/validation
>  succeeds.
>
>  inside validators you should use formcomponent.getconvertedinput() to
>  read the value that will be put into the model if validators succeed.
>
>  -igor
>
>
>  On Wed, Feb 20, 2008 at 3:30 PM, Martin Makundi
>
> <[EMAIL PROTECTED]> wrote:
>
> > > a proper solution would be to use a validator or a formvalidator to do
>  >  >  this. generally you never iterate over components to do validation in
>  >  >  wicket. we have good plugin points for you in the form workflow.
>  >
>  >  Judging from the performance of the checkbox, I have a wrong plugin
>  >  point for the validator. How would you put it?
>  >
>  >
>  >  > you didnt show the part of code that generates the list...
>  >  >  > it is just a  dummy list of new todo items.
>  >  > they are unique but you are using a listview? so what you have is not
>  >  >  a list at all, it is a collection of random items.
>  >  > perhaps listview is not what you want. if you keep regenerating items 
> every request
>  >
>  >  They are not random. Here is the code generating the items:
>  >  List linkedTodos = new LinkedList();
>  >  {
>  >   Todo todo = new Todo();
>  >   todo.setDescription("Dummy");
>  >   todo.setSelected(true);
>  >   todo.setTodoDate(Convert.toDate("1.1.2008");
>  >   linkedTodos.add(todo);
>  >  }
>  >  // ... and I have repeated a number of these ... say 7 pcs
>  >  return linkedTodos;
>  >
>  >  The page uses a linkedTodos "singleton" in the sence that the list is
>  >  generated only the first time the page is loaded. So they are not
>  >  random.
>  >
>  >
>  >  >  >  Is there a bug with the checkbox?
>  >  > doubt it
>  >
>  >  Well.. the validator fails to receive the submitted checkbox state.
>  >  Did I attach the validator improperly? Or should I read the checkbox
>  >  value in some other way? The checkbox state submitted from the browser
>  >  is not received by the validator using the code I posted before. The
>  >  textfields function properly, but the checkboxes seem to somehow be
>  >  disconnected... they sometimes change state according to the selection
>  >  in the browser window, sometimes not. Mostly not ;) Odd times? Very
>  >  strange.
>  >
>  >
>  >
>  >  **
>  >  Martin
>  >
>
> >  -
>  >  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: Accessing prototype scoped panel beans using @SpringBean annotation

2008-02-22 Thread Kent Tong


Ned Collyer wrote:
> 
> There are a few ways to approach this, ie, having some class loader which
> resolves given string "class references", and those strings are wired in
> through spring.  This works - but feels a bit hacky.
> 

I don't know why you feel this hacky. It looks clean and easy to me:

public class TestPage extends WebPage {
@SpringBean(name = "config")
private Config config;

public TestPage() {
add(PanelFactory.getPanel(config, "testPanelOne"));
}
}

public class PanelFactory {
public static Panel getPanel(Config config, String id) {
Class c =
Class.forName(config.getPanelClass()).asSubclass(Panel.class);
Constructor constructor = 
c.getConstructor(String.class);
return constructor.newInstance(id);
}
}



-
--
Kent Tong
Wicket tutorials freely available at http://www.agileskills2.org/EWDW
Axis2 tutorials freely available at http://www.agileskills2.org/DWSAA
-- 
View this message in context: 
http://www.nabble.com/Accessing-prototype-scoped-panel-beans-using-%40SpringBean-annotation-tp15627974p15648766.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]