Re: Anemic domain model and are @SpringBean's compatible with the solution in "Spring 2.0 vs. the Anemic Domain Model"?

2009-05-29 Thread Kent Larsson
> I try not to design my domain models in such a way

Could you elaborate on this a bit, please?

On Fri, May 29, 2009 at 6:19 AM, James Carman
 wrote:
> On Thu, May 28, 2009 at 11:36 AM, Igor Vaynberg  
> wrote:
>> this is why i built salve.googlecode.com
>>
>> you can easily hook it into spring and have all your objects (doman
>> objects or wicket components) injected via @Dependency without
>> worrying about serialization issues or eager injection - eg if you
>> load a result set of 1000 hibernate entities that need injection you
>> dont want all those injected for no reason.
>
> I try not to design my domain models in such a way, but sometimes it
> just fits if you want to be "domain-driven" and salve definitely is a
> good alternative to the @Configurable/@Autowire support in Spring.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

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



Re: wicket logo

2009-05-29 Thread Martijn Dashorst
On Wed, May 27, 2009 at 8:09 AM, Luther Baker  wrote:
> Is there an official Wicket website badge?

Nope.

> Any problems with dropping the orange Wicket logo into a "Power By Wicket"
> slogan at the bottom of a site?

Unfortunately, yes. This is something the Apache PRC committee is
being very anal about: using Apache trademarks.

Send your design to p...@apache.org and ask for permission to use the
badge. If you're very good at design, you might want to consider
donating the badge under a CLA to our project, and then we'll include
it with our site, and ensure the PRC approves the badge.

Martijn

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



Re: Problem with dynamic insertion to Tree

2009-05-29 Thread Bucyrus



PSkarthic wrote:
> 
> Thanks for your reply
> i have been waiting for long time
> 
> 
> target.addComponent(this); also does not solved my problem.
> 
> if i click a node the child is created under the node but doesn't expanded
> but when i click it second time then it expands but with two child.
> 

For me 

@Override
protected void onNodeLinkClicked ( AjaxRequestTarget pTarget, TreeNode
pNode) {
[...]
myNavigationTree.getTreeState().expandNode ( pNode); 
[...]
}

solved that problem. Where pNode is the (sub-tree-) root node under which
new nodes have been added dynamically.
-- 
View this message in context: 
http://www.nabble.com/Problem-with-dynamic-insertion-to-Tree-tp21474815p23776501.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



How to find out that component is being updated by AjaxFormComponentUpdatingBehavior?

2009-05-29 Thread Sergej Logish
Hello community!

I have created component, which supports code input by which it then finds
corresponding value in DB and shows it's name (clasifier).
If user clears code and leaves input component,
AjaxFormComponentUpdatingBehavior takes it's turn and removes previously
fetched
label (if any).
The problem is, that removing current value is a *valid* operation even if
component itself is marked as *required*. So, in order to correctly
process component update I need to know, if this AJAX request is this single
component update or entire form submit (which also could
be AJAX request).
I just didn't find any good solution yet. Currently I just always return *true
*from overriden* checkRequired()* method in case of AJAX request.
But if entire form, were component resides, will be submitted via AJAX,
"required" validation will be just bypassed... That's not good.

Thanks in advance for any advices!


Data getting lost upon form submission

2009-05-29 Thread Linda van der Pal
I am once again making some error in my thinking. I'm trying to edit a 
user in a form, but for some reason not all the values are passed on 
upon submitting. Can anybody have a look and point me in the right 
direction?


When I save the data I can see the name and the password, but not the 
roles. I have debugged it and I see that it actually puts the roles in 
an instance of User, but when I get to the code that actually saves it 
all, the roles are empty again. (So they have been put in a different 
instance, but why and how?)


Here's the form:
   // The form
   Form form = new Form("userdetailform");
   add(form);

   // The name-field
   form.add(new TextField("name").setRequired(true));

   // The roles-field
   CheckGroup rolesGroup = new CheckGroup("roles");
   CheckBox ownerRole = new CheckBox("owner");
  
   rolesGroup.add(ownerRole);
  
   form.add(rolesGroup);


And here's the User class (name is a variable in DomainObject):
public class User extends DomainObject {
   private String password;
   private List roles;
  
   public User(final Integer id) {

   super(id);
   roles = new ArrayList();
   }

   public void setPassword(final String password) {
   this.password = password;
   }
   public String getPassword() {
   return password;
   }

   public void setRoles(final List roles) {
   this.roles = roles;
   }
   public List getRoles() {
   return roles;
   }
  
   public void addRole(final Role role) {

   this.roles.add(role);
   }
  
   private boolean hasRole(final RoleName roleName) {

   for (Role role: roles) {
   if (role.getName().equals(roleName)) {
   return true;
   }
   }
   return false;
   }
  
   public boolean isOwner() {

   return hasRole(RoleName.OWNER);
   }
  
   private void setRole(final RoleName roleName, final Integer 
friendId, final boolean addRole) {

   Role role = new Role(roleName, friendId);
   if (addRole) {
   addRole(role);
   } else {
   this.roles.remove(role);
   }
   }
  
   public void setOwner(final boolean addRole) {

   setRole(RoleName.OWNER, null, addRole);
   }
}

Regards,
Linda

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



Re: Data getting lost upon form submission

2009-05-29 Thread Linda van der Pal

Forgot to copy this line (which came just before the start of the form):

setDefaultModel(new CompoundPropertyModel(user));

Linda van der Pal wrote:
I am once again making some error in my thinking. I'm trying to edit a 
user in a form, but for some reason not all the values are passed on 
upon submitting. Can anybody have a look and point me in the right 
direction?


When I save the data I can see the name and the password, but not the 
roles. I have debugged it and I see that it actually puts the roles in 
an instance of User, but when I get to the code that actually saves it 
all, the roles are empty again. (So they have been put in a different 
instance, but why and how?)


Here's the form:
   // The form
   Form form = new Form("userdetailform");
   add(form);

   // The name-field
   form.add(new TextField("name").setRequired(true));

   // The roles-field
   CheckGroup rolesGroup = new CheckGroup("roles");
   CheckBox ownerRole = new CheckBox("owner");
 rolesGroup.add(ownerRole);
 form.add(rolesGroup);

And here's the User class (name is a variable in DomainObject):
public class User extends DomainObject {
   private String password;
   private List roles;
 public User(final Integer id) {
   super(id);
   roles = new ArrayList();
   }

   public void setPassword(final String password) {
   this.password = password;
   }
   public String getPassword() {
   return password;
   }

   public void setRoles(final List roles) {
   this.roles = roles;
   }
   public List getRoles() {
   return roles;
   }
 public void addRole(final Role role) {
   this.roles.add(role);
   }
 private boolean hasRole(final RoleName roleName) {
   for (Role role: roles) {
   if (role.getName().equals(roleName)) {
   return true;
   }
   }
   return false;
   }
 public boolean isOwner() {
   return hasRole(RoleName.OWNER);
   }
 private void setRole(final RoleName roleName, final Integer 
friendId, final boolean addRole) {

   Role role = new Role(roleName, friendId);
   if (addRole) {
   addRole(role);
   } else {
   this.roles.remove(role);
   }
   }
 public void setOwner(final boolean addRole) {
   setRole(RoleName.OWNER, null, addRole);
   }
}

Regards,
Linda

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



No virus found in this incoming message.
Checked by AVG - www.avg.com 
Version: 8.5.339 / Virus Database: 270.12.44/2140 - Release Date: 05/28/09 18:09:00


  



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



AjaxLazyLoadPanel fallback version?

2009-05-29 Thread yong mook kim

Hi,

  When browser's Javascript is disabled, AjaxLazyLoadPanel's image (wicket ajax 
deafult image) will keep loading forever, page will not return. Is there a 
AjaxLazyLoadPanel fallback version which will delegate to normal request if 
javascript is disabled?

I wonder how Wicket detect the browser's javascript is disabled?  Thanks

regards
yong


  

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



Re: Anemic domain model and are @SpringBean's compatible with the solution in "Spring 2.0 vs. the Anemic Domain Model"?

2009-05-29 Thread James Carman
On Fri, May 29, 2009 at 4:04 AM, Kent Larsson  wrote:
>> I try not to design my domain models in such a way
>
> Could you elaborate on this a bit, please?

I kind of "cheat" a bit.  When there needs to be something done that
involves multiple domain entities, I usually push that logic into a
"service" class rather than into the entities themselves.  For
operations solely involving an entity and its aggregated entities, I
usually put that into the entity class itself.

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



Re: RequestLogger and session invalidation

2009-05-29 Thread Taneli Korri
On Thu, May 28, 2009 at 11:24 AM, Johan Compagner wrote:

> why are you using invalidateNow?
>

I was using it for invalidating sessions on logout. But since plain
invalidate() works, and doesn't break RequestLogger, my original problem is
fixed.


Regards,

Taneli Korri


Re: singletons, pools, wicket, web services and architecture

2009-05-29 Thread James Carman
On Thu, May 28, 2009 at 4:01 PM, Christopher L Merrill
 wrote:
> I've got a few questions that are somewhat general to web development,
> but since we've chosen Wicket as one of our front-end frameworks, I
> thought I would ask here first for pointers...especially where there
> may be a "wicket way" of doing things that we need to be aware of.
>
> The system we're developing will have 2 UIs - a browser-based UI
> developed in Wicket and an Eclipse-based rich-client app (Java).  The
> available functionality will be a little different in each but with a
> good bit of overlap.  There must be common authentication - a user
> might use either UI or both at any given time.  We'll likely be using
> JAX-WS for communicating between the rich client and server. The server
> will be Tomcat.

Why use JAX-WS if you don't have to?  We use Spring remoting (with
Spring security for common authentication/authorization) in our
application and everything works just fine.

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



Re: Anemic domain model and are @SpringBean's compatible with the solution in "Spring 2.0 vs. the Anemic Domain Model"?

2009-05-29 Thread Kent Larsson
Ah, interesting. Thanks for elaborating!

On Fri, May 29, 2009 at 12:31 PM, James Carman
 wrote:
> On Fri, May 29, 2009 at 4:04 AM, Kent Larsson  wrote:
>>> I try not to design my domain models in such a way
>>
>> Could you elaborate on this a bit, please?
>
> I kind of "cheat" a bit.  When there needs to be something done that
> involves multiple domain entities, I usually push that logic into a
> "service" class rather than into the entities themselves.  For
> operations solely involving an entity and its aggregated entities, I
> usually put that into the entity class itself.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

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



Re: AjaxLazyLoadPanel fallback version?

2009-05-29 Thread Martijn Dashorst
It's called Panel. Either your users have to have javascript enabled
and you can use LazyLoadPanel, or you have to use direct Panel's.

There is no way to lazy load anything without having to resort to
JavaScript. Think about it. How could you instruct the browser to
retrieve and replace a part of your page after a given time?

The only thing that comes to mind is using iframes.

Martijn

On Fri, May 29, 2009 at 12:09 PM, yong mook kim  wrote:
>
> Hi,
>
>  When browser's Javascript is disabled, AjaxLazyLoadPanel's image (wicket 
> ajax deafult image) will keep loading forever, page will not return. Is there 
> a AjaxLazyLoadPanel fallback version which will delegate to normal request if 
> javascript is disabled?
>
> I wonder how Wicket detect the browser's javascript is disabled?  Thanks
>
> regards
> yong
>
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>



-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.3.5 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

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



Re: AjaxLazyLoadPanel fallback version?

2009-05-29 Thread yong mook kim

hi,

   Thanks, i agree with your point. However what i want is a browser's 
javascript detect function, if isJavascriptEnable() then load the LazyLoadPanel 
else fall back to normal panel behaviour.

something like below

Page start

if(isJavascriptEnable()){
   add(new AjaxLazyLoadPanel('123')...
}else{
   add(new ABCPanel('123')
}

Page end

I wonder how Wicket AjaxFallBackButton work?

  



--- On Fri, 5/29/09, Martijn Dashorst  wrote:

> From: Martijn Dashorst 
> Subject: Re: AjaxLazyLoadPanel fallback version?
> To: users@wicket.apache.org
> Date: Friday, May 29, 2009, 7:26 AM
> It's called Panel. Either your users
> have to have javascript enabled
> and you can use LazyLoadPanel, or you have to use direct
> Panel's.
> 
> There is no way to lazy load anything without having to
> resort to
> JavaScript. Think about it. How could you instruct the
> browser to
> retrieve and replace a part of your page after a given
> time?
> 
> The only thing that comes to mind is using iframes.
> 
> Martijn
> 
> On Fri, May 29, 2009 at 12:09 PM, yong mook kim 
> wrote:
> >
> > Hi,
> >
> >  When browser's Javascript is disabled,
> AjaxLazyLoadPanel's image (wicket ajax deafult image) will
> keep loading forever, page will not return. Is there a
> AjaxLazyLoadPanel fallback version which will delegate to
> normal request if javascript is disabled?
> >
> > I wonder how Wicket detect the browser's javascript is
> disabled?  Thanks
> >
> > regards
> > yong
> >
> >
> >
> >
> >
> -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
> 
> 
> 
> -- 
> Become a Wicket expert, learn from the best: http://wicketinaction.com
> Apache Wicket 1.3.5 is released
> Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 
> 




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



Re: Anemic domain model and are @SpringBean's compatible with the solution in

2009-05-29 Thread Daniel Toffetti
James Carman  carmanconsulting.com> writes:
> 
> On Fri, May 29, 2009 at 4:04 AM, Kent Larsson  gmail.com>
> wrote:
> >> I try not to design my domain models in such a way
> >
> > Could you elaborate on this a bit, please?
> 
> I kind of "cheat" a bit.  When there needs to be something done that
> involves multiple domain entities, I usually push that logic into a
> "service" class rather than into the entities themselves.  For
> operations solely involving an entity and its aggregated entities, I
> usually put that into the entity class itself.
> 

Out of curiosity, does the practice of building medium to
complex queries and mixed batches of updates and deletes within
stores procedures, for optimum DB performance, has been completely
deprecated ???

Cheers,

Daniel




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



wicket and jquery

2009-05-29 Thread Dorothée Giernoth
Hello everyone,

i know this might sound a little weird and naive and maybe stupid ... I dunno, 
I'll ask anyway (though I did research myself, but I would need some sort of 
useful hint for a total wicket-jquery-newbie): how can I use wicket and jquery 
together? Where can I find an example?

And yes I did ask google, but seriously - no harm meant - it seems soo NOT 
organized ... there are like a billion dead links ... maybe even more and I am 
on the edge and desperate ... s please, bear with me!

Thnx,
dg


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



Re: Anemic domain model and are @SpringBean's compatible with the solution in

2009-05-29 Thread James Carman
On Fri, May 29, 2009 at 11:03 AM, Daniel Toffetti  wrote:
>    Out of curiosity, does the practice of building medium to
> complex queries and mixed batches of updates and deletes within
> stores procedures, for optimum DB performance, has been completely
> deprecated ???

I personally hate putting stuff in the database, because it just leads
to troubles, based on my experience.  It's harder to unit test your
code if too much stuff is in the database.  I like to use in-memory
(HSQLDB) databases during unit tests and you can't rely on those
stored procedures being around during your unit test.  Also, in some
organizations, DBAs maintain very tight control over things like
stored procedures in their databases.  It can become a bottleneck.

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



Re: wicket logo

2009-05-29 Thread Cristi Manole
Hello Martijn,

I think he meant using the (official) Apache Wicket badge on a page (site)
of his own. Promoting that his site is using the fabulous Wicket framework.
And not redesigning the wicket logo itself.

Maybe I'm wrong. But iterating on the question - can I use an official
Wicked badge somewhere on my site, saying something like Powered by <> ? If so, where can I find more badges (size, etc) ?

Thanks,
Cristi Manole

On Fri, May 29, 2009 at 5:36 AM, Martijn Dashorst <
martijn.dasho...@gmail.com> wrote:

> On Wed, May 27, 2009 at 8:09 AM, Luther Baker 
> wrote:
> > Is there an official Wicket website badge?
>
> Nope.
>
> > Any problems with dropping the orange Wicket logo into a "Power By
> Wicket"
> > slogan at the bottom of a site?
>
> Unfortunately, yes. This is something the Apache PRC committee is
> being very anal about: using Apache trademarks.
>
> Send your design to p...@apache.org and ask for permission to use the
> badge. If you're very good at design, you might want to consider
> donating the badge under a CLA to our project, and then we'll include
> it with our site, and ensure the PRC approves the badge.
>
> Martijn
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Cristi Manole

Nova Creator Software
www.novacreator.com


Re: wicket and jquery

2009-05-29 Thread Dipu
take a look at this
https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-core/jquery-parent

-dipu

2009/5/29 Dorothée Giernoth :
> Hello everyone,
>
> i know this might sound a little weird and naive and maybe stupid ... I 
> dunno, I'll ask anyway (though I did research myself, but I would need some 
> sort of useful hint for a total wicket-jquery-newbie): how can I use wicket 
> and jquery together? Where can I find an example?
>
> And yes I did ask google, but seriously - no harm meant - it seems soo 
> NOT organized ... there are like a billion dead links ... maybe even more and 
> I am on the edge and desperate ... s please, bear with me!
>
> Thnx,
> dg
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

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



Re: wicket and jquery

2009-05-29 Thread Rodolfo Hansen
Also you can checkout

http://code.google.com/p/wiquery/

which has a couple of ideas...

On Fri, May 29, 2009 at 11:15 AM, Dipu  wrote:

> take a look at this
>
> https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-core/jquery-parent
>
> -dipu
>
> 2009/5/29 Dorothée Giernoth :
> > Hello everyone,
> >
> > i know this might sound a little weird and naive and maybe stupid ... I
> dunno, I'll ask anyway (though I did research myself, but I would need some
> sort of useful hint for a total wicket-jquery-newbie): how can I use wicket
> and jquery together? Where can I find an example?
> >
> > And yes I did ask google, but seriously - no harm meant - it seems
> soo NOT organized ... there are like a billion dead links ... maybe even
> more and I am on the edge and desperate ... s please, bear with me!
> >
> > Thnx,
> > dg
> >
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Rodolfo Hansen
CEO, KindleIT Software Development
Email: rhan...@kindleit.net
Office: 1 (809) 732-5200
Mobile: 1 (809) 299-7332


Re: wicket and jquery

2009-05-29 Thread Cristi Manole
Hi,

There's no magic here. it's just a (decent) javascript library that you can
use. Usually what people are doing (or at least how I use it) here is build
the web application the normal way - html / css / javascript (consider this
the designer role) and then "wickify" it - meaning go through the initial
design and put wicket:id's to elements I want to connect to my java logic.
And do whatever my business rules are. Or go one step further and build
stand-alone component for reuse on other projects.

The point is I don't actually care if the designer uses jquery or extjs or
anything else. He's not forced on using any javascript at all. Perfectly
clean separation.

I guess you're looking on using a nice "widget" that somebody built using
jquery. The integration with wicket is as simple as I said above. No magic.

For a very (_very_) dumb example, take a look for instance here (to get an
idea) :
http://www.dooriented.com/blog/2009/05/11/wicket-component-jquery-accordion-menu/

Hope I was able to help you a little bit,
Cristi Manole

2009/5/29 Dorothée Giernoth 

> Hello everyone,
>
> i know this might sound a little weird and naive and maybe stupid ... I
> dunno, I'll ask anyway (though I did research myself, but I would need some
> sort of useful hint for a total wicket-jquery-newbie): how can I use wicket
> and jquery together? Where can I find an example?
>
> And yes I did ask google, but seriously - no harm meant - it seems soo
> NOT organized ... there are like a billion dead links ... maybe even more
> and I am on the edge and desperate ... s please, bear with me!
>
> Thnx,
> dg
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Cristi Manole

Nova Creator Software
www.novacreator.com


AW: wicket and jquery

2009-05-29 Thread Dorothée Giernoth
Thnx guys, I will check that out. This might mean, that not all hope is lost!
Have a great weekend!


-Ursprüngliche Nachricht-
Von: Rodolfo Hansen [mailto:kry...@gmail.com] 
Gesendet: Freitag, 29. Mai 2009 17:21
An: users@wicket.apache.org
Betreff: Re: wicket and jquery

Also you can checkout

http://code.google.com/p/wiquery/

which has a couple of ideas...

On Fri, May 29, 2009 at 11:15 AM, Dipu  wrote:

> take a look at this
>
> https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-core/jquery-parent
>
> -dipu
>
> 2009/5/29 Dorothée Giernoth :
> > Hello everyone,
> >
> > i know this might sound a little weird and naive and maybe stupid ... I
> dunno, I'll ask anyway (though I did research myself, but I would need some
> sort of useful hint for a total wicket-jquery-newbie): how can I use wicket
> and jquery together? Where can I find an example?
> >
> > And yes I did ask google, but seriously - no harm meant - it seems
> soo NOT organized ... there are like a billion dead links ... maybe even
> more and I am on the edge and desperate ... s please, bear with me!
> >
> > Thnx,
> > dg
> >
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Rodolfo Hansen
CEO, KindleIT Software Development
Email: rhan...@kindleit.net
Office: 1 (809) 732-5200
Mobile: 1 (809) 299-7332

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



Inmethod DataGrid without column headers?

2009-05-29 Thread Marcin Palka
Hi,

Is there any way to render a Inmethod DataGrid without column headers?
For wicket's standard DataTable there's a HeaderlessColumn but I
haven't been able to find an equivalent column type for DataGrid.

cheers
Marcin

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



Re: AjaxLazyLoadPanel fallback version?

2009-05-29 Thread Igor Vaynberg
you can ask wicket to figure out if the browser supports javascript or not, see

getApplication().getRequestCycleSettings().setGatherExtendedBrowserInfo()

the way the fallback button works is that it is a regular button and
we use javascript to override the default behavior - thus if no
javascript is there then nothing is overridden and the button works
like a regular button instead of ajax.

-igor

On Fri, May 29, 2009 at 4:51 AM, yong mook kim  wrote:
>
> hi,
>
>   Thanks, i agree with your point. However what i want is a browser's 
> javascript detect function, if isJavascriptEnable() then load the 
> LazyLoadPanel else fall back to normal panel behaviour.
>
> something like below
>
> Page start
>
> if(isJavascriptEnable()){
>   add(new AjaxLazyLoadPanel('123')...
> }else{
>   add(new ABCPanel('123')
> }
>
> Page end
>
> I wonder how Wicket AjaxFallBackButton work?
>
>
>
>
>
> --- On Fri, 5/29/09, Martijn Dashorst  wrote:
>
>> From: Martijn Dashorst 
>> Subject: Re: AjaxLazyLoadPanel fallback version?
>> To: users@wicket.apache.org
>> Date: Friday, May 29, 2009, 7:26 AM
>> It's called Panel. Either your users
>> have to have javascript enabled
>> and you can use LazyLoadPanel, or you have to use direct
>> Panel's.
>>
>> There is no way to lazy load anything without having to
>> resort to
>> JavaScript. Think about it. How could you instruct the
>> browser to
>> retrieve and replace a part of your page after a given
>> time?
>>
>> The only thing that comes to mind is using iframes.
>>
>> Martijn
>>
>> On Fri, May 29, 2009 at 12:09 PM, yong mook kim 
>> wrote:
>> >
>> > Hi,
>> >
>> >  When browser's Javascript is disabled,
>> AjaxLazyLoadPanel's image (wicket ajax deafult image) will
>> keep loading forever, page will not return. Is there a
>> AjaxLazyLoadPanel fallback version which will delegate to
>> normal request if javascript is disabled?
>> >
>> > I wonder how Wicket detect the browser's javascript is
>> disabled?  Thanks
>> >
>> > regards
>> > yong
>> >
>> >
>> >
>> >
>> >
>> -
>> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> > For additional commands, e-mail: users-h...@wicket.apache.org
>> >
>> >
>>
>>
>>
>> --
>> Become a Wicket expert, learn from the best: http://wicketinaction.com
>> Apache Wicket 1.3.5 is released
>> Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

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



AW: wicket and jquery

2009-05-29 Thread Stefan Lindner
Currently I'm building a wicket library around jQuery. Drag and drop and 
resizable are ready for use (with callback handlers in Wicket-Java onDrop, on 
Resized etc.). If anybody is interrested I can provied a simple library with 
some simple examples.

-Ursprüngliche Nachricht-
Von: Dorothée Giernoth [mailto:dorothee.giern...@kds-kg.de] 
Gesendet: Freitag, 29. Mai 2009 17:33
An: users@wicket.apache.org
Betreff: AW: wicket and jquery

Thnx guys, I will check that out. This might mean, that not all hope is lost!
Have a great weekend!


-Ursprüngliche Nachricht-
Von: Rodolfo Hansen [mailto:kry...@gmail.com] 
Gesendet: Freitag, 29. Mai 2009 17:21
An: users@wicket.apache.org
Betreff: Re: wicket and jquery

Also you can checkout

http://code.google.com/p/wiquery/

which has a couple of ideas...

On Fri, May 29, 2009 at 11:15 AM, Dipu  wrote:

> take a look at this
>
> https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-core/jquery-parent
>
> -dipu
>
> 2009/5/29 Dorothée Giernoth :
> > Hello everyone,
> >
> > i know this might sound a little weird and naive and maybe stupid ... I
> dunno, I'll ask anyway (though I did research myself, but I would need some
> sort of useful hint for a total wicket-jquery-newbie): how can I use wicket
> and jquery together? Where can I find an example?
> >
> > And yes I did ask google, but seriously - no harm meant - it seems
> soo NOT organized ... there are like a billion dead links ... maybe even
> more and I am on the edge and desperate ... s please, bear with me!
> >
> > Thnx,
> > dg
> >
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Rodolfo Hansen
CEO, KindleIT Software Development
Email: rhan...@kindleit.net
Office: 1 (809) 732-5200
Mobile: 1 (809) 299-7332

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


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



Re: wicket and jquery

2009-05-29 Thread Cristi Manole
not bad. do you have a link?

Cristi Manole

On Fri, May 29, 2009 at 1:39 PM, Stefan Lindner  wrote:

> Currently I'm building a wicket library around jQuery. Drag and drop and
> resizable are ready for use (with callback handlers in Wicket-Java onDrop,
> on Resized etc.). If anybody is interrested I can provied a simple library
> with some simple examples.
>
> -Ursprüngliche Nachricht-
> Von: Dorothée Giernoth [mailto:dorothee.giern...@kds-kg.de]
> Gesendet: Freitag, 29. Mai 2009 17:33
> An: users@wicket.apache.org
> Betreff: AW: wicket and jquery
>
> Thnx guys, I will check that out. This might mean, that not all hope is
> lost!
> Have a great weekend!
>
>
> -Ursprüngliche Nachricht-
> Von: Rodolfo Hansen [mailto:kry...@gmail.com]
> Gesendet: Freitag, 29. Mai 2009 17:21
> An: users@wicket.apache.org
> Betreff: Re: wicket and jquery
>
> Also you can checkout
>
> http://code.google.com/p/wiquery/
>
> which has a couple of ideas...
>
> On Fri, May 29, 2009 at 11:15 AM, Dipu  wrote:
>
> > take a look at this
> >
> >
> https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-core/jquery-parent
> >
> > -dipu
> >
> > 2009/5/29 Dorothée Giernoth :
> > > Hello everyone,
> > >
> > > i know this might sound a little weird and naive and maybe stupid ... I
> > dunno, I'll ask anyway (though I did research myself, but I would need
> some
> > sort of useful hint for a total wicket-jquery-newbie): how can I use
> wicket
> > and jquery together? Where can I find an example?
> > >
> > > And yes I did ask google, but seriously - no harm meant - it seems
> > soo NOT organized ... there are like a billion dead links ... maybe
> even
> > more and I am on the edge and desperate ... s please, bear with me!
> > >
> > > Thnx,
> > > dg
> > >
> > >
> > > -
> > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > > For additional commands, e-mail: users-h...@wicket.apache.org
> > >
> > >
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
>
>
> --
> Rodolfo Hansen
> CEO, KindleIT Software Development
> Email: rhan...@kindleit.net
> Office: 1 (809) 732-5200
> Mobile: 1 (809) 299-7332
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Cristi Manole

Nova Creator Software
www.novacreator.com


Re: AjaxLazyLoadPanel fallback version?

2009-05-29 Thread Cristi Manole
In order to have something like that, I have to specifically mention
something in my WebApplication class, right (if i remember correctly) ? And
I think the way wicket works for browser extend is to redirect to some page
where it reads this info. I think it's too much just to see the support for
js.

Why not go the easy way and have some kind of html tag that holds a value
like x. Through javascript I change that value like y. I tie that with a
wicket:id to read it. If it's x, I have js.

Or what i'm saying is not valid?

Cristi Manole

On Fri, May 29, 2009 at 1:14 PM, Igor Vaynberg wrote:

> you can ask wicket to figure out if the browser supports javascript or not,
> see
>
> getApplication().getRequestCycleSettings().setGatherExtendedBrowserInfo()
>
> the way the fallback button works is that it is a regular button and
> we use javascript to override the default behavior - thus if no
> javascript is there then nothing is overridden and the button works
> like a regular button instead of ajax.
>
> -igor
>
> On Fri, May 29, 2009 at 4:51 AM, yong mook kim 
> wrote:
> >
> > hi,
> >
> >   Thanks, i agree with your point. However what i want is a browser's
> javascript detect function, if isJavascriptEnable() then load the
> LazyLoadPanel else fall back to normal panel behaviour.
> >
> > something like below
> >
> > Page start
> >
> > if(isJavascriptEnable()){
> >   add(new AjaxLazyLoadPanel('123')...
> > }else{
> >   add(new ABCPanel('123')
> > }
> >
> > Page end
> >
> > I wonder how Wicket AjaxFallBackButton work?
> >
> >
> >
> >
> >
> > --- On Fri, 5/29/09, Martijn Dashorst 
> wrote:
> >
> >> From: Martijn Dashorst 
> >> Subject: Re: AjaxLazyLoadPanel fallback version?
> >> To: users@wicket.apache.org
> >> Date: Friday, May 29, 2009, 7:26 AM
> >> It's called Panel. Either your users
> >> have to have javascript enabled
> >> and you can use LazyLoadPanel, or you have to use direct
> >> Panel's.
> >>
> >> There is no way to lazy load anything without having to
> >> resort to
> >> JavaScript. Think about it. How could you instruct the
> >> browser to
> >> retrieve and replace a part of your page after a given
> >> time?
> >>
> >> The only thing that comes to mind is using iframes.
> >>
> >> Martijn
> >>
> >> On Fri, May 29, 2009 at 12:09 PM, yong mook kim 
> >> wrote:
> >> >
> >> > Hi,
> >> >
> >> >  When browser's Javascript is disabled,
> >> AjaxLazyLoadPanel's image (wicket ajax deafult image) will
> >> keep loading forever, page will not return. Is there a
> >> AjaxLazyLoadPanel fallback version which will delegate to
> >> normal request if javascript is disabled?
> >> >
> >> > I wonder how Wicket detect the browser's javascript is
> >> disabled?  Thanks
> >> >
> >> > regards
> >> > yong
> >> >
> >> >
> >> >
> >> >
> >> >
> >> -
> >> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >> > For additional commands, e-mail: users-h...@wicket.apache.org
> >> >
> >> >
> >>
> >>
> >>
> >> --
> >> Become a Wicket expert, learn from the best: http://wicketinaction.com
> >> Apache Wicket 1.3.5 is released
> >> Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.
> >>
> >> -
> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >> For additional commands, e-mail: users-h...@wicket.apache.org
> >>
> >>
> >
> >
> >
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Cristi Manole

Nova Creator Software
www.novacreator.com


Re: AjaxLazyLoadPanel fallback version?

2009-05-29 Thread Igor Vaynberg
thats exactly what the redirect page does

you can of course implement the check yourself but you need to know
that on server side so it has to be submitted somehow.

-igor

On Fri, May 29, 2009 at 10:36 AM, Cristi Manole  wrote:
> In order to have something like that, I have to specifically mention
> something in my WebApplication class, right (if i remember correctly) ? And
> I think the way wicket works for browser extend is to redirect to some page
> where it reads this info. I think it's too much just to see the support for
> js.
>
> Why not go the easy way and have some kind of html tag that holds a value
> like x. Through javascript I change that value like y. I tie that with a
> wicket:id to read it. If it's x, I have js.
>
> Or what i'm saying is not valid?
>
> Cristi Manole
>
> On Fri, May 29, 2009 at 1:14 PM, Igor Vaynberg wrote:
>
>> you can ask wicket to figure out if the browser supports javascript or not,
>> see
>>
>> getApplication().getRequestCycleSettings().setGatherExtendedBrowserInfo()
>>
>> the way the fallback button works is that it is a regular button and
>> we use javascript to override the default behavior - thus if no
>> javascript is there then nothing is overridden and the button works
>> like a regular button instead of ajax.
>>
>> -igor
>>
>> On Fri, May 29, 2009 at 4:51 AM, yong mook kim 
>> wrote:
>> >
>> > hi,
>> >
>> >   Thanks, i agree with your point. However what i want is a browser's
>> javascript detect function, if isJavascriptEnable() then load the
>> LazyLoadPanel else fall back to normal panel behaviour.
>> >
>> > something like below
>> >
>> > Page start
>> >
>> > if(isJavascriptEnable()){
>> >   add(new AjaxLazyLoadPanel('123')...
>> > }else{
>> >   add(new ABCPanel('123')
>> > }
>> >
>> > Page end
>> >
>> > I wonder how Wicket AjaxFallBackButton work?
>> >
>> >
>> >
>> >
>> >
>> > --- On Fri, 5/29/09, Martijn Dashorst 
>> wrote:
>> >
>> >> From: Martijn Dashorst 
>> >> Subject: Re: AjaxLazyLoadPanel fallback version?
>> >> To: users@wicket.apache.org
>> >> Date: Friday, May 29, 2009, 7:26 AM
>> >> It's called Panel. Either your users
>> >> have to have javascript enabled
>> >> and you can use LazyLoadPanel, or you have to use direct
>> >> Panel's.
>> >>
>> >> There is no way to lazy load anything without having to
>> >> resort to
>> >> JavaScript. Think about it. How could you instruct the
>> >> browser to
>> >> retrieve and replace a part of your page after a given
>> >> time?
>> >>
>> >> The only thing that comes to mind is using iframes.
>> >>
>> >> Martijn
>> >>
>> >> On Fri, May 29, 2009 at 12:09 PM, yong mook kim 
>> >> wrote:
>> >> >
>> >> > Hi,
>> >> >
>> >> >  When browser's Javascript is disabled,
>> >> AjaxLazyLoadPanel's image (wicket ajax deafult image) will
>> >> keep loading forever, page will not return. Is there a
>> >> AjaxLazyLoadPanel fallback version which will delegate to
>> >> normal request if javascript is disabled?
>> >> >
>> >> > I wonder how Wicket detect the browser's javascript is
>> >> disabled?  Thanks
>> >> >
>> >> > regards
>> >> > yong
>> >> >
>> >> >
>> >> >
>> >> >
>> >> >
>> >> -
>> >> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> >> > For additional commands, e-mail: users-h...@wicket.apache.org
>> >> >
>> >> >
>> >>
>> >>
>> >>
>> >> --
>> >> Become a Wicket expert, learn from the best: http://wicketinaction.com
>> >> Apache Wicket 1.3.5 is released
>> >> Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.
>> >>
>> >> -
>> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> >> For additional commands, e-mail: users-h...@wicket.apache.org
>> >>
>> >>
>> >
>> >
>> >
>> >
>> > -
>> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> > For additional commands, e-mail: users-h...@wicket.apache.org
>> >
>> >
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>
>
> --
> Cristi Manole
>
> Nova Creator Software
> www.novacreator.com
>

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



Re: Inmethod DataGrid without column headers?

2009-05-29 Thread Cristi Manole
I might be wrong, but...

Datagrid extends AbstractGrid which has
public void addHeaderToolbar(AbstractHeaderToolbar toolbar) {
addToolbar(toolbar, headerToolbarContainer);
}

simply overriding that in your Datagrid
public void addHeaderToolbar(AbstractHeaderToolbar toolbar) {
//nothing
}
doesn't do what you want?

Cristi Manole


On Fri, May 29, 2009 at 12:37 PM, Marcin Palka wrote:

> Hi,
>
> Is there any way to render a Inmethod DataGrid without column headers?
> For wicket's standard DataTable there's a HeaderlessColumn but I
> haven't been able to find an equivalent column type for DataGrid.
>
> cheers
> Marcin
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Cristi Manole

Nova Creator Software
www.novacreator.com


Re: AjaxLazyLoadPanel fallback version?

2009-05-29 Thread Cristi Manole
I don't remember now exactly so i'm just typing whatever i think it's ok,
but on some project we checked some javascript related stuff using something
like the following

on html

function callWicket() {
wicketAjaxGet(callback + '¶meter=value', function() {}, function()
{});
}


where callback is an extends AbstractDefaultAjaxBehaviour that if it gets
called, you have js,

dummyDiv.add(new AjaxSelfUpdatingTimerBehavior(Duration.seconds(whatever)) {
@Override
protected void onPostProcessTarget(AjaxRequestTarget target) {
target.appendJavascript("callWicket();");
}
});
dummyDiv.add(behavior);

We got rid of the div through ajax after being used. if js is not enabled, I
wouldn't have the self updating timer doing anything in the first place.

Maybe it's stupid, maybe it's too much but it worked for us, without any
redirect, without showing anything to the user. And once you have it in a
component, I don't care about it, just dumb it to the page.

Cristi Manole

On Fri, May 29, 2009 at 2:39 PM, Igor Vaynberg wrote:

> thats exactly what the redirect page does
>
> you can of course implement the check yourself but you need to know
> that on server side so it has to be submitted somehow.
>
> -igor
>
> On Fri, May 29, 2009 at 10:36 AM, Cristi Manole 
> wrote:
> > In order to have something like that, I have to specifically mention
> > something in my WebApplication class, right (if i remember correctly) ?
> And
> > I think the way wicket works for browser extend is to redirect to some
> page
> > where it reads this info. I think it's too much just to see the support
> for
> > js.
> >
> > Why not go the easy way and have some kind of html tag that holds a value
> > like x. Through javascript I change that value like y. I tie that with a
> > wicket:id to read it. If it's x, I have js.
> >
> > Or what i'm saying is not valid?
> >
> > Cristi Manole
> >
> > On Fri, May 29, 2009 at 1:14 PM, Igor Vaynberg  >wrote:
> >
> >> you can ask wicket to figure out if the browser supports javascript or
> not,
> >> see
> >>
> >>
> getApplication().getRequestCycleSettings().setGatherExtendedBrowserInfo()
> >>
> >> the way the fallback button works is that it is a regular button and
> >> we use javascript to override the default behavior - thus if no
> >> javascript is there then nothing is overridden and the button works
> >> like a regular button instead of ajax.
> >>
> >> -igor
> >>
> >> On Fri, May 29, 2009 at 4:51 AM, yong mook kim 
> >> wrote:
> >> >
> >> > hi,
> >> >
> >> >   Thanks, i agree with your point. However what i want is a browser's
> >> javascript detect function, if isJavascriptEnable() then load the
> >> LazyLoadPanel else fall back to normal panel behaviour.
> >> >
> >> > something like below
> >> >
> >> > Page start
> >> >
> >> > if(isJavascriptEnable()){
> >> >   add(new AjaxLazyLoadPanel('123')...
> >> > }else{
> >> >   add(new ABCPanel('123')
> >> > }
> >> >
> >> > Page end
> >> >
> >> > I wonder how Wicket AjaxFallBackButton work?
> >> >
> >> >
> >> >
> >> >
> >> >
> >> > --- On Fri, 5/29/09, Martijn Dashorst 
> >> wrote:
> >> >
> >> >> From: Martijn Dashorst 
> >> >> Subject: Re: AjaxLazyLoadPanel fallback version?
> >> >> To: users@wicket.apache.org
> >> >> Date: Friday, May 29, 2009, 7:26 AM
> >> >> It's called Panel. Either your users
> >> >> have to have javascript enabled
> >> >> and you can use LazyLoadPanel, or you have to use direct
> >> >> Panel's.
> >> >>
> >> >> There is no way to lazy load anything without having to
> >> >> resort to
> >> >> JavaScript. Think about it. How could you instruct the
> >> >> browser to
> >> >> retrieve and replace a part of your page after a given
> >> >> time?
> >> >>
> >> >> The only thing that comes to mind is using iframes.
> >> >>
> >> >> Martijn
> >> >>
> >> >> On Fri, May 29, 2009 at 12:09 PM, yong mook kim <
> mkyong2...@yahoo.com>
> >> >> wrote:
> >> >> >
> >> >> > Hi,
> >> >> >
> >> >> >  When browser's Javascript is disabled,
> >> >> AjaxLazyLoadPanel's image (wicket ajax deafult image) will
> >> >> keep loading forever, page will not return. Is there a
> >> >> AjaxLazyLoadPanel fallback version which will delegate to
> >> >> normal request if javascript is disabled?
> >> >> >
> >> >> > I wonder how Wicket detect the browser's javascript is
> >> >> disabled?  Thanks
> >> >> >
> >> >> > regards
> >> >> > yong
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> -
> >> >> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >> >> > For additional commands, e-mail: users-h...@wicket.apache.org
> >> >> >
> >> >> >
> >> >>
> >> >>
> >> >>
> >> >> --
> >> >> Become a Wicket expert, learn from the best:
> http://wicketinaction.com
> >> >> Apache Wicket 1.3.5 is released
> >> >> Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.
> >> >>
> >> >> -
> >> >

Re: AjaxLazyLoadPanel fallback version?

2009-05-29 Thread Igor Vaynberg
and what if you need to know javascript support when rendering the
first page as you often do?

the solution we have is generic and works well. it may not be optimal
for everyone, so of course you are welcome to roll your own.

-igor

On Fri, May 29, 2009 at 10:56 AM, Cristi Manole  wrote:
> I don't remember now exactly so i'm just typing whatever i think it's ok,
> but on some project we checked some javascript related stuff using something
> like the following
>
> on html
> 
> function callWicket() {
>    wicketAjaxGet(callback + '¶meter=value', function() {}, function()
> {});
> }
> 
>
> where callback is an extends AbstractDefaultAjaxBehaviour that if it gets
> called, you have js,
>
> dummyDiv.add(new AjaxSelfUpdatingTimerBehavior(Duration.seconds(whatever)) {
>   �...@override
>    protected void onPostProcessTarget(AjaxRequestTarget target) {
>        target.appendJavascript("callWicket();");
>    }
> });
> dummyDiv.add(behavior);
>
> We got rid of the div through ajax after being used. if js is not enabled, I
> wouldn't have the self updating timer doing anything in the first place.
>
> Maybe it's stupid, maybe it's too much but it worked for us, without any
> redirect, without showing anything to the user. And once you have it in a
> component, I don't care about it, just dumb it to the page.
>
> Cristi Manole
>
> On Fri, May 29, 2009 at 2:39 PM, Igor Vaynberg wrote:
>
>> thats exactly what the redirect page does
>>
>> you can of course implement the check yourself but you need to know
>> that on server side so it has to be submitted somehow.
>>
>> -igor
>>
>> On Fri, May 29, 2009 at 10:36 AM, Cristi Manole 
>> wrote:
>> > In order to have something like that, I have to specifically mention
>> > something in my WebApplication class, right (if i remember correctly) ?
>> And
>> > I think the way wicket works for browser extend is to redirect to some
>> page
>> > where it reads this info. I think it's too much just to see the support
>> for
>> > js.
>> >
>> > Why not go the easy way and have some kind of html tag that holds a value
>> > like x. Through javascript I change that value like y. I tie that with a
>> > wicket:id to read it. If it's x, I have js.
>> >
>> > Or what i'm saying is not valid?
>> >
>> > Cristi Manole
>> >
>> > On Fri, May 29, 2009 at 1:14 PM, Igor Vaynberg > >wrote:
>> >
>> >> you can ask wicket to figure out if the browser supports javascript or
>> not,
>> >> see
>> >>
>> >>
>> getApplication().getRequestCycleSettings().setGatherExtendedBrowserInfo()
>> >>
>> >> the way the fallback button works is that it is a regular button and
>> >> we use javascript to override the default behavior - thus if no
>> >> javascript is there then nothing is overridden and the button works
>> >> like a regular button instead of ajax.
>> >>
>> >> -igor
>> >>
>> >> On Fri, May 29, 2009 at 4:51 AM, yong mook kim 
>> >> wrote:
>> >> >
>> >> > hi,
>> >> >
>> >> >   Thanks, i agree with your point. However what i want is a browser's
>> >> javascript detect function, if isJavascriptEnable() then load the
>> >> LazyLoadPanel else fall back to normal panel behaviour.
>> >> >
>> >> > something like below
>> >> >
>> >> > Page start
>> >> >
>> >> > if(isJavascriptEnable()){
>> >> >   add(new AjaxLazyLoadPanel('123')...
>> >> > }else{
>> >> >   add(new ABCPanel('123')
>> >> > }
>> >> >
>> >> > Page end
>> >> >
>> >> > I wonder how Wicket AjaxFallBackButton work?
>> >> >
>> >> >
>> >> >
>> >> >
>> >> >
>> >> > --- On Fri, 5/29/09, Martijn Dashorst 
>> >> wrote:
>> >> >
>> >> >> From: Martijn Dashorst 
>> >> >> Subject: Re: AjaxLazyLoadPanel fallback version?
>> >> >> To: users@wicket.apache.org
>> >> >> Date: Friday, May 29, 2009, 7:26 AM
>> >> >> It's called Panel. Either your users
>> >> >> have to have javascript enabled
>> >> >> and you can use LazyLoadPanel, or you have to use direct
>> >> >> Panel's.
>> >> >>
>> >> >> There is no way to lazy load anything without having to
>> >> >> resort to
>> >> >> JavaScript. Think about it. How could you instruct the
>> >> >> browser to
>> >> >> retrieve and replace a part of your page after a given
>> >> >> time?
>> >> >>
>> >> >> The only thing that comes to mind is using iframes.
>> >> >>
>> >> >> Martijn
>> >> >>
>> >> >> On Fri, May 29, 2009 at 12:09 PM, yong mook kim <
>> mkyong2...@yahoo.com>
>> >> >> wrote:
>> >> >> >
>> >> >> > Hi,
>> >> >> >
>> >> >> >  When browser's Javascript is disabled,
>> >> >> AjaxLazyLoadPanel's image (wicket ajax deafult image) will
>> >> >> keep loading forever, page will not return. Is there a
>> >> >> AjaxLazyLoadPanel fallback version which will delegate to
>> >> >> normal request if javascript is disabled?
>> >> >> >
>> >> >> > I wonder how Wicket detect the browser's javascript is
>> >> >> disabled?  Thanks
>> >> >> >
>> >> >> > regards
>> >> >> > yong
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> -
>> >> >> > To 

Mocking out component.setResponsePage

2009-05-29 Thread Eric Weise

Hi,

Does anyone know a way to mock out calls to component.setResponsePage  
when unit testing?  This method causes me to not only mock out  
dependencies in the page I'm testing, but in the response page as  
well, which is a pain.  I thought that maybe I could extend  
RequestCycle and override the setResponsePage methods but I don't see  
how to make wicket use my extended request cycle.  Can this be done or  
is there another way?


much thanks
Eric

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



Change Page Title via Ajax??

2009-05-29 Thread Francisco Diaz Trepat - gmail
Hi all, long time...
I saw in some sample to label very long ago and put it in for the Page
Title.


   
  [Page Title]
   
   
..

Now, is it possible to change this via ajax?

As I write you this lines I think I could put an input type hidden and a
decorator or something like that.

But just to check it out with you and see what you think.

Thanks,

f(t)

PS: Elco your book has arrived and was great, although more geeky comments
are needed so we don't feel alone reading it the subway for instance... :-)


Re: Inmethod DataGrid without column headers?

2009-05-29 Thread Marcin Palka

Thanks for reply. I already gave this one a try. It does not seem to be
called at all. I searched through inmethod grid sources and it seems that it
really isn't called at all. My search shown only one occurence of
addHeaderToolbar method which is its declaration in AbstractDataGrid class. 

This is my code:
DataGrid grid = new DataGrid("usersGrid", usersDS, columns) {

@Override
public void onItemSelectionChanged(IModel item, boolean
newValue) {
super.onItemSelectionChanged(item, newValue);
selectedUser = (User) item.getObject();
}

@Override
protected void onRowPopulated(WebMarkupContainer rowComponent) {
super.onRowPopulated(rowComponent);
rowComponent.add(new AjaxEventBehavior("ondblclick") {

@Override
protected void onEvent(AjaxRequestTarget target) {
showModalUserEditor(ComponentViewMode.EDIT);
}
});
}

@Override
public void addHeaderToolbar(AbstractHeaderToolbar toolbar) {
logger.info("addHeaderToolbar");
//super.addHeaderToolbar(toolbar);
}

@Override
public void addTopToolbar(AbstractToolbar toolbar) {
logger.info("addTopToolbard");
//super.addTopToolbar(toolbar);
}
};

Marcin
-- 
View this message in context: 
http://www.nabble.com/Inmethod-DataGrid-without-column-headers--tp23782672p23784978.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Mocking out component.setResponsePage

2009-05-29 Thread Clint Popetz
Hi Eric :)

Override WicketApplication.newRequestCycle()

-Clint

On Fri, May 29, 2009 at 1:20 PM, Eric Weise  wrote:

> Hi,
>
> Does anyone know a way to mock out calls to component.setResponsePage when
> unit testing?  This method causes me to not only mock out dependencies in
> the page I'm testing, but in the response page as well, which is a pain.  I
> thought that maybe I could extend RequestCycle and override the
> setResponsePage methods but I don't see how to make wicket use my extended
> request cycle.  Can this be done or is there another way?
>
> much thanks
> Eric
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Clint Popetz
http://42lines.net
Scalable Web Application Development


RE: wicket and jquery

2009-05-29 Thread Stefan Lindner
I'm just finishing up some things (e.g. documentation :-) and proper examples). 
I must confess that the library is based upon wicket 1.4. and i don't plan to 
backport it to wicket 1.3.
In a few days I will open up our subversion repository for public access.

-Ursprüngliche Nachricht-
Von: Cristi Manole [mailto:cristiman...@gmail.com] 
Gesendet: Freitag, 29. Mai 2009 19:32
An: users@wicket.apache.org
Betreff: Re: wicket and jquery

not bad. do you have a link?

Cristi Manole

On Fri, May 29, 2009 at 1:39 PM, Stefan Lindner  wrote:

> Currently I'm building a wicket library around jQuery. Drag and drop and
> resizable are ready for use (with callback handlers in Wicket-Java onDrop,
> on Resized etc.). If anybody is interrested I can provied a simple library
> with some simple examples.
>
> -Ursprüngliche Nachricht-
> Von: Dorothée Giernoth [mailto:dorothee.giern...@kds-kg.de]
> Gesendet: Freitag, 29. Mai 2009 17:33
> An: users@wicket.apache.org
> Betreff: AW: wicket and jquery
>
> Thnx guys, I will check that out. This might mean, that not all hope is
> lost!
> Have a great weekend!
>
>
> -Ursprüngliche Nachricht-
> Von: Rodolfo Hansen [mailto:kry...@gmail.com]
> Gesendet: Freitag, 29. Mai 2009 17:21
> An: users@wicket.apache.org
> Betreff: Re: wicket and jquery
>
> Also you can checkout
>
> http://code.google.com/p/wiquery/
>
> which has a couple of ideas...
>
> On Fri, May 29, 2009 at 11:15 AM, Dipu  wrote:
>
> > take a look at this
> >
> >
> https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-core/jquery-parent
> >
> > -dipu
> >
> > 2009/5/29 Dorothée Giernoth :
> > > Hello everyone,
> > >
> > > i know this might sound a little weird and naive and maybe stupid ... I
> > dunno, I'll ask anyway (though I did research myself, but I would need
> some
> > sort of useful hint for a total wicket-jquery-newbie): how can I use
> wicket
> > and jquery together? Where can I find an example?
> > >
> > > And yes I did ask google, but seriously - no harm meant - it seems
> > soo NOT organized ... there are like a billion dead links ... maybe
> even
> > more and I am on the edge and desperate ... s please, bear with me!
> > >
> > > Thnx,
> > > dg
> > >
> > >
> > > -
> > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > > For additional commands, e-mail: users-h...@wicket.apache.org
> > >
> > >
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
>
>
> --
> Rodolfo Hansen
> CEO, KindleIT Software Development
> Email: rhan...@kindleit.net
> Office: 1 (809) 732-5200
> Mobile: 1 (809) 299-7332
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Cristi Manole

Nova Creator Software
www.novacreator.com

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



Re: Change Page Title via Ajax??

2009-05-29 Thread Igor Vaynberg
target.appendjavascript("window.title='new title'");

something like that should work.

-igor

On Fri, May 29, 2009 at 11:30 AM, Francisco Diaz Trepat - gmail
 wrote:
> Hi all, long time...
> I saw in some sample to label very long ago and put it in for the Page
> Title.
>
> 
>   
>      [Page Title]
>   
>   
> ..
>
> Now, is it possible to change this via ajax?
>
> As I write you this lines I think I could put an input type hidden and a
> decorator or something like that.
>
> But just to check it out with you and see what you think.
>
> Thanks,
>
> f(t)
>
> PS: Elco your book has arrived and was great, although more geeky comments
> are needed so we don't feel alone reading it the subway for instance... :-)
>

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



Re: Change Page Title via Ajax??

2009-05-29 Thread Francisco Diaz Trepat - gmail
JAJAJA
how could I forget.

thanks IGOR.

f(t)

On Fri, May 29, 2009 at 3:52 PM, Igor Vaynberg wrote:

> target.appendjavascript("window.title='new title'");
>
> something like that should work.
>
> -igor
>
> On Fri, May 29, 2009 at 11:30 AM, Francisco Diaz Trepat - gmail
>  wrote:
> > Hi all, long time...
> > I saw in some sample to label very long ago and put it in for the Page
> > Title.
> >
> > 
> >   
> >  [Page Title]
> >   
> >   
> > ..
> >
> > Now, is it possible to change this via ajax?
> >
> > As I write you this lines I think I could put an input type hidden and a
> > decorator or something like that.
> >
> > But just to check it out with you and see what you think.
> >
> > Thanks,
> >
> > f(t)
> >
> > PS: Elco your book has arrived and was great, although more geeky
> comments
> > are needed so we don't feel alone reading it the subway for instance...
> :-)
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Mocking out component.setResponsePage

2009-05-29 Thread Eric Weise

Hi Clint,

One thing though is my unit test is not invoking the seam framework  
and it looks like that class extends the SeamWebApplication.  My unit  
test just uses WicketTester and has a routine to inject mock objects  
on any @In annotation fields in the component hierarchy.  	Is there a  
similar application I can override somewhere in the wickettester?


thanks
Eric

On May 29, 2009, at 11:43 AM, Clint Popetz wrote:


Hi Eric :)

Override WicketApplication.newRequestCycle()

-Clint

On Fri, May 29, 2009 at 1:20 PM, Eric Weise  wrote:


Hi,

Does anyone know a way to mock out calls to  
component.setResponsePage when
unit testing?  This method causes me to not only mock out  
dependencies in
the page I'm testing, but in the response page as well, which is a  
pain.  I

thought that maybe I could extend RequestCycle and override the
setResponsePage methods but I don't see how to make wicket use my  
extended

request cycle.  Can this be done or is there another way?

much thanks
Eric

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





--
Clint Popetz
http://42lines.net
Scalable Web Application Development



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



Re: Mocking out component.setResponsePage

2009-05-29 Thread Clint Popetz
You can construct a WicketTester with an application subclass...it just
creates a default one for you internally if you don't:

WicketTester yourTester = new WicketTester(new
WicketTester.DummyWebApplication() {
public RequestCycle newRequestCycle(final Request request, final
Response response) {
//...
}
});



-Clint

On Fri, May 29, 2009 at 2:02 PM, Eric Weise  wrote:

> Hi Clint,
>
> One thing though is my unit test is not invoking the seam framework and it
> looks like that class extends the SeamWebApplication.  My unit test just
> uses WicketTester and has a routine to inject mock objects on any @In
> annotation fields in the component hierarchy.Is there a similar
> application I can override somewhere in the wickettester?
>
> thanks
> Eric
>
>
> On May 29, 2009, at 11:43 AM, Clint Popetz wrote:
>
>  Hi Eric :)
>>
>> Override WicketApplication.newRequestCycle()
>>
>> -Clint
>>
>> On Fri, May 29, 2009 at 1:20 PM, Eric Weise  wrote:
>>
>>  Hi,
>>>
>>> Does anyone know a way to mock out calls to component.setResponsePage
>>> when
>>> unit testing?  This method causes me to not only mock out dependencies in
>>> the page I'm testing, but in the response page as well, which is a pain.
>>>  I
>>> thought that maybe I could extend RequestCycle and override the
>>> setResponsePage methods but I don't see how to make wicket use my
>>> extended
>>> request cycle.  Can this be done or is there another way?
>>>
>>> much thanks
>>> Eric
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>>
>>>
>>
>> --
>> Clint Popetz
>> http://42lines.net
>> Scalable Web Application Development
>>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Clint Popetz
http://42lines.net
Scalable Web Application Development


Re: How do I reuse a rendered string, i.e. render once and past in multiple locations, e.g. paging nav at top and bottom?

2009-05-29 Thread J.-F. Rompre
Thanks Igor for the straight answer - much appreciated.

Thanks,

JF




On Wed, May 27, 2009 at 9:59 PM, Igor Vaynberg wrote:

> no it is not possible and does not make sense to do so.
>
> imagine you have a panel that renders 
>
> not only would you have to rewrite the id of the top tag, but also of
> the inner tags. this becomes even more complicated if components
> output header contributors, eg javascript, that depends on those ids.
>
> if you are instantiating components with the same state then you
> should simply connect them all to the same state via models so the
> state is reused and does not present overhead.
>
> makes sense?
>
> -igor
>
> On Wed, May 27, 2009 at 5:03 PM, J.-F. Rompre  wrote:
> > OK, thanks Martjin and Jeremy - I think mentioning performance was a
> mistake
> > on my part..let me try again.
> >
> > I am not trying to couple different components, only to reuse what I know
> is
> > never going to change within the same rendering - actually, avoiding the
> use
> > of multiple component instances of the same subtype where a single
> instance
> > would suffice.
> >
> > My question is: Is it possible to capture a rendered string for reuse? In
> > other words, if I have a component subtype that I am currently
> instantiating
> > multiple times with exactly the same state (therefore the output is
> exactly
> > the same), is it possible to render it once and once only and reuse the
> > string from that rendering within the same container or page?
> >
> > At this stage I am only trying to know how to do something instead of why
> > (optimization or other reason, such as saving markup coding, or some
> other
> > reason). I went through the source and searched on forums as well to find
> > out, but didn't.
> >
> > My apologies if that question has been answered elsewhere - please let me
> > know where I can look.
> >
> > Thanks,
> >
> > JF
> >
> > On Wed, May 27, 2009 at 6:33 PM, Jeremy Thomerson <
> jer...@wickettraining.com
> >> wrote:
> >
> >> The real question that has been asked time and time again on this list
> >> when such a question is received is this:
> >>
> >> WHY?  It's premature (and almost certainly unnecessary) optimization.
> >> Doing it needlessly couples multiple components together - reducing
> >> reuse.
> >>
> >> As always, we are more than interested in seeing any results of
> >> performance analysis that you have done that says that this will
> >> reduce your page load time by any significant factor.
> >>
> >> --
> >> Jeremy Thomerson
> >> http://www.wickettraining.com
> >>
> >>
> >>
> >>
> >> On Wed, May 27, 2009 at 2:53 PM, J.-F. Rompre 
> wrote:
> >> >  I am trying to do something that should be easy to do, and may
> already
> >> be
> >> >  available from the API (I am still usin 1.3.5).
> >> >
> >> >  How can one duplicate rendered strings?
> >> >
> >> >  In other words, I am trying to render once but copy a number of times
> >> for
> >> >  better performance - e.g., putting a page navigator both at the top
> and
> >> >  bottom of the list (the bottom is simply a label generated from
> copying
> >> the
> >> >  rendered top one) or something more complex such as a calendar.
> >> >
> >> >  I tried using IBehavior.onRendered to copy getResponse.toString() for
> >> later
> >> >  reuse, but myComponent.renderComponent() throws
> IllegalStateException:
> >> Page
> >> >  not found - even though I am adding the component to a panel as
> >> instructed
> >> >  by Component.renderComponent() - any ideas? My code is below.
> >> >
> >> >  I also thought of overriding one of the rendering methods to write
> >> directly
> >> >  to the response, but Component.renderXXX() methods are all final -
> there
> >> >  has to be a way to do this simply.
> >> >
> >> >  Any ideas?
> >> >
> >> >  Thanks!
> >> >  JF
> >> >
> >> >  The containing panel java (groovy) code - 'ppn' is the component we
> want
> >> to
> >> >  render only once
> >> >  .//ProductPanel
> >> >  //...
> >> >productsContainer.add( products )
> >> > ProductsPagingNavigator ppn = new ProductsPagingNavigator(
> >> >  "productsPagerTop", products)
> >> > ppn.add( new MakeRenderedStringBehavior())
> >> >
> >> >productsContainer.add(  ppn)
> >> >ppn.renderComponent()   //THOWS 'Page not found..." exc.
> >> >   //save the rendering for reuse
> >> >CharSequence ppnOut = ppn.getRendered()
> >> >  //reuse it here
> >> >productsContainer.add new Label( "productsPagerBottom", ppnOut)
> >> >  //
> >> >
> >> >  //***
> >> >  The Behavior code attached to ppn above:
> >> >  .// MakeRenderedStringBehavior
> >> > //...
> >> >public void onRendered(final Component component)
> >> >{
> >> >  //
> >> >//  Copy the rendering if this component can store it..
> >> >CharSequence output = response.toString();
> >> >if ( component instanceof IRenderedString )
>

Re: simple model question

2009-05-29 Thread bferr

I was not chaining the models as suggested and the ldm.getModelObject() does
not get updated sometimes.  Is that the type of problem that would be caused
by not chaining the models?  If so, it's only in some cases not all the
time.  My debugging brought me to review the models because it seemed like
sometimes they become different objects in memory.



igor.vaynberg wrote:
> 
> if you chain your models properly its no problem..
> 
> imodel ldm=new loadabledetachablemodel(..)
> imodel prop=new propertymodel(ldm, "prop");
> 
> -igor
> 
> On Wed, May 27, 2009 at 1:20 PM, bf  wrote:
>> I constructed a Page that uses a LoadableDetachableModel.  The
>> LoadableDetachableModel retrieves an object from the Session and displays
>> Panels from a list in the object.  The Panels have TextFields which use
>> elements from the List but it puts the object into a PropertyModel in
>> order to access the attributes.
>> My question is whether it is a problem to update the TextField via the
>> PropertyModel or does the PropertyModel have to use a
>> LoadableDetachableModel as well in order to get the object from the
>> Session before doing an update?
> 

-- 
View this message in context: 
http://www.nabble.com/simple-model-question-tp23750088p23786425.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Mocking out component.setResponsePage

2009-05-29 Thread Eric Weise

Awesome.  I think that's exactly what I need.  Thanks Clint.

-Eric

On May 29, 2009, at 12:24 PM, Clint Popetz wrote:

You can construct a WicketTester with an application subclass...it  
just

creates a default one for you internally if you don't:

WicketTester yourTester = new WicketTester(new
WicketTester.DummyWebApplication() {
   public RequestCycle newRequestCycle(final Request request,  
final

Response response) {
   //...
   }
});



-Clint

On Fri, May 29, 2009 at 2:02 PM, Eric Weise  wrote:


Hi Clint,

One thing though is my unit test is not invoking the seam framework  
and it
looks like that class extends the SeamWebApplication.  My unit test  
just

uses WicketTester and has a routine to inject mock objects on any @In
annotation fields in the component hierarchy.Is there a  
similar

application I can override somewhere in the wickettester?

thanks
Eric


On May 29, 2009, at 11:43 AM, Clint Popetz wrote:

Hi Eric :)


Override WicketApplication.newRequestCycle()

-Clint

On Fri, May 29, 2009 at 1:20 PM, Eric Weise   
wrote:


Hi,


Does anyone know a way to mock out calls to  
component.setResponsePage

when
unit testing?  This method causes me to not only mock out  
dependencies in
the page I'm testing, but in the response page as well, which is  
a pain.

I
thought that maybe I could extend RequestCycle and override the
setResponsePage methods but I don't see how to make wicket use my
extended
request cycle.  Can this be done or is there another way?

much thanks
Eric

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





--
Clint Popetz
http://42lines.net
Scalable Web Application Development




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





--
Clint Popetz
http://42lines.net
Scalable Web Application Development



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



ajax form rest

2009-05-29 Thread tubin gen
how to reset form using ajax and non ajax ?


Re: OutOfMemory on certain combinations of controls

2009-05-29 Thread Flavius


I put a quickstart build up at http://silverlion.com/tmp2/OutOfMemory.zip.

Just unzip it, change to that dir and run mvn jetty:run and go to
http://localhost:8080/OutOfMemory

It has just one page, one modal window, one border, and one panel.
The steps to repro this are there on the home page.

Thanks for your help, Igor.



igor.vaynberg wrote:
> 
> there is too much going on in the sample you posted. if you want you
> can create a quickstart with the minimal amount of code necessary to
> reproduce this and i will take a look.
> 
> -igor
> 
> On Thu, May 28, 2009 at 2:12 PM, Flavius  wrote:
>>
>>
>> The sample I posted only has the single page with a link to the
>> ModalWindow.
>> The modal window keeps a reference to the ModalWindow param passed in
>> to the constructor.  That's only used to close the window when the
>> AjaxRequestTarget is passed from the AjaxLink.
>>
>> When the OnChangeAjaxBehavior#onUpdate fires, it's rebuilding the
>> repeating view and adding the WebMarkupContainer wrapper to the
>> AjaxRequestTarget.
>>
>> So it's not keeping any references that I see.
>>
>>
>>
>> igor.vaynberg wrote:
>>>
>>> make sure you dont keep page references across pages. that may be it.
>>>
>>> -igor
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/OutOfMemory-on-certain-combinations-of-controls-tp23750424p23770219.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/OutOfMemory-on-certain-combinations-of-controls-tp23750424p23786803.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Generate markup for hidden framework form field?

2009-05-29 Thread janneru
thx jörn for sharing ur solution!
i also just found a similar one by uwe schaefer:
http://www.codesmell.org/blog/2008/12/wicket-secureform/

cheers uwe.

On Tue, May 26, 2009 at 2:43 PM, Jörn Zaefferer
 wrote:
> Thanks guys! The end result looks like this, works fine, and removed a
> lot of html boilderplate from our templates:
>
> public SecureForm(String id, IModel model) {
>        super(id, model);
>        setMarkupId(id);
>        add(new IFormValidator() {
>               �...@override
>                public void validate(Form form) {
>                        String submitted = 
> getRequest().getParameter("csrf-protection");
>                        if 
> (Application.get().getConfigurationType().equals(Application.DEPLOYMENT)
> && !csrfProtection().equals(submitted)) {
>                                log.warn("potential csrf attack, submitted 
> value: " + submitted +
> ", expected: " + csrfProtection());
>                                form.error("wrong csrf protection cookie");
>                        }
>                }
>
>               �...@override
>                public FormComponent[] getDependentFormComponents() {
>                        return null;
>                }
>        });
> }
>
> @Override
> protected void onComponentTagBody(MarkupStream markupStream,
> ComponentTag openTag) {
>       getResponse().write(new AppendingStringBuffer(" type=\"hidden\" name=\"csrf-protection\"
> value=\"").append(csrfProtection()).append("\" />"));
>       super.onComponentTagBody(markupStream, openTag);
> }
>
> Jörn
>
> On Tue, May 26, 2009 at 2:23 PM, Jörn Zaefferer
>  wrote:
>> The current component (the HiddenField) checks that the same value
>> that it started with, is submitted. I'll try to replace that using a
>> form validator that reads the parameter directly.
>>
>> Thanks
>> Jörn
>>
>> On Tue, May 26, 2009 at 1:32 PM, Maarten Bosteels
>>  wrote:
>>> When you write it out with oncomponenttagbody it's not  part of the
>>> component hierarchy, it's just rendered markup.
>>> Once the form is submitted, you can retrieve the value using the servlet
>>> API.
>>> What behavior would you want to add on top ?
>>>
>>> Maarten
>>>
>>>
>>> On Tue, May 26, 2009 at 12:17 PM, Jörn Zaefferer <
>>> joern.zaeffe...@googlemail.com> wrote:
>>>
 How is that going the fix the problem? I'd end up with markup, but no
 behaviour on top of it.

 Jörn

 On Mon, May 25, 2009 at 5:52 PM, Igor Vaynberg 
 wrote:
 > right, so remove that code since you have replaced that component with
 > pure markup.
 >
 > -igor
 >
 > On Mon, May 25, 2009 at 8:48 AM, Jörn Zaefferer
 >  wrote:
 >> That was the idea. But Wicket still can't find the component markup
 >> when looking for it. The form adds this elsewhere:
 >>
 >> add(new HiddenField("csrf-protection", new
 >> Model(csrfProtection())).setRequired(true).add(new
 >> IValidator() {
 >>        public void validate(IValidatable validatable) {
 >>                log.warn("potential csrf attack, submitted value: " +
 >> validatable.getValue() + ", expected: " + csrfProtection());
 >>                validatable.error(new ValidationError().setMessage("wrong
 csrf
 >> protection cookie"));
 >>        }
 >> }));
 >>
 >> Jörn
 >>
 >> On Mon, May 25, 2009 at 5:44 PM, Igor Vaynberg 
 wrote:
 >>> if you write it out in oncomponenttagbody then you dont need it in the
 >>> markupo anymore.
 >>>
 >>> -igor
 >>>
 >>> On Mon, May 25, 2009 at 6:32 AM, Jörn Zaefferer
 >>>  wrote:
  Hi,
 
  my application uses a form subclass everywhere for CSRF protection.
  Each form needs a hidden field like this: >>>  wicket:id="csrf-protection" />
  The wicket component for that is added by the form subclass
  (SecureForm) which all other forms in the application extend.
 
  Currently each form has to include that markup somewhere, producing a
  lot of duplication.
 
  I'm looking for a way to get rid of that duplication. An approach I'm
  currently investigating is to generate the markup, similar to how Form
  genrates a hidden input it its onComponentTagBody:
 
  @Override
  protected void onComponentTagBody(MarkupStream markupStream,
  ComponentTag openTag) {
         String nameAndId = get("csrf-protection").getId();
         AppendingStringBuffer buffer = new AppendingStringBuffer(
         ">>> />");
         getResponse().write(buffer);
         super.onComponentTagBody(markupStream, openTag);
  }
 
  That doesn't work, Wicket throws an exception of a missing reference
  in markup anyway. Likely because this just writes to the response, not
  extending the markup.
  I also don't see any way to achieve this via MarkupS

Wicket Quickstart vs WIA eclipse projects: why so different?

2009-05-29 Thread David Brown
Hello Martin, Jeremy, dev, gurus, users and mortals. I have just finished ch. 
13 of the WIA.pdf. I have followed closely the reading using the 
wicket-in-action eclipse project. I have the wicket-in-action running under 
the: mvn jetty:run. The wicket-in-action project is redeployed every 60 seconds 
(a student's dream). After finishing the 13th chapter I decided to leave the 
nest for the 1.4rc QuickStart. The new QuickStart project expanded and imported 
into the Eclipse workspace no-problemo. The mystery is what am I doing wrong to 
get the automatic 60 second re-deploy. As it stands now I have to kill jetty, 
mvn package and then restart jetty (mvn jetty:run). I have pasted in the:


**

configuration
development

**

from the wicket-in-action web.xml but no change. The Windows cmd console shows 
the usual Wicket WARNING: running in development mode. I plan to use the 
wicket-in-action almost verbatim including the Hibernate DAO for my current 
gig. It is probably only a few weeks before they start holding my feet to the 
fire.

Please advise, David.

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



Re: Wicket Quickstart vs WIA eclipse projects: why so different?

2009-05-29 Thread Igor Vaynberg
why dont you just start the project from eclipse directly using the
Start class, that way you get debug and hotswap - which should be the
real "student's dream" :)

-igor

On Fri, May 29, 2009 at 2:53 PM, David Brown
 wrote:
> Hello Martin, Jeremy, dev, gurus, users and mortals. I have just finished ch. 
> 13 of the WIA.pdf. I have followed closely the reading using the 
> wicket-in-action eclipse project. I have the wicket-in-action running under 
> the: mvn jetty:run. The wicket-in-action project is redeployed every 60 
> seconds (a student's dream). After finishing the 13th chapter I decided to 
> leave the nest for the 1.4rc QuickStart. The new QuickStart project expanded 
> and imported into the Eclipse workspace no-problemo. The mystery is what am I 
> doing wrong to get the automatic 60 second re-deploy. As it stands now I have 
> to kill jetty, mvn package and then restart jetty (mvn jetty:run). I have 
> pasted in the:
>
>
> **
> 
>    configuration
>    development
> 
> **
>
> from the wicket-in-action web.xml but no change. The Windows cmd console 
> shows the usual Wicket WARNING: running in development mode. I plan to use 
> the wicket-in-action almost verbatim including the Hibernate DAO for my 
> current gig. It is probably only a few weeks before they start holding my 
> feet to the fire.
>
> Please advise, David.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

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



Re: Wicket Quickstart vs WIA eclipse projects: why so different?

2009-05-29 Thread Ryan Gravener
Yes, that is the real students dream.

mvn eclipse:eclipse


On Fri, May 29, 2009 at 5:51 PM, Igor Vaynberg wrote:

> why dont you just start the project from eclipse directly using the
> Start class, that way you get debug and hotswap - which should be the
> real "student's dream" :)
>
> -igor
>
> On Fri, May 29, 2009 at 2:53 PM, David Brown
>  wrote:
> > Hello Martin, Jeremy, dev, gurus, users and mortals. I have just finished
> ch. 13 of the WIA.pdf. I have followed closely the reading using the
> wicket-in-action eclipse project. I have the wicket-in-action running under
> the: mvn jetty:run. The wicket-in-action project is redeployed every 60
> seconds (a student's dream). After finishing the 13th chapter I decided to
> leave the nest for the 1.4rc QuickStart. The new QuickStart project expanded
> and imported into the Eclipse workspace no-problemo. The mystery is what am
> I doing wrong to get the automatic 60 second re-deploy. As it stands now I
> have to kill jetty, mvn package and then restart jetty (mvn jetty:run). I
> have pasted in the:
> >
> >
> > **
> > 
> >configuration
> >development
> > 
> > **
> >
> > from the wicket-in-action web.xml but no change. The Windows cmd console
> shows the usual Wicket WARNING: running in development mode. I plan to use
> the wicket-in-action almost verbatim including the Hibernate DAO for my
> current gig. It is probably only a few weeks before they start holding my
> feet to the fire.
> >
> > Please advise, David.
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Wicket Quickstart vs WIA eclipse projects: why so different?

2009-05-29 Thread David Brown
Hello Ryan, thanks for the reply but I have the project imported successfully 
into Eclipse. David.

- Original Message -
From: "Ryan Gravener" 
To: users@wicket.apache.org
Cc: "david" 
Sent: Friday, May 29, 2009 4:53:33 PM GMT -06:00 US/Canada Central
Subject: Re: Wicket Quickstart vs WIA eclipse projects: why so different?

Yes, that is the real students dream.

mvn eclipse:eclipse


On Fri, May 29, 2009 at 5:51 PM, Igor Vaynberg wrote:

> why dont you just start the project from eclipse directly using the
> Start class, that way you get debug and hotswap - which should be the
> real "student's dream" :)
>
> -igor
>
> On Fri, May 29, 2009 at 2:53 PM, David Brown
>  wrote:
> > Hello Martin, Jeremy, dev, gurus, users and mortals. I have just finished
> ch. 13 of the WIA.pdf. I have followed closely the reading using the
> wicket-in-action eclipse project. I have the wicket-in-action running under
> the: mvn jetty:run. The wicket-in-action project is redeployed every 60
> seconds (a student's dream). After finishing the 13th chapter I decided to
> leave the nest for the 1.4rc QuickStart. The new QuickStart project expanded
> and imported into the Eclipse workspace no-problemo. The mystery is what am
> I doing wrong to get the automatic 60 second re-deploy. As it stands now I
> have to kill jetty, mvn package and then restart jetty (mvn jetty:run). I
> have pasted in the:
> >
> >
> > **
> > 
> >configuration
> >development
> > 
> > **
> >
> > from the wicket-in-action web.xml but no change. The Windows cmd console
> shows the usual Wicket WARNING: running in development mode. I plan to use
> the wicket-in-action almost verbatim including the Hibernate DAO for my
> current gig. It is probably only a few weeks before they start holding my
> feet to the fire.
> >
> > Please advise, David.
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

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



Re: Wicket Quickstart vs WIA eclipse projects: why so different?

2009-05-29 Thread David Brown
Hello Igor, thanks for the reply. Can I just ignore the QuickStart embedded 
jetty and install jetty on Eclipse then do a run-as without any issues? Please 
advise, David.


- Original Message -
From: "Igor Vaynberg" 
To: users@wicket.apache.org
Cc: "david" 
Sent: Friday, May 29, 2009 4:51:02 PM GMT -06:00 US/Canada Central
Subject: Re: Wicket Quickstart vs WIA eclipse projects: why so different?

why dont you just start the project from eclipse directly using the
Start class, that way you get debug and hotswap - which should be the
real "student's dream" :)

-igor

On Fri, May 29, 2009 at 2:53 PM, David Brown
 wrote:
> Hello Martin, Jeremy, dev, gurus, users and mortals. I have just finished ch. 
> 13 of the WIA.pdf. I have followed closely the reading using the 
> wicket-in-action eclipse project. I have the wicket-in-action running under 
> the: mvn jetty:run. The wicket-in-action project is redeployed every 60 
> seconds (a student's dream). After finishing the 13th chapter I decided to 
> leave the nest for the 1.4rc QuickStart. The new QuickStart project expanded 
> and imported into the Eclipse workspace no-problemo. The mystery is what am I 
> doing wrong to get the automatic 60 second re-deploy. As it stands now I have 
> to kill jetty, mvn package and then restart jetty (mvn jetty:run). I have 
> pasted in the:
>
>
> **
> 
>    configuration
>    development
> 
> **
>
> from the wicket-in-action web.xml but no change. The Windows cmd console 
> shows the usual Wicket WARNING: running in development mode. I plan to use 
> the wicket-in-action almost verbatim including the Hibernate DAO for my 
> current gig. It is probably only a few weeks before they start holding my 
> feet to the fire.
>
> Please advise, David.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

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


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



Re: Wicket Quickstart vs WIA eclipse projects: why so different?

2009-05-29 Thread Igor Vaynberg
like i said, the best way is to right click the Start class and do run
as java application. you can, of course, do it any other way you like
- including installing jetty eclipse launcher plugin.

-igor

On Fri, May 29, 2009 at 3:17 PM, David Brown
 wrote:
> Hello Igor, thanks for the reply. Can I just ignore the QuickStart embedded 
> jetty and install jetty on Eclipse then do a run-as without any issues? 
> Please advise, David.
>
>
> - Original Message -
> From: "Igor Vaynberg" 
> To: users@wicket.apache.org
> Cc: "david" 
> Sent: Friday, May 29, 2009 4:51:02 PM GMT -06:00 US/Canada Central
> Subject: Re: Wicket Quickstart vs WIA eclipse projects: why so different?
>
> why dont you just start the project from eclipse directly using the
> Start class, that way you get debug and hotswap - which should be the
> real "student's dream" :)
>
> -igor
>
> On Fri, May 29, 2009 at 2:53 PM, David Brown
>  wrote:
>> Hello Martin, Jeremy, dev, gurus, users and mortals. I have just finished 
>> ch. 13 of the WIA.pdf. I have followed closely the reading using the 
>> wicket-in-action eclipse project. I have the wicket-in-action running under 
>> the: mvn jetty:run. The wicket-in-action project is redeployed every 60 
>> seconds (a student's dream). After finishing the 13th chapter I decided to 
>> leave the nest for the 1.4rc QuickStart. The new QuickStart project expanded 
>> and imported into the Eclipse workspace no-problemo. The mystery is what am 
>> I doing wrong to get the automatic 60 second re-deploy. As it stands now I 
>> have to kill jetty, mvn package and then restart jetty (mvn jetty:run). I 
>> have pasted in the:
>>
>>
>> **
>> 
>>    configuration
>>    development
>> 
>> **
>>
>> from the wicket-in-action web.xml but no change. The Windows cmd console 
>> shows the usual Wicket WARNING: running in development mode. I plan to use 
>> the wicket-in-action almost verbatim including the Hibernate DAO for my 
>> current gig. It is probably only a few weeks before they start holding my 
>> feet to the fire.
>>
>> Please advise, David.
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

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



congrats to inmethod

2009-05-29 Thread Cristi Manole
I was trying to see if the inmethod site still links the (best) wicket
data/tree table (although i knew it's been moved to wicket-stuff) and I
stumbled on the new site.

The site looks great and so does the service. Congrats to Matej... Igor
(brix in action) ?... and best of luck with it.

Why didn't you guys promote it here?

http://www.inmethod.com

-- 
Cristi Manole

Nova Creator Software
www.novacreator.com


Re: nested loop view

2009-05-29 Thread Luther Baker
In my case, I was adding something to 'this' instead of the parent / outer
item:

I think the line

*add(new ListView("reportItems", reportItems) {*

is implicitly

*this.add(new ListView("reportItems", reportItems) {*

and likely not what you want ... try changing it to

*listItem*.add(new ListView("reportItems", reportItems) {


or in context:

add(new ListView("reportList", reportVector) {
   public void populateItem(final ListItem listItem) {
   Vector reportItems = ((ReportDAO)
listItem

 .getModelObject()).getReportItems();
*  listItem.add(new ListView("reportItems",
reportItems) {*


If that doesn't work for you - post the stack trace and try to match up the
line numbers to the source you've posted and someone here might spot the
problem.

-Luther



On Thu, May 28, 2009 at 11:26 PM, khamis0o wrote:

>
> Can you please share the solution?
> I am doing something similar and I get java.lang.IllegalArgumentException:
> A
> child with id 'reoirtItems' already exists
>
>
> /*java*/
> add(new ListView("reportList", reportVector) {
>public void populateItem(final ListItem listItem) {
>Vector reportItems =
> ((ReportDAO) listItem
>
>  .getModelObject()).getReportItems();
>add(new ListView("reportItems", reportItems)
> {
>protected void populateItem(final
> ListItem reportItem) {
>
>ReportItem item =
> (ReportItem) reportItem
>
>  .getModelObject();
>int copyId =
> item.getCopyID();
>String image =
> item.getItemImage();
>String itemClass =
> item.getItemClass();
>String itemSubClass =
> item.getItemSubClass();
>String itemLocation =
> item.getItemLocation();
>String actionDate =
> item.getActionDate();
>String status =
> item.getState();
>String userID =
> item.getUserID();
>
>reportItem.add(new
> Label("image",
>(image ==
> null) ? "Unavailable" : image));
>reportItem
>.add(new
> Label(
>
>"itemClass",
>
>(itemClass.equals("NA") || itemClass == null) ? "Unavailable"
>
>: itemClass));
>reportItem.add(new
> Label("itemSubClass",
>
>  (itemSubClass == null) ? "Unavailable"
>
>: itemSubClass));
>reportItem.add(new
> Label("itemLocation",
>
>  (itemLocation == null) ? "Unavailable"
>
>: itemLocation));
>reportItem
>.add(new
> Label("actionDate",
>
>actionDate == null ? "Unavailable"
>
>: actionDate));
>reportItem.add(new
> Label("status",
>status ==
> null ? "Unavailable" : status));
>reportItem.add(new
> Label("user",
>userID ==
> null ? "Unavailable" : userID));
>}
>
>});
>
>}
>});
> /*HTML*/
> 
>
>
>
>-
>
>
>
>[image path]
>
>
>
>
>Title:
>
>[Item's Title]
>
>
>
>Class:
>
>[class]
>
>
>
>
>Sub-Class:
>
>[subclass]
>
>
>
>
>
>Location:
>
>[location]
>
>
>
>
>
>Date:
>
>[Action
> Date]
>
>
>
>
>Status:
>
>[item state]
>
>
>

CheckGroup and AjaxPagingNavigator

2009-05-29 Thread Julian Sinai

I'm having trouble with my usage of CheckGroup and AjaxPagingNavigator.

If the user checks one or more checkboxes on one page of my data table, then 
navigates to the next page, the choices on the first page are forgotten. In my 
application, they need to be remembered. This was not a problem before I 
switched to Ajax paging navigation.

If someone can help, I'd appreciate it.

Thanks,
Julian

More detail:

I'm using the DataView/IDataProvider pattern for my data table. 
I'm using CheckGroup, Check, and CheckGroupSelector for the checkboxes in my 
data table.

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



Re: AjaxLazyLoadPanel fallback version?

2009-05-29 Thread yong mook kim

hi thanks igor, 

   i got the same solution in Wicket in action book as well...however the flush 
blank page sometime really annoying

sorry about the fallback button again, according to you..

" we use javascript to override the default behavior - thus if no 
javascript is there then nothing is overridden and the button works like a 
regular button instead of ajax"

Can this concept apply to AjaxLazyLoadPanel as well? use Javascript to  
override the default page load behavior thus if no javascript is there then 
nothing is overridden and the page load works like a regular button instead of 
ajax...? Is this sound crazy or technically impossible?


--- On Fri, 5/29/09, Igor Vaynberg  wrote:

> From: Igor Vaynberg 
> Subject: Re: AjaxLazyLoadPanel fallback version?
> To: users@wicket.apache.org
> Date: Friday, May 29, 2009, 12:14 PM
> you can ask wicket to figure out if
> the browser supports javascript or not, see
> 
> getApplication().getRequestCycleSettings().setGatherExtendedBrowserInfo()
> 
> the way the fallback button works is that it is a regular
> button and
> we use javascript to override the default behavior - thus
> if no
> javascript is there then nothing is overridden and the
> button works
> like a regular button instead of ajax.
> 
> -igor
> 
> On Fri, May 29, 2009 at 4:51 AM, yong mook kim 
> wrote:
> >
> > hi,
> >
> >   Thanks, i agree with your point. However what i
> want is a browser's javascript detect function, if
> isJavascriptEnable() then load the LazyLoadPanel else fall
> back to normal panel behaviour.
> >
> > something like below
> >
> > Page start
> >
> > if(isJavascriptEnable()){
> >   add(new AjaxLazyLoadPanel('123')...
> > }else{
> >   add(new ABCPanel('123')
> > }
> >
> > Page end
> >
> > I wonder how Wicket AjaxFallBackButton work?
> >
> >
> >
> >
> >
> > --- On Fri, 5/29/09, Martijn Dashorst 
> wrote:
> >
> >> From: Martijn Dashorst 
> >> Subject: Re: AjaxLazyLoadPanel fallback version?
> >> To: users@wicket.apache.org
> >> Date: Friday, May 29, 2009, 7:26 AM
> >> It's called Panel. Either your users
> >> have to have javascript enabled
> >> and you can use LazyLoadPanel, or you have to use
> direct
> >> Panel's.
> >>
> >> There is no way to lazy load anything without
> having to
> >> resort to
> >> JavaScript. Think about it. How could you instruct
> the
> >> browser to
> >> retrieve and replace a part of your page after a
> given
> >> time?
> >>
> >> The only thing that comes to mind is using
> iframes.
> >>
> >> Martijn
> >>
> >> On Fri, May 29, 2009 at 12:09 PM, yong mook kim
> 
> >> wrote:
> >> >
> >> > Hi,
> >> >
> >> >  When browser's Javascript is disabled,
> >> AjaxLazyLoadPanel's image (wicket ajax deafult
> image) will
> >> keep loading forever, page will not return. Is
> there a
> >> AjaxLazyLoadPanel fallback version which will
> delegate to
> >> normal request if javascript is disabled?
> >> >
> >> > I wonder how Wicket detect the browser's
> javascript is
> >> disabled?  Thanks
> >> >
> >> > regards
> >> > yong
> >> >
> >> >
> >> >
> >> >
> >> >
> >>
> -
> >> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >> > For additional commands, e-mail: users-h...@wicket.apache.org
> >> >
> >> >
> >>
> >>
> >>
> >> --
> >> Become a Wicket expert, learn from the best: http://wicketinaction.com
> >> Apache Wicket 1.3.5 is released
> >> Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.
> >>
> >>
> -
> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >> For additional commands, e-mail: users-h...@wicket.apache.org
> >>
> >>
> >
> >
> >
> >
> >
> -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 
> 




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



Re: AjaxLazyLoadPanel fallback version?

2009-05-29 Thread yong mook kim

Thanks Cristi Manole, ya your ideas is great, this open my mind to the 
unlimited possibilities in Wicket :)

and as Igor said, how we know the javascript support when rendering the
first page? Do you have alternative solution for this ?


--- On Fri, 5/29/09, Igor Vaynberg  wrote:

> From: Igor Vaynberg 
> Subject: Re: AjaxLazyLoadPanel fallback version?
> To: users@wicket.apache.org
> Date: Friday, May 29, 2009, 2:05 PM
> and what if you need to know
> javascript support when rendering the
> first page as you often do?
> 
> the solution we have is generic and works well. it may not
> be optimal
> for everyone, so of course you are welcome to roll your
> own.
> 
> -igor
> 
> On Fri, May 29, 2009 at 10:56 AM, Cristi Manole 
> wrote:
> > I don't remember now exactly so i'm just typing
> whatever i think it's ok,
> > but on some project we checked some javascript related
> stuff using something
> > like the following
> >
> > on html
> > 
> > function callWicket() {
> >    wicketAjaxGet(callback + '¶meter=value',
> function() {}, function()
> > {});
> > }
> > 
> >
> > where callback is an extends
> AbstractDefaultAjaxBehaviour that if it gets
> > called, you have js,
> >
> > dummyDiv.add(new
> AjaxSelfUpdatingTimerBehavior(Duration.seconds(whatever)) {
> >   �...@override
> >    protected void
> onPostProcessTarget(AjaxRequestTarget target) {
> >        target.appendJavascript("callWicket();");
> >    }
> > });
> > dummyDiv.add(behavior);
> >
> > We got rid of the div through ajax after being used.
> if js is not enabled, I
> > wouldn't have the self updating timer doing anything
> in the first place.
> >
> > Maybe it's stupid, maybe it's too much but it worked
> for us, without any
> > redirect, without showing anything to the user. And
> once you have it in a
> > component, I don't care about it, just dumb it to the
> page.
> >
> > Cristi Manole
> >
> > On Fri, May 29, 2009 at 2:39 PM, Igor Vaynberg 
> > wrote:
> >
> >> thats exactly what the redirect page does
> >>
> >> you can of course implement the check yourself but
> you need to know
> >> that on server side so it has to be submitted
> somehow.
> >>
> >> -igor
> >>
> >> On Fri, May 29, 2009 at 10:36 AM, Cristi Manole
> 
> >> wrote:
> >> > In order to have something like that, I have
> to specifically mention
> >> > something in my WebApplication class, right
> (if i remember correctly) ?
> >> And
> >> > I think the way wicket works for browser
> extend is to redirect to some
> >> page
> >> > where it reads this info. I think it's too
> much just to see the support
> >> for
> >> > js.
> >> >
> >> > Why not go the easy way and have some kind of
> html tag that holds a value
> >> > like x. Through javascript I change that
> value like y. I tie that with a
> >> > wicket:id to read it. If it's x, I have js.
> >> >
> >> > Or what i'm saying is not valid?
> >> >
> >> > Cristi Manole
> >> >
> >> > On Fri, May 29, 2009 at 1:14 PM, Igor
> Vaynberg  >> >wrote:
> >> >
> >> >> you can ask wicket to figure out if the
> browser supports javascript or
> >> not,
> >> >> see
> >> >>
> >> >>
> >>
> getApplication().getRequestCycleSettings().setGatherExtendedBrowserInfo()
> >> >>
> >> >> the way the fallback button works is that
> it is a regular button and
> >> >> we use javascript to override the default
> behavior - thus if no
> >> >> javascript is there then nothing is
> overridden and the button works
> >> >> like a regular button instead of ajax.
> >> >>
> >> >> -igor
> >> >>
> >> >> On Fri, May 29, 2009 at 4:51 AM, yong
> mook kim 
> >> >> wrote:
> >> >> >
> >> >> > hi,
> >> >> >
> >> >> >   Thanks, i agree with your point.
> However what i want is a browser's
> >> >> javascript detect function, if
> isJavascriptEnable() then load the
> >> >> LazyLoadPanel else fall back to normal
> panel behaviour.
> >> >> >
> >> >> > something like below
> >> >> >
> >> >> > Page start
> >> >> >
> >> >> > if(isJavascriptEnable()){
> >> >> >   add(new
> AjaxLazyLoadPanel('123')...
> >> >> > }else{
> >> >> >   add(new ABCPanel('123')
> >> >> > }
> >> >> >
> >> >> > Page end
> >> >> >
> >> >> > I wonder how Wicket
> AjaxFallBackButton work?
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> > --- On Fri, 5/29/09, Martijn
> Dashorst 
> >> >> wrote:
> >> >> >
> >> >> >> From: Martijn Dashorst 
> >> >> >> Subject: Re: AjaxLazyLoadPanel
> fallback version?
> >> >> >> To: users@wicket.apache.org
> >> >> >> Date: Friday, May 29, 2009, 7:26
> AM
> >> >> >> It's called Panel. Either your
> users
> >> >> >> have to have javascript enabled
> >> >> >> and you can use LazyLoadPanel,
> or you have to use direct
> >> >> >> Panel's.
> >> >> >>
> >> >> >> There is no way to lazy load
> anything without having to
> >> >> >> resort to
> >> >> >> JavaScript. Think about it. How
> could you instruct the
> >> >> >> browser to
> >> >> >> retrieve and replace a part of
> your page after a given
> >> >> >> time?
> >> >> >>
> >> >> >> The only thing that comes to
> mind i

DropDownChoices: How to force a selection.

2009-05-29 Thread Marco Santos
Hello There.
Im creating a page where the user can either create or update a registry. I
have a few DropDownChoices, and i am trying, on the case o updating a
registry, to set the a specific value of the choices of the dropdownchoice.
Does any one know how? I have tryed to set a value on the PropertyModel that
i use on the creation of the DDC.

Here is the creation of the DDC:

private void buildDistritosComboBox() {
DistritosModel distritosModel = new DistritosModel();
SelectedChoice selectedDistrito = new SelectedChoice();//A class
with a variable selectedChoice and it getter and setter
DropDownChoice distritosDDC = new DropDownChoice("distritos", new
PropertyModel(selectedDistrito, "selectedChoice"), distritosModel);
distritosDDC.setOutputMarkupId(true);
distritosDDC.setRequired(true);
}

Thanks a lot
-- 
Marco Santos