Re: [Wicket-user] setBorderBodyContainer in 1.3

2007-06-23 Thread Juergen Donnerstag
I asked the infrastructure group already. Unfortunately without
success. The reason being that both are in use (even if it is some
very old issue I raised in other project some years ago and which is
closed already). But I give it another try.

Juergen

On 6/22/07, Igor Vaynberg [EMAIL PROTECTED] wrote:
 juergen, there are two of you in jira, which makes it hard to assign issues.
 do you think you can work it out with asf infrastructure group to remove the
 account you no longer use?

 -igor



  On 6/21/07, Juergen Donnerstag [EMAIL PROTECTED] wrote:
  This feature has not yet been backported to 1.3 the reason being that
  we first need to backport all of the markup fragment/render changes.
  That will not happen in 1.3.
 
  yes, open a jira issue please.
 
  Juergen
 
  On 6/21/07, Igor Vaynberg [EMAIL PROTECTED] wrote:
   open a jira issue please
  
   -igor
  
  
  
   On 6/21/07, Alberto Bueno  [EMAIL PROTECTED] wrote:
This problem was solved in the 2.0 version, but I don't how we can
implement a solution in version 1.3...
Because it's a very tipical situation if you are using borders...
Waiting responses... :)
   
 Sorry if I'm mistaken, but I think this is related to an issue that
 I
   posted
 about here:

  
 http://www.nabble.com/Borders-Containing-Embedded-Components-tf3776704.html#a10679274
 previous post .

 I'm afraid that post didn't get any response, and I never solved it
 on
   my
 own...

 Severian.

   
   
   
  
 -
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
   
 https://lists.sourceforge.net/lists/listinfo/wicket-user
   
  
  
  
 -
   This SF.net email is sponsored by DB2 Express
   Download DB2 Express C - the FREE version of DB2 express and take
   control of your XML. No limits. Just data. Click to get it now.
   http://sourceforge.net/powerbar/db2/
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
  
 https://lists.sourceforge.net/lists/listinfo/wicket-user
  
  
 
 
 -
  This SF.net email is sponsored by DB2 Express
  Download DB2 Express C - the FREE version of DB2 express and take
  control of your XML. No limits. Just data. Click to get it now.
  http://sourceforge.net/powerbar/db2/
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 


 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Question on Serialization

2007-06-23 Thread Johan Compagner
with the current 1.3 if you hold page references in other pages the
the main pag is not serialized as a whole. Every page reference we
come across is saved by itself in its own file. So pages are not saved
twice or multiply in more then one file. The only thing i dont know
currenlty is if PageX is the request page, PageY the response with a
reference to PageX then it is still possible then PageX is saved twice
(one time as main page and one time as a sub one, but this will result
in one file for pagex)

On 6/23/07, Iman Rahmatizadeh [EMAIL PROTECTED] wrote:
 Does holding references to other Pages inside a Page make them be serialized
 twice ? Like :

 class MyPage extends Page {

 ListPage otherPages;
 
 }

 would it make any difference if it was inside another object, like :


 class MyPage extends Page {

 MyPageHolder pageHolder; // serializable
 
 }



 finally, where exactly is this logic hidden in wicket code, so I can give it
 a closer look ?

 Iman


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] How to get HTML source code from a wicket page

2007-06-23 Thread Srinu Sunkara
Hi - I am trying to get the HTML source code of a web page with in the program 
(so that I can send this in an email). Can some one tell me how can I get the 
HTML source.

Thank you,
-Srini



   
-
Choose the right car based on your needs.  Check out Yahoo! Autos new Car 
Finder tool.-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Wicket Fields with HTML Fields

2007-06-23 Thread Edi

Hello,

I have one wicket page. It contains two text boxes (I have mentioned
wicket:id). 
If I create text box in wicket page, wicket:id should be mentioned in Java
file also. Right?

In this wicket page, I have created 2 html text box also. But here no need
to mention text name to java file. Correct? 

How can I submit and get normal html text box values in wicket page?

Please explain.

Thanking You

Regards,
Edi

-- 
View this message in context: 
http://www.nabble.com/Wicket-Fields-with-HTML-Fields-tf3968846.html#a11265481
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Running Wicket application in Batch mode

2007-06-23 Thread Srinu Sunkara
Hi - I don't know if this is a dummy question. Sorry for being so.

I just getting started with wicket and working on building a web application. 
So far so good. However, now we needed to build some nightly scripts and send 
an email with some data in a web page format.

Can you tell me if we can run a java class in batch mode and still use another 
class extending a web page to be included in the email (as body).

Thank you,
-Srini



 
-
Need Mail bonding?
Go to the Yahoo! Mail QA for great tips from Yahoo! Answers users.-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] modifying component from IComponentOnBeforeRenderListener

2007-06-23 Thread Ryan Sonnek

Looks like I got the problem resolved.

I was trying to attach a Behavior from the IComponentOnBeforeRenderListener
in order to setRequired which throws an exception.  When I just setRequired
from within the listener it works fine.

Thanks for the help.
Ryan

On 6/22/07, Ryan Sonnek [EMAIL PROTECTED] wrote:


it should be pretty easy to update the wicketstuff-hibernate project to
verify this is broken.  how should i proceed with this issue?

On 6/22/07, Matej Knopp [EMAIL PROTECTED] wrote:

 That's weird. You should be able to call setRequired from that
 listener, that's the point why i have introduced it!

 -Matej

 On 6/22/07, Ryan Sonnek [EMAIL PROTECTED] wrote:
  I'm *still* trying to find a way to modify a component *when the model
 is
  bound*.  The new IComponentOnBeforeRenderListener seems
  close, but I can't *modify* the component since it's already started
 the
  rendering cycle.  I'm trying to call Component.setRequired (true) on
 the
  component, and that throws an exception right now.
 
  for a more exact usecase (and even a unit test!), check out the
  wicketstuff-hibernate codebase.  The test is currently disabled to not
 break
  the build...
  
http://wicket-stuff.svn.sourceforge.net/viewvc/wicket-stuff/trunk/wicketstuff-hibernate-behavior/src/test/java/org/wicketstuff/hibernate/HibernateAnnotationComponentInstantiaionListenerTest.java?revision=2456view=markup

 
  Again, my goal is to have an *application wide* hook for when the
 model is
  bound on *any* component.  I like the direction of
  IComponentInstantiationListener and
  IComponentOnBeforeRenderListener.  Maybe just need to
  introduce an IComponentOnModelBoundListener?
 
  Ryan
 
 
 
 -
  This SF.net email is sponsored by DB2 Express
  Download DB2 Express C - the FREE version of DB2 express and take
  control of your XML. No limits. Just data. Click to get it now.
  http://sourceforge.net/powerbar/db2/
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 


 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Unit testing - updating a DropDownChoice with Ajax

2007-06-23 Thread Jean-Baptiste Quenot
* glr:

 I tried using WicketTester with FormTester but I cannot have the
 model  of the  first  DropDownChoice updated  as  a response  to
 making a selection in it.  As a result, when the OnEvent handler
 of the  AjaxFormComponentUpdatingBehavior fires, it looks  as if
 there was no selection in the first DropDownChoice.

Can you please provide a sample  code for your test?  Did you make
use of FormTester.select(String, int)?
-- 
 Jean-Baptiste Quenot
aka  John Banana   Qwerty
http://caraldi.com/jbq/

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] How can we change a component dynamically in Wicket ?

2007-06-23 Thread Jean-Baptiste Quenot
* rc.china:
 
 It seems that Lable use  s p a n  tag while TextField use  i n p u t  tag 
 and that they conflict. I have changed the code like this and it still does
 not work properly. Does anyone have any  workaround ? Thank you!
 
 public class Login extends WebPage {
   private int count = 0;
   
   Label label = null;
   TextField textField = null;
 
   public Login() {
   super();
   
   label = new Label(label, new PropertyModel(this, count));
   label.setOutputMarkupId(true);
 
   textField = new TextField(label, new PropertyModel(this, 
 count));
   textField.setOutputMarkupId(true);  

Add both components to the page and override isVisible() on your
components.
-- 
 Jean-Baptiste Quenot
aka  John Banana   Qwerty
http://caraldi.com/jbq/

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] HibernateAnnotationComponentConfigurator

2007-06-23 Thread Ryan Sonnek

Just sending out a quick release announcement for a new Hibernate/Wicket
integration in the wicketstuff project.  The
HibernateAnnotationComponentConfigurator automatically configures a wicket
component based on the POJO's Hibernate annotations.

one especially cool feature is that you can register this behavior for your
*entire* application, without worrying about adding this functionality to
each page/component.

Take a look and let me know what you think!

http://jroller.com/page/wireframe?entry=hibernateannotationcomponentconfigurator
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] setBorderBodyContainer in 1.3

2007-06-23 Thread Igor Vaynberg

On 6/23/07, Juergen Donnerstag [EMAIL PROTECTED] wrote:


I asked the infrastructure group already. Unfortunately without
success. The reason being that both are in use (even if it is some
very old issue I raised in other project some years ago and which is
closed already). But I give it another try.



ok i think i figured out what to do. we cannot delete your account because
of fk constraints. but what i can do is remove wicket-developers group from
one of them and then it will not be assignable to wicket issues. which one
do you want me to remove the group from?

username: jdonnerstag
username: juergen.donnerstag [at] eds [dot] com

-igor


Juergen


On 6/22/07, Igor Vaynberg [EMAIL PROTECTED] wrote:
 juergen, there are two of you in jira, which makes it hard to assign
issues.
 do you think you can work it out with asf infrastructure group to remove
the
 account you no longer use?

 -igor



  On 6/21/07, Juergen Donnerstag [EMAIL PROTECTED] wrote:
  This feature has not yet been backported to 1.3 the reason being that
  we first need to backport all of the markup fragment/render changes.
  That will not happen in 1.3.
 
  yes, open a jira issue please.
 
  Juergen
 
  On 6/21/07, Igor Vaynberg [EMAIL PROTECTED] wrote:
   open a jira issue please
  
   -igor
  
  
  
   On 6/21/07, Alberto Bueno  [EMAIL PROTECTED] wrote:
This problem was solved in the 2.0 version, but I don't how we can
implement a solution in version 1.3...
Because it's a very tipical situation if you are using borders...
Waiting responses... :)
   
 Sorry if I'm mistaken, but I think this is related to an issue
that
 I
   posted
 about here:

  

http://www.nabble.com/Borders-Containing-Embedded-Components-tf3776704.html#a10679274
 previous post .

 I'm afraid that post didn't get any response, and I never solved
it
 on
   my
 own...

 Severian.

   
   
   
  

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
   
 https://lists.sourceforge.net/lists/listinfo/wicket-user
   
  
  
  

-
   This SF.net email is sponsored by DB2 Express
   Download DB2 Express C - the FREE version of DB2 express and take
   control of your XML. No limits. Just data. Click to get it now.
   http://sourceforge.net/powerbar/db2/
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
  
 https://lists.sourceforge.net/lists/listinfo/wicket-user
  
  
 
 

-
  This SF.net email is sponsored by DB2 Express
  Download DB2 Express C - the FREE version of DB2 express and take
  control of your XML. No limits. Just data. Click to get it now.
  http://sourceforge.net/powerbar/db2/
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 



-
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] [Wicket-User] Spring+Hibernate questions

2007-06-23 Thread Robert .

On 6/23/07, Flemming Boller [EMAIL PROTECTED] wrote:


On 6/23/07, Robert . [EMAIL PROTECTED]  wrote:

 One thing I am struggling with is where I should put my DAO's and data
 services. I know about the @SpringBean annotation for components, but
 how should I use those in classes such as DetachableXXXModel? Should
 I pass the DAO's I need to that class or should I put DAO's in the
 application object (like Pro Wicket examples do)?


There is no silverbullet here. Each solution has its drawbacks. However
the solution I have come to best like is only using the @SpringBean in
pages, and then pass on the springbean as argument to where every it is
needed. That way it is also more clearly seen in the page where the service
is used.



I'm curious when this is simpler that accessing the DAOs from the
application object. I find it annoying so far that I find out that I need a
certain DAO in my DetachableXXXModel, and then, for example, have to pass it
from the page to the XXXDataProvider, save a reference there, and in the
model method pass it to the DetachableXXXModel.


Is there a good Wicket example project I can look at, besides phonebook,

 that uses Spring and Hibernate? I am interested in the right set-up.


You could also look at the Databinder project. It includes some nice
examples too.



Ok thanks!


I also have some questions about OpenSessionInViewFilter, which probably

 are off-topic, but hope someone wants to help anyway.

 There seems to be quite some disagreements about whether using
 OpenSessionInViewFilter is a good thing or not. What does the Wicket
 team/users
 think about it?


I have also used OSIVF on a project. And you really have to be carefull
here. Hibernate has some nasty exceptions that easily will be thrown at you.
Especially Lazyexception session closed or... object with same id is already
loaded in session



Unfortunately I do not know what to be careful for yet :)


I came to the conclusion that is was much easier to copy you hibernate

objects into viewbeans which is designed with wicket in mind. So above the
service layer you have view bean. And under the service layer you have
hibernateobjects (domain objects). I would be happy to hear others comments
on this one.



Do you have an example for this? It's difficult to think of what those
viewbeans are. They don't have associations?

You know the answer(s) to the section below?

If I understand correctly, and please correct me if I'm wrong,

 by using the OpenSessionInViewFilter you get a new transaction at the
 start
 of every request, which commits or rollbacks at the end.
 This is so that lazy associations, which are accessed outside explicit
 transactions,
 such as in Wicket Page classes, are initialized and don't throw an
 exception.

So what kind of transaction exactly is created by the
 OpenSessionInViewFilter?
 (propagation, isolation?)
 Can I use it only for reading?


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Wicket Fields with HTML Fields

2007-06-23 Thread Igor Vaynberg

On 6/23/07, Edi [EMAIL PROTECTED] wrote:



Hello,

I have one wicket page. It contains two text boxes (I have mentioned
wicket:id).
If I create text box in wicket page, wicket:id should be mentioned in Java
file also. Right?

In this wicket page, I have created 2 html text box also. But here no need
to mention text name to java file. Correct?

How can I submit and get normal html text box values in wicket page?

Please explain.

Thanking You

Regards,
Edi



if you roll your own form that have components not linked to wicket, on the
next request simply do getrequest().getparameter(name) where name is the
name of the formcomponent in your static html.

-igor
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Multiple wicket:child tags in the same page

2007-06-23 Thread Igor Vaynberg

On 6/22/07, rc.china [EMAIL PROTECTED] wrote:





Scott Swank wrote:

 I've often seen folk want what I see as abstract tags that can then
 be implemented by subclasses.  The way I've handled that for our
 application is by creating an abstract component (say it's a page)
 with div tags with appropriate wicket:ids.

 public class BasePage extends WebPage
 {
   public BasePage()
   {
 add(buildFoo(foo));
 add(buildBar(bar));
   }

   public abstract Panel buildFoo(String id);
   public abstract Component buildBar(String id);
 }

 Then subclass appropriately.


This solution has some limitations while multiple wicket:child has not:
1)We have to repeat the common parts of BasePage.html in all of its
descendants (such as DerivedPage1.html, DerivedPage2.html ...).
  == If we have multiple wicket:child, we have no need to do this.
2)If we chang the common parts in BasePage.html, we have to do the same
change in all of its descendants.
  == If we have multiple wicket:child, we just do the change in
BasePage.html



points one and two are not true. you would use wicket's markup inheritance
so the derived pages do not have to repeat anything from basepage.

3)The descendants have to provide a XXXPanel to encapsulate some components

  == If we have multiple wicket:child, we can just put these components
between wichet:child and /wicket:child, such as
  wicket:child
 label wicket:id=labelaaa/label
 input wicket:id=input value=test/
  /wicket:child



also not strictly true. it doesnt need to be a panel, it can as easily be a
fragment which means it would be defined inline in the derived page. instead
of wicket:extend you would use wicket:fragment

all that said, like i said before there is nothing stopping you from
implementing what you want. all the api to do so is exposed - it is just not
the default the wicket team prefers.

-igor



--

View this message in context:
http://www.nabble.com/Multiple-wicket%3Achild-tags-in-the-same-page-tf3775143.html#a11263485
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] HibernateAnnotationComponentConfigurator

2007-06-23 Thread Paolo Di Tommaso

This sounds very cool! Does it work with Hibernate Validator Annotations
also ?

Thanks, Paolo

On 6/23/07, Ryan Sonnek [EMAIL PROTECTED] wrote:


Just sending out a quick release announcement for a new Hibernate/Wicket
integration in the wicketstuff project.  The
HibernateAnnotationComponentConfigurator automatically configures a wicket
component based on the POJO's Hibernate annotations.

one especially cool feature is that you can register this behavior for
your *entire* application, without worrying about adding this functionality
to each page/component.

Take a look and let me know what you think!


http://jroller.com/page/wireframe?entry=hibernateannotationcomponentconfigurator



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] [Wicket-User] Spring+Hibernate questions

2007-06-23 Thread Flemming Boller

Hi

I have put my answer in below you mail

/Flemming

On 6/23/07, Robert . [EMAIL PROTECTED] wrote:


Hi, I'm trying to make a project using Hibernate, Spring and Wicket.
I am have some conceptual difficulties. Would love if someone could
share their knowledge or point me in the right direction.



I will try.

One thing I am struggling with is where I should put my DAO's and data

services. I know about the @SpringBean annotation for components, but
how should I use those in classes such as DetachableXXXModel? Should
I pass the DAO's I need to that class or should I put DAO's in the
application object (like Pro Wicket examples do)?



There is no silverbullet here. Each solution has its drawbacks. However the
solution I have come to best like is only using the @SpringBean in pages,
and then pass on the springbean as argument to where every it is needed.
That way it is also more clearly seen in the page where the service is used.


Is there a good Wicket example project I can look at, besides phonebook,

that uses Spring and Hibernate? I am interested in the right set-up.



You could also look at the Databinder project. It includes some nice
examples too.

I also have some questions about OpenSessionInViewFilter, which probably

are off-topic, but hope someone wants to help anyway.

There seems to be quite some disagreements about whether using
OpenSessionInViewFilter is a good thing or not. What does the Wicket
team/users
think about it?



I have also used OSIVF on a project. And you really have to be carefull
here. Hibernate has some nasty exceptions that easily will be thrown at you.
Especially Lazyexception session closed or... object with same id is already
loaded in session

I came to the conclusion that is was much easier to copy you hibernate
objects into viewbeans which is designed with wicket in mind. So above the
service layer you have view bean. And under the service layer you have
hibernateobjects (domain objects). I would be happy to hear others comments
on this one.

If I understand correctly, and please correct me if I'm wrong,

by using the OpenSessionInViewFilter you get a new transaction at the
start
of every request, which commits or rollbacks at the end.
This is so that lazy associations, which are accessed outside explicit
transactions,
such as in Wicket Page classes, are initialized and don't throw an
exception.


So what kind of transaction exactly is created by the

OpenSessionInViewFilter?
(propagation, isolation?)
Can I use it only for reading?



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Using hot-reloading of classes with Spring (Was: Has something changed in markup inheritance?)

2007-06-23 Thread Jean-Baptiste Quenot
* Peter Thomas:

 Sure Eelco, JIRA logged:  WICKET-685

 On 6/22/07, Eelco Hillenius [EMAIL PROTECTED] wrote:

 Could you describe the problems in a JIRA issue? Thanks.

Please avoid to reply on top!

I commented on the issue, and  finally marked it as invalid.  Here
is the comment, in case you wish to discuss it on the mailing-list
or just for the record if other users came across this:

It's a bit tricky to make the reloading work with Spring. You have
to define class naming conventions and enforce them. The main idea
behind all of  this, is that you will come  across problems if the
same class  is loaded  in two different  classloaders, one  is the
parent classloader, and the other is the reloading classloader.

And of course please read the Javadoc thoroughly especially if you
use Spring.
-- 
 Jean-Baptiste Quenot
aka  John Banana   Qwerty
http://caraldi.com/jbq/

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Running Wicket application in Batch mode

2007-06-23 Thread Xavier Hanin

Hi,

I haven't tried it myself so far, but I asked quite the same question some
time ago and people suggested using the WicketTester class to render a page
outside an HTTP request.

HTH,

Xavier

On 6/23/07, Srinu Sunkara [EMAIL PROTECTED] wrote:


Hi - I don't know if this is a dummy question. Sorry for being so.

I just getting started with wicket and working on building a web
application. So far so good. However, now we needed to build some nightly
scripts and send an email with some data in a web page format.

Can you tell me if we can run a java class in batch mode and still use
another class extending a web page to be included in the email (as body).

Thank you,
-Srini


--
Need Mail bonding?
Go to the Yahoo! Mail 
QAhttp://answers.yahoo.com/dir/index;_ylc=X3oDMTFvbGNhMGE3BF9TAzM5NjU0NTEwOARfcwMzOTY1NDUxMDMEc2VjA21haWxfdGFnbGluZQRzbGsDbWFpbF90YWcx?link=asksid=396546091for
 great
tips from Yahoo! 
Answershttp://answers.yahoo.com/dir/index;_ylc=X3oDMTFvbGNhMGE3BF9TAzM5NjU0NTEwOARfcwMzOTY1NDUxMDMEc2VjA21haWxfdGFnbGluZQRzbGsDbWFpbF90YWcx?link=asksid=396546091users.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user





--
Xavier Hanin - Independent Java Consultant
Manage your dependencies with Ivy!
http://incubator.apache.org/ivy/
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Running Wicket application in Batch mode

2007-06-23 Thread Jean-Baptiste Quenot
* Srinu Sunkara:

 I just getting started with wicket and working on building a web
 application. So  far so  good. However, now  we needed  to build
 some nightly scripts  and send an email with some  data in a web
 page format.

 Can you  tell me if we  can run a  java class in batch  mode and
 still use another  class extending a web page to  be included in
 the email (as body).

Reminds me of another question I just answered ;-)
-- 
 Jean-Baptiste Quenot
aka  John Banana   Qwerty
http://caraldi.com/jbq/

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] How to get HTML source code from a wicket page

2007-06-23 Thread Jean-Baptiste Quenot
* Srinu Sunkara:

 Hi - I am trying to get the  HTML source code of a web page with
 in the program  (so that I can send this  in an email). Can some
 one tell me how can I get the HTML source.

Sure.  Processing a Wicket page and sending the result to a buffer
can be achieved through  StringRequestTarget, thus allowing you to
use the buffer contents for sending email.

See RequestCycle.setRequestTarget() 

You can find the full answer on this thread:
http://www.nabble.com/Sending-Emails-Via-Wicket--t3639601.html

Hope this helps,
-- 
 Jean-Baptiste Quenot
aka  John Banana   Qwerty
http://caraldi.com/jbq/

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] HibernateAnnotationComponentConfigurator

2007-06-23 Thread Ryan Sonnek

The current implementation uses:
* NotNull annotation automatically sets the component to be required
(setRequired(true))
* Length annotation automatically adds a MaxLength validator *and* adds html
maxlength attribute to the markup.

If there are other annotations that would be useful, let me know!  I'd love
leverage more hibernate metadata to help wicket projects.

On 6/23/07, Paolo Di Tommaso [EMAIL PROTECTED] wrote:


This sounds very cool! Does it work with Hibernate Validator Annotations
also ?

Thanks, Paolo

On 6/23/07, Ryan Sonnek  [EMAIL PROTECTED] wrote:

 Just sending out a quick release announcement for a new
 Hibernate/Wicket integration in the wicketstuff project.  The
 HibernateAnnotationComponentConfigurator automatically configures a wicket
 component based on the POJO's Hibernate annotations.

 one especially cool feature is that you can register this behavior for
 your *entire* application, without worrying about adding this functionality
 to each page/component.

 Take a look and let me know what you think!

 
http://jroller.com/page/wireframe?entry=hibernateannotationcomponentconfigurator





 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] HibernateAnnotationComponentConfigurator

2007-06-23 Thread Igor Vaynberg

On 6/23/07, Ryan Sonnek [EMAIL PROTECTED] wrote:


Just sending out a quick release announcement for a new Hibernate/Wicket
integration in the wicketstuff project.  The
HibernateAnnotationComponentConfigurator automatically configures a wicket
component based on the POJO's Hibernate annotations.

one especially cool feature is that you can register this behavior for
your *entire* application, without worrying about adding this functionality
to each page/component.

Take a look and let me know what you think!


http://jroller.com/page/wireframe?entry=hibernateannotationcomponentconfigurator



this might be nice too
onbeforerender(component c) {
 if (c.hasbeenrednered())  return;
 ...
}

to avoid adding validators more then once.

-igor
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] AjaxFallackDataTables with fixed columns width

2007-06-23 Thread Christian Alejandro Marquez Grabia

Hi everyone, I'm kinda new to wicket and I'm trying to get closer to it =)
here comes the question...

I was wondering if there is a way to set the width of the columns for the
DataTable when it's constructed as defining the columns element, I've seen
the possibility of doing this with one of the Column class, but in the
DataTable I have to link it with a Model, while the other one that contains
the Location property does not provide a link to a model, at least I haven't
found any...

If someone knows how to set the width of the columns in this DataTables, i
will appreciate it very much, if you don't, thank you for the time invested
=)

Once again, thank you for your time and attention =)

Christian
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] [Wicket-User] Spring+Hibernate questions

2007-06-23 Thread Robert .

On 6/23/07, Igor Vaynberg [EMAIL PROTECTED] wrote:


On 6/23/07, Robert . [EMAIL PROTECTED] wrote:



 On 6/23/07, Flemming Boller  [EMAIL PROTECTED] wrote:
 
  On 6/23/07, Robert .  [EMAIL PROTECTED]  wrote:
 
  There is no silverbullet here. Each solution has its drawbacks.
  However the solution I have come to best like is only using the @SpringBean
  in pages, and then pass on the springbean as argument to where every it is
  needed. That way it is also more clearly seen in the page where the service
  is used.
 

 I'm curious when this is simpler that accessing the DAOs from the
 application object. I find it annoying so far that I find out that I need a
 certain DAO in my DetachableXXXModel, and then, for example, have to pass it
 from the page to the XXXDataProvider, save a reference there, and in the
 model method pass it to the DetachableXXXModel.


there is nothing wrong with doing this

class PersonModel extends LoadableDetachableModel {
   @SpringBean
   private PersonDao dao;
   private final long id;
   public PersonModel(long id) {
 this.id=id;
 InjectorHolder.getInjector().inject(this);
   }
   ...
}



Ah very interesting to see this is possible. Still I am thinking why this
would be better than using the application to hold the DAOs.
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] HibernateAnnotationComponentConfigurator

2007-06-23 Thread Igor Vaynberg

On 6/23/07, Ryan Sonnek [EMAIL PROTECTED] wrote:


Just sending out a quick release announcement for a new Hibernate/Wicket
integration in the wicketstuff project.  The
HibernateAnnotationComponentConfigurator automatically configures a wicket
component based on the POJO's Hibernate annotations.

one especially cool feature is that you can register this behavior for
your *entire* application, without worrying about adding this functionality
to each page/component.

Take a look and let me know what you think!


http://jroller.com/page/wireframe?entry=hibernateannotationcomponentconfigurator



you should consider teaming up with databinder and working on this there.

-igor
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] HibernateAnnotationComponentConfigurator

2007-06-23 Thread Ryan Sonnek


this might be nice too
onbeforerender(component c) {
  if (c.hasbeenrednered())  return;
  ...
}



Good catch!

I'm still relatively new to wicket's rendering lifecycle.  Thanks for the
help and let me know if you see other optimizations.
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] HibernateAnnotationComponentConfigurator

2007-06-23 Thread Ryan Sonnek

I've looked at databinder in the past, and although it may be useful, I
think it's a bit heavyweight for what I'm trying to achieve.

In my opinion, database access should be abstracted away from the UI layer
altogether, which leaves the goals of databinder questionable.  Does anyone
remember the horror of the JSP tags that directly connected to datbases??
Spring integration is a much more desirable location for database access,
and there  is already excellent spring integration with wicket.

My goal is simply to integrate hibernate into wicket for relevant UI
features.  Validation is an excellent example where wicket should simply
re-use the same backend validation and display good user feedback instead of
waiting for the hibernate validation fire and throwing a big fat stacktrace.

On 6/23/07, Igor Vaynberg [EMAIL PROTECTED] wrote:


On 6/23/07, Ryan Sonnek [EMAIL PROTECTED] wrote:

 Just sending out a quick release announcement for a new
 Hibernate/Wicket integration in the wicketstuff project.  The
 HibernateAnnotationComponentConfigurator automatically configures a wicket
 component based on the POJO's Hibernate annotations.

 one especially cool feature is that you can register this behavior for
 your *entire* application, without worrying about adding this functionality
 to each page/component.

 Take a look and let me know what you think!

 
http://jroller.com/page/wireframe?entry=hibernateannotationcomponentconfigurator



you should consider teaming up with databinder and working on this there.

-igor


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] [Wicket-User] Spring+Hibernate questions

2007-06-23 Thread Robert .

On 6/23/07, Igor Vaynberg [EMAIL PROTECTED] wrote:




  class PersonModel extends LoadableDetachableModel {
 @SpringBean
 private PersonDao dao;
 private final long id;
 public PersonModel(long id) {
   this.id=id;
   InjectorHolder.getInjector().inject(this);
 }
 ...
  }
 

 Ah very interesting to see this is possible. Still I am thinking why
 this would be better than using the application to hold the DAOs.


this is better because if you use applications to hold non-proxied daos
you have to be very careful not to leave a reference to it anywhere. because
dependencies injected throgh @SpringBean are special proxies you dont have
to worry about it because the proxies can be safely serialized.



I do understand that. But isn't it very easy to avoid it? For example the
PersonClass would be something like this:

class PersonModel extends LoadableDetachableModel {
  private final long id;
  public PersonModel(long id) {
this.id=id;
  }

 private PersonDao getDao() {
   return MyApplication.get().getPersonDao();
  ...
}

With this getter there is no temptation to save the DAO as a field.
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] [Wicket-User] Spring+Hibernate questions

2007-06-23 Thread Igor Vaynberg

On 6/23/07, Robert . [EMAIL PROTECTED] wrote:




On 6/23/07, Flemming Boller [EMAIL PROTECTED] wrote:

 On 6/23/07, Robert . [EMAIL PROTECTED]  wrote:

  One thing I am struggling with is where I should put my DAO's and data
 
  services. I know about the @SpringBean annotation for components, but
  how should I use those in classes such as DetachableXXXModel? Should
  I pass the DAO's I need to that class or should I put DAO's in the
  application object (like Pro Wicket examples do)?


 There is no silverbullet here. Each solution has its drawbacks. However
 the solution I have come to best like is only using the @SpringBean in
 pages, and then pass on the springbean as argument to where every it is
 needed. That way it is also more clearly seen in the page where the service
 is used.


I'm curious when this is simpler that accessing the DAOs from the
application object. I find it annoying so far that I find out that I need a
certain DAO in my DetachableXXXModel, and then, for example, have to pass it
from the page to the XXXDataProvider, save a reference there, and in the
model method pass it to the DetachableXXXModel.



there is nothing wrong with doing this

class PersonModel extends LoadableDetachableModel {
  @SpringBean
  private PersonDao dao;
  private final long id;
  public PersonModel(long id) {
this.id=id;
InjectorHolder.getInjector().inject(this);
  }
  ...
}

or use springbean in panels, etc. that will save you from the pain of having
to pass all the extra arguments around if you dont mind a bit tighter
coupling in your code.

Is there a good Wicket example project I can look at, besides phonebook,

  that uses Spring and Hibernate? I am interested in the right set-up.


 You could also look at the Databinder project. It includes some nice
 examples too.


Ok thanks!


I also have some questions about OpenSessionInViewFilter, which probably
  are off-topic, but hope someone wants to help anyway.
 
  There seems to be quite some disagreements about whether using
  OpenSessionInViewFilter is a good thing or not. What does the Wicket
  team/users
  think about it?


 I have also used OSIVF on a project. And you really have to be carefull
 here. Hibernate has some nasty exceptions that easily will be thrown at you.
 Especially Lazyexception session closed or... object with same id is already
 loaded in session


Unfortunately I do not know what to be careful for yet :)



i have managed to avoid any object with same id and session closed
exceptions without trying so far. maybe im just lucky :)

I came to the conclusion that is was much easier to copy you hibernate

 objects into viewbeans which is designed with wicket in mind. So above the
 service layer you have view bean. And under the service layer you have
 hibernateobjects (domain objects). I would be happy to hear others comments
 on this one.


Do you have an example for this? It's difficult to think of what those
viewbeans are. They don't have associations?

You know the answer(s) to the section below?

If I understand correctly, and please correct me if I'm wrong,
  by using the OpenSessionInViewFilter you get a new transaction at the
  start
  of every request, which commits or rollbacks at the end.
  This is so that lazy associations, which are accessed outside explicit
  transactions,
  such as in Wicket Page classes, are initialized and don't throw an
  exception.

  So what kind of transaction exactly is created by the
  OpenSessionInViewFilter?
  (propagation, isolation?)
  Can I use it only for reading?



i am not sure a transaction is created. i think what happens is  that the
same session is used for all transactions (unless you set propogation:
requires new) rather then a session-per-transaction pattern. this is really
the only way to get hibernate's lazy-loading to work in the view layer.

-igor
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Forms with Panels question

2007-06-23 Thread Erik Dreyer

Hi,

I'm loving Wicket, but still have a bit to learn.  I didn't find any answers
when searching for an answer to my questions, so here they are.
BTW, I'm using Wicket 1.3 as built from SVN (up to date as of 6/23).

I have a panel that I'd like to include in multiple _different_ forms.  The
panel defines some form elements that I'd like to be processed by the
enclosing form.

My use case is basically this:  The panel contains contact info (name,
address, etc).  I'd like to include this panel in both a registration form
and later, in a user profile where the user can edit their contact info.

1) What is the best way to define this Panel?  My constructor currently
looks something like the following.  Is this the correct way of solving
this?  An issue I have with this is that this panel makes some assumptions
about the form's model object.

   public ContactInfoPanel(String id, Form form) {
   super(id, form.getModel());

   BoundCompoundPropertyModel userModel =
(BoundCompoundPropertyModel)form.getModel();
   Component firstNameField = userModel.bind(new
RequiredTextField(firstName), path.to.firstName);

   add(firstNameField);
   }

2)  Supposing I wanted to add inter-field validation for fields contributed
by this panel, what is the best way to do that?

Any help would be greatly appreciated.

Thanks,
Erik
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] AjaxFallackDataTables with fixed columns width

2007-06-23 Thread Igor Vaynberg

On 6/23/07, Christian Alejandro Marquez Grabia [EMAIL PROTECTED] wrote:


Hi everyone, I'm kinda new to wicket and I'm trying to get closer to it =)
here comes the question...

I was wondering if there is a way to set the width of the columns for the
DataTable when it's constructed as defining the columns element, I've seen
the possibility of doing this with one of the Column class, but in the
DataTable I have to link it with a Model, while the other one that contains
the Location property does not provide a link to a model, at least I haven't
found any...

If someone knows how to set the width of the columns in this DataTables, i
will appreciate it very much, if you don't, thank you for the time invested
=)

Once again, thank you for your time and attention =)

Christian



there are a couple of ways. override datatable.newrowitem() and do something
lile:
newrowitem(..) { return super.newrowitem(..).add(new
SimpleAttributeModifler(style,100px;)) or if you want to do it on column
level let the column implement IStyledColumn(or something like that) which
is only in latest 1.3 snapshot

-igor
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] A trivial problem with tables that i can't manage

2007-06-23 Thread Johannes Schneider

Hi,

I am a Wicket Newbie - so I'm sure this isn't he best solution I have...
I see two easy solutions:
1: Convert your data into some sort of row model. You could create some 
sort of  strategy that is used as model for the item. Each strategy 
resolves one value of the customer.
Instead of iterating (with the DataView) over all customers and then 
adding the values. Iterate over the strategies and add labels for each 
customer.


2: Do not use tabels. Use some sort of divs instead. ;)


Johannes Schneider

Landry Soules wrote:

Hello,

I have a very simple problem:
i just want to display a table of customers, with some infos on each entry.
No problem to achieve that when you deal with one record per line. The 
problem is that i want to display 4 customers on each row, as this :


=
Customer1 || Customer2 || Customer3 || Customer4
firstName   || firstName   || firstName   || firstName
lastName   || lastName   || lastName   || lastName
=
Customer5 || Customer6 || Customer7 || Customer8
firstName   || firstName   || firstName   || firstName
lastName   || lastName   || lastName   || lastName

It sounds so simple, but i can't figure out how to do this. Can someone 
help me, please ?


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


--
Johannes Schneider
Im Lindenwasen 15
72810 Gomaringen

Fon +49 7072 9229972
Fax +49 7072 50
Mobil +49 178 1364488

[EMAIL PROTECTED]
http://www.johannes-schneider.info


smime.p7s
Description: S/MIME Cryptographic Signature
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Question on Serialization

2007-06-23 Thread Johan Compagner

no, also normal serialization.
1 page instance (id/version) is never saved in more then 1 file

johan


On 6/23/07, Eelco Hillenius [EMAIL PROTECTED] wrote:


 with the current 1.3 if you hold page references in other pages the
 the main pag is not serialized as a whole. Every page reference we
 come across is saved by itself in its own file. So pages are not saved
 twice or multiply in more then one file. The only thing i dont know
 currenlty is if PageX is the request page, PageY the response with a
 reference to PageX then it is still possible then PageX is saved twice
 (one time as main page and one time as a sub one, but this will result
 in one file for pagex)

You are talking about the optimizatinos in the custom serialization
mechanism, right?

Eelco

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] [Wicket-User] Spring+Hibernate questions

2007-06-23 Thread Igor Vaynberg

On 6/23/07, Robert . [EMAIL PROTECTED] wrote:




On 6/23/07, Igor Vaynberg [EMAIL PROTECTED] wrote:

 On 6/23/07, Robert . [EMAIL PROTECTED] wrote:
 
 
 
  On 6/23/07, Flemming Boller  [EMAIL PROTECTED] wrote:
  
   On 6/23/07, Robert .  [EMAIL PROTECTED]  wrote:
  
   There is no silverbullet here. Each solution has its drawbacks.
   However the solution I have come to best like is only using the 
@SpringBean
   in pages, and then pass on the springbean as argument to where every it is
   needed. That way it is also more clearly seen in the page where the 
service
   is used.
  
 
  I'm curious when this is simpler that accessing the DAOs from the
  application object. I find it annoying so far that I find out that I need a
  certain DAO in my DetachableXXXModel, and then, for example, have to pass it
  from the page to the XXXDataProvider, save a reference there, and in the
  model method pass it to the DetachableXXXModel.
 

 there is nothing wrong with doing this

 class PersonModel extends LoadableDetachableModel {
@SpringBean
private PersonDao dao;
private final long id;
public PersonModel(long id) {
  this.id=id;
  InjectorHolder.getInjector().inject(this);
}
...
 }


Ah very interesting to see this is possible. Still I am thinking why this
would be better than using the application to hold the DAOs.



this is better because if you use applications to hold non-proxied daos you
have to be very careful not to leave a reference to it anywhere. because
dependencies injected throgh @SpringBean are special proxies you dont have
to worry about it because the proxies can be safely serialized.

-igor
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] [Fwd: Re: html wicket:id=html CSS]

2007-06-23 Thread Juergen Donnerstag
Jan,

the problem is that though you can attach attribute modifier (that is
what HeaderContributor is as well) to a Page (or WebPage), it'll not
work. WebPage doesn't have a tag. Since there is no tag, the attribute
modifier are not invoked, hence the nothing gets added to the header
section.

Solution: you simply must attach HeaderContributor.forCss to any other
of your components (e.g. html in your code)

In order to prevent such errors, Wicket should detect (if not prevent)
that attribute modifiers are added to WebPage. I've no idea right now
how to make it a compile error, but we certainly can make it a runtime
exception.

Juergen

On 6/22/07, Jan Kriesten [EMAIL PROTECTED] wrote:

 copy to the list, as sourceforge doesn't allow zip-attachments atm.


  Original Message 
 Subject: Re: [Wicket-user] html wicket:id=html  CSS
 Date: Fri, 22 Jun 2007 08:53:23 +0200
 From: Jan Kriesten [EMAIL PROTECTED]


 Hi Juergen,

  I'll try my best to find some spare time to do it. Hopefully over the 
  weekend.

 much appreciated, thank you! :-)

 I attached a zip-file containing the example.

 Best regards, --- Jan.



 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] setBorderBodyContainer in 1.3

2007-06-23 Thread Juergen Donnerstag
please keep the jdonnerstag for wicket. thanks

Juergen

On 6/23/07, Igor Vaynberg [EMAIL PROTECTED] wrote:
 On 6/23/07, Juergen Donnerstag [EMAIL PROTECTED] wrote:
  I asked the infrastructure group already. Unfortunately without
  success. The reason being that both are in use (even if it is some
  very old issue I raised in other project some years ago and which is
  closed already). But I give it another try.

 ok i think i figured out what to do. we cannot delete your account because
 of fk constraints. but what i can do is remove wicket-developers group from
 one of them and then it will not be assignable to wicket issues. which one
 do you want me to remove the group from?

 username: jdonnerstag
 username: juergen.donnerstag [at] eds [dot] com

 -igor

 
  Juergen
 
  On 6/22/07, Igor Vaynberg [EMAIL PROTECTED] wrote:
   juergen, there are two of you in jira, which makes it hard to assign
 issues.
   do you think you can work it out with asf infrastructure group to remove
 the
   account you no longer use?
  
   -igor
  
  
  
On 6/21/07, Juergen Donnerstag [EMAIL PROTECTED] wrote:
This feature has not yet been backported to 1.3 the reason being that
we first need to backport all of the markup fragment/render changes.
That will not happen in 1.3.
   
yes, open a jira issue please.
   
Juergen
   
On 6/21/07, Igor Vaynberg [EMAIL PROTECTED] wrote:
 open a jira issue please

 -igor



 On 6/21/07, Alberto Bueno  [EMAIL PROTECTED] wrote:
  This problem was solved in the 2.0 version, but I don't how we can
  implement a solution in version 1.3...
  Because it's a very tipical situation if you are using borders...
  Waiting responses... :)
 
   Sorry if I'm mistaken, but I think this is related to an issue
 that
   I
 posted
   about here:
  

  
 http://www.nabble.com/Borders-Containing-Embedded-Components-tf3776704.html#a10679274
   previous post .
  
   I'm afraid that post didn't get any response, and I never solved
 it
   on
 my
   own...
  
   Severian.
  
 
 
 

  
 -
  This SF.net email is sponsored by DB2 Express
  Download DB2 Express C - the FREE version of DB2 express and take
  control of your XML. No limits. Just data. Click to get it now.
  http://sourceforge.net/powerbar/db2/
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
 
  
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 



  
 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net

  
 https://lists.sourceforge.net/lists/listinfo/wicket-user


   
   
  
 -
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
   
 https://lists.sourceforge.net/lists/listinfo/wicket-user
   
  
  
  
 -
   This SF.net email is sponsored by DB2 Express
   Download DB2 Express C - the FREE version of DB2 express and take
   control of your XML. No limits. Just data. Click to get it now.
   http://sourceforge.net/powerbar/db2/
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
  
 https://lists.sourceforge.net/lists/listinfo/wicket-user
  
  
 
 
 -
  This SF.net email is sponsored by DB2 Express
  Download DB2 Express C - the FREE version of DB2 express and take
  control of your XML. No limits. Just data. Click to get it now.
  http://sourceforge.net/powerbar/db2/
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 


 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 

Re: [Wicket-user] HibernateAnnotationComponentConfigurator

2007-06-23 Thread Ryan Sonnek

I don't want to sound like a databinder basher, but I want to make this
solution very *non-invasive*.  I don't want to have to implement specific
interfaces or use specific components for this to work.

My solution works with standard wicket components and property models.  No
need to change your whole application just to get UI validation.

On 6/23/07, Ryan Sonnek [EMAIL PROTECTED] wrote:


I've looked at databinder in the past, and although it may be useful, I
think it's a bit heavyweight for what I'm trying to achieve.

In my opinion, database access should be abstracted away from the UI layer
altogether, which leaves the goals of databinder questionable.  Does anyone
remember the horror of the JSP tags that directly connected to datbases??
Spring integration is a much more desirable location for database access,
and there  is already excellent spring integration with wicket.

My goal is simply to integrate hibernate into wicket for relevant UI
features.  Validation is an excellent example where wicket should simply
re-use the same backend validation and display good user feedback instead of
waiting for the hibernate validation fire and throwing a big fat stacktrace.


On 6/23/07, Igor Vaynberg [EMAIL PROTECTED] wrote:

 On 6/23/07, Ryan Sonnek [EMAIL PROTECTED] wrote:
 
  Just sending out a quick release announcement for a new
  Hibernate/Wicket integration in the wicketstuff project.  The
  HibernateAnnotationComponentConfigurator automatically configures a wicket
  component based on the POJO's Hibernate annotations.
 
  one especially cool feature is that you can register this behavior for
  your *entire* application, without worrying about adding this functionality
  to each page/component.
 
  Take a look and let me know what you think!
 
  
http://jroller.com/page/wireframe?entry=hibernateannotationcomponentconfigurator
 


 you should consider teaming up with databinder and working on this
 there.

 -igor



 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Question on Serialization

2007-06-23 Thread Eelco Hillenius
 with the current 1.3 if you hold page references in other pages the
 the main pag is not serialized as a whole. Every page reference we
 come across is saved by itself in its own file. So pages are not saved
 twice or multiply in more then one file. The only thing i dont know
 currenlty is if PageX is the request page, PageY the response with a
 reference to PageX then it is still possible then PageX is saved twice
 (one time as main page and one time as a sub one, but this will result
 in one file for pagex)

You are talking about the optimizatinos in the custom serialization
mechanism, right?

Eelco

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] A trivial problem with tables that i can't manage

2007-06-23 Thread Landry Soules
Hello,

I have a very simple problem:
i just want to display a table of customers, with some infos on each entry.
No problem to achieve that when you deal with one record per line. The 
problem is that i want to display 4 customers on each row, as this :

=
Customer1 || Customer2 || Customer3 || Customer4
firstName   || firstName   || firstName   || firstName
lastName   || lastName   || lastName   || lastName
=
Customer5 || Customer6 || Customer7 || Customer8
firstName   || firstName   || firstName   || firstName
lastName   || lastName   || lastName   || lastName

It sounds so simple, but i can't figure out how to do this. Can someone 
help me, please ?

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Forms with Panels question

2007-06-23 Thread Igor Vaynberg

On 6/23/07, Erik Dreyer [EMAIL PROTECTED] wrote:


Hi,

I'm loving Wicket, but still have a bit to learn.  I didn't find any
answers when searching for an answer to my questions, so here they are.
BTW, I'm using Wicket 1.3 as built from SVN (up to date as of 6/23).

I have a panel that I'd like to include in multiple _different_ forms.
The panel defines some form elements that I'd like to be processed by the
enclosing form.

My use case is basically this:  The panel contains contact info (name,
address, etc).  I'd like to include this panel in both a registration form
and later, in a user profile where the user can edit their contact info.

1) What is the best way to define this Panel?  My constructor currently
looks something like the following.  Is this the correct way of solving
this?  An issue I have with this is that this panel makes some assumptions
about the form's model object.

public ContactInfoPanel(String id, Form form) {
super(id, form.getModel());

BoundCompoundPropertyModel userModel =
(BoundCompoundPropertyModel)form.getModel();
Component firstNameField = userModel.bind(new
RequiredTextField(firstName), path.to.firstName);

add(firstNameField);
}



that works, although i usually like to pass the model in direclty. generics
are just for clarity

class edituserpanel extends panel {
 public edituserpanel(string id, imodeluser usermodel) {
   super(id, new compoundpropertymodel(usermodel));
   add(new textfield(address.street);



the advantage is that the model can come from anywhere - eg it doesnt have
to be the root form model.

2)  Supposing I wanted to add inter-field validation for fields contributed

by this panel, what is the best way to do that?



you can do this in a few different ways.
1) there are form-level validators. see iformvalidator and its
implementations for examples.
2) you can let your panel extend formcomponentpanel and override its
validate() or add an anonymous validator that references child
formcomponents. inside this method you should use
childcomp.getconvertedinput() to retrieve the value that should be
validated.

-igor


Any help would be greatly appreciated.


Thanks,
Erik

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Question on Serialization

2007-06-23 Thread Eelco Hillenius
On 6/23/07, Johan Compagner [EMAIL PROTECTED] wrote:
 no, also normal serialization.
 1 page instance (id/version) is never saved in more then 1 file

Oh. See, I go on vacation for two weeks and I miss the serialization
magic you've put into Page :)

Nice job though!

Eelco

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] setBorderBodyContainer in 1.3

2007-06-23 Thread Igor Vaynberg

On 6/23/07, Juergen Donnerstag [EMAIL PROTECTED] wrote:


please keep the jdonnerstag for wicket. thanks

Juergen



done, looks like it worked. now only one of you shows up when you try to
assign an issue.

-igor



On 6/23/07, Igor Vaynberg [EMAIL PROTECTED] wrote:

 On 6/23/07, Juergen Donnerstag [EMAIL PROTECTED] wrote:
  I asked the infrastructure group already. Unfortunately without
  success. The reason being that both are in use (even if it is some
  very old issue I raised in other project some years ago and which is
  closed already). But I give it another try.

 ok i think i figured out what to do. we cannot delete your account
because
 of fk constraints. but what i can do is remove wicket-developers group
from
 one of them and then it will not be assignable to wicket issues. which
one
 do you want me to remove the group from?

 username: jdonnerstag
 username: juergen.donnerstag [at] eds [dot] com

 -igor

 
  Juergen
 
  On 6/22/07, Igor Vaynberg [EMAIL PROTECTED] wrote:
   juergen, there are two of you in jira, which makes it hard to assign
 issues.
   do you think you can work it out with asf infrastructure group to
remove
 the
   account you no longer use?
  
   -igor
  
  
  
On 6/21/07, Juergen Donnerstag [EMAIL PROTECTED]
wrote:
This feature has not yet been backported to 1.3 the reason being
that
we first need to backport all of the markup fragment/render
changes.
That will not happen in 1.3.
   
yes, open a jira issue please.
   
Juergen
   
On 6/21/07, Igor Vaynberg [EMAIL PROTECTED] wrote:
 open a jira issue please

 -igor



 On 6/21/07, Alberto Bueno  [EMAIL PROTECTED] wrote:
  This problem was solved in the 2.0 version, but I don't how we
can
  implement a solution in version 1.3...
  Because it's a very tipical situation if you are using
borders...
  Waiting responses... :)
 
   Sorry if I'm mistaken, but I think this is related to an
issue
 that
   I
 posted
   about here:
  

  

http://www.nabble.com/Borders-Containing-Embedded-Components-tf3776704.html#a10679274
   previous post .
  
   I'm afraid that post didn't get any response, and I never
solved
 it
   on
 my
   own...
  
   Severian.
  
 
 
 

  

-
  This SF.net email is sponsored by DB2 Express
  Download DB2 Express C - the FREE version of DB2 express and
take
  control of your XML. No limits. Just data. Click to get it
now.
  http://sourceforge.net/powerbar/db2/
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
 
  
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 



  

-
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and
take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net

  
 https://lists.sourceforge.net/lists/listinfo/wicket-user


   
   
  

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
   
 https://lists.sourceforge.net/lists/listinfo/wicket-user
   
  
  
  

-
   This SF.net email is sponsored by DB2 Express
   Download DB2 Express C - the FREE version of DB2 express and take
   control of your XML. No limits. Just data. Click to get it now.
   http://sourceforge.net/powerbar/db2/
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
  
 https://lists.sourceforge.net/lists/listinfo/wicket-user
  
  
 
 

-
  This SF.net email is sponsored by DB2 Express
  Download DB2 Express C - the FREE version of DB2 express and take
  control of your XML. No limits. Just data. Click to get it now.
  http://sourceforge.net/powerbar/db2/
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 



-
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express 

Re: [Wicket-user] A trivial problem with tables that i can't manage

2007-06-23 Thread Igor Vaynberg

On 6/23/07, Landry Soules [EMAIL PROTECTED] wrote:


Hello,

I have a very simple problem:
i just want to display a table of customers, with some infos on each
entry.
No problem to achieve that when you deal with one record per line. The
problem is that i want to display 4 customers on each row, as this :

=
Customer1 || Customer2 || Customer3 || Customer4
firstName   || firstName   || firstName   || firstName
lastName   || lastName   || lastName   || lastName
=
Customer5 || Customer6 || Customer7 || Customer8
firstName   || firstName   || firstName   || firstName
lastName   || lastName   || lastName   || lastName

It sounds so simple, but i can't figure out how to do this. Can someone
help me, please ?



see GridView component. example here [1]

[1]
http://wicketstuff.org/wicket13/repeater/?wicket:bookmarkablePage=%3Aorg.apache.wicket.examples.repeater.GridViewPage

-igor
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] [Fwd: Re: html wicket:id=html CSS]

2007-06-23 Thread Matej Knopp
Err, I believe that you can do add(HeaderContributor.forCss(...)) in
page constructor.

-Matej

On 6/23/07, Juergen Donnerstag [EMAIL PROTECTED] wrote:
 Jan,

 the problem is that though you can attach attribute modifier (that is
 what HeaderContributor is as well) to a Page (or WebPage), it'll not
 work. WebPage doesn't have a tag. Since there is no tag, the attribute
 modifier are not invoked, hence the nothing gets added to the header
 section.

 Solution: you simply must attach HeaderContributor.forCss to any other
 of your components (e.g. html in your code)

 In order to prevent such errors, Wicket should detect (if not prevent)
 that attribute modifiers are added to WebPage. I've no idea right now
 how to make it a compile error, but we certainly can make it a runtime
 exception.

 Juergen

 On 6/22/07, Jan Kriesten [EMAIL PROTECTED] wrote:
 
  copy to the list, as sourceforge doesn't allow zip-attachments atm.
 
 
   Original Message 
  Subject: Re: [Wicket-user] html wicket:id=html  CSS
  Date: Fri, 22 Jun 2007 08:53:23 +0200
  From: Jan Kriesten [EMAIL PROTECTED]
 
 
  Hi Juergen,
 
   I'll try my best to find some spare time to do it. Hopefully over the 
   weekend.
 
  much appreciated, thank you! :-)
 
  I attached a zip-file containing the example.
 
  Best regards, --- Jan.
 
 
 
  -
  This SF.net email is sponsored by DB2 Express
  Download DB2 Express C - the FREE version of DB2 express and take
  control of your XML. No limits. Just data. Click to get it now.
  http://sourceforge.net/powerbar/db2/
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 

 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] cannot add CSS to web page?

2007-06-23 Thread Jonathan Locke

my code which does this:

add(HeaderContributor.forCss(CSS));

now throws the following exception.  my web page needs to contribute CSS to
the header.  i'm wondering, why can't i do it this way anymore (it seems
like WebPage is a component like any other and my code did work fine before
this exception)? and what's the best alternative? thanks!

Caused by: org.apache.wicket.WicketRuntimeException: You can not
attach behaviors onto WebPages. Web pages do require a markup file but no
specific tag to attach the page to. This is why behaviors such as
HeaderContributor for example don't work if attached to a WebPage. Please
attach the behavior to any other of your components.




-- 
View this message in context: 
http://www.nabble.com/cannot-add-CSS-to-web-page--tf3970619.html#a11270671
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] London Wicket Users Group, July 3rd - interested?

2007-06-23 Thread jweekend

Now that we have confirmed the venue (1 Alie Street, near Aldgate tube -
thanks to Matt Dudbridge who is also going to talk about the development of
the zoomf.com site), we know that there are still a few places left for July
3rd, so let us know if you'd like to come along. 
Are people interested in making this a regular event, say the first Tuesday
of the month?
Cemal



Al Maw wrote:
 
 
 Hello everyone,
 
 As Wicket grows in popularity, we bump into increasing numbers of UK 
 users. We think there are enough of you out there to set up a 
 London-based users group, so this e-mail is to gauge interest in that.
 
 We're proposing an initial meet on Tuesday 3rd July in a reasonably 
 central location. Although I'm sure there will be plenty of room for 
 having a pint and a chat, we'd also like to bring some real value to 
 people, so are proposing to kick off with a couple of short talks.
 
 There will probably be an introductory talk and a more advanced one. 
 Topics are yet to be decided - please tell us if you have any ideas on 
 what you'd like covering, or if would like to contribute a short talk, 
 presentation, demo or whatever else.
 
 For example, we could cover:
 
 Beginner - Aimed at new users; basic Models and validation.
 Some sprinklings of AJAX.
 
 Advanced - Implementing custom form validators, invoking them using
 AJAX, using CSS component highlighting for errors, making
 it all automatic for a given Form.
 
 If any of that sounds like your kind of thing, please tell us!
 
 If enough people are interested to make this a goer, we'll organise a 
 venue and sign-up list some time next week. Just hit reply and post a 
 yes please or similar on this thread.
 
 
 Best regards,
 
 Al
 
 -- 
 Alastair Maw
 Wicket-biased blog at http://herebebeasties.com
 
 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 

-- 
View this message in context: 
http://www.nabble.com/London-Wicket-Users-Group%2C-July-3rd---interested--tf3924587.html#a11270862
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] cannot add CSS to web page?

2007-06-23 Thread Igor Vaynberg

On 6/23/07, Jonathan Locke [EMAIL PROTECTED] wrote:



my code which does this:

add(HeaderContributor.forCss(CSS));

now throws the following exception.  my web page needs to contribute CSS
to
the header.  i'm wondering, why can't i do it this way anymore (it seems
like WebPage is a component like any other and my code did work fine
before
this exception)? and what's the best alternative? thanks!

Caused by: org.apache.wicket.WicketRuntimeException: You can not
attach behaviors onto WebPages. Web pages do require a markup file but no
specific tag to attach the page to. This is why behaviors such as
HeaderContributor for example don't work if attached to a WebPage. Please
attach the behavior to any other of your components.



can we make webpage attach to html tag?

-igor
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] [Fwd: Re: html wicket:id=html CSS]

2007-06-23 Thread Jonathan Locke


not anymore.


Matej Knopp-2 wrote:
 
 Err, I believe that you can do add(HeaderContributor.forCss(...)) in
 page constructor.
 
 -Matej
 
 On 6/23/07, Juergen Donnerstag [EMAIL PROTECTED] wrote:
 Jan,

 the problem is that though you can attach attribute modifier (that is
 what HeaderContributor is as well) to a Page (or WebPage), it'll not
 work. WebPage doesn't have a tag. Since there is no tag, the attribute
 modifier are not invoked, hence the nothing gets added to the header
 section.

 Solution: you simply must attach HeaderContributor.forCss to any other
 of your components (e.g. html in your code)

 In order to prevent such errors, Wicket should detect (if not prevent)
 that attribute modifiers are added to WebPage. I've no idea right now
 how to make it a compile error, but we certainly can make it a runtime
 exception.

 Juergen

 On 6/22/07, Jan Kriesten [EMAIL PROTECTED] wrote:
 
  copy to the list, as sourceforge doesn't allow zip-attachments atm.
 
 
   Original Message 
  Subject: Re: [Wicket-user] html wicket:id=html  CSS
  Date: Fri, 22 Jun 2007 08:53:23 +0200
  From: Jan Kriesten [EMAIL PROTECTED]
 
 
  Hi Juergen,
 
   I'll try my best to find some spare time to do it. Hopefully over the
 weekend.
 
  much appreciated, thank you! :-)
 
  I attached a zip-file containing the example.
 
  Best regards, --- Jan.
 
 
 
 
 -
  This SF.net email is sponsored by DB2 Express
  Download DB2 Express C - the FREE version of DB2 express and take
  control of your XML. No limits. Just data. Click to get it now.
  http://sourceforge.net/powerbar/db2/
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 

 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user

 
 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 

-- 
View this message in context: 
http://www.nabble.com/-Fwd%3A-Re%3A--%3Chtml-wicket%3Aid%3D%22html%22%3ECSS--tf3963106.html#a11270955
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Multiple wicket:child tags in the same page

2007-06-23 Thread rc.china


igor.vaynberg wrote:
 
 This solution has some limitations while multiple wicket:child has not:
 1)We have to repeat the common parts of BasePage.html in all of its
 descendants (such as DerivedPage1.html, DerivedPage2.html ...).
   == If we have multiple wicket:child, we have no need to do this.
 2)If we chang the common parts in BasePage.html, we have to do the same
 change in all of its descendants.
   == If we have multiple wicket:child, we just do the change in
 BasePage.html
 
 
 points one and two are not true. you would use wicket's markup inheritance
 so the derived pages do not have to repeat anything from basepage.
 
 
I mean that derived pages's html files have to repeat all the common parts
in BasePage.html and that if we change the common parts in BasePage.html, we
have to do the same change in all of its descendant html files. I know that
we have no need to make any change in its descendant java files.


igor.vaynberg wrote:
 
 3)The descendants have to provide a XXXPanel to encapsulate some
 components
   == If we have multiple wicket:child, we can just put these
 components
 between wichet:child and /wicket:child, such as
   wicket:child
  label wicket:id=labelaaa/label
  input wicket:id=input value=test/
   /wicket:child
 
 
 also not strictly true. it doesnt need to be a panel, it can as easily be
 a
 fragment which means it would be defined inline in the derived page.
 instead
 of wicket:extend you would use wicket:fragment
 
It seems that wicket:fragment is ok:)



igor.vaynberg wrote:
 
 all that said, like i said before there is nothing stopping you from
 implementing what you want. all the api to do so is exposed - it is just
 not
 the default the wicket team prefers.
 
I am just a fan of Wicket. and want to get a thorough understanding of
Wicket:)

-- 
View this message in context: 
http://www.nabble.com/Multiple-wicket%3Achild-tags-in-the-same-page-tf3775143.html#a11271116
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] cannot add CSS to web page?

2007-06-23 Thread Eelco Hillenius
 can we make webpage attach to html tag?

That sounds like a better solution.

Eelco

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Multiple wicket:child tags in the same page

2007-06-23 Thread Igor Vaynberg

On 6/23/07, rc.china [EMAIL PROTECTED] wrote:




igor.vaynberg wrote:

 This solution has some limitations while multiple wicket:child has
not:
 1)We have to repeat the common parts of BasePage.html in all of its
 descendants (such as DerivedPage1.html, DerivedPage2.html ...).
   == If we have multiple wicket:child, we have no need to do this.
 2)If we chang the common parts in BasePage.html, we have to do the same
 change in all of its descendants.
   == If we have multiple wicket:child, we just do the change in
 BasePage.html


 points one and two are not true. you would use wicket's markup
inheritance
 so the derived pages do not have to repeat anything from basepage.


I mean that derived pages's html files have to repeat all the common parts
in BasePage.html and that if we change the common parts in BasePage.html,
we
have to do the same change in all of its descendant html files. I know
that
we have no need to make any change in its descendant java files.



no they do not, all that is taken care off by wicket markup inheritance. for
example:

class basepage extends  webpage {
 abstract componentwithassociatedmarkup newarea1(string id);
 abstract componentwithassociatedmarkup newarea2(string id);
}

basepage.html
html
body
before1 div wicket:id=area1/div before2 div wicket:id=area2/div
wicket:child/
/body
/html

class page1 extends basepage {
  //implementation of newarea1 and 2
}

page1.html
wicket:extend
wicket:fragment for area 1/wicket:fragment
wicket:fragment for area 2/wicket:fragment
/wicket:extend

as you can see in page1.html you do not need to repeat before1 and before2
markup.

-igor

igor.vaynberg wrote:


 3)The descendants have to provide a XXXPanel to encapsulate some
 components
   == If we have multiple wicket:child, we can just put these
 components
 between wichet:child and /wicket:child, such as
   wicket:child
  label wicket:id=labelaaa/label
  input wicket:id=input value=test/
   /wicket:child


 also not strictly true. it doesnt need to be a panel, it can as easily
be
 a
 fragment which means it would be defined inline in the derived page.
 instead
 of wicket:extend you would use wicket:fragment

It seems that wicket:fragment is ok:)



igor.vaynberg wrote:

 all that said, like i said before there is nothing stopping you from
 implementing what you want. all the api to do so is exposed - it is just
 not
 the default the wicket team prefers.

I am just a fan of Wicket. and want to get a thorough understanding of
Wicket:)

--
View this message in context:
http://www.nabble.com/Multiple-wicket%3Achild-tags-in-the-same-page-tf3775143.html#a11271116
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] [Fwd: Re: html wicket:id=html CSS]

2007-06-23 Thread Matej Knopp
Why? Component.renderHead renders the attached behaviors and it's not
overriden for Page, so i does what components do.

HtmlHeaderContainer#renderHeaderSection calls page.renderHead().

So why this shouldn't work?

-Matej

On 6/24/07, Jonathan Locke [EMAIL PROTECTED] wrote:


 not anymore.


 Matej Knopp-2 wrote:
 
  Err, I believe that you can do add(HeaderContributor.forCss(...)) in
  page constructor.
 
  -Matej
 
  On 6/23/07, Juergen Donnerstag [EMAIL PROTECTED] wrote:
  Jan,
 
  the problem is that though you can attach attribute modifier (that is
  what HeaderContributor is as well) to a Page (or WebPage), it'll not
  work. WebPage doesn't have a tag. Since there is no tag, the attribute
  modifier are not invoked, hence the nothing gets added to the header
  section.
 
  Solution: you simply must attach HeaderContributor.forCss to any other
  of your components (e.g. html in your code)
 
  In order to prevent such errors, Wicket should detect (if not prevent)
  that attribute modifiers are added to WebPage. I've no idea right now
  how to make it a compile error, but we certainly can make it a runtime
  exception.
 
  Juergen
 
  On 6/22/07, Jan Kriesten [EMAIL PROTECTED] wrote:
  
   copy to the list, as sourceforge doesn't allow zip-attachments atm.
  
  
    Original Message 
   Subject: Re: [Wicket-user] html wicket:id=html  CSS
   Date: Fri, 22 Jun 2007 08:53:23 +0200
   From: Jan Kriesten [EMAIL PROTECTED]
  
  
   Hi Juergen,
  
I'll try my best to find some spare time to do it. Hopefully over the
  weekend.
  
   much appreciated, thank you! :-)
  
   I attached a zip-file containing the example.
  
   Best regards, --- Jan.
  
  
  
  
  -
   This SF.net email is sponsored by DB2 Express
   Download DB2 Express C - the FREE version of DB2 express and take
   control of your XML. No limits. Just data. Click to get it now.
   http://sourceforge.net/powerbar/db2/
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
   https://lists.sourceforge.net/lists/listinfo/wicket-user
  
 
  -
  This SF.net email is sponsored by DB2 Express
  Download DB2 Express C - the FREE version of DB2 express and take
  control of your XML. No limits. Just data. Click to get it now.
  http://sourceforge.net/powerbar/db2/
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
  -
  This SF.net email is sponsored by DB2 Express
  Download DB2 Express C - the FREE version of DB2 express and take
  control of your XML. No limits. Just data. Click to get it now.
  http://sourceforge.net/powerbar/db2/
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 

 --
 View this message in context: 
 http://www.nabble.com/-Fwd%3A-Re%3A--%3Chtml-wicket%3Aid%3D%22html%22%3ECSS--tf3963106.html#a11270955
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] [Fwd: Re: html wicket:id=html CSS]

2007-06-23 Thread Matej Knopp
Modifying the tag (onComponentTag) and rendering header contribution
(renderHead) are two different thing. While onComponentTag on a
behavior attached to page won't work (for reasons as you stated),
there is no reason why renderHead shouldn't work as well.

-Matej

On 6/23/07, Juergen Donnerstag [EMAIL PROTECTED] wrote:
 Jan,

 the problem is that though you can attach attribute modifier (that is
 what HeaderContributor is as well) to a Page (or WebPage), it'll not
 work. WebPage doesn't have a tag. Since there is no tag, the attribute
 modifier are not invoked, hence the nothing gets added to the header
 section.

 Solution: you simply must attach HeaderContributor.forCss to any other
 of your components (e.g. html in your code)

 In order to prevent such errors, Wicket should detect (if not prevent)
 that attribute modifiers are added to WebPage. I've no idea right now
 how to make it a compile error, but we certainly can make it a runtime
 exception.

 Juergen

 On 6/22/07, Jan Kriesten [EMAIL PROTECTED] wrote:
 
  copy to the list, as sourceforge doesn't allow zip-attachments atm.
 
 
   Original Message 
  Subject: Re: [Wicket-user] html wicket:id=html  CSS
  Date: Fri, 22 Jun 2007 08:53:23 +0200
  From: Jan Kriesten [EMAIL PROTECTED]
 
 
  Hi Juergen,
 
   I'll try my best to find some spare time to do it. Hopefully over the 
   weekend.
 
  much appreciated, thank you! :-)
 
  I attached a zip-file containing the example.
 
  Best regards, --- Jan.
 
 
 
  -
  This SF.net email is sponsored by DB2 Express
  Download DB2 Express C - the FREE version of DB2 express and take
  control of your XML. No limits. Just data. Click to get it now.
  http://sourceforge.net/powerbar/db2/
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 

 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] cannot add CSS to web page?

2007-06-23 Thread Matej Knopp
Arrgh. Discard my previous reply. This is wrong. Why shouldn't I be
able to do header contribution on behavior attached to a page? This
doesn't make sense!

I know onComponentTag doesn't make sense, but that's IMHO not valid
reason to forbid header contribution as well.

-Matej


On 6/24/07, Jonathan Locke [EMAIL PROTECTED] wrote:

 my code which does this:

 add(HeaderContributor.forCss(CSS));

 now throws the following exception.  my web page needs to contribute CSS to
 the header.  i'm wondering, why can't i do it this way anymore (it seems
 like WebPage is a component like any other and my code did work fine before
 this exception)? and what's the best alternative? thanks!

 Caused by: org.apache.wicket.WicketRuntimeException: You can not
 attach behaviors onto WebPages. Web pages do require a markup file but no
 specific tag to attach the page to. This is why behaviors such as
 HeaderContributor for example don't work if attached to a WebPage. Please
 attach the behavior to any other of your components.




 --
 View this message in context: 
 http://www.nabble.com/cannot-add-CSS-to-web-page--tf3970619.html#a11270671
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] [Fwd: Re: html wicket:id=html CSS]

2007-06-23 Thread Igor Vaynberg

On 6/23/07, Matej Knopp [EMAIL PROTECTED] wrote:


Modifying the tag (onComponentTag) and rendering header contribution
(renderHead) are two different thing. While onComponentTag on a
behavior attached to page won't work (for reasons as you stated),
there is no reason why renderHead shouldn't work as well.

-Matej



attach the page to html tag and the entire ibehavior should make sense i
think.

-igor




On 6/23/07, Juergen Donnerstag [EMAIL PROTECTED] wrote:

 Jan,

 the problem is that though you can attach attribute modifier (that is
 what HeaderContributor is as well) to a Page (or WebPage), it'll not
 work. WebPage doesn't have a tag. Since there is no tag, the attribute
 modifier are not invoked, hence the nothing gets added to the header
 section.

 Solution: you simply must attach HeaderContributor.forCss to any other
 of your components (e.g. html in your code)

 In order to prevent such errors, Wicket should detect (if not prevent)
 that attribute modifiers are added to WebPage. I've no idea right now
 how to make it a compile error, but we certainly can make it a runtime
 exception.

 Juergen

 On 6/22/07, Jan Kriesten [EMAIL PROTECTED] wrote:
 
  copy to the list, as sourceforge doesn't allow zip-attachments atm.
 
 
   Original Message 
  Subject: Re: [Wicket-user] html wicket:id=html  CSS
  Date: Fri, 22 Jun 2007 08:53:23 +0200
  From: Jan Kriesten [EMAIL PROTECTED]
 
 
  Hi Juergen,
 
   I'll try my best to find some spare time to do it. Hopefully over
the weekend.
 
  much appreciated, thank you! :-)
 
  I attached a zip-file containing the example.
 
  Best regards, --- Jan.
 
 
 
 
-
  This SF.net email is sponsored by DB2 Express
  Download DB2 Express C - the FREE version of DB2 express and take
  control of your XML. No limits. Just data. Click to get it now.
  http://sourceforge.net/powerbar/db2/
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 


-
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Question on Serialization

2007-06-23 Thread Matej Knopp
Two weeks? No, we started doing that on apache con :)

-Matej

On 6/23/07, Eelco Hillenius [EMAIL PROTECTED] wrote:
 On 6/23/07, Johan Compagner [EMAIL PROTECTED] wrote:
  no, also normal serialization.
  1 page instance (id/version) is never saved in more then 1 file

 Oh. See, I go on vacation for two weeks and I miss the serialization
 magic you've put into Page :)

 Nice job though!

 Eelco

 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] [Fwd: Re: html wicket:id=html CSS]

2007-06-23 Thread Matej Knopp
I also think this would be a good solution.

-Matej

On 6/24/07, Igor Vaynberg [EMAIL PROTECTED] wrote:
 On 6/23/07, Matej Knopp [EMAIL PROTECTED] wrote:
  Modifying the tag (onComponentTag) and rendering header contribution
  (renderHead) are two different thing. While onComponentTag on a
  behavior attached to page won't work (for reasons as you stated),
  there is no reason why renderHead shouldn't work as well.
 
  -Matej

 attach the page to html tag and the entire ibehavior should make sense i
 think.

 -igor



 
  On 6/23/07, Juergen Donnerstag [EMAIL PROTECTED] wrote:
   Jan,
  
   the problem is that though you can attach attribute modifier (that is
   what HeaderContributor is as well) to a Page (or WebPage), it'll not
   work. WebPage doesn't have a tag. Since there is no tag, the attribute
   modifier are not invoked, hence the nothing gets added to the header
   section.
  
   Solution: you simply must attach HeaderContributor.forCss to any other
   of your components (e.g. html in your code)
  
   In order to prevent such errors, Wicket should detect (if not prevent)
   that attribute modifiers are added to WebPage. I've no idea right now
   how to make it a compile error, but we certainly can make it a runtime
   exception.
  
   Juergen
  
   On 6/22/07, Jan Kriesten  [EMAIL PROTECTED] wrote:
   
copy to the list, as sourceforge doesn't allow zip-attachments atm.
   
   
 Original Message 
Subject: Re: [Wicket-user] html wicket:id=html  CSS
Date: Fri, 22 Jun 2007 08:53:23 +0200
From: Jan Kriesten  [EMAIL PROTECTED]
   
   
Hi Juergen,
   
 I'll try my best to find some spare time to do it. Hopefully over
 the weekend.
   
much appreciated, thank you! :-)
   
I attached a zip-file containing the example.
   
Best regards, --- Jan.
   
   
   
   
 -
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
   
 https://lists.sourceforge.net/lists/listinfo/wicket-user
   
  
  
 -
   This SF.net email is sponsored by DB2 Express
   Download DB2 Express C - the FREE version of DB2 express and take
   control of your XML. No limits. Just data. Click to get it now.
   http://sourceforge.net/powerbar/db2/
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
  
 https://lists.sourceforge.net/lists/listinfo/wicket-user
  
 
 
 -
  This SF.net email is sponsored by DB2 Express
  Download DB2 Express C - the FREE version of DB2 express and take
  control of your XML. No limits. Just data. Click to get it now.
  http://sourceforge.net/powerbar/db2/
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 


 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] How to get HTML source code from a wicket page

2007-06-23 Thread John Krasnay
Thanks for the tip, but could you give us a little more of a clue? For
example, from where should we get the RequestCycle? Using
RequestCycle.get() doesn't sound right, since that's for the response
we're sending to the browser, not for the HTML we want to render into
the email.

I looked into the WicketTester, as suggested by a previous response. It
creates a WebRequestCycle, but it needs quite a bit of plumbing like
a mock session, request, response, application, etc. Is this what we
really have to do, in addition to using the StringRequestTarget?

jk

On Sat, Jun 23, 2007 at 04:30:23PM +0200, Jean-Baptiste Quenot wrote:
 * Srinu Sunkara:
 
  Hi - I am trying to get the  HTML source code of a web page with
  in the program  (so that I can send this  in an email). Can some
  one tell me how can I get the HTML source.
 
 Sure.  Processing a Wicket page and sending the result to a buffer
 can be achieved through  StringRequestTarget, thus allowing you to
 use the buffer contents for sending email.
 
 See RequestCycle.setRequestTarget() 
 
 You can find the full answer on this thread:
 http://www.nabble.com/Sending-Emails-Via-Wicket--t3639601.html
 
 Hope this helps,
 -- 
  Jean-Baptiste Quenot
 aka  John Banana   Qwerty
 http://caraldi.com/jbq/
 
 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Suscribe

2007-06-23 Thread Fabricio Tuosto

--
Saludos.
Fabricio Tuosto
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] How to get HTML source code from a wicket page

2007-06-23 Thread Igor Vaynberg

On 6/23/07, John Krasnay [EMAIL PROTECTED] wrote:


Thanks for the tip, but could you give us a little more of a clue? For
example, from where should we get the RequestCycle? Using
RequestCycle.get() doesn't sound right, since that's for the response
we're sending to the browser, not for the HTML we want to render into
the email.

I looked into the WicketTester, as suggested by a previous response. It
creates a WebRequestCycle, but it needs quite a bit of plumbing like
a mock session, request, response, application, etc. Is this what we
really have to do, in addition to using the StringRequestTarget?



see our tests. all the mock setup is done for you. our tests simply call a
few methods and get a page rendered into a string that is then compared to
another file.

-igor



jk


On Sat, Jun 23, 2007 at 04:30:23PM +0200, Jean-Baptiste Quenot wrote:
 * Srinu Sunkara:

  Hi - I am trying to get the  HTML source code of a web page with
  in the program  (so that I can send this  in an email). Can some
  one tell me how can I get the HTML source.

 Sure.  Processing a Wicket page and sending the result to a buffer
 can be achieved through  StringRequestTarget, thus allowing you to
 use the buffer contents for sending email.

 See RequestCycle.setRequestTarget()

 You can find the full answer on this thread:
 http://www.nabble.com/Sending-Emails-Via-Wicket--t3639601.html

 Hope this helps,
 --
  Jean-Baptiste Quenot
 aka  John Banana   Qwerty
 http://caraldi.com/jbq/


-
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Question on Serialization

2007-06-23 Thread Iman Rahmatizadeh

On 6/23/07, Johan Compagner [EMAIL PROTECTED] wrote:


with the current 1.3 if you hold page references in other pages the
the main pag is not serialized as a whole. Every page reference we
come across is saved by itself in its own file. So pages are not saved
twice or multiply in more then one file. The only thing i dont know
currenlty is if PageX is the request page, PageY the response with a
reference to PageX then it is still possible then PageX is saved twice
(one time as main page and one time as a sub one, but this will result
in one file for pagex)



How about 1.2.x ? Does it handle page references intelligently ?
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Updating link attributes from HeaderContributor

2007-06-23 Thread Tauren Mills
I am creating an application that utilizes alternate stylesheets.  A
javascript library also needs each stylesheet to have a title.  The
output format should be something like this:

link rel=alternate stylesheet type=text/css href=large.css
title=large /

Using HeaderContributor, I can get this output:

link href=/db/app/resources/mypackage.MyPanel/large.css
type=text/css rel=stylesheet

Note that I need to add alternate to the rel attribute and add a
title attribute to the HeaderContributor output.

I was hoping to alter this link tag using an AttributeModifier, but
there doesn't seem to be a way to do this since HeaderContributor is
not a Component.

Here is code:

private static final CompressedResourceReference CSS_LARGE =
new CompressedResourceReference(MyPanel.class, large.css);

public MyPanel(String id) {
super(id);
HeaderContributor large = HeaderContributor.forCss(SS_CSS_LARGE);
}

I thought I could create my own version of
HeaderContributor.CSSReferenceHeaderContributor, but I can't override
forCss(ResourceReference) because it is final.

Is there some other way to alter a tag?  Otherwise, how would I accomplish this?

Thanks,
Tauren

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user