RE: Use of base tag in head seems to break AJAX

2009-05-29 Thread Chris Colman
I should have specified that this is with 1.4m2 circa May 2008 so it's a
fairly old version of Wicket.

If anyone could shed some light on this issue it would be very cool. Is
it worth trying the latest Wicket or is this not a bug but part of the
design?

Chris

 -Original Message-
 We have a site with lots of wicket AJAX working fine but we needed to
 add a
 
 base href=http://www.mysite.com/; /
 
 because the site uses a Rich Text editor that wants to convert all
 absolute links to links relative to www.mysite.com/
 
 Adding this base tag seems to have broken all AJAX on the site - no
AJAX
 method handlers get triggered anymore. When clicking on the buttons
that
 used to work the browser shows:
 
 http://www.mysite.com/#
 
 whereas before they used to show
 
 http://www.mysite.com/param1/value1#
 
 Is there a work around for this problem?
 
 -
 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



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

2009-05-29 Thread Per Lundholm
IMHO: Sounds like you need an J2EE application server more than just a
servlet container (tomcat) with all integration issues.

/Per

2009/5/28 Martijn Dashorst martijn.dasho...@gmail.com:
 Might be a dumb question, but why not make your wicket front end use
 the JAX-WS services as well?

 Martijn

 On Thu, May 28, 2009 at 10:01 PM, Christopher L Merrill
 ch...@webperformance.com 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.

 We obviously need to keep very good separation between the business logic
 and presentation layers, since there will be 2 presentation layers :

 1) We need to have an application object/singleton to hold things
 like online/offline mode - so we can, for example, bring the application
 down for maintenance and give the user an intelligent response.  In
 Wicket, I think that would be the Application object?  I assume we'll
 need to make that reference a MyApplication object - how do I expose
 that to both Wicket and the WS APIs?  JNDI?

 2) We'll want our database connection pools to also be shared...one
 of the databases is an odd-ball - Filemaker (groan) - and I'm not sure
 how to pool connections for it and share the pool between the Wicket
 app and the WS APIs?  When I've used connection pools in the past,
 it has always been something common, like MySQL, so the Tomcat configuration
 was pretty well-documented.  I'm not sure where to start with this one?

 3) Any other architecture issues I should be thinking about?  Pointers?
 Good articles that might address some of these issues?

 Thanks in advance!
 Chris


 --
  -
 Chris Merrill                           |  Web Performance, Inc.
 ch...@webperformance.com                |  http://webperformance.com
 919-433-1762                            |  919-845-7601

 Website Load Testing and Stress Testing Software  Services
  -

 -
 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





-- 
FaceBush, min insamling i Mustaschkampen:
http://www.cancerfonden.se//sv/Mustaschkampen/Kampa/Insamlingar/?collection=243

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



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

2009-05-29 Thread Adrian Wiesmann
Hello all

Christopher L Merrill ch...@webperformance.com wrote:

 We obviously need to keep very good separation between the business
 logic and presentation layers, since there will be 2 presentation layers
 :

We have a similar architectural design for our ORICO (Open RIsk and
COmpliance) Tool. There is a web client and there is a native (Swing)
client. What we did was to write Gozer (GPLv3). Gozer - as the name
implies - has something to do with XUL.

When using Gozer you describe your UI in an XML file which is converted
into a object hierarchy which is then taken by a renderer (Swing, Wicket,
FOP, Excel, ...) and rendered into the actual UI. This works quite good
with Wicket and FOP, Swing lacks a bit behind in development but is
promising as well.

So what we have is a complete abstraction of the UI logic which is then
reused for every platform without us having to rewrite anything. This of
course comes with some cut backs, but if you are willing to take them,
Gozer is the solution to build UIs very quickly.


 1) We need to have an application object/singleton to hold things
 like online/offline mode - so we can, for example, bring the
 application down for maintenance and give the user an intelligent
 response.  In Wicket, I think that would be the Application object?  I
 assume we'll need to make that reference a MyApplication object - how do
 I expose that to both Wicket and the WS APIs?  JNDI?

I'd go the entry server way where access to the web application goes
through some reverse proxy. When your application goes down, the entry
server can return a intelligent response.

Concerning the online/offline topic. What we planned is that the Swing
client can be used in offline mode. To do so, you synchronise some data
with an embedded database (Derby) prior to going offline. Since all our
primary keys are UUIDs, synching is (at least theoretically) no pain at
all.

Cheers,
Adrian

-
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
 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
jcar...@carmanconsulting.com wrote:
 On Thu, May 28, 2009 at 11:36 AM, Igor Vaynberg igor.vaynb...@gmail.com 
 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 lutherba...@gmail.com 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
   FormUser form = new FormUser(userdetailform);
   add(form);

   // The name-field
   form.add(new TextFieldString(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 ListRole roles;
  
   public User(final Integer id) {

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

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

   public void setRoles(final ListRole roles) {
   this.roles = roles;
   }
   public ListRole 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 CompoundPropertyModelUser(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
   FormUser form = new FormUser(userdetailform);
   add(form);

   // The name-field
   form.add(new TextFieldString(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 ListRole roles;
 public User(final Integer id) {
   super(id);
   roles = new ArrayListRole();
   }

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

   public void setRoles(final ListRole roles) {
   this.roles = roles;
   }
   public ListRole 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 kent.lars...@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.

-
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 jcompag...@gmail.comwrote:

 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
ch...@webperformance.com 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
jcar...@carmanconsulting.com wrote:
 On Fri, May 29, 2009 at 4:04 AM, Kent Larsson kent.lars...@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.

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

-
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 martijn.dasho...@gmail.com wrote:

 From: Martijn Dashorst martijn.dasho...@gmail.com
 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.
 
 -
 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 jcarman at carmanconsulting.com writes:
 
 On Fri, May 29, 2009 at 4:04 AM, Kent Larsson kent.larsson at 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 dto...@yahoo.com.ar 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 insert
Wicked badge here ? 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 lutherba...@gmail.com
 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 dorothee.giern...@kds-kg.de:
 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 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 dorothee.giern...@kds-kg.de

 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 dipu@googlemail.com 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 dorothee.giern...@kds-kg.de:
  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 mkyong2...@yahoo.com 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 martijn.dasho...@gmail.com wrote:

 From: Martijn Dashorst martijn.dasho...@gmail.com
 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.

 -
 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 dipu@googlemail.com 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 dorothee.giern...@kds-kg.de:
  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 lind...@visionet.de 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 dipu@googlemail.com 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 dorothee.giern...@kds-kg.de:
   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 igor.vaynb...@gmail.comwrote:

 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 mkyong2...@yahoo.com
 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 martijn.dasho...@gmail.com
 wrote:
 
  From: Martijn Dashorst martijn.dasho...@gmail.com
  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.
 
  -
  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 cristiman...@gmail.com 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 igor.vaynb...@gmail.comwrote:

 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 mkyong2...@yahoo.com
 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 martijn.dasho...@gmail.com
 wrote:
 
  From: Martijn Dashorst martijn.dasho...@gmail.com
  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.
 
  -
  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 marcin.pa...@gmail.comwrote:

 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
script type=text/javascript 
function callWicket() {
wicketAjaxGet(callback + 'parameter=value', function() {}, function()
{});
}
/script

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 igor.vaynb...@gmail.comwrote:

 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 cristiman...@gmail.com
 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 igor.vaynb...@gmail.com
 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 mkyong2...@yahoo.com
  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 martijn.dasho...@gmail.com
  wrote:
  
   From: Martijn Dashorst martijn.dasho...@gmail.com
   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.
  
   -
   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: 

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 cristiman...@gmail.com 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
 script type=text/javascript 
 function callWicket() {
    wicketAjaxGet(callback + 'parameter=value', function() {}, function()
 {});
 }
 /script

 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 igor.vaynb...@gmail.comwrote:

 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 cristiman...@gmail.com
 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 igor.vaynb...@gmail.com
 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 mkyong2...@yahoo.com
  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 martijn.dasho...@gmail.com
  wrote:
  
   From: Martijn Dashorst martijn.dasho...@gmail.com
   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.
  
   

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.

html
   head
  title wicket:id=pageTitleLabel[Page Title]/title
   /head
   body
..

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 e...@roundpeg.com 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 lind...@visionet.de 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 dipu@googlemail.com 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 dorothee.giern...@kds-kg.de:
   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
francisco.diaztre...@gmail.com wrote:
 Hi all, long time...
 I saw in some sample to label very long ago and put it in for the Page
 Title.

 html
   head
      title wicket:id=pageTitleLabel[Page Title]/title
   /head
   body
 ..

 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 igor.vaynb...@gmail.comwrote:

 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
 francisco.diaztre...@gmail.com wrote:
  Hi all, long time...
  I saw in some sample to label very long ago and put it in for the Page
  Title.
 
  html
head
   title wicket:id=pageTitleLabel[Page Title]/title
/head
body
  ..
 
  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 e...@roundpeg.com 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 e...@roundpeg.com 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 e...@roundpeg.com 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 igor.vaynb...@gmail.comwrote:

 no it is not possible and does not make sense to do so.

 imagine you have a panel that renders div id=1div id=2/div/div

 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 jrom...@gmail.com 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 jrom...@gmail.com
 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 )
  ((IRenderedString )component ).setRendered( output);
  webResponse.write(output);
  }
//
//*
The containing ProductPanel markup:
wicket:panel

div class=Products wicket:id=products id=
  div 

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 b...@juno.com 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 e...@roundpeg.com 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 e...@roundpeg.com  
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 flav...@silverlion.com 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
joern.zaeffe...@googlemail.com 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, IModelT 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(input
 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
 joern.zaeffe...@googlemail.com 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
 mbosteels@gmail.com 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 igor.vaynb...@gmail.com
 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
  joern.zaeffe...@googlemail.com 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 HiddenFieldString(csrf-protection, new
  ModelString(csrfProtection())).setRequired(true).add(new
  IValidatorString() {
         public void validate(IValidatableString 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 igor.vaynb...@gmail.com
 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
  joern.zaeffe...@googlemail.com wrote:
  Hi,
 
  my application uses a form subclass everywhere for CSRF protection.
  Each form needs a hidden field like this: input type=hidden
  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(
         input type=\hidden\ name=\).append(nameAndId).append(\
 /);
         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 MarkupStream or
 ComponentTag.
 
  Any ideas?
 
  Regards
  Jörn Zaefferer
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
  

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:


**
context-param
param-nameconfiguration/param-name
param-valuedevelopment/param-value
/context-param
**

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
dbr...@sexingtechnologies.com 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:


 **
 context-param
    param-nameconfiguration/param-name
    param-valuedevelopment/param-value
 /context-param
 **

 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 igor.vaynb...@gmail.comwrote:

 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
 dbr...@sexingtechnologies.com 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:
 
 
  **
  context-param
 param-nameconfiguration/param-name
 param-valuedevelopment/param-value
  /context-param
  **
 
  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 r...@ryangravener.com
To: users@wicket.apache.org
Cc: david da...@davidwbrown.name
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 igor.vaynb...@gmail.comwrote:

 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
 dbr...@sexingtechnologies.com 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:
 
 
  **
  context-param
 param-nameconfiguration/param-name
 param-valuedevelopment/param-value
  /context-param
  **
 
  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 igor.vaynb...@gmail.com
To: users@wicket.apache.org
Cc: david da...@davidwbrown.name
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
dbr...@sexingtechnologies.com 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:


 **
 context-param
    param-nameconfiguration/param-name
    param-valuedevelopment/param-value
 /context-param
 **

 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
dbr...@sexingtechnologies.com 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 igor.vaynb...@gmail.com
 To: users@wicket.apache.org
 Cc: david da...@davidwbrown.name
 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
 dbr...@sexingtechnologies.com 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:


 **
 context-param
    param-nameconfiguration/param-name
    param-valuedevelopment/param-value
 /context-param
 **

 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


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 igor.vaynb...@gmail.com wrote:

 From: Igor Vaynberg igor.vaynb...@gmail.com
 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 mkyong2...@yahoo.com
 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 martijn.dasho...@gmail.com
 wrote:
 
  From: Martijn Dashorst martijn.dasho...@gmail.com
  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.
 
 
 -
  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 igor.vaynb...@gmail.com wrote:

 From: Igor Vaynberg igor.vaynb...@gmail.com
 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 cristiman...@gmail.com
 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
  script type=text/javascript 
  function callWicket() {
     wicketAjaxGet(callback + 'parameter=value',
 function() {}, function()
  {});
  }
  /script
 
  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 
  igor.vaynb...@gmail.comwrote:
 
  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
 cristiman...@gmail.com
  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 igor.vaynb...@gmail.com
  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 mkyong2...@yahoo.com
   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 martijn.dasho...@gmail.com
   wrote:
   
From: Martijn Dashorst martijn.dasho...@gmail.com
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
 

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