Re: When NOT to use models ?

2009-10-25 Thread Martin Makundi
 What I found was that I was instantiating my LDM's as private variables in
 my custom components but that they were not being detached.  In this case
 you need to programatically register your non default models to participate
 in the detachment process.  See the Wiki here for an example:
 http://cwiki.apache.org/confluence/display/WICKET/Working+with+Wicket+models#WorkingwithWicketmodels-ManagingthelifecycleofnondefaultdetachableIModel%27s

Which part there in particular? I read it and it didn't yet ring my bell...

is there really another way to register for onDetach events apart
from the model being directly involved in render cycle as a
formcomponent's or another component's defaultmodel?

 For your option 3 I would say you should create a custom IModel
 implementation that is aware of your caching strategy so that your
 Component's don't need to care about how the data is loaded.

Well.. that's the dream ;) Furthermore, I would like it to be more or
less automatic. Maybe models like:

1. SettingThisModelWillResetCacheModel extends IModel
2. SettingThisModelWillNOTResetCacheModel extends IModel

Furthremore, they would probably be created using a factory method in
a cache manager:

CacheManager cacheManager = new CacheManager(detachableToo);

cacheManager.newIndependentCachedModel(IModel ...)
cacheManager.newCachedModelWhoseChangeFiresExpire(IModel ...)

AND maybe I could chain cacheManagers to say cache manger A will
expire if any of its dependent managers B-C-D expire.

Also it should be easy to add
cacheManager.addCacheExpirationListener(Runnable ..) or something.

...

Anybody else need something like this? We could write a draft and see
if it works and continue improving the design.

**
Martin



 Your implementation could hold a Map of all related models and update
 according to your rules or better yet build a service that does the caching
 and dirty detection and then just have the LDM source the cell value from
 the service.  Something like:

 new LoabableDetachableModel () {

    protected CellValue load () {

           return cellService.getValue (row, col);
  }
 }

 Regards,

 Mike

 evaluated only one time per render can be done with
 LoadableDetachedModel ..


 I do not mean LOADED once per render. I mean EVALUATED once per
 render. In my understanding LoadableDetachableModel does not guarantee
 reset in any particular stage.



 can you explain it a littly bit (a link to your original message?)


 I mean for rexample I have many models like this:

 new AbstractReadOnlyModelString() {
   public String getObject() {
      // evaluate message with some logic
      return message;
   }
 }

 Furthermore, I have several components that, say, depend on this
 value. This getObject() will be called many times durung render and
 the logic will be evaluated many times.

 If I make it detachable it will yes be detached but I am not sure that
 the detaching is guaranteed at some specific point in request cycle?

 To make my use case more clear I will give an example: say I have a
 wicket page with a panel that contains a table with columns rows and y
 rows. Furthermore, let's assume it is a spreadsheet emulator: you can
 write formulas into the cells that depend on the other cells which
 means that the value of each cell is recursively evaluated dependent
 on the other cell's values.

 Requirements:
 1. During render time each cell's model value should be cached once it
 has been evaluated (we do not want to recurse many times to fetch the
 same value).
 2. If the value of any cell changes, all the dependent cells should be
 (for example) ajax refreshed and re-evaluated. For simplicity, we
 could re-set the cache of all models when change occurs. And
 redraw-all.
 3. We want to reset cache ONLY if change occurs.

 In my understanding requirement 3 cannot be directly reached with
 detachable models.

 **
 Martin





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



Re: Absolute static file references

2009-10-25 Thread Luther Baker
Thanks Igor.

We're not having performance issues. I'm just mapping what we traditionally
do to Wicket. I did come across

CSSPackageResource.getHeaderContribution(style/default/main.css));

which seems to do exactly what I was looking for.

Back to your point, I guess I understood that Wicket 'could' manage
resources - I'm just not sure when it 'should' manage them. I generally
consider it a best practice to let the server handle static CSS and
potentially huge js and img files but it sounds like you're suggesting
start by managing the resources within Wicket and wait until performance
issues actually start popping up and then consider externalizing them.
What's nice to see is that Wicket appears to handle either approach pretty
well.

Also, ContextImage hit the nail on the head. Thanks for the suggestion

-Luther


On Sat, Oct 24, 2009 at 4:42 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote:

 have you actually hit a scalability problem?

 if you are trying to optimize upfront you can use a less invasive
 technique. all resource urls in wicekt are served under the
 /resources/ virtual folder. you can enable the setting where wicket
 will append a last-modified date to the end of each resource url, and
 then have an apache-side cache to cache and serve everything under
 /resources/.

 alternatively see how ContextImage works if you want to serve your own
 stuff out of webapp folder.

 -igor

 On Sat, Oct 24, 2009 at 10:53 AM, Luther Baker lutherba...@gmail.com
 wrote:
  Have another question about serving up CSS (JS, img, etc) files
 statically:
 
  a) I'd like to have the option to serve my CSS up statically via an
 apache
  proxy. I'd also like to avoid serving CSS requests up via the wicket
 filter
  - even if served up by Jetty - as I think it will scale just a bit better
  ...
  b) With my current URL mounts, many pages with different base URLs refer
 to
  the same CSS file. Consequently, a relative URL for the common CSS files
 as
  referenced in the master template won't work since the CSS file would be
  looked up relative to each different URL mount point.
 
  Does that makes sense? So, I would like to create a simple, absolute
  reference mechanism for my static CSS, image or other files (without
  hardcoding).
 
  I'm not as knowledgeable about the way that components are mapped to
 wicket
  tags, how to add my own tags or even how to create my own components
 (other
  than Panels of course). Does the approach below adhere to the wicket
 way?
  It feels a bit manual ... and I'm not fond of the static WEB_CONTEXT
  assignment - but I don't see an elegant/efficient way to get it from
 within
  the Page or the AbstractBehavior on a per request basis.
 
  Just looking for a bit of advice.
 
  Does the WIKI have some detailed docs that really get into the nitty
 gritty
  of low-level component and tag design? IE: Details of ComponentTag,
  MarkupElement, WicketTag,
 
  On the other hand, is there any strong advice to put custom CSS, image
 and
  JS files in the classpath and reference ala wicket or is my approach
  perfectly reasonable here. An alternate goal of mine to keep custom
  components/solutions to a minimum.
 
  Thanks in advance,
 
  -Luther
 
 
 
  *MARKUP IN:*
 
  head
 link wicket:id=head.link rel=stylesheet
  href=style/default/main.css/
  /head
 
  *MARKUP OUT:*
 
  head
 link rel=stylesheet href=*/portal/*style/default/main.css/
  /head
 
  *JAVA*
 
 final static String WEB_CONTEXT  =
  WebApplication.get().getServletContext().getContextPath();
 
 protected DefaultPageTemplate()
 {
 //
 
 http://www.mkyong.com/wicket/how-to-dynamic-add-attribute-to-a-html-tag-in-wicket/
 
 final WebMarkupContainerWithAssociatedMarkup cssLink = new
  WebMarkupContainerWithAssociatedMarkup(head.link);
 add(cssLink);
 
 cssLink.add(new AbstractBehavior()
 {
 private static final long serialVersionUID = 1L;
 
 @Override
 public void onComponentTag(final Component component,
final ComponentTag tag)
 {
 String href = tag.getAttribute(href);
 href = WEB_CONTEXT + / + href;
 tag.put(href, href);
 }
 });
 }
 

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




Re: Proposal: Fake implementation of AjaxRequestTarget instead of null

2009-10-25 Thread Sven Meier

Hi,

thinking more about this 'issue' I realized that in these simple cases 
one can just use a simple helper method:


onclick(target) {
 AjaxHelper.addComponent(componentToReRenderOnAjaxRequest);
}

It was already discussed how components could automagically be added for 
re-rendering on each AjaxRequest.
Such a feature would make a lot of calls to 
AjaxRequestTarget#addComponent() obsolete.


Regards

Sven

Vladimir K wrote:

Although it is possible I wouldn't recommend authoring certainly different UI
basing on the asynchronisity of the request. For instance I experience
inconvinience when mistakely opening Outlook Web Access in Firefox instead
of MS IE and seeing a bit different non-ajaxy UI.

All the handlers of fallback components in my code perform the same logic
for ajax and non-ajax requests. The only difference is that I have to tell
Wicket what components are invalidated due to changes in data model. I find
it to be a good design style. That sort of information is just a garbage for
the current Wicket rendering algorithm but thing could be different in the
future if you decided to optimize the re-rendering process.

From the other hand I would prefer to just call RequestTarget.isAjax() to
distinguish what interface I should present to the user in case when it is
reasonable different. Checking whether the object is null is much dangerous
and non-self-descriptive. IMHO it is no-no design practice.

Since the number of fallback components is pretty small it is not difficult
to derive from them some project-local components and wrap event handling in
a manner I proposed to guard from NPE. But intention was to improve the
Wicket API not only for that particular case.


igor.vaynberg wrote:
  

On Sat, Oct 24, 2009 at 7:18 AM, Sven Meier s...@meiers.net wrote:



I don't think he meant a *complete* no-op request target, just the method
addComponent() would be a no-op. The fake request target will rerender
the
complete page as any other standard request would do.
  

this is not possible. all public contracts of the request target have
to be properly implemented. eg if a component was added it should be
returned by getcomponents(), also any registered listeners have to be
notified, etc.

i really dont understand the point of this change. if you have a fake
ajaxrequesttarget then the code for a fallback is essentially a noop,
so your app is broken in fallback.

most of the code i have written that utilizes the fallback
functionality looks like this:

onclick(target) {
  if (target==null) {
setresponsepage(new editpage(...));
  } else {
setupInp+laceEditPanel();
  }
}

the workflows are divergent.

-igor



BTW why don't we get rid of all those AjaxFallback... components and just
let *all* Ajax... components support use of a standard HTML request as
fallback?

Regards

Sven

Martin Grigorov wrote:
  

I think he meant wasting CPU cycles for constructing your components
which will be added to no-op ajaxrequesttarget

then you'll have to make check like if (target instanceOf
NullAjaxRequestTarget) {return;} which is not better than before

El sáb, 24-10-2009 a las 12:18 +0200, Andreas Petersson escribió:



I think it absolutely makes sense (for a future release of wicket).
having a NullObject instance of AjaxRequestTarget would not waste a lot
of cpu cycles at all, at least not how i use it. the only thing i do
with
the object is call .addComponent() and then refering a
already-initialized
variable.

how likely is it that the object is in fact null? its 5% of users who
have javascript disabled. so this would affect only a small amount of
requests.

from a jvm perspective calling methods with empty bodys very often is
not
something expensive. they will get inlined by the hotspot compiler and
be
effectively free. (i am not 100% sure if this also applys to
polymorphism
chains.)

from a clean-code prespective it is often considered a code smell to
have a lot of null checks.
in your example providing a FakeDatabaseConnection that throws an
UnsrupportedOperationException(you have no database!) is better than
seeing a null pointer exception.


  

Sounds weird.

Why should my component burn cpu cycles to feed a fake ajax target
which
does nothing at all?

I would prefer some null checks in that case.

Would you also provide a FakeDatabaseConnection in case you
application
does not support databases? :-)


Am 24.10.2009 um 07:42 schrieb Vladimir Kovalyuk:




I believe all those null-checks of request target can be omited in
user
code
if fallback components would provide fake implementation of
AjaxRequestTarget instead of passing null.

Does it make sense?

  

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



  

-
To 

Re: Proposal: Fake implementation of AjaxRequestTarget instead of null

2009-10-25 Thread Vladimir K

Consistent UI is very important for the user, isn't it? It has nothing in
common with my liking.

My proposal is about how to make the Wicket user life simpler. Not only by
omitting coding null-checks. It is about bugs related to forgotten
null-checks. And it is about consistent API.

I strive to limit the places where use of instanceof operator is by-design.


igor.vaynberg wrote:
 
 On Sat, Oct 24, 2009 at 5:23 PM, Vladimir K koval...@gmail.com wrote:

 Although it is possible I wouldn't recommend authoring certainly
 different UI
 basing on the asynchronisity of the request. For instance I experience
 inconvinience when mistakely opening Outlook Web Access in Firefox
 instead
 of MS IE and seeing a bit different non-ajaxy UI.
 
 just because something is not to your liking doesnt mean it should
 not be possible, so modify your proposal accordingly.
 
 From the other hand I would prefer to just call RequestTarget.isAjax() to
 distinguish what interface I should present to the user in case when it
 is
 reasonable different. Checking whether the object is null is much
 dangerous
 and non-self-descriptive. IMHO it is no-no design practice.
 
 in that case it should just be an onclick() inside which you can do:
 
 if (requestcycle.getrequesttarget() instanceof ajaxrequesttarget) {
  
 }
 
 -igor
 
 
 

 Since the number of fallback components is pretty small it is not
 difficult
 to derive from them some project-local components and wrap event handling
 in
 a manner I proposed to guard from NPE. But intention was to improve the
 Wicket API not only for that particular case.


 igor.vaynberg wrote:

 On Sat, Oct 24, 2009 at 7:18 AM, Sven Meier s...@meiers.net wrote:

 I don't think he meant a *complete* no-op request target, just the
 method
 addComponent() would be a no-op. The fake request target will rerender
 the
 complete page as any other standard request would do.

 this is not possible. all public contracts of the request target have
 to be properly implemented. eg if a component was added it should be
 returned by getcomponents(), also any registered listeners have to be
 notified, etc.

 i really dont understand the point of this change. if you have a fake
 ajaxrequesttarget then the code for a fallback is essentially a noop,
 so your app is broken in fallback.

 most of the code i have written that utilizes the fallback
 functionality looks like this:

 onclick(target) {
   if (target==null) {
     setresponsepage(new editpage(...));
   } else {
     setupInp+laceEditPanel();
   }
 }

 the workflows are divergent.

 -igor


 BTW why don't we get rid of all those AjaxFallback... components and
 just
 let *all* Ajax... components support use of a standard HTML request as
 fallback?

 Regards

 Sven

 Martin Grigorov wrote:

 I think he meant wasting CPU cycles for constructing your components
 which will be added to no-op ajaxrequesttarget

 then you'll have to make check like if (target instanceOf
 NullAjaxRequestTarget) {return;} which is not better than before

 El sáb, 24-10-2009 a las 12:18 +0200, Andreas Petersson escribió:


 I think it absolutely makes sense (for a future release of wicket).
 having a NullObject instance of AjaxRequestTarget would not waste a
 lot
 of cpu cycles at all, at least not how i use it. the only thing i do
 with
 the object is call .addComponent() and then refering a
 already-initialized
 variable.

 how likely is it that the object is in fact null? its 5% of users
 who
 have javascript disabled. so this would affect only a small amount of
 requests.

 from a jvm perspective calling methods with empty bodys very often is
 not
 something expensive. they will get inlined by the hotspot compiler
 and
 be
 effectively free. (i am not 100% sure if this also applys to
 polymorphism
 chains.)

 from a clean-code prespective it is often considered a code smell
 to
 have a lot of null checks.
 in your example providing a FakeDatabaseConnection that throws an
 UnsrupportedOperationException(you have no database!) is better
 than
 seeing a null pointer exception.



 Sounds weird.

 Why should my component burn cpu cycles to feed a fake ajax target
 which
 does nothing at all?

 I would prefer some null checks in that case.

 Would you also provide a FakeDatabaseConnection in case you
 application
 does not support databases? :-)


 Am 24.10.2009 um 07:42 schrieb Vladimir Kovalyuk:



 I believe all those null-checks of request target can be omited in
 user
 code
 if fallback components would provide fake implementation of
 AjaxRequestTarget instead of passing null.

 Does it make sense?


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





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

Re: Proposal: Fake implementation of AjaxRequestTarget instead of null

2009-10-25 Thread Vladimir K

I use similar approach and wondering.
... how to make sure that one year later another developer will realize that
there is a helper for her convinience?


svenmeier wrote:
 
 Hi,
 
 thinking more about this 'issue' I realized that in these simple cases 
 one can just use a simple helper method:
 
 onclick(target) {
   AjaxHelper.addComponent(componentToReRenderOnAjaxRequest);
 }
 
 It was already discussed how components could automagically be added for 
 re-rendering on each AjaxRequest.
 Such a feature would make a lot of calls to 
 AjaxRequestTarget#addComponent() obsolete.
 
 Regards
 
 Sven
 
 Vladimir K wrote:
 Although it is possible I wouldn't recommend authoring certainly
 different UI
 basing on the asynchronisity of the request. For instance I experience
 inconvinience when mistakely opening Outlook Web Access in Firefox
 instead
 of MS IE and seeing a bit different non-ajaxy UI.

 All the handlers of fallback components in my code perform the same logic
 for ajax and non-ajax requests. The only difference is that I have to
 tell
 Wicket what components are invalidated due to changes in data model. I
 find
 it to be a good design style. That sort of information is just a garbage
 for
 the current Wicket rendering algorithm but thing could be different in
 the
 future if you decided to optimize the re-rendering process.

 From the other hand I would prefer to just call RequestTarget.isAjax() to
 distinguish what interface I should present to the user in case when it
 is
 reasonable different. Checking whether the object is null is much
 dangerous
 and non-self-descriptive. IMHO it is no-no design practice.

 Since the number of fallback components is pretty small it is not
 difficult
 to derive from them some project-local components and wrap event handling
 in
 a manner I proposed to guard from NPE. But intention was to improve the
 Wicket API not only for that particular case.


 igor.vaynberg wrote:
   
 On Sat, Oct 24, 2009 at 7:18 AM, Sven Meier s...@meiers.net wrote:

 
 I don't think he meant a *complete* no-op request target, just the
 method
 addComponent() would be a no-op. The fake request target will rerender
 the
 complete page as any other standard request would do.
   
 this is not possible. all public contracts of the request target have
 to be properly implemented. eg if a component was added it should be
 returned by getcomponents(), also any registered listeners have to be
 notified, etc.

 i really dont understand the point of this change. if you have a fake
 ajaxrequesttarget then the code for a fallback is essentially a noop,
 so your app is broken in fallback.

 most of the code i have written that utilizes the fallback
 functionality looks like this:

 onclick(target) {
   if (target==null) {
 setresponsepage(new editpage(...));
   } else {
 setupInp+laceEditPanel();
   }
 }

 the workflows are divergent.

 -igor

 
 BTW why don't we get rid of all those AjaxFallback... components and
 just
 let *all* Ajax... components support use of a standard HTML request as
 fallback?

 Regards

 Sven

 Martin Grigorov wrote:
   
 I think he meant wasting CPU cycles for constructing your components
 which will be added to no-op ajaxrequesttarget

 then you'll have to make check like if (target instanceOf
 NullAjaxRequestTarget) {return;} which is not better than before

 El sáb, 24-10-2009 a las 12:18 +0200, Andreas Petersson escribió:

 
 I think it absolutely makes sense (for a future release of wicket).
 having a NullObject instance of AjaxRequestTarget would not waste a
 lot
 of cpu cycles at all, at least not how i use it. the only thing i do
 with
 the object is call .addComponent() and then refering a
 already-initialized
 variable.

 how likely is it that the object is in fact null? its 5% of users
 who
 have javascript disabled. so this would affect only a small amount of
 requests.

 from a jvm perspective calling methods with empty bodys very often is
 not
 something expensive. they will get inlined by the hotspot compiler
 and
 be
 effectively free. (i am not 100% sure if this also applys to
 polymorphism
 chains.)

 from a clean-code prespective it is often considered a code smell
 to
 have a lot of null checks.
 in your example providing a FakeDatabaseConnection that throws an
 UnsrupportedOperationException(you have no database!) is better
 than
 seeing a null pointer exception.


   
 Sounds weird.

 Why should my component burn cpu cycles to feed a fake ajax target
 which
 does nothing at all?

 I would prefer some null checks in that case.

 Would you also provide a FakeDatabaseConnection in case you
 application
 does not support databases? :-)


 Am 24.10.2009 um 07:42 schrieb Vladimir Kovalyuk:


 
 I believe all those null-checks of request target can be omited in
 user
 code
 if fallback components would provide fake implementation of
 AjaxRequestTarget instead of passing null.

 Does it make sense?

 

wizard step window size / width

2009-10-25 Thread Sam Zilverberg
Hello,

I've recently created a wizard , but the wizard steps are too small for the
content I want to put in them.
How can I change a wizardstep width? or the whole wizard width?

I noticed I can override the addDefaultCssStyle method of Wizard, but am not
sure how to use this method too
make the width larger...

Thanks,
Sam


Isssues in Modal Window display in IE8

2009-10-25 Thread sakthi vel
Hello,

The modal window is not working in IE8. But it is working fine in IE7 and
Firefox.
Can anyone tell how to make modal window work in IE8.


Multiple check box in a row in the ListView

2009-10-25 Thread sakthi vel
Hello,

I have a ListView and in that each row have one label and three check boxes.

If select the first the check box, the second and third check boxes should
be selected. If I unselect the second or third check box, first check box
should be unselected if it is already selected. This should happen
distinctly for each row.

Could any one explain how to acheive this functionality.


WhiteSpaces in PasswordTextField

2009-10-25 Thread sakthi vel
Hello,

When I enter some blank spaces before or after the original password in the
password text field, i am receiving only the characters and the not the
blank spaces which are actually entered before or after the password. It
seems that the blank spaces before or after the original password gets
trimmed.


How do we get the blank spaces which are entered before or after the
original password?
If not, could you explain the factors.


Re: WhiteSpaces in PasswordTextField

2009-10-25 Thread Leo Erlandsson

protected boolean shouldTrimInput()

Determines whether or not this component should trim its input prior to
processing it. The default value is true  

Returns: True if the input should be trimmed.

seems like a good candidate.
-- 
View this message in context: 
http://www.nabble.com/WhiteSpaces-in-PasswordTextField-tp26047182p26047468.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Multiple check box in a row in the ListView

2009-10-25 Thread Martin Makundi
Hi!

Firstly, I would consider the 1st checkbox just a dymmy helper
implemented using CheckGroupSelector. I would not really care if it
reflects the two other checkboxes or not, that's an overkill. And if
still necessary, I would simply do it with javascript. Anywyays. there
is an example of wicket checkboxes here:

http://wicketstuff.org/wicket13/compref/wicket:bookmarkablePage=:org.apache.wicket.examples.compref.CheckGroupPage

For the listview I would use the following example:
http://cwiki.apache.org/WICKET/type-safe-testing-in-wicket.html



My main point being, that fiddling with checkboxes back-and-forth is
an overkill. And if you still need it, do it using lightweight
client-side javascript.

**
Martin

2009/10/25 sakthi vel vela@gmail.com:
 Hello,

 I have a ListView and in that each row have one label and three check boxes.

 If select the first the check box, the second and third check boxes should
 be selected. If I unselect the second or third check box, first check box
 should be unselected if it is already selected. This should happen
 distinctly for each row.

 Could any one explain how to acheive this functionality.


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



Re: Absolute static file references

2009-10-25 Thread Jonathan Locke


it's pure common sense.

don't prematurely optimize is just a version of don't fix what ain't
broke.


luther.baker wrote:
 
 Thanks Igor.
 
 We're not having performance issues. I'm just mapping what we
 traditionally
 do to Wicket. I did come across
 
 CSSPackageResource.getHeaderContribution(style/default/main.css));
 
 which seems to do exactly what I was looking for.
 
 Back to your point, I guess I understood that Wicket 'could' manage
 resources - I'm just not sure when it 'should' manage them. I generally
 consider it a best practice to let the server handle static CSS and
 potentially huge js and img files but it sounds like you're suggesting
 start by managing the resources within Wicket and wait until performance
 issues actually start popping up and then consider externalizing them.
 What's nice to see is that Wicket appears to handle either approach pretty
 well.
 
 Also, ContextImage hit the nail on the head. Thanks for the suggestion
 
 -Luther
 
 
 On Sat, Oct 24, 2009 at 4:42 PM, Igor Vaynberg
 igor.vaynb...@gmail.comwrote:
 
 have you actually hit a scalability problem?

 if you are trying to optimize upfront you can use a less invasive
 technique. all resource urls in wicekt are served under the
 /resources/ virtual folder. you can enable the setting where wicket
 will append a last-modified date to the end of each resource url, and
 then have an apache-side cache to cache and serve everything under
 /resources/.

 alternatively see how ContextImage works if you want to serve your own
 stuff out of webapp folder.

 -igor

 On Sat, Oct 24, 2009 at 10:53 AM, Luther Baker lutherba...@gmail.com
 wrote:
  Have another question about serving up CSS (JS, img, etc) files
 statically:
 
  a) I'd like to have the option to serve my CSS up statically via an
 apache
  proxy. I'd also like to avoid serving CSS requests up via the wicket
 filter
  - even if served up by Jetty - as I think it will scale just a bit
 better
  ...
  b) With my current URL mounts, many pages with different base URLs
 refer
 to
  the same CSS file. Consequently, a relative URL for the common CSS
 files
 as
  referenced in the master template won't work since the CSS file would
 be
  looked up relative to each different URL mount point.
 
  Does that makes sense? So, I would like to create a simple, absolute
  reference mechanism for my static CSS, image or other files (without
  hardcoding).
 
  I'm not as knowledgeable about the way that components are mapped to
 wicket
  tags, how to add my own tags or even how to create my own components
 (other
  than Panels of course). Does the approach below adhere to the wicket
 way?
  It feels a bit manual ... and I'm not fond of the static WEB_CONTEXT
  assignment - but I don't see an elegant/efficient way to get it from
 within
  the Page or the AbstractBehavior on a per request basis.
 
  Just looking for a bit of advice.
 
  Does the WIKI have some detailed docs that really get into the nitty
 gritty
  of low-level component and tag design? IE: Details of ComponentTag,
  MarkupElement, WicketTag,
 
  On the other hand, is there any strong advice to put custom CSS, image
 and
  JS files in the classpath and reference ala wicket or is my approach
  perfectly reasonable here. An alternate goal of mine to keep custom
  components/solutions to a minimum.
 
  Thanks in advance,
 
  -Luther
 
 
 
  *MARKUP IN:*
 
  head
 link wicket:id=head.link rel=stylesheet
  href=style/default/main.css/
  /head
 
  *MARKUP OUT:*
 
  head
 link rel=stylesheet href=*/portal/*style/default/main.css/
  /head
 
  *JAVA*
 
 final static String WEB_CONTEXT  =
  WebApplication.get().getServletContext().getContextPath();
 
 protected DefaultPageTemplate()
 {
 //
 
 http://www.mkyong.com/wicket/how-to-dynamic-add-attribute-to-a-html-tag-in-wicket/
 
 final WebMarkupContainerWithAssociatedMarkup cssLink = new
  WebMarkupContainerWithAssociatedMarkup(head.link);
 add(cssLink);
 
 cssLink.add(new AbstractBehavior()
 {
 private static final long serialVersionUID = 1L;
 
 @Override
 public void onComponentTag(final Component component,
final ComponentTag tag)
 {
 String href = tag.getAttribute(href);
 href = WEB_CONTEXT + / + href;
 tag.put(href, href);
 }
 });
 }
 

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


 
 

-- 
View this message in context: 
http://www.nabble.com/Absolute-static-file-references-tp26041429p26047592.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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

RE: Wicket Wizard Functionality (Extensions)

2009-10-25 Thread Corbin, James
Hi Sven,

What exactly am I supposed to implement in the
AjaxFormSubmittingBehavior.onSubmit(...)?  I've tried everything I can
think of and the popup still dismisses(closes) when I press the Next
button after completing step 1.

J

-Original Message-
From: Sven Meier [mailto:s...@meiers.net] 
Sent: Saturday, October 24, 2009 11:35 AM
To: users@wicket.apache.org
Subject: Re: Wicket Wizard Functionality (Extensions)

Hi James,

regretfully the standard Wicket dialog doesn't support non-AJAX request 
- perhaps this restriction applies to the YUI version too?

You'll have to ajax-ify the wizard - see Wizard#newButtonBar(). I've 
done it for our project but I don't have the code available at the
moment.

Regards

Sven

Corbin, James wrote:
 Hi Sven,

 I'm running the wizard in a modal popup (YUI).

 One other thing that is happening is when I press the next button in
the
 wizard that should take me to the next step, my dialog closes.  I'm
not
 sure what would cause the dialog to dismiss/close in this manner.

 J.D.

 -Original Message-
 From: Sven Meier [mailto:s...@meiers.net] 
 Sent: Saturday, October 24, 2009 8:32 AM
 To: users@wicket.apache.org
 Subject: Re: Wicket Wizard Functionality (Extensions)

 Hi James,

  but Wicket's implementation seems to only evaluate the condition at
 step
  creation and not when I'm changing the state of my radios.

 see NextButton#isEnabled() and FinishButton#isEnabled(). As far as I
can

 see these method should support your usecase. Implementing ICondition
as

 you did seems right to me.

 I assume you're notifying changes of the current radio choice to the 
 server via AJAX? Are you adding the whole wizard to the request so the

 button bar is re-rendered?

 Sven

 Corbin, James wrote:
   
 I am writing a two step wizard using wicket's wizard implementation
 
 and
   
 having some issues.

 I am using Wicket 1.4.1.

 My first wizard step contains a RadioChoice with 3 options. 

 I would like the Finish Button to be enabled on Wizard Step 1 if
 
 either
   
 the first or second radio choice is selected.  Also, if the first or
 second radio is selected, then the next button should not be enabled.

 If the 3rd Radio Choice is selected, then I want the Finish Button to
 
 be
   
 DISABLED, and the next button to be enabled so the user can go to the
 final step.

 My question

 I'm not sure how to set this up in wicket's wizard implementation.  I
 tried specifying an ICondition on step two, to only make that step
 available if the selected type is Radio Choice Option 3 from step
one,
 but Wicket's implementation seems to only evaluate the condition at
 
 step
   
 creation and not when I'm changing the state of my radios
 

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


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

   


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


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



[OT] (LONDON) maidenhead meetup

2009-10-25 Thread nino martinez wael
Hi guys

I'll be in maidenhead the next couple of days( until Wednesday), so I'll
probably have time for a small meetup or something informal? If anybody
interested.

regards Nino


Re: Proposal: Fake implementation of AjaxRequestTarget instead of null

2009-10-25 Thread Igor Vaynberg
it may very well be, but it is not a framework's job to dictate
business requirements.

-igor

On Sun, Oct 25, 2009 at 2:01 AM, Vladimir K koval...@gmail.com wrote:

 Consistent UI is very important for the user, isn't it? It has nothing in
 common with my liking.

 My proposal is about how to make the Wicket user life simpler. Not only by
 omitting coding null-checks. It is about bugs related to forgotten
 null-checks. And it is about consistent API.

 I strive to limit the places where use of instanceof operator is by-design.


 igor.vaynberg wrote:

 On Sat, Oct 24, 2009 at 5:23 PM, Vladimir K koval...@gmail.com wrote:

 Although it is possible I wouldn't recommend authoring certainly
 different UI
 basing on the asynchronisity of the request. For instance I experience
 inconvinience when mistakely opening Outlook Web Access in Firefox
 instead
 of MS IE and seeing a bit different non-ajaxy UI.

 just because something is not to your liking doesnt mean it should
 not be possible, so modify your proposal accordingly.

 From the other hand I would prefer to just call RequestTarget.isAjax() to
 distinguish what interface I should present to the user in case when it
 is
 reasonable different. Checking whether the object is null is much
 dangerous
 and non-self-descriptive. IMHO it is no-no design practice.

 in that case it should just be an onclick() inside which you can do:

 if (requestcycle.getrequesttarget() instanceof ajaxrequesttarget) {
  
 }

 -igor




 Since the number of fallback components is pretty small it is not
 difficult
 to derive from them some project-local components and wrap event handling
 in
 a manner I proposed to guard from NPE. But intention was to improve the
 Wicket API not only for that particular case.


 igor.vaynberg wrote:

 On Sat, Oct 24, 2009 at 7:18 AM, Sven Meier s...@meiers.net wrote:

 I don't think he meant a *complete* no-op request target, just the
 method
 addComponent() would be a no-op. The fake request target will rerender
 the
 complete page as any other standard request would do.

 this is not possible. all public contracts of the request target have
 to be properly implemented. eg if a component was added it should be
 returned by getcomponents(), also any registered listeners have to be
 notified, etc.

 i really dont understand the point of this change. if you have a fake
 ajaxrequesttarget then the code for a fallback is essentially a noop,
 so your app is broken in fallback.

 most of the code i have written that utilizes the fallback
 functionality looks like this:

 onclick(target) {
   if (target==null) {
     setresponsepage(new editpage(...));
   } else {
     setupInp+laceEditPanel();
   }
 }

 the workflows are divergent.

 -igor


 BTW why don't we get rid of all those AjaxFallback... components and
 just
 let *all* Ajax... components support use of a standard HTML request as
 fallback?

 Regards

 Sven

 Martin Grigorov wrote:

 I think he meant wasting CPU cycles for constructing your components
 which will be added to no-op ajaxrequesttarget

 then you'll have to make check like if (target instanceOf
 NullAjaxRequestTarget) {return;} which is not better than before

 El sáb, 24-10-2009 a las 12:18 +0200, Andreas Petersson escribió:


 I think it absolutely makes sense (for a future release of wicket).
 having a NullObject instance of AjaxRequestTarget would not waste a
 lot
 of cpu cycles at all, at least not how i use it. the only thing i do
 with
 the object is call .addComponent() and then refering a
 already-initialized
 variable.

 how likely is it that the object is in fact null? its 5% of users
 who
 have javascript disabled. so this would affect only a small amount of
 requests.

 from a jvm perspective calling methods with empty bodys very often is
 not
 something expensive. they will get inlined by the hotspot compiler
 and
 be
 effectively free. (i am not 100% sure if this also applys to
 polymorphism
 chains.)

 from a clean-code prespective it is often considered a code smell
 to
 have a lot of null checks.
 in your example providing a FakeDatabaseConnection that throws an
 UnsrupportedOperationException(you have no database!) is better
 than
 seeing a null pointer exception.



 Sounds weird.

 Why should my component burn cpu cycles to feed a fake ajax target
 which
 does nothing at all?

 I would prefer some null checks in that case.

 Would you also provide a FakeDatabaseConnection in case you
 application
 does not support databases? :-)


 Am 24.10.2009 um 07:42 schrieb Vladimir Kovalyuk:



 I believe all those null-checks of request target can be omited in
 user
 code
 if fallback components would provide fake implementation of
 AjaxRequestTarget instead of passing null.

 Does it make sense?


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





 

Re: Isssues in Modal Window display in IE8

2009-10-25 Thread Per Newgro
The only thing we had here was that transparency of background page was 
ignored. Page was displayed in black.
But that seemed to be a specific issue on some maschines. So generally 
we have no problems here

with ie8 and modal window. Can you be more precise on your issue?

Cheers
Per



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



Re: Wicket Wizard Functionality (Extensions)

2009-10-25 Thread Sven Meier

Hi Corbin,

sorry, but I have to look that part up tomorrow.

Sven


Corbin, James wrote:

Hi Sven,

What exactly am I supposed to implement in the
AjaxFormSubmittingBehavior.onSubmit(...)?  I've tried everything I can
think of and the popup still dismisses(closes) when I press the Next
button after completing step 1.

J

-Original Message-
From: Sven Meier [mailto:s...@meiers.net] 
Sent: Saturday, October 24, 2009 11:35 AM

To: users@wicket.apache.org
Subject: Re: Wicket Wizard Functionality (Extensions)

Hi James,

regretfully the standard Wicket dialog doesn't support non-AJAX request 
- perhaps this restriction applies to the YUI version too?


You'll have to ajax-ify the wizard - see Wizard#newButtonBar(). I've 
done it for our project but I don't have the code available at the

moment.

Regards

Sven

Corbin, James wrote:
  

Hi Sven,

I'm running the wizard in a modal popup (YUI).

One other thing that is happening is when I press the next button in


the
  

wizard that should take me to the next step, my dialog closes.  I'm


not
  

sure what would cause the dialog to dismiss/close in this manner.

J.D.

-Original Message-
From: Sven Meier [mailto:s...@meiers.net] 
Sent: Saturday, October 24, 2009 8:32 AM

To: users@wicket.apache.org
Subject: Re: Wicket Wizard Functionality (Extensions)

Hi James,

 but Wicket's implementation seems to only evaluate the condition at
step
 creation and not when I'm changing the state of my radios.

see NextButton#isEnabled() and FinishButton#isEnabled(). As far as I


can
  

see these method should support your usecase. Implementing ICondition


as
  

you did seems right to me.

I assume you're notifying changes of the current radio choice to the 
server via AJAX? Are you adding the whole wizard to the request so the



  

button bar is re-rendered?

Sven

Corbin, James wrote:
  


I am writing a two step wizard using wicket's wizard implementation

  

and
  


having some issues.

I am using Wicket 1.4.1.

My first wizard step contains a RadioChoice with 3 options. 


I would like the Finish Button to be enabled on Wizard Step 1 if

  

either
  


the first or second radio choice is selected.  Also, if the first or
second radio is selected, then the next button should not be enabled.

If the 3rd Radio Choice is selected, then I want the Finish Button to

  

be
  


DISABLED, and the next button to be enabled so the user can go to the
final step.

My question

I'm not sure how to set this up in wicket's wizard implementation.  I
tried specifying an ICondition on step two, to only make that step
available if the selected type is Radio Choice Option 3 from step
  

one,
  

but Wicket's implementation seems to only evaluate the condition at

  

step
  


creation and not when I'm changing the state of my radios

  

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


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

  




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


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

  



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



Advice Needed: odd BookmarkablePage problem

2009-10-25 Thread John Armstrong
Background: We have a wicket based site (http://www.pnc.net/) that is
a single page and does all of its work via Ajax.

Use Case: We are distributing Adobe PDF based forms to customers for
signup. Customers will fill out the form, click submit and acrobat
will post the form to our website.

The Problem: The url needs to be bookmarkable so Acrobat can find it.
it also needs to look human so people don't get frightened.

The Non-working solution: Since the entire site is just one page I
have taken the main body panel and special cased it:

if(this.getWebRequestCycle().getWebRequest().getPath().equals(SecureSignup)){
 centerBox = new CollectSignupResponsePanel(centerbox);
} else {
 centerBox = new PublicHomePanel(centerbox);
}

I then created a mounted URL : mountBookmarkablePage(SecureSignup,
PublicBasePage.class);

And voila, it answers on http://www.pnc.net/SecureSignup and displays
my CollectSignupResponsePanel.

The Problem: The site now thinks this is the only url and redirects
users to /SecureSignup even when they hit the root path.

So my question is, how can I mix these strategies and keep this single
page format?

Thanks, really stuck on this minor thing-
J

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



Need help with error with in my list code

2009-10-25 Thread Lester Chua
Hi,

I'm very new to wicket and need some help with what I thought is very
straight forward code.

Wicket Version 1.4.3
Code:

-- Html -

form wicket:id=dataForm
Grouping: select wicket:id=grouping size=6/select
Additional Remarks:
textarea wicket:id=additionalRemarks name=additionalRemarks/textarea
input type=submit value=In Process /
/form

-- Java --

Form dataForm = new Form(dataForm) {
  @Override
  protected void onSubmit() {
  System.out.println(Form 4 submitted);
  }
};

dataForm.add(new TextArea(additionalRemarks, new
Model(additionalRemarks)));
ListString groupings = Arrays.asList(Group 1, Group 2);
DropDownChoice grouping = new DropDownChoice(grouping, groupings);
dataForm.add(grouping);
add(dataForm);

When I visit my page, I keep getting the error:

--- Error -

WicketMessage: Unable to find component with id 'grouping' in
[MarkupContainer [Component id = dataForm]]. This means that you declared
wicket:id=grouping in your markup, but that you either did not add the
component to your page at all, or that the hierarchy does not match.

It points to select wicket:id=grouping size=6 in my html.

Removing the select lets the page render correctly.

Is the error caused by me adding a DropDownChoice component to a Form? I've
looked at the web examples and they dont seem to have a problem and yet my
simple select form cannot run. Did I misunderstand the component hierarchy?
DropDownList cannot be added to a Form?

Help will be appreciated.


Re: Need help with error with in my list code

2009-10-25 Thread Lester Chua
Update:

I found out what the was.
I was running Jetty via JavaRebel agent.
Somehow JavaRebel could not load in the changes in the Java code properly
and that was what caused the code error.
There was nothing wrong with the code.

Thanks.


On Mon, Oct 26, 2009 at 10:43 AM, Lester Chua cicowic...@gmail.com wrote:

 Hi,

 I'm very new to wicket and need some help with what I thought is very
 straight forward code.

 Wicket Version 1.4.3
 Code:

 -- Html -

 form wicket:id=dataForm
 Grouping: select wicket:id=grouping size=6/select
 Additional Remarks:
 textarea wicket:id=additionalRemarks
 name=additionalRemarks/textarea
 input type=submit value=In Process /
 /form

 -- Java --

 Form dataForm = new Form(dataForm) {
   @Override
   protected void onSubmit() {
   System.out.println(Form 4 submitted);
   }
 };

 dataForm.add(new TextArea(additionalRemarks, new
 Model(additionalRemarks)));
 ListString groupings = Arrays.asList(Group 1, Group 2);
 DropDownChoice grouping = new DropDownChoice(grouping, groupings);
 dataForm.add(grouping);
 add(dataForm);

 When I visit my page, I keep getting the error:

 --- Error -

 WicketMessage: Unable to find component with id 'grouping' in
 [MarkupContainer [Component id = dataForm]]. This means that you declared
 wicket:id=grouping in your markup, but that you either did not add the
 component to your page at all, or that the hierarchy does not match.

 It points to select wicket:id=grouping size=6 in my html.

 Removing the select lets the page render correctly.

 Is the error caused by me adding a DropDownChoice component to a Form? I've
 looked at the web examples and they dont seem to have a problem and yet my
 simple select form cannot run. Did I misunderstand the component hierarchy?
 DropDownList cannot be added to a Form?

 Help will be appreciated.



Re: Need help with error with in my list code

2009-10-25 Thread Haulyn R. Jason
I do not think JavaReble is a good tool for Wicket. Try Glassfish with
hot deploy with netbeans, works very well with Wicket.

On Mon, Oct 26, 2009 at 10:50 AM, Lester Chua cicowic...@gmail.com wrote:
 Update:

 I found out what the was.
 I was running Jetty via JavaRebel agent.
 Somehow JavaRebel could not load in the changes in the Java code properly
 and that was what caused the code error.
 There was nothing wrong with the code.

 Thanks.


 On Mon, Oct 26, 2009 at 10:43 AM, Lester Chua cicowic...@gmail.com wrote:

 Hi,

 I'm very new to wicket and need some help with what I thought is very
 straight forward code.

 Wicket Version 1.4.3
 Code:

 -- Html -

 form wicket:id=dataForm
 Grouping: select wicket:id=grouping size=6/select
 Additional Remarks:
 textarea wicket:id=additionalRemarks
 name=additionalRemarks/textarea
 input type=submit value=In Process /
 /form

 -- Java --

 Form dataForm = new Form(dataForm) {
       @Override
       protected void onSubmit() {
       System.out.println(Form 4 submitted);
       }
 };

 dataForm.add(new TextArea(additionalRemarks, new
 Model(additionalRemarks)));
 ListString groupings = Arrays.asList(Group 1, Group 2);
 DropDownChoice grouping = new DropDownChoice(grouping, groupings);
 dataForm.add(grouping);
 add(dataForm);

 When I visit my page, I keep getting the error:

 --- Error -

 WicketMessage: Unable to find component with id 'grouping' in
 [MarkupContainer [Component id = dataForm]]. This means that you declared
 wicket:id=grouping in your markup, but that you either did not add the
 component to your page at all, or that the hierarchy does not match.

 It points to select wicket:id=grouping size=6 in my html.

 Removing the select lets the page render correctly.

 Is the error caused by me adding a DropDownChoice component to a Form? I've
 looked at the web examples and they dont seem to have a problem and yet my
 simple select form cannot run. Did I misunderstand the component hierarchy?
 DropDownList cannot be added to a Form?

 Help will be appreciated.





-- 
Many thanks!

Haulyn Microproduction

You can access me with the following ways:
Location: Shandong Jinan Shumagang 6H-8, 25
Mobile: +086-15864011231
email: saharab...@gmail.com, hmp.hau...@foxmail.com
website: http://haulynjason.net
gtalk: saharab...@gmail.com
skype: saharabear
QQ: 378606292
persional Twitter: http://twitter.com/saharabear
persional Linkedin: http://www.linkedin.com/in/haulyn
Haulyn Microproduction Twitter: http://twitter.com/haulynmp


Haulyn Jason

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



Working on a Plugin Framework (Joint)

2009-10-25 Thread Ben Tilford
*A little info:
*The framework is using the Netbeans Lookup api to discover joint
implementations which are exported services using the standard
META-INF/services/xyz.Abc in addition there are annotations used to
configure how/where the plugin will be used. Example would be a wicket page,
You can configure navigation contexts where you would want to link to that
page.

Currently what I have working is wicket page navigation (ability to add
pages to an application just by dropping in a new jar file).

If anyone is interested the source with an example application is available
at https://svn.kenai.com/svn/joint~svn

Also looking for any suggestions on what types of plugins (wicket related)
or not people would like to see.

*Project Home*
http://kenai.com/projects/joint


Re: Need help with error with in my list code

2009-10-25 Thread Lester Chua
Thanks for the reference, I'll take a look at it.

On Mon, Oct 26, 2009 at 10:57 AM, Haulyn R. Jason saharab...@gmail.comwrote:

 I do not think JavaReble is a good tool for Wicket. Try Glassfish with
 hot deploy with netbeans, works very well with Wicket.

 On Mon, Oct 26, 2009 at 10:50 AM, Lester Chua cicowic...@gmail.com
 wrote:
  Update:
 
  I found out what the was.
  I was running Jetty via JavaRebel agent.
  Somehow JavaRebel could not load in the changes in the Java code properly
  and that was what caused the code error.
  There was nothing wrong with the code.
 
  Thanks.
 
 
  On Mon, Oct 26, 2009 at 10:43 AM, Lester Chua cicowic...@gmail.com
 wrote:
 
  Hi,
 
  I'm very new to wicket and need some help with what I thought is very
  straight forward code.
 
  Wicket Version 1.4.3
  Code:
 
  -- Html -
 
  form wicket:id=dataForm
  Grouping: select wicket:id=grouping size=6/select
  Additional Remarks:
  textarea wicket:id=additionalRemarks
  name=additionalRemarks/textarea
  input type=submit value=In Process /
  /form
 
  -- Java --
 
  Form dataForm = new Form(dataForm) {
@Override
protected void onSubmit() {
System.out.println(Form 4 submitted);
}
  };
 
  dataForm.add(new TextArea(additionalRemarks, new
  Model(additionalRemarks)));
  ListString groupings = Arrays.asList(Group 1, Group 2);
  DropDownChoice grouping = new DropDownChoice(grouping, groupings);
  dataForm.add(grouping);
  add(dataForm);
 
  When I visit my page, I keep getting the error:
 
  --- Error -
 
  WicketMessage: Unable to find component with id 'grouping' in
  [MarkupContainer [Component id = dataForm]]. This means that you
 declared
  wicket:id=grouping in your markup, but that you either did not add the
  component to your page at all, or that the hierarchy does not match.
 
  It points to select wicket:id=grouping size=6 in my html.
 
  Removing the select lets the page render correctly.
 
  Is the error caused by me adding a DropDownChoice component to a Form?
 I've
  looked at the web examples and they dont seem to have a problem and yet
 my
  simple select form cannot run. Did I misunderstand the component
 hierarchy?
  DropDownList cannot be added to a Form?
 
  Help will be appreciated.
 
 



 --
 Many thanks!

 Haulyn Microproduction

 You can access me with the following ways:
 Location: Shandong Jinan Shumagang 6H-8, 25
 Mobile: +086-15864011231
 email: saharab...@gmail.com, hmp.hau...@foxmail.com
 website: http://haulynjason.net
 gtalk: saharab...@gmail.com
 skype: saharabear
 QQ: 378606292
 persional Twitter: http://twitter.com/saharabear
 persional Linkedin: http://www.linkedin.com/in/haulyn
 Haulyn Microproduction Twitter: http://twitter.com/haulynmp


 Haulyn Jason

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




Setup for stepping into wicket source in eclipse

2009-10-25 Thread Flavius
 
I am trying to debug an issue and am trying to step into wicket
from my project.  However, the line numbers are not matching
up with the source I have.  I've done this several times with other
projects and this is indicative of having the wrong version of the 
source vs. the jar file.

I am using eclipse version 3.5.0.v20090611a.  I'm also using
jdk1.6.0_14.

My project is setup as a java web project and I have a webapp/
WEB-INF/lib dir with my jars.  These include wicket-1.4.3.jar, 
wicket-extensions-1.4.3.jar, and wicket-datetime-1.4.3.jar.  If I
remove the wicket jar, the project can no longer identify any
of the org.apache.wicket.* imports.  This tells me that it isn't
getting a reference to derived classes.

If I then either put the wicket jar back and set the source to the
wicket-sources.jar or simply link to the 
apache-wicket-1.4.3\src\wicket\src\main\java, I still get the same
result.

As an example, when I CTRL-click on setDefaultModelObject(), it
takes me to Component.class line 3022.  I can see it going to
wicket-1.4.3.jar org.apache.wicket.Component in my Package 
Explorer.  However, when I actually run the code and step into
that method (having attached the wicket-sources.jar), the method
setDefaultModelObject is actually on line 3031.

I've gone into the wicket src dir for wicket 1.4.3 and built the wicket
jar and sources and pulled them from the target dir and still get the
same results.

Can anybody offer any insight into this?


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