Re: Getting at the HttpServletResponse?

2007-09-25 Thread Eelco Hillenius
On 9/24/07, Andrew Lombardi [EMAIL PROTECTED] wrote:
 I do not have my own RequestCycle, no.  Just using whatever is standard
 with Wicket.

What does it say the type is then? Can you paste the stack trace?

Eelco

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Redirect to HTTPS?

2007-09-25 Thread Eelco Hillenius
 I haven't tested but I think the solution is to override public final
 CharSequence encode(final RequestCycle requestCycle,final IRequestTarget
 requestTarget)BUT...it is final so we can't reuse the class directly but
 have to make a copy.

And this is where your alarm bells should go off. Admittedly we have
been very generous in using final, maybe sometimes a bit too much, but
the idea behind it is that we think that what you want to do  can
probably be done in a better way, or we simply don't know (and an
unrelated reason is self protection so that we have more options for
refactoring without breaking the whole world). So, any time you come
across a situation where something is final and you think you have a
really good use case to get rid of it, you should post a message here.
Chances are we can tell you a better way to do it, or you convince us
to remove final or in some other way facilitate your use case.

As for your case, I'd like to hear what Al thinks about this. It might
work to make the factor prepending into a separate, overridable
method.

Eelco

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: strange ClassCastException when deserializing a Page

2007-09-25 Thread Eelco Hillenius
Gee that looks weird. As far as I know, the only exotic stuff we do
with serializing is an optimization for page references. But I can't
see how that might relate to this.

Johan, any ideas? Any chance you could make a test case out of it Xavier?

Eelco

On 9/24/07, Xavier Hanin [EMAIL PROTECTED] wrote:
 Hi,

 I have a strange CCE on page deserialization with wicket 1.3.0-beta3:
 java.lang.ClassCastException: cannot assign instance of
 org.apache.wicket.model.PropertyModel to field
 org.apache.wicket.markup.html.WebMarkupContainerWithAssociatedMarkup.markupHelperof
 type
 org.apache.wicket.markup.html.ContainerWithAssociatedMarkupHelper in
 instance of org.xoocode.xooctory.web.component.form.LabelBorder
  at java.io.ObjectStreamClass$FieldReflector.setObjFieldValues(
 ObjectStreamClass.java:2032)
  at java.io.ObjectStreamClass.setObjFieldValues(ObjectStreamClass.java
 :1212)
  at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java
 :1951)
  at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java
 :1869)
  at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java
 :1753)
  at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
  at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1667)
  at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1323)
  at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java
 :1945)
  at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java
 :1869)
  at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java
 :1753)
  at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
  at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1667)
  at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1323)
  at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java
 :1945)
  at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java
 :1869)
  at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java
 :1753)
  at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
  at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1667)
  at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1323)
  at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java
 :1945)
  at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java
 :1869)
  at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java
 :1753)
  at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
  at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
  at org.apache.wicket.util.lang.Objects.byteArrayToObject(Objects.java
 :396)
  at
 org.apache.wicket.protocol.http.pagestore.AbstractPageStore.deserializePage(
 AbstractPageStore.java:231)
  at org.apache.wicket.protocol.http.pagestore.DiskPageStore.getPage(
 DiskPageStore.java:596)
  at
 org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLevelCachePageMap.get
 (SecondLevelCacheSessionStore.java:322)
  at org.apache.wicket.Session.getPage(Session.java:800)
  at
 org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage(
 AbstractRequestCycleProcessor.java:427)
  at org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(
 WebRequestCycleProcessor.java:139)
  at org.apache.wicket.RequestCycle.step(RequestCycle.java:1091)
  at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1177)
  at org.apache.wicket.RequestCycle.request(RequestCycle.java:500)
  at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java
 :261)
  at org.apache.wicket.protocol.http.WicketFilter.doFilter(
 WicketFilter.java:127)
  at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(
 ServletHandler.java:1065)
  at
 org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal
 (OpenSessionInViewFilter.java:198)
  at org.springframework.web.filter.OncePerRequestFilter.doFilter(
 OncePerRequestFilter.java:75)
  at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(
 ServletHandler.java:1065)
  at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java
 :365)
  at org.mortbay.jetty.security.SecurityHandler.handle(
 SecurityHandler.java:185)
  at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java
 :181)
  at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java
 :689)
  at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java
 :391)
  at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java
 :139)
  at org.mortbay.jetty.Server.handle(Server.java:285)
  at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java
 :457)
  at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(
 

Re: wicket-ajax.js not added

2007-09-25 Thread Eelco Hillenius
On 9/24/07, John Carlson [EMAIL PROTECTED] wrote:
 I have had several pages that will not initially load the wicket-ajax
 functionality.  The page will load but the throttler is missing or it
 will complain that submitFormById is undefined.  Refreshing the page
 loads the ajax scripts and everything works fine.  I did alittle
 snooping and found that on the first load wicket doesn't add the
 wicket-ajax.js to the markup.  That's why some functions are undefined.
 I setoutputmarkupid(true) on all the related things as far I can tell.
 Does the order of setting markup Id and adding things to the page
 matter?  ie.

No, it shouldn't. What version of Wicket are you using? The first
component or behavior that does a header contribution of
wicket-ajax.js (any AjaxBehavior that is shipped with the wicket core
projects) should cause the script to be loaded.

Whether you call setOutputMarkupId is unrelated to whether scripts are loaded.

Eelco

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: NoSuchMethodException / PropertyResolver

2007-09-25 Thread Martijn Dashorst
You have to provide the types for the fields, or else Wicket won't be
able to discover what type to use (apparently it resolves to boolean
for the name), or provide default values with the correct type in your
valuemap.

i.e. either:

add(new TextField(firstName, new PropertyModel(map, firstName),
String.class));

or

map.put(firstName, );

Martijn

On 9/25/07, Phillip Rhodes [EMAIL PROTECTED] wrote:
 Hi guys, I'm seeing a weird problem with Wicket.  I *think* it's the
 same problem discussed here
 http://www.nabble.com/Tracking-down-an-elusive-error-during-migration-to-1.3-t4381647.html,
 but won't swear to it.  Basically Wicket
 is logging a NoSuchMethodException when rendering my page.

 This is using Wicket 1.2.4, running on JDK 1.6, JBoss 4.0.5, on Windows
 2000 Server.

 The java code for the page in question looks like this:



 *** BEGIN JAVA CODE ***
 package org.openqabal.web.registration;

 import org.openqabal.auth.encoder.QPasswordEncoder;
 import org.openqabal.core.lib.domain.QGenericUserAccount;
 import org.openqabal.core.lib.domain.impl.UserAccountImpl;
 import org.openqabal.core.lib.service.QHybridUserService;

 import wicket.PageParameters;
 import wicket.examples.WicketExampleHeader;
 import wicket.markup.html.WebPage;
 import wicket.markup.html.form.Form;
 import wicket.markup.html.form.PasswordTextField;
 import wicket.markup.html.form.TextField;
 import wicket.markup.html.panel.FeedbackPanel;
 import wicket.model.PropertyModel;
 import wicket.spring.injection.annot.SpringBean;
 import wicket.util.string.Strings;
 import wicket.util.value.ValueMap;

 public final class UserRegistration1 extends WebPage
 {
 @SpringBean(name=hybridUserService)
 private QHybridUserService userService;

 @SpringBean(name=passwordEncoderBean)
 private QPasswordEncoder passwordEncoder;

 // note: TODO UserAccountFactory here...

 public UserRegistration1()
 {
 this( null );
 }

 public UserRegistration1(   final PageParameters parameters )
 {
 final String packageName = getClass().getPackage().getName();
 add(new WicketExampleHeader(mainNavigation,
 Strings.afterLast(packageName, '.'), this));

 // Create feedback panel and add to page
 final FeedbackPanel feedback = new FeedbackPanel(feedback);

 add(feedback);

 add(new UserRegistrationForm(userForm));
 }

 public final class UserRegistrationForm extends Form
 {
 // El-cheapo model for form
 private final ValueMap properties = new ValueMap();

 public UserRegistrationForm(final String componentName)
 {
 super(componentName);

 // Attach textfield components that edit properties 
 map model
 add(new TextField(firstName, new 
 PropertyModel(properties,
 firstName)));
 add(new TextField(lastName, new 
 PropertyModel(properties,
 lastName)));
 add( new TextField( loginName, new 
 PropertyModel(properties,
 loginName)));
 add(new TextField(emailAddress, new 
 PropertyModel(properties,
 emailAddress)));
 add(new PasswordTextField(password, new 
 PropertyModel(properties,
 password)));
 add(new PasswordTextField(confirmPassword, new
 PropertyModel(properties, confirmPassword)));
 }

 public final void onSubmit()
 {
 System.out.println( onSubmit() );
 String firstName = properties.getString(firstName);
 String lastName = properties.getString(lastName);
 String loginName = properties.getString( loginName 
 );
 String emailAddress = 
 properties.getString(emailAddress);
 String password = properties.getString(password);
 String confirmPassword = 
 properties.getString(confirmPassword);

 // create and persist user object using the details we
 // received...

 QGenericUserAccount userAccount = new 
 UserAccountImpl();
 userAccount.setLoginName( loginName );
 userAccount.setPassword( 
 passwordEncoder.encode(password));

 userService.createAllAccounts(userAccount);


 }
 }
 }

 *** END JAVA CODE ***



 and here is the relevant stuff from the log.  FWIW, I get this
 for every one of the above properties, but am only posting this
 log snippet since the others are all the same.



 *** BEGIN LOG / STACKTRACE 

Re: No cursor in Modal Window in FF

2007-09-25 Thread Eelco Hillenius
If you have this reproducible, please file a bug report.

Eelco

On 9/11/07, Artur W. [EMAIL PROTECTED] wrote:

 Hi!

 There is no cursor in input fields in Modal Window.
 I use Wicket wicket-1.3.0-beta3 and ff 2.0.0.6

 Thanks for help,
 Artur

 --
 View this message in context: 
 http://www.nabble.com/No-cursor-in-Modal-Window-in-FF-tf4421726.html#a12612071
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: strange ClassCastException when deserializing a Page

2007-09-25 Thread Xavier Hanin
On 9/25/07, Eelco Hillenius [EMAIL PROTECTED] wrote:

 Gee that looks weird. As far as I know, the only exotic stuff we do
 with serializing is an optimization for page references. But I can't
 see how that might relate to this.

 Johan, any ideas? Any chance you could make a test case out of it Xavier?


The problem is that without the slightest idea of where it comes from it's
difficult to make a test case. The code is public though, so I have a large
test case :-)
But I'm ok to investigate on my own, if you can give me some hints... Maybe
I can switch to another serialization implementation, if I remember well
that's something possible, no?

Xavier

Eelco

 On 9/24/07, Xavier Hanin [EMAIL PROTECTED] wrote:
  Hi,
 
  I have a strange CCE on page deserialization with wicket 1.3.0-beta3:
  java.lang.ClassCastException: cannot assign instance of
  org.apache.wicket.model.PropertyModel to field
 
 org.apache.wicket.markup.html.WebMarkupContainerWithAssociatedMarkup.markupHelperof
  type
  org.apache.wicket.markup.html.ContainerWithAssociatedMarkupHelper in
  instance of org.xoocode.xooctory.web.component.form.LabelBorder
   at java.io.ObjectStreamClass$FieldReflector.setObjFieldValues(
  ObjectStreamClass.java:2032)
   at java.io.ObjectStreamClass.setObjFieldValues(
 ObjectStreamClass.java
  :1212)
   at java.io.ObjectInputStream.defaultReadFields(
 ObjectInputStream.java
  :1951)
   at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java
  :1869)
   at java.io.ObjectInputStream.readOrdinaryObject(
 ObjectInputStream.java
  :1753)
   at java.io.ObjectInputStream.readObject0(ObjectInputStream.java
 :1329)
   at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1667)
   at java.io.ObjectInputStream.readObject0(ObjectInputStream.java
 :1323)
   at java.io.ObjectInputStream.defaultReadFields(
 ObjectInputStream.java
  :1945)
   at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java
  :1869)
   at java.io.ObjectInputStream.readOrdinaryObject(
 ObjectInputStream.java
  :1753)
   at java.io.ObjectInputStream.readObject0(ObjectInputStream.java
 :1329)
   at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1667)
   at java.io.ObjectInputStream.readObject0(ObjectInputStream.java
 :1323)
   at java.io.ObjectInputStream.defaultReadFields(
 ObjectInputStream.java
  :1945)
   at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java
  :1869)
   at java.io.ObjectInputStream.readOrdinaryObject(
 ObjectInputStream.java
  :1753)
   at java.io.ObjectInputStream.readObject0(ObjectInputStream.java
 :1329)
   at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1667)
   at java.io.ObjectInputStream.readObject0(ObjectInputStream.java
 :1323)
   at java.io.ObjectInputStream.defaultReadFields(
 ObjectInputStream.java
  :1945)
   at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java
  :1869)
   at java.io.ObjectInputStream.readOrdinaryObject(
 ObjectInputStream.java
  :1753)
   at java.io.ObjectInputStream.readObject0(ObjectInputStream.java
 :1329)
   at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
   at org.apache.wicket.util.lang.Objects.byteArrayToObject(
 Objects.java
  :396)
   at
 
 org.apache.wicket.protocol.http.pagestore.AbstractPageStore.deserializePage
 (
  AbstractPageStore.java:231)
   at org.apache.wicket.protocol.http.pagestore.DiskPageStore.getPage(
  DiskPageStore.java:596)
   at
 
 org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLevelCachePageMap.get
  (SecondLevelCacheSessionStore.java:322)
   at org.apache.wicket.Session.getPage(Session.java:800)
   at
 
 org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage
 (
  AbstractRequestCycleProcessor.java:427)
   at org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve
 (
  WebRequestCycleProcessor.java:139)
   at org.apache.wicket.RequestCycle.step(RequestCycle.java:1091)
   at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1177)
   at org.apache.wicket.RequestCycle.request(RequestCycle.java:500)
   at org.apache.wicket.protocol.http.WicketFilter.doGet(
 WicketFilter.java
  :261)
   at org.apache.wicket.protocol.http.WicketFilter.doFilter(
  WicketFilter.java:127)
   at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(
  ServletHandler.java:1065)
   at
 
 org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal
  (OpenSessionInViewFilter.java:198)
   at org.springframework.web.filter.OncePerRequestFilter.doFilter(
  OncePerRequestFilter.java:75)
   at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(
  ServletHandler.java:1065)
   at org.mortbay.jetty.servlet.ServletHandler.handle(
 ServletHandler.java
  :365)
   at org.mortbay.jetty.security.SecurityHandler.handle(
  SecurityHandler.java:185)
  

Re: Session-Timeout Exception

2007-09-25 Thread Eelco Hillenius
On 9/3/07, Jan Kriesten [EMAIL PROTECTED] wrote:

 Hi,

 when a Session-Timeout occurs, the following Exception is thrown when the user
 gets active again:

 ---8---
 2007-09-03 16:41:26,316 ERROR [org.apache.wicket.RequestCycle   ] 
 -
 Cannot find the rendered page in session [pagemap=nu
 ll,componentPath=10,versionNumber=0]
 org.apache.wicket.protocol.http.PageExpiredException: Cannot find the rendered
 page in session [pagemap=null,componentPath=10,versio
 nNumber=0]
 at
 org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage(AbstractRequestCycleProcessor.java:451)
 at
 org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:139)
 at org.apache.wicket.RequestCycle.step(RequestCycle.java:1077)
 at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1173)
 at org.apache.wicket.RequestCycle.request(RequestCycle.java:483)
 at 
 org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:277)
 at
 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:129)
 at
 com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:73)
 at
 com.caucho.server.cache.CacheFilterChain.doFilter(CacheFilterChain.java:125)
 at
 com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:175)
 at
 com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:240)
 at 
 com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:263)
 at com.caucho.server.port.TcpConnection.run(TcpConnection.java:481)
 at com.caucho.util.ThreadPool$Item.runTasks(ThreadPool.java:685)
 at com.caucho.util.ThreadPool$Item.run(ThreadPool.java:607)
 at java.lang.Thread.run(Thread.java:619)
 ---8---

 Can't this be avoided and just a redirect to the Session-Expired/Login-Page
 initiated?

You can catch the exception in a custom request cycle and do this yourself.

Eelco

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: using PageView to optimize pagemap size

2007-09-25 Thread Eelco Hillenius
On 9/4/07, Andrew Klochkov [EMAIL PROTECTED] wrote:
 I'm using  InspectorBug to calc pages sizes and to look at the
 component/models tree. The problem is that InspectorBug uses PaveView
 which traverses all the models including detachable ones, so detachables
 are attached back and are shown in the tree. Is there any suggestion how
 to avoid re-attaching the models in this particular case?

Imho, you'll benefit more from using a profiler and executing load
tests than using the inspectorbug.

Eelco

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Inter web-module class dependencies

2007-09-25 Thread Eelco Hillenius
On 9/5/07, Antony Stubbs [EMAIL PROTECTED] wrote:

 Is it possible for one war to use classes in another war?

 So far my googling says no:
 http://www.ibm.com/developerworks/websphere/library/techarticles/0112_deboer/deboer.html
 The only restriction to this otherwise simple solution is that, since Web
 modules are not structured with classes at their root, other modules can
 never depend on classes from within Web modules. In other words, no modules
 may use the manifest to depend on classes from within a Web module.
 Is there another way other than using the manifest file?
 Editing the J2EE Module Dependencies only let's you add jar files, which
 supports the above statement.

 Why? - i have a legacy struts app and i would like to make a wicket war
 which uses the struts' app's backend which is burried in the struts war
 file.

 The other option could be to add a wicket servlet catching a different
 sub-url say /wicket/* - but not sure if that would work, and i'd like to
 keep the wicket app separate if possible.

You can include the classes as jars in both the wars, right? That
should typically work fine.

Eelco

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Connection dropped?

2007-09-25 Thread Eelco Hillenius
On 9/5/07, James Renfro [EMAIL PROTECTED] wrote:
 Is there any way using Wicket to find out if a user's connection has
 dropped? For example -- if they close their browser or lose their
 network connection? I saw the discussion re onunload but given that it's
 browser-dependent, I'd like something more failsafe if possible and I
 just want to make sure I clean up state after the user properly on the
 server so don't need anything to happen inside the browser itself.

I still think the only reliable way is to react on a session time out.
There's a callback for that in session stores.

Eelco

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Inter component events?

2007-09-25 Thread Eelco Hillenius
 Has anybody used something like javax.swing.ListModel.addListDataListener or
 java.util.Observable to setup a nice way for components to respond to
 changes in other components?

 My use case is that I have a basket of items a user has selected. While
 they are searching/browsing if an item already in the basket appears again I
 want it to be disabled/greyed out. With hand coding that is a bit ugly and
 seems like a candidate for some sort listening to changes in another
 component.

This is where Wicket really works different from a desktop framework
like Swing though. In swing you would generally push changes to
observers. In Wicket, you have the request/ response cycle. 'Pulling'
works better for Wicket, which typically means that you should make
sure you update relevant state during requests (e.g. via models) so
that other components use the updated state. So here, you wouldn't
call setEnabled on the basket via some observer, but rather you would
do something like override isEnabled and query the relevant state.

Eelco

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: wicket 1.3 setting locale with tester?

2007-09-25 Thread Eelco Hillenius
On 9/14/07, Nino Saturnino Martinez Vazquez Wael
[EMAIL PROTECTED] wrote:
 I think the answer could be :

 cycle.getSession().setLocale rigth?

Yep, you could do that. Or provide a custom session and override
getLocale. Or in Wicket 1.3 you can also set (fix) it in the
constructor of a custom session.

Eelco

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Inter Application Session (Same Context)

2007-09-25 Thread Eelco Hillenius
On 9/16/07, Ramazan Pekin [EMAIL PROTECTED] wrote:
 Hi,
   In the same context, how can I provide inter application session? when I 
 reach to new application with wicket.Link session is passing to new 
 application, when I try this with html link it needs signin again.

   a href=# wicket:id='linkToREQ001A'request/a
   a href=req001arequest/a

There recently was a thread about this. Could you try searching the
archives? The conclusion is a bit too much to type here :)

Eelco

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [RFE] getMarkupId()

2007-09-25 Thread Ryan Holmes
Did you try escaping the '.'? Something like $(#quantity 
\.noOfUnits1232).


I refer to Wicket id's with periods in several CSS rules with no  
problem. The period is a valid character in HTML id's and I strongly  
disagree with the magical id mangling behavior you suggest. If JQuery  
can't handle valid HTML id's, that's a JQuery bug and not a Wicket bug.



-Ryan

On Sep 21, 2007, at 4:44 AM, Alex Objelean wrote:



This is about how wicket generates dynamically markupID.

I have, for instance, the following markup component:

input wicket:id=quantity.noOfUnits /

The generated markupId for this component looks like the following:
quantity.noOfUnits1232 .

I suggest to escape any css valid specifiers from the generated  
markupId, by

replacing them with something else (for instance '_' character).

The problem appear when I am trying to identify the component by  
it's id
using some js library (like jQuery) and as a consequence the result  
of this

query: $(#quantity.noOfUnits1232) is invalid.

Thank you!

Alex.
--
View this message in context: http://www.nabble.com/-RFE-- 
getMarkupId%28%29-tf4493344.html#a12815038

Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Requests being dispatched in an infinite loop

2007-09-25 Thread Eelco Hillenius
No idea. Do you get the same thing when you use the latest 1.2.x version?

Eelco

On 9/10/07, swaroop belur [EMAIL PROTECTED] wrote:

 Hi all

 Wicket version 1.2.4

 I have this piece of code which is apparently causing wicket to send the
 requests in an infinite loop


 code

 This code is present in a class called EditConfig. When I click on the link
 basically
 all it does is to refresh the page by creating a new instance of page.


  new Link(refresh) {

 @Override
 public void onClick() {
 setResponsePage(EditConfig.class);
 }

 }
 /code

 Apparently setResponsePage(EditConfig.class) causes the request target to be
 a bookmarkable one
 and the setting on respond method is to redirect the browser to the url
 generated by the target-
 which then again causes the event  method to be processed - i.e in this case
 page object to be created
 again

 Why would wicket want to  keep redirecting . If after the page object has
 been created , i thought it would render the page as is.

 Am i missing something over here?

 thanks
 swaroop belur
 --
 View this message in context: 
 http://www.nabble.com/Requests-being-dispatched-in-an-infinite-loop-tf4420388.html#a12608388
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Unit testing ListView

2007-09-25 Thread Eelco Hillenius
On 9/12/07, pokkie [EMAIL PROTECTED] wrote:

 I am trying to write a test case for my listView that contains some links.
 When the user clicks on
 a link, a certain action should be performed, and it is for this action that
 I wish to write a test case for.

 I can get a handle on the ListView by using the
 wicketTester.getLastRenderedPage().get(pathToListView);,
 but the problem then is that the listView isn't populated. I thought about
 extracting the above method call,
 into a variable, so that the listView is returned, i.e.

 
 MyListView listView =
 (MyListView)wicketTester.getLastRenderedPage().get(pathToListView);

 // Populate the listView with a model object so that it will populate the
 ListView
 listView.setModelObject(new ModelObject());

 // Create a new ListItem so that the listView can be populated
 ListItem listItem = new ListItem(0, listView.getModel());

 // Populate the listView with the listItem
 listView.populateItem(listItem);

 // Execute ajax event
 wicketTester.executeAjaxEvent(pathToLinkOnListView,onclick);

Why isn't it populated though? I don't use WicketTester much, but I
would expect the lastRendered page to have the listview intact as it
rendered. Only when it starts a new render are items removed. For
which btw you can also use setReuseItems(true).

Eelco

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Mount vs setPageExpiredErrorPage

2007-09-25 Thread Eelco Hillenius
 I have the following simple scenario:

 app.mount( new IndexedParamUrlCodingStrategy( login, LoginPage.class ) );
 app.getApplicationSettings().setPageExpiredErrorPage( LoginPage.class );

 If I call the application, I get directed to the url

 http://appurl/login

 fine. When the Session times out, I get redirected to the LoginPage again, but
 this time not to the above url but to

 http://appurl/?wicket:interface=:2

 Couldn't the PageExpiredErrorPage be checked for Mounts?

Could you create a feature request please?

Eelco

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [RFE] getMarkupId()

2007-09-25 Thread Alex Objelean

It's not a jquery bug at all. The '.' character is interpreted as a css
class. So, the $(#quantity.noOfUnits1232) translates in element with ID
quantity and css class noOfUnits1232. 
Also, I do not see any problem which can be caused by magical handling of
markup id. (at least one core developer was agree with this point of view).

Alex.


Ryan Holmes wrote:
 
 Did you try escaping the '.'? Something like $(#quantity 
 \.noOfUnits1232).
 
 I refer to Wicket id's with periods in several CSS rules with no  
 problem. The period is a valid character in HTML id's and I strongly  
 disagree with the magical id mangling behavior you suggest. If JQuery  
 can't handle valid HTML id's, that's a JQuery bug and not a Wicket bug.
 
 
 -Ryan
 
 On Sep 21, 2007, at 4:44 AM, Alex Objelean wrote:
 

 This is about how wicket generates dynamically markupID.

 I have, for instance, the following markup component:

 input wicket:id=quantity.noOfUnits /

 The generated markupId for this component looks like the following:
 quantity.noOfUnits1232 .

 I suggest to escape any css valid specifiers from the generated  
 markupId, by
 replacing them with something else (for instance '_' character).

 The problem appear when I am trying to identify the component by  
 it's id
 using some js library (like jQuery) and as a consequence the result  
 of this
 query: $(#quantity.noOfUnits1232) is invalid.

 Thank you!

 Alex.
 -- 
 View this message in context: http://www.nabble.com/-RFE-- 
 getMarkupId%28%29-tf4493344.html#a12815038
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/-RFE--getMarkupId%28%29-tf4493344.html#a12874553
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Append markup to BODY container

2007-09-25 Thread legol

Thx for help, It works now great.


Rüdiger_Schulz wrote:
 
 Jürgen and Igor once showed me how to do this:
 
 http://www.nabble.com/BodyContributor--tf2578291.html#a7187578
 http://www.nabble.com/Replacing-HtmlBodyContainer-tf3665340.html#a10241426
 
 You need your own implementation of BodyContainer, and replace during
 attachment. Something like this should work:
 
 public clas MyPage extends WebPage {
 
 public void onAttach() {
 Component body=get(BodyOnLoadHandler.BODY_ID);
 if (body!=null) {
 if (!(body instanceof MyHtmlBodyContainer)) {
  remove(BodyOnLoadHandler.BODY_ID );
  body=null;
  }
 }
 if (body==null) {
 add(new ...);
 }
 }
 
 
 /**
  *
  */
 public static class MyHtmlBodyContainer extends
 *HtmlBodyContainer*
 {
 private static final long serialVersionUID = 1L;
 
 /**
  * Construct
  *
  * @see Component#Component(MarkupContainer,String)
  */
 public MyHtmlBodyContainer(MarkupContainer parent, final
 String id)
 {
 super(parent, id);
 }
 
 @Override
 protected void onComponentTagBody(MarkupStream
 markupStream,
 
 ComponentTag openTag)
 {
 getResponse().write(Something after the body open
 tag);
 super.onComponentTagBody(markupStream, openTag);
 getResponse().write(Something before the body
 close
 tag);
 }
 }
 }
 
 2007/9/24, legol [EMAIL PROTECTED]:


 Thx for reply,
 I'm using wicket 1.2.6, i have to add markup simply from String variable
 in
 class that extends from webpage



 Rüdiger_Schulz wrote:
 
  2007/9/24, legol [EMAIL PROTECTED]:
 
 
  Hi all!!!
 
  What I want to do is append some markup to my webpage after body tag.
 I
  can't override onRender method in HTMLBodyContainer because it is
 created
  by
  method getBodyContainer() in WebPage.
 
 
 
  I had to do the same thing, and was able to solve it.
 
  To help you, I need to know what version of wicket you are using, and
 what
  markup you want to add, where it should come from.
 
  --
  greetings from Berlin,
 
  Rüdiger Schulz
 
  www.2rue.de
 
 

 --
 View this message in context:
 http://www.nabble.com/Append-markup-to-BODY-container-tf4509327.html#a12863489
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 
 
 -- 
 greetings from Berlin,
 
 Rüdiger Schulz
 
 www.2rue.de
 
 

-- 
View this message in context: 
http://www.nabble.com/Append-markup-to-BODY-container-tf4509327.html#a12874626
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Experiences with ReloadingWicketFilter

2007-09-25 Thread Jean-Baptiste Quenot
* Peter Thomas:

 Just  curious  to   know  if  others  have   problems  with  the
 ReloadingWicketFilter when you make minor changes to a page with
 markup inheritance, you may want to look at the issue history.

FYI  the  problem described  in  the  JIRA  issue is  not  related
to  markup  inheritance.   The  exception is  thrown  because  the
class  TestPage is  loaded from  two different  classloaders, thus
TestPage(classloader1) != TestPage(classloader2).
-- 
 Jean-Baptiste Quenot
aka  John Banana   Qwerty
http://caraldi.com/jbq/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [RFE] getMarkupId()

2007-09-25 Thread Alex Objelean


Why would a developer be confused by something that is generated
automatically? Do you really care if the generated markup id is quantity1
or quantity_1 or quantity-1? Whats the difference?


Ryan Holmes wrote:
 
 
 The automatic transformation of certain characters by a framework is
 exactly the kind of magic behavior that confuses users and therefore I
 think the recommended fix is a bad idea.
 
 

-- 
View this message in context: 
http://www.nabble.com/-RFE--getMarkupId%28%29-tf4493344.html#a12874680
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Requests being dispatched in an infinite loop

2007-09-25 Thread Eelco Hillenius
 BUT one question : Do you think setRedirect should really be
 in Component class.

No. It's one of these things that if it were up to me would never have
been in there. But it's probably a bit late in the game to get rid of
it now.

EElco

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Passing Parameters to Bookmarkable Page

2007-09-25 Thread Eelco Hillenius
 If the page is bookmarked, I don't care about retaining the filter.
 I just want the id for the item they want to view.  But if they
 clicked the link from the list page (that has a list based on the filter),
 then when they return to the list page (save, cancel), I want
 to pass the filter back.

 The target page looks for the filter and simply passes it back.  if
 there's nothing there, it passes nothing back.

I would actually be nice to be able to explicitly set a URL together
with the redirect to buffer strategy. For the buffer, it doesn't
really matter what the URL looks like, and with this you'd be able to
pass internal state to pages while still keeping your locations
bookmarkable.

You could open a feature request for this. Maybe supply a patch?

Eelco

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Mount vs setPageExpiredErrorPage

2007-09-25 Thread Jan Kriesten

 Could you create a feature request please?

done:

https://issues.apache.org/jira/browse/WICKET-1006

best regards, --- jan.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: strange ClassCastException when deserializing a Page

2007-09-25 Thread Xavier Hanin
On 9/25/07, Eelco Hillenius [EMAIL PROTECTED] wrote:

 On 9/24/07, Xavier Hanin [EMAIL PROTECTED] wrote:
  On 9/25/07, Eelco Hillenius [EMAIL PROTECTED] wrote:
  
   Gee that looks weird. As far as I know, the only exotic stuff we do
   with serializing is an optimization for page references. But I can't
   see how that might relate to this.
  
   Johan, any ideas? Any chance you could make a test case out of it
 Xavier?
 
 
  The problem is that without the slightest idea of where it comes from
 it's
  difficult to make a test case. The code is public though, so I have a
 large
  test case :-)
  But I'm ok to investigate on my own, if you can give me some hints...
 Maybe
  I can switch to another serialization implementation, if I remember well
  that's something possible, no?

 You could try that (Objects#setObjectStreamFactory(new
 WicketObjectStreamFactory()) but since we are now using Java's default
 serialization, I doubt that would make things better.


Indeed, it only failed earlier. But never mind, I've finally found the
problem, it was only my fault, bad serialization overriding lost in another
component...

Xavier

Eelco

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-- 
Xavier Hanin - Independent Java Consultant
http://xhab.blogspot.com/
http://incubator.apache.org/ivy/
http://www.xoocode.org/


Re: Inter component events?

2007-09-25 Thread Sam Hough

I see that it is not such an obvious win here as with fat client but how
about another of my use cases:
* Large page with small parts being updated by Ajax
* Two components sitting long way apart in the tree (context sensitive
button that responds to items in rest of the page)

So having an almost declaritive style this button is enabled = fn(x) only
works if I know when to re-render that button. 

I seem to be leaving OO behind by having lots of procedural when x happens
update a, b and c rather than a subscribing to events from another
component.

Using some sort of event model seems to me to improve OO - encapsulation -
reuse. For large trees of components with only tiny parts that need sending
to the client it also seems more efficient.

btw We are very pleased with our Wicket app as with JS it does nice partial
updates and without JS it chugs along. We only alter the HTML for our modal
window :)




Eelco Hillenius wrote:
 
 Has anybody used something like javax.swing.ListModel.addListDataListener
 or
 java.util.Observable to setup a nice way for components to respond to
 changes in other components?

 My use case is that I have a basket of items a user has selected. While
 they are searching/browsing if an item already in the basket appears
 again I
 want it to be disabled/greyed out. With hand coding that is a bit ugly
 and
 seems like a candidate for some sort listening to changes in another
 component.
 
 This is where Wicket really works different from a desktop framework
 like Swing though. In swing you would generally push changes to
 observers. In Wicket, you have the request/ response cycle. 'Pulling'
 works better for Wicket, which typically means that you should make
 sure you update relevant state during requests (e.g. via models) so
 that other components use the updated state. So here, you wouldn't
 call setEnabled on the basket via some observer, but rather you would
 do something like override isEnabled and query the relevant state.
 
 Eelco
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Inter-component-events--tf4508127.html#a12875360
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: onNewBrowserWindow is not called

2007-09-25 Thread Benjamin Ernst
Hi,
we tried your suggestions and they could work. But it would really much
easier for us to just get a new session for a new Browser-Window. Is there
no way to create a new session?

We tried to turn of cookies in the context.xml and use URL-rewriting
instead, but this doesn't seem to work. The first page is loaded correctly
and after that every request end up in Page-expired-Error.

Benjamin

2007/9/19, Matej Knopp [EMAIL PROTECTED]:

 Application.getPageSettings().setAutomaticMultiWindowSupport(true);

 -Matej

 On 9/19/07, Benjamin Ernst [EMAIL PROTECTED] wrote:
  Hi,
  thanks for your help. I will try that, but I have one last question
  (hopefully): How do I turn on the multiwindow support?
 
  Benjamin
 
  2007/9/19, Matej Knopp [EMAIL PROTECTED]:
  
   You can use pagemap metadata for it, providing you have recent enough
   wicket version. And, of course, you have to turn on the multiwindow
   support.
  
   -Matej
  
   On 9/19/07, Eelco Hillenius [EMAIL PROTECTED] wrote:
On 9/19/07, Benjamin Ernst [EMAIL PROTECTED] wrote:
 Hi
 I store some context-information in the session. When a new window
 is
   opened
 it has a new context, so I want to have a new Session for this
   context.
 But the old window should stay with the old context.
   
You should try to bend this in a separate data structure within the
session, probably keyed on page map id.
   
Eelco
   
   
 -
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
   
   
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: onNewBrowserWindow is not called

2007-09-25 Thread Matej Knopp
Disabling cookies should work. What servlet container are you using?
There are certain problems with Tomcat 5.5.

-Matej

On 9/25/07, Benjamin Ernst [EMAIL PROTECTED] wrote:
 Hi,
 we tried your suggestions and they could work. But it would really much
 easier for us to just get a new session for a new Browser-Window. Is there
 no way to create a new session?

 We tried to turn of cookies in the context.xml and use URL-rewriting
 instead, but this doesn't seem to work. The first page is loaded correctly
 and after that every request end up in Page-expired-Error.

 Benjamin

 2007/9/19, Matej Knopp [EMAIL PROTECTED]:
 
  Application.getPageSettings().setAutomaticMultiWindowSupport(true);
 
  -Matej
 
  On 9/19/07, Benjamin Ernst [EMAIL PROTECTED] wrote:
   Hi,
   thanks for your help. I will try that, but I have one last question
   (hopefully): How do I turn on the multiwindow support?
  
   Benjamin
  
   2007/9/19, Matej Knopp [EMAIL PROTECTED]:
   
You can use pagemap metadata for it, providing you have recent enough
wicket version. And, of course, you have to turn on the multiwindow
support.
   
-Matej
   
On 9/19/07, Eelco Hillenius [EMAIL PROTECTED] wrote:
 On 9/19/07, Benjamin Ernst [EMAIL PROTECTED] wrote:
  Hi
  I store some context-information in the session. When a new window
  is
opened
  it has a new context, so I want to have a new Session for this
context.
  But the old window should stay with the old context.

 You should try to bend this in a separate data structure within the
 session, probably keyed on page map id.

 Eelco


  -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


   
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
   
   
  
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Questions about GWT, JSF and Wicket

2007-09-25 Thread Patrick Labonte
Hello,

at the moment I'm writing my diploma-thesis. The project I'm working
on is for a big company in germany and consists of porting a
Rich-Client-Java-Application to a web-based Application. It should
make heavy use of AJAX-Components, because it should behave like the
Rich-Client. If the experiences with the prototype turn out
satisfactory, the complete application may be ported and maybe other
applications will follow.

At the moment I'm thinking about the architecture: From the
Rich-Client I will reuse Spring, Hibernate and the Business-Objects,
but I'm not sure which Web-Framework to choose from.
I have used JSF in former projects and were not happy with it (the
Web-Designer thought about committing suicide ;)
Well for my thesis I have to give reasons, why I have chosen a
specific technology and I have to convince some people, because they
have hopes to raise some new projects out of the result of my project.
They know about the JSF-Hype, but they don't know about Wicket. I have
heared about it 2 weeks ago the first time.
I'm doing a comparison between JSF and Wicket. I figured out a lot of
disadvantages on JSF-Side, but I have no experience on Wicket-Side and
it's disadvantages. I found out that JBoss Seam fixes some bad JSF
issues.
One guy in my department likes the Google Web Toolkit and is writing a
book about it. I'll give it a try. It's a bit like Wicket from the
programming style, but it needs a separate compiler and I haven't got
a backend solution. I have red that it's possible to use GWT with
Wicket. How far is this grown?
I fear about a lack of AJAX-Wicket components, because I have seen
only few components. I hope someone has experience with similar
projects and can give me a few helpful advices.

Thanks very much.
Patrick

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Questions about GWT, JSF and Wicket

2007-09-25 Thread David Bernard

Hi,

A list of url, that could help you...

About Wicket vs JSF, there is some articles :
* http://ptrthomas.wordpress.com/2007/05/14/a-wicket-user-tries-jsf/ (from the 
author of JTrac)
* a list of articles : http://cwiki.apache.org/WICKET/articles-about-wicket.html

About widgets :
* take a look to
  * wicket-extensions :
  * wicketstuff (provide some way to integrate with third party js lib) :
* a main difference with JSF and why I switch, it's the easier way to create 
custom component (see the documentation, wiki, slides).

About GWT :
Sorry I can't help you, :-(. I didn't choose it when I start my current project, because it was too younger (no validation, need to implement ISerializable, bad maven integration,... lot of things 
that seems to be fixed now).


/david


Patrick Labonte wrote:

Hello,

at the moment I'm writing my diploma-thesis. The project I'm working
on is for a big company in germany and consists of porting a
Rich-Client-Java-Application to a web-based Application. It should
make heavy use of AJAX-Components, because it should behave like the
Rich-Client. If the experiences with the prototype turn out
satisfactory, the complete application may be ported and maybe other
applications will follow.

At the moment I'm thinking about the architecture: From the
Rich-Client I will reuse Spring, Hibernate and the Business-Objects,
but I'm not sure which Web-Framework to choose from.
I have used JSF in former projects and were not happy with it (the
Web-Designer thought about committing suicide ;)
Well for my thesis I have to give reasons, why I have chosen a
specific technology and I have to convince some people, because they
have hopes to raise some new projects out of the result of my project.
They know about the JSF-Hype, but they don't know about Wicket. I have
heared about it 2 weeks ago the first time.
I'm doing a comparison between JSF and Wicket. I figured out a lot of
disadvantages on JSF-Side, but I have no experience on Wicket-Side and
it's disadvantages. I found out that JBoss Seam fixes some bad JSF
issues.
One guy in my department likes the Google Web Toolkit and is writing a
book about it. I'll give it a try. It's a bit like Wicket from the
programming style, but it needs a separate compiler and I haven't got
a backend solution. I have red that it's possible to use GWT with
Wicket. How far is this grown?
I fear about a lack of AJAX-Wicket components, because I have seen
only few components. I hope someone has experience with similar
projects and can give me a few helpful advices.

Thanks very much.
Patrick

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: onNewBrowserWindow is not called

2007-09-25 Thread Benjamin Ernst
yes, we are using tomcat 5.5.23

2007/9/25, Matej Knopp [EMAIL PROTECTED]:

 Disabling cookies should work. What servlet container are you using?
 There are certain problems with Tomcat 5.5.

 -Matej

 On 9/25/07, Benjamin Ernst [EMAIL PROTECTED] wrote:
  Hi,
  we tried your suggestions and they could work. But it would really much
  easier for us to just get a new session for a new Browser-Window. Is
 there
  no way to create a new session?
 
  We tried to turn of cookies in the context.xml and use URL-rewriting
  instead, but this doesn't seem to work. The first page is loaded
 correctly
  and after that every request end up in Page-expired-Error.
 
  Benjamin
 
  2007/9/19, Matej Knopp [EMAIL PROTECTED]:
  
   Application.getPageSettings().setAutomaticMultiWindowSupport(true);
  
   -Matej
  
   On 9/19/07, Benjamin Ernst [EMAIL PROTECTED] wrote:
Hi,
thanks for your help. I will try that, but I have one last question
(hopefully): How do I turn on the multiwindow support?
   
Benjamin
   
2007/9/19, Matej Knopp [EMAIL PROTECTED]:

 You can use pagemap metadata for it, providing you have recent
 enough
 wicket version. And, of course, you have to turn on the
 multiwindow
 support.

 -Matej

 On 9/19/07, Eelco Hillenius [EMAIL PROTECTED] wrote:
  On 9/19/07, Benjamin Ernst [EMAIL PROTECTED] wrote:
   Hi
   I store some context-information in the session. When a new
 window
   is
 opened
   it has a new context, so I want to have a new Session for this
 context.
   But the old window should stay with the old context.
 
  You should try to bend this in a separate data structure within
 the
  session, probably keyed on page map id.
 
  Eelco
 
 
   -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


   
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: Questions about GWT, JSF and Wicket

2007-09-25 Thread Sam Hough

I wouldn't go for Wicket _and_ GWT. The server side could stay the same with
GWT. The big change would be that GWT would make remote calls to it... 

If you need to support low end browsers then go for Wicket. If you don't go
for GWT.

Apart from no-javascript support the only other big problem is no Java 1.5
yet. Apart from those reservations it is a much better way to go. You will
get a much more responsive application with GWT than you will ever get with
Wicket.



Patrick Labonte wrote:
 
 Hello,
 
 at the moment I'm writing my diploma-thesis. The project I'm working
 on is for a big company in germany and consists of porting a
 Rich-Client-Java-Application to a web-based Application. It should
 make heavy use of AJAX-Components, because it should behave like the
 Rich-Client. If the experiences with the prototype turn out
 satisfactory, the complete application may be ported and maybe other
 applications will follow.
 
 At the moment I'm thinking about the architecture: From the
 Rich-Client I will reuse Spring, Hibernate and the Business-Objects,
 but I'm not sure which Web-Framework to choose from.
 I have used JSF in former projects and were not happy with it (the
 Web-Designer thought about committing suicide ;)
 Well for my thesis I have to give reasons, why I have chosen a
 specific technology and I have to convince some people, because they
 have hopes to raise some new projects out of the result of my project.
 They know about the JSF-Hype, but they don't know about Wicket. I have
 heared about it 2 weeks ago the first time.
 I'm doing a comparison between JSF and Wicket. I figured out a lot of
 disadvantages on JSF-Side, but I have no experience on Wicket-Side and
 it's disadvantages. I found out that JBoss Seam fixes some bad JSF
 issues.
 One guy in my department likes the Google Web Toolkit and is writing a
 book about it. I'll give it a try. It's a bit like Wicket from the
 programming style, but it needs a separate compiler and I haven't got
 a backend solution. I have red that it's possible to use GWT with
 Wicket. How far is this grown?
 I fear about a lack of AJAX-Wicket components, because I have seen
 only few components. I hope someone has experience with similar
 projects and can give me a few helpful advices.
 
 Thanks very much.
 Patrick
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Questions-about-GWT%2C-JSF-and-Wicket-tf4514338.html#a12876346
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Wicket + JExcel

2007-09-25 Thread Edi

I have one excel file. I want to display only excel cell A1 and C2 only. How?
(how to restrict the unwanted excel cells)
Please explain.

Thanking You.
Regards,
Edi
-- 
View this message in context: 
http://www.nabble.com/Wicket-%2B-JExcel-tf4514633.html#a12876741
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Inter component events?

2007-09-25 Thread Wouter Huijnink



I see that it is not such an obvious win here as with fat client but how
about another of my use cases:
* Large page with small parts being updated by Ajax
* Two components sitting long way apart in the tree (context sensitive
button that responds to items in rest of the page)

So having an almost declaritive style this button is enabled = fn(x) only
works if I know when to re-render that button. 


I seem to be leaving OO behind by having lots of procedural when x happens
update a, b and c rather than a subscribing to events from another
component.

Using some sort of event model seems to me to improve OO - encapsulation -
reuse. For large trees of components with only tiny parts that need sending
to the client it also seems more efficient


we have a similar use case, where a tabbed panel displays items in 
different workflow states. To simplify:

Tab 1: lists all new items
Tab 2: lists all reviewed items
Tab 3: lists all closed items

For each list item, an ItemPanel is displayed, containing a button that 
will put the item in the next workflow state. We wanted to reuse this 
panel in all tabs. In order to be able to properly update models without 
hard coding page hierarchy into the ItemPanel, we defined an interface 
ItemStateChangeHandler, that provides the hook onItemStateChange(newState).


All tabs implement this interface, and each ItemPanel is created with a 
reference to the ItemStateChangeHandler that is to be notified when it's 
about to change state. So when the 'nextState' button is clicked, the 
handler is notified and will be able to do stuff in the business layer 
(i.e. persist new state), adjust the list view's model and update the 
relevant components.


Kind of home brew though, so we're very curious as to how others would 
implement a case like this.


Kind regards,
Wouter

--
Wouter Huijnink
Func. Internet Integration
W http://www.func.nl
T +31 20 423
F +31 20 4223500


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: NoSuchMethodException / PropertyResolver

2007-09-25 Thread Johan Compagner
thats just a debug log:

*

catch* (Exception e)

{

*log*.debug(Cannot find getter  + clz + . + expression, e);

}
maybe i should just delete that log statement to kill the confusion.

johan



On 9/25/07, Phillip Rhodes [EMAIL PROTECTED] wrote:

 Hi guys, I'm seeing a weird problem with Wicket.  I *think* it's the
 same problem discussed here
 
 http://www.nabble.com/Tracking-down-an-elusive-error-during-migration-to-1.3-t4381647.html
 ,
 but won't swear to it.  Basically Wicket
 is logging a NoSuchMethodException when rendering my page.

 This is using Wicket 1.2.4, running on JDK 1.6, JBoss 4.0.5, on Windows
 2000 Server.

 The java code for the page in question looks like this:



 *** BEGIN JAVA CODE ***
 package org.openqabal.web.registration;

 import org.openqabal.auth.encoder.QPasswordEncoder;
 import org.openqabal.core.lib.domain.QGenericUserAccount;
 import org.openqabal.core.lib.domain.impl.UserAccountImpl;
 import org.openqabal.core.lib.service.QHybridUserService;

 import wicket.PageParameters;
 import wicket.examples.WicketExampleHeader;
 import wicket.markup.html.WebPage;
 import wicket.markup.html.form.Form;
 import wicket.markup.html.form.PasswordTextField;
 import wicket.markup.html.form.TextField;
 import wicket.markup.html.panel.FeedbackPanel;
 import wicket.model.PropertyModel;
 import wicket.spring.injection.annot.SpringBean;
 import wicket.util.string.Strings;
 import wicket.util.value.ValueMap;

 public final class UserRegistration1 extends WebPage
 {
@SpringBean(name=hybridUserService)
private QHybridUserService userService;

@SpringBean(name=passwordEncoderBean)
private QPasswordEncoder passwordEncoder;

// note: TODO UserAccountFactory here...

public UserRegistration1()
{
this( null );
}

public UserRegistration1(   final PageParameters parameters )
{
final String packageName =
 getClass().getPackage().getName();
add(new WicketExampleHeader(mainNavigation,
 Strings.afterLast(packageName, '.'), this));

// Create feedback panel and add to page
final FeedbackPanel feedback = new
 FeedbackPanel(feedback);

add(feedback);

add(new UserRegistrationForm(userForm));
}

public final class UserRegistrationForm extends Form
{
// El-cheapo model for form
private final ValueMap properties = new ValueMap();

public UserRegistrationForm(final String componentName)
{
super(componentName);

// Attach textfield components that edit properties
 map model
add(new TextField(firstName, new
 PropertyModel(properties,
 firstName)));
add(new TextField(lastName, new
 PropertyModel(properties,
 lastName)));
add( new TextField( loginName, new
 PropertyModel(properties,
 loginName)));
add(new TextField(emailAddress, new
 PropertyModel(properties,
 emailAddress)));
add(new PasswordTextField(password, new
 PropertyModel(properties,
 password)));
add(new PasswordTextField(confirmPassword, new
 PropertyModel(properties, confirmPassword)));
}

public final void onSubmit()
{
System.out.println( onSubmit() );
String firstName = properties.getString
 (firstName);
String lastName = properties.getString(lastName);
String loginName = properties.getString(
 loginName );
String emailAddress = properties.getString
 (emailAddress);
String password = properties.getString(password);
String confirmPassword = properties.getString
 (confirmPassword);

// create and persist user object using the details
 we
// received...

QGenericUserAccount userAccount = new
 UserAccountImpl();
userAccount.setLoginName( loginName );
userAccount.setPassword( passwordEncoder.encode
 (password));

userService.createAllAccounts(userAccount);


}
}
 }

 *** END JAVA CODE ***



 and here is the relevant stuff from the log.  FWIW, I get this
 for every one of the above properties, but am only posting this
 log snippet since the others are all the same.



 *** BEGIN LOG / STACKTRACE ***

 2007-09-24 21:55:13,890 DEBUG [wicket.Page] Rendered [MarkupContainer
 [Component id = lastName, page =
 org.openqabal.web.registration.UserRegistration1, path =
 0:userForm:lastName.TextField, 

Re: Wicket + JExcel

2007-09-25 Thread Jan Kriesten

 I have one excel file. I want to display only excel cell A1 and C2 only. How?
 (how to restrict the unwanted excel cells)
 Please explain.

just add a1 and c2 as labels to the output (a repeater e.g.) and throw the rest
away?! ;-) how to access those cells should be in the jexcel api, i suppose.

regards, --- jan.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: No cursor in Modal Window in FF

2007-09-25 Thread Matej Knopp
It's a bug in firefox most probably. But i've only seen it when the
modal window was position:fixed. Therefore in firefox the modal window
is position:absolute; I was not able to reproduce it after that,
neither it happens in wicket-examples.

-Matej

On 9/25/07, Eelco Hillenius [EMAIL PROTECTED] wrote:
 If you have this reproducible, please file a bug report.

 Eelco

 On 9/11/07, Artur W. [EMAIL PROTECTED] wrote:
 
  Hi!
 
  There is no cursor in input fields in Modal Window.
  I use Wicket wicket-1.3.0-beta3 and ff 2.0.0.6
 
  Thanks for help,
  Artur
 
  --
  View this message in context: 
  http://www.nabble.com/No-cursor-in-Modal-Window-in-FF-tf4421726.html#a12612071
  Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



most sensible factory pattern for a component

2007-09-25 Thread Sam Hough

Seems like a common requirement to customise a component by having it create
a different type of component within it. Like ListView.newItem or
IItemFactory. Is extending the component to implement such a method any
better than passing in an object that implements some factory interface? 

Passing in a factory object seems better for re-use since you can only
extend an object once... Limits what the constructor can access more but
that may be a good thing?

Guess with an interface we get to choose.
-- 
View this message in context: 
http://www.nabble.com/most-sensible-factory-pattern-for-a-component-tf4514777.html#a12877154
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: newbie question about using WizardStep, help! thanks!

2007-09-25 Thread raybristol

Great! that's what I want, thanks so much and sorry for my stupid questions
:)



Eelco Hillenius wrote:
 
 Hi experts,

 I want to implement a wizard, user need to input some data, I can do it
 with
 a single page using form, but I don't know how to do it in wizard, I put
 a
 couple of input textfield etc. then I get a error:

 java.lang.IllegalStateException: Attempt to set model object on null
 model
 of component: wizard:form:view:expectedNumberOfBoxes

 Note: expectedNumberOfBoxes is the first textfield I declared in the java
 class, after googling a few hours(not too much information) I think I
 need
 to setup a 'model'? but I probably need more details how... my code is
 like:

 public class DeliveryDetails extends WizardStep {


 public DeliveryDetails(Delivery delivery, String title, String
 content){
 super(title, content);

 RequiredTextField expectedNumberOfBoxesTextField = new
 RequiredTextField(expectedNumberOfBoxes, Integer.class);
 add(expectedNumberOfBoxesTextField);

 RequiredTextField receivedNumberOfBoxesTextField = new
 RequiredTextField(receivedNumberOfBoxes, Integer.class);
 add(receivedNumberOfBoxesTextField);

 }
 
 Yep, you need to work with models. For instance:
 
 RequiredTextField receivedNumberOfBoxesTextField = new
 RequiredTextField(receivedNumberOfBoxes, Integer.class, new
 PropertyModel(delivery, receivedNumberOfBoxes));
 add(receivedNumberOfBoxesTextField);
 
 or:
 
 setModel(new CompoundPropertyModel(delivery));
 RequiredTextField receivedNumberOfBoxesTextField = new
 RequiredTextField(receivedNumberOfBoxes, Integer.class);
 add(receivedNumberOfBoxesTextField);
 
 
 Eelco
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/newbie-question-about-using-WizardStep%2C-help%21-thanks%21-tf4509850.html#a12878125
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: NoSuchMethodException / PropertyResolver

2007-09-25 Thread Al Maw

Johan Compagner wrote:

thats just a debug log:

*

catch* (Exception e)

{

*log*.debug(Cannot find getter  + clz + . + expression, e);

}
maybe i should just delete that log statement to kill the confusion.


Just log it without the stack trace.

Regards,

Al

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Redirect to HTTPS?

2007-09-25 Thread Doug Leeper



Eelco Hillenius wrote:
 
 
 I stand by my suggestion that you could just try to redirect to a
 secure page. After that, the relative URLs stay secure no?
 
 If I'm missing something, please tell.
 
 Eelco
 
 
 

I think we are both missing something.  There are a couple of situations
(aka requirements) that I want to describe and hopefully get your opinion on
how to go about solving them.

1.  A page has information that needs to be secure, i.e. demographic
information, billing information.  This information can be accessed from a
non-secured page, i.e. home page

I believe what you proposed can be accomplished.  Not sure how though. A
working example would do wonders here.  I am still learning Wicket.

2.  Submitting a form has to be secure, i.e. login information, demographics
information

This can be from a non-secure page (login home page) or secure-page
(demogaphics page).  Not sure how to do this without the proposed refactor
(doPostPrepend()) since the URL generation is encapsulated and final.

3.  When on a secure page,  link to a non-secure page (from demographics
page to company info)

Wicket currently builds URLs that are relative to domain and agnostic to
protocol (https/http), i.e. /?wicket=...  What this does will do if redirect
to a secure page is keep all subsequent links in the https mode.  Therefore,
this will place an undo amount of load on the https server and potentially
slow down the user experience.




The proposed refactor would mitigate 1 and 3.  For 2, I foresee a
SecureLink/SecureButton/SubmitLink (and others?) that would need to created
which has the RequireSSL annotation.  By doing so, it would fit nicely in
the proposed refactor.

Does this clear it up?  These are actual client requirements and not sure
how to proceed without the proposed solution.

Thanks
- Doug

-- 
View this message in context: 
http://www.nabble.com/Redirect-to-HTTPS--tf4509537.html#a12878724
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: wicket-ajax.js not added

2007-09-25 Thread Michael Preiss


John Carlson-5 wrote:
 
 I have had several pages that will not initially load the wicket-ajax
 functionality.  [...] I did alittle snooping and found that on the first
 load 
 wicket doesn't add the wicket-ajax.js to the markup.
 
You should try the header contributor. Example:

public somecomponent (String myid) {
   super (myid);
   add (HeaderContributor.forJavaScript(somecomponent.class, 
   javascriptfile.js));
   ...
} 


John Carlson-5 wrote:
 
 I setoutputmarkupid(true) on all the related things as far I can tell.
 Does the order of setting markup Id and adding things to the page
 matter?  ie.
 
setOutputMarkupId is needed to enable wicket to update a 
component after requests are returned to the client. It has no
effect here.
-- 
View this message in context: 
http://www.nabble.com/wicket-ajax.js-not-added-tf4512483.html#a12878783
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Redirect to HTTPS?

2007-09-25 Thread Doug Leeper

 I have no problem with the approach in finals.  I think you guys have done a
great job.


Please see my response 
http://www.nabble.com/Redirect-to-HTTPS--tf4509537.html#a12878724 here 

I, too, am very interested in the feedback on this.



Eelco Hillenius wrote:
 
 I haven't tested but I think the solution is to override public final
 CharSequence encode(final RequestCycle requestCycle,final
 IRequestTarget
 requestTarget)BUT...it is final so we can't reuse the class directly
 but
 have to make a copy.
 
 And this is where your alarm bells should go off. Admittedly we have
 been very generous in using final, maybe sometimes a bit too much, but
 the idea behind it is that we think that what you want to do  can
 probably be done in a better way, or we simply don't know (and an
 unrelated reason is self protection so that we have more options for
 refactoring without breaking the whole world). So, any time you come
 across a situation where something is final and you think you have a
 really good use case to get rid of it, you should post a message here.
 Chances are we can tell you a better way to do it, or you convince us
 to remove final or in some other way facilitate your use case.
 
 As for your case, I'd like to hear what Al thinks about this. It might
 work to make the factor prepending into a separate, overridable
 method.
 
 Eelco
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Redirect-to-HTTPS--tf4509537.html#a12878787
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Override appendOptionHtml in a DropDownChoice with setRequired(true)

2007-09-25 Thread bebetu

Hi,
I am using Wicket 1.3 beta3. I want to have a mandatory DDC in a WizardStep
so I have ddc.setRequired(true). 
I've overridden appendOptionHtml to handle the option rendering and I
noticed that whenever I submit the step with a valid selection on the DDC, I
get a feedback error message saying that the DDC field is mandatory.
If I don't override the appendOptionHtml method the behavior is as expected.
Is this a bug?

florin
-- 
View this message in context: 
http://www.nabble.com/Override-appendOptionHtml-in-a-DropDownChoice-with-setRequired%28true%29-tf4515329.html#a12878901
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Inter component events?

2007-09-25 Thread Sam Hough

Maybe something like:
http://www.javaworld.com/javaworld/jw-11-2001/jw-1109-subscriber.html?page=4

No big extra jars...

Would be nice if buttons could just subscribe to some standard set of
messages (e.g. change of focus)


Wouter Huijnink wrote:
 
 
 I see that it is not such an obvious win here as with fat client but how
 about another of my use cases:
 * Large page with small parts being updated by Ajax
 * Two components sitting long way apart in the tree (context sensitive
 button that responds to items in rest of the page)

 So having an almost declaritive style this button is enabled = fn(x)
 only
 works if I know when to re-render that button. 

 I seem to be leaving OO behind by having lots of procedural when x
 happens
 update a, b and c rather than a subscribing to events from another
 component.

 Using some sort of event model seems to me to improve OO - encapsulation
 -
 reuse. For large trees of components with only tiny parts that need
 sending
 to the client it also seems more efficient
 
 we have a similar use case, where a tabbed panel displays items in 
 different workflow states. To simplify:
 Tab 1: lists all new items
 Tab 2: lists all reviewed items
 Tab 3: lists all closed items
 
 For each list item, an ItemPanel is displayed, containing a button that 
 will put the item in the next workflow state. We wanted to reuse this 
 panel in all tabs. In order to be able to properly update models without 
 hard coding page hierarchy into the ItemPanel, we defined an interface 
 ItemStateChangeHandler, that provides the hook
 onItemStateChange(newState).
 
 All tabs implement this interface, and each ItemPanel is created with a 
 reference to the ItemStateChangeHandler that is to be notified when it's 
 about to change state. So when the 'nextState' button is clicked, the 
 handler is notified and will be able to do stuff in the business layer 
 (i.e. persist new state), adjust the list view's model and update the 
 relevant components.
 
 Kind of home brew though, so we're very curious as to how others would 
 implement a case like this.
 
 Kind regards,
 Wouter
 
 -- 
 Wouter Huijnink
 Func. Internet Integration
 W http://www.func.nl
 T +31 20 423
 F +31 20 4223500
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Inter-component-events--tf4508127.html#a12879006
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DOM changes via JavaScript get lost

2007-09-25 Thread Michael Preiss

I have added some DOM manipulating javascript to my wicket app, that
amongst other things inserts images at the mouse coordinates. The
problem is: after updating a component via wicket, the whole changes
to the DOM will get lost. Any ideas how to solve the problem or work
around it?

PS: I'm using wicket 1.3 beta 2
-- 
View this message in context: 
http://www.nabble.com/DOM-changes-via-JavaScript-get-lost-tf4515396.html#a12879083
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT] Making it easy for Designers in my Wicket project

2007-09-25 Thread Sjoerd Lohuis
This is something I'm looking for as well. I'm a frontend developer (or 
html monkey if you will, thanks Sam ;) ) and I'm trying to find a way to 
make it easier for me and my fellow html  css-ers to work on the Wicket 
frondend. At the moment I'm spending a lot of time searching through 
wicket pages and panels trying to find that single HTML element I want 
to tweak or something like that.


All tips are appreciated.

--
Sjoerd Lohuis
Func. Internet Integration
W http://www.func.nl
T +31 20 423
F +31 20 4223500



Sam Hough wrote:

I'm wandering about a similar thing but with the requirement that the
designer (html monkey) can work against a live instance of wicket to make
sure the dynamic stuff doesn't break his CSS.

Only thing I can think of is that it always lives in WEB-INF/classes but I
don't like. Not that I have a reason.


Craig Tataryn wrote:
  

I have a question about how I can make it dead simple for a Designer
(using
dreamweaver) to code my html/css for me.  Essentially I want him to be
able
to update a directory structure of html/css files and have my Maven build
pull those files into the proper places (i.e.
WEB-INF/classes/my/package)

The directories he is updating are accessible by the build server, and
would
have a directory structure like so:

css
  - main.css
img
  - arrow.gif,
pages
  - home
   - HomePage.html
  - add
   - AddProduct.html


These should translate over to my side as:

css - src/main/webapp/css
img - src/main/webapp/img
home - src/main/java/com/mycompany/myproduct/wicket/home
add - src/main/java/com/mycompany/myproduct/wicket/add

Is this something I can have Maven do automagically?  Or is it something
I'm
going to have to write a batch script for?

Thanks,

Craig.





  


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: DOM changes via JavaScript get lost

2007-09-25 Thread Matej Knopp
This is normal, if you replace the part of page using wicket ajax, it
will generate the markup and won't preserve your changes. You can
either not replace the affected parts of page, or notify server and
generate markup with the image.

-Matej

On 9/25/07, Michael Preiss [EMAIL PROTECTED] wrote:

 I have added some DOM manipulating javascript to my wicket app, that
 amongst other things inserts images at the mouse coordinates. The
 problem is: after updating a component via wicket, the whole changes
 to the DOM will get lost. Any ideas how to solve the problem or work
 around it?

 PS: I'm using wicket 1.3 beta 2
 --
 View this message in context: 
 http://www.nabble.com/DOM-changes-via-JavaScript-get-lost-tf4515396.html#a12879083
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Using Resource to provide background attribute to td-tag?

2007-09-25 Thread wfaler

Hi,
I want to use a ResourceReference (or something comparable) to set the
background-attribute of a td-cell with an image on my classpath.
How do I achieve this?
It is quite straightforward for images, but it gets trickier with
background-images to other html elements..

/ Wille
-- 
View this message in context: 
http://www.nabble.com/Using-Resource-to-provide-background-attribute-to-td-tag--tf4515517.html#a12879415
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: New Wicket Portlets Demo available

2007-09-25 Thread Ate Douma

I'm even more happy to announce that Wicket Portlet Support has now been merged 
into the trunk and already will be part of the upcoming 1.3.0-beta4 release!

In the next few days or hopefully latest end of next week, I'll add some documentation to the Wicket Wiki describing the portlet features, limitations, how to 
write portlet compliant Wicket applications and how to run them in a portal.


For those already familiar with portlets and portals, check out the WICKET-647 
and WICKET-658 issues which have some head start info.

Regards,

Ate Douma

Ate Douma wrote:
I'm really happy to announce that a new and quite feature complete 
Wicket Portlets Demo is now available for download at:


  
http://people.apache.org/~ate/wicket/jetspeed-2.1.3-dev-wicket-demo-installer.jar 



I've worked hard the last few weeks to improve the Wicket portlet 
support branch and it can now run all Wicket Examples natively as portlet!
See also IRA issue WICKET-658 at 
http://issues.apache.org/jira/browse/WICKET-658#action_12528082 where I 
have provided more information how to install and use this demo.


Although there probably are still some minor issues here and there, the 
demo will show that portlet development using Wicket is now very much 
feasible.


I'd like to invite anyone interested to try out the demo and see it in 
action for yourself, and of course please report any encountered 
issue/problems to the dev list.


I've developed the portlet support based on the 1.3.0-beta3 release 
(with few minor bugfixes ported back from the trunk), so although the 
trunk development has progressed at it usual aggressive speed, updating 
the portlet-support to the latest Wicket trunk shouldn't be too much 
work (that is: right now!).


As we would like to start using Wicket for a rewrite of the Jetspeed-2 
administration portlets *now*, it would be great if the portlet support 
can be incorporated into the trunk as soon as possible. Delaying this 
until after the 1.3.0 release would mean being out-of-sync with the main 
wicket trunk development all the time and a lot of work each time we 
want/need to bring it back in sync.


Initially, back in May this year, my idea was waiting with merging the 
portlet support in the trunk to after the 1.3.0 release.
But as 1.3.0 still isn't released yet and still in beta phase, it would 
be much better to merge now otherwise the portlet-support will be 
constantly out-of-sync with the main wicket trunk development, causing a 
lot of effort each time we want (or need) to bring it back in sync.


For Jetspeed-2, we would very much like to start using Wicket for a 
rewrite of the Jetspeed-2 administration portlet *now*. Having towait 
until after the 1.3.0 release, or be dependent on unofficial builds from 
the portlet-support branch would be less ideal to say the least.
Other parties, like my own company, already have started using the 
Wicket portlet-support branch, so having to delay the merge to trunk 
really wouldn't be fun.


AFAICS though, the impact of merging the portlet-support to trunk won't 
be big.
I had to make a few (internal) changes in the wicket core, but I don't 
think those will have functional side-effects.


To make it easier for the other committers to decide if we can merge the 
portlet-support to trunk now, I will create a new JIRA issue for it.
For the changes needed to the current Wicket trunk I'll create separate 
patches with explanations why and attach those to that issue.
(note: most of these changes I already described in detail under 
subtasks of the WICKET-647 issue).
We can then discuss these changes individually and if need be see if 
alternative solutions are possible.
After those changes are reviewed and accepted, the portlet support then 
can be merged to the trunk.


WDYT?

Regards,

Ate




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Questions about GWT, JSF and Wicket

2007-09-25 Thread Sam Hough

One of the requirements here is to support old browsers and browsers with JS
disabled... 

I'd have liked to have a go at using the gwt html project even though it is
very, very new but that was seen as way too scary.



John Krasnay wrote:
 
 On Tue, Sep 25, 2007 at 03:07:21AM -0700, Sam Hough wrote:
 
 Taking as a basic assumption that the reason we want GWT or Wicket is to
 do
 almost all our logic in Java and Wicket is in full Ajax mode:
 
 1) In GWT a lot of the UI logic can be moved to the client. e.g. If a
 user
 changes focus GWT can call event handlers, authored in Java, that update
 the
 UI without any server interaction.
 2) Wicket Ajax is single threaded (Sjax) so the user can't fire off more
 than one server request at a time. In GWT you could have two server
 threads
 working for a user. One that could be slow but not block the UI.
 3) GWT has less work to do because it doesn't need to map events on the
 client to the server. It stays in the DOM so just attaches event handlers
 without having to map them to/from the server.
 4) Rendering the UI is all done on the client so your server requirements
 are much lower.
 
 
 Wow, GWT sure sounds great! Why are you still using Wicket?
 
 jk
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Questions-about-GWT%2C-JSF-and-Wicket-tf4514338.html#a12879746
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Questions about GWT, JSF and Wicket

2007-09-25 Thread Sam Hough

Another big GWT limitation is that you have a very small subset of java
runtime to write your UI in. Lots of your favourite things are probably
missing.
-- 
View this message in context: 
http://www.nabble.com/Questions-about-GWT%2C-JSF-and-Wicket-tf4514338.html#a12879789
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Experiences with ReloadingWicketFilter

2007-09-25 Thread Peter Thomas
On 9/25/07, Jean-Baptiste Quenot [EMAIL PROTECTED] wrote:

 * Peter Thomas:

  Just  curious  to   know  if  others  have   problems  with  the
  ReloadingWicketFilter when you make minor changes to a page with
  markup inheritance, you may want to look at the issue history.

 FYI  the  problem described  in  the  JIRA  issue is  not  related
 to  markup  inheritance.   The  exception is  thrown  because  the
 class  TestPage is  loaded from  two different  classloaders, thus
 TestPage(classloader1) != TestPage(classloader2).
 --


Thanks JBQ.  It would be nice to have a better error / stack trace for the
above case.  Currently it is like Markup of type 'html' for component '
test.TestPage' not found. The stack trace also gives the impression that
markup inheritance has something to do with the error, e.g. 
markup.loader.InheritedMarkupMarkupLoader etc.

So to confirm my understanding, when using the ReloadingWicketFilter, when
you make a change to a Page you have to re-trace navigation to a point prior
to where the Page is loaded.  Is that correct?

I'm pretty sure that earlier in the SNAPSHOT days refreshing the page just
worked, and this is backed up by another user here:

http://www.nabble.com/Has-something-changed-in-markup-inheritance--t3963374.html#a11532314

I'm just hoping that something can be done (or un-done) to improve the
developer experience when using ReloadingWicketFilter.

Thanks,

Peter.


RE: New Wicket Portlets Demo available

2007-09-25 Thread Weaver, Scott
This great news!  Thanks for all your hard work on this, Ate.

-scott

-Original Message-
From: Ate Douma [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 25, 2007 9:31 AM
To: users@wicket.apache.org
Cc: Jetspeed Users List
Subject: Re: New Wicket Portlets Demo available

I'm even more happy to announce that Wicket Portlet Support has now been
merged into the trunk and already will be part of the upcoming
1.3.0-beta4 release!

In the next few days or hopefully latest end of next week, I'll add some
documentation to the Wicket Wiki describing the portlet features,
limitations, how to 
write portlet compliant Wicket applications and how to run them in a
portal.

For those already familiar with portlets and portals, check out the
WICKET-647 and WICKET-658 issues which have some head start info.

Regards,

Ate Douma

Ate Douma wrote:
 I'm really happy to announce that a new and quite feature complete 
 Wicket Portlets Demo is now available for download at:
 
   

http://people.apache.org/~ate/wicket/jetspeed-2.1.3-dev-wicket-demo-inst
aller.jar 
 
 
 I've worked hard the last few weeks to improve the Wicket portlet 
 support branch and it can now run all Wicket Examples natively as
portlet!
 See also IRA issue WICKET-658 at 
 http://issues.apache.org/jira/browse/WICKET-658#action_12528082 where
I 
 have provided more information how to install and use this demo.
 
 Although there probably are still some minor issues here and there,
the 
 demo will show that portlet development using Wicket is now very much 
 feasible.
 
 I'd like to invite anyone interested to try out the demo and see it in

 action for yourself, and of course please report any encountered 
 issue/problems to the dev list.
 
 I've developed the portlet support based on the 1.3.0-beta3 release 
 (with few minor bugfixes ported back from the trunk), so although the 
 trunk development has progressed at it usual aggressive speed,
updating 
 the portlet-support to the latest Wicket trunk shouldn't be too much 
 work (that is: right now!).
 
 As we would like to start using Wicket for a rewrite of the Jetspeed-2

 administration portlets *now*, it would be great if the portlet
support 
 can be incorporated into the trunk as soon as possible. Delaying this 
 until after the 1.3.0 release would mean being out-of-sync with the
main 
 wicket trunk development all the time and a lot of work each time we 
 want/need to bring it back in sync.
 
 Initially, back in May this year, my idea was waiting with merging the

 portlet support in the trunk to after the 1.3.0 release.
 But as 1.3.0 still isn't released yet and still in beta phase, it
would 
 be much better to merge now otherwise the portlet-support will be 
 constantly out-of-sync with the main wicket trunk development, causing
a 
 lot of effort each time we want (or need) to bring it back in sync.
 
 For Jetspeed-2, we would very much like to start using Wicket for a 
 rewrite of the Jetspeed-2 administration portlet *now*. Having towait 
 until after the 1.3.0 release, or be dependent on unofficial builds
from 
 the portlet-support branch would be less ideal to say the least.
 Other parties, like my own company, already have started using the 
 Wicket portlet-support branch, so having to delay the merge to trunk 
 really wouldn't be fun.
 
 AFAICS though, the impact of merging the portlet-support to trunk
won't 
 be big.
 I had to make a few (internal) changes in the wicket core, but I don't

 think those will have functional side-effects.
 
 To make it easier for the other committers to decide if we can merge
the 
 portlet-support to trunk now, I will create a new JIRA issue for it.
 For the changes needed to the current Wicket trunk I'll create
separate 
 patches with explanations why and attach those to that issue.
 (note: most of these changes I already described in detail under 
 subtasks of the WICKET-647 issue).
 We can then discuss these changes individually and if need be see if 
 alternative solutions are possible.
 After those changes are reviewed and accepted, the portlet support
then 
 can be merged to the trunk.
 
 WDYT?
 
 Regards,
 
 Ate
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Experiences with ReloadingWicketFilter

2007-09-25 Thread Jean-Baptiste Quenot
* Peter Thomas:

 Soto   confirmmy   understanding,when   usingthe
 ReloadingWicketFilter, when you make a change to a Page you have
 to re-trace  navigation to a  point prior  to where the  Page is
 loaded.  Is that correct?

You  have to  make sure  you're not  using an  instance of  a page
loaded in  a previous  classloader, ie  make sure  not to  keep an
instance of a page across reloads.

 I'm   justhoping   that   something   canbe   done   (or
 un-done)  to   improve  the  developer  experience   when  using
 ReloadingWicketFilter.

To be  honest ReloadingWicketFilter is  a hack to work  around how
the JVM  loads classes, and  it is bootstrapped during  the Wicket
application initialization.

If ReloadingWicketFilter is causing more problems than it is meant
to  solve,  we  might  simply  want  to  remove  it  from  Wicket,
especially  if  it proves  to  be  unreliable in  complex  setups.
Unless you're willing to turn your hope into contribution?

Have you  seen my suggestion  to clear your session  cookie before
reloading the page  BTW?  All this is very  complicated I realize,
but there's not much we can do to simplify reloading.
-- 
 Jean-Baptiste Quenot
aka  John Banana   Qwerty
http://caraldi.com/jbq/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: New Wicket Portlets Demo available

2007-09-25 Thread Dipu Seminlal
Thats good news, thanks very much.

Cheers
Dipu

On 9/25/07, Ate Douma [EMAIL PROTECTED] wrote:

 I'm even more happy to announce that Wicket Portlet Support has now been
 merged into the trunk and already will be part of the upcoming 
 1.3.0-beta4release!

 In the next few days or hopefully latest end of next week, I'll add some
 documentation to the Wicket Wiki describing the portlet features,
 limitations, how to
 write portlet compliant Wicket applications and how to run them in a
 portal.

 For those already familiar with portlets and portals, check out the
 WICKET-647 and WICKET-658 issues which have some head start info.

 Regards,

 Ate Douma

 Ate Douma wrote:
  I'm really happy to announce that a new and quite feature complete
  Wicket Portlets Demo is now available for download at:
 
 
 
 http://people.apache.org/~ate/wicket/jetspeed-2.1.3-dev-wicket-demo-installer.jar
 
 
  I've worked hard the last few weeks to improve the Wicket portlet
  support branch and it can now run all Wicket Examples natively as
 portlet!
  See also IRA issue WICKET-658 at
  http://issues.apache.org/jira/browse/WICKET-658#action_12528082 where I
  have provided more information how to install and use this demo.
 
  Although there probably are still some minor issues here and there, the
  demo will show that portlet development using Wicket is now very much
  feasible.
 
  I'd like to invite anyone interested to try out the demo and see it in
  action for yourself, and of course please report any encountered
  issue/problems to the dev list.
 
  I've developed the portlet support based on the 1.3.0-beta3 release
  (with few minor bugfixes ported back from the trunk), so although the
  trunk development has progressed at it usual aggressive speed, updating
  the portlet-support to the latest Wicket trunk shouldn't be too much
  work (that is: right now!).
 
  As we would like to start using Wicket for a rewrite of the Jetspeed-2
  administration portlets *now*, it would be great if the portlet support
  can be incorporated into the trunk as soon as possible. Delaying this
  until after the 1.3.0 release would mean being out-of-sync with the main
  wicket trunk development all the time and a lot of work each time we
  want/need to bring it back in sync.
 
  Initially, back in May this year, my idea was waiting with merging the
  portlet support in the trunk to after the 1.3.0 release.
  But as 1.3.0 still isn't released yet and still in beta phase, it would
  be much better to merge now otherwise the portlet-support will be
  constantly out-of-sync with the main wicket trunk development, causing a
  lot of effort each time we want (or need) to bring it back in sync.
 
  For Jetspeed-2, we would very much like to start using Wicket for a
  rewrite of the Jetspeed-2 administration portlet *now*. Having towait
  until after the 1.3.0 release, or be dependent on unofficial builds from
  the portlet-support branch would be less ideal to say the least.
  Other parties, like my own company, already have started using the
  Wicket portlet-support branch, so having to delay the merge to trunk
  really wouldn't be fun.
 
  AFAICS though, the impact of merging the portlet-support to trunk won't
  be big.
  I had to make a few (internal) changes in the wicket core, but I don't
  think those will have functional side-effects.
 
  To make it easier for the other committers to decide if we can merge the
  portlet-support to trunk now, I will create a new JIRA issue for it.
  For the changes needed to the current Wicket trunk I'll create separate
  patches with explanations why and attach those to that issue.
  (note: most of these changes I already described in detail under
  subtasks of the WICKET-647 issue).
  We can then discuss these changes individually and if need be see if
  alternative solutions are possible.
  After those changes are reviewed and accepted, the portlet support then
  can be merged to the trunk.
 
  WDYT?
 
  Regards,
 
  Ate
 
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: BookmarkablePageLink doesn't take advantage of pretty url for previously mounted pages when generating the URL

2007-09-25 Thread mchack

Beta3 is what I am running. I was also under the impression that href
references that could be resolved to bookmarked pages would be done so
automatically by the framework even if there were no explicit wicket:link
tag? Not so in my case. Is this correct interpretation?

-mike



Eelco Hillenius wrote:
 
 Is there a reason for this? The wicket:link will generate the pretty url
 when
 it encounters pages that have been mounted. Just trying to understand if
 I
 am missing something in my understanding of the framework or if this is
 an
 oversight.
 
 It should be done for bookmarkablepagelinks as far as I know as well.
 What version of Wicket is this?
 
 Eelco
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/BookmarkablePageLink-doesn%27t-take-advantage-of-pretty-url-for-previously-mounted-pages-when-generating-the-URL-tf4430990.html#a12880794
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT] Making it easy for Designers in my Wicket project

2007-09-25 Thread Craig Tataryn
The way I tackled this was to put all my html pages in src/main/resources
instead of src/main/java to keep them separate from the .java files (so as
not to confuse the designers).

So for instance, I might have:
src/main/resources/com/mycompany/wicket/home/HomePage.html
src/main/resources/com/mycompany/wicket/user/AddPage.html
src/main/resources/com/mycompany/wicket/user/UserPanel.html
src/main/webapp/css
src/main/webapp/img

Then what I did was I installed Tortoise SVN and Apache Web Server (not
Tomcat) on the designers machine.  Also on their machine, I created a
wwwroot/myproject directory and under there I linked:

wwwroot
  - myproject
   -  home  - svn://...src/main/resources//home
   -  user  - svn://...src/main/resources//user
   -  css   - svn://...src/main/webapp/css
   -  img   - svn://...src/main/webapp/img

Then I configured apache for that directory, and that's the test website
Dreamweaver launches after they make edits and want to preview.  When the
designer is all done, they do an SVN Commit through Tortoise.

Hope that helps,

Craig.

On 9/25/07, Sjoerd Lohuis [EMAIL PROTECTED] wrote:

 This is something I'm looking for as well. I'm a frontend developer (or
 html monkey if you will, thanks Sam ;) ) and I'm trying to find a way to
 make it easier for me and my fellow html  css-ers to work on the Wicket
 frondend. At the moment I'm spending a lot of time searching through
 wicket pages and panels trying to find that single HTML element I want
 to tweak or something like that.

 All tips are appreciated.

 --
 Sjoerd Lohuis
 Func. Internet Integration
 W http://www.func.nl
 T +31 20 423
 F +31 20 4223500



 Sam Hough wrote:
  I'm wandering about a similar thing but with the requirement that the
  designer (html monkey) can work against a live instance of wicket to
 make
  sure the dynamic stuff doesn't break his CSS.
 
  Only thing I can think of is that it always lives in WEB-INF/classes but
 I
  don't like. Not that I have a reason.
 
 
  Craig Tataryn wrote:
 
  I have a question about how I can make it dead simple for a Designer
  (using
  dreamweaver) to code my html/css for me.  Essentially I want him to be
  able
  to update a directory structure of html/css files and have my Maven
 build
  pull those files into the proper places (i.e.
  WEB-INF/classes/my/package)
 
  The directories he is updating are accessible by the build server, and
  would
  have a directory structure like so:
 
  css
- main.css
  img
- arrow.gif,
  pages
- home
 - HomePage.html
- add
 - AddProduct.html
 
 
  These should translate over to my side as:
 
  css - src/main/webapp/css
  img - src/main/webapp/img
  home - src/main/java/com/mycompany/myproduct/wicket/home
  add - src/main/java/com/mycompany/myproduct/wicket/add
 
  Is this something I can have Maven do automagically?  Or is it
 something
  I'm
  going to have to write a batch script for?
 
  Thanks,
 
  Craig.
 
 
 
 
 

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: Redirect to HTTPS?

2007-09-25 Thread Daniel Frisk
Thanks for your input guys, after some experimenting I used the  
annotation solution and got it working on 1.3 with some tweaking. I  
had to take out the IResponseStrategy and just override respond(..)  
in the RequestCycleProcessor instead. Also the redirection portion  
had to be rewritten as included below to get the paths right.


I'll add my findings to the wiki page.

--- redirect portion that has to be changed to get the paths right ---
StringBuffer url = new StringBuffer(https://;);
url.append(httpServletRequest.getServerName());
url.append(: + MyWebApplication.get().getHttpsPort());

url.append(webRequest.getHttpServletRequest().getContextPath());
url.append(webRequest.getServletPath());
webResponse.redirect(url.toString());
--- end of redirect portion ---

// Daniel


On 2007-09-25, at 08:00, Eelco Hillenius wrote:

All the other encode methods get the proper wicket URL but doesn't  
prepend
the webapp URI which this final encode method does.  Beyond filing  
a RFE to
either make this method non-final or provide a postEncode 
(RequestCycle,
IRequestTarget) method before URL encoding, we will have to copy  
the entire

class and provide this behavior.

Thoughts?


I stand by my suggestion that you could just try to redirect to a
secure page. After that, the relative URLs stay secure no?

If I'm missing something, please tell.

Eelco

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



how to add dynamically typed form components?

2007-09-25 Thread Wouter Huijnink

Hi list,

I've seen some threads on dynamically adding components to a form, but
those mainly concern a dynamic *number* of components of the same type.
Our use case concerns adding dynamically typed components to a form. The
idea is as follows:

We have XML consisting of XHTML elements and optional nested  xml
elements from another namespace - something like:

div
 psome silly info here/p
 somenamespace:interaction type=a [custom stuff for this
namespace]/somenamespace:interaction
 peven more info here, and a nested element:
   somenamespace:interaction type=b [custom stuff for this
namespace]/somenamespace:interaction
 /p
/div

What we want to achieve, is to create a (Form?)Component subclass that
can add a FormComponent to itself (or to the form?) for each
interaction, where the actual component created depends on the 'type '
attribute of the interaction.

So the xml snippet should in the end be displayed in the user's browser as:

div
 psome silly info here/p
 input type=text id=generatedId1 class=type-a/
 peven more info here, and a nested element:
   textarea id=generatedId2 class=type-b/textarea
 /p
/div

Our thoughts on this:
1. Transform the XML to wicket markup. Temporary result:
div
 psome silly info here/p
 input type=text wicket:id=generatedId1 class=type-a/
 peven more info here, and a nested element:
   textarea wicket:id=generatedId2 class=type-b/textarea
 /p
/div

2. Feed this markup to a Panel subclass that overriding
getMarkupResourceStream()

The panel overrides getMarkupResourceStream thus:
   public IResourceStream getMarkupResourceStream(MarkupContainer
container,
   Class containerClass) {
   String markup = String.format(wicket:panel%s/wicket:panel,
getModelObject());
   return new StringResourceStream(markup);
   }


In the constructor of this panel the provided wicket markup is set as
its model, and the associated markup stream is iterated to dynamically
add form components backing the generated input tags:

   public MarkupProvidingPanel(String id, IModel model) {
   // model contains a modelObject of type String containing wicket markup
   super(id, model);

   final MarkupStream associatedMarkupStream =
getAssociatedMarkupStream(false);
   while(associatedMarkupStream.hasMore()) {
   MarkupElement element = associatedMarkupStream.next();
   if (element instanceof ComponentTag) {
   ComponentTag componentTag = (ComponentTag) element;

   if (input.equals(componentTag.getName())) {
   String type =
componentTag.getAttributes().getString(type, text);
   if (text.equals(type)) {
   add(new TextField(componentTag.getId()));
   } else if (submit.equals(type)) {
   add(new Button(componentTag.getId(), new
Model(do it!)));
   }
   }
   }
   }
   }


Any thoughts on the viability of this approach? Any alternative approaches?

Regards,
Wouter

--
Wouter Huijnink
Func. Internet Integration
W http://www.func.nl
T +31 20 423
F +31 20 4223500



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Using Resource to provide background attribute to td-tag?

2007-09-25 Thread Gerolf Seitz
hi,
i'd say either:
myTd.add(new AttributeModifier(style, true, background-image:url( +
RequestCycle.urlFor(myImage) + );));
// use an AttributeAppender if you want to preserve an existing style
attribute

or override onComponentTag of myTd and put it in the tag like:
tag.put(style, background-image:url( + RequestCycle.urlFor(myImage) +
););

there maybe even other ways though (like interpolating a css file with the
url and rendering it in the head)

hth,
  gerolf

On 9/25/07, wfaler [EMAIL PROTECTED] wrote:


 Hi,
 I want to use a ResourceReference (or something comparable) to set the
 background-attribute of a td-cell with an image on my classpath.
 How do I achieve this?
 It is quite straightforward for images, but it gets trickier with
 background-images to other html elements..

 / Wille
 --
 View this message in context:
 http://www.nabble.com/Using-Resource-to-provide-background-attribute-to-td-tag--tf4515517.html#a12879415
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: Override appendOptionHtml in a DropDownChoice with setRequired(true)

2007-09-25 Thread Igor Vaynberg
sounds to me like you are not overriding it correctly.

-igor

On 9/25/07, bebetu [EMAIL PROTECTED] wrote:


 Hi,
 I am using Wicket 1.3 beta3. I want to have a mandatory DDC in a
 WizardStep
 so I have ddc.setRequired(true).
 I've overridden appendOptionHtml to handle the option rendering and I
 noticed that whenever I submit the step with a valid selection on the DDC,
 I
 get a feedback error message saying that the DDC field is mandatory.
 If I don't override the appendOptionHtml method the behavior is as
 expected.
 Is this a bug?

 florin
 --
 View this message in context:
 http://www.nabble.com/Override-appendOptionHtml-in-a-DropDownChoice-with-setRequired%28true%29-tf4515329.html#a12878901
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Getting started question...

2007-09-25 Thread Neil B. Cohen
Hi - This looks like a very interesting package. I have been doing most 
of my development work using Netbeans 5.5.1
recently - is Wicket development supported by Netbeans? Are there 
modules I need to install to do that?


How would you compare the VWP package in Netbeans to Wicket - are they 
similar, or orthogonal or ??


Can someone point me in the right direction to get started - any 
Netbeans examples would be good...


thanks very much,

nbc

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Calling all translators - UrlValidator translation

2007-09-25 Thread Reinout van Schouwen
Op vrijdag 07-09-2007 om 16:33 uur [tijdzone +0100], schreef Alastair
Maw:

 We're unfortunately lacking translations for the default error message 
 in most languages. If you can help out for any of our supported 
 languages, please shout. Feel free to e-mail me them directly, or reply 
 to this thread with them. (You needn't bother with a proper patch unless 
 you want to.)
 
 The English in question is:
 '${input}' is not a valid URL.

As an Free software project, I'm a bit surprised Wicket doesn't use the
de facto way of supporting translations in open source land: gettext (or
does it?)

There's a bunch of specialized tools available for the gettext .po
format that free software translators have on their belt. Surely that
would work more producively than asking for translations on a mailing
list each time a new string is added!

Using the XLIFF format together with Sun's translation editor or OmegaT
would be another viable option.

regards,

-- 
Reinout van Schouwen





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Questions about GWT, JSF and Wicket

2007-09-25 Thread Sam Hough

Is the browser not a client in Wicket? You have to slice things differently. 

I agree that using GWT will mean more thought has to go into interaction
with the middle tier but that just means some of your code stays on the
server in some simple facade. It wouldn't be one of my worries in using GWT.
In Wicket or GWT when the user clicks something you have to marshall the
same data for both. If Wicket uses a remote middle tier (including DB) very
similar issues will crop up.

We have found the need to make some of our model serializable to make
working with Wicket nice. 

Obviously lots of pros and cons for both that have not been mentioned so
far.



igor.vaynberg wrote:
 
 how about another tiny limitation which is the programming model. gwt is
 essentially client+server so you cannot use hibernate lazy loading, you
 cannot use data locality to your advantage either. you have to serialize
 all
 your data so you can only use simple objects to communicate between your
 server and ui.
 
 but those are not at all important are they?
 
 -igor
 
 
 On 9/25/07, Sam Hough [EMAIL PROTECTED] wrote:


 Another big GWT limitation is that you have a very small subset of java
 runtime to write your UI in. Lots of your favourite things are probably
 missing.
 --
 View this message in context:
 http://www.nabble.com/Questions-about-GWT%2C-JSF-and-Wicket-tf4514338.html#a12879789
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 
 

-- 
View this message in context: 
http://www.nabble.com/Questions-about-GWT%2C-JSF-and-Wicket-tf4514338.html#a12881704
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Using Resource to provide background attribute to td-tag?

2007-09-25 Thread Al Maw

wfaler wrote:

Hi,
I want to use a ResourceReference (or something comparable) to set the
background-attribute of a td-cell with an image on my classpath.
How do I achieve this?
It is quite straightforward for images, but it gets trickier with
background-images to other html elements..


If you object to style attributes on your HTML tags, then you can do 
this by writing stuff out to the head of your page.


private static final ResourceReference IMAGE = /* ... */;
...
final Component component = /* ... */;
page.add(new AbstractBehavior() {
public void renderHead(IHeaderResponse response) {
String url = urlFor(IMAGE);

String foo = style\n;
foo += # + component.getMarkupId() +  {\n;
foo += background-image: url( + url )\n;;
foo += }\n;
foo += /style;
response.renderString(foo);
}
});

Should work. ;-)

Regards,

Al

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Getting started question...

2007-09-25 Thread Martijn Dashorst
There has been some development for Wicket support in netbeans, though
no core Wicket committers have contributed to that.

Have you looked at the wicket website? And clicked on the IDE plugins
link? This would have shown you a page with the IDE plugins:
http://wicket.apache.org/ides.html

This will take you to:
https://nbwicketsupport.dev.java.net/

My only experience with netbeans and a Wicket project was to create a
quickstart project using the maven quickstart archetype (see our site:
http://wicket.apache.org/quickstart.html) and importing that using the
netbeans maven support module (you'll need to install that too).

That is all there is I think.

Not sure what the VWP is...

Martijn

On 9/25/07, Neil B. Cohen [EMAIL PROTECTED] wrote:
 Hi - This looks like a very interesting package. I have been doing most
 of my development work using Netbeans 5.5.1
 recently - is Wicket development supported by Netbeans? Are there
 modules I need to install to do that?

 How would you compare the VWP package in Netbeans to Wicket - are they
 similar, or orthogonal or ??

 Can someone point me in the right direction to get started - any
 Netbeans examples would be good...

 thanks very much,

 nbc

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-- 
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.0-beta3 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta3/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Using Resource to provide background attribute to td-tag?

2007-09-25 Thread Gerolf Seitz
On 9/25/07, wfaler [EMAIL PROTECTED] wrote:

 I want to use a ResourceReference (or something comparable)


apparently, the words in parenthesis are sometimes more important than the
rest, so yes: keep it simple...

  gerolf


RE: wicket-ajax.js not added

2007-09-25 Thread John Carlson
Eelco,

I'm using 1.2.5

John

On 9/24/07, John Carlson [EMAIL PROTECTED] wrote:
 I have had several pages that will not initially load the wicket-ajax
 functionality.  The page will load but the throttler is missing or it
 will complain that submitFormById is undefined.  Refreshing the page
 loads the ajax scripts and everything works fine.  I did alittle
 snooping and found that on the first load wicket doesn't add the
 wicket-ajax.js to the markup.  That's why some functions are
undefined.
 I setoutputmarkupid(true) on all the related things as far I can tell.
 Does the order of setting markup Id and adding things to the page
 matter?  ie.

No, it shouldn't. What version of Wicket are you using? The first
component or behavior that does a header contribution of
wicket-ajax.js (any AjaxBehavior that is shipped with the wicket core
projects) should cause the script to be loaded.

Whether you call setOutputMarkupId is unrelated to whether scripts are
loaded.

Eelco

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



JDK version

2007-09-25 Thread Neil B. Cohen
I just saw something on the web site that indicates that JDK 1.4 is 
required. We are using JDK 1.6 here at the moment. Anybody know if that 
will work at all, or do I need to install 1.4 to work with Wicket now 
(will 1.5 work??)


thanks,

nbc

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: how to add dynamically typed form components?

2007-09-25 Thread Igor Vaynberg
see wicketstuff-crud project in wicket-stuff svn. that should give you all
the good ideas.

-igor


On 9/25/07, Wouter Huijnink [EMAIL PROTECTED] wrote:

 Hi list,

 I've seen some threads on dynamically adding components to a form, but
 those mainly concern a dynamic *number* of components of the same type.
 Our use case concerns adding dynamically typed components to a form. The
 idea is as follows:

 We have XML consisting of XHTML elements and optional nested  xml
 elements from another namespace - something like:

 div
   psome silly info here/p
   somenamespace:interaction type=a [custom stuff for this
 namespace]/somenamespace:interaction
   peven more info here, and a nested element:
 somenamespace:interaction type=b [custom stuff for this
 namespace]/somenamespace:interaction
   /p
 /div

 What we want to achieve, is to create a (Form?)Component subclass that
 can add a FormComponent to itself (or to the form?) for each
 interaction, where the actual component created depends on the 'type '
 attribute of the interaction.

 So the xml snippet should in the end be displayed in the user's browser
 as:

 div
   psome silly info here/p
   input type=text id=generatedId1 class=type-a/
   peven more info here, and a nested element:
 textarea id=generatedId2 class=type-b/textarea
   /p
 /div

 Our thoughts on this:
 1. Transform the XML to wicket markup. Temporary result:
 div
   psome silly info here/p
   input type=text wicket:id=generatedId1 class=type-a/
   peven more info here, and a nested element:
 textarea wicket:id=generatedId2 class=type-b/textarea
   /p
 /div

 2. Feed this markup to a Panel subclass that overriding
 getMarkupResourceStream()

 The panel overrides getMarkupResourceStream thus:
 public IResourceStream getMarkupResourceStream(MarkupContainer
 container,
 Class containerClass) {
 String markup = String.format(wicket:panel%s/wicket:panel,
 getModelObject());
 return new StringResourceStream(markup);
 }


 In the constructor of this panel the provided wicket markup is set as
 its model, and the associated markup stream is iterated to dynamically
 add form components backing the generated input tags:

 public MarkupProvidingPanel(String id, IModel model) {
 // model contains a modelObject of type String containing wicket
 markup
 super(id, model);

 final MarkupStream associatedMarkupStream =
 getAssociatedMarkupStream(false);
 while(associatedMarkupStream.hasMore()) {
 MarkupElement element = associatedMarkupStream.next();
 if (element instanceof ComponentTag) {
 ComponentTag componentTag = (ComponentTag) element;

 if (input.equals(componentTag.getName())) {
 String type =
 componentTag.getAttributes().getString(type, text);
 if (text.equals(type)) {
 add(new TextField(componentTag.getId()));
 } else if (submit.equals(type)) {
 add(new Button(componentTag.getId(), new
 Model(do it!)));
 }
 }
 }
 }
 }


 Any thoughts on the viability of this approach? Any alternative
 approaches?

 Regards,
 Wouter

 --
 Wouter Huijnink
 Func. Internet Integration
 W http://www.func.nl
 T +31 20 423
 F +31 20 4223500



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: JDK version

2007-09-25 Thread Eelco Hillenius
On 9/25/07, Johan Maasing [EMAIL PROTECTED] wrote:
 I use JDK1.6 for a small app running in tomcat, works perfectly.

 On 9/25/07, Neil B. Cohen [EMAIL PROTECTED] wrote:
  I just saw something on the web site that indicates that JDK 1.4 is
  required. We are using JDK 1.6 here at the moment. Anybody know if that
  will work at all, or do I need to install 1.4 to work with Wicket now
  (will 1.5 work??)

Yeah. JDK 1.4 is the *minimum* Java version. So it's JDK 1.4 or newer.

Eelco

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JDK version

2007-09-25 Thread Neil B. Cohen

Al Maw wrote:

THanks to all who replied - that will make things easier for me...

nbc


Neil B. Cohen wrote:
I just saw something on the web site that indicates that JDK 1.4 is 
required. We are using JDK 1.6 here at the moment. Anybody know if 
that will work at all, or do I need to install 1.4 to work with 
Wicket now (will 1.5 work??)


Both 1.6 and 1.5 should work just fine for things.

Some of the unit tests currently fail under JDK 1.6 due to the 
ordering of iterators over hashmaps changing. This doesn't affect real 
apps, merely the tests (we put the attributes for tags into a Map, and 
the test is expecting something a=foo b=bar but gets something 
b=bar a=foo and fails due to that - nothing to worry about). 
We'll fix this in due course.


Regards,

Al

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Questions about GWT, JSF and Wicket

2007-09-25 Thread Eelco Hillenius
 Obviously lots of pros and cons for both that have not been mentioned so
 far.

Yup, lots of those. Another one is that GWT works with layout managers
and Wicket directly with HTML. Anyway, I think there are other threads
in the archives that do a more complete comparison.

Eelco

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Form Feedback

2007-09-25 Thread Clay Lehman
Hey Gerolf,

I used the following to do feedback as you suggested, but the red * is
always visible, rather than just after an error, even on rendering the
page before I do any submits.

Here is the code I have in my Form's constructor:

   RequiredTextField itemid = new
RequiredTextField(itemid,Integer.class);

   FormComponentFeedbackIndicator fd = new
FormComponentFeedbackIndicator(itemidFeedback);
   fd.setIndicatorFor(itemid);
   add(itemid);
   add(fd);

And Here is the Code I have in the html file (inside the form):

  tr
tdItemId:span wicket:id=itemidFeedback//td
tdinput type=text wicket:id=itemid//td
  /tr

On further investigation, I sublassed FormComponentFeedbackIndicator and
overwrote the isVisible() method like this:

public boolean isVisible()
{
return
Session.get().getFeedbackMessages().hasMessage(getFeedbackMessageFilter(
));
}

With this change, the * shows up only when I would expect it to...

Do you have any idea what would cause the default behavior not to work
properly?

This is all setup in a QuickStart project, using Java 1.4

Thanks for any help.

-Clay

-Original Message-
From: Gerolf Seitz [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 25, 2007 11:31 AM
To: users@wicket.apache.org
Subject: Re: Form Feedback

in your case (appending star to the label) i would do the following:
// html
label wicket:id=inputLabel[label]/labelspan
wicket:id=inputIndicator*/spaninput type=text
wicket:id=input/

// java
TextField input = new TextField(input, new Model());
FormComponentFeedbackIndicator inputIndicator = new
FormComponentFeedbackIndicator(inputIndicator);
inputIndicator.setIndicatorFor(input);

notice:
the * between the span tags is not used as the actual output but
rather
for a preview if you open the .html file in a browser

hth,
  gerolf

On 9/25/07, Clay Lehman [EMAIL PROTECTED] wrote:

 Hey everyone,



 I am pretty new to Wicket, and I am having a hard time figuring out
the
 best way to provide feedback if a form's validation fails.



 I want 2 things to be visible if there is a validation error:

 1)  list the validation error messages at the top of the form

 2)  red stars by the Label of each input item that caused an
error.



 I have found examples using a FormComponentFeedbackBorder, but that
just
 appends a red start to the end of the input field (rather than the
 label.  It looks like FormComponentFeedbackIndicator might do what I
 need based on the javadocs, but I have not been able to find an
example
 using this, and I am having trouble getting it to work.



 Does anybody have some advice on the best way to achieve this type of
 form feedback?



 Thanks!!

 -Clay





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: BookmarkablePageLink doesn't take advantage of pretty url for previously mounted pages when generating the URL

2007-09-25 Thread mchack

Done:

https://issues.apache.org/jira/browse/WICKET-1008

I will try and look at the code to see if I can identify the cause. Still
coming up to speed with the framework so I may be of little help :(

Mike


Eelco Hillenius wrote:
 
 Beta3 is what I am running.
 
 Could you open a JIRA issue for it?
 
 I was also under the impression that href
 references that could be resolved to bookmarked pages would be done so
 automatically by the framework even if there were no explicit wicket:link
 tag? Not so in my case. Is this correct interpretation?
 
 Wicket only does that for wicket:link regions.
 
 Eelco
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/BookmarkablePageLink-doesn%27t-take-advantage-of-pretty-url-for-previously-mounted-pages-when-generating-the-URL-tf4430990.html#a12884421
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Updating a Dynamic Image with AJAX (and JFreeChart)

2007-09-25 Thread Jason Mihalick

I am integrating JFreeChart into my application and I've followed the
JFreeChart example on the wiki.  That works very nicely.  I was impressed. 
What I want to do now is update the graph that I display based on the
selection from a drop down list.  I've successfully added the DropDownChoice
component and added a AjaxFormComponentUpdatingBehavior to it.  I've
verified that my onUpdate( AjaxRequestTarget ) method is being invoked and
I'm receiving the updated value, which is very cool.  Here is my onUpdate
implementation for the DropDownChoice control:

protected void onUpdate( AjaxRequestTarget target ) {
  log.debug( graphStyles onUpdate invoked! SelectedGraphStyle =  +  
 FieldResultsPanel.this.getSelectedGraphStyle() );
  FieldResultsPanel.this.updateGraph();  // Update the model and re-create
the JFreeChart Image

  // fieldGraph is my JFreeChartImage instance (derived from Image)
  // This is supposed to indicate back to the browser that the image needs
updated.  I think this
  // is working properly
  target.addComponent( FieldResultsPanel.this.fieldGraph );  
}

Even though I am updating the model of my JFreeChartImage, it appears that
the getImageData method is never invoked afterwards.

What do I need to do in order to get the image data to be re-read?

Here is my JFreeChartImage class:

public class JFreeChartImage extends Image {

  private static final Logger log = LoggerFactory.getLogger(
JFreeChartImage.class );
  
  private int width;
  private int height;

  public JFreeChartImage( String id ) {
super( id );
  }

  public JFreeChartImage( String id, int width, int height ) {
this( id );
this.width = width;
this.height = height;
  }
  
  public JFreeChartImage( String id, JFreeChart chart, int width, int height
) {
super(id, new Model( chart ) );
this.width = width;
this.height = height;
  }

  public Component setModel( JFreeChart chart ) {
log.debug( setModel invoked with chart:  + chart );
return super.setModel( new Model( chart ) );
  }
  
  @Override
  protected Resource getImageResource() {

return new DynamicImageResource(){
  private static final long serialVersionUID = 1L;

  @Override
  protected byte[] getImageData() {
log.debug( Invoking getImageData... );
JFreeChart chart = (JFreeChart)getModelObject();
log.debug( Chart object:  + chart );
return toImageData( chart.createBufferedImage( width, height ) );
  }
  
  @Override
  protected void setHeaders( WebResponse response ) {
if ( isCacheable() ) {
  super.setHeaders(response);
} else {
  response.setHeader( Pragma, no-cache );
  response.setHeader( Cache-Control, no-cache );
  response.setDateHeader( Expires, 0 );
}
  }
};
  }
 
Any help is much appreciated!

--
Jason
-- 
View this message in context: 
http://www.nabble.com/Updating-a-Dynamic-Image-with-AJAX-%28and-JFreeChart%29-tf4517009.html#a12884455
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Calling all translators - UrlValidator translation

2007-09-25 Thread Eelco Hillenius
On 9/25/07, Reinout van Schouwen [EMAIL PROTECTED] wrote:
 Op vrijdag 07-09-2007 om 16:33 uur [tijdzone +0100], schreef Alastair
 Maw:

  We're unfortunately lacking translations for the default error message
  in most languages. If you can help out for any of our supported
  languages, please shout. Feel free to e-mail me them directly, or reply
  to this thread with them. (You needn't bother with a proper patch unless
  you want to.)
 
  The English in question is:
  '${input}' is not a valid URL.

 As an Free software project, I'm a bit surprised Wicket doesn't use the
 de facto way of supporting translations in open source land: gettext (or
 does it?)

 There's a bunch of specialized tools available for the gettext .po
 format that free software translators have on their belt. Surely that
 would work more producively than asking for translations on a mailing
 list each time a new string is added!

 Using the XLIFF format together with Sun's translation editor or OmegaT
 would be another viable option.

I agree, we could do this in a less ad-hoc fashion. It would be yet
another thing to set-up though. Do you have a suggestion how we could
integrate something like this so that it works well for the whole team
and with our build process etc?

Eelco

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Form Feedback

2007-09-25 Thread Gerolf Seitz
you probably have to call FormComponentFeedbackIndicator#updateFeedback in
onSubmit and onError,
but i think overriding isVisibile is the the better approach.

maybe FCFI should override isVisible itself...

On 9/25/07, Clay Lehman [EMAIL PROTECTED] wrote:

 Hey Gerolf,

 I used the following to do feedback as you suggested, but the red * is
 always visible, rather than just after an error, even on rendering the
 page before I do any submits.

 Here is the code I have in my Form's constructor:

RequiredTextField itemid = new
 RequiredTextField(itemid,Integer.class);

FormComponentFeedbackIndicator fd = new
 FormComponentFeedbackIndicator(itemidFeedback);
fd.setIndicatorFor(itemid);
add(itemid);
add(fd);

 And Here is the Code I have in the html file (inside the form):

   tr
 tdItemId:span wicket:id=itemidFeedback//td
 tdinput type=text wicket:id=itemid//td
   /tr

 On further investigation, I sublassed FormComponentFeedbackIndicator and
 overwrote the isVisible() method like this:

 public boolean isVisible()
 {
 return
 Session.get().getFeedbackMessages().hasMessage(getFeedbackMessageFilter(
 ));
 }

 With this change, the * shows up only when I would expect it to...

 Do you have any idea what would cause the default behavior not to work
 properly?

 This is all setup in a QuickStart project, using Java 1.4

 Thanks for any help.

 -Clay

 -Original Message-
 From: Gerolf Seitz [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 25, 2007 11:31 AM
 To: users@wicket.apache.org
 Subject: Re: Form Feedback

 in your case (appending star to the label) i would do the following:
 // html
 label wicket:id=inputLabel[label]/labelspan
 wicket:id=inputIndicator*/spaninput type=text
 wicket:id=input/

 // java
 TextField input = new TextField(input, new Model());
 FormComponentFeedbackIndicator inputIndicator = new
 FormComponentFeedbackIndicator(inputIndicator);
 inputIndicator.setIndicatorFor(input);

 notice:
 the * between the span tags is not used as the actual output but
 rather
 for a preview if you open the .html file in a browser

 hth,
   gerolf

 On 9/25/07, Clay Lehman [EMAIL PROTECTED] wrote:
 
  Hey everyone,
 
 
 
  I am pretty new to Wicket, and I am having a hard time figuring out
 the
  best way to provide feedback if a form's validation fails.
 
 
 
  I want 2 things to be visible if there is a validation error:
 
  1)  list the validation error messages at the top of the form
 
  2)  red stars by the Label of each input item that caused an
 error.
 
 
 
  I have found examples using a FormComponentFeedbackBorder, but that
 just
  appends a red start to the end of the input field (rather than the
  label.  It looks like FormComponentFeedbackIndicator might do what I
  need based on the javadocs, but I have not been able to find an
 example
  using this, and I am having trouble getting it to work.
 
 
 
  Does anybody have some advice on the best way to achieve this type of
  form feedback?
 
 
 
  Thanks!!
 
  -Clay
 
 
 
 

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re[2]: JDK version

2007-09-25 Thread Oleg Taranenko




HelloAl,

Tuesday,September25,2007,7:05:34PM,youwrote:

SomeoftheunittestscurrentlyfailunderJDK1.6duetotheordering
ofiteratorsoverhashmapschanging.Thisdoesn'taffectrealapps,
merelythetests(weputtheattributesfortagsintoaMap,andthe
testisexpectingsomethinga="foo"b="bar"butgetssomething
b="bar"a="foo"andfailsduetothat-nothing
b="bar"a="foo"toworryabout).We'll
fixthisinduecourse.

To eliminate such type of failures i think we need to explore xmlunit facilities (http://xmlunit.sourceforge.net/).
Pity i'm not an expert in this tools :)

Cheers,

Oleg





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Calling all translators - UrlValidator translation

2007-09-25 Thread Al Maw

Eelco Hillenius wrote:

On 9/25/07, Reinout van Schouwen [EMAIL PROTECTED] wrote:

Op vrijdag 07-09-2007 om 16:33 uur [tijdzone +0100], schreef Alastair
Maw:


We're unfortunately lacking translations for the default error message
in most languages. If you can help out for any of our supported
languages, please shout. Feel free to e-mail me them directly, or reply
to this thread with them. (You needn't bother with a proper patch unless
you want to.)

The English in question is:
'${input}' is not a valid URL.

As an Free software project, I'm a bit surprised Wicket doesn't use the
de facto way of supporting translations in open source land: gettext (or
does it?)

There's a bunch of specialized tools available for the gettext .po
format that free software translators have on their belt. Surely that
would work more producively than asking for translations on a mailing
list each time a new string is added!

Using the XLIFF format together with Sun's translation editor or OmegaT
would be another viable option.


I agree, we could do this in a less ad-hoc fashion. It would be yet
another thing to set-up though. Do you have a suggestion how we could
integrate something like this so that it works well for the whole team
and with our build process etc?


See:
http://www.gnu.org/software/gettext/manual/html_node/Java.html
And also:
http://xnap-commons.sourceforge.net/gettext-commons/
http://code.google.com/p/gettext-commons/wiki/Tutorial


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Updating a Dynamic Image with AJAX (and JFreeChart)

2007-09-25 Thread David Bernard

Hi,

Have you try to extend NonCachingImage instead of Image  (and comments 
setHeaders(...))?

/david

Jason Mihalick wrote:

I am integrating JFreeChart into my application and I've followed the
JFreeChart example on the wiki.  That works very nicely.  I was impressed. 
What I want to do now is update the graph that I display based on the

selection from a drop down list.  I've successfully added the DropDownChoice
component and added a AjaxFormComponentUpdatingBehavior to it.  I've
verified that my onUpdate( AjaxRequestTarget ) method is being invoked and
I'm receiving the updated value, which is very cool.  Here is my onUpdate
implementation for the DropDownChoice control:

protected void onUpdate( AjaxRequestTarget target ) {
  log.debug( graphStyles onUpdate invoked! SelectedGraphStyle =  +  
 FieldResultsPanel.this.getSelectedGraphStyle() );

  FieldResultsPanel.this.updateGraph();  // Update the model and re-create
the JFreeChart Image

  // fieldGraph is my JFreeChartImage instance (derived from Image)
  // This is supposed to indicate back to the browser that the image needs
updated.  I think this
  // is working properly
  target.addComponent( FieldResultsPanel.this.fieldGraph );  
}


Even though I am updating the model of my JFreeChartImage, it appears that
the getImageData method is never invoked afterwards.

What do I need to do in order to get the image data to be re-read?

Here is my JFreeChartImage class:

public class JFreeChartImage extends Image {

  private static final Logger log = LoggerFactory.getLogger(
JFreeChartImage.class );
  
  private int width;

  private int height;

  public JFreeChartImage( String id ) {
super( id );
  }

  public JFreeChartImage( String id, int width, int height ) {
this( id );
this.width = width;
this.height = height;
  }
  
  public JFreeChartImage( String id, JFreeChart chart, int width, int height

) {
super(id, new Model( chart ) );
this.width = width;
this.height = height;
  }

  public Component setModel( JFreeChart chart ) {
log.debug( setModel invoked with chart:  + chart );
return super.setModel( new Model( chart ) );
  }
  
  @Override

  protected Resource getImageResource() {

return new DynamicImageResource(){
  private static final long serialVersionUID = 1L;

  @Override
  protected byte[] getImageData() {
log.debug( Invoking getImageData... );
JFreeChart chart = (JFreeChart)getModelObject();
log.debug( Chart object:  + chart );
return toImageData( chart.createBufferedImage( width, height ) );
  }
  
  @Override

  protected void setHeaders( WebResponse response ) {
if ( isCacheable() ) {
  super.setHeaders(response);
} else {
  response.setHeader( Pragma, no-cache );
  response.setHeader( Cache-Control, no-cache );
  response.setDateHeader( Expires, 0 );
}
  }
};
  }
 
Any help is much appreciated!


--
Jason


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Calling all translators - UrlValidator translation

2007-09-25 Thread Martijn Dashorst
I doubt this is license compatible. GPL all around!

Martijn

On 9/25/07, Al Maw [EMAIL PROTECTED] wrote:
 Eelco Hillenius wrote:
  On 9/25/07, Reinout van Schouwen [EMAIL PROTECTED] wrote:
  Op vrijdag 07-09-2007 om 16:33 uur [tijdzone +0100], schreef Alastair
  Maw:
 
  We're unfortunately lacking translations for the default error message
  in most languages. If you can help out for any of our supported
  languages, please shout. Feel free to e-mail me them directly, or reply
  to this thread with them. (You needn't bother with a proper patch unless
  you want to.)
 
  The English in question is:
  '${input}' is not a valid URL.
  As an Free software project, I'm a bit surprised Wicket doesn't use the
  de facto way of supporting translations in open source land: gettext (or
  does it?)
 
  There's a bunch of specialized tools available for the gettext .po
  format that free software translators have on their belt. Surely that
  would work more producively than asking for translations on a mailing
  list each time a new string is added!
 
  Using the XLIFF format together with Sun's translation editor or OmegaT
  would be another viable option.
 
  I agree, we could do this in a less ad-hoc fashion. It would be yet
  another thing to set-up though. Do you have a suggestion how we could
  integrate something like this so that it works well for the whole team
  and with our build process etc?

 See:
 http://www.gnu.org/software/gettext/manual/html_node/Java.html
 And also:
 http://xnap-commons.sourceforge.net/gettext-commons/
 http://code.google.com/p/gettext-commons/wiki/Tutorial


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-- 
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.0-beta3 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta3/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Calling all translators - UrlValidator translation

2007-09-25 Thread Eelco Hillenius
On 9/25/07, Martijn Dashorst [EMAIL PROTECTED] wrote:
 I doubt this is license compatible. GPL all around!

I also don't see how we should integrate it in a smooth way the first place.

What I'd be more interested in, is not those particular libraries, but
to make maintaining our resource bundles less ad-hoc.

Eelco

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Inter component events?

2007-09-25 Thread Eelco Hillenius
On 9/25/07, Sam Hough [EMAIL PROTECTED] wrote:

 I see that it is not such an obvious win here as with fat client but how
 about another of my use cases:
 * Large page with small parts being updated by Ajax
 * Two components sitting long way apart in the tree (context sensitive
 button that responds to items in rest of the page)

 So having an almost declaritive style this button is enabled = fn(x) only
 works if I know when to re-render that button.

 I seem to be leaving OO behind by having lots of procedural when x happens
 update a, b and c rather than a subscribing to events from another
 component.

 Using some sort of event model seems to me to improve OO - encapsulation -
 reuse. For large trees of components with only tiny parts that need sending
 to the client it also seems more efficient.

Yeah, if most of what you're doing is Ajax, you need to find a way to
know which components should be updated and my remarks are less
relevant. Still, I think most of it should be communicated via models.
It shouldn't be hard to let your model(object)s implement an observer
pattern and use that to your advantage.

Eelco

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Appending JS to an Ajax Component

2007-09-25 Thread UPBrandon

I did that and it worked.  Thanks for a point in the right direction.

But while I am writing, doesn't it seem like appenders should work more
consistently, regardless of what component the appender is added to?  Is
there a technical reason why that is not (and could not be) the case?

-Brandon


igor.vaynberg wrote:
 
 you can putting your script into iajaxcalldecorator and giving that to the
 behavior
 
 -igor
 
 
 On 9/24/07, UPBrandon [EMAIL PROTECTED] wrote:


 I am trying to use an AttributeAppender to append an onchange script to a
 DropDownChoice that also has an OnChangeAjaxBehavior added to it.  But
 only
 the OnChangeAjaxBehavior's script is showing up in the markup.  Is there
 a
 trick to adding JavaScript to a component that also has an Ajax behavior?
 Any help would be appreciated.

 -Brandon
 --
 View this message in context:
 http://www.nabble.com/Appending-JS-to-an-Ajax-Component-tf4512114.html#a12869413
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 
 

-- 
View this message in context: 
http://www.nabble.com/Appending-JS-to-an-Ajax-Component-tf4512114.html#a12885639
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Updating a Dynamic Image with AJAX (and JFreeChart)

2007-09-25 Thread Jason Mihalick

Thanks for the tip.  That worked!  That was too easy.  :-)

--
Jason

David Bernard-2 wrote:
 
 Hi,
 
 Have you try to extend NonCachingImage instead of Image  (and comments
 setHeaders(...))?
 
 /david
 
 Jason Mihalick wrote:
 I am integrating JFreeChart into my application and I've followed the
 JFreeChart example on the wiki.  That works very nicely.  I was
 impressed. 
 What I want to do now is update the graph that I display based on the
 selection from a drop down list.  I've successfully added the
 DropDownChoice
 component and added a AjaxFormComponentUpdatingBehavior to it.  I've
 verified that my onUpdate( AjaxRequestTarget ) method is being invoked
 and
 I'm receiving the updated value, which is very cool.  Here is my onUpdate
 implementation for the DropDownChoice control:
 
 protected void onUpdate( AjaxRequestTarget target ) {
   log.debug( graphStyles onUpdate invoked! SelectedGraphStyle =  +  
  FieldResultsPanel.this.getSelectedGraphStyle() );
   FieldResultsPanel.this.updateGraph();  // Update the model and
 re-create
 the JFreeChart Image
 
   // fieldGraph is my JFreeChartImage instance (derived from Image)
   // This is supposed to indicate back to the browser that the image
 needs
 updated.  I think this
   // is working properly
   target.addComponent( FieldResultsPanel.this.fieldGraph );  
 }
 
 Even though I am updating the model of my JFreeChartImage, it appears
 that
 the getImageData method is never invoked afterwards.
 
 What do I need to do in order to get the image data to be re-read?
 
 Here is my JFreeChartImage class:
 
 public class JFreeChartImage extends Image {
 
   private static final Logger log = LoggerFactory.getLogger(
 JFreeChartImage.class );
   
   private int width;
   private int height;
 
   public JFreeChartImage( String id ) {
 super( id );
   }
 
   public JFreeChartImage( String id, int width, int height ) {
 this( id );
 this.width = width;
 this.height = height;
   }
   
   public JFreeChartImage( String id, JFreeChart chart, int width, int
 height
 ) {
 super(id, new Model( chart ) );
 this.width = width;
 this.height = height;
   }
 
   public Component setModel( JFreeChart chart ) {
 log.debug( setModel invoked with chart:  + chart );
 return super.setModel( new Model( chart ) );
   }
   
   @Override
   protected Resource getImageResource() {
 
 return new DynamicImageResource(){
   private static final long serialVersionUID = 1L;
 
   @Override
   protected byte[] getImageData() {
 log.debug( Invoking getImageData... );
 JFreeChart chart = (JFreeChart)getModelObject();
 log.debug( Chart object:  + chart );
 return toImageData( chart.createBufferedImage( width, height ) );
   }
   
   @Override
   protected void setHeaders( WebResponse response ) {
 if ( isCacheable() ) {
   super.setHeaders(response);
 } else {
   response.setHeader( Pragma, no-cache );
   response.setHeader( Cache-Control, no-cache );
   response.setDateHeader( Expires, 0 );
 }
   }
 };
   }
  
 Any help is much appreciated!
 
 --
 Jason
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Updating-a-Dynamic-Image-with-AJAX-%28and-JFreeChart%29-tf4517009.html#a12885649
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Appending JS to an Ajax Component

2007-09-25 Thread Igor Vaynberg
well, the problem is you are trying to bind two things to the same event.
the order of execution is not always clear

if i call add(A) followed by add(B)

does it always execute A,B or can B,A be acceptable? if it is A,B does B
still execute if A fails? do we need to somehow prevent A from doing a
return false; and preventing B from executing? etc etc etc. there is just
no easy way to do this automatically and get all the usecases right.

-igor


On 9/25/07, UPBrandon [EMAIL PROTECTED] wrote:


 I did that and it worked.  Thanks for a point in the right direction.

 But while I am writing, doesn't it seem like appenders should work more
 consistently, regardless of what component the appender is added to?  Is
 there a technical reason why that is not (and could not be) the case?

 -Brandon


 igor.vaynberg wrote:
 
  you can putting your script into iajaxcalldecorator and giving that to
 the
  behavior
 
  -igor
 
 
  On 9/24/07, UPBrandon [EMAIL PROTECTED] wrote:
 
 
  I am trying to use an AttributeAppender to append an onchange script to
 a
  DropDownChoice that also has an OnChangeAjaxBehavior added to it.  But
  only
  the OnChangeAjaxBehavior's script is showing up in the markup.  Is
 there
  a
  trick to adding JavaScript to a component that also has an Ajax
 behavior?
  Any help would be appreciated.
 
  -Brandon
  --
  View this message in context:
 
 http://www.nabble.com/Appending-JS-to-an-Ajax-Component-tf4512114.html#a12869413
  Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 

 --
 View this message in context:
 http://www.nabble.com/Appending-JS-to-an-Ajax-Component-tf4512114.html#a12885637
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: Experiences with ReloadingWicketFilter

2007-09-25 Thread Carlos Pita
A time ago I filed a bug relating markup inheritance with the reloading
servlet (although inline frames are involved too in my somewhat contrived
example). Enjoy the cocktail here
https://issues.apache.org/jira/browse/WICKET-965.https://issues.apache.org/jira/browse/WICKET-965

Regards,
Carlos

On 9/25/07, Peter Thomas [EMAIL PROTECTED] wrote:

 On 9/25/07, Jean-Baptiste Quenot [EMAIL PROTECTED] wrote:
 
  * Peter Thomas:
 
   Soto   confirmmy   understanding,when   usingthe
   ReloadingWicketFilter, when you make a change to a Page you have
   to re-trace  navigation to a  point prior  to where the  Page is
   loaded.  Is that correct?
 
  You  have to  make sure  you're not  using an  instance of  a page
  loaded in  a previous  classloader, ie  make sure  not to  keep an
  instance of a page across reloads.
 
   I'm   justhoping   that   something   canbe   done   (or
   un-done)  to   improve  the  developer  experience   when  using
   ReloadingWicketFilter.
 
  To be  honest ReloadingWicketFilter is  a hack to work  around how
  the JVM  loads classes, and  it is bootstrapped during  the Wicket
  application initialization.
 
  If ReloadingWicketFilter is causing more problems than it is meant
  to  solve,  we  might  simply  want  to  remove  it  from  Wicket,
  especially  if  it proves  to  be  unreliable in  complex  setups.
  Unless you're willing to turn your hope into contribution?


 That's a little harsh.  Have a look in the JIRA and I've repeatedly said
 how
 much I appreciate the RWF and even the way it works now (even citing it as
 the reason for not moving to groovy!).  Thanks for the gentle reminder
 that
 I should quit whining about this.  I'm not a master of classloading and it
 is unlikely I contribute anything in this area.

 Have you  seen my suggestion  to clear your session  cookie before
  reloading the page  BTW?  All this is very  complicated I realize,
  but there's not much we can do to simplify reloading.
  --


 I saw your suggestion on clearing cookies, thanks.

 I'll say this one last time and then shut up  - I completely understand
 that
 this is a hack and all - but it used to work the way I expected and at
 least
 one other user felt the same.  I was just pushing my luck (at the risk of
 losing mailing-list karma) because as the other user said, once you have
 experienced page refresh reload of classes it is very hard to go back.

 But you are saying nothing more can be done, and I respect the opinion of
 the Wicket committers on this and I can live with how it is now.  I
 completely appreciate the work that you and other Wicket committers have
 put
 into RWF and it is a huge time saver in its current form.

 Thanks,

 Peter.



Re: Keep inserted data on AjaxTabbedPanel tab switching.

2007-09-25 Thread Fabio Fioretti
On 9/21/07, Igor Vaynberg [EMAIL PROTECTED] wrote:
 you have to override newlink on the tabbedpanel and return a submitlink
 instead

Nice, this worked just fine!

 also, really, for situations like this it doesnt make sense to use a
 server-side panel. use client side tabs like what jquery provides instead -
 it works much better with forms.

I agree, but this is not the case: I simplified the situation to frame
the question more easily, but it's more complex in reality.


Thanks a lot for your precious help,

Fabio Fioretti - WindoM

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Calling all translators - UrlValidator translation

2007-09-25 Thread Reinout van Schouwen
Hi Martijn,

Op dinsdag 25-09-2007 om 19:50 uur [tijdzone +0200], schreef Martijn
Dashorst:
 I doubt this is license compatible. GPL all around!

What are you referring to exactly?
http://gettext-commons.googlecode.com/svn/trunk/LICENSE.txt is LGPL.

The gettext utilities may be GPL, but they are not linked to directly or
indirectly as far as I can see. They are only used to create and manage
the message catalogs.

In fact I am 100% certain that an LGPL library like GTK+ has been
localized with gettext support for years without apparent license
problems!

regards,

-- 
Reinout van Schouwen




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Spring Into Wicket at the next London Wicket User Group

2007-09-25 Thread jweekend

At our upcoming monthly  http://jweekend.co.uk/dev/LWUGReg/ London Wicket
User Group  event we will have a presentation looking at ways of using
Wicket with Spring (followed next moth by some Wicket+Spring+JPA
discussion). Al Maw (from the Wicket core development team) will also make a
presentation (here's an  http://talks.londonwicket.org/BeanEditor.mov
example  of Al in action).
If you can get to London (EC1R 0BE) on Tuesday October 2nd and would like to
join us, there are still a few places left.
Details and registration (free)  http://jweekend.co.uk/dev/LWUGReg/ here .
Regards - Cemal
http://jWeekend.co.uk jWeekend.co.uk 
-- 
View this message in context: 
http://www.nabble.com/Spring-Into-Wicket-at-the-next-London-Wicket-User-Group-tf4518766.html#a12889914
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Calling all translators - UrlValidator translation

2007-09-25 Thread Martijn Dashorst
LGPL is also problematic for Apache projects. And we can't use the
texts coming out of such tools since they are (L)GPL too.

Martijn

On 9/25/07, Reinout van Schouwen [EMAIL PROTECTED] wrote:
 Hi Martijn,

 Op dinsdag 25-09-2007 om 19:50 uur [tijdzone +0200], schreef Martijn
 Dashorst:
  I doubt this is license compatible. GPL all around!

 What are you referring to exactly?
 http://gettext-commons.googlecode.com/svn/trunk/LICENSE.txt is LGPL.

 The gettext utilities may be GPL, but they are not linked to directly or
 indirectly as far as I can see. They are only used to create and manage
 the message catalogs.

 In fact I am 100% certain that an LGPL library like GTK+ has been
 localized with gettext support for years without apparent license
 problems!

 regards,

 --
 Reinout van Schouwen




 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-- 
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.0-beta3 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta3/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Calling all translators - UrlValidator translation

2007-09-25 Thread Reinout van Schouwen
Hi Martijn,

Op woensdag 26-09-2007 om 00:57 uur [tijdzone +0200], schreef Martijn
Dashorst:
 LGPL is also problematic for Apache projects.

Are you sure? I don't think this holds any more:

http://gettext-commons.googlecode.com/svn/trunk/README states
This library is free software; you can redistribute it and/or
 modify it under the terms of the GNU Lesser General Public
 License as published by the Free Software Foundation; either
 version 2.1 of the License, or (at your option) _any_later_version_.

(emphasis mine)

As you may know the Free Software Foundation has worked with Apache to
make version 3 of its licenses compatible with the Apache license.
Version 3 is available since a few months now. The article on
http://blogs.zdnet.com/Burnette/?p=153 backs up what I'm saying: 

In other words, LGPL code can be combined with code using any other
license, whether free, open, or proprietary. Unlike LGPLv2, this version
makes it very clear that linking or combining in any way is allowed. 

  And we can't use the texts coming out of such tools since they are (L)GPL 
 too.

Are you saying that user-created external data (translations) becomes
licensed under the same license as the (L)GPL program used to process
it? Sorry but I find that hard to believe-- I might have missed
something, but as far as I know, it works this way: the original author
of the translation retains copyright but licenses his work for
distribution under the same conditions as the accompanying program. Much
like regular code, actually.

regards,

-- 
Reinout van Schouwen




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: NoSuchMethodException / PropertyResolver

2007-09-25 Thread Phillip Rhodes
Martijn Dashorst wrote:
 You have to provide the types for the fields, or else Wicket won't be
 able to discover what type to use (apparently it resolves to boolean
 for the name), or provide default values with the correct type in your
 valuemap.
 
 i.e. either:
 
 add(new TextField(firstName, new PropertyModel(map, firstName),
 String.class));
 
 or
 
 map.put(firstName, );
 

No joy, I tried both suggestions (see code below) and still get the
both a NoSuchMethodException and a NoSuchFieldException for each field
(see stack trace below).

Of course this doesn't actually stop anything from working, as far
as I can tell, so it's not a big deal to me.  But it seems like
something still isn't quite right.


 BEGIN JAVA CODE ***



public UserRegistrationForm(final String componentName)
{
super(componentName);

// Attach textfield components that edit properties map 
model
add(new TextField(firstName, new 
PropertyModel(properties,
firstName), String.class));
add(new TextField(lastName, new 
PropertyModel(properties,
lastName), String.class));
add( new TextField( loginName, new 
PropertyModel(properties,
loginName), String.class));
add(new TextField(emailAddress, new 
PropertyModel(properties,
emailAddress), String.class));
add(new PasswordTextField(password, new 
PropertyModel(properties,
password)));
add(new PasswordTextField(confirmPassword, new
PropertyModel(properties, confirmPassword)));

properties.add(firstName,  );
properties.add(lastName,  );
properties.add(loginName,  );
properties.add(emailAddress,  );
properties.add(password,  );
properties.add(confirmPassword,  );
}

 END JAVA CODE **


=== BEGIN LOG / STACK-TRACE =
2007-09-25 19:51:27,390 DEBUG [wicket.util.lang.PropertyResolver] Cannot
find getter class wicket.util.value.ValueMap.emailAddress
java.lang.NoSuchMethodException: wicket.util.value.ValueMap.isEmailAddress()
at java.lang.Class.getMethod(Class.java:1605)
at 
wicket.util.lang.PropertyResolver.findGetter(PropertyResolver.java:387)
at
wicket.util.lang.PropertyResolver.getGetAndSetter(PropertyResolver.java:233)
at
wicket.util.lang.PropertyResolver.getObjectAndGetSetter(PropertyResolver.java:200)
at wicket.util.lang.PropertyResolver.getValue(PropertyResolver.java:88)
at
wicket.model.AbstractPropertyModel.onGetObject(AbstractPropertyModel.java:132)
at
wicket.model.AbstractDetachableModel.getObject(AbstractDetachableModel.java:104)
at wicket.Component.getModelObject(Component.java:990)
at wicket.Component.getModelObjectAsString(Component.java:1005)
at
wicket.markup.html.form.FormComponent.getModelValue(FormComponent.java:975)
at 
wicket.markup.html.form.FormComponent.getValue(FormComponent.java:583)
at wicket.markup.html.form.TextField.onComponentTag(TextField.java:102)
at wicket.Component.renderComponent(Component.java:1688)
at wicket.MarkupContainer.onRender(MarkupContainer.java:927)
at wicket.Component.render(Component.java:1533)
at wicket.MarkupContainer.renderNext(MarkupContainer.java:1334)
at 
wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:982)
at wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:917)
at wicket.markup.html.form.Form.onComponentTagBody(Form.java:773)
at wicket.Component.renderComponent(Component.java:1719)
at wicket.MarkupContainer.onRender(MarkupContainer.java:927)
at wicket.markup.html.form.Form.onRender(Form.java:844)
at wicket.Component.render(Component.java:1533)
at wicket.MarkupContainer.renderNext(MarkupContainer.java:1334)
at 
wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:982)
at wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:917)
at wicket.Component.renderComponent(Component.java:1719)
at wicket.MarkupContainer.onRender(MarkupContainer.java:927)
at wicket.Component.render(Component.java:1533)
at wicket.MarkupContainer.renderNext(MarkupContainer.java:1334)
at wicket.MarkupContainer.renderAll(MarkupContainer.java:944)
at wicket.Page.onRender(Page.java:864)
at wicket.Component.render(Component.java:1533)
at wicket.Page.renderPage(Page.java:413)
at
wicket.request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:226)
at

FeedbackPanel issue [EMAIL PROTECTED]

2007-09-25 Thread mail
After I do all my valid info into my form I get something that reads:

[EMAIL PROTECTED]

I'm not sure where it's coming from. I've commented out everything in my
form except for one text input- and it still returns the above.

Can anyone help with this?

Here's AmountsTimesDatesStore.java

package foo;

import java.io.Serializable;

public class AmountsTimesDatesStore implements Serializable {

private String ZoningUse;


public String getZoningUse(){
return ZoningUse;
}

public void setZoningUse(String ZoningUse){
this.ZoningUse = ZoningUse;
}


private static final long serialVersionUID = 1L;
}



What I don't understand is why it's returning anything at all.  All my
fields are filled in and validated.  Why onSubmit does it do this?

Here is some of my html/java file that may have something to do with this?

class AmountsTimesDatesForm extends Form{
public AmountsTimesDatesForm(String id, IModel model){
super(id,model);
}   
@Override
public void onSubmit() {
info(getModelObjectAsString());
}
}

Border addWithBorders(Form form,FormComponent component,String
borderId){
AjaxResponsiveFormComponentFeedbackBorder border = new
AjaxResponsiveFormComponentFeedbackBorder(borderId);
border.setOutputMarkupId(true);
border.add(component);
form.add(border);
return border;
}

void addAjaxBehaviorToComponent(FormComponent formComponent, final
Border border, final FeedbackPanel feedback){
formComponent.add(new AjaxFormComponentUpdatingBehavior(onblur) {
@Override
protected void onUpdate(AjaxRequestTarget target){
target.addComponent(feedback);
target.addComponent(border);
setResponsePage(Location.class);
}
});
}


Any help would be appreciated.

Thanks



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT] Making it easy for Designers in my Wicket project

2007-09-25 Thread David Leangen

I'm interested in this problem, too... question below.

 Then what I did was I installed Tortoise SVN and Apache Web Server (not
 Tomcat) on the designers machine.  Also on their machine, I created a
 wwwroot/myproject directory and under there I linked:
 
 wwwroot
   - myproject
-  home  - svn://...src/main/resources//home
-  user  - svn://...src/main/resources//user
-  css   - svn://...src/main/webapp/css
-  img   - svn://...src/main/webapp/img
 
 Then I configured apache for that directory, and that's the test website
 Dreamweaver launches after they make edits and want to preview.  When the
 designer is all done, they do an SVN Commit through Tortoise.

I don't quite understand this second part. What do you mean by you
linked wwroot/blah/blah to svn://blah/blah? You mean you just
checked out svn into that dir?

Why do you need to install Apache on the client machine if you're just
using static files? Can't your designer just access with the file://
url?

Finally, the most important thing for the designer is to view the stuff
in context. It doesn't mean much for the designer to see this html:

wicket:panel
  div wicket:id=someReallyComplicatedComponent/
/wicket:panel

Are you saying you don't set up anything so your designers can view
someReallyComplicatedComponent in context with the application?


Cheers,
David



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Page Expired Clustering?

2007-09-25 Thread Bushby

I am having trouble with a wicket application returning page expired when any
link or button is clicked on.  When the application is deployed on a server
with an Apache Weblogic integration the application works fine.  When the
application is deployed on a server with an Apache Weblogic cluster all
links and buttons return page expired.  I am using Wicket 1.2.6 and JDK 1.4. 
The wicket application is also integrated with hibernate and Spring.  Any
help would be greatly appreciated.

-- 
View this message in context: 
http://www.nabble.com/Page-Expired-Clustering--tf4519473.html#a12892290
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Page Expired Clustering?

2007-09-25 Thread Eelco Hillenius
 I am having trouble with a wicket application returning page expired when any
 link or button is clicked on.  When the application is deployed on a server
 with an Apache Weblogic integration the application works fine.  When the
 application is deployed on a server with an Apache Weblogic cluster all
 links and buttons return page expired.  I am using Wicket 1.2.6 and JDK 1.4.
 The wicket application is also integrated with hibernate and Spring.  Any
 help would be greatly appreciated.

Do you use sticky sessions? Make sure the HttpSession gets replicated.

Eelco

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



  1   2   >