Re: WICKET-5083 and Page.isPageStateless

2013-07-15 Thread Dirk Forchel
So, I've started to figure out which of our components tries to access our
Model in #onInitialize. It ended up that almost every component does. This
means, that I have to re-write all these components which might be very time
consuming. I'm wondering why a request with a redirect has to initialize all
these components before doing the actual redirect. In my opionion this makes
no sense.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/WICKET-5083-and-Page-isPageStateless-tp4660166p4660267.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: jquery dialog onclick AjaxButton

2013-07-15 Thread Sebastien
Hi,

In addition, wicket-jquery-ui provides a confirmation button (ConfirmButton
/ ConfirmAjaxButton) which already handles a confirmation jQuery UI dialog.
http://www.7thweb.net/wicket-jquery-ui/button/ConfirmButtonPage

If you need inspiration on how jQuery UI dialog's buttons are handled, you
can have a look at:
https://github.com/sebfz1/wicket-jquery-ui/blob/master/wicket-jquery-ui/src/main/java/com/googlecode/wicket/jquery/ui/widget/dialog/DialogBehavior.java

Best regards,
Sebastien.


On Mon, Jul 15, 2013 at 5:51 AM, Paul BorČ™ p...@bors.ws wrote:

 Sorry my mail client just caught your original post too.
 For the dialog, you want a modal window. Example at:
 http://www.wicket-library.com/wicket-examples/ajax/modal-window

 Have a great day,
 Paul Bors

 On Jul 14, 2013, at 11:48 PM, Paul BorČ™ p...@bors.ws wrote:

  This is not the java script nor the jQuery mailing list. If you use
 those technologies then you should pick up a book or two on them and get
 familiar with them.
 
  In the mid time, Wicket is awesome in that it makes things simple for
 the developer. Try using an AjaxButton or better yet an AjaxFallbackButton.
 See the java doc at:
 
 http://ci.apache.org/projects/wicket/apidocs/6.0.x/org/apache/wicket/ajax/markup/html/form/AjaxButton.html
 
 
 http://ci.apache.org/projects/wicket/apidocs/6.0.x/org/apache/wicket/ajax/markup/html/form/AjaxFallbackButton.html
 
  For examples see Wicket's website or direct link:
  http://www.wicket-library.com/wicket-examples/ajax/form
 
  And if you Google this will pop-up too:
  http://www.7thweb.net/wicket-jquery-ui/button/AjaxButtonPage
 
  Have a great day,
  Paul Bors
 
  On Jul 14, 2013, at 6:29 PM, fachhoch fachh...@gmail.com wrote:
 
  I am not java script expert please   advice is there anything wrong
 with the
  script ?  sdimilar script works for ajax link but for submit buttons
 its
  not please advice .
  Thanks
 
 
 
 
  --
  View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/jquery-dialog-onclick-AjaxButton-tp4660124p4660262.html
  Sent from the Users forum mailing list archive at Nabble.com.
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 



Re: WICKET-5083 and Page.isPageStateless

2013-07-15 Thread Sven Meier
It is necessary to detect whether a page is stateful before redirecting 
to it.


Sven

On 07/15/2013 10:53 AM, Dirk Forchel wrote:

So, I've started to figure out which of our components tries to access our
Model in #onInitialize. It ended up that almost every component does. This
means, that I have to re-write all these components which might be very time
consuming. I'm wondering why a request with a redirect has to initialize all
these components before doing the actual redirect. In my opionion this makes
no sense.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/WICKET-5083-and-Page-isPageStateless-tp4660166p4660267.html
Sent from the Users forum mailing list archive at Nabble.com.

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




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



how to add select/deselect all checkbox to wicket DataTable

2013-07-15 Thread wicket_user_100
Hi All,

I'm trying to add select All Checkbox to the header of wicket DataTable
column, I've read that I need to use CheckGroup and CheckGroupSelector. I'm
doing the following:

Form form = new Form(form);

CheckGroup group = new CheckGroup(group);
   group.add(new CheckGroupSelector(groupselector));
   DataTable sourceTable = new DataTable(mytable, getColumns(),
getDataProvider(), 10);
   sourceTable.setOutputMarkupPlaceholderTag(true);
   group.add(sourceTable);
   add(form);
   form.add(group);


private List getColumns() {
ListIColumnlt;MyItem, String ret = Lists.newArrayList();
ret.add(new AbstractColumnMyItem, String(new Model()) {
@Override
public void populateItem(ItemICellPopulatorlt;MyItem
cellItem, String componentId, IModelMyItem rowModel) {
CheckBoxPanel checkBoxPanel = new
CheckBoxPanel(componentId);
cellItem.add(checkBoxPanel);
}
});
...
}


input type=checkbox wicket:id=groupselectorcheck/uncheck all/input
[Lookup Results]



To add CheckBox to the DataTable I must use a Panel, so I have the
following:
public class CheckBoxPanel extends Panel {

private CheckBox field;

public CheckBoxPanel(String id, IModelBoolean model) {
super(id);
field = new CheckBox(checkBox, model);
add(field);
}

public CheckBoxPanel(String id) {
this(id, new ModelBoolean());
}

public CheckBox getField() {
return field;
}
}

In CheckBoxPanel.html

body
wicket:panel xmlns:wicket=http://wicket.apache.org;
input type=checkbox wicket:id=checkBox
/wicket:panel
/body

Actually it does show checkgroup but under my table and checking/un-checking
it does not affect the check boxes under it. What am I doing wrong here?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/how-to-add-select-deselect-all-checkbox-to-wicket-DataTable-tp4660270.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: how to add select/deselect all checkbox to wicket DataTable

2013-07-15 Thread Sven Meier

CheckBoxPanel checkBoxPanel = new CheckBoxPanel(componentId);



Which model do you pass to the CheckBoxPanel?

Sven

On 07/15/2013 01:28 PM, wicket_user_100 wrote:

Hi All,

I'm trying to add select All Checkbox to the header of wicket DataTable
column, I've read that I need to use CheckGroup and CheckGroupSelector. I'm
doing the following:

Form form = new Form(form);

CheckGroup group = new CheckGroup(group);
group.add(new CheckGroupSelector(groupselector));
DataTable sourceTable = new DataTable(mytable, getColumns(),
getDataProvider(), 10);
sourceTable.setOutputMarkupPlaceholderTag(true);
group.add(sourceTable);
add(form);
form.add(group);


private List getColumns() {
 ListIColumnlt;MyItem, String ret = Lists.newArrayList();
 ret.add(new AbstractColumnMyItem, String(new Model()) {
 @Override
 public void populateItem(ItemICellPopulatorlt;MyItem
cellItem, String componentId, IModelMyItem rowModel) {
 CheckBoxPanel checkBoxPanel = new
CheckBoxPanel(componentId);
 cellItem.add(checkBoxPanel);
 }
 });
...
}


input type=checkbox wicket:id=groupselectorcheck/uncheck all/input
[Lookup Results]



To add CheckBox to the DataTable I must use a Panel, so I have the
following:
public class CheckBoxPanel extends Panel {

 private CheckBox field;

 public CheckBoxPanel(String id, IModelBoolean model) {
 super(id);
 field = new CheckBox(checkBox, model);
 add(field);
 }

 public CheckBoxPanel(String id) {
 this(id, new ModelBoolean());
 }

 public CheckBox getField() {
 return field;
 }
}

In CheckBoxPanel.html

body
 wicket:panel xmlns:wicket=http://wicket.apache.org;
 input type=checkbox wicket:id=checkBox
 /wicket:panel
/body

Actually it does show checkgroup but under my table and checking/un-checking
it does not affect the check boxes under it. What am I doing wrong here?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/how-to-add-select-deselect-all-checkbox-to-wicket-DataTable-tp4660270.html
Sent from the Users forum mailing list archive at Nabble.com.

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




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



RE: how to add select/deselect all checkbox to wicket DataTable

2013-07-15 Thread Paul Bors
I would reconsider your use-case.

Select all for what? All results on a single page? All results for the
entire data table? All results that are filtered? Select all on this page,
then more on the second page?

I added a SelectAllPanel which allows you do to all of the above. Perhaps I
should share it with the WicketStuff's extension project if one does not
already exits.

~ Thank you,
  Paul Bors

-Original Message-
From: Sven Meier [mailto:s...@meiers.net] 
Sent: Monday, July 15, 2013 10:38 AM
To: users@wicket.apache.org
Subject: Re: how to add select/deselect all checkbox to wicket DataTable

 CheckBoxPanel checkBoxPanel = new CheckBoxPanel(componentId);


Which model do you pass to the CheckBoxPanel?

Sven

On 07/15/2013 01:28 PM, wicket_user_100 wrote:
 Hi All,

 I'm trying to add select All Checkbox to the header of wicket 
 DataTable column, I've read that I need to use CheckGroup and 
 CheckGroupSelector. I'm doing the following:

 Form form = new Form(form);

 CheckGroup group = new CheckGroup(group);
 group.add(new CheckGroupSelector(groupselector));
 DataTable sourceTable = new DataTable(mytable, getColumns(), 
 getDataProvider(), 10);
 sourceTable.setOutputMarkupPlaceholderTag(true);
 group.add(sourceTable);
 add(form);
 form.add(group);


 private List getColumns() {
  ListIColumnlt;MyItem, String ret = Lists.newArrayList();
  ret.add(new AbstractColumnMyItem, String(new Model()) {
  @Override
  public void populateItem(ItemICellPopulatorlt;MyItem
 cellItem, String componentId, IModelMyItem rowModel) {
  CheckBoxPanel checkBoxPanel = new 
 CheckBoxPanel(componentId);
  cellItem.add(checkBoxPanel);
  }
  });
 ...
 }


 input type=checkbox wicket:id=groupselectorcheck/uncheck 
 all/input [Lookup Results]



 To add CheckBox to the DataTable I must use a Panel, so I have the
 following:
 public class CheckBoxPanel extends Panel {

  private CheckBox field;

  public CheckBoxPanel(String id, IModelBoolean model) {
  super(id);
  field = new CheckBox(checkBox, model);
  add(field);
  }

  public CheckBoxPanel(String id) {
  this(id, new ModelBoolean());
  }

  public CheckBox getField() {
  return field;
  }
 }

 In CheckBoxPanel.html

 body
  wicket:panel xmlns:wicket=http://wicket.apache.org;
  input type=checkbox wicket:id=checkBox
  /wicket:panel
 /body

 Actually it does show checkgroup but under my table and 
 checking/un-checking it does not affect the check boxes under it. What am
I doing wrong here?



 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/how-to-add-select-deselect-
 all-checkbox-to-wicket-DataTable-tp4660270.html
 Sent from the Users forum mailing list archive at Nabble.com.

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



-
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



How to resolve this java.util.ConcurrentModificationException

2013-07-15 Thread saty
Getting below error at times, looks like its coming from usage of apache
common LRUMAa class, not sure where to start fixing this. 

15 Jul 2013 11:03:42.099 [http-apr--exec-3] ERROR
o.a.w.serialize.java.JavaSerializer - error writing object [Page class =
com.abc.xyz.web.HomePage, id = 5, render count = 6]: null
java.util.ConcurrentModificationException: null
at
org.apache.commons.collections.map.AbstractLinkedMap$LinkIterator.nextEntry(AbstractLinkedMap.java:560)
~[commons-collections-3.2.1.jar:3.2.1]
at
org.apache.commons.collections.map.AbstractLinkedMap$LinkMapIterator.next(AbstractLinkedMap.java:372)
~[commons-collections-3.2.1.jar:3.2.1]
at
org.apache.commons.collections.map.AbstractHashedMap.doWriteObject(AbstractHashedMap.java:1181)
~[commons-collections-3.2.1.jar:3.2.1]
at 
org.apache.commons.collections.map.LRUMap.doWriteObject(LRUMap.java:420)
~[commons-collections-3.2.1.jar:3.2.1]
at 
org.apache.commons.collections.map.LRUMap.writeObject(LRUMap.java:404)
~[commons-collections-3.2.1.jar:3.2.1]
at sun.reflect.GeneratedMethodAccessor130.invoke(Unknown Source) 
~[na:na]
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
~[na:1.7.0_21]
at java.lang.reflect.Method.invoke(Method.java:601) ~[na:1.7.0_21]
at 
java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:975)
~[na:1.7.0_21]
at 
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1480)
[na:1.7.0_21]
at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1416)
[na:1.7.0_21]
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1174)
[na:1.7.0_21]
at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1528)
[na:1.7.0_21]
at 
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1493)
[na:1.7.0_21]
at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1416)
[na:1.7.0_21]

Thanks for your help.




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-resolve-this-java-util-ConcurrentModificationException-tp4660273.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: How to resolve this java.util.ConcurrentModificationException

2013-07-15 Thread Sven Meier

Hi,

Wicket doesn't use commons collections - check which maps you pass into 
components or models.


Sven

On 07/15/2013 05:55 PM, saty wrote:

Getting below error at times, looks like its coming from usage of apache
common LRUMAa class, not sure where to start fixing this.

15 Jul 2013 11:03:42.099 [http-apr--exec-3] ERROR
o.a.w.serialize.java.JavaSerializer - error writing object [Page class =
com.abc.xyz.web.HomePage, id = 5, render count = 6]: null
java.util.ConcurrentModificationException: null
at
org.apache.commons.collections.map.AbstractLinkedMap$LinkIterator.nextEntry(AbstractLinkedMap.java:560)
~[commons-collections-3.2.1.jar:3.2.1]
at
org.apache.commons.collections.map.AbstractLinkedMap$LinkMapIterator.next(AbstractLinkedMap.java:372)
~[commons-collections-3.2.1.jar:3.2.1]
at
org.apache.commons.collections.map.AbstractHashedMap.doWriteObject(AbstractHashedMap.java:1181)
~[commons-collections-3.2.1.jar:3.2.1]
at 
org.apache.commons.collections.map.LRUMap.doWriteObject(LRUMap.java:420)
~[commons-collections-3.2.1.jar:3.2.1]
at 
org.apache.commons.collections.map.LRUMap.writeObject(LRUMap.java:404)
~[commons-collections-3.2.1.jar:3.2.1]
at sun.reflect.GeneratedMethodAccessor130.invoke(Unknown Source) 
~[na:na]
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
~[na:1.7.0_21]
at java.lang.reflect.Method.invoke(Method.java:601) ~[na:1.7.0_21]
at 
java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:975)
~[na:1.7.0_21]
at 
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1480)
[na:1.7.0_21]
at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1416)
[na:1.7.0_21]
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1174)
[na:1.7.0_21]
at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1528)
[na:1.7.0_21]
at 
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1493)
[na:1.7.0_21]
at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1416)
[na:1.7.0_21]

Thanks for your help.




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-resolve-this-java-util-ConcurrentModificationException-tp4660273.html
Sent from the Users forum mailing list archive at Nabble.com.

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




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



RE: Upgrade to wicket 6 giving blank page in IE 9

2013-07-15 Thread prasad.bhandagi
Using the DOCTYPE of HTML 4.01 STRICT worked !
Note 1: Previously used DOCTYPE was XHTML 1.0 STRICT
Note 2: I did not have to do any changes to make the HTML pages compliant to
4.01. When I validated there were many issues with compliance to HTML 4.01
STRICT. It still worked by merely changing the DOCTYPE.

While the magic worked, it would interesting to know the trick behind the
magic.
Not exactly sure how Wicket uses the DOCTYPE while rendering and the
sporadic nature of the issue baffled me.


Paul Bors wrote
 Let me guess, the image that always shows up is a static resource w/o any
 wicket id?
 
 I remember I had a similar problem and if you look inside your webapp
 server
 logs you would see the errors/warnings from Wicket.
 
 If I remember right I fixed it by sticking to strict HTML 4.01.
 
 Try adding the following to all of your pages:
 lt;!DOCTYPE HTML PUBLIC quot;-//W3C//DTD HTML 4.01//ENquot;
 quot;http://www.w3.org/TR/html4/strict.dtdquot;gt;
 
 See if that does the magic for you.
 
 ~ Thank you,
   Paul Bors
 
 -Original Message-
 From: prasad.bhandagi [mailto:

 prasad.bhandagi@

 ] 
 Sent: Thursday, July 11, 2013 4:44 PM
 To: 

 users@.apache

 Subject: Re: Upgrade to wicket 6 giving blank page in IE 9
 
 Am upgrading from Wicket 1.3. However I am upgrading it step by step for
 each major version. The problem did not occur when upgraded to 1.4 and
 1.5.
 Only after upgrading to 6.9 the problem started occuring. Am using
 Weblogic
 10.3,
 JDK6
 
 
 
 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Upgrade-to-wicket-6-giving-blank-
 page-in-IE-9-tp4660213p4660215.html
 Sent from the Users forum mailing list archive at Nabble.com.
 
 -
 To unsubscribe, e-mail: 

 users-unsubscribe@.apache

 For additional commands, e-mail: 

 users-help@.apache

 
 
 
 -
 To unsubscribe, e-mail: 

 users-unsubscribe@.apache

 For additional commands, e-mail: 

 users-help@.apache





--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Upgrade-to-wicket-6-giving-blank-page-in-IE-9-tp4660213p4660276.html
Sent from the Users forum mailing list archive at Nabble.com.

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



RE: Upgrade to wicket 6 giving blank page in IE 9

2013-07-15 Thread Cedric Gatay
I think this is something browser related, IE while deciding which rendering technique to adopt can do strange queries. It could be interesting if you dumped what happens on network using IE or another "working" browser with your old non working code.Regards, __Cedric Gatay (@Cedric_Gatay)http://code-troopers.com|http://www.bloggure.info|http://cedric.gatay.fr On 15 juillet 2013 at 20:35:40, prasad.bhandagi (prasad.bhand...@marsh.com) wrote: Using the DOCTYPE of HTML 4.01 STRICT worked !
Note 1: Previously used DOCTYPE was XHTML 1.0 STRICT
Note 2: I did not have to do any changes to make the HTML pages compliant to
4.01. When I validated there were many issues with compliance to HTML 4.01
STRICT. It still worked by merely changing the DOCTYPE.

While the magic worked, it would interesting to know the trick behind the
magic.
Not exactly sure how Wicket uses the DOCTYPE while rendering and the
sporadic nature of the issue baffled me.


Paul Bors wrote
 Let me guess, the image that always shows up is a static resource w/o any
 wicket id?
  
 I remember I had a similar problem and if you look inside your webapp
 server
 logs you would see the errors/warnings from Wicket.
  
 If I remember right I fixed it by sticking to strict HTML 4.01.
  
 Try adding the following to all of your pages:
 lt;!DOCTYPE HTML PUBLIC quot;-//W3C//DTD HTML 4.01//ENquot;
 quot;http://www.w3.org/TR/html4/strict.dtdquot;gt;
  
 See if that does the magic for you.
  
 ~ Thank you,
   Paul Bors
  
 -Original Message-
 From: prasad.bhandagi [mailto:

 prasad.bhandagi@

 ]  
 Sent: Thursday, July 11, 2013 4:44 PM
 To:  

 users@.apache

 Subject: Re: Upgrade to wicket 6 giving blank page in IE 9
  
 Am upgrading from Wicket 1.3. However I am upgrading it step by step for
 each major version. The problem did not occur when upgraded to 1.4 and
 1.5.
 Only after upgrading to 6.9 the problem started occuring. Am using
 Weblogic
 10.3,
 JDK6
  
  
  
 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Upgrade-to-wicket-6-giving-blank-
 page-in-IE-9-tp4660213p4660215.html
 Sent from the Users forum mailing list archive at Nabble.com.
  
 -
 To unsubscribe, e-mail:  

 users-unsubscribe@.apache

 For additional commands, e-mail:  

 users-help@.apache

  
  
  
 -
 To unsubscribe, e-mail:  

 users-unsubscribe@.apache

 For additional commands, e-mail:  

 users-help@.apache





--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Upgrade-to-wicket-6-giving-blank-page-in-IE-9-tp4660213p4660276.html
Sent from the Users forum mailing list archive at Nabble.com.

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


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

RE: Upgrade to wicket 6 giving blank page in IE 9

2013-07-15 Thread Paul Bors
This has nothing to do with Wicket, is just that IE likes to be different and
mess things up almost always :)

Read about the Defining document compatibility on MSDN:
http://msdn.microsoft.com/en-us/library/cc288325(v=vs.85).aspx

And then pay attention to the links at the bottom of the article:
* When to use legacy document modes
* Controlling default rendering



-
~ Thank you,
p...@bors.ws
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Upgrade-to-wicket-6-giving-blank-page-in-IE-9-tp4660213p4660278.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Form questions

2013-07-15 Thread Daniel Watrous
Hello,

I'm interested in creating a single Form that will accommodate the
following use cases
1) display blank for creating new records
2) pre-populate for editing existing records
3) map submitted values on to an existing domain object
4) accommodate two actions, Save Draft -or- Publish

I'm following Wicket in Action and within my Form constructor I create my
model, like this

CnavUrl cnavUrl = new BasicCnavUrl();
IModel model = new Model((Serializable) cnavUrl);
setModel(model);

I then use PropertyModel

add(new TextField(url, new PropertyModel(cnavUrl, url)));

For the two actions, I'm creating the Button objects like this

add(new Button(publish, model) {
@Override
public void onSubmit() {
CnavUrl cnavUrl = (CnavUrl) getModelObject();
System.out.println(publish);
}
});

Some problems I can't figure out. The code to create the button complains
that it requires a CnavUrl but gets back a String.

It seems that a new BasicCnavUrl is created once with the Form. What
happens on subsequent calls? Can I always expect my model to have the data
from the current form submission?

Is there a best way to incorporate the idea of an edit, where the model is
pre-populated from a data source and pre-fills the Form fields?

Thanks,
Daniel


RE: Form questions

2013-07-15 Thread Paul Bors
On wicket's home page http://wicket.apache.org to the left there is a Learn
- Books section.
Under the Books page the first book is Wicket free guide.
Download it and read chapter 9 and 10 if not the entire book.

You might be interested in section 9.2 Models and JavaBeans and 9.3.1
Form and models in particular.

In short... an empty form field has a null model object (or empty string)
and to pre-populate have your POJO that you use as a model object have its
instance variables populated with the values you want (from a db or etc).

~ Thank you,
  Paul Bors

-Original Message-
From: Daniel Watrous [mailto:dwmaill...@gmail.com] 
Sent: Monday, July 15, 2013 5:41 PM
To: users@wicket.apache.org
Subject: Form questions

Hello,

I'm interested in creating a single Form that will accommodate the following
use cases
1) display blank for creating new records
2) pre-populate for editing existing records
3) map submitted values on to an existing domain object
4) accommodate two actions, Save Draft -or- Publish

I'm following Wicket in Action and within my Form constructor I create my
model, like this

CnavUrl cnavUrl = new BasicCnavUrl();
IModel model = new Model((Serializable) cnavUrl);
setModel(model);

I then use PropertyModel

add(new TextField(url, new PropertyModel(cnavUrl, url)));

For the two actions, I'm creating the Button objects like this

add(new Button(publish, model) {
@Override
public void onSubmit() {
CnavUrl cnavUrl = (CnavUrl) getModelObject();
System.out.println(publish);
}
});

Some problems I can't figure out. The code to create the button complains
that it requires a CnavUrl but gets back a String.

It seems that a new BasicCnavUrl is created once with the Form. What happens
on subsequent calls? Can I always expect my model to have the data from the
current form submission?

Is there a best way to incorporate the idea of an edit, where the model is
pre-populated from a data source and pre-fills the Form fields?

Thanks,
Daniel


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