Re: Promotion

2008-04-07 Thread Cristi Manole
Thanks, Martin :))

On Sun, Apr 6, 2008 at 10:25 PM, Martin Grigorov [EMAIL PROTECTED]
wrote:

 Congrats Cristi,

 I like the styling of the sign in modal window!

 Really cool (self-documenting) ids ;-)
 div id=mainshit

 On Sun, 2008-04-06 at 21:03 +0300, Cristi Manole wrote:
  Hi,
 
  Please excuse me for taking 2 minutes of your time, but I would like to
  promote a website developed with Wicket: www.sssmoking.com
 
  It's a very simple site, developed in a few hours, so not much to say
 about
  it... it's purpose is to keep track of your daily smoking. And a lot
 more
  will be added soon.
 
  Of course, your feedback would be more than welcome.
 
  Thanks,
  Cristi Manole


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




warning with enclosure

2008-04-07 Thread Eyal Golan
hello all,
I have an enclosure tag with two inner ones.
wicket:enclosure child=allChecked
input type=checkbox wicket:id=allChecked /
label wicket:id=allSelectedLabel/label
/wicket:enclosure

Whenever I go to the page with the panel that has this enclosure, I get a
warning message:
2008-04-06 18:35:49,670 WARN [org.apache.wicket.Page] - Component [Component
id = allSelectedLabel, page = comweb.entitybrowserBrowserPage, path
= 5:tabs:browserTabbedPanel:panel:allSelectedLabel.Label, isVisible = true,
isVersioned = false] wasn't rendered but most likely it has a transparent
parent: [MarkupContainer [Component id = enclosure-165, page =
com..web.entitybrowserBrowserPage, path =
5:tabs:browserTabbedPanel:panel:enclosure-165.Enclosure, isVisible = false,
isVersioned = false]]

I know it's no problem, but it's a bit annoying.
Is there a way removing this warning?

Thanks
-- 
Eyal Golan
[EMAIL PROTECTED]

Visit: http://jvdrums.sourceforge.net/


Re: wicketstuff-jmx-panel: can't find a repository

2008-04-07 Thread Gerolf Seitz
Hi Ivo,

you can find the release built for the current/upcoming wicket release 1.3.3
at
http://wicketstuff.org/maven/repository/org/wicketstuff/wicketstuff-jmx-panel/1.3.3/

let me know when you encounter any issues.

  Gerolf

On Mon, Apr 7, 2008 at 9:26 AM, Ivo van Dongen [EMAIL PROTECTED]
wrote:

 Hi Gerolf,

 Great to have this available in a repository. We're using this now in a
 project and we're really satisfied. One problem though is that we're using
 maven:release to release our projects and it refuses to release with
 snapshot dependencies (as it should :)).  Could we perhaps bother you to
 make a release of wicket-jmx-panel? It seems stable enough.

 Thanks in advance,
 Ivo van Dongen

 On Fri, Mar 7, 2008 at 4:00 AM, Gerolf Seitz [EMAIL PROTECTED]
 wrote:

  done, wicketstuff-jmx-panel is in the wicketstuff.org maven repository
 
  dependency
   groudIdorg.wicketstuff/groupId
   artifactIdwicketstuff-jmx-panel/artifactId
   version1.3-SNAPSHOT/version
  /dependency
 
  cheers,
   Gerolf
 
 
  On Wed, Mar 5, 2008 at 12:13 PM, Rommert de Bruijn [EMAIL PROTECTED]
  wrote:
 
   Hi,
  
   I'm setting up a small PoC web application with JMX, Spring  Wicket.
   Among other things I'm using the JmxPanel component by Gerolf Seitz.
   which I checked out here:
  
  
 
 https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-jmx-panel/
  
   The JmxPanel component works like a charm, so I'd like to add a
   dependency for the wicketstuff-jmx-panel artifact to my project.
   Unfortunately, I can't seem to find a repository that contains the
   wicketstuff-jmx-panel artifact at all.
  
   For now, I created a .jar from the svn checkout and added it to our
   local repository, but it would be preferable to use a public
 repository.
   Can anyone help me out?
  
   Thanks in advance,
   Rommert
  
   --
   Rommert de Bruijn
   Func. Internet Integration
   W http://www.func.nl
   T +31 20 423
   F +31 20 4223500
  
  
 



 --
 Ivo van Dongen
 Func. Internet Integration
 W http://www.func.nl
 T +31 20 423
 F +31 20 4223500



Navigation bar

2008-04-07 Thread Milan Křápek
Hi, 
  I need your help. After few days I am out of ideas and still have no solution.

What I have:
  I have stored users in databes and each user has some List od favourite pages 
URLs. This URLs links external pages.

What I need:
  I need to do some sort of TabbedPanel or one row table without headers, which 
will contains links to the stored URLs.

Where is the problem:
  First I try to use TabbedPanel but this is impossible due to the TabbedPanel 
returns just wicket Panel and not any URL. Then I try to use DataTable but 
these tables have header line. So I try to give my links to the headers. It 
looks like it is working. But it did not render to the page. I think it was due 
to empty data rows so wicket does not render the empty table. At last I try to 
use GridView but I was not able to determine the names of url links. 

Please have you met this problem before? Is it possible to upgrade the 
TabbedPanel to return the url instead of Panel??

Thanks for any advice. 

Milan  

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



Re: [Amsterdam meetup] Program for tuesday

2008-04-07 Thread Martijn Dashorst
Revised program: we had a cancellation for a presentation
unfortunately. We are searching for a replacement. If you attend and
like to present something, even if it is small, please let it be
known. We are a friendly bunch, and won't eat you :D

Revised program:

15:00 - 16:00 Hackathon/ask a committer
16:15 - 16:45 Java monitoring with JaMon - Lars Vonk
17:00 - 18:00 Qi4J and Wicket - Nicklas Hedhman
18:00 - 19:30 Dinner at your own leisure
19:30 - 20:00 Elephas: the future of Blogging Software - Gerolf Seitz
20:00 - 20:15 Wicket 2.0 - Johan Compagner
20:15 - end   Hackathon/ask a committer

Unfortunately we don't have a sponsor for a dinner. We take a 90
minute break so people can make their own dinner arrangements.

See you tomorrow!

Martijn Dashorst

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



External resource references not working in Wicket/Jetty

2008-04-07 Thread classacts

I'm trying to display a static google map as the background for a div tag but
it doesn't seem to work when i place this static HTML code in my WebPage:


div style=background-image:
url(http://maps.google.com/staticmap?center=54.55,-3.88amp;zoom=5amp;size=500x450amp;key=ABQIw3BrxANqPQrDF3i-BIABYxQJqY1rPYzEgN6DCh6NXOCZP6CbIBQMW79KO5x4CXyX-_qTpdPBavy7xA);
width: 500px; height: 450px;/div


If I hand create an html file with that tag, it works.  It also works if I
launch the page from Wicket (the background won't show) then save the page
as an HTML file and load it that way.  I think there is something happening
to the request that is causing this issue - my only guess is the web browser
is requesting that image from Jetty instead of going directly to
maps.google.com?  I removed all CSS that could be affecting the div tag in
question, so that is ruled out.  Any ideas how to get this to work?

Thanks
-- 
View this message in context: 
http://www.nabble.com/External-resource-references-not-working-in-Wicket-Jetty-tp16537251p16537251.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



property file

2008-04-07 Thread tbt

Hi,

I like to know a way to read a property file the wicket way. Currently i'm
using the following code snippet but i get the
PackageResourceBlockedException.

/*...*/
Properties properties = new Properties();
properties.load(PackageResource.get(ApplicationProperties.class,
app.properties).getResourceStream().getInputStream());
String propertyName = properties.getProperty(name);
propertyFile.close();
return propertyName;
/*...*/

Is this the correct way to get property files using wicket. My
app.properties file and ApplicationProperties.class is in the same package.
I like to know a way to load property files which are stored in the same
package as the class file.

Thanks
tbt


-- 
View this message in context: 
http://www.nabble.com/property-file-tp16537257p16537257.html
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: Maven multi module app using wicket spring hibernate

2008-04-07 Thread Korbinian Bachl - privat
you need to assign the correct application class (fully path!) derived 
from WebApplication


-
!--param-nameapplicationClassName/param-name
param-valueHelloWorldApplication/param-value--

is outcommented and not set, correct this;

also remember to call

addComponentInstantiationListener(new SpringComponentInjector(this));

in your application's init() function

Best

Korbinian

pxk schrieb:

Hello all,

I trying to configure a maven multi module app which uses wicket spring and
hibernate and unfortunately i'm stuck. I know that this may be the wrong
forum to post but since the exception is more relative to wicket i thought i
should try here. Anyway enough nagging.

The web.xml is this one:

?xml version=1.0 encoding=UTF-8?
web-app id=simple-webapp version=2.4
xmlns=http://java.sun.com/xml/ns/j2ee;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee 
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;

display-nameSimple Web Application/display-name
context-param
param-namecontextConfigLocation/param-name
param-value
classpath:applicationContext-weather.xml
classpath:applicationContext-persist.xml
/param-value
/context-param
context-param
param-namelog4jConfigLocation/param-name
param-value/WEB-INF/log4j.properties/param-value
/context-param
listener
   
listener-classorg.springframework.web.context.ContextLoaderListener/listener-class

/listener
listener
   
listener-classorg.springframework.web.util.Log4jConfigListener/listener-class

/listener
servlet
servlet-nameWicketSpring/servlet-name
   
servlet-classorg.apache.wicket.protocol.http.WicketServlet/servlet-class

init-param
param-nameapplicationFactoryClassName/param-name
   
param-valueorg.apache.wicket.spring.SpringWebApplicationFactory/param-value

!--param-nameapplicationClassName/param-name
param-valueHelloWorldApplication/param-value--
/init-param
/servlet
servlet-mapping
servlet-nameWicketSpring/servlet-name
url-pattern/*/url-pattern
/servlet-mapping
/web-app

The spring application context is this one:

?xml version=1.0 encoding=UTF-8?
!DOCTYPE beans PUBLIC -//SPRING//DTD BEAN//EN
http://www.springframework.org/dtd/spring-beans.dtd;

beans  
 bean id=weatherController 
   class=com.sonatype.maven.web.WeatherController

   property name=weatherService ref=weatherService/
   property name=weatherDAO ref=weatherDAO/
 /bean

 bean id=historyController 
   class=com.sonatype.maven.web.HistoryController

   property name=weatherDAO ref=weatherDAO/
   property name=locationDAO ref=locationDAO/
 /bean

 !-- you can have more than one handler defined --




 bean id=velocityConfig
class=org.springframework.web.servlet.view.velocity.VelocityConfigurer
   property name=resourceLoaderPath value=/WEB-INF/vm//
 /bean

 bean id=viewResolver
class=org.springframework.web.servlet.view.velocity.VelocityViewResolver
   property name=cache value=true/
   property name=prefix value=/
   property name=suffix value=.vm/
   property name=exposeSpringMacroHelpers value=true/
 /bean
 
 !-- setup wicket application --

 bean id=wicketApplication
class=com.sonatype.maven.web.WicketApplication/
/beans

and the exception which has ruined my week is this one:

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

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

org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)

org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)

org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
java.lang.Thread.run(Thread.java:595)


root cause 


java.lang.IllegalStateException: bean of type
[org.apache.wicket.protocol.http.WebApplication] not found

org.apache.wicket.spring.SpringWebApplicationFactory.createApplication(SpringWebApplicationFactory.java:107)

org.apache.wicket.spring.SpringWebApplicationFactory.createApplication(SpringWebApplicationFactory.java:86)
org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:503)

org.apache.wicket.protocol.http.WicketServlet.init(WicketServlet.java:188)
javax.servlet.GenericServlet.init(GenericServlet.java:212)

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

org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)

org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)


Maven multi module app using wicket spring hibernate

2008-04-07 Thread pxk

Hello all,

I trying to configure a maven multi module app which uses wicket spring and
hibernate and unfortunately i'm stuck. I know that this may be the wrong
forum to post but since the exception is more relative to wicket i thought i
should try here. Anyway enough nagging.

The web.xml is this one:

?xml version=1.0 encoding=UTF-8?
web-app id=simple-webapp version=2.4
xmlns=http://java.sun.com/xml/ns/j2ee;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee 
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;
display-nameSimple Web Application/display-name
context-param
param-namecontextConfigLocation/param-name
param-value
classpath:applicationContext-weather.xml
classpath:applicationContext-persist.xml
/param-value
/context-param
context-param
param-namelog4jConfigLocation/param-name
param-value/WEB-INF/log4j.properties/param-value
/context-param
listener
   
listener-classorg.springframework.web.context.ContextLoaderListener/listener-class
/listener
listener
   
listener-classorg.springframework.web.util.Log4jConfigListener/listener-class
/listener
servlet
servlet-nameWicketSpring/servlet-name
   
servlet-classorg.apache.wicket.protocol.http.WicketServlet/servlet-class
init-param
param-nameapplicationFactoryClassName/param-name
   
param-valueorg.apache.wicket.spring.SpringWebApplicationFactory/param-value
!--param-nameapplicationClassName/param-name
param-valueHelloWorldApplication/param-value--
/init-param
/servlet
servlet-mapping
servlet-nameWicketSpring/servlet-name
url-pattern/*/url-pattern
/servlet-mapping
/web-app

The spring application context is this one:

?xml version=1.0 encoding=UTF-8?
!DOCTYPE beans PUBLIC -//SPRING//DTD BEAN//EN
http://www.springframework.org/dtd/spring-beans.dtd;

beans  
 bean id=weatherController 
   class=com.sonatype.maven.web.WeatherController
   property name=weatherService ref=weatherService/
   property name=weatherDAO ref=weatherDAO/
 /bean

 bean id=historyController 
   class=com.sonatype.maven.web.HistoryController
   property name=weatherDAO ref=weatherDAO/
   property name=locationDAO ref=locationDAO/
 /bean

 !-- you can have more than one handler defined --



 bean id=velocityConfig
class=org.springframework.web.servlet.view.velocity.VelocityConfigurer
   property name=resourceLoaderPath value=/WEB-INF/vm//
 /bean

 bean id=viewResolver
class=org.springframework.web.servlet.view.velocity.VelocityViewResolver
   property name=cache value=true/
   property name=prefix value=/
   property name=suffix value=.vm/
   property name=exposeSpringMacroHelpers value=true/
 /bean
 
 !-- setup wicket application --
 bean id=wicketApplication
class=com.sonatype.maven.web.WicketApplication/
/beans

and the exception which has ruined my week is this one:

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

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

org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)

org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)

org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
java.lang.Thread.run(Thread.java:595)


root cause 

java.lang.IllegalStateException: bean of type
[org.apache.wicket.protocol.http.WebApplication] not found

org.apache.wicket.spring.SpringWebApplicationFactory.createApplication(SpringWebApplicationFactory.java:107)

org.apache.wicket.spring.SpringWebApplicationFactory.createApplication(SpringWebApplicationFactory.java:86)
org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:503)

org.apache.wicket.protocol.http.WicketServlet.init(WicketServlet.java:188)
javax.servlet.GenericServlet.init(GenericServlet.java:212)

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

org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)

org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)

org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
java.lang.Thread.run(Thread.java:595)

I have used every possible web.xml configuration that i found on the net but
still i have this exception.
I've used a filter configuration instead of a servlet but that is even
worst.
Can you pleaseee help me. 
-- 
View this message in context: 

how to get the war name wicket application is running from?

2008-04-07 Thread Vit Rozkovec

Hallo,
is there a way how could you get a name of the WAR file the application 
is running from?
I would like to do create the WAR once and then copy it multiple times 
under the different names to the container. By the name I would then 
decide what client is running the application and set the appropriate 
style of the application.
I know I can introduce the attribute in the compile time, but if 
possible, I would like to do it the way I described before.


Regards Vitek

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



Re: Picnik components

2008-04-07 Thread Ryan Sonnek
I haven't checked out the code yet, but the demo available at
indyphone is *really* impressive.  Nice work!  This could be a *very*
useful component.

On Sun, Apr 6, 2008 at 5:26 PM, Rüdiger Schulz [EMAIL PROTECTED] wrote:
 Hello everbody,

  I finally had the time to finish a first beta release of the picnik
  components, boldly named wicketstuff-picnik (I will apply for wicketstuff
  access soon). You can download the files from my blog for now:

  http://www.2rue.de/wicket/integrate-picnik-into-your-wicket-powered-website/

  There are passive components for enabling push and pull export, a OO-mapping
  of the Picnik-API, an IModel to create links to make API calls and a page
  with examples on how to use all of this. A Picnik-API key is required and
  certainly/hopefully not included :)

  Greetings, and have fun with it,

  Rüdiger

  2008/3/22, Roland Huss [EMAIL PROTECTED]:


 
  
   Hi Ruediger,
  
  
  
   Rüdiger_Schulz wrote:
   
I'm sure some of you heard about picnik.com, this awesome online image
editor. As I'm in the process of integrating this in my website via
   their
API, I wanted to implement this as a collection of reusable Wicket
components. Has anyone already started with this? If not - I'm going to,
and
I'd be very happy to release this under Apache License 2.0, e.g. as a
wicketstuff project.
   
  
  
   I'm very interested in such components, so when you have something to look
   at, I would be happy to give it a try ...
  
   ...roland
  
   --
   View this message in context:
   http://www.nabble.com/Picnik-components-tp16218381p16221631.html
   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
  www.indyphone.de - Coole Handy Logos einfach selber bauen


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



WebMarkupContainer multiplicated markup when using AjaxLink

2008-04-07 Thread Daniel Stoch
Hi,

There is a strange behaviour when I'm trying refresh
WebMarkupContainer component using AjaxLink. I have a simple page:

public HomePage(final PageParameters parameters) {
final WebMarkupContainer container = new WebMarkupContainer(container);
add(container);
container.setOutputMarkupId(true);
add(new AjaxLink(ajaxLink) {

  public void onClick(AjaxRequestTarget target) {
target.addComponent(container);
  }

});
  }


html
head
titleAjaxLink test/title
/head
body
p wicket:id=container
h4Header A/h4
/p
div
a wicket:id=ajaxLinkAjax request/a
/div
/body
/html

For the first time page is rendered as follows:
Header A
Ajax request

When I click Ajax request link the onClick metod is called to
refresh container component (which is WebMarkupContainer).
But instead of refreshing (repainting) of container markup (p
wicket:id=container.../p markup), it is dupliacted below the
original paragraph. Each click on this ajax link causes this paragraph
multiplication and after eg. 4 clicks the page looks like:
Header A
Header A
Header A
Header A
Header A
Ajax request

Is it a bug or I should not use WebMarkupContainer to refresh its
contents in ajax calls?

--
Daniel

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



RE: RadioButton inside DataTable

2008-04-07 Thread Sathish Gopal

Hi all,

Let me explain my requirement properly.

I have created a table using wickets component DefaultTableModel. Number of
rows in the table is dynamic. One of the column is radio button. This radio
button is used to select that particular row.

I used wickets fragment feature to implement this.  My html has something
like this...

 div
table  cellpadding=0 cellspacing=1 wicket:id=table/
/div

wicket:fragment wicket:id=radioButtonFrag
 
input type=radio wicket:id=selected/

/wicket:fragment

My Fragment is like this...

public class FlightSelectionFragment extends Fragment {

public FlightSelectionFragment(String id, String markupId,
MarkupContainer markupProvider, RadioGroup 
radioGroup) {
super(id, markupId, markupProvider);
radioGroup.add(new Radio(selected, new Model()));
add(radioGroup);
}
}

The exception that i get is 

WicketMessage: Error attaching this container for rendering:
[MarkupContainer [Component id = table, page =
com.emirates.poc.web.flight.page.SearchPage, path =
0:table.DefaultDataTable, isVisible = true, isVersioned = true]]Root
cause:java.lang.IllegalArgumentException: A child with id 'selected' already
exists:.

It means i can only add one Radio button to the RadioGroup. As the Radio
component get's created at runtime, i cannot specify it's name in the java
and html.  There must be a way to add multiple radio button to the
RadioGroup using fragment.  The same thing works if i replace Radio with
checkbox component.

How to solve this issue?



Sathish Gopal wrote:
 
 Hi,
 
 I was actually looking for integrating RadioButton with DefaultDataTable
 component available in Wicket.
 
 My requirement is,  i need to show a row of data's with one column being a
 RadioButton. I use DataTable component for showing list of Data's. The
 number of columns is known only at runtime.  This radioButton is used to
 select that particular row of Data. How do i specify the name of the
 component in my html. i.e 
 
 wicket:fragment wicket:id=radioButtonFrag
  
   input type=radio wicket:id=selected/
   
 /wicket:fragment
 
 The name of the above radio button is selected. This same named (id
 =selected) radio button cannot be added again to the RadioGroup has i loop
 thro... Is there a way to dynamicaly name component at runtime. I think
 this is just a problem of naming the Radiobutton as the records are know
 only at runtime. 
 
 
 Hoover, William wrote:
 
 see http://cwiki.apache.org/WICKET/using-radiogroups.html
 
 -Original Message-
 From: Sathish Gopal [mailto:[EMAIL PROTECTED]
 Sent: Sunday, April 06, 2008 6:07 AM
 To: users@wicket.apache.org
 Subject: RadioButton inside DataTable
 
 
 
 Hi all,
 
 I'm trying to build DataTable using the Wickets DefaultDataTable
 component.
 One of the column in the list is a RadioButton component, which is used
 to
 select a particular row.
 
 I'm using wicket fragment feature. 
 
 My html looks like this...
 
  div
 table  cellpadding=0 cellspacing=1 wicket:id=table/
 /div
 
 wicket:fragment wicket:id=radioChoiceFrag
  
  input type=radio wicket:id=selected/
  
 /wicket:fragment
 
 My fragment looks like this..
 
  public class FlightSelectionFragment extends Fragment {
  private RadioGroup radioGroup;
 
  public FlightSelectionFragment(String id, String markupId,
  MarkupContainer markupProvider) {
  super(id, markupId, markupProvider);
  radioGroup.add(new Radio(selected, new Model()) {
   });
  }
 
 How do i add the same Radio button component (id=selected) to RadioGroup
 (id=radioChoicegroup) for multiple rows. i.e Assuming there are three
 rows
 in table. So i need 3 radio buttons which will be added to the same radio
 group (id=radioChoicegroup). But the component id (id=selected) cannot be
 the same for all the three rows. This gives Runtime Exception. How to
 handle
 this issue?
 
 
 
 
 
 -- 
 View this message in context:
 http://www.nabble.com/RadioButton-inside-DataTable-tp16522717p16522717.html
 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/RadioButton-inside-DataTable-tp16522717p16537404.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]

Re: wicketstuff-jmx-panel: can't find a repository

2008-04-07 Thread Ivo van Dongen
Hi Gerolf,

Great stuff! We'll try it out and let you know how it went.

Thanks,
Ivo

On Mon, Apr 7, 2008 at 10:05 AM, Gerolf Seitz [EMAIL PROTECTED]
wrote:

 Hi Ivo,

 you can find the release built for the current/upcoming wicket release
 1.3.3
 at

 http://wicketstuff.org/maven/repository/org/wicketstuff/wicketstuff-jmx-panel/1.3.3/

 let me know when you encounter any issues.

  Gerolf

 On Mon, Apr 7, 2008 at 9:26 AM, Ivo van Dongen [EMAIL PROTECTED]
 wrote:

  Hi Gerolf,
 
  Great to have this available in a repository. We're using this now in a
  project and we're really satisfied. One problem though is that we're
 using
  maven:release to release our projects and it refuses to release with
  snapshot dependencies (as it should :)).  Could we perhaps bother you to
  make a release of wicket-jmx-panel? It seems stable enough.
 
  Thanks in advance,
  Ivo van Dongen
 
  On Fri, Mar 7, 2008 at 4:00 AM, Gerolf Seitz [EMAIL PROTECTED]
  wrote:
 
   done, wicketstuff-jmx-panel is in the wicketstuff.org maven repository
  
   dependency
groudIdorg.wicketstuff/groupId
artifactIdwicketstuff-jmx-panel/artifactId
version1.3-SNAPSHOT/version
   /dependency
  
   cheers,
Gerolf
  
  
   On Wed, Mar 5, 2008 at 12:13 PM, Rommert de Bruijn [EMAIL PROTECTED]
 
   wrote:
  
Hi,
   
I'm setting up a small PoC web application with JMX, Spring 
 Wicket.
Among other things I'm using the JmxPanel component by Gerolf Seitz.
which I checked out here:
   
   
  
 
 https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-jmx-panel/
   
The JmxPanel component works like a charm, so I'd like to add a
dependency for the wicketstuff-jmx-panel artifact to my project.
Unfortunately, I can't seem to find a repository that contains the
wicketstuff-jmx-panel artifact at all.
   
For now, I created a .jar from the svn checkout and added it to our
local repository, but it would be preferable to use a public
  repository.
Can anyone help me out?
   
Thanks in advance,
Rommert
   
--
Rommert de Bruijn
Func. Internet Integration
W http://www.func.nl
T +31 20 423
F +31 20 4223500
   
   
  
 
 
 
  --
  Ivo van Dongen
  Func. Internet Integration
  W http://www.func.nl
  T +31 20 423
  F +31 20 4223500
 




-- 
Ivo van Dongen
Func. Internet Integration
W http://www.func.nl
T +31 20 423
F +31 20 4223500


Re: Picnik components

2008-04-07 Thread Rüdiger Schulz
Erm - thanks for the praise, but the Picnik component is not yet integrated
anywhere ;). What you see at IndyPhone at the moment is self-functioning,
and has nothing to do with Picnik.

With the Picnik components it will be possible to import and export images
via Picnik.com.

greetings,

Rüdiger

2008/4/7, Ryan Sonnek [EMAIL PROTECTED]:

 I haven't checked out the code yet, but the demo available at
 indyphone is *really* impressive.  Nice work!  This could be a *very*
 useful component.


 On Sun, Apr 6, 2008 at 5:26 PM, Rüdiger Schulz [EMAIL PROTECTED]
 wrote:
  Hello everbody,
 
   I finally had the time to finish a first beta release of the picnik
   components, boldly named wicketstuff-picnik (I will apply for
 wicketstuff
   access soon). You can download the files from my blog for now:
 
 
 http://www.2rue.de/wicket/integrate-picnik-into-your-wicket-powered-website/
 
   There are passive components for enabling push and pull export, a
 OO-mapping
   of the Picnik-API, an IModel to create links to make API calls and a
 page
   with examples on how to use all of this. A Picnik-API key is required
 and
   certainly/hopefully not included :)
 
   Greetings, and have fun with it,
 
   Rüdiger
 
   2008/3/22, Roland Huss [EMAIL PROTECTED]:
 
 
  
   
Hi Ruediger,
   
   
   
Rüdiger_Schulz wrote:

 I'm sure some of you heard about picnik.com, this awesome online
 image
 editor. As I'm in the process of integrating this in my website via
their
 API, I wanted to implement this as a collection of reusable Wicket
 components. Has anyone already started with this? If not - I'm
 going to,
 and
 I'd be very happy to release this under Apache License 2.0, e.g. as
 a
 wicketstuff project.

   
   
I'm very interested in such components, so when you have something to
 look
at, I would be happy to give it a try ...
   
...roland
   
--
View this message in context:
http://www.nabble.com/Picnik-components-tp16218381p16221631.html
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
   www.indyphone.de - Coole Handy Logos einfach selber bauen
 

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




-- 
greetings from Berlin,

Rüdiger Schulz

www.2rue.de
www.indyphone.de - Coole Handy Logos einfach selber bauen


Re: WebMarkupContainer multiplicated markup when using AjaxLink

2008-04-07 Thread Matej Knopp
What wicket version are you using?

-Matej

On Mon, Apr 7, 2008 at 2:38 PM, Daniel Stoch [EMAIL PROTECTED] wrote:
 Hi,

  There is a strange behaviour when I'm trying refresh
  WebMarkupContainer component using AjaxLink. I have a simple page:

  public HomePage(final PageParameters parameters) {
 final WebMarkupContainer container = new WebMarkupContainer(container);
 add(container);
 container.setOutputMarkupId(true);
 add(new AjaxLink(ajaxLink) {

   public void onClick(AjaxRequestTarget target) {
 target.addComponent(container);
   }

 });
   }


  html
 head
 titleAjaxLink test/title
 /head
 body
 p wicket:id=container
 h4Header A/h4
 /p
 div
 a wicket:id=ajaxLinkAjax request/a
 /div
 /body
  /html

  For the first time page is rendered as follows:
  Header A
  Ajax request

  When I click Ajax request link the onClick metod is called to
  refresh container component (which is WebMarkupContainer).
  But instead of refreshing (repainting) of container markup (p
  wicket:id=container.../p markup), it is dupliacted below the
  original paragraph. Each click on this ajax link causes this paragraph
  multiplication and after eg. 4 clicks the page looks like:
  Header A
  Header A
  Header A
  Header A
  Header A
  Ajax request

  Is it a bug or I should not use WebMarkupContainer to refresh its
  contents in ajax calls?

  --
  Daniel

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





-- 
Resizable and reorderable grid components.
http://www.inmethod.com

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



Re: how to get the war name wicket application is running from?

2008-04-07 Thread Jeremy Levy
If by the application and set the appropriate style of the application.
you mean the look and feel there are better ways to do this then deploying
your application multiple times.

Use locales which will let you have multiple style sheets and/or HTML /
resources which vary depending the locale value.

http://cwiki.apache.org/WICKET/localization-and-skinning-of-applications.html

J



On Mon, Apr 7, 2008 at 8:18 AM, Vit Rozkovec [EMAIL PROTECTED] wrote:

 Hallo,
 is there a way how could you get a name of the WAR file the application is
 running from?
 I would like to do create the WAR once and then copy it multiple times
 under the different names to the container. By the name I would then decide
 what client is running the application and set the appropriate style of the
 application.
 I know I can introduce the attribute in the compile time, but if possible,
 I would like to do it the way I described before.

 Regards Vitek

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




Re: WebMarkupContainer multiplicated markup when using AjaxLink

2008-04-07 Thread Daniel Stoch
Wicket version: 1.3.3

Daniel

On Mon, Apr 7, 2008 at 3:36 PM, Matej Knopp [EMAIL PROTECTED] wrote:
 What wicket version are you using?

  -Matej



  On Mon, Apr 7, 2008 at 2:38 PM, Daniel Stoch [EMAIL PROTECTED] wrote:
   Hi,
  
There is a strange behaviour when I'm trying refresh
WebMarkupContainer component using AjaxLink. I have a simple page:
  
public HomePage(final PageParameters parameters) {
   final WebMarkupContainer container = new 
 WebMarkupContainer(container);
   add(container);
   container.setOutputMarkupId(true);
   add(new AjaxLink(ajaxLink) {
  
 public void onClick(AjaxRequestTarget target) {
   target.addComponent(container);
 }
  
   });
 }
  
  
html
   head
   titleAjaxLink test/title
   /head
   body
   p wicket:id=container
   h4Header A/h4
   /p
   div
   a wicket:id=ajaxLinkAjax request/a
   /div
   /body
/html
  
For the first time page is rendered as follows:
Header A
Ajax request
  
When I click Ajax request link the onClick metod is called to
refresh container component (which is WebMarkupContainer).
But instead of refreshing (repainting) of container markup (p
wicket:id=container.../p markup), it is dupliacted below the
original paragraph. Each click on this ajax link causes this paragraph
multiplication and after eg. 4 clicks the page looks like:
Header A
Header A
Header A
Header A
Header A
Ajax request
  
Is it a bug or I should not use WebMarkupContainer to refresh its
contents in ajax calls?
  
--
Daniel
  
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
  
  



  --
  Resizable and reorderable grid components.
  http://www.inmethod.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: Maven multi module app using wicket spring hibernate

2008-04-07 Thread Guðmundur Bjarni

Hi,

I've been using Spring and Wicket together with no problems. My web.xml part
looks something like this:

filter
filter-namewicketFilter/filter-name
filter-class
org.apache.wicket.protocol.http.WicketFilter
/filter-class
init-param
param-nameapplicationFactoryClassName/param-name
param-value

org.apache.wicket.spring.SpringWebApplicationFactory
/param-value
/init-param
init-param
param-namebeanName/param-name
param-valuewicketApplication/param-value
/init-param
/filter

I see that you are using the servlet rather than a filter, but that should
not pose any problems, but the filter is the preferred way in Wicket 1.3.

regards,
Guðmundur Bjarni
-- 
View this message in context: 
http://www.nabble.com/Maven-multi-module-app-using-wicket-spring-hibernate-tp16537252p16537448.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



[ANNOUNCE] Apache Wicket 1.3.3 is released!

2008-04-07 Thread Frank Bille
The Apache Wicket team is proud to announce the availability of the
third maintenance release: Apache Wicket 1.3.3. A lot of bugs have
been squashed and several improvements implemented. PLEASE NOTE: We
have fixed a bug related to the order of the rendered links in
wicket:head, which might have influence on how your stylesheets are
loaded. See WICKET-1487
(https://issues.apache.org/jira/browse/WICKET-1487) for details.

Eager people click here to download the distribution, others can read further:

http://www.apache.org/dyn/closer.cgi/wicket/1.3.3

We thank you for your patience and support.

- The Wicket Team


Apache Wicket

Apache Wicket is a component oriented Java web application framework.
With proper mark-up/logic separation, a POJO data model, and a
refreshing lack of XML, Apache Wicket makes developing web-apps simple
and enjoyable again. Swap the boilerplate, complex debugging and
brittle code for powerful, reusable components written with plain Java
and HTML.

You can find out more about Apache Wicket on our website:

http://wicket.apache.org


This release

This release is the second maintenance release for the Wicket 1.3
product. Development for a new version of Wicket will commence soon.
This release fixes several bugs and adds some minor improvements. You
can find out about the changes at the bottom of this announcement.


Migrating from 1.2

If you are coming from Wicket 1.2, you really want to read our
migration guide, found on the wiki:

http://cwiki.apache.org/WICKET/migrate-13.html


Downloading the release

You can download the release from the official Apache mirror system,
and you can find it through the following link:

http://www.apache.org/dyn/closer.cgi/wicket/1.3.3/

For the Maven and Ivy fans out there: update your pom's to the
following, and everything will be downloaded automatically:

dependency
groupIdorg.apache.wicket/groupId
artifactIdwicket/artifactId
version1.3.3/version
/dependency

Substitute the artifact ID with the projects of your liking to get the
other projects.

Please note that we don't prescribe a Logging implementation for
SLF4J. You need to specify yourself which one you prefer. Read more
about SLF4J here: http://slf4j.org


Validating the release

The release has been signed by Frank Bille, your release manager for
today. The public key can be found in the KEYS file in the download
area. Download the KEYS file only from the Apache website.

http://www.apache.org/dist/wicket/1.3.3/KEYS

Instructions on how to validate the release can be found here:

http://www.apache.org/dev/release-signing.html#check-integrity


Reporting bugs

In case you do encounter a bug, we would appreciate a report in our JIRA:

http://issues.apache.org/jira/browse/WICKET


The distribution

In the distribution you will find a README. The README contains
instructions on how to build from source yourself. You also find a
CHANEGELOG-1.3 which contains a list of all things that have been
fixed, added and/or removed since Wicket 1.3.0.


Release Notes - Wicket - Version 1.3.3

Bug

* WICKET-310 - AutoCompleteTextField does not invoke post call handlers
* WICKET-860 - GoAndClearFilter doesn't reset filter form fields
* WICKET-932 - BaseWicketTester support for SubmitLink
* WICKET-1105 - Missing javascript header referencies when there
are no body or head tags.
* WICKET-1265 - Close ModalWindow in IE with scrollbars scrolls to bottom
* WICKET-1268 - Form inside VelocityPanel throws
WicketRuntimeException: Unable to find the markup for the component.
* WICKET-1280 - Autocomplete onchange event gets fired twice when
selecting with mouse click
* WICKET-1329 - AutoCompleteTextField's suggestion list
disappeared when it is used inside a ModalWindow
* WICKET-1332 - AjaxFormChoiceComponentUpdatingBehavior just
updates the group grandchildren
* WICKET-1350 - AutoCompleteTextField's scrollable suggestion list
disappeared when a mouse pointing to the scroll bar in IE6/7
* WICKET-1372 - Input field with autocomplete behavior does not
submit the form via enter key in some cases
* WICKET-1391 - wicket:enclosure bug: setObject(null) called for
excplicitly invisible fields in a non-visible enclosure
* WICKET-1408 - ComponentFeedbackMessageFilter should use equals()
method to determine equality
* WICKET-1411 - FormTester doesn't initialise values for RadioGroups
* WICKET-1414 - findSubmittingButton will fail when button without
form is added before form
* WICKET-1415 - BundleStringResourceLoader throws NPE if component is null
* WICKET-1416 - WIcket Filter ignoring query parameters on redirect
* WICKET-1417 - AjaxFormChoiceComponentUpdatingBehavior does not
iterate over immediate children
* WICKET-1423 - AuthenticatedWebApplication uses deprecated
constructor of AuthenticatedWebSession
* WICKET-1430 - Form processing throws NPE if button.onsubmit()
moves the button or its parents out of the component hierarchy

Re: Have any DynamicByteArrayResource sample?

2008-04-07 Thread rosen jiang

well, I have some idea:

ByteArrayOutputStream baos = new ByteArrayOutputStream();

.
.
.
add(new Link(download) {
public void onClick() {
 WebResponse response = (WebResponse) getResponse();
 response.setHeader(Content-Disposition,
attachment;filename= + aaa.xls);

response.setContentType(application/x-msdownload);
 response.getOutputStream().write(baos.toByteArray());
 baos.flush();
 baos.close();
 }});

It's work! very easy, like a Servlet, but above codes need some
try-catch-finally block.


Nino.Martinez wrote:
 
 take a look at DynamicImageResource.. It should give some hints.
 
 
 
 rosen jiang wrote:
 Hi all,

 I want use DynamicByteArrayResource class download Excel(ByteArray
 Resource  
 not File) from jexcelapi.
 Does DynamicByteArrayResource class fit for me?

 thx!
 best regards,
 osen jiang
   
 
 -- 
 -Wicket for love
 
 Nino Martinez Wael
 Java Specialist @ Jayway DK
 http://www.jayway.dk
 +45 2936 7684
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Have-any-DynamicByteArrayResource-sample--tp16525712p16537476.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Problems with cookie

2008-04-07 Thread Fabien D.

Hi

I have a problem to set and use cookie !!

I have followed the example found in wickets example :

Cookie cookieUser = new Cookie(cookieUser, email);
Cookie cookiePassword = new Cookie(cookiePassword, mdp);
cookieUser.setMaxAge(3600);
cookiePassword.setMaxAge(3600);
((WebResponse)getRequestCycle().getResponse()).addCookie(cookieUser);
((WebResponse)getRequestCycle().getResponse()).addCookie(cookiePassword);

There is a problem during compilation :
  cannot find symbol method getRequestCycle()...

I have a WebSession objet where i stock the user for right acces

In my WebApplication objet I have declared this :
public Session newSession (Request request, Response response){
return new GestionSession(request);
}

Thank you in advance for your help
-- 
View this message in context: 
http://www.nabble.com/Problems-with-cookie-tp16537484p16537484.html
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: Have any DynamicByteArrayResource sample?

2008-04-07 Thread Nino Saturnino Martinez Vazquez Wael

true, this is how id did once too:)

rosen jiang wrote:

well, I have some idea:

ByteArrayOutputStream baos = new ByteArrayOutputStream();

.
.
.
add(new Link(download) {
public void onClick() {
 WebResponse response = (WebResponse) getResponse();
 response.setHeader(Content-Disposition,
attachment;filename= + aaa.xls);

response.setContentType(application/x-msdownload);

 response.getOutputStream().write(baos.toByteArray());
 baos.flush();
 baos.close();
 }});

It's work! very easy, like a Servlet, but above codes need some
try-catch-finally block.


Nino.Martinez wrote:
  

take a look at DynamicImageResource.. It should give some hints.



rosen jiang wrote:


Hi all,

I want use DynamicByteArrayResource class download Excel(ByteArray
Resource  
not File) from jexcelapi.

Does DynamicByteArrayResource class fit for me?

thx!
best regards,
osen jiang
  
  

--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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






  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: Have any DynamicByteArrayResource sample?

2008-04-07 Thread John Krasnay
On Mon, Apr 07, 2008 at 07:32:48AM -0700, rosen jiang wrote:
 
 well, I have some idea:
 
 ByteArrayOutputStream baos = new ByteArrayOutputStream();
 
 .
 .
 .
 add(new Link(download) {
 public void onClick() {
WebResponse response = (WebResponse) getResponse();
  response.setHeader(Content-Disposition,
 attachment;filename= + aaa.xls);
 
 response.setContentType(application/x-msdownload);
response.getOutputStream().write(baos.toByteArray());
baos.flush();
  baos.close();
  }});
 
 It's work! very easy, like a Servlet, but above codes need some
 try-catch-finally block.
 

Hi Rosen,

The problem with your code is that your BAOS is serialized with your
page, which means that your entire report is using up space in your
session, even if the user never clicks the link.

Here's some code from my application that uses Wicket's
AbstractResourceStreamWriter, which was mentioned on this list a few
days ago:

@Override
public void onClick() {
final ReportGenerator generator = getReportGenerator();

IResourceStream resourceStream = new
AbstractResourceStreamWriter() {
public void write(OutputStream output) {
try {
generator.generate(output, columns, dataProvider);
} catch (IOException e) {
throw new RuntimeException(e);
}
}
public String getContentType() {
return generator.getContentType();
}

};

getRequestCycle().setRequestTarget(new
ResourceStreamRequestTarget(resourceStream).setFileName(getFileName()));
}

ReportGenerator is my own abstraction for generating the report. Note
that the bytes are generated only when the link is clicked, and they are
streamed directly to the client without being stored in an intermediate
byte array.

Hope this helps.

jk

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



Re: Navigation bar

2008-04-07 Thread Igor Vaynberg
add(new listview(links, linksmodel) {
 onpopulateitem(item item) {
   e=new externallink(link, item.getmodel().getlink(),
item.getmodel().getlabel());
  }
}

tabletrtd wicket:id=linksa wicket:id=linklink/a/td/tr/table

-igor

On Mon, Apr 7, 2008 at 3:44 AM, Milan Křápek [EMAIL PROTECTED] wrote:
 Hi,
   I need your help. After few days I am out of ideas and still have no 
 solution.

  What I have:
   I have stored users in databes and each user has some List od favourite 
 pages URLs. This URLs links external pages.

  What I need:
   I need to do some sort of TabbedPanel or one row table without headers, 
 which will contains links to the stored URLs.

  Where is the problem:
   First I try to use TabbedPanel but this is impossible due to the 
 TabbedPanel returns just wicket Panel and not any URL. Then I try to use 
 DataTable but these tables have header line. So I try to give my links to the 
 headers. It looks like it is working. But it did not render to the page. I 
 think it was due to empty data rows so wicket does not render the empty 
 table. At last I try to use GridView but I was not able to determine the 
 names of url links.

  Please have you met this problem before? Is it possible to upgrade the 
 TabbedPanel to return the url instead of Panel??

  Thanks for any advice.

  Milan

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




Re: Problems with cookie

2008-04-07 Thread Igor Vaynberg
you really should use an IDE

other then that you can do requestcycle.get() instead

-igor

On Mon, Apr 7, 2008 at 7:56 AM, Fabien D. [EMAIL PROTECTED] wrote:

  Hi

  I have a problem to set and use cookie !!

  I have followed the example found in wickets example :

  Cookie cookieUser = new Cookie(cookieUser, email);
  Cookie cookiePassword = new Cookie(cookiePassword, mdp);
  cookieUser.setMaxAge(3600);
  cookiePassword.setMaxAge(3600);
  ((WebResponse)getRequestCycle().getResponse()).addCookie(cookieUser);
  ((WebResponse)getRequestCycle().getResponse()).addCookie(cookiePassword);

  There is a problem during compilation :
   cannot find symbol method getRequestCycle()...

  I have a WebSession objet where i stock the user for right acces

  In my WebApplication objet I have declared this :
 public Session newSession (Request request, Response response){
 return new GestionSession(request);
 }

  Thank you in advance for your help
  --
  View this message in context: 
 http://www.nabble.com/Problems-with-cookie-tp16537484p16537484.html
  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: Navigation bar

2008-04-07 Thread Milan Křápek
Thanks a lot, this was the thing I was looking for.

Milan

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



Problem: IntegerConverter cannot parse or display locale specific format like 999,999

2008-04-07 Thread Matthew Young
I want a Label to display Integer as 999,999,999 but it's not happening.

Basic problem is inside IntegerConverter, NumberFormat is created in
abstractIntegerConverter like this:

public NumberFormat getNumberFormat(Locale locale)
{
NumberFormat numberFormat = (NumberFormat)numberFormats.get(locale);
if (numberFormat == null)
{
numberFormat = NumberFormat.getIntegerInstance(locale);
numberFormat.setParseIntegerOnly(true);
numberFormat.setGroupingUsed(false); //
 !!! why set to false?
numberFormats.put(locale, numberFormat);
}
return (NumberFormat)numberFormat.clone();
}


Because setGroupingUsed(false), IntegerConverter cannot parse locale
formatted input like 999,999(raise conversion exception) or output in
locale specific format. DecimalConverter is not like this.

Is there some specific reason to call setGroupingUsed(false)?  Can we have
this remove?


Re: External resource references not working in Wicket/Jetty

2008-04-07 Thread Martin Funk
ugh...
are you sure the link is correct?
at least the one in you mail doesn't work here.

Bad Request Your client has issued a malformed or illegal request.



2008/4/7, classacts [EMAIL PROTECTED]:


 I'm trying to display a static google map as the background for a div tag
 but
 it doesn't seem to work when i place this static HTML code in my WebPage:


 div style=background-image:
 url(
 http://maps.google.com/staticmap?center=54.55,-3.88amp;zoom=5amp;size=500x450amp;key=ABQIw3BrxANqPQrDF3i-BIABYxQJqY1rPYzEgN6DCh6NXOCZP6CbIBQMW79KO5x4CXyX-_qTpdPBavy7xA
 );
 width: 500px; height: 450px;/div


 If I hand create an html file with that tag, it works.  It also works if I
 launch the page from Wicket (the background won't show) then save the page
 as an HTML file and load it that way.  I think there is something
 happening
 to the request that is causing this issue - my only guess is the web
 browser
 is requesting that image from Jetty instead of going directly to
 maps.google.com?  I removed all CSS that could be affecting the div tag in
 question, so that is ruled out.  Any ideas how to get this to work?

 Thanks
 --
 View this message in context:
 http://www.nabble.com/External-resource-references-not-working-in-Wicket-Jetty-tp16537251p16537251.html
 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: java.io.StreamCorruptedException: invalid type code: 29

2008-04-07 Thread Matej Knopp
Wicket 1.3.3 was released before april 06. The overflow fix is not
part of the release.

-Matej

On Mon, Apr 7, 2008 at 9:13 PM, Daniel Wu [EMAIL PROTECTED] wrote:
 I've updated to the released Wicket 1.3.3, but I'm having the stackoverflow
  there, but it wasn't happening on the snapshot of april 06. Was this fix
  incorporated on the official Wicket 1.3.3 release?

  On Sun, Apr 6, 2008 at 6:10 PM, Johan Compagner [EMAIL PROTECTED]
  wrote:



   Dont know if the stream corrupt has the same root problem as the
   stackoverflow
   But that is just fixed.
  
   johan
  
  
   On Sat, Mar 29, 2008 at 11:22 PM, Daniel Wu [EMAIL PROTECTED] wrote:
  
   
I've updated my wicket application to Wicket 1.3.2, but now, when I try
   to
switch between my application tabs (my tabs extend
org.apache.wicket.extensions.markup.html.tabs.AbstractTab) I'm getting
this
error:
   
ERROR RequestCycle () - Could not deserialize object using
   
   
   `org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory`
object factory
java.lang.RuntimeException: Could not deserialize object using
   
   
   `org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory`
object factory
   at
org.apache.wicket.util.lang.Objects.byteArrayToObject(Objects.java:411)
   at
   
   
   
 org.apache.wicket.protocol.http.pagestore.AbstractPageStore.deserializePage(AbstractPageStore.java:228)
   at
   
   
   
 org.apache.wicket.protocol.http.pagestore.DiskPageStore.getPage(DiskPageStore.java:706)
   at
   
   
   
 org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLevelCachePageMap.get(SecondLevelCacheSessionStore.java:311)
   at org.apache.wicket.Session.getPage(Session.java:751)
...
Caused by: java.io.StreamCorruptedException: invalid type code: 29
   at java.io.ObjectInputStream.readObject0(Unknown Source)
   at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
   at java.io.ObjectInputStream.readSerialData(Unknown Source)
   at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
   at java.io.ObjectInputStream.readObject0(Unknown Source)
   at java.io.ObjectInputStream.readObject(Unknown Source)
   at
org.apache.wicket.util.lang.Objects.byteArrayToObject(Objects.java:393)
   
I've already downloaded and used the latest wicket 1.3 snapshot, which
   was
suggested to me here: https://issues.apache.org/jira/browse/WICKET-1445,
but I'm still having this error.
   
I'm still using an old release of wicket-extensions. Since I updated to
wicket 1.3, I'm also having this warning:
   
WARN  AbstractTextComponent () - Couldn't resolve model type of
Model:classname=[...], please set the type yourself.
   
Could any of these be related to the Serialization error? Does anyone
   have
any idea of what is causing it?
   
Daniel
   
--
View this message in context:
   
   
 http://www.nabble.com/java.io.StreamCorruptedException%3A-invalid-type-code%3A-29-tp16374745p16374745.html
Sent from the Wicket - User mailing list archive at Nabble.com.
   
   
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
   
   
  




-- 
Resizable and reorderable grid components.
http://www.inmethod.com

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



Re: java.io.StreamCorruptedException: invalid type code: 29

2008-04-07 Thread Matej Knopp
Actually, it seems that I'm wrong about this...

-Matej

On Mon, Apr 7, 2008 at 9:26 PM, Matej Knopp [EMAIL PROTECTED] wrote:
 Wicket 1.3.3 was released before april 06. The overflow fix is not
  part of the release.

  -Matej



  On Mon, Apr 7, 2008 at 9:13 PM, Daniel Wu [EMAIL PROTECTED] wrote:
   I've updated to the released Wicket 1.3.3, but I'm having the stackoverflow
there, but it wasn't happening on the snapshot of april 06. Was this fix
incorporated on the official Wicket 1.3.3 release?
  
On Sun, Apr 6, 2008 at 6:10 PM, Johan Compagner [EMAIL PROTECTED]
wrote:
  
  
  
 Dont know if the stream corrupt has the same root problem as the
 stackoverflow
 But that is just fixed.

 johan


 On Sat, Mar 29, 2008 at 11:22 PM, Daniel Wu [EMAIL PROTECTED] wrote:

 
  I've updated my wicket application to Wicket 1.3.2, but now, when I 
 try
 to
  switch between my application tabs (my tabs extend
  org.apache.wicket.extensions.markup.html.tabs.AbstractTab) I'm getting
  this
  error:
 
  ERROR RequestCycle () - Could not deserialize object using
 
 
 
 `org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory`
  object factory
  java.lang.RuntimeException: Could not deserialize object using
 
 
 
 `org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory`
  object factory
 at
  
 org.apache.wicket.util.lang.Objects.byteArrayToObject(Objects.java:411)
 at
 
 
 
 org.apache.wicket.protocol.http.pagestore.AbstractPageStore.deserializePage(AbstractPageStore.java:228)
 at
 
 
 
 org.apache.wicket.protocol.http.pagestore.DiskPageStore.getPage(DiskPageStore.java:706)
 at
 
 
 
 org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLevelCachePageMap.get(SecondLevelCacheSessionStore.java:311)
 at org.apache.wicket.Session.getPage(Session.java:751)
  ...
  Caused by: java.io.StreamCorruptedException: invalid type code: 29
 at java.io.ObjectInputStream.readObject0(Unknown Source)
 at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
 at java.io.ObjectInputStream.readSerialData(Unknown Source)
 at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
 at java.io.ObjectInputStream.readObject0(Unknown Source)
 at java.io.ObjectInputStream.readObject(Unknown Source)
 at
  
 org.apache.wicket.util.lang.Objects.byteArrayToObject(Objects.java:393)
 
  I've already downloaded and used the latest wicket 1.3 snapshot, which
 was
  suggested to me here: 
 https://issues.apache.org/jira/browse/WICKET-1445,
  but I'm still having this error.
 
  I'm still using an old release of wicket-extensions. Since I updated 
 to
  wicket 1.3, I'm also having this warning:
 
  WARN  AbstractTextComponent () - Couldn't resolve model type of
  Model:classname=[...], please set the type yourself.
 
  Could any of these be related to the Serialization error? Does anyone
 have
  any idea of what is causing it?
 
  Daniel
 
  --
  View this message in context:
 
 
 http://www.nabble.com/java.io.StreamCorruptedException%3A-invalid-type-code%3A-29-tp16374745p16374745.html
  Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 

  



  --


 Resizable and reorderable grid components.
  http://www.inmethod.com




-- 
Resizable and reorderable grid components.
http://www.inmethod.com

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



Invoulentary session sharing/leakage in Wicket 1.3.x

2008-04-07 Thread Edvin Syse
Today I deployed an application based on Wicket 1.3.3 that has close to 10.000 users. After a couple of hours we started getting reports 
from users saying that even upon requesting the login-page, they were already logged in as an arbitrary user.


The users they were logged in as had previously performed a succesful login.

It seems like the wicket-sessions bleed over between different http-sessions. I tried changing from HybridUrlCodingStrategy to mounting the 
pages with the normal mountBookmarkablePage() method, but the results are the same. I also tried downgrading to 1.3.2 with the same results.


Can anyone think of a logical mistake I might have made?

Sincerely,
Edvin Syse

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



Re: Invoulentary session sharing/leakage in Wicket 1.3.x

2008-04-07 Thread Johan Compagner
is it really the wicket session or a page?

On Mon, Apr 7, 2008 at 10:40 PM, Edvin Syse [EMAIL PROTECTED] wrote:

 Today I deployed an application based on Wicket 1.3.3 that has close to
 10.000 users. After a couple of hours we started getting reports from users
 saying that even upon requesting the login-page, they were already logged in
 as an arbitrary user.

 The users they were logged in as had previously performed a succesful
 login.

 It seems like the wicket-sessions bleed over between different
 http-sessions. I tried changing from HybridUrlCodingStrategy to mounting the
 pages with the normal mountBookmarkablePage() method, but the results are
 the same. I also tried downgrading to 1.3.2 with the same results.

 Can anyone think of a logical mistake I might have made?

 Sincerely,
 Edvin Syse

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




Re: Invoulentary session sharing/leakage in Wicket 1.3.x

2008-04-07 Thread Edvin Syse

is it really the wicket session or a page?


I believe it's the session, but I'm not sure. The hijacker is able to navigate through all pages as the hijacked user.. And on the top of 
every page there is a logout button and text saying Logout username.


I'm not running in a clustered environment, just plain Jetty 6.1.7 in setuid 
mode.

I'm using the SecondLevelCacheSessionStore, but I'm thinking about trying with 
the HttpSessionStore now to see if it makes any difference.

I refer to the session object with a static getter everywhere (I think) using 
MySession.get().etc..

-- Edvin


On Mon, Apr 7, 2008 at 10:40 PM, Edvin Syse [EMAIL PROTECTED] wrote:


Today I deployed an application based on Wicket 1.3.3 that has close to
10.000 users. After a couple of hours we started getting reports from users
saying that even upon requesting the login-page, they were already logged in
as an arbitrary user.

The users they were logged in as had previously performed a succesful
login.

It seems like the wicket-sessions bleed over between different
http-sessions. I tried changing from HybridUrlCodingStrategy to mounting the
pages with the normal mountBookmarkablePage() method, but the results are
the same. I also tried downgrading to 1.3.2 with the same results.

Can anyone think of a logical mistake I might have made?

Sincerely,
Edvin Syse

-
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: Invoulentary session sharing/leakage in Wicket 1.3.x

2008-04-07 Thread Igor Vaynberg
can you try with 1.3.1, 1.3.0. would help us isolate where the problem is...

seems kind of strange that you are the only one seeing this though...

-igor


On Mon, Apr 7, 2008 at 1:40 PM, Edvin Syse [EMAIL PROTECTED] wrote:
 Today I deployed an application based on Wicket 1.3.3 that has close to
 10.000 users. After a couple of hours we started getting reports from users
 saying that even upon requesting the login-page, they were already logged in
 as an arbitrary user.

  The users they were logged in as had previously performed a succesful
 login.

  It seems like the wicket-sessions bleed over between different
 http-sessions. I tried changing from HybridUrlCodingStrategy to mounting the
 pages with the normal mountBookmarkablePage() method, but the results are
 the same. I also tried downgrading to 1.3.2 with the same results.

  Can anyone think of a logical mistake I might have made?

  Sincerely,
  Edvin Syse

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



AjaxSubmitLink accessing model object non-existent property

2008-04-07 Thread Tim Squires
Hi,

When adding an AjaxSubmitLink, the onSubmit method tries to access a
property of the model object that does not exists:

---
final AjaxSubmitLink confirmLink = new
AjaxSubmitLink(confirm) {
@Override
public void onSubmit(final AjaxRequestTarget target,
final Form form) {
if (((Will) getModelObject()).getExecutor() != null) {
willModalWindow.show(target);
} else {
warn(Please choose an executor.);
target.addComponent(feedback);
}
}

@Override
public void onError(final AjaxRequestTarget target,
final Form form) {
target.addComponent(feedback);
}
};

add(confirmLink);
---

It tries to access the confirm property of the Model, in this case a
Will object.

---
org.apache.wicket.WicketRuntimeException: No get method defined for class:
class crystalmark.willfinder.model.Will expression: confirm
 at
org.apache.wicket.util.lang.PropertyResolver.getGetAndSetter(PropertyResolver.java:433)
 at
org.apache.wicket.util.lang.PropertyResolver.getObjectAndGetSetter(PropertyResolver.java:275)
 at
org.apache.wicket.util.lang.PropertyResolver.getValue(PropertyResolver.java:84)
 at
org.apache.wicket.model.AbstractPropertyModel.getObject(AbstractPropertyModel.java:113)
 at org.apache.wicket.Component.getModelObject(Component.java:1551)
 at
crystalmark.willfinder.page.components.EditWillPanel$EditWillForm$5.onSubmit(EditWillPanel.java:183)
 at
org.apache.wicket.ajax.markup.html.form.AjaxSubmitLink$1.onSubmit(AjaxSubmitLink.java:94)
 at
org.apache.wicket.ajax.form.AjaxFormSubmitBehavior.onEvent(AjaxFormSubmitBehavior.java:128)
---

It's only when using the getModelObject method.  If I get the Will object
from else-where it works fine.

Is this a problem with the way I'm using the model or a bug with
AjaxSubmitLink?  Should I add it to jira?

Wicket 1.3.3 + JDK 1.6 + Tomcat 6

Thanks,
Tim
---
http://www.tnwdb.com - Wicket Wills!


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



Re: Invoulentary session sharing/leakage in Wicket 1.3.x

2008-04-07 Thread Edvin Syse

Igor Vaynberg wrote:

can you try with 1.3.1, 1.3.0. would help us isolate where the problem is...

seems kind of strange that you are the only one seeing this though...


I've turned on some logging in MySession:

public MailUser getCurrentMailuser() {
try {
		System.out.println(((WebRequest)RequestCycle.get().getRequest()).getHttpServletRequest().getRemoteAddr() +  got mailuser  + 
currentMailuser.getId() +   + currentMailuser.getUsername());

} catch (Exception ignored) {}
return currentMailuser;
}

This gives me output like:

85.165.86.192 got mailuser 19712 [EMAIL PROTECTED]
77.208.58.135 got mailuser 22817 [EMAIL PROTECTED]

these are fine, but then I suddenly get:

84.215.17.110 got mailuser 21024 [EMAIL PROTECTED]
84.215.17.110 got mailuser 21740 [EMAIL PROTECTED]


Trouble! One user got the session for two different users on two subsequent 
requests..

Any ide? This is really killing me.. :(

-- Edvin

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



IntegerConverter cannot parse or display locale specific format like 999,999

2008-04-07 Thread MYoung

[Sorry if this shows up twice. I emailed this in the morning but that didn't
show.]

I want a Label to display Integer as 999,999,999 but it's not happening.

The problem is in abstractIntegerConverter:

public NumberFormat getNumberFormat(Locale locale)
{
NumberFormat numberFormat = (NumberFormat)numberFormats.get(locale);
if (numberFormat == null)
{
numberFormat = NumberFormat.getIntegerInstance(locale);
numberFormat.setParseIntegerOnly(true);
numberFormat.setGroupingUsed(false); //
 !!! why set to false?
numberFormats.put(locale, numberFormat);
}
return (NumberFormat)numberFormat.clone();
}


Because setGroupingUsed(false), IntegerConverter cannot parse locale
formatted input like 999,999(raise conversion exception) or output in
locale specific format. DecimalConverter is not like this.

Is there some specific reason to call setGroupingUsed(false)?  Can we have
this remove?
-- 
View this message in context: 
http://www.nabble.com/IntegerConverter-cannot-parse-or-display-locale-specific-format-like-%22999%2C999%22-tp16540785p16540785.html
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: Invoulentary session sharing/leakage in Wicket 1.3.x

2008-04-07 Thread Edvin Syse

Igor Vaynberg wrote:

can you try with 1.3.1, 1.3.0. would help us isolate where the problem is...


I tried with 1.3.0 as well, still the same problem.

My authorization-strategy is quite involved.. I can't see any immediate 
problems, but I'm posting it here just in case:

getSecuritySettings().setAuthorizationStrategy(new 
IAuthorizationStrategy() {

public boolean isActionAuthorized(Component component, 
Action action) {
return true;
}

public boolean isInstantiationAuthorized(Class 
componentClass) {
TornadoSession s = (TornadoSession) 
Session.get();

if(MailuserBasePage.class.isAssignableFrom(componentClass)) {
if(s.getCurrentMailuser() == null) {
throw new 
RestartResponseAtInterceptPageException(MailLoginPage.class);
}
}
/* Instance pages needs instance */
if 
(BasePage.class.isAssignableFrom(componentClass)) {
if (s.getInstanceId() == null)
throw new 
RestartResponseAtInterceptPageException(NoInstancePage.class);

/* Instance has access to cms module */
CmsModule cmsAnnotation = (CmsModule) 
componentClass.getAnnotation(CmsModule.class);
if (cmsAnnotation != null) {
if 
(!webModuleDao.instanceHasModule(s.getInstanceId(), cmsAnnotation.id())) {
throw new 
RestartResponseAtInterceptPageException(NoModuleAccessPage.class);
}
}
}

/* New-instance wizard can only be calles from 
tornado */

if(NewInstanceBasePage.class.isAssignableFrom(componentClass)  !new 
Integer(1).equals(TornadoSession.get().getInstanceId()))
throw new 
RestartResponseAtInterceptPageException(NoModuleAccessPage.class);

/* Protected Control Panel pages */

if(CpBasePage.class.isAssignableFrom(componentClass)) {
if(s.getCurrentCustomer() == null)
throw new 
RestartResponseAtInterceptPageException(CpLoginPage.class);

}

if(PartnerBasePage.class.isAssignableFrom(componentClass)  (TornadoSession.get().getCurrentCustomer() == null || 
!TornadoSession.get().getCurrentCustomer().getCustomerType().getId().equals(Customer.CTYPE_PARTNER)))

throw new 
RestartResponseAtInterceptPageException(PartnerLoginPage.class);


/* CMS Admin */

if(AdminBasePage.class.isAssignableFrom(componentClass)) {
if(s.getCurrentUser() == null || 
!s.getCurrentUser().getInstance().getId().equals(s.getInstanceId()))
throw new 
RestartResponseAtInterceptPageException(AdminLogin.class);
}

/* Only instance 1 can bootstrap */

if(BootstrapModuleAdmin.class.isAssignableFrom(componentClass)  
!s.getInstanceId().equals(new Integer(1)))
throw new 
RestartResponseAtInterceptPageException(AdminHomePage.class);

return true;
}
});

}

-- Edvin

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



Re: java.io.StreamCorruptedException: invalid type code: 29

2008-04-07 Thread André Souza
Is this something new to 1.3? We have 3705 uses of TextField in our app so
far, and growing. We use CompoundPropertyModel out of the box.

Does that mean the TextField(String wickedId) constructor stopped working
with CompoundPropertyModel?


On 4/7/08, Matej Knopp [EMAIL PROTECTED] wrote:

 Is this a new error? Looks like your models are unable to provide
 target type. In that case you have to specify the property type in
 your textfields, either though the TextField constructor or call
 TextField.setType().

 This should not be required when you use (Component)PropertyModels
 only, but when you have custom models you have to call it unless your
 models implement IObjectClassAwareModel.

 -Matej

 On Mon, Apr 7, 2008 at 11:57 PM, André Souza [EMAIL PROTECTED]
 wrote:
  We are still having problems with the migration to 1.3.
 
   One fix we needed was not in the 1.3.3 release so we continued using
 
 
 http://wicketstuff.org/maven/repository/org/apache/wicket/wicket/1.3-SNAPSHOT/
 
   for now.
 
   We get this on the console, repeatedly:
 
 
   WARN  AbstractTextComponent () - Couldn't resolve model type of

   
  Model:classname=[org.apache.wicket.model.CompoundPropertyModel$AttachedCompoundPropertyModel]:nestedModel=[Model:classname=[org.apache.wicket.model.CompoundPropertyModel]:nestedModel=[...],
 
  please set the type yourself.
 
   After we get this message a number of variables we have in are set to
 null.
 
   What is the common cause of this message?
 
 
 
 
 
 
   On 4/7/08, Johan Compagner [EMAIL PROTECTED] wrote:
   
what do you mean?
that fix is no in the 1.3.3 release but will be in 1.3.4
   
   
On Mon, Apr 7, 2008 at 9:42 PM, Matej Knopp [EMAIL PROTECTED]
 wrote:
   
 Actually, it seems that I'm wrong about this...

 -Matej

 On Mon, Apr 7, 2008 at 9:26 PM, Matej Knopp [EMAIL PROTECTED]
wrote:
  Wicket 1.3.3 was released before april 06. The overflow fix is
 not
   part of the release.
 
   -Matej
 
 
 
   On Mon, Apr 7, 2008 at 9:13 PM, Daniel Wu [EMAIL PROTECTED]
wrote:
I've updated to the released Wicket 1.3.3, but I'm having the
 stackoverflow
 there, but it wasn't happening on the snapshot of april 06.
 Was
this
 fix
 incorporated on the official Wicket 1.3.3 release?
   
 On Sun, Apr 6, 2008 at 6:10 PM, Johan Compagner 
 [EMAIL PROTECTED]
 wrote:
   
   
   
  Dont know if the stream corrupt has the same root problem
 as the
  stackoverflow
  But that is just fixed.
 
  johan
 
 
  On Sat, Mar 29, 2008 at 11:22 PM, Daniel Wu 
[EMAIL PROTECTED]
 wrote:
 
  
   I've updated my wicket application to Wicket 1.3.2, but
 now,
 when I try
  to
   switch between my application tabs (my tabs extend
  
 org.apache.wicket.extensions.markup.html.tabs.AbstractTab) I'm
 getting
   this
   error:
  
   ERROR RequestCycle () - Could not deserialize object
 using
  
  
 

   
 `org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory`
   object factory
   java.lang.RuntimeException: Could not deserialize object
 using
  
  
 

   
 `org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory`
   object factory
  at
  

 org.apache.wicket.util.lang.Objects.byteArrayToObject(Objects.java:411)
  at
  
  
 

   
 org.apache.wicket.protocol.http.pagestore.AbstractPageStore.deserializePage(AbstractPageStore.java:228)
  at
  
  
 

   
 org.apache.wicket.protocol.http.pagestore.DiskPageStore.getPage(DiskPageStore.java:706)
  at
  
  
 

   
 org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLevelCachePageMap.get(SecondLevelCacheSessionStore.java:311)
  at
 org.apache.wicket.Session.getPage(Session.java:751)
   ...
   Caused by: java.io.StreamCorruptedException: invalid type
code:
 29
  at java.io.ObjectInputStream.readObject0(Unknown
Source)
  at
 java.io.ObjectInputStream.defaultReadFields(Unknown
 Source)
  at
 java.io.ObjectInputStream.readSerialData(Unknown
 Source)
  at
 java.io.ObjectInputStream.readOrdinaryObject(Unknown
 Source)
  at java.io.ObjectInputStream.readObject0(Unknown
Source)
  at java.io.ObjectInputStream.readObject(Unknown
 Source)
  at
  

 org.apache.wicket.util.lang.Objects.byteArrayToObject(Objects.java:393)
  
   I've already downloaded and used the latest wicket 1.3
snapshot,
 which
  

Re: AjaxSubmitLink accessing model object non-existent property

2008-04-07 Thread Tim
Thanks Igor but should it not pick-up the model from the Form?  There's no
constructor that takes a model.  Should the AjaxSubmitLink(id, form)
constructor be used with the Form that it's being added to?  e..g

MyForm extends Form {
public MyForm(){

add( new AjaxSubmitLink(mylink,this){

});
}}

If it's already bound to a Form, should it not pick-up the model used by
the form?

Am I looking at the problem/solution the wrong way???

Thanks again,
Tim

 you forgot to give ajaxsubmitlink a model, so getmodelobject() will
 either return null or a compound model.confirm - neither of which i
 think you want.

 -igor


 On Mon, Apr 7, 2008 at 1:00 PM, Tim Squires [EMAIL PROTECTED] wrote:
 Hi,

  When adding an AjaxSubmitLink, the onSubmit method tries to access a
  property of the model object that does not exists:

  ---
 final AjaxSubmitLink confirmLink = new
  AjaxSubmitLink(confirm) {
 @Override
 public void onSubmit(final AjaxRequestTarget target,
 final Form form) {
 if (((Will) getModelObject()).getExecutor() != null)
 {
 willModalWindow.show(target);
 } else {
 warn(Please choose an executor.);
 target.addComponent(feedback);
 }
 }

 @Override
 public void onError(final AjaxRequestTarget target,
 final Form form) {
 target.addComponent(feedback);
 }
 };

 add(confirmLink);
  ---

  It tries to access the confirm property of the Model, in this case a
  Will object.

  ---
  org.apache.wicket.WicketRuntimeException: No get method defined for
 class:
  class crystalmark.willfinder.model.Will expression: confirm
  at
  
 org.apache.wicket.util.lang.PropertyResolver.getGetAndSetter(PropertyResolver.java:433)
  at
  
 org.apache.wicket.util.lang.PropertyResolver.getObjectAndGetSetter(PropertyResolver.java:275)
  at
  
 org.apache.wicket.util.lang.PropertyResolver.getValue(PropertyResolver.java:84)
  at
  
 org.apache.wicket.model.AbstractPropertyModel.getObject(AbstractPropertyModel.java:113)
  at org.apache.wicket.Component.getModelObject(Component.java:1551)
  at
  
 crystalmark.willfinder.page.components.EditWillPanel$EditWillForm$5.onSubmit(EditWillPanel.java:183)
  at
  
 org.apache.wicket.ajax.markup.html.form.AjaxSubmitLink$1.onSubmit(AjaxSubmitLink.java:94)
  at
  
 org.apache.wicket.ajax.form.AjaxFormSubmitBehavior.onEvent(AjaxFormSubmitBehavior.java:128)
  ---

  It's only when using the getModelObject method.  If I get the Will
 object
  from else-where it works fine.

  Is this a problem with the way I'm using the model or a bug with
  AjaxSubmitLink?  Should I add it to jira?

  Wicket 1.3.3 + JDK 1.6 + Tomcat 6

  Thanks,
  Tim
  ---
  http://www.tnwdb.com - Wicket Wills!


  -
  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: AjaxSubmitLink accessing model object non-existent property

2008-04-07 Thread Igor Vaynberg
no, components do not randomly pick up models from their parents. i
would suggest reading the models wiki page.

-igor


On Mon, Apr 7, 2008 at 3:11 PM, Tim [EMAIL PROTECTED] wrote:
 Thanks Igor but should it not pick-up the model from the Form?  There's no
  constructor that takes a model.  Should the AjaxSubmitLink(id, form)
  constructor be used with the Form that it's being added to?  e..g

  MyForm extends Form {
  public MyForm(){
  
  add( new AjaxSubmitLink(mylink,this){
  
  });
  }}

  If it's already bound to a Form, should it not pick-up the model used by
  the form?

  Am I looking at the problem/solution the wrong way???

  Thanks again,
  Tim



   you forgot to give ajaxsubmitlink a model, so getmodelobject() will
   either return null or a compound model.confirm - neither of which i
   think you want.
  
   -igor
  
  
   On Mon, Apr 7, 2008 at 1:00 PM, Tim Squires [EMAIL PROTECTED] wrote:
   Hi,
  
When adding an AjaxSubmitLink, the onSubmit method tries to access a
property of the model object that does not exists:
  
---
   final AjaxSubmitLink confirmLink = new
AjaxSubmitLink(confirm) {
   @Override
   public void onSubmit(final AjaxRequestTarget target,
   final Form form) {
   if (((Will) getModelObject()).getExecutor() != null)
   {
   willModalWindow.show(target);
   } else {
   warn(Please choose an executor.);
   target.addComponent(feedback);
   }
   }
  
   @Override
   public void onError(final AjaxRequestTarget target,
   final Form form) {
   target.addComponent(feedback);
   }
   };
  
   add(confirmLink);
---
  
It tries to access the confirm property of the Model, in this case a
Will object.
  
---
org.apache.wicket.WicketRuntimeException: No get method defined for
   class:
class crystalmark.willfinder.model.Will expression: confirm
at

 org.apache.wicket.util.lang.PropertyResolver.getGetAndSetter(PropertyResolver.java:433)
at

 org.apache.wicket.util.lang.PropertyResolver.getObjectAndGetSetter(PropertyResolver.java:275)
at

 org.apache.wicket.util.lang.PropertyResolver.getValue(PropertyResolver.java:84)
at

 org.apache.wicket.model.AbstractPropertyModel.getObject(AbstractPropertyModel.java:113)
at org.apache.wicket.Component.getModelObject(Component.java:1551)
at

 crystalmark.willfinder.page.components.EditWillPanel$EditWillForm$5.onSubmit(EditWillPanel.java:183)
at

 org.apache.wicket.ajax.markup.html.form.AjaxSubmitLink$1.onSubmit(AjaxSubmitLink.java:94)
at

 org.apache.wicket.ajax.form.AjaxFormSubmitBehavior.onEvent(AjaxFormSubmitBehavior.java:128)
---
  
It's only when using the getModelObject method.  If I get the Will
   object
from else-where it works fine.
  
Is this a problem with the way I'm using the model or a bug with
AjaxSubmitLink?  Should I add it to jira?
  
Wicket 1.3.3 + JDK 1.6 + Tomcat 6
  
Thanks,
Tim
---
http://www.tnwdb.com - Wicket Wills!
  
  
-
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: java.io.StreamCorruptedException: invalid type code: 29

2008-04-07 Thread Wolfgang Gehner
We use CompoundPropertyModel(HashMap map) where the map has wicket-ids
for map keys and the model value as map value.

How do we bring that to ComponentPropertyModel? It doesn't have an
Object constructor.

Wolfgang

On Mon, Apr 7, 2008 at 3:14 PM, Matej Knopp [EMAIL PROTECTED] wrote:
 No, if you use new ComponentPropertyModel it should still work.

  -Matej

  On Tue, Apr 8, 2008 at 12:11 AM, André Souza [EMAIL PROTECTED] wrote:
   Is this something new to 1.3? We have 3705 uses of TextField in our app so
far, and growing. We use CompoundPropertyModel out of the box.
  
Does that mean the TextField(String wickedId) constructor stopped working
with CompoundPropertyModel?
  
  
  
  
On 4/7/08, Matej Knopp [EMAIL PROTECTED] wrote:

 Is this a new error? Looks like your models are unable to provide
 target type. In that case you have to specify the property type in
 your textfields, either though the TextField constructor or call
 TextField.setType().

 This should not be required when you use (Component)PropertyModels
 only, but when you have custom models you have to call it unless your
 models implement IObjectClassAwareModel.

 -Matej

 On Mon, Apr 7, 2008 at 11:57 PM, André Souza [EMAIL PROTECTED]
 wrote:
  We are still having problems with the migration to 1.3.
 
   One fix we needed was not in the 1.3.3 release so we continued using
 
 
 
 http://wicketstuff.org/maven/repository/org/apache/wicket/wicket/1.3-SNAPSHOT/
 
   for now.
 
   We get this on the console, repeatedly:
 
 
   WARN  AbstractTextComponent () - Couldn't resolve model type of

   
 Model:classname=[org.apache.wicket.model.CompoundPropertyModel$AttachedCompoundPropertyModel]:nestedModel=[Model:classname=[org.apache.wicket.model.CompoundPropertyModel]:nestedModel=[...],
 
  please set the type yourself.
 
   After we get this message a number of variables we have in are set to
 null.
 
   What is the common cause of this message?
 
 
 
 
 
 
   On 4/7/08, Johan Compagner [EMAIL PROTECTED] wrote:
   
what do you mean?
that fix is no in the 1.3.3 release but will be in 1.3.4
   
   
On Mon, Apr 7, 2008 at 9:42 PM, Matej Knopp [EMAIL PROTECTED]
 wrote:
   
 Actually, it seems that I'm wrong about this...

 -Matej

 On Mon, Apr 7, 2008 at 9:26 PM, Matej Knopp [EMAIL PROTECTED]
wrote:
  Wicket 1.3.3 was released before april 06. The overflow fix is
 not
   part of the release.
 
   -Matej
 
 
 
   On Mon, Apr 7, 2008 at 9:13 PM, Daniel Wu [EMAIL PROTECTED]
wrote:
I've updated to the released Wicket 1.3.3, but I'm having 
 the
 stackoverflow
 there, but it wasn't happening on the snapshot of april 06.
 Was
this
 fix
 incorporated on the official Wicket 1.3.3 release?
   
 On Sun, Apr 6, 2008 at 6:10 PM, Johan Compagner 
 [EMAIL PROTECTED]
 wrote:
   
   
   
  Dont know if the stream corrupt has the same root problem
 as the
  stackoverflow
  But that is just fixed.
 
  johan
 
 
  On Sat, Mar 29, 2008 at 11:22 PM, Daniel Wu 
[EMAIL PROTECTED]
 wrote:
 
  
   I've updated my wicket application to Wicket 1.3.2, but
 now,
 when I try
  to
   switch between my application tabs (my tabs extend
  
 org.apache.wicket.extensions.markup.html.tabs.AbstractTab) I'm
 getting
   this
   error:
  
   ERROR RequestCycle () - Could not deserialize object
 using
  
  
 

   
 
 `org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory`
   object factory
   java.lang.RuntimeException: Could not deserialize 
 object
 using
  
  
 

   
 
 `org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory`
   object factory
  at
  

 org.apache.wicket.util.lang.Objects.byteArrayToObject(Objects.java:411)
  at
  
  
 

   
 
 org.apache.wicket.protocol.http.pagestore.AbstractPageStore.deserializePage(AbstractPageStore.java:228)
  at
  
  
 

   
 
 org.apache.wicket.protocol.http.pagestore.DiskPageStore.getPage(DiskPageStore.java:706)
  at
  
  

Re: java.io.StreamCorruptedException: invalid type code: 29

2008-04-07 Thread Johan Compagner
still what really goes into that CPM?
another model? with what kind of object?
Does some properties go over lists or maps or object graphs with null
references in them?

On Tue, Apr 8, 2008 at 12:11 AM, André Souza [EMAIL PROTECTED] wrote:

 Is this something new to 1.3? We have 3705 uses of TextField in our app so
 far, and growing. We use CompoundPropertyModel out of the box.

 Does that mean the TextField(String wickedId) constructor stopped working
 with CompoundPropertyModel?


 On 4/7/08, Matej Knopp [EMAIL PROTECTED] wrote:
 
  Is this a new error? Looks like your models are unable to provide
  target type. In that case you have to specify the property type in
  your textfields, either though the TextField constructor or call
  TextField.setType().
 
  This should not be required when you use (Component)PropertyModels
  only, but when you have custom models you have to call it unless your
  models implement IObjectClassAwareModel.
 
  -Matej
 
  On Mon, Apr 7, 2008 at 11:57 PM, André Souza [EMAIL PROTECTED]
  wrote:
   We are still having problems with the migration to 1.3.
  
One fix we needed was not in the 1.3.3 release so we continued using
  
  
 
 http://wicketstuff.org/maven/repository/org/apache/wicket/wicket/1.3-SNAPSHOT/
  
for now.
  
We get this on the console, repeatedly:
  
  
WARN  AbstractTextComponent () - Couldn't resolve model type of
 
  
  
 Model:classname=[org.apache.wicket.model.CompoundPropertyModel$AttachedCompoundPropertyModel]:nestedModel=[Model:classname=[org.apache.wicket.model.CompoundPropertyModel]:nestedModel=[...],
  
   please set the type yourself.
  
After we get this message a number of variables we have in are set to
  null.
  
What is the common cause of this message?
  
  
  
  
  
  
On 4/7/08, Johan Compagner [EMAIL PROTECTED] wrote:

 what do you mean?
 that fix is no in the 1.3.3 release but will be in 1.3.4


 On Mon, Apr 7, 2008 at 9:42 PM, Matej Knopp [EMAIL PROTECTED]
  wrote:

  Actually, it seems that I'm wrong about this...
 
  -Matej
 
  On Mon, Apr 7, 2008 at 9:26 PM, Matej Knopp 
 [EMAIL PROTECTED]
 wrote:
   Wicket 1.3.3 was released before april 06. The overflow fix is
  not
part of the release.
  
-Matej
  
  
  
On Mon, Apr 7, 2008 at 9:13 PM, Daniel Wu 
 [EMAIL PROTECTED]
 wrote:
 I've updated to the released Wicket 1.3.3, but I'm having
 the
  stackoverflow
  there, but it wasn't happening on the snapshot of april 06.
  Was
 this
  fix
  incorporated on the official Wicket 1.3.3 release?

  On Sun, Apr 6, 2008 at 6:10 PM, Johan Compagner 
  [EMAIL PROTECTED]
  wrote:



   Dont know if the stream corrupt has the same root problem
  as the
   stackoverflow
   But that is just fixed.
  
   johan
  
  
   On Sat, Mar 29, 2008 at 11:22 PM, Daniel Wu 
 [EMAIL PROTECTED]
  wrote:
  
   
I've updated my wicket application to Wicket 1.3.2, but
  now,
  when I try
   to
switch between my application tabs (my tabs extend
   
  org.apache.wicket.extensions.markup.html.tabs.AbstractTab) I'm
  getting
this
error:
   
ERROR RequestCycle () - Could not deserialize object
  using
   
   
  
 

 
 `org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory`
object factory
java.lang.RuntimeException: Could not deserialize
 object
  using
   
   
  
 

 
 `org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory`
object factory
   at
   
 
  org.apache.wicket.util.lang.Objects.byteArrayToObject(Objects.java:411)
   at
   
   
  
 

 
 org.apache.wicket.protocol.http.pagestore.AbstractPageStore.deserializePage(AbstractPageStore.java:228)
   at
   
   
  
 

 
 org.apache.wicket.protocol.http.pagestore.DiskPageStore.getPage(DiskPageStore.java:706)
   at
   
   
  
 

 
 org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLevelCachePageMap.get(SecondLevelCacheSessionStore.java:311)
   at
  org.apache.wicket.Session.getPage(Session.java:751)
...
Caused by: java.io.StreamCorruptedException: invalid
 type
 code:
  29
   at java.io.ObjectInputStream.readObject0(Unknown
 Source)
   at
  java.io.ObjectInputStream.defaultReadFields(Unknown
  Source)
   at
  java.io.ObjectInputStream.readSerialData(Unknown
  Source)
   at
  

Re: java.io.StreamCorruptedException: invalid type code: 29

2008-04-07 Thread Johan Compagner
i thought so
if you are using maps then wicket cant really resolve what is the type that
easy
then if it are all strings anyway you can ignore that log warning

But if you have other types in the map you really should type your
textfields yourself.

On Tue, Apr 8, 2008 at 12:21 AM, Wolfgang Gehner [EMAIL PROTECTED] wrote:

 We use CompoundPropertyModel(HashMap map) where the map has wicket-ids
 for map keys and the model value as map value.

 How do we bring that to ComponentPropertyModel? It doesn't have an
 Object constructor.

 Wolfgang

 On Mon, Apr 7, 2008 at 3:14 PM, Matej Knopp [EMAIL PROTECTED] wrote:
  No, if you use new ComponentPropertyModel it should still work.
 
   -Matej
 
   On Tue, Apr 8, 2008 at 12:11 AM, André Souza [EMAIL PROTECTED]
 wrote:
Is this something new to 1.3? We have 3705 uses of TextField in our
 app so
 far, and growing. We use CompoundPropertyModel out of the box.
   
 Does that mean the TextField(String wickedId) constructor stopped
 working
 with CompoundPropertyModel?
   
   
   
   
 On 4/7/08, Matej Knopp [EMAIL PROTECTED] wrote:
 
  Is this a new error? Looks like your models are unable to provide
  target type. In that case you have to specify the property type in
  your textfields, either though the TextField constructor or call
  TextField.setType().
 
  This should not be required when you use (Component)PropertyModels
  only, but when you have custom models you have to call it unless
 your
  models implement IObjectClassAwareModel.
 
  -Matej
 
  On Mon, Apr 7, 2008 at 11:57 PM, André Souza 
 [EMAIL PROTECTED]
  wrote:
   We are still having problems with the migration to 1.3.
  
One fix we needed was not in the 1.3.3 release so we continued
 using
  
  
 
 http://wicketstuff.org/maven/repository/org/apache/wicket/wicket/1.3-SNAPSHOT/
  
for now.
  
We get this on the console, repeatedly:
  
  
WARN  AbstractTextComponent () - Couldn't resolve model type of
 
  
  
 Model:classname=[org.apache.wicket.model.CompoundPropertyModel$AttachedCompoundPropertyModel]:nestedModel=[Model:classname=[org.apache.wicket.model.CompoundPropertyModel]:nestedModel=[...],
  
   please set the type yourself.
  
After we get this message a number of variables we have in are
 set to
  null.
  
What is the common cause of this message?
  
  
  
  
  
  
On 4/7/08, Johan Compagner [EMAIL PROTECTED] wrote:

 what do you mean?
 that fix is no in the 1.3.3 release but will be in 1.3.4


 On Mon, Apr 7, 2008 at 9:42 PM, Matej Knopp 
 [EMAIL PROTECTED]
  wrote:

  Actually, it seems that I'm wrong about this...
 
  -Matej
 
  On Mon, Apr 7, 2008 at 9:26 PM, Matej Knopp 
 [EMAIL PROTECTED]
 wrote:
   Wicket 1.3.3 was released before april 06. The overflow
 fix is
  not
part of the release.
  
-Matej
  
  
  
On Mon, Apr 7, 2008 at 9:13 PM, Daniel Wu 
 [EMAIL PROTECTED]
 wrote:
 I've updated to the released Wicket 1.3.3, but I'm
 having the
  stackoverflow
  there, but it wasn't happening on the snapshot of
 april 06.
  Was
 this
  fix
  incorporated on the official Wicket 1.3.3 release?

  On Sun, Apr 6, 2008 at 6:10 PM, Johan Compagner 
  [EMAIL PROTECTED]
  wrote:



   Dont know if the stream corrupt has the same root
 problem
  as the
   stackoverflow
   But that is just fixed.
  
   johan
  
  
   On Sat, Mar 29, 2008 at 11:22 PM, Daniel Wu 
 [EMAIL PROTECTED]
  wrote:
  
   
I've updated my wicket application to Wicket
 1.3.2, but
  now,
  when I try
   to
switch between my application tabs (my tabs
 extend
   
  org.apache.wicket.extensions.markup.html.tabs.AbstractTab) I'm
  getting
this
error:
   
ERROR RequestCycle () - Could not deserialize
 object
  using
   
   
  
 

 
 `org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory`
object factory
java.lang.RuntimeException: Could not deserialize
 object
  using
   
   
  
 

 
 `org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory`
object factory
   at
   
 
 
 

Re: Invoulentary session sharing/leakage in Wicket 1.3.x

2008-04-07 Thread Johan Compagner
can you also log the http session id and the hash/id of the WicketSession?

On Mon, Apr 7, 2008 at 11:22 PM, Edvin Syse [EMAIL PROTECTED] wrote:

 Igor Vaynberg wrote:

  can you try with 1.3.1, 1.3.0. would help us isolate where the problem
  is...
 
  seems kind of strange that you are the only one seeing this though...
 

 I've turned on some logging in MySession:

 public MailUser getCurrentMailuser() {
try {

  
 System.out.println(((WebRequest)RequestCycle.get().getRequest()).getHttpServletRequest().getRemoteAddr()
 +  got mailuser  + currentMailuser.getId() +   +
 currentMailuser.getUsername());
} catch (Exception ignored) {}
return currentMailuser;
 }

 This gives me output like:

 85.165.86.192 got mailuser 19712 [EMAIL PROTECTED]
 77.208.58.135 got mailuser 22817 [EMAIL PROTECTED]

 these are fine, but then I suddenly get:

 84.215.17.110 got mailuser 21024 [EMAIL PROTECTED]
 84.215.17.110 got mailuser 21740 [EMAIL PROTECTED]


 Trouble! One user got the session for two different users on two
 subsequent requests..

 Any ide? This is really killing me.. :(

 -- Edvin


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




Re: Invoulentary session sharing/leakage in Wicket 1.3.x

2008-04-07 Thread Johan Compagner
is it by the way that easy to reproduce for you?
you seem to have it pretty quickly when we ask for you if you could test
some other version

if that is the case isnt it somehow reproducible in a smaller test case?

On Mon, Apr 7, 2008 at 11:25 PM, Edvin Syse [EMAIL PROTECTED] wrote:

 Igor Vaynberg wrote:

  can you try with 1.3.1, 1.3.0. would help us isolate where the problem
  is...
 

 I tried with 1.3.0 as well, still the same problem.

 My authorization-strategy is quite involved.. I can't see any immediate
 problems, but I'm posting it here just in case:

getSecuritySettings().setAuthorizationStrategy(new
 IAuthorizationStrategy() {

public boolean isActionAuthorized(Component
 component, Action action) {
return true;
}

public boolean isInstantiationAuthorized(Class
 componentClass) {
TornadoSession s = (TornadoSession)
 Session.get();

if(MailuserBasePage.class.isAssignableFrom(componentClass))
 {
if(s.getCurrentMailuser() == null) {
throw new
 RestartResponseAtInterceptPageException(MailLoginPage.class);
}
}
/* Instance pages needs instance */
if
 (BasePage.class.isAssignableFrom(componentClass)) {
if (s.getInstanceId() == null)
throw new
 RestartResponseAtInterceptPageException(NoInstancePage.class);

/* Instance has access to cms
 module */
CmsModule cmsAnnotation =
 (CmsModule) componentClass.getAnnotation(CmsModule.class);
if (cmsAnnotation != null) {
if
 (!webModuleDao.instanceHasModule(s.getInstanceId(), cmsAnnotation.id())) {
throw new
 RestartResponseAtInterceptPageException(NoModuleAccessPage.class);
}
}
}

/* New-instance wizard can only be calles
 from tornado */

  if(NewInstanceBasePage.class.isAssignableFrom(componentClass)  !new
 Integer(1).equals(TornadoSession.get().getInstanceId()))
throw new
 RestartResponseAtInterceptPageException(NoModuleAccessPage.class);

/* Protected Control Panel pages */

  if(CpBasePage.class.isAssignableFrom(componentClass)) {
if(s.getCurrentCustomer() == null)
throw new
 RestartResponseAtInterceptPageException(CpLoginPage.class);

}


  if(PartnerBasePage.class.isAssignableFrom(componentClass) 
 (TornadoSession.get().getCurrentCustomer() == null ||
 !TornadoSession.get().getCurrentCustomer().getCustomerType().getId().equals(Customer.CTYPE_PARTNER)))
throw new
 RestartResponseAtInterceptPageException(PartnerLoginPage.class);


/* CMS Admin */

  if(AdminBasePage.class.isAssignableFrom(componentClass)) {
if(s.getCurrentUser() == null ||
 !s.getCurrentUser().getInstance().getId().equals(s.getInstanceId()))
throw new
 RestartResponseAtInterceptPageException(AdminLogin.class);
}

/* Only instance 1 can bootstrap */

  if(BootstrapModuleAdmin.class.isAssignableFrom(componentClass) 
 !s.getInstanceId().equals(new Integer(1)))
throw new
 RestartResponseAtInterceptPageException(AdminHomePage.class);

return true;
}
});

}

 -- Edvin


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




Re: java.io.StreamCorruptedException: invalid type code: 29

2008-04-07 Thread Wolfgang Gehner
Is that for text fields only, or other components as well? We have a
class RTextField that extends TextField so we override the default
constructor RTextField(String id) to do super(id, String.class)

On Mon, Apr 7, 2008 at 3:26 PM, Wolfgang Gehner [EMAIL PROTECTED] wrote:
 Everything that needs state. And yes, that could be lists of data,
  serializable objects with hashmaps. How do you define a null
  reference?



  On Mon, Apr 7, 2008 at 3:22 PM, Johan Compagner [EMAIL PROTECTED] wrote:
   still what really goes into that CPM?
another model? with what kind of object?
Does some properties go over lists or maps or object graphs with null
references in them?
  
  
  
On Tue, Apr 8, 2008 at 12:11 AM, André Souza [EMAIL PROTECTED] wrote:
  
 Is this something new to 1.3? We have 3705 uses of TextField in our app 
 so
 far, and growing. We use CompoundPropertyModel out of the box.

 Does that mean the TextField(String wickedId) constructor stopped 
 working
 with CompoundPropertyModel?


 On 4/7/08, Matej Knopp [EMAIL PROTECTED] wrote:
 
  Is this a new error? Looks like your models are unable to provide
  target type. In that case you have to specify the property type in
  your textfields, either though the TextField constructor or call
  TextField.setType().
 
  This should not be required when you use (Component)PropertyModels
  only, but when you have custom models you have to call it unless your
  models implement IObjectClassAwareModel.
 
  -Matej
 
  On Mon, Apr 7, 2008 at 11:57 PM, André Souza [EMAIL PROTECTED]
  wrote:
   We are still having problems with the migration to 1.3.
  
One fix we needed was not in the 1.3.3 release so we continued 
 using
  
  
 
 
 http://wicketstuff.org/maven/repository/org/apache/wicket/wicket/1.3-SNAPSHOT/
  
for now.
  
We get this on the console, repeatedly:
  
  
WARN  AbstractTextComponent () - Couldn't resolve model type of
 
  
  
 Model:classname=[org.apache.wicket.model.CompoundPropertyModel$AttachedCompoundPropertyModel]:nestedModel=[Model:classname=[org.apache.wicket.model.CompoundPropertyModel]:nestedModel=[...],
  
   please set the type yourself.
  
After we get this message a number of variables we have in are set 
 to
  null.
  
What is the common cause of this message?
  
  
  
  
  
  
On 4/7/08, Johan Compagner [EMAIL PROTECTED] wrote:

 what do you mean?
 that fix is no in the 1.3.3 release but will be in 1.3.4


 On Mon, Apr 7, 2008 at 9:42 PM, Matej Knopp [EMAIL PROTECTED]
  wrote:

  Actually, it seems that I'm wrong about this...
 
  -Matej
 
  On Mon, Apr 7, 2008 at 9:26 PM, Matej Knopp 
 [EMAIL PROTECTED]
 wrote:
   Wicket 1.3.3 was released before april 06. The overflow fix 
 is
  not
part of the release.
  
-Matej
  
  
  
On Mon, Apr 7, 2008 at 9:13 PM, Daniel Wu 
 [EMAIL PROTECTED]
 wrote:
 I've updated to the released Wicket 1.3.3, but I'm having
 the
  stackoverflow
  there, but it wasn't happening on the snapshot of april 
 06.
  Was
 this
  fix
  incorporated on the official Wicket 1.3.3 release?

  On Sun, Apr 6, 2008 at 6:10 PM, Johan Compagner 
  [EMAIL PROTECTED]
  wrote:



   Dont know if the stream corrupt has the same root 
 problem
  as the
   stackoverflow
   But that is just fixed.
  
   johan
  
  
   On Sat, Mar 29, 2008 at 11:22 PM, Daniel Wu 
 [EMAIL PROTECTED]
  wrote:
  
   
I've updated my wicket application to Wicket 1.3.2, 
 but
  now,
  when I try
   to
switch between my application tabs (my tabs extend
   
  org.apache.wicket.extensions.markup.html.tabs.AbstractTab) I'm
  getting
this
error:
   
ERROR RequestCycle () - Could not deserialize object
  using
   
   
  
 

 
 
 `org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory`
object factory
java.lang.RuntimeException: Could not deserialize
 object
  using
   
   
  
 

 
 
 `org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory`
object factory
   at
 

Re: java.io.StreamCorruptedException: invalid type code: 29

2008-04-07 Thread Johan Compagner
person.address.city

and when you render it that person doesn't have an adress just yet.
but i think we can even resolve it then by going over the classes

On Tue, Apr 8, 2008 at 12:26 AM, Wolfgang Gehner [EMAIL PROTECTED] wrote:

 Everything that needs state. And yes, that could be lists of data,
 serializable objects with hashmaps. How do you define a null
 reference?

 On Mon, Apr 7, 2008 at 3:22 PM, Johan Compagner [EMAIL PROTECTED]
 wrote:
  still what really goes into that CPM?
   another model? with what kind of object?
   Does some properties go over lists or maps or object graphs with null
   references in them?
 
 
 
   On Tue, Apr 8, 2008 at 12:11 AM, André Souza [EMAIL PROTECTED]
 wrote:
 
Is this something new to 1.3? We have 3705 uses of TextField in our
 app so
far, and growing. We use CompoundPropertyModel out of the box.
   
Does that mean the TextField(String wickedId) constructor stopped
 working
with CompoundPropertyModel?
   
   
On 4/7/08, Matej Knopp [EMAIL PROTECTED] wrote:

 Is this a new error? Looks like your models are unable to provide
 target type. In that case you have to specify the property type in
 your textfields, either though the TextField constructor or call
 TextField.setType().

 This should not be required when you use (Component)PropertyModels
 only, but when you have custom models you have to call it unless
 your
 models implement IObjectClassAwareModel.

 -Matej

 On Mon, Apr 7, 2008 at 11:57 PM, André Souza 
 [EMAIL PROTECTED]
 wrote:
  We are still having problems with the migration to 1.3.
 
   One fix we needed was not in the 1.3.3 release so we continued
 using
 
 

   
 http://wicketstuff.org/maven/repository/org/apache/wicket/wicket/1.3-SNAPSHOT/
 
   for now.
 
   We get this on the console, repeatedly:
 
 
   WARN  AbstractTextComponent () - Couldn't resolve model type of

 
   
  
 Model:classname=[org.apache.wicket.model.CompoundPropertyModel$AttachedCompoundPropertyModel]:nestedModel=[Model:classname=[org.apache.wicket.model.CompoundPropertyModel]:nestedModel=[...],
 
  please set the type yourself.
 
   After we get this message a number of variables we have in are
 set to
 null.
 
   What is the common cause of this message?
 
 
 
 
 
 
   On 4/7/08, Johan Compagner [EMAIL PROTECTED] wrote:
   
what do you mean?
that fix is no in the 1.3.3 release but will be in 1.3.4
   
   
On Mon, Apr 7, 2008 at 9:42 PM, Matej Knopp 
 [EMAIL PROTECTED]
 wrote:
   
 Actually, it seems that I'm wrong about this...

 -Matej

 On Mon, Apr 7, 2008 at 9:26 PM, Matej Knopp 
[EMAIL PROTECTED]
wrote:
  Wicket 1.3.3 was released before april 06. The overflow
 fix is
 not
   part of the release.
 
   -Matej
 
 
 
   On Mon, Apr 7, 2008 at 9:13 PM, Daniel Wu 
[EMAIL PROTECTED]
wrote:
I've updated to the released Wicket 1.3.3, but I'm
 having
the
 stackoverflow
 there, but it wasn't happening on the snapshot of
 april 06.
 Was
this
 fix
 incorporated on the official Wicket 1.3.3 release?
   
 On Sun, Apr 6, 2008 at 6:10 PM, Johan Compagner 
 [EMAIL PROTECTED]
 wrote:
   
   
   
  Dont know if the stream corrupt has the same root
 problem
 as the
  stackoverflow
  But that is just fixed.
 
  johan
 
 
  On Sat, Mar 29, 2008 at 11:22 PM, Daniel Wu 
[EMAIL PROTECTED]
 wrote:
 
  
   I've updated my wicket application to Wicket
 1.3.2, but
 now,
 when I try
  to
   switch between my application tabs (my tabs extend
  
 org.apache.wicket.extensions.markup.html.tabs.AbstractTab) I'm
 getting
   this
   error:
  
   ERROR RequestCycle () - Could not deserialize
 object
 using
  
  
 

   

   
 `org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory`
   object factory
   java.lang.RuntimeException: Could not deserialize
object
 using
  
  
 

   

   
 `org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory`
   object factory
  at
  


 org.apache.wicket.util.lang.Objects.byteArrayToObject(Objects.java:411)
  at
  
  
 

   

   
 

Re: java.io.StreamCorruptedException: invalid type code: 29

2008-04-07 Thread Wolfgang Gehner
Everything that needs state. And yes, that could be lists of data,
serializable objects with hashmaps. How do you define a null
reference?

On Mon, Apr 7, 2008 at 3:22 PM, Johan Compagner [EMAIL PROTECTED] wrote:
 still what really goes into that CPM?
  another model? with what kind of object?
  Does some properties go over lists or maps or object graphs with null
  references in them?



  On Tue, Apr 8, 2008 at 12:11 AM, André Souza [EMAIL PROTECTED] wrote:

   Is this something new to 1.3? We have 3705 uses of TextField in our app so
   far, and growing. We use CompoundPropertyModel out of the box.
  
   Does that mean the TextField(String wickedId) constructor stopped working
   with CompoundPropertyModel?
  
  
   On 4/7/08, Matej Knopp [EMAIL PROTECTED] wrote:
   
Is this a new error? Looks like your models are unable to provide
target type. In that case you have to specify the property type in
your textfields, either though the TextField constructor or call
TextField.setType().
   
This should not be required when you use (Component)PropertyModels
only, but when you have custom models you have to call it unless your
models implement IObjectClassAwareModel.
   
-Matej
   
On Mon, Apr 7, 2008 at 11:57 PM, André Souza [EMAIL PROTECTED]
wrote:
 We are still having problems with the migration to 1.3.

  One fix we needed was not in the 1.3.3 release so we continued using


   
   
 http://wicketstuff.org/maven/repository/org/apache/wicket/wicket/1.3-SNAPSHOT/

  for now.

  We get this on the console, repeatedly:


  WARN  AbstractTextComponent () - Couldn't resolve model type of
   


 Model:classname=[org.apache.wicket.model.CompoundPropertyModel$AttachedCompoundPropertyModel]:nestedModel=[Model:classname=[org.apache.wicket.model.CompoundPropertyModel]:nestedModel=[...],

 please set the type yourself.

  After we get this message a number of variables we have in are set to
null.

  What is the common cause of this message?






  On 4/7/08, Johan Compagner [EMAIL PROTECTED] wrote:
  
   what do you mean?
   that fix is no in the 1.3.3 release but will be in 1.3.4
  
  
   On Mon, Apr 7, 2008 at 9:42 PM, Matej Knopp [EMAIL PROTECTED]
wrote:
  
Actually, it seems that I'm wrong about this...
   
-Matej
   
On Mon, Apr 7, 2008 at 9:26 PM, Matej Knopp 
   [EMAIL PROTECTED]
   wrote:
 Wicket 1.3.3 was released before april 06. The overflow fix is
not
  part of the release.

  -Matej



  On Mon, Apr 7, 2008 at 9:13 PM, Daniel Wu 
   [EMAIL PROTECTED]
   wrote:
   I've updated to the released Wicket 1.3.3, but I'm having
   the
stackoverflow
there, but it wasn't happening on the snapshot of april 06.
Was
   this
fix
incorporated on the official Wicket 1.3.3 release?
  
On Sun, Apr 6, 2008 at 6:10 PM, Johan Compagner 
[EMAIL PROTECTED]
wrote:
  
  
  
 Dont know if the stream corrupt has the same root problem
as the
 stackoverflow
 But that is just fixed.

 johan


 On Sat, Mar 29, 2008 at 11:22 PM, Daniel Wu 
   [EMAIL PROTECTED]
wrote:

 
  I've updated my wicket application to Wicket 1.3.2, but
now,
when I try
 to
  switch between my application tabs (my tabs extend
 
org.apache.wicket.extensions.markup.html.tabs.AbstractTab) I'm
getting
  this
  error:
 
  ERROR RequestCycle () - Could not deserialize object
using
 
 

   
  
   
   `org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory`
  object factory
  java.lang.RuntimeException: Could not deserialize
   object
using
 
 

   
  
   
   `org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory`
  object factory
 at
 
   
org.apache.wicket.util.lang.Objects.byteArrayToObject(Objects.java:411)
 at
 
 

   
  
   
   
 org.apache.wicket.protocol.http.pagestore.AbstractPageStore.deserializePage(AbstractPageStore.java:228)
 at
 
 

   
  
   
   
 org.apache.wicket.protocol.http.pagestore.DiskPageStore.getPage(DiskPageStore.java:706)
 at
 
 

   
  
   
   
 

Re: Invoulentary session sharing/leakage in Wicket 1.3.x

2008-04-07 Thread Martijn Dashorst
Add to that the thread name. This way you can track session usage
across threads.

Martijn

On 4/8/08, Johan Compagner [EMAIL PROTECTED] wrote:
 can you also log the http session id and the hash/id of the WicketSession?


  On Mon, Apr 7, 2008 at 11:22 PM, Edvin Syse [EMAIL PROTECTED] wrote:

   Igor Vaynberg wrote:
  
can you try with 1.3.1, 1.3.0. would help us isolate where the problem
is...
   
seems kind of strange that you are the only one seeing this though...
   
  
   I've turned on some logging in MySession:
  
   public MailUser getCurrentMailuser() {
  try {
  

 System.out.println(((WebRequest)RequestCycle.get().getRequest()).getHttpServletRequest().getRemoteAddr()
   +  got mailuser  + currentMailuser.getId() +   +
   currentMailuser.getUsername());
  } catch (Exception ignored) {}
  return currentMailuser;
   }
  
   This gives me output like:
  
   85.165.86.192 got mailuser 19712 [EMAIL PROTECTED]
   77.208.58.135 got mailuser 22817 [EMAIL PROTECTED]
  
   these are fine, but then I suddenly get:
  
   84.215.17.110 got mailuser 21024 [EMAIL PROTECTED]
   84.215.17.110 got mailuser 21740 [EMAIL PROTECTED]
  
  
   Trouble! One user got the session for two different users on two
   subsequent requests..
  
   Any ide? This is really killing me.. :(
  
   -- Edvin
  
  
   -
   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.2 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.2

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



Re: Invoulentary session sharing/leakage in Wicket 1.3.x

2008-04-07 Thread Edvin Syse


Johan Compagner wrote:

is it by the way that easy to reproduce for you?
you seem to have it pretty quickly when we ask for you if you could test
some other version


Yes, it's easy because I have more than 10.000 users that have to login to this system to check their email, so all I do is shutdown the 
app, do mvn war:war and deploy the war-file and startup again - and after a couple of minutes I would see the behaviour.



if that is the case isnt it somehow reproducible in a smaller test case?


I could set up a dev-environment with 1.3.3 tomorrow and have ten users log in/out and see if I can reproduce it. If I can, I'll start 
ripping things out until I have a small reproducible case I can submit.


Johan Compagner wrote:
 can you also log the http session id and the hash/id of the WicketSession?

I don't dare to take the app down again now, but if it breaks tomorrow I'll throw it in. If it doesn't break, I'll include this in the 1.3.3 
test.


-- Edvin

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



Re: Invoulentary session sharing/leakage in Wicket 1.3.x

2008-04-07 Thread Edvin Syse

Martijn Dashorst wrote:

Add to that the thread name. This way you can track session usage
across threads.


How do I get the thread name?

-- Edvin

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



Re: Invoulentary session sharing/leakage in Wicket 1.3.x

2008-04-07 Thread Edvin Syse

Edvin Syse wrote:

Igor Vaynberg wrote:
can you try with 1.3.1, 1.3.0. would help us isolate where the problem 
is...


I tried with 1.3.0 as well, still the same problem.


(I wrote this email earlier this evening but forgot to send it it seems. Here 
it is:)

When I ran with 1.3.0 I also had 1.3.3 on the classpath. I reverted to 1.3.2 30 minutes ago and still haven't seen the problem. I've been 
running 1.3.2 up until this evening with no problems reported, so I am now quite certain that the problem is only with 1.3.3.


We have monitoring running now, and if the problem arises when the traffic 
increases tomorrow morning we'll know for sure.

I'll report back tomorrow :)

-- Edvin

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



Re: java.io.StreamCorruptedException: invalid type code: 29

2008-04-07 Thread Johan Compagner
if you override it and give the type then that field can give you the
warning

On Tue, Apr 8, 2008 at 12:30 AM, Wolfgang Gehner [EMAIL PROTECTED] wrote:

 Is that for text fields only, or other components as well? We have a
 class RTextField that extends TextField so we override the default
 constructor RTextField(String id) to do super(id, String.class)

 On Mon, Apr 7, 2008 at 3:26 PM, Wolfgang Gehner [EMAIL PROTECTED] wrote:
  Everything that needs state. And yes, that could be lists of data,
   serializable objects with hashmaps. How do you define a null
   reference?
 
 
 
   On Mon, Apr 7, 2008 at 3:22 PM, Johan Compagner [EMAIL PROTECTED]
 wrote:
still what really goes into that CPM?
 another model? with what kind of object?
 Does some properties go over lists or maps or object graphs with
 null
 references in them?
   
   
   
 On Tue, Apr 8, 2008 at 12:11 AM, André Souza [EMAIL PROTECTED]
 wrote:
   
  Is this something new to 1.3? We have 3705 uses of TextField in
 our app so
  far, and growing. We use CompoundPropertyModel out of the box.
 
  Does that mean the TextField(String wickedId) constructor stopped
 working
  with CompoundPropertyModel?
 
 
  On 4/7/08, Matej Knopp [EMAIL PROTECTED] wrote:
  
   Is this a new error? Looks like your models are unable to
 provide
   target type. In that case you have to specify the property type
 in
   your textfields, either though the TextField constructor or call
   TextField.setType().
  
   This should not be required when you use
 (Component)PropertyModels
   only, but when you have custom models you have to call it unless
 your
   models implement IObjectClassAwareModel.
  
   -Matej
  
   On Mon, Apr 7, 2008 at 11:57 PM, André Souza 
 [EMAIL PROTECTED]
   wrote:
We are still having problems with the migration to 1.3.
   
 One fix we needed was not in the 1.3.3 release so we
 continued using
   
   
  
 
 http://wicketstuff.org/maven/repository/org/apache/wicket/wicket/1.3-SNAPSHOT/
   
 for now.
   
 We get this on the console, repeatedly:
   
   
 WARN  AbstractTextComponent () - Couldn't resolve model type
 of
  
   
 
  
 Model:classname=[org.apache.wicket.model.CompoundPropertyModel$AttachedCompoundPropertyModel]:nestedModel=[Model:classname=[org.apache.wicket.model.CompoundPropertyModel]:nestedModel=[...],
   
please set the type yourself.
   
 After we get this message a number of variables we have in
 are set to
   null.
   
 What is the common cause of this message?
   
   
   
   
   
   
 On 4/7/08, Johan Compagner [EMAIL PROTECTED] wrote:
 
  what do you mean?
  that fix is no in the 1.3.3 release but will be in 1.3.4
 
 
  On Mon, Apr 7, 2008 at 9:42 PM, Matej Knopp 
 [EMAIL PROTECTED]
   wrote:
 
   Actually, it seems that I'm wrong about this...
  
   -Matej
  
   On Mon, Apr 7, 2008 at 9:26 PM, Matej Knopp 
  [EMAIL PROTECTED]
  wrote:
Wicket 1.3.3 was released before april 06. The overflow
 fix is
   not
 part of the release.
   
 -Matej
   
   
   
 On Mon, Apr 7, 2008 at 9:13 PM, Daniel Wu 
  [EMAIL PROTECTED]
  wrote:
  I've updated to the released Wicket 1.3.3, but I'm
 having
  the
   stackoverflow
   there, but it wasn't happening on the snapshot of
 april 06.
   Was
  this
   fix
   incorporated on the official Wicket 1.3.3 release?
 
   On Sun, Apr 6, 2008 at 6:10 PM, Johan Compagner 
   [EMAIL PROTECTED]
   wrote:
 
 
 
Dont know if the stream corrupt has the same root
 problem
   as the
stackoverflow
But that is just fixed.
   
johan
   
   
On Sat, Mar 29, 2008 at 11:22 PM, Daniel Wu 
  [EMAIL PROTECTED]
   wrote:
   

 I've updated my wicket application to Wicket
 1.3.2, but
   now,
   when I try
to
 switch between my application tabs (my tabs
 extend

   org.apache.wicket.extensions.markup.html.tabs.AbstractTab) I'm
   getting
 this
 error:

 ERROR RequestCycle () - Could not deserialize
 object
   using


   
  
 
  
 
 `org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory`
 object 

Request based DataProvider

2008-04-07 Thread Ritz123

Hi,

I am using SortableDataProvider and have a need to access request attributes
to get the next set of items.  IDataProvider and none of the pre-canned
implementation classes seem to use HttpServletRequest to fetch the next set
of items. Was wondering if someone had similar requirement and if there is
an easier way to get access to request object from within the IDataProvider.

Thanks in advance.
-- 
View this message in context: 
http://www.nabble.com/Request-based-DataProvider-tp16542297p16542297.html
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: Invoulentary session sharing/leakage in Wicket 1.3.x

2008-04-07 Thread Igor Vaynberg
hm, slf4j supports MDC. dont know if it emulates it for logging impls
that dont support it or not.

here we use logback and have a thing like this:

public class RequestIdLogFilter implements Filter
{
private static final String MDC_REQUEST_ID = requestId;
private static AtomicInteger requestIdCounter = new AtomicInteger();

public void init(FilterConfig filterConfig) throws ServletException
{
requestIdCounter.set(1000);
}

public void doFilter(ServletRequest request, ServletResponse
response, FilterChain chain)
throws IOException, ServletException
{
int id = requestIdCounter.getAndIncrement();
MDC.put(MDC_REQUEST_ID, String.valueOf(id));
try
{
chain.doFilter(request, response);
}
finally
{
MDC.remove(MDC_REQUEST_ID);
}
}
}

then in the log simply ${requestId} and it adds it to every logging line

-igor


On Mon, Apr 7, 2008 at 4:01 PM, Martijn Dashorst
[EMAIL PROTECTED] wrote:
 What kind of logging system do you use? log4j's pattern logger has %p
  I think. If you combine this with start/end logging of your request
  (see requestcycle#onbeginrequest/onendrequest) you can log the session
  id together with the username. This would make it easier to track what
  is happening in each thread.

  Martijn



  On 4/8/08, Edvin Syse [EMAIL PROTECTED] wrote:
   Martijn Dashorst wrote:
  
Add to that the thread name. This way you can track session usage
across threads.
   
  
How do I get the thread name?
  
  
-- Edvin
  
   -
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.2 is released
  Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.2

  -


 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: Invoulentary session sharing/leakage in Wicket 1.3.x

2008-04-07 Thread Edvin Syse

Martijn Dashorst wrote:

What kind of logging system do you use? log4j's pattern logger has %p
I think. If you combine this with start/end logging of your request
(see requestcycle#onbeginrequest/onendrequest) you can log the session
id together with the username. This would make it easier to track what
is happening in each thread.


The debug-output I mentioned is just to stderr now, but I'm using log4j so I'll 
set this up tomorrow, thanks! :)

-- Edvin

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



Re: Invoulentary session sharing/leakage in Wicket 1.3.x

2008-04-07 Thread Martijn Dashorst
In this case he should use both the MDC and a Session id logger.

The MDC session id is used to track the start session id (from the
start of the request), and the other for comparison during the
request.

It is one of the things I'd like to propose for Wicket NG: to set the
MDC with session id and possibly request ID. This could replace the
request logger IMO (which I like, but I'm always ears to make our API
tighter).

Martijn

On 4/8/08, Igor Vaynberg [EMAIL PROTECTED] wrote:
 hm, slf4j supports MDC. dont know if it emulates it for logging impls
  that dont support it or not.

  here we use logback and have a thing like this:

  public class RequestIdLogFilter implements Filter
  {
 private static final String MDC_REQUEST_ID = requestId;
 private static AtomicInteger requestIdCounter = new AtomicInteger();

 public void init(FilterConfig filterConfig) throws ServletException
 {
 requestIdCounter.set(1000);
 }

 public void doFilter(ServletRequest request, ServletResponse
  response, FilterChain chain)
 throws IOException, ServletException
 {
 int id = requestIdCounter.getAndIncrement();
 MDC.put(MDC_REQUEST_ID, String.valueOf(id));
 try
 {
 chain.doFilter(request, response);
 }
 finally
 {
 MDC.remove(MDC_REQUEST_ID);
 }
 }
  }

  then in the log simply ${requestId} and it adds it to every logging line


  -igor



  On Mon, Apr 7, 2008 at 4:01 PM, Martijn Dashorst
  [EMAIL PROTECTED] wrote:
   What kind of logging system do you use? log4j's pattern logger has %p
I think. If you combine this with start/end logging of your request
(see requestcycle#onbeginrequest/onendrequest) you can log the session
id together with the username. This would make it easier to track what
is happening in each thread.
  
Martijn
  
  
  
On 4/8/08, Edvin Syse [EMAIL PROTECTED] wrote:
 Martijn Dashorst wrote:

  Add to that the thread name. This way you can track session usage
  across threads.
 

  How do I get the thread name?


  -- Edvin

 -
  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.2 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.2
  
-
  
  
   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]




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

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



Re: Request based DataProvider

2008-04-07 Thread Ryan Gravener
perhaps what you need is RequestCycle.get()?

On 4/7/08, Ritz123 [EMAIL PROTECTED] wrote:

 Hi,

 I am using SortableDataProvider and have a need to access request attributes
 to get the next set of items.  IDataProvider and none of the pre-canned
 implementation classes seem to use HttpServletRequest to fetch the next set
 of items. Was wondering if someone had similar requirement and if there is
 an easier way to get access to request object from within the IDataProvider.

 Thanks in advance.
 --
 View this message in context:
 http://www.nabble.com/Request-based-DataProvider-tp16542297p16542297.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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




-- 
Ryan Gravener
http://ryangravener.com

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



Re: Request based DataProvider

2008-04-07 Thread Igor Vaynberg
what is the actual use case? sounds a bit weird when you say those
things for a wicket app

-igor


On Mon, Apr 7, 2008 at 4:00 PM, Ritz123 [EMAIL PROTECTED] wrote:

  Hi,

  I am using SortableDataProvider and have a need to access request attributes
  to get the next set of items.  IDataProvider and none of the pre-canned
  implementation classes seem to use HttpServletRequest to fetch the next set
  of items. Was wondering if someone had similar requirement and if there is
  an easier way to get access to request object from within the IDataProvider.

  Thanks in advance.
  --
  View this message in context: 
 http://www.nabble.com/Request-based-DataProvider-tp16542297p16542297.html
  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: Invoulentary session sharing/leakage in Wicket 1.3.x

2008-04-07 Thread Martijn Dashorst
What kind of logging system do you use? log4j's pattern logger has %p
I think. If you combine this with start/end logging of your request
(see requestcycle#onbeginrequest/onendrequest) you can log the session
id together with the username. This would make it easier to track what
is happening in each thread.

Martijn

On 4/8/08, Edvin Syse [EMAIL PROTECTED] wrote:
 Martijn Dashorst wrote:

  Add to that the thread name. This way you can track session usage
  across threads.
 

  How do I get the thread name?


  -- Edvin

 -
  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.2 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.2

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



Re: IntegerConverter cannot parse or display locale specific format like 999,999

2008-04-07 Thread Matthew Young
Any reply?


Re: IntegerConverter cannot parse or display locale specific format like 999,999

2008-04-07 Thread Nick Heudecker
Why not subclass label and override getNumberFormat(Locale)?  Pretty easy.


On Mon, Apr 7, 2008 at 7:02 PM, Matthew Young [EMAIL PROTECTED] wrote:

 Any reply?




-- 
Nick Heudecker


How to save pages in the database?

2008-04-07 Thread freak182

Hello,
Correct me if im wrong to my question...My question isI want to save the
entire page to DB. I know that the pages are stored in the session store
then write to the disk. Now how can i access the session store and get the
latest pages then save it to DB?

Thanks a lot.Cheers


-- 
View this message in context: 
http://www.nabble.com/How-to-save-pages-in-the-database--tp16547182p16547182.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



AutoComplete TextArea?

2008-04-07 Thread Martin Makundi
Hi!

Has anyone here seen wicket autocomplete behavior implemented for
textarea so that the autosuggestions are concatenated to the end of
the existing content instead of just replacing the existing content?

**
Martin

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



Re: IntegerConverter cannot parse or display locale specific format like 999,999

2008-04-07 Thread Matthew Young
I don't see any good reason to call numberFormat.setGroupingUsed(false);,
it just disable the locale capability.  This just doesn't make any sense to
me.

Why not subclass label and override getNumberFormat(Locale)?  Pretty easy.

You probably mean override Component#getConverter(Class type).  Another
option is to install my integerconverter in my app.

Anyway, this should be corrected in Wicket if it's wrong.  I filed a bug
report: https://issues.apache.org/jira/browse/WICKET-1494


On Mon, Apr 7, 2008 at 7:23 PM, Nick Heudecker [EMAIL PROTECTED] wrote:

 Why not subclass label and override getNumberFormat(Locale)?  Pretty easy.


 On Mon, Apr 7, 2008 at 7:02 PM, Matthew Young [EMAIL PROTECTED] wrote:

  Any reply?
 



 --
 Nick Heudecker