Re: wicket multi-window app

2012-08-19 Thread Chuck Brinkman
Martin,

Thanks for your input.

Chuck

From Chuck's iPad

iPad:  (502) 713-3283

On Aug 18, 2012, at 7:06 AM, Martin Grigorov mgrigo...@apache.org wrote:

 Hi,
 
 Writing web apps requires writing JavaScript code ...
 Even if you use components like Wicket-extensions' ModalWindow or
 wicket-bootstrap's Modal, or wicket-jquery-ui's Dialog, or any other
 similar component you will still need to add some custom JS to make it
 working as you need it. And this is where Wicket shines - it doesn't
 mandate specific solutions, it allows you to make dynamic apps by
 reusing components and by making it easier to extend them for your
 specific needs.
 
 On Sat, Aug 18, 2012 at 5:22 AM, Chuck Brinkman
 wileecanislatr...@gmail.com wrote:
 Hi,
 
 I have a desktop application that I need to move to the web.  The desktop 
 app supports multiple windows.  I'm told it wouldn't be unusual to have as 
 many as 30 windows open.  All of the windows can be moved, resized, expanded 
 to full screen (fill the original app window) and minimize.  The user 
 community doesn't want to lose any look and feel of the desktop app.
 
 Here are the hurdles that I see
 
 -)  keeping the child windows on top of the parent window.
 that should be easy with CSS (z-index)
 
 -)  expanding a child window to fill the parent window
 Use JavaScript that manipulates the child's CSS properties
 
 -)  can I create a modal window?  A few of the desktop windows are modal.
 See wicket-extensions' ModalWindow
 
 -)  is there a limit to the number of child windows
 No
 
 -)  concerns about multi-window support in wicket
 Most of the time this just works
 
 
 So,
 -)  Will wicket support any of this without me having to resort to writing 
 javascript?
 -)  What issues have I overlooked that will preclude the use of wicket
 
 Thanks for your input
 
 I looked at wicket a few years ago.  I'm a fan of the just java and just 
 html aspect not to mention reusable components.  I would really like to hear 
 that wicket will support this multi-window environment.  If not it looks 
 like jquery which means lots of javascript and I think large amounts of 
 javascript are unmanageable.
 
 This is true but lately there are many good JS testing frameworks
 which make this more manageable.
 
 
 
 
 Chuck
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
 -- 
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 

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



wicket multi-window app

2012-08-17 Thread Chuck Brinkman
Hi,

I have a desktop application that I need to move to the web.  The desktop app 
supports multiple windows.  I'm told it wouldn't be unusual to have as many as 
30 windows open.  All of the windows can be moved, resized, expanded to full 
screen (fill the original app window) and minimize.  The user community doesn't 
want to lose any look and feel of the desktop app.  

Here are the hurdles that I see

-)  keeping the child windows on top of the parent window.
-)  expanding a child window to fill the parent window
-)  can I create a modal window?  A few of the desktop windows are modal.
-)  is there a limit to the number of child windows
-)  concerns about multi-window support in wicket

So,
-)  Will wicket support any of this without me having to resort to writing 
javascript?
-)  What issues have I overlooked that will preclude the use of wicket

Thanks for your input

I looked at wicket a few years ago.  I'm a fan of the just java and just html 
aspect not to mention reusable components.  I would really like to hear that 
wicket will support this multi-window environment.  If not it looks like jquery 
which means lots of javascript and I think large amounts of javascript are 
unmanageable.



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



Re: wicket bench in eclipse

2010-01-26 Thread Chuck Brinkman
I had not heard of wicket bench before reading this email thread.  So, I
installed it and found that it doesn't play well with 'myeclipse'; not sure
where the fault lies.  So I just don't use it as a default editor.  I do
like some of the features.  If you just want to switch between java and html
use 'alt + leftarrow' and 'alt + rightarrow'.  This switches between
recently edited files.

On Wed, Jan 27, 2010 at 1:06 AM, Lionel Port lionel.p...@gmail.com wrote:

 Agree with Huake Ingmar. The functionality doesn't overlap at all. My
 main reason for wanting the plugin to work is to switch easily between
 the html and the java code for the same component. In a maven project
 this is particular a hassle because the java code is in packages under
 /src/main/java and the html code is in packages under
 /src/main/resources. I can't really find a quick way (preferable
 single keystroke to flip between them). I also ideally want code
 completion on the wicket ids but thats secondary.

 regards,
 Lionel

 On Tue, Jan 26, 2010 at 12:48 AM, Hauke Ingmar Schmidt
 haukeing...@gmail.com wrote:
  Hej,
 
  2010/1/25 Peter Karich peat...@yahoo.de:
  Is it
  time to buy an IDEA license where there seems to be a quite nice
  toolset for Wicket?
 
  I downloaded the open source version of IntelliJ and the wicket plugin
 seems
  to work.
 
  Yes, but the free version of IDEA is lacking too much in other fields:
  http://www.jetbrains.com/idea/features/editions_comparison_matrix.html
  .
 
  There is also a wicket plugin for NetBeans, which is working.
 
  Well, yes, but then it's Netbeans...
 
  But a pure maven project wihtout a plugin isn't that different.
  Or am I missing an important feature of the eclipse plugin?
 
  Hm... Maven and the different Wicket IDE plugins don't intersect in
  functionality. The plugins all try to give a little help when working
  with Wicket components and pages, e.g. showing the wicket:ids when
  working with the Java code to prevent hierarchy mismatch or offering
  property model navigation as this is (still) string based.
 
  Eclipse plugin features:
 
 http://www.laughingpanda.org/~inhuman/wicket-bench/docs/features-0.5.htmlhttp://www.laughingpanda.org/%7Einhuman/wicket-bench/docs/features-0.5.html
  Netbeans: https://nbwicketsupport.dev.java.net/ (well, that page needs
  a little make over...)
  IDEA: http://code.google.com/p/wicketforge/wiki/PluginFeatures
 
  Hej då
  Hauke Ingmar
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 

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




Re: AjaxSelfUpdatingTimerBehavior and session timeout

2010-01-25 Thread Chuck Brinkman
1)  So, if I didn't access the session in my ajax callback then the page
would eventually expire.  Another way to say this is if I simply had the
original Clock implementation on this page then the session would expire?

2)  Is there an easy way of implement this countdown to expire?

On Mon, Jan 25, 2010 at 1:14 AM, Igor Vaynberg igor.vaynb...@gmail.comwrote:

 your behavior is always touching the session, so it will never
 timeout. using this behavior is actually a solution to preventing the
 session from ever timing out :)

 -igor

 On Sun, Jan 24, 2010 at 9:10 PM, Chuck Brinkman chasb1...@gmail.com
 wrote:
  I thought it would be fun to add a 'time to session expiration' display
 to
  my pages. So I attempted this using the AjaxSelfUpdatingTimerBehavior. I
  just took the Clock example and hacked it as follows
 
 
   hsession = request.getHttpServletRequest().getSession();
 
  lastAccessTime = hsession.getLastAccessedTime();
 
  thisTime = *new* java.util.Date().getTime();
 
  elapsedTime = thisTime - lastAccessTime;
 
 
   The problem is that elapsedTime is always the duration specified when I
  create the clock instance. So, my question is, if I have a page that uses
  AjaxSelfUpdatingTimerBehavior and the user is displaying that page then
 his
  session will never expire? Or am I missing something?
 

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




Re: AjaxSelfUpdatingTimerBehavior and session timeout

2010-01-25 Thread Chuck Brinkman
James,

Thanks for the information.  I wonder if those using
AjaxSelfUpdatingTimerBehavior realize that this prevents session timeout?

Chuck

On Mon, Jan 25, 2010 at 7:09 AM, James Carman
jcar...@carmanconsulting.comwrote:

 On Mon, Jan 25, 2010 at 4:37 AM, Chuck Brinkman chasb1...@gmail.com
 wrote:
  1)  So, if I didn't access the session in my ajax callback then the page
  would eventually expire.  Another way to say this is if I simply had the
  original Clock implementation on this page then the session would expire?
 

 No, the ajax self updating behavior has to touch the session because
 it has to know how to get back to itself to do its work.

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




AjaxSelfUpdatingTimerBehavior and session timeout

2010-01-24 Thread Chuck Brinkman
I thought it would be fun to add a 'time to session expiration' display to
my pages. So I attempted this using the AjaxSelfUpdatingTimerBehavior. I
just took the Clock example and hacked it as follows


 hsession = request.getHttpServletRequest().getSession();

lastAccessTime = hsession.getLastAccessedTime();

thisTime = *new* java.util.Date().getTime();

elapsedTime = thisTime - lastAccessTime;


 The problem is that elapsedTime is always the duration specified when I
create the clock instance. So, my question is, if I have a page that uses
AjaxSelfUpdatingTimerBehavior and the user is displaying that page then his
session will never expire? Or am I missing something?


Re: Cannot get default invisible TextField's ModelObject ?

2010-01-21 Thread Chuck Brinkman
I stepped through the code and found that the convertedInput is null when
processing submit.  I didn't see anything that looked like an error message
from wicket.I look forward to seeing what the wicket developers have to
say.

I'm just a new wicket user but was interested in this issue.  I also found
that if you make the following changes it will work.
   tr wicket:id=more
td colspan=2
*form wicket:id=moreForm*
input type=text size=40 value=Please leave
comments
wicket:id=textfield /
input type=submit value=Submit
wicket:id=submit /
   * /form*
/td
/tr


*FormVoid moreForm = new FormVoid(moreForm);
more.add(moreForm);*
final TextFieldString textfield = new TextFieldString(
textfield, new ModelString());
*moreForm*.add(textfield);
AjaxButton button = new AjaxButton(submit) {
@Override
protected void onSubmit(AjaxRequestTarget arg0, Form?
form) {
System.out.println(radioGroup = 
+ radioGroup.getModelObject()
+  , textfield.getModelObject() = 
+ textfield.getModelObject());
}
};
*moreForm*.add(button);


On Wed, Jan 20, 2010 at 10:47 PM, smallufo small...@gmail.com wrote:

 This is a full functional Page  :

 I found this problem only occurs when the form is in the listView :
 If I move the form out of the listView , it works like a charm.
 Bug ? I am not sure...

 The link is the screen capture :
 http://xs.to/image-B859_4B57CDD0.gif


 MyPage.html

 table border=1
  tr
thname/th
thmore ?/th
  /tr
  span wicket:id=listView
form wicket:id=form
  tr
td wicket:id=name[name]/td
td
  span wicket:id=radioGroup
input type=radio wicket:id=yes/yes
input type=radio wicket:id=no/no
  /span
/td
  /tr
  tr wicket:id=more
td colspan=2
  input type=text size=40 value=Please leave comments
 wicket:id=textfield/
  input type=submit value=Submit wicket:id=submit/
/td
  /tr
/form
  /span
 /table


 MyPage.java

 package quickstart.ajax;

 import java.util.ArrayList;
 import java.util.List;

 import org.apache.wicket.ajax.AjaxEventBehavior;
 import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.ajax.markup.html.form.AjaxButton;
 import org.apache.wicket.markup.html.WebMarkupContainer;
 import org.apache.wicket.markup.html.WebPage;
 import org.apache.wicket.markup.html.basic.Label;
 import org.apache.wicket.markup.html.form.Form;
 import org.apache.wicket.markup.html.form.Radio;
 import org.apache.wicket.markup.html.form.RadioGroup;
 import org.apache.wicket.markup.html.form.TextField;
 import org.apache.wicket.markup.html.list.ListItem;
 import org.apache.wicket.markup.html.list.ListView;
 import org.apache.wicket.model.Model;

 public class MyPage extends WebPage
 {
  private final static ListString names = new ArrayListString();
  static
  {
names.add(Andy);
names.add(Brian);
names.add(Carol);
  }

  public MyPage()
  {
ListViewString listView = new ListViewString(listView , names)
{
  @Override
  protected void populateItem(ListItemString item)
  {

FormVoid form = new FormVoid(form);
item.add(form);

String name = item.getModelObject();

form.add(new Label(name , name));

final WebMarkupContainer more = new WebMarkupContainer(more);
more.setVisible(false);
more.setOutputMarkupPlaceholderTag(true);
form.add(more);


final RadioGroupBoolean radioGroup = new
 RadioGroupBoolean(radioGroup , Model.of(Boolean.FALSE));
form.add(radioGroup);

RadioBoolean yes = new RadioBoolean(yes ,
 Model.of(Boolean.TRUE));
RadioBoolean no = new RadioBoolean(no ,
 Model.of(Boolean.FALSE));
radioGroup.add(yes);
radioGroup.add(no);

yes.add(new AjaxEventBehavior(onClick)
{
  @Override
  protected void onEvent(AjaxRequestTarget target)
  {
more.setVisible(true);
target.addComponent(more);
  }
});

no.add(new AjaxEventBehavior(onClick)
{
  @Override
  protected void onEvent(AjaxRequestTarget target)
  {
more.setVisible(false);
target.addComponent(more);
  }
});

final TextFieldString textfield = new
 TextFieldString(textfield , new ModelString());
more.add(textfield);
AjaxButton button = new AjaxButton(submit)
{
  @Override

Re: Cannot get default invisible TextField's ModelObject ?

2010-01-21 Thread Chuck Brinkman
I looked some more and found the following:

When it works, with my modification, FormComponent.getInputAsArray tries to
get parameters for the TextField named more:moreForm:textfield.  I looked
in the parameter map or the RequestFacade object and found these:
wicket:interface, wicket:ignoreIfNotActive, random, more:moreForm:textfield,
radioGroup and more:moreForm:submit.  And it finds the TextField.

The version that fails is looking for TextField named more:textfield.  The
RequestFacade object has: wicket:interface, wicket:ignoreIfNotActive,
random, forma_hf_0, radioGroup and more:submit.  Is there a problem with
forma_hf_0?



On Thu, Jan 21, 2010 at 7:35 AM, smallufo small...@gmail.com wrote:

 Yes , indeed , if the form is in the second row (default invisible) , it
 works , But I cannot get the first row's data (such as radioGroup's model
 object will become null ).
 Moreover ,  Form with multiple row , with something visible and something
 extensible (default invisible), it is not so rare.
 If the form is not inside a ListView , it will work.
 But it just fails if it is inside a  ListView.

 2010/1/21 Chuck Brinkman chasb1...@gmail.com

  I stepped through the code and found that the convertedInput is null when
  processing submit.  I didn't see anything that looked like an error
 message
  from wicket.I look forward to seeing what the wicket developers have
 to
  say.
 
  I'm just a new wicket user but was interested in this issue.  I also
 found
  that if you make the following changes it will work.
 tr wicket:id=more
 td colspan=2
  *form wicket:id=moreForm*
  input type=text size=40 value=Please
  leave
  comments
 wicket:id=textfield /
 input type=submit value=Submit
  wicket:id=submit /
 * /form*
 /td
 /tr
 
 
 *FormVoid moreForm = new FormVoid(moreForm);
 more.add(moreForm);*
  final TextFieldString textfield = new
 TextFieldString(
 textfield, new ModelString());
  *moreForm*.add(textfield);
  AjaxButton button = new AjaxButton(submit) {
 @Override
 protected void onSubmit(AjaxRequestTarget arg0,
 Form?
  form) {
 System.out.println(radioGroup = 
 + radioGroup.getModelObject()
 +  , textfield.getModelObject() = 
 + textfield.getModelObject());
 }
 };
  *moreForm*.add(button);
 
 
  On Wed, Jan 20, 2010 at 10:47 PM, smallufo small...@gmail.com wrote:
 
   This is a full functional Page  :
  
   I found this problem only occurs when the form is in the listView :
   If I move the form out of the listView , it works like a charm.
   Bug ? I am not sure...
  
   The link is the screen capture :
   http://xs.to/image-B859_4B57CDD0.gif
  
  
   MyPage.html
  
   table border=1
tr
  thname/th
  thmore ?/th
/tr
span wicket:id=listView
  form wicket:id=form
tr
  td wicket:id=name[name]/td
  td
span wicket:id=radioGroup
  input type=radio wicket:id=yes/yes
  input type=radio wicket:id=no/no
/span
  /td
/tr
tr wicket:id=more
  td colspan=2
input type=text size=40 value=Please leave comments
   wicket:id=textfield/
input type=submit value=Submit wicket:id=submit/
  /td
/tr
  /form
/span
   /table
  
  
   MyPage.java
  
   package quickstart.ajax;
  
   import java.util.ArrayList;
   import java.util.List;
  
   import org.apache.wicket.ajax.AjaxEventBehavior;
   import org.apache.wicket.ajax.AjaxRequestTarget;
   import org.apache.wicket.ajax.markup.html.form.AjaxButton;
   import org.apache.wicket.markup.html.WebMarkupContainer;
   import org.apache.wicket.markup.html.WebPage;
   import org.apache.wicket.markup.html.basic.Label;
   import org.apache.wicket.markup.html.form.Form;
   import org.apache.wicket.markup.html.form.Radio;
   import org.apache.wicket.markup.html.form.RadioGroup;
   import org.apache.wicket.markup.html.form.TextField;
   import org.apache.wicket.markup.html.list.ListItem;
   import org.apache.wicket.markup.html.list.ListView;
   import org.apache.wicket.model.Model;
  
   public class MyPage extends WebPage
   {
private final static ListString names = new ArrayListString();
static
{
  names.add(Andy);
  names.add(Brian);
  names.add(Carol);
}
  
public MyPage()
{
  ListViewString listView = new ListViewString(listView , names)
  {
@Override
protected void populateItem(ListItemString item

Thanks for wicket: it is awesome and I'm just getting to know it

2010-01-19 Thread Chuck Brinkman
Just wanted to say thanks for wicket.

I have a ListMultipleChoice and wanted to update the page based on at least
one item selected or no items selected.  It took a while for me to locate

lmc.add(new AjaxFormComponentUpdatingBehavior(onChange) {
@Override
protected void onUpdate(AjaxRequestTarget target) {
  // do the right thing here!
}
});

but once I did it just worked.  I like things that just work.  I don't know
js very well so just java and just html if real attractive to me.

Thanks again for wicket.

Chuck


Re: page expired problem issue wicket how resolve fix eofexception peekbyte

2010-01-12 Thread Chuck Brinkman
Hi Martin,

I'm new to wicket.  Could this have something to do with wicket trying to
restore a page from serialized data.  If one of the objects on your page can
not be serialized you will get an error when wicket tries to restore the
page.  I think you might see this when the back button is pressed.  I think
using a detachable model is one option if you use a 3rd party object that
isn't serializable..  If you wrote the object you can make is serializable.
Then again I could be all wrong.

Chuck

On Tue, Jan 12, 2010 at 5:42 AM, Martin Asenov mase...@velti.com wrote:

 Hello, everyone! I'm currently developing a webapp and I've nearly finished
 it. However, there's an issue that bothers me - from time to time wicket
 comes up with 'page expired' messages that piss me off. Of course, I have to
 make sure such messages will not be seen by the end user. I examined the
 logs and saw the above following exception occurring many times. Could it be
 the reason for all this?

 Thanks in advance for your help!

 P.S. Sorry for the subject field, but I guess it would be more useful that
 way, since it contains many tags regarding the problem.

 SEVERE: Exception loading sessions from persistent storage
 java.io.EOFException
at
 java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2554)
at
 java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1297)
at
 java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
at
 java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
at
 java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
at
 java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1667)
at
 java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1323)
at
 java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
at
 java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:480)
at org.apache.wicket.Component.readObject(Component.java:4465)
at sun.reflect.GeneratedMethodAccessor21.invoke(Unknown Source)
at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
 java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
at
 java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1849)
at
 java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
at
 java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1667)
at
 java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1323)
at
 java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
at
 java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
at
 java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
at
 java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1667)
at
 java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1323)
at
 java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
at
 java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
at
 java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
at
 java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
at
 org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLevelCachePageMap.readObject(SecondLevelCacheSessionStore.java:417)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
 java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
at
 java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1849)
at
 java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
at
 java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
at
 org.apache.catalina.session.StandardSession.readObject(StandardSession.java:1441)
at
 org.apache.catalina.session.StandardSession.readObjectData(StandardSession.java:942)
at
 org.apache.catalina.session.StandardManager.doLoad(StandardManager.java:394)
at
 org.apache.catalina.session.StandardManager.load(StandardManager.java:321)
at
 

Re: page expired problem issue wicket how resolve fix eofexception peekbyte

2010-01-12 Thread Chuck Brinkman
Martin,

I don't know a good way.

Do you know what page is causing the problem?  Manually check each object in
all components of the page.

Once you know the page you can try removing components until the error goes
away.  Last one removed is the offender.  There may be multiple offenders.

Maybe not a good way.  Get the source for wicket and modify
org.apache.wicket.Component.readObject(Component.java:4465) to catch the
exception.  At this point you can either print the class of the object being
read (some type of Component) or use the debugger (my preference).  You
might have to back up to org.apache.wicket.protocol.
http.SecondLevelCacheSessionStore$SecondLevelCachePageMap.readObject(SecondLevelCacheSessionStore.java:417).
This may be a bit of work and might not tell you anything.  The up side is
that you now have wicket source and can debug your next problem.  I usually
assume there will be another problem.

I'm sure others reading along will have better ideas.

Chuck



On Tue, Jan 12, 2010 at 6:27 AM, Martin Asenov mase...@velti.com wrote:

 Hi Chuck, nice to read from you!

 Yes, this could be all true, but I can't see anywhere in the logs
 comprehendible reports of what happens. Nothing says which is the
 problematic object, and I can only guess. Do you now a way to trace down
 where the problem comes from?

 Thank you!

 P.S. I'm new to Wicket too :)

 -Original Message-
 From: Chuck Brinkman [mailto:chasb1...@gmail.com]
 Sent: Tuesday, January 12, 2010 1:23 PM
 To: users@wicket.apache.org
 Subject: Re: page expired problem issue wicket how resolve fix eofexception
 peekbyte

 Hi Martin,

 I'm new to wicket.  Could this have something to do with wicket trying to
 restore a page from serialized data.  If one of the objects on your page
 can
 not be serialized you will get an error when wicket tries to restore the
 page.  I think you might see this when the back button is pressed.  I think
 using a detachable model is one option if you use a 3rd party object that
 isn't serializable..  If you wrote the object you can make is serializable.
 Then again I could be all wrong.

 Chuck

 On Tue, Jan 12, 2010 at 5:42 AM, Martin Asenov mase...@velti.com wrote:

  Hello, everyone! I'm currently developing a webapp and I've nearly
 finished
  it. However, there's an issue that bothers me - from time to time wicket
  comes up with 'page expired' messages that piss me off. Of course, I have
 to
  make sure such messages will not be seen by the end user. I examined the
  logs and saw the above following exception occurring many times. Could it
 be
  the reason for all this?
 
  Thanks in advance for your help!
 
  P.S. Sorry for the subject field, but I guess it would be more useful
 that
  way, since it contains many tags regarding the problem.
 
  SEVERE: Exception loading sessions from persistent storage
  java.io.EOFException
 at
 
 java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2554)
 at
  java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1297)
 at
  java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
 at
  java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
 at
  java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
 at
  java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
 at
 java.io.ObjectInputStream.readArray(ObjectInputStream.java:1667)
 at
  java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1323)
 at
  java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
 at
  java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:480)
 at org.apache.wicket.Component.readObject(Component.java:4465)
 at sun.reflect.GeneratedMethodAccessor21.invoke(Unknown Source)
 at
 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at
  java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
 at
  java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1849)
 at
  java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
 at
  java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
 at
 java.io.ObjectInputStream.readArray(ObjectInputStream.java:1667)
 at
  java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1323)
 at
  java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
 at
  java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
 at
  java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
 at
  java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
 at
 java.io.ObjectInputStream.readArray(ObjectInputStream.java:1667

Re: page expired problem issue wicket how resolve fix eofexception peekbyte

2010-01-12 Thread Chuck Brinkman
Martin,

I was not suggesting a permanent change to the framework.  Just temporary
while you debug the problem.  I got the source, did mvn install, it
generated the jar file which I then copied over to my project.  If I can do
it anyone can.  The problem isn't in wicket but in your domain object(s).
I'm out of ideas.  Maybe someone from the wicket team has a good suggestion.
Sorry :-(

Chuck

On Tue, Jan 12, 2010 at 8:42 AM, Martin Asenov mase...@velti.com wrote:

 No, Chuck, I don't know what page is causing this. As you can see the
 thrown exception messages don't say anything particular. I think the
 messaging is poor. I face such problems in lots of frameworks, for example
 hibernate and so on. The messages are not pointing to a particular problem,
 only messing your head with unclear statements. Anyway, I don't plan to edit
 the frameworks. Do you think if not generic parameterized TextField or
 DropDownChoice for example can cause this?

 Thanks,

 -Original Message-
 From: Chuck Brinkman [mailto:chasb1...@gmail.com]
 Sent: Tuesday, January 12, 2010 2:13 PM
 To: users@wicket.apache.org
 Subject: Re: page expired problem issue wicket how resolve fix eofexception
 peekbyte

 Martin,

 I don't know a good way.

 Do you know what page is causing the problem?  Manually check each object
 in
 all components of the page.

 Once you know the page you can try removing components until the error goes
 away.  Last one removed is the offender.  There may be multiple offenders.

 Maybe not a good way.  Get the source for wicket and modify
 org.apache.wicket.Component.readObject(Component.java:4465) to catch the
 exception.  At this point you can either print the class of the object
 being
 read (some type of Component) or use the debugger (my preference).  You
 might have to back up to org.apache.wicket.protocol.

 http.SecondLevelCacheSessionStore$SecondLevelCachePageMap.readObject(SecondLevelCacheSessionStore.java:417).
 This may be a bit of work and might not tell you anything.  The up side is
 that you now have wicket source and can debug your next problem.  I usually
 assume there will be another problem.

 I'm sure others reading along will have better ideas.

 Chuck



 On Tue, Jan 12, 2010 at 6:27 AM, Martin Asenov mase...@velti.com wrote:

  Hi Chuck, nice to read from you!
 
  Yes, this could be all true, but I can't see anywhere in the logs
  comprehendible reports of what happens. Nothing says which is the
  problematic object, and I can only guess. Do you now a way to trace down
  where the problem comes from?
 
  Thank you!
 
  P.S. I'm new to Wicket too :)
 
  -Original Message-
  From: Chuck Brinkman [mailto:chasb1...@gmail.com]
  Sent: Tuesday, January 12, 2010 1:23 PM
  To: users@wicket.apache.org
  Subject: Re: page expired problem issue wicket how resolve fix
 eofexception
  peekbyte
 
  Hi Martin,
 
  I'm new to wicket.  Could this have something to do with wicket trying to
  restore a page from serialized data.  If one of the objects on your page
  can
  not be serialized you will get an error when wicket tries to restore the
  page.  I think you might see this when the back button is pressed.  I
 think
  using a detachable model is one option if you use a 3rd party object that
  isn't serializable..  If you wrote the object you can make is
 serializable.
  Then again I could be all wrong.
 
  Chuck
 
  On Tue, Jan 12, 2010 at 5:42 AM, Martin Asenov mase...@velti.com
 wrote:
 
   Hello, everyone! I'm currently developing a webapp and I've nearly
  finished
   it. However, there's an issue that bothers me - from time to time
 wicket
   comes up with 'page expired' messages that piss me off. Of course, I
 have
  to
   make sure such messages will not be seen by the end user. I examined
 the
   logs and saw the above following exception occurring many times. Could
 it
  be
   the reason for all this?
  
   Thanks in advance for your help!
  
   P.S. Sorry for the subject field, but I guess it would be more useful
  that
   way, since it contains many tags regarding the problem.
  
   SEVERE: Exception loading sessions from persistent storage
   java.io.EOFException
  at
  
 
 java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2554)
  at
   java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1297)
  at
  
 java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
  at
   java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
  at
  
 java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
  at
   java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
  at
  java.io.ObjectInputStream.readArray(ObjectInputStream.java:1667)
  at
   java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1323)
  at
  
 java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947

Re: about org.apache.wicket.extensions.markup.html.form.palette.Palette

2010-01-11 Thread Chuck Brinkman
Can you tell me what this means The palette itself cannot be ajaxified
because it is a panel and therefore does not receive any javascript
events.?  Would a palette without javascript require full page loads?

On Mon, Jan 11, 2010 at 11:41 AM, Igor Vaynberg igor.vaynb...@gmail.comwrote:

 you can build a palette that works without javascript but the user
 experience will probably be poor

 -igor

 On Sun, Jan 10, 2010 at 11:41 PM, Chuck Brinkman chasb1...@gmail.com
 wrote:
  As you can guess I'm new to wicket.  Seems very good so far.  I found
 this
  Palette component and thought it might work well for me but I need to
 make
  some modifications.  So I started to dig in.  I noticed that the
 component
  uses js.  I thought wicket was just java and just html.  I do realize
 that
  is a little but of marketing hype but could this component have been
  implemented without any js?  I read this in the Palette.java source file:
  The palette itself cannot be ajaxified because it is a panel and
 therefore
  does not receive any javascript events.  I don't know what this means.
  Does
  this mean that the click events to move data around could not be sent to
 the
  server?  Can this only be done using js?  Or was js selected because it
  would be too slow otherwise?  If I just need to RTFM just say so.  I
 would
  appreciate some insight if someone has time.  Thanks
 

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




Re: how to change BookmarkablePageLink label

2010-01-10 Thread Chuck Brinkman
Thanks,  I was thinking of the link as a single widget not a a link with a
label.  This seems to work.

div id=logInOut name=logInOut
a href=# wicket:id=logInOutLinkspan
wicket:id=logInOutLabel/span/a
/div


if(UserHelper.get().isGuest(dis.getUser())) {
BookmarkablePageLink bpl = new
BookmarkablePageLink(logInOutLink , Login.class);
add(bpl) ;
bpl.add(new Label(logInOutLabel, Login));

} else {
BookmarkablePageLink bpl = new
BookmarkablePageLink(logInOutLink , Logout.class);
add(bpl) ;
bpl.add(new Label(logInOutLabel, Logout));
}

On Sat, Jan 9, 2010 at 11:31 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote:

 give the label a model that can dynamically change the value

 -igor

 On Sat, Jan 9, 2010 at 7:46 PM, Chuck Brinkman chasb1...@gmail.com
 wrote:
  I want a link that changes based on a users attribute.  As the 'linked
 to'
  page changes I want the displayed label to reflect the change.  I have
  created two links and am setting visibility based on the users attribute.
  This works but I think a better solution would be to just change the
 label
  however this doesn't seem to be easily done.  My guess is I'm just not
  looking in the right place.  Can someone show me the way.  Thanks.
 

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




about org.apache.wicket.extensions.markup.html.form.palette.Palette

2010-01-10 Thread Chuck Brinkman
As you can guess I'm new to wicket.  Seems very good so far.  I found this
Palette component and thought it might work well for me but I need to make
some modifications.  So I started to dig in.  I noticed that the component
uses js.  I thought wicket was just java and just html.  I do realize that
is a little but of marketing hype but could this component have been
implemented without any js?  I read this in the Palette.java source file:
The palette itself cannot be ajaxified because it is a panel and therefore
does not receive any javascript events.  I don't know what this means.  Does
this mean that the click events to move data around could not be sent to the
server?  Can this only be done using js?  Or was js selected because it
would be too slow otherwise?  If I just need to RTFM just say so.  I would
appreciate some insight if someone has time.  Thanks


how to clear validation error

2010-01-08 Thread Chuck Brinkman
I have a form with a html submit button.  In java I wrote my own onSubmit to
handle the form processing.  In the form I have a firstName field that is
required.
li
  First Name:
  span wicket:id=borderFirstName
input type=text wicket:id=firstName/input
  /span
/li

TextField firstName = new TextField(firstName);
firstName.setRequired(true);
form.add(
new FormComponentFeedbackBorder(borderFirstName).add(
firstName ) );

All works great as long as the user input is valid.  If I attempt to submit
an empty firstName field I get the expected message in my FeedbackPanel and
my firstName text field gets the red asterisk.  I then add a valid firstName
and submit again.  The page remains showing the valid firstName input along
with the validation errors and onSubmit does not fire.  I must be doing
something wrong but can't figure it out.

Thanks for your help.

I'm using wicket 1.4.5, tomcat 6, java 1.6 and firefox 3.0.8 on fc9.


Re: how to clear validation error

2010-01-08 Thread Chuck Brinkman
maybe i left out too much code...

form wicket:id=currentUserPanelForm
  ul
li
span wicket:id=feedback/span
/li
.more html omitted

  /ul
  input type=submit value=Update /
/form

or am I still missing something?

On Fri, Jan 8, 2010 at 3:10 AM, Bodis, Jerome bo...@uni-mainz.de wrote:

 Shouldn't the FeedbackPanel be a child of the forms panel, instead of the
 form itself ? (don't know exactly = Your way the feedbackpanel gets
 submitted too)

 Jérôme

 -Original Message-
 From: Chuck Brinkman [mailto:chasb1...@gmail.com]
 Sent: Friday, January 08, 2010 9:02 AM
 To: users@wicket.apache.org
 Subject: how to clear validation error

 I have a form with a html submit button.  In java I wrote my own onSubmit
 to
 handle the form processing.  In the form I have a firstName field that is
 required.
li
  First Name:
  span wicket:id=borderFirstName
input type=text wicket:id=firstName/input
  /span
/li

TextField firstName = new TextField(firstName);
firstName.setRequired(true);
form.add(
new FormComponentFeedbackBorder(borderFirstName).add(
firstName ) );

 All works great as long as the user input is valid.  If I attempt to submit
 an empty firstName field I get the expected message in my FeedbackPanel and
 my firstName text field gets the red asterisk.  I then add a valid
 firstName
 and submit again.  The page remains showing the valid firstName input along
 with the validation errors and onSubmit does not fire.  I must be doing
 something wrong but can't figure it out.

 Thanks for your help.

 I'm using wicket 1.4.5, tomcat 6, java 1.6 and firefox 3.0.8 on fc9.

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




Re: how to clear validation error

2010-01-08 Thread Chuck Brinkman
I created a simple example.  Here is my html and java.  Once I get a
validation error my onSubmit is not called.


!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN 
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
html
head
titleCurrent Page/title
link rel=stylesheet href=dis.css type=text/css /
meta http-equiv=Content-Type
content=text/html; charset=ISO-8859-1 /
/head
body
div id=myPage
div id=feedbackContent
span wicket:id=feedback /
/div
form wicket:id=validateForm
ul
li
First Name:
span wicket:id=borderFirstName input
type=text
wicket:id=firstName/input /span
/li
/ul
input type=submit value=Update /
/form
/div
!-- myPage --
/body
/html


public class Validate extends WebPage {
private static final Logger log = Logger.getLogger(Validate.class);
private String firstName;

public Validate() {
super();
init();
}

private void init() {
DisSession session = null;
session = DisSession.get();
setFirstName(session.getUser().getFirstName());

setDefaultModel(new CompoundPropertyModel(this));

Form form = new Form(validateForm) {
DisSession session = null;

@Override
protected void onSubmit() {
log.info(onSubmit called!);
}
};
add(form);

TextField firstName = new TextField(firstName);
firstName.setRequired(true);
form.add(new FormComponentFeedbackBorder(borderFirstName)
.add(firstName));

FeedbackPanel fbp = new FeedbackPanel(feedback);
add(fbp);

}

public String getFirstName() {
return firstName;
}

public void setFirstName(String firstName) {
this.firstName = firstName;
}

}


Re: how to clear validation error

2010-01-08 Thread Chuck Brinkman
Thanks for your help but I don't understand.  I even got the source code for
http://www.wicket-library.com/wicket-examples/signin/?wicket:bookmarkablePage=:org.apache.wicket.examples.signin.SignInand
when I run this in my environment I have the same issue I have with my
code.  Once I get a validation error onSubmit is never called even after the
input error is fixed.  This works fine when running at
www.wicket-library.com.  What should I do in the onError method to correct
this situation?  Sorry to be so lame and thanks for your help.


Re: how to clear validation error

2010-01-08 Thread Chuck Brinkman
I got the code for wicket 1.4.5 and stepped through to see what is causing
the problem.  Form.anyFormComponentError checks all the components on the
form to see if 1) input is required and 2) is an error message exists for
the component.  It appears to me that once a message is set that it is never
reset.  I don't see how this could be working for others and not working for
me.  Any ideas?  Is there some setup or configuration I'm missing that
causes error messages to be cleared?

On Fri, Jan 8, 2010 at 10:51 AM, Chuck Brinkman chasb1...@gmail.com wrote:

 Thanks for your help but I don't understand.  I even got the source code
 for
 http://www.wicket-library.com/wicket-examples/signin/?wicket:bookmarkablePage=:org.apache.wicket.examples.signin.SignInand
  when I run this in my environment I have the same issue I have with my
 code.  Once I get a validation error onSubmit is never called even after the
 input error is fixed.  This works fine when running at
 www.wicket-library.com.  What should I do in the onError method to correct
 this situation?  Sorry to be so lame and thanks for your help.



Re: how to clear validation error

2010-01-08 Thread Chuck Brinkman
The messages are kept in WebSession and WebSession has
cleanupFeedbackMessages() but this is never called.

Got it.  The session I created had a empty cleanupFeedbackMessages()
method.  Thanks for reading along.

On Fri, Jan 8, 2010 at 9:48 PM, Chuck Brinkman chasb1...@gmail.com wrote:

 I got the code for wicket 1.4.5 and stepped through to see what is causing
 the problem.  Form.anyFormComponentError checks all the components on the
 form to see if 1) input is required and 2) is an error message exists for
 the component.  It appears to me that once a message is set that it is never
 reset.  I don't see how this could be working for others and not working for
 me.  Any ideas?  Is there some setup or configuration I'm missing that
 causes error messages to be cleared?


 On Fri, Jan 8, 2010 at 10:51 AM, Chuck Brinkman chasb1...@gmail.comwrote:

 Thanks for your help but I don't understand.  I even got the source code
 for
 http://www.wicket-library.com/wicket-examples/signin/?wicket:bookmarkablePage=:org.apache.wicket.examples.signin.SignInand
  when I run this in my environment I have the same issue I have with my
 code.  Once I get a validation error onSubmit is never called even after the
 input error is fixed.  This works fine when running at
 www.wicket-library.com.  What should I do in the onError method to
 correct this situation?  Sorry to be so lame and thanks for your help.