[Wicket-user] Using a component more than once on a wicket page

2007-07-11 Thread Chris Colman
I have a wicket ID that displays a name. My wicket class adds a label
component with the appropriate name. I use that name in the markup in
the body and it works fine. I now wish to, additionally, use that name
in the title tag so that the name appears in the caption of the
browser but... wicket says has the same wicket:id as another component
already added at the same level.

Does this mean that I can't use the same component value more than once
within a single page/component? 

Is there a way to turn off reporting of this as an error? Is it really
an error to bind to a component more than once in a markup unit?


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


[Wicket-user] Using a component more than once on a wicket page

2007-07-11 Thread Chris Colman
 On 7/11/07, Johan Compagner [EMAIL PROTECTED] wrote:
  i dont think you can, because we really depend on one to onw mapping
  currently, but i gues juergen knows more on that (for example markup
  index)
 
 Yes you can.
 
  body
  span wicket:id=mainNavigation/
  span wicket:id=message id=messageMessage goes here/span
 +span wicket:id=message id=messageMessage goes here/span
  /body
  /html
 ...
   {
   return HelloWorld.class;
   }
 +
 + @Override
 + protected void init()
 + {
 + getDebugSettings().setComponentUseCheck(false);
 + }
  }
 :)
 
 Whether it is smart to depend on this is another question.

 Eelco

I'm really liking this setComponentUseCheck(false); call! It's been the
solution to my last two issues:

1. Wanted to provide Labels, MultiLineLabels etc., to markup but don't
want to insist that the markup uses them.

2. Wanted to allow markup to use the same Label, MultiLineLabal more
than once in the same piece of markup.


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


Re: [Wicket-user] Wicket-user Digest, Vol 14, Issue 85

2007-07-10 Thread Chris Colman
 Not with Wicket directly. You could take a look at the WIcket Velocity
 sub project (also found at Apache Wicket) where you have more
 flexibility regarding markup scripting.
 
 Martijn

Would it be an easy enhancement to implement? - just an option to not
raise an error if the Java component 'declares' a component that the
markup doesn't use. I don't see how that would have any negative side
effects - only a more flexible web framework, passing more
responsibility to the markup side.

 
 On 7/10/07, Chris Colman [EMAIL PROTECTED] wrote:
  I can understand that an error needs to be raised when some markup
  attempts to bind to a component who's wicket id can't be found in
the
  wicket page class or component class - that make sense but what
about
  the other way around...
 
  What if I wanted to provide a component class with a whole range of
  data: eg., name, description, image, etc., but I wanted the writer
of
  the markup to pick and choose what he/she wants displayed even
though
  their markup all links to a single wicket component class.
 
  For example: Markup author A wants to display name and description
but
  no image. Markup author B wants to display a name and an image but
no
  description.
 
  I know I can control visibility of items at the Java side but what
if I
  wanted this control at the markup side? Could wicket be configured
so it
  just ignored 'extra' fields that the Java classes provided but were
not
  used by the markup instead of throwing an exception?
 
 

 -
  This SF.net email is sponsored by DB2 Express
  Download DB2 Express C - the FREE version of DB2 express and take
  control of your XML. No limits. Just data. Click to get it now.
  http://sourceforge.net/powerbar/db2/
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
 
 --
 Wicket joins the Apache Software Foundation as Apache Wicket
 Apache Wicket 1.3.0-beta2 is released
 Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta2/
 
 
 
 --
 
 Message: 8
 Date: Tue, 10 Jul 2007 11:52:53 +0100
 From: Dipu Seminlal [EMAIL PROTECTED]
 Subject: Re: [Wicket-user] Displaying Modal Window to capture and
   display error message
 To: wicket-user@lists.sourceforge.net
 Message-ID:
   [EMAIL PROTECTED]
 Content-Type: text/plain; charset=iso-8859-1
 
 great, it works now !!!
 
 On 7/10/07, Frank Bille [EMAIL PROTECTED] wrote:
 
  On 7/10/07, Dipu Seminlal [EMAIL PROTECTED] wrote:
  
   Is there a way to display a modal window when a submit button is
 clicked
  
  
 
  I would use an AjaxButton on then in it's onError method open the
modal
  window.
 
  Frank
 
 

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


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

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


[Wicket-user] Optional wicket components

2007-07-10 Thread Chris Colman
 On 7/10/07, Chris Colman [EMAIL PROTECTED] wrote:
 
   Not with Wicket directly. You could take a look at the WIcket
Velocity
   sub project (also found at Apache Wicket) where you have more
   flexibility regarding markup scripting.
  
   Martijn
 
  Would it be an easy enhancement to implement? - just an option to
not
  raise an error if the Java component 'declares' a component that the
  markup doesn't use. I don't see how that would have any negative
side
  effects - only a more flexible web framework, passing more
  responsibility to the markup side.
 
 getDebugSettings().setComponentUseCheck(false);
 
 this is enabled by default in development mode

Heeey ... just what I want - very cool!

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


[Wicket-user] Optional bindings controlled by the markup

2007-07-09 Thread Chris Colman
I can understand that an error needs to be raised when some markup
attempts to bind to a component who's wicket id can't be found in the
wicket page class or component class - that make sense but what about
the other way around...

What if I wanted to provide a component class with a whole range of
data: eg., name, description, image, etc., but I wanted the writer of
the markup to pick and choose what he/she wants displayed even though
their markup all links to a single wicket component class.

For example: Markup author A wants to display name and description but
no image. Markup author B wants to display a name and an image but no
description.

I know I can control visibility of items at the Java side but what if I
wanted this control at the markup side? Could wicket be configured so it
just ignored 'extra' fields that the Java classes provided but were not
used by the markup instead of throwing an exception?

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


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

2007-05-20 Thread Chris Colman
 This extend  child thing really didn't seem to be intuitive at all.
 However, once I completely removed it things became more clear.
 
 1) It has no id tag.. So w/o asking or rtfm you're not going to know
 what's going on
 2) Wouldn't naming the hierarchy parent  child be more logical? In
 english.. extend + child have no relation...

I suppose it's a philosophical question on a number of levels. The first
level is whether inheritance is a parent/child relationship - I mean no
offence to anyone reading this but, clearly, inheritance is not a
parent/child relationship. To confuse parent/child with
superclass/subclass (or base class/derived class in the more accurate
but old fashion terminology) is a mistake. Subclasses are not children
of their superclass.

If I have a Vehicle class and extend that to make MotorCycle and
Automobile classes then these subclasses are not 'children' of the
vehicle class. They 'extend' vehicle but they are not 'owned by it' or
'born from it'. Parent/child is not an inheritance relationship - it's
an association relationship. Anyone who uses the world 'child' in an
inheritance context probably skipped the first lecture of their OO 1.0.1
course and stayed at the bar.

So let's pretend to ignore that word 'child' is used in this way in
wicket and move to the next philosophical issue: Is the extent/child tag
'the' inheritance relationship or is it just the mechanism that allows
us to take advantage of inheritance in the markup domain (for the first
time in any framework I've seen - which is why I like wicket so much)
and allows a derived class' markup to provide markup to fill a gap
specified in the base class' markup. I believe that in wicket the
'extend/child' tag is the latter.

It's really just like a virtual method in a class definition. You're
declaring some aspect within the base class for which no implementation
is provided in that base class but which must be provided in some class
that extends that base class. We do this all the time in OO - and we are
allowed to provide multiple instances of these in any class, not just
one instance per class, and we therefore give each instance a different
name. The implementation is provided in a subclass by a method that has
a matching name. This is how true and more powerful markup inheritance
could work in wicket. Naming would only be necessary in situations where
more than one markup chuck needs to be 'overridden' or provided in a
subclass.

Sure some of this could be done by creating extra Panel components but
sometimes I just have some markup that is common to only a portion of my
hierarchy. It seems fudgy to have to create new Panel components to
achieve what can be achieved at a markup level quite quickly and easily
and with less code and less classes.

 3) Instead of relying on the idea of child tags.. Just add more panels
 or other components that fit your need.  You have to break out of the
OO
 mindset a bit, but there's a lot of potential once you think outside
the
 bun.

I've aborted the adoption of all other Java UI frameworks I've ever
found because they forced me to break out of the OO mindset. I came to
wicket, and I'm guessing many other OOers have also because it, more
than any other UI framework, let's me keep my OO mindset that has been
the source of all my successes and the production of robust, high
quality, maintainable solutions for my clients over the last 15 years.

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


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

2007-05-18 Thread Chris Colman
 It is not possible in wicket...
 You can have at most one wicket:child tag per page...
 This is because Java does not support multiple inheritance...
 This question has been posted on the mailing list earlier. Give a
search
 to find out more about this subject.

I don't believe that this is an issue that requires a multiple
inheritance.

I see individual wicket:child sections as more like abstract/(virtual)
methods whose implementation is not provided in the base class but it is
provided in a derived class. Now Java supports multiple abstract methods
in a class without a problem. All that is needed is a way to name the
individual wicket:child sections so that wicket knows which bits in
the derived markup are providing the implementations via wicket:extend
(which could refer to the child section they are 'overriding'. 

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


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

2007-05-18 Thread Chris Colman
 As Alex says, wicket:child tags can't solve this because that's not
 the way they're intended to be used.

I can't see why wicket could not be easily enhanced to support multiple
overridden child sections. Just like the astract methods of a class -
there is no limit on the number of them: a class can have any number
abstract methods and they can be overridden by any derived class - not
just immediate descendents and they don't have to all be overridden in
the same class - just so long as an implementation is provided somewhere
in the inheritance hierarchy for any concrete class.

In wicket the wicket:child is just a placeholder for content that will
be implemented/provided in a derived class. It just seems strange that
the number of possible placeholders, n, was arbitrarily set to n = 1 in
the architecture.

Having only 1 alleviates the need to identify the placeholder in a
derived class but that is the only reason I can see why the maximum
number of placeholders should have been limited to just 1.

I can see many uses for providing implementations of different child
sections at different levels of the hierarchy. You could have navigation
column, main column and footer being child sections. With a deep
hierarchy you could provide 'extend' sections that provide the content
for the child sections at various points in the hierarchy. You might
provide footer markup via one common base class and then in classes that
extend that class provide different navigation and main column markup
but they all share a common footer. Another class might provide a
different footer and have other classes extending it that provide
different navigation and main column markup.

For backwards compatibility with the current system you could say that
if there is only one child section then no label is required but if you
choose to add more than one child section then you must label them (just
like providing an abstract method signature).

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


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

2007-05-18 Thread Chris Colman
 You should read wicket:child tag  as extends keyword... 
 This way wicket works.

I would like to read wicket:child as the 'abstract' keyword - then,
like abstract methods, I'm telling wicket that an implementation will be
provided for this 'placeholder' in a markup that extends this markup
and, like abstract methods, I can have more than one of them per markup.

The 'extends' part is already declared by the hierarchy of my Java
classes. I have inheritance (extends) in my page class hierarchy
regardless of whether or not I choose to use the wicket:extend keyword
- which is much more akin to declaring deferred method implementation
(overloading) than class extension (although obviously it requires the
class to be extended for overloading to work).

 Why are you looking for different solution when there are many more
 which works great?

I use panels extensively but I wish to be able to use my extensive page
class hierarchy to cleverly dictate which panels get loaded by the
different classes in various places in the page class hierarchy.

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


[Wicket-user] Embedding a parameter into an IFRAME atribute

2007-05-18 Thread Chris Colman
I need to embed an IFRAME into some wicket markup but I need to control
the URL in the src attribute. What markup can I use to generate the
parameter if possible?

iframe align=center src=http://www.myserver.com/blah?id=123
frameBorder=0 width=500 scrolling=no height=500/

I need to be able to control the 123 part of the id attribute or if
easier I could generate the entire src attribute. I just don't know how
to do this. Normally wicket likes to replace a whole tag, not just an
attribute so I'm stumped (pardon the pun!)

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


[Wicket-user] Embedding a parameter into an IFRAME atribute

2007-05-18 Thread Chris Colman
 I need to embed an IFRAME into some wicket markup but I need to
control
 the URL in the src attribute. What markup can I use to generate the
 parameter if possible?

I managed to get it work eventually: I just generated the entire IFRAME
tag in the value of a label and called
label.setEscapeModelStrings(false); on the label to prevent it escaping
the raw HTML.

I then simply placed a span wicket:id=myIframe/span tag in the
markup where I wanted the IFRAME to go. It works but I'm not sure if
it's the *correct* way to do such a thing.

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


[Wicket-user] Markup inheritance in the Panel class hierarchy

2007-05-17 Thread Chris Colman
I know and use markup inheritance in classes derived from WebPage with
great benefit. I was wondering if this same markup inheritance works at
the panel level as well. Ie., Can I use markup inheritance in the
markups for classes deriving from Panel class?

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


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

2007-05-17 Thread Chris Colman
Let's say I have a page which can be almost completely marked up in a
base class markup. There are only two sections of the page that change
in the derived pages/classes. Is it possible to use the wicket:child
tag twice in 
the one page and then have two wicket:extend tags in the derived
pages?

Markup for base page:

body
div id=master

span wicket:id=organizationHeader/

div id=bodywrap

wicket:child
/wicket:child

pThe stuff in here is common to all
pages and so I only want to define it once in this base page markup/p

wicket:child
/wicket:child

  span wicket:id=organizationFooter/

/div

/div
/body

Markup for the derived page:

body
wicket:extend
div id=maincol
span wicket:id=welcomePanel/
/div
/wicket:extend

This text is ignored - only the extend parts will be
used

wicket:extend
h1Hi there!/h1
/wicket:extend
/body

I've tried this and I get the following error message:

WicketMessage: The component [MarkupContainer [Component id = _child,
page = com.sas.av.ui.wicket.HomePage, path =
4:_body:_child.MarkupInheritanceResolver$TransparentWebMarkupContainer
, isVisible = true, isVersioned = true]] has the same wicket:id as
another component already added at the same level

Root cause:

wicket.markup.MarkupException: The component [MarkupContainer [Component
id = _child, page = com.sas.av.ui.wicket.HomePage, path =
4:_body:_child.MarkupInheritanceResolver$TransparentWebMarkupContainer
, isVisible = true, isVersioned = true]] has the same wicket:id as
another component already added at the same level
at wicket.Page.componentRendered(Page.java:936)
at wicket.Component.rendered(Component.java:1755)
at wicket.Component.render(Component.java:1534)
at wicket.MarkupContainer.renderNext(MarkupContainer.java:1334)
at
wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:982)
at wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:917)

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


[Wicket-user] Need to reload app in tomcat aftering adding a variant markup

2007-05-16 Thread Chris Colman
  This is  true, but  I understand  Chris has  a general  need for
  markup  reloading  in  production  as  well  (though  I  haven't
  understood   yet  how   Chris  creates   the  markup   files  at
  runtime). Or did  I misunderstand  that? And though  disabled in
  deployment mode by default, he  could enable it for his specific
  application.
 
 Indeed, ModificationWatcher  acting on previously not  found files
 should be done only in development mode by default, and Chris will
 just have to enable it for his deployment.

How do I do that?   Will it slow things down?

Maybe the option to add a method that allows explicit clearing of the
cache would be very useful because then we it can be high performance
most of the time and just rebuild the cache when we indicate there is a
new markup file.

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


[Wicket-user] Accessing a static resource in my webapp dir

2007-05-16 Thread Chris Colman
 Hello Matt,
 
 I'd suggest you put the CSS in the same package as your (base) page.
 Then you can do the following in the constructor:
 
 add(HeaderContributor.forCss(new
 CompressedResourceReference(MyPage.class, style.css)));

Is it possible to use this method to add a .css that isn't in the
classpath but at some fully specified URL eg.,
http://mycssserver.com/css/style.css?

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


[Wicket-user] Need to reload app in tomcat aftering adding a variant markup

2007-05-15 Thread Chris Colman
 Please open a JIRA entry, I need to think about it a little bit more.

Done: WICKET-570

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


[Wicket-user] Need to reload app in tomcat aftering adding a variant markup

2007-05-15 Thread Chris Colman
 Subject: Re: [Wicket-user] Need to reload app in tomcat aftering
   
 To: wicket-user@lists.sourceforge.net
 Message-ID: [EMAIL PROTECTED]
 Content-Type: text/plain; charset=utf-8
 
 
  resourceFinder.add(c:/webserver/tomcat/wicket/markupfiles);
 
  locator.add(0, new WebPageResourceStreamLocator(resourceFinder));
 
 I use it like this:
 
 getResourceSettings().setResourceFinder(new Path(new
 Folder(src/main/resources)));
 
 Have you tried a relative path?  Are you sure the path you mention
 is in the right form?  What version of Wicket are you using?

It has no problem finding the ones that are there when the web app is
started. It's just that it only looks once at startup. If I add a new
one after the web app has started it never finds it.

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


[Wicket-user] Need to reload app in tomcat aftering adding a variant markup

2007-05-15 Thread Chris Colman
 This is true, but I understand Chris has a general need for markup
 reloading in production as well (though I haven't understood yet how
 Chris creates the markup files at runtime). 

Yes that is true - production reloading is a must. Our staff will create
new markup and add it - while the app is running. We can't afford to
restart the server each time a new markup is added.

 Or did I misunderstand that? And though disabled in deployment mode by
 default, he could enable it for his specific application.

Possibly that could work or perhaps the idea of explicitly calling a
'clear(markup)' method on the cache might work after a new markup has
been added. Perhaps it could analyse the markup to be cleared and also
clear any super class markups as well.

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


[Wicket-user] Need to reload app in tomcat aftering adding a variant markup

2007-05-14 Thread Chris Colman
Hi, I'm still in love with Wicket but have one question:

I've got lots of different variant markups and I wish to create new ones
at various times. Wicket determines which one to use via the overridden
getVariation() method that I provide in my page class.

I'd like to be able to add new variant markups on the fly at run time
but I currently have a problem: any new markups that I add are ignored
until I reload/restart the web application. Is there anyway to get
wicket to pick up new markup variants without restarting the web
application?

[I'm guessing it's a class loader issue that's causing the problem]

I load the markups from a directory that I specify in the init of Wicket
application object (if that's relevant):

CompoundResourceStreamLocator locator =
(CompoundResourceStreamLocator)getResourceSettings().
getResourceStreamLocator();

WebApplicationPath resourceFinder = 
(WebApplicationPath)getResourceSettings().getResourceFinder();

resourceFinder.add(c:/webserver/tomcat/wicket/markupfiles);

locator.add(0, new WebPageResourceStreamLocator(resourceFinder));

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


Re: [Wicket-user] Is it possible to use setMarkupStream to assign html to a web page?

2007-05-03 Thread Chris Colman
Sounds like a similar bug I had with overriding getVariation on WebPage.
This is now fixed in 1.2.6. The wicket authors had to rearrange the
ordering of initialization to ensure that my constructor got called
before the call to my overridden getVariation method. It could be that
they may have to do a similar thing for your case.

At the time I proposed a two phase initialization solution like most OO
frameworks have adopted: 

Phase 1: Constructors are called and allowed to return resulting in
fully constructed objects.

Phase 2: The framework calls 'init' on the fully constructed object - at
this point init will be working on fully constructed objects and so
avoid the issue I had and the issue you are having with parameters not
yet being processed and member data and relationships possibly not being
in the correct state.

The wicket authors prefer the current, single phase construction
approach, over a two phase initialization approach because it avoids the
task of writing 'init' methods but given that just about every other OO
framework I've ever used uses two phase initialization of objects I
think that wicket will continue to suffer bugs like yours and mine.

As wicket's popularity snowballs they're going to get more and more
propeller head users like you and me that have a great idea and then try
and implement it in wicket - often going where no man or woman has gone
before and pushing things to the edge of breaking. To date they've been
able to rearrange things under the bonnet to work around my issue and I
hope they can do that with your issue too but I fear that one day
someone is going to come up with a great idea that won't elegantly work
with a single phase construction/initialization mechanism. I don't know
how what the outcome of that would be.

 hrm. i would consider that a bug i think. i dont see why it would get
 called
 before constructor. can you set a breakpoint in there and paste the
 stacktrace please.
 
 -igor
 
 
 On 5/3/07, Thomas R. Corbin [EMAIL PROTECTED] wrote:
 
  I don't see any way to delay the markup processing/loading until
  after I can examine the PageParameters.

Exactly what my problem was.

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


Re: [Wicket-user] Creating Entire Forms in Java Code Only?

2007-04-12 Thread Chris Colman
 Thanks, Igor, for taking the effort to answer my question. I so
understand
 that one of the core vision statements is separation of concerns. I am
 evaluating Click but haven't ruled out Wicket - just that some aspects
of
 Click seem less cumbersome because separation of concerns is not a
 priority
 there - Click seems to suit what I need better than what Eelco had
 suggested much earier: Echo.

This is interesting because I'm traveling in the exact opposite
direction:

I've been using Echo for more than a year for the highly interactive
parts of the site where users enter data - we will continue to do this
in the foreseeable future. However, the presentation of that data in
read only views (pages) is also extremely important and it is desirable
to provide that presentation in a wide variety of formats and styles so
we use Wicket for this and override the getVariation() method in our
pages and panels to support this feature. So we have a kind of 'hybrid'
web app: Echo+Wicket.

I've ended up appreciating the ability to drive layout and style changes
and variations via separate (HTML) markup a lot more since we started
using Wicket. We no longer have to change a Java class then recompile,
run, test to see how the change looks. We just edit the HTML markup in a
WYSIWYG HTML editor getting it to look how we want (with liberal use of
wicket:remove tags) and when done we just Save and then hit refresh in
the browser - the changes are visible right away in our web app when
wicket regenerates the page using the latest markup.

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] markup inheritance

2007-04-02 Thread Chris Colman
Will markup inheritance work at both the page level and component level
at the same time and with multiple components having their own
inheritance hierarchies?

Eg.,

BasePageA
DerivedPageA
 BaseComponentX
DerivedComponentX
   BaseComponentY
DerivedComponentY

I thought I should ask before I attempt such a feat.

Also, can many different panels contribute to the head using
wicket:head?

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Another markup inheritance question

2007-04-02 Thread Chris Colman
Will wicket support markup inheritance to any depth or only single level
inheritance?

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Lifecycle issue with getVariation

2007-03-30 Thread Chris Colman
 can you show us your code?
 ...
 ah, sorry.  this is the code i take it.  just not in response to my
 original post (at least on nabble).

There is possibly an even simpler solution using onAttach - overriding
it in WebPage:

onAttach()
{
commonInit();

init();
}

public void init()
{
// developers can override this in their own pages to perform
// any post construction initialization
}

With this solution RequestCycle and BookmarkablePageRequestTarget don't
need to be touched.

Possible issues with the onAttach option:

1. The commonInit might not get called until a little later than it does
with the original option.
2. Users still have to remember to call super.onAttach in their
overridden handlers though this could be rectified by creating a new
method internalOnAttach that only the framework calls:

public void internalOnAttach()
{
if ( !inited )
commonInit();

onAttach();
}

For some reason the first option 'feels more elegant' because it remains
independent of the 'attach' phase of the lifecycle. There may be issues
with coupling the init and the attach phases of the lifecycle together
like that.

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Lifecycle issue with getVariation

2007-03-30 Thread Chris Colman
 Okay, here's my opinion:
 
 People have been using Wicket for years now and this is the first bug
 of this type I have heard of.  I am very reluctant attempt any sort of
 generic framework-level fix to the semantics of Java object
construction
 (regardless of how anyone feels about the practices defined by the
JLS).

All OO languages share similar semantics of object construction and the
same issues arise when attempting to use partially constructed objects
in any of them so it's not an issue specific to Java object
construction.

It's a 20 year old problem that has been solved time and time again in
many different OO languages and different frameworks by using a two
phase initialization pattern but if you've found a way to fix the
getVariation issue without resorting to a two phase initialization
pattern then that's great - let me at it!!! Like I said, that's the only
issue I need to have fixed right now.

 Java objects construct the way that they do and we use Java object
 constructors because we like that simplicity.  Your bug is reported
and
 will be fixed.

Any time schedule for that?

Back in my day we didn't need Tapestry, or Wicket or WebObjects, or
even Servlets, or for that matter Java! We just coded in plain assembly
language. And before that we had to just type in 1's and 0's. Sometimes
we didn't even have 1's. I once had to code for an entire month,
barefoot, in the dead of winter, using just 0's... but you didn't hear
me complaining.

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Storing markup in directory separarte from web app

2007-03-28 Thread Chris Colman
Is it possible to store the HTML markup in a separate directory that is
not part of the web app or web server directory structure?

If necessary I could mimic the classpath in the separate directory so
the HTMLs are stored in similarly named directories to their
corresponding Java classes.

I've looked around the website but can't find any hints as to how to do
this. If it is possible how do you do it?

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Lifecycle issue with getVariation

2007-03-28 Thread Chris Colman
 there is a reason why some of the stuff is done where it is. now,

I believe that with the minor change that I have made everything is
still being done in the exact same order so there should be no
consequences of this change. It's just that all the stuff done in
commonInit is now being slightly deferred so that it uses completely
constructed objects instead of partially constructed objects - that
can't be a bad thing can it?

I've certainly had no trouble with my page creation and usage with this
change - in fact things that I couldn't get to work before now work
perfectly! 

Source changes: I've taken a more inclusive, simpler approach that
changes RequestCycle and BookmarkablePageRequestTarget instead of
changing the DefaultPageFactory. This means absolutely no explicit
calling of the commonInit method by users. I had to change 3 pages in
the test cases so that they do their init in commonInit instead of the
constructor and all test cases now succeed.

I can make available a copy of my modified 1.2.5 source with all changes
clearly marked if any one is interested.

Java is interesting in that virtual methods appear to 'semi' work on
partially constructed objects (which can make you think everything is
fine). C++ on the other hand did not allow the virtual function
mechanism to work properly until objects were completely constructed. So
prior to constructor completion, for non abstract methods, C++ just
calls the current class' method instead of the most derived class'
method and, for abstract methods, it could result in the strange but
extremely useful 'call of pure virtual (abstract) function' error.

When you got that error you knew you were dancing with the devil. I
think Java lets you keep on dancing...

 im not sure there is a reason for the markup loading for bodcontainer,
 we might be able to do that lazily when getbodycontainer() is called.

Other frameworks (eg,. Echo2) handle this partial construction problem
by automatically calling an init method on the class whenever you add it
to the system after instantiation. The user doesn't need to (and
shouldn't) explicitly call init() as it's done for them. They can even
override init() if they want to but must first call super.init() prior
to doing any of their own initialization work.

In fact this is the exact pattern of initialization that you have
implemented for wicket's WebApplication. It seems to make sense to me
that the same pattern would apply to WebPage.

 juergen are you reading with us?
 
 -igor


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Storing markup in directory separarte from web app

2007-03-28 Thread Chris Colman
 there is also an example in wicket-examples
 
 -igor
 
 On 3/28/07, Eelco Hillenius [EMAIL PROTECTED] wrote:
 
  Wow, that's even for version 1.0. :) I guess we should have just one
  page, explaining 1.3 and as a note mentioning the difference for
1.2.
  I think we can ditch anything pre 1.2
 
  Eelco

I have just followed the 1.2 example and it works really well. I was
envisaging a problem with caching and pages not reflecting changes that
I make to the markup but that doesn't happen - it all works perfectly.

Thanks again,
Chris

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Lifecycle issue with getVariation

2007-03-28 Thread Chris Colman
 i'm not sure what i think about this yet.  can you show us the
 exact code modifications and use cases you have coded up?
 (boiled down to the important parts, if possible) 

Ok, here's the changed bits you requested. Only 3 Java classes need
minor changes in the framework:

[I added the deferred init to WebPage but a more simpler approach is to
add the auto init mechanism to Page to avoid the need for casting.
Option: You could make the mechanism switchable via an application
setting so that existing code and test cases work in the same way as
they do now]

RequestCycle.java

public final void setResponsePage(final Page page)
{
// CJC 20070329 - added to auto init WebPages to allow
// getVariation to work properly
if ( page instanceof WebPage )
{
WebPage webPage = (WebPage)page;
if ( !webPage.isInitialized() )
webPage.commonInit();
}

IRequestTarget target = new PageRequestTarget(page);
setRequestTarget(target);
}

WebPage.java

// CJC 20070329 - defer commonInit till after complete
construction
/** true when the page has been initialized */
private boolean initialized = false;

/**
 * Returns the initialization state. This is used by other parts
of
 * the framework that will automatically call commonInit on
 * uninitialized pages
 */
public boolean isInitialized()
{
return initialized;
}

public void commonInit()
{
// CJC 20070329 - defer commonInit till after
// complete construction
initialized = true;

...
}

+remove the commonInit calls from WebPage constructors

BookmarkablePageRequestTarget.java

private final Page getPage(RequestCycle requestCycle)
{
if (page == null  pageClass != null 
!requestCycle.getRedirect())
{
page = newPage(pageClass, requestCycle);

// CJC 20070329 - added to auto init WebPages to
allow
// getVariation to work properly
if ( page instanceof WebPage )
{
WebPage webPage = (WebPage)page;
if ( !webPage.isInitialized() )
webPage.commonInit();
}
}
return page;
}

In terms of use cases they're basically our own app plus all the wicket
test cases. Three test cases required initialization to be performed in
an overridden commonInit instead of the constructor to work - which is
standard for most OO frameworks of any kind, not just UI frameworks
(MFC::createWindow, OWL::SetupWindow) - you just don't want to be
playing with partially constructed objects.

 also, it would be good if you could explain how this solves any
problems
 other than getVariation().

getVariation is the biggy at the moment for me but I'm sure as more
users adopt wicket they'll come up with similar scenarios that highlight
this problem. It's feasible to come up with scenarios that don't even
involve framework features but rather, a user's own WebPage derived
class hierarchy.

This example will cause problems doing initialization in the
constructors:

class BasePage
{
public BasePage(params)
{
addTitleComponent();
}

public void addTitleComponent()
{
calls getTitle() to get text of the title and creates a
Label
}

public abstract String getTitle();
}

class MyPage extends BasePage
{
String title = null;

public MyPage(params)
{
title = use params to lookup a particular 
object in database andget its name
}

// !! this gets called before the constructor has initialized
title !!
public String getTitle() { return title; }
}

I trust that's informative enough to help you guys make a good decision
on how to deal with this but if you need anything else please let me
know.

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Lifecycle issue with getVariation

2007-03-28 Thread Chris Colman
  I believe that with the minor change that I have made everything is
  still being done in the exact same order so there should be no
  consequences of this change. It's just that all the stuff done in
  commonInit is now being slightly deferred so that it uses completely
  constructed objects instead of partially constructed objects - that
  can't be a bad thing can it?
 
 introducing a required post-construct init method is hardly a minor
 change.
 while this works well for you because you mostly use bookmarkable
pages it
 wont hold for normal apps where bookmarkable pages are a minority.

You can easily make it a switchable option in the application settings
and default to the traditional 'possibly get weird crash because you're
working on a partially constructed object' mode then everyone's existing
code will continue to work as is.

Other people, who like their objects fully constructed before using them
so that they can successfully use polymorphism in their page classes
during initialization, can switch to 'two phase initialization' mode.

 and there are in fact consequences to your change. i can no longer do
 getBodyContainer().addOnLoadModifier(...) from the constructor of my
page.
 so where am i to do it now? i need to use that post-construct
callback, so
 now there are two places where i need to initialize my component -
hardly
 simple still.

Easy if you deal with the parameters in the constructor and deal with
adding children, accessing markup etc., in the overridden init (or
commonInit) method. 

In cases where people have a number of constructors they normally create
their own separate init method anyway to avoid code duplication so it's
not that bad.

For me I'd be happy to have getVariation working properly right now but
I'm just trying to do something here for the greater good of the wicket
community and the children of the future that come to wicket
(...children are our future, teach them right and let them know the
way... but I digress) Seriously thought: there's going to be other cases
of partially constructed objects causing problems as more and more
people use wicket. Better to fix it properly now than wait until it's
too late to fix it.

 
 Source changes: I've taken a more inclusive, simpler approach that
  changes RequestCycle and BookmarkablePageRequestTarget instead of
  changing the DefaultPageFactory. This means absolutely no explicit
  calling of the commonInit method by users. I had to change 3 pages
in
  the test cases so that they do their init in commonInit instead of
the
  constructor and all test cases now succeed.
 
 
 have you also changed all other page-related request targets as well?
have
 you built safeguards to make sure this method is atomic?

Every unit test now runs successfully so if those scenarios are covered
by the wicket test suite then I've covered them with my changes.

 the fact that you had to call this method manually in tests is proof
 enough for me that what you propose does not work well.

I never had to call it manually anywhere. In a few of the tests I just
overrode commonInit and did the initialization in there after calling
super.commonInit(). There's even a technique to avoid needing to do that
call also:

WebPage.commonInit()
{
// do all the regular commonInit stuff
...

// then call virtual init() - users override init() instead of
// commonInit and they don't have to call the super class method
// to ensure that the commonInit code gets executed - it already
// has been executed. If their own base classes do stuff in init
// then they can call super.init() if they desire but the
// WebPage.init() is just an empty method and does nothing.
init();
}

 yes, we are all aware of the fact that it is not a good idea to call
 overloaded methods from the parent's constructor. like i said, the
problem
 is that getvariation() is called as a side effect of something done in
the
 commoninit method - and that is what needs to be fixed. there shouldnt
be
 a
 reason why we need to call getvariation()/load markup at construction
 time.

No one ever deliberately calls overloaded methods from parent
constructors. It always happens as an accidental side effect and will
happen in the future again I'm sure - whether in using a framework
feature or in a user's own WebPage derived classes.

 
 Other frameworks (eg,. Echo2) handle this partial construction problem
  by automatically calling an init method on the class whenever you
add it
  to the system after instantiation. The user doesn't need to (and
  shouldn't) explicitly call init() as it's done for them. They can
even
  override init() if they want to but must first call super.init()
prior
  to doing any of their own initialization work.
 
 
 yes, but in wicket we prefer constructors. they are in java for a
reason
 :)

I prefer them too - but only up to the point where they stop you from
using certain OO features during 

Re: [Wicket-user] Lifecycle issue with getVariation

2007-03-28 Thread Chris Colman
 the fact remains that getvariation() call from webpage constructor is
a
 bug we need to fix.

Yeah, that's my numero uno motivation at this point also.

 further we already have listener methods you can use - onattach and
 ondetach
 
 what you want can be just as easily accomplished on every component
 
 class mypage extends webpage {
   private boolean initted=false;
 
   public void onattach() {
  super.onattach();
  if (!initted) {
initted=true;
// perform one time initialization
   }
   }
 }

Wow, if I had used onAttach I could have made my source changes a whole
lot quicker (maybe) and only limited to one class:

WebApp.java

   private boolean initted=false;
 
   protected void init() {
   }

   private void commonInit() {
...

init(); // override this to add children etc.,
   }

   public void onattach() {
  super.onattach();
  if (!initted) {
initted=true;
// perform one time initialization
commonInit();
   }
   }

  +remove calls to commonInit from WebPage constructors.

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Flexible markup with same Java classes - autoAdd?

2007-03-27 Thread Chris Colman
I was just wondering if another possible solution to this might be to
somehow use autoAdd - ie., only add the components to the page class
when requested based on the components in the markup.

I'm not sure if the autoAdd is intended for this purpose or if it's a
completely different beast altogether but the name sounds right ;)

 Let's say I've created a Layout and corresponding Java classes for the

 following page

 --
 | Header |
 --
 |  | |
 | Menu | Content |
 |  | |
 --
 | Footer |
 --

 Each section is implemented by a separate wicket Panel derived class 
 in Java. The page itself is implemented by a derivative of wicket's 
 WebPage class in the usual manner.

 Now I use variations and so I can have lots of different markup for 
 the single set of classes detailed above.

 I want to be able to have the flexibility to leave the header out in 
 certain markup variations without wicket generating an error because 
 the page tries to add the header component.

 Is there a way to create the markup so I can do this without 
 explicitly telling the Page not to load the header component?

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Flexible markup with same Java classes

2007-03-27 Thread Chris Colman
 Let's say I've created a Layout and corresponding Java classes for the
 following page
 
 --
 | Header |
 --
 |  | |
 | Menu | Content |
 |  | |
 --
 | Footer |
 --
 
 Each section is implemented by a separate wicket Panel derived class
in
 Java. The page itself is implemented by a derivative of wicket's
WebPage
 class in the usual manner.
 
 Now I use variations and so I can have lots of different markup for
the
 single set of classes detailed above.
 
 I want to be able to have the flexibility to leave the header out in
 certain markup variations without wicket generating an error because
the
 page tries to add the header component.
 
 Is there a way to create the markup so I can do this without
explicitly
 telling the Page not to load the header component?

I though of another idea of solving this problem but I am not sure if
this is possible within the wicket page/component lifecycle model:

After construction my WebPage derived class has NO components added to
it.

As the markup is processed components are added to the page on an 'as
needed' basis.

I'm not sure which method I would need to override in my page class,
perhaps onComponentTag or onComponentTagBody? I just look at the tag's
id, look up which component class that represents and then instantiate
such and add it to the WebPage class then call super.onComponentTag() or
super.onComponentTagBody().

Will there be any problems with adding components so late in the game?

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Implement our own IComponentResolvers

2007-03-27 Thread Chris Colman
I think it would be awesome if we could implement our own
IComponentResolvers. I could make a truly markup driven page class that
loaded components specified in the markup 'on demand' as they were
parsed in the markup.

I realize that I could probably use 

wicket:component class=myApp.MyTable key=value

For this purpose but I think it's much easier if the graphics designer
only has to use:

span wicket:id=myTable/

I know the lifecycle document at 
http://www.wicket-wiki.org.uk/wiki/index.php/Lifecycle

warns against such rebellious undertakings but would it still be
possible to implement my own IComponentResolver and add components to a
page 'on demand'?

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Lifecycle issue with getVariation

2007-03-27 Thread Chris Colman
I have a constructor that takes parameters and then uses the parameters
to set up a variable that is used in getVariation().

There appears to be a lifecycle issue here because getVariation is being
called from within a base class constructor - before my constructor's
code below the super(parameters) has had a chance to get called.
Consequently getVariation() is called before the variable has been
initialized causing a NPE.

Here's the stack dump:

 at com.MyPage.getVariation(MyPage.java:66)
 at wicket.Component.getStyle(Component.java:1207)
 at wicket.markup.MarkupCache.markupKey(MarkupCache.java:371)
 at wicket.markup.MarkupCache.getMarkup(MarkupCache.java:166)
 at wicket.markup.MarkupCache.getMarkupStream(MarkupCache.java:106)
 at
wicket.MarkupContainer.getAssociatedMarkupStream(MarkupContainer.java:82
7)
 at wicket.markup.html.WebPage.commonInit(WebPage.java:235)
 at wicket.markup.html.WebPage.init(WebPage.java:120)
 at com.sas.av.ui.wicket.templates.BasePage.init(BasePage.java:66)
 at com.MyPage.init(MyPage.java:83)

Often in these cases it serves the framework users well if the basic
construction takes place first and then, only after returning from the
instantiation, further initialization is performed - initialization that
might only work properly after all constructors have been fully
executed.

Currently it appears possible for the getStyle and getVariation methods
to be invoked while a page is only semi constructed (ie., the
constructor stack has not unwound as shown above).

Is there a current workaround for this or is it possible to readjust the
Wicket lifecycle model slightly to avoid this problem?

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Lifecycle issue with getVariation

2007-03-27 Thread Chris Colman
Just looking at the source code for WebPage it looks like a very minor
change to achieve a more flexible lifecycle initialization phase.


All the WebPage constructors call

private void commonInit()

As you will no doubt understand this is being called before
construction/instantiation has properly completed - which has serious
consequences if any methods are called that rely on constructor
initialization that has not yet occurred (eg., getVariation that returns
a variation based on the constructor's parameter values).

I think the following changes would fix this problem and allow
getVariation() to work properly when it's implementation relies on
parameters passed into the constructor:

1. Remove all calls to commonInit() from the WebPage constructors.
2. Make commonInit public
3. Change the DefaultPageFactory to explicitly call commonInit on any
new page that it instantiates.


These changes, to my thinking, are quite simple with low to no ripple
effect and they allow wicket users to avoid entry into the 'world of
pain' that is 'partially constructed objects'.

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Implement our own IComponentResolvers

2007-03-27 Thread Chris Colman
 I know the lifecycle document at
 http://www.wicket-wiki.org.uk/wiki/index.php/Lifecycle
 
 warns against such rebellious undertakings but would it still be
 possible to implement my own IComponentResolver and add components to
a
 page 'on demand'?
 
 
 yes, any markup container can implement the interface. but be warned
:)

Or any class really? I've gone ahead and done it using
AutoComponentResolver as a template and it works!!!


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Lifecycle issue with getVariation

2007-03-27 Thread Chris Colman
I went ahead and implemented these changes in my copy of the wicket
source code and now I can specify a variation at the Page level (never
been able to do that before!) without causing a NPE. It works very
nicely indeed.

 what about pages that are constructed with the new operator?

I mainly use bookmarkable pages and so my pages are constructed (and now
commonInit'd) by the DefaultPageFactory - result: I didn't have to
change any of my own code to get my getVariation working properly. 

I get the feeling that error pages don't get instantiated via the
DefaultPageFactory and so I will need to find out where they are new'ed
so I can change the wicket source to call commonInit on them also.

The HelloWorld example just returns the page Class to use - ie., doesn't
do new MyPage(). So presumably the DefaultPageFactory is doing the
initialization for that one also. So HelloWorld would work ok with the
improved initialization lifecycle.

 the users then have to explicitly call commoninit() from their
 constructors?

Not necessarily. After you create a page explicitly yourself don't you
have to hand it on to 'something else' before you can use it to render a
page? That 'something else' could call a boolean isInitialized() method
and call commonInit if not already initialized. There's plenty of ways
to make this work well so users don't have to call commonInit
themselves.

 i think that is horrible. 

It would be horrible if users had to do it explicitly but I'm sure there
are ways (above example) to make it automagically done for the user so
they don't have to call commonInit themselves.

 what we need to do is somehow delay the getvariation() until
 render time.

Well, that sounds like it will fix the getVariation problem but how many
other problems are going to give us a world of pain in the future
because of the use of partially constructed WebPage objects?

The other problem is that commonInit is doing a whole lot of stuff with
the markup and it needs to know the variation to get the correct markup
- I don't see how you can defer getVariation unless you defer the whole
markup analysis code that follows the call to getVariation as well... I
ended up deferring the whole commonInit call but you might be able to
carve out a smaller portion of code to defer.

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Problem with CSS in bookmarkable page unless accessed via absolute path

2007-03-27 Thread Chris Colman
I have a markup file containing:

wicket:remove
base href=file:///c:/project1/web/ /
/wicket:remove

style type=text/css media=all
  @import url(/css/site_75965.css);
/style

The base tag lets me preview in the HTML editor - well at least it
should - but to avoid the wicket exception detailed below I have to
specify an absolute path to the .css file (ie., a leading '/'). This
then means that the HTML editor tries to find the css at c:/css instead
of c:/project1/web/css and so preview doesn't work.

Any suggestions?

ERROR - RequestCycle- URL fragment has unmatched key/value pair:
o/75965/c/css/site_75965.css
java.lang.IllegalStateException: URL fragment has unmatched key/value
pair: o/75965/c/css/site_75965.css
at
wicket.request.target.coding.AbstractRequestTargetUrlCodingStrategy.d
ecodeParameters(AbstractRequestTargetUrlCodingStrategy.java:130)
at
wicket.request.target.coding.BookmarkablePageRequestTargetUrlCodingSt
rategy.decode(BookmarkablePageRequestTargetUrlCodingStrategy.java:75)
at
wicket.protocol.http.request.WebRequestCodingStrategy.targetForReques
t(WebRequestCodingStrategy.java:331)
at
wicket.request.compound.DefaultRequestTargetResolverStrategy.resolve(
DefaultRequestTargetResolverStrategy.java:83)
at
wicket.request.compound.AbstractCompoundRequestCycleProcessor.resolve
(AbstractCompoundRequestCycleProcessor.java:48)
at wicket.RequestCycle.step(RequestCycle.java:992)
at wicket.RequestCycle.steps(RequestCycle.java:1084)


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Flexible markup with same Java classes

2007-03-26 Thread Chris Colman
Let's say I've created a Layout and corresponding Java classes for the
following page

--
| Header |
--
|  | |
| Menu | Content |
|  | |
--
| Footer |
--

Each section is implemented by a separate wicket Panel derived class in
Java. The page itself is implemented by a derivative of wicket's WebPage
class in the usual manner.

Now I use variations and so I can have lots of different markup for the
single set of classes detailed above.

I want to be able to have the flexibility to leave the header out in
certain markup variations without wicket generating an error because the
page tries to add the header component.

Is there a way to create the markup so I can do this without explicitly
telling the Page not to load the header component?

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Flexible markup with same Java classes

2007-03-26 Thread Chris Colman
 or even
 
 mypage() { add(new HeaderPanel(header) { public boolean isvisible()
{
 return !MyPage.this.getVariation().contains(noheader); }}
 
 if the header panel is pretty cheap to construct
 
 -igor

Yes that looks like an quicker and easier solution. The header is very
cheap to construct.

Thanks, I'll give it a try,

Chris

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Wicket AJAX newbie

2007-03-25 Thread Chris Colman
I've been using wicket (non AJAX) for a while now. To date all of our
Web2/AJAX stuff was done using Echo2 which hid the whole AJAX dance and
makes it look more like a Swing app.

I'm just curious how much of the AJAX dance we have to do ourselves if
we wanted to do Web 2.0 things like partial updates, modal dialog boxes
etc., with wicket/AJAX instead of Echo2.

But wait, there's more: Does Wicket use Dojo or does it implement its
own component library?

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Setting up directories to make CSS available

2007-03-14 Thread Chris Colman
 You can include
 
 wicket:remove
   base href=file:///C:/Docs%20and%20Settings/you/your-
 project/src/webapp/
 /
 /wicket:remove
 
 in your html head.

Ah cool!

Ok, so that will include the CSS at HTML edit time. What do I need to
put in a tag that is the opposite to wicket:remove? ie., not there at
edit time but there a wicket render time?

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Setting up directories to make CSS available

2007-03-14 Thread Chris Colman
Ar! On closer reading I just realized that you were using the
wicket:remove to set a base whereas I had assumed (without reading too
carefully) that you were using it to include the CSS and consequently I
was concerned that the CSS would be included twice by the HTML editor -
but not do! It all makes sense now.
 
 Just:
 
 link href=mystyle.css rel=stylesheet /
 
 Martijn
 
 On 3/14/07, Chris Colman [EMAIL PROTECTED] wrote:
   You can include
  
   wicket:remove
 base href=file:///C:/Docs%20and%20Settings/you/your-
   project/src/webapp/
   /
   /wicket:remove
  
   in your html head.
 
  Ah cool!
 
  Ok, so that will include the CSS at HTML edit time. What do I need
to
  put in a tag that is the opposite to wicket:remove? ie., not there
at
  edit time but there a wicket render time?
 

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Setting up directories to make CSS available

2007-03-13 Thread Chris Colman
I'm using wicket and trying to work out how to set up my directories so
that while editing HTML markups my HTML editor has access to the same
CSS files that will be used as run time.

The HTML markups are in my project/src/com/sas/ui/wicket directory with
my wicket component classes but being in the src directory these files
are kind of in a different realm to the normal HTML resources of the web
app.

Any ideas on how to set up directories so that I can use the CSS in both
my HTML editor and at run time?

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] IMPORTANT: your opinion on the constructor change in 2.0

2007-03-07 Thread Chris Colman
I haven't looked into great detail about the constructor changes in 2.0
but if 2.0 is more elegant or has a better architecture I'm all for the
way it does things. I fancy better engineering and can usually get
over inconveniences caused by API incompatibilities but then again I
had Borland C++ OWL 1.0 projects that had to get ported to OWL 2 when it
came out - coincidently the major changes in version 2.0 of that API
involved around the introduction of template (generics) based containers
instead of the Object based ones - 'de ja vu' with a 12 year delay!

Is there any possibility that 'backwards compatible' deprecated
constructors can be used to avoid breaking any existing code? Obviously
all new code should use the new constructors but the version 2.0 API
might be able to provide backwards compatible constructors also, a least
in the short term, to allow existing projects to integrate with the new
API 'right out of the box'.

Not sure if this is possible or already discussed but I thought I'd
throw this idea in the ring just in case no one had thought of it yet.

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Absolute minimal Hello World sample not working

2007-03-04 Thread Chris Colman
 i think this is generally an antipattern. its never a good idea to put
 jars
 like wicket,spring into server's shared lib dirs because anything
static
 then becomes shared across all webapps. it can have some strange
 sideffects.
 
 for example take wicket's springbean injection stuff. it keeps the
 injector
 in a static field, and the injector is tied to the application. so if
you
 do
 this then webapp A can get an injector that works with webapp B
because
 they
 now shared the static field that is shared across the webapps.

Yeah I don't think sharing these jars is a good idea either now. I
remember I had a problem once before - I got a run time exception when
casting from a base class in a framework jar in shared or common lib
(can't remember) to a derived class in my app. I was pulling my hair out
trying to work it out. 

I eventually discovered that when two classes are loaded by different
class loaders they are treated like two completely separate classes
(even if the package and class names are identical) - very strange. To
fix the problem I moved the framework jar to my apps own lib dir and
everything was fine - except for the hair loss.


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Defining link text for a ListView

2007-03-02 Thread Chris Colman
 instead of
 item.add(new link(categoryLink){});
 item.add(new label(categoryname))
 do
 Link link=new linke(categoryLink);
 item.add(link);
 link.add(new label(categoryname));

Ok, so Link is a kind of composite component that can have subcomponents
- like the label.

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] mountBookmarkablePage causes 'no session' error

2007-03-01 Thread Chris Colman
 are you sure you need to specify a different pagemap? that is only
needed
 when you work with frames/popups

Well actually I'm not using the version of the mountBookmarkablePage
method that takes the PageMap parameter but I'm ending up with the same
symptom - a 'no session' error. I assumed that it would be caused by the
same bug as the PageMap case.

I don't understand why, during application initialization (init()
method), a call to mountBookmarkablePage requires a session to exist -
which is impossible because no HTTP requests have yet been sent to the
web app if its just being initialized.

 
 meanwhile ive reopened the issue.

I suppose the first step is to determine if the bug affects the version
of the mountBookmarkablePage method that doesn't take the PageMap
parameter cos that's the one I'm using - otherwise these could be
unrelated bugs.

 
 -igor

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] mountBookmarkablePage causes 'no session' error

2007-03-01 Thread Chris Colman
   I tried to add some nice URLs by adding the following to my
   application class:
 
  public void init()
  {
mountBookmarkablePage(/home, HomePage.class);
mountBookmarkablePage(/location, LocationPage.class); }

My bad!!!

I accidentally had marked one the page classes as Persistent in the
Javelin tool (which obviously should only be done for domain model
classes ;) ) so it was automatically generating a .jdo metafile for the
class which meant that JDO enhanced the class. I don't know why this
caused a problem for Wicket but it's not really an issue as no UI class
should ever need to be enhanced by JDO because they should be only ever
access and manipulate domain model objects via accessor and manipulator
methods anyway - and thus don't need to be persistence-capable nor
persistence-aware and hence not enhanced.

Once I turned persistence off for my UI classes everything worked
perfectly.

Oh yeah, my URLs look a lot nicer now... after I fixed my bad.

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Specifying a class for the p's generated by MultiLineLabel

2007-03-01 Thread Chris Colman
Is it possible to specify the CSS class for the p's generated by the
MultiLineLabel component?

Currently it generates:

pfirst line/p
psecond line/p

Is it possible to get it to generate something like:

p class=myMultiLineClassfirst line/p
p class=myMultiLineClasssecond line/p

Or is there a better way to achieve this using CSS that I have missed?
Maybe via inherited properties or something?

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Congratulations on Wicket's error reporting

2007-03-01 Thread Chris Colman
I must congratulate the Wicket developers on Wicket's error reporting
system. It's truly magnificent.

Whenever I have an error in my markup or a problem in one of my Java
classes Wicket displays a HTML page with a very thorough outline of the
problem which usually contains sufficient information to point me
straight to the cause of the problem.

I find this level of error reporting very productive and beneficial.

Congratulations!

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Defining link text for a ListView

2007-03-01 Thread Chris Colman
I have a list view and I need each item in the list to display a HREF
link and text. Both the link target URL and the link text are different
for each item in the list.

Using the following causes a component 'categoryName' not found error:

span wicket:id = items
h2 style=line-height: 2px
a href=# wicket:id=categoryLink
span
wicket:id=categoryNamePizza/span
/a
/h2

span wicket:id=categoryDescHmmm, yum./span
/span

Without changing any .java files I move the categoryName span tag to
outside the HREF and it works without error - although my HREF tag link
text is wrong:

span wicket:id = items
h2 style=line-height: 2px
a href=# wicket:id=categoryLink
Fixed name but want a variable
name
/a
/h2
span wicket:id=categoryNamecategory
name/span
span wicket:id=categoryDescHmmm, yum./span
/span

How do I get content from my ListItem embedded into the a href IN HERE
/a?

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Nicer URLs

2007-02-28 Thread Chris Colman
Today I hit the critical mass of connections between neurons in my brain
required to grasp Wicket and I have to say - Wicket rocks massively!

A while back I designed my own *little* component based rendering
technology (design stage only thankfully) and Wicket looks just like the
one I was designing which is great - I no longer need to implement mine
now! It's interesting how similar Wicket is - right down to the
inheritance markup - something I regarded as a *must have* feature for
mine.  Keep up the great work.

I have a question:

Is it possible to change URLs like:

http://myserver.com/helloworld?wicket:bookmarkablePage=:com.sas.av.ui.wi
cket.templates.original.LocationPageo=76165

to something like:

http://myserver.com/helloworld/LocationPageo=76165

?

Regards.

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] mountBookmarkablePage causes 'no session' error

2007-02-28 Thread Chris Colman
I tried to add some nice URLs by adding the following to my application
class:
 
public void init()
{
  mountBookmarkablePage(/home, HomePage.class);
  mountBookmarkablePage(/location, LocationPage.class);
}
 
But then I get the following error when the web app is deployed:
 
java.lang.ExceptionInInitializerError
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at
com.sas.av.ui.wicket.templates.original.HelloWorldApplication.class$(Hel
loWorldApplication.java:40)
at
com.sas.av.ui.wicket.templates.original.HelloWorldApplication.init(Hello
WorldApplication.java:41)
 
Caused by: wicket.WicketRuntimeException: there is no session attached
to current thread http-80-1
at wicket.Session.get(Session.java:210)
at wicket.Application$1.onInstantiation(Application.java:272)
at
wicket.Application.notifyComponentInstantiationListeners(Application.jav
a:823)
at wicket.Component.init(Component.java:592)
at wicket.MarkupContainer.init(MarkupContainer.java:123)
at wicket.Page.init(Page.java:208)
at wicket.markup.html.WebPage.init(WebPage.java:128)
 
 
The HomePage and LocationPage classes are available. For some reason
wicket thinks that no session has been set up yet - which is actually
correct. Why do we need a session set up if we haven't yet had to
process a HTTP request? We're just initializing the webapp.
 
Using Wicket 1.2.4
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Nicer URLs

2007-02-28 Thread Chris Colman
 Today I hit the critical mass of connections between neurons in my
brain
 required to grasp Wicket - according to Marcus Buckingham in the book
 now, discover your strength, that is what is called Synapse

Or dendrites and axons or something. Why couldn't they just call them
conductors or wires like in electronics? It would have made it a whole
lot easier for double Es like me.

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] mountBookmarkablePage causes 'no session' error

2007-02-28 Thread Chris Colman
 On 2/28/07, Chris Colman [EMAIL PROTECTED] wrote:
 
   I tried to add some nice URLs by adding the following to my
application
  class:
 
  public void init()
  {
mountBookmarkablePage(/home, HomePage.class);
mountBookmarkablePage(/location, LocationPage.class);
  }

 can you show me a bit more stacktrace of that second trace?

Here's more of the second stack trace
Caused by: wicket.WicketRuntimeException: there is no session attached
to current thread http-80-1
at wicket.Session.get(Session.java:210)
at wicket.Application$1.onInstantiation(Application.java:272)
at
wicket.Application.notifyComponentInstantiationListeners(Application.
java:823)
at wicket.Component.init(Component.java:592)
at wicket.MarkupContainer.init(MarkupContainer.java:123)
at wicket.Page.init(Page.java:208)
at wicket.markup.html.WebPage.init(WebPage.java:128)
at
com.sas.av.ui.wicket.templates.BasePage.init(BasePage.java:57)
at
com.sas.av.ui.wicket.templates.BasePage.init(BasePage.java:67)
at
com.sas.av.ui.wicket.templates.original.OrganizationPage.init(Organ
izationPage.java:59)
at
com.sas.av.ui.wicket.templates.original.StandardPage.init(StandardP
age.java:70)
at
com.sas.av.ui.wicket.templates.original.LocationPage.init(LocationP
age.java:55)
at
com.sas.av.ui.wicket.templates.original.LocationPage.clinit(Locatio
nPage.java)
... 44 more

 Where does the constructor init starts?

Constructor init of what? The application or the page(s)?

It seems like mountBookmarkablePage method tries to instantiate the
pages. These pages always need PageParameters (they use this to process
the o= parameter so they can determine the organization to display).
Their constructors that take no parameters don't do anything because
they won't be used but it seems like when mounting a bookmarkable page
these pages are instantiated with the parameterless constructor.

Will this work or will I need to create some artifial bindings to the
markup in the parameterless constructors to keep things flowing?

 It seems you are making a static instance inside your HomePage or
 LocationPage.class??

I can't see any code that would be doing that.

 johan

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Multiple sections of markup replaced by subclassed markup

2007-02-28 Thread Chris Colman
I have a situation where I have the need to place a wicket:child / in
the head and another in the body of a superclass markup page. Ie,. The
derived class markups need the ability to provide both header (typically
javascript) and body markup to be inserted when the page is rendered.

Does wicket support multiple wicket:child / tags in a single
superclass markup page or is there a limit of 1 per page?


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Does wicket:head work with markup inheritance?

2007-02-28 Thread Chris Colman
Using a wicket:head in derived class markup as well as wicket:extend
seems to cause problems in both 1.2.4 and 1.2.5 of wicket (haven't tried
earlier versions).

The following scenario demonstrates this:

Base class markup:
--

?xml version=1.0 encoding=UTF-8?
html xmlns=http://www.w3.org/1999/xhtml; 
head
titleWicket Examples - helloworld/title
link rel=stylesheet type=text/css href=style.css/
/head

body
span wicket:id=organizationHeader/
div style=float:left;
a wicket:id=homePage href=#home/a
a wicket:id=locationPage href=#location/a
/div

wicket:child /
/body
/html

Derived class markup:
-

 ?xml version=1.0 encoding=UTF-8?
html xmlns=http://www.w3.org/1999/xhtml; 
head
titleWicket Examples - helloworld/title
link rel=stylesheet type=text/css href=style.css/
/head
body

wicket:head
   script src=http://etc.,; type=text/javascript/script
   script type=text/javascript
etc., to be placed inside head askjfkjskadf
   /script
/wicket:head

This is the super class header

wicket:extend

This text is inserted into base markup body

/wicket:extend

This is the super class footer
/body
/html

Now what happens in the resulting HTML is that the text from the derived
class' markup ends up in the head instead of in the body and the HTML
contains one opening wicket:child but two closing /wicket:child
tags.

?xml version='1.0' encoding='UTF-8'?
html xmlns=http://www.w3.org/1999/xhtml; 
head
titleWicket Examples - helloworld/title
link href=/style.css type=text/css rel=stylesheet/

wicket:childwicket:extend
span wicket:id=orgDesc id=orgDesc
Content is added here which is wrong. - should
be in body 
/span
/wicket:extend/wicket:child

script type=text/javascript !--/*--![CDATA[/*!--*/
if (window.name=='') {
window.location=/helloworld?wicket:bookmarkablePage=wicket-0:com.sas.av
.ui.wicket.templates.original.HomePageo=76165; }
/*--]]*//script

/head
body
span wicket:id=organizationHeader
wicket:panel
h1a href=/index.html target=_top style=color:
#E9601AWicket Examples/a/h1   
div id=titleblock
style=font-size:larger;height:1.5em;vertical-align:center;

  div style=float:left;
span wicket:id=orgName id=orgName369
Gourmet/span
/div

div style=float:right;padding-right:10pxSource link
was here
/div
/div
br/
  /wicket:panel

/span

div style=float:left;
a href=/helloworld?o=76165 wicket:id=homePagehome/a
a
href=/helloworld?wicket:bookmarkablePage=:com.sas.av.ui.wicket.template
s.original.LocationPageamp;o=76165
wicket:id=locationPagelocation/a

/div

wicket:child/   - !Very strange additional closing child tag!


/body
/html


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] mountBookmarkablePage causes 'no session' error

2007-02-28 Thread Chris Colman
According to the bug list on Altassian my 'no session' issue is caused
by a bug that has been recently fixed but only in Wicket 1.3 and 2.0,
not 1.2.x.

How can I get Wicket 1.3? Are the binaries available for download or do
I have to get the source and build it myself?

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Absolute minimal Hello World sample not working

2007-02-27 Thread Chris Colman
I've tried to create an absolute minimal HelloWorld sample to run in
Tomcat. I plan to use wicket as an auxiliary rendering technology for an
existing webapp so to start off with I've attempted to add just the
barest minimum classes and HTML files from the HelloWorld example but
it's not working for some reason.

I've repackaged WicketExampleApplication.*, WicketExampleHeader.* and
WicketExamplePage.* to com.sas.av.ui.wicket.templates.

I've repackaged HelloWorld.* and HelloWorldApplication.* to
com.sas.av.ui.wicket.templates.original

I've updated all the internal package statements to reflect the new
packaging.

I've added to web.xml the Servlet and Servlet mapping elements required
to configure the new wicket HelloWorld app.

When I type http://dev.myhost/helloworld into my browser I get the
following error:

HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that prevented
it from fulfilling this request.

exception

javax.servlet.ServletException: Servlet.init() for servlet
HelloWorldApplication threw exception

org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:105)

org.apache.catalina.valves.FastCommonAccessLogValve.invoke(FastCommonAcc
essLogValve.java:495)

org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:1
48)

org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.j
ava:833)

org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.proce
ss(Http11AprProtocol.java:639)

org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1285)
java.lang.Thread.run(Unknown Source)

root cause

wicket.WicketRuntimeException: Unable to create application of class
com.sas.av.ui.wicket.templates.original.HelloWorldApplication

wicket.protocol.http.ContextParamWebApplicationFactory.createApplication
(ContextParamWebApplicationFactory.java:68)
wicket.protocol.http.WicketServlet.init(WicketServlet.java:275)
javax.servlet.GenericServlet.init(GenericServlet.java:211)

org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:105)

org.apache.catalina.valves.FastCommonAccessLogValve.invoke(FastCommonAcc
essLogValve.java:495)

org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:1
48)

org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.j
ava:833)

org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.proce
ss(Http11AprProtocol.java:639)

org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1285)
java.lang.Thread.run(Unknown Source)

note The full stack trace of the root cause is available in the Apache
Tomcat/5.5.20 logs.

Any ideas?

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Wicket classes shared by multiple mark ups

2007-02-26 Thread Chris Colman
I'm new to wicket. I'm just wondering if it's possible for multiple
markups to share common wicket Java classes?
 
My aim with this is to provide different appearances and layouts by
having
multiple sets of CSS and the markup but reusing the same Wicket classes
that provide the content. Is this possible?

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Can Wicket co-exist with Echo2? Anyone tried it before?

2007-02-08 Thread Chris Colman
Currently all our interactive forms are written in Echo2 and we're
pretty satisfied with that. We wanted to render our non dynamic pages in
a component based, more OO capable technology than JSP. We could easily
implement these non dynamic pages in Echo2 but the problem is as this is
a 100% Ajax solution Google can't index that pages.

Can Wicket co-exist with Echo2 in the same web application? Obviously
will have to change the context from 'app' as Echo2 uses that context
also.

Golfman

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Wicket-user Digest, Vol 9, Issue 68

2007-02-07 Thread Chris Colman
If I avoid any AJAX in Wicket will my pages be indexable by google and
other search engines?

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Google indexing

2007-02-07 Thread Chris Colman
 From: Chris Colman [EMAIL PROTECTED]
 Subject: Re: [Wicket-user] Google indexing

  If I avoid any AJAX in Wicket will my pages be indexable by google
and
  other search engines?
 
 Only the pages that are bookmarkable. In other words: only if you
 intend them to be available without having a prior session.
 
 Eelco

Is there a special way to make a bookmarkable page in Wicket?

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Running with tomcat

2007-02-07 Thread Chris Colman
I just downloaded the wicket examples zip and managed to build them.

I think the jetty jars are inside the war. I just copied the .war into
the tomcat webapps directory and it sprung to life but I navigated to
the web app it redirected me to the 8081 port that Jetty is listening
on.

How can I run the examples as a tomcat app and what URL do I point to
once it's installed?


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user