RE: DB lookup time-out within DataTable Iterator

2010-09-08 Thread Frank Prins
Hey!

@Ernesto,
Thx for the idea, but I am afraid that won't be the way to go. The issue
is coming with the initial page having the  table, I am not having a set
of search parameters at that moment. The thing is that I was looking for
some way to interact with the table 'after' giving the dataprovider to
the table.

@Mike,
Aha, you're so close to the problem we're having here! Exactly that is
happening: the H2 database we are using has some problems with the
combination of the SELECT/WHERE/ORDER. It is not using an index in that
case, a known problem with this database we just found out :-(
So, a solution might be switching to another DB, or solving it in the
user interface, just as you are mentioning. Can you shine a light on way
to go for having another page component render based on the provider? I

Thx!

-Oorspronkelijk bericht-
Van: Michael O'Cleirigh [mailto:michael.ocleir...@rivulet.ca] 
Verzonden: dinsdag 7 september 2010 20:43
Aan: users@wicket.apache.org
Onderwerp: Re: DB lookup time-out within DataTable Iterator

  Hi Frank ,

Are you sure that your dao is setting max results on the underlying
query?  The provider.iterator(...) should only be returning the current
page values and typically the page size would be small like 25 to 100.

Also it depends on your backend database since I know that some (older
version of PostgreSQL) have issues with doing a SELECT ... ORDER BY X
LIMIT Y without looking at all of the values in the unlimited select.

If the total number of rows is reasonable (say several 1000) then just
return the full list into Java and then use a Comparator to sort the
loaded data according to the sort property.

In terms of handling this issue in your interface you can just have
another component render based on the value from the provider.  If you
can cache the results of the provider like the loadable detachable model
does then there will only be 1 hit on the db and then you can show zero
rows in the table and an error message label.

Regards,

Mike



 Breaking my head on the following, hopefully someone might be able to 
 give me a hint?

 In a page which serves a view on a log database with quite a lot of 
 rows, I am using a DataTable to show the rows. The data for the table 
 is being served by a SortableDataProvider which looks a bit like this:

 ...
public SortableSystemlogDataProvider(Map searchParams) {
  // creating new instance, set default sorting, Search parameters,

 counting dataset
  this.dao = new H2InterfaceDaoImpl();
  setSort(sl_id, false);
  this.searchParams = searchParams;
  this.systemlogListSize = dao.countAllSystemlogRows(searchParams);
}

public Iterator iterator(int first, int count) {
  SortParam sp = getSort();
  if (sp.getProperty() == null) {
setSort(sl_id, false);
sp = getSort();
  }
  // return iterator on search list by params
  paginatedList = dao.selectSystemlogs(this.searchParams,
 sp.getProperty(), sp.isAscending(), first, count);
  return paginatedList.iterator();
}
 ...

 The issue I am running into at this moment is this: in case of large 
 datasets, the db call from within the iterator gives a timeout, and 
 returns null. In this case I would like to give the user a warning 
 modalwindow and the possibility to change the search options. Of 
 course I am able to catch the timeout, and return an empty set, but I 
 cannot see how to move on from that, as I am already within the
DataTable.

 Anyone has an idea on this?

 Thanks in advance, regards,
 Frank Prins

 -
 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 run some JS only once after Ajax rendering is done ?

2010-09-08 Thread Joseph Pachod

Hi

have you tried invoking AjaxRequestTarget's method appendJavascript? Inside if
statement try to write 
AjaxRequestTarget.get().appendJavascript(jQuery.initEdit(););


I had a similar problem some weeks ago and it worked.  
  


It won't be run only once even if added multiple time (for example from 
different instances of the same behavior attached to different components).



thx still :)

++
joseph

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



Re: How to run some JS only once after Ajax rendering is done ?

2010-09-08 Thread Joseph Pachod

Fabrice BUQUET wrote:

Maybe you can try IHeaderResponse.renderOnDomReadyJavascript
  

Thanks a lot, it did it :)

It wasn't too obvious that Wicket checks in this given method for not 
rendering twice the same javascript.


Great anyway, thanks again :)

++
joseph

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



Re: How to run some JS only once after Ajax rendering is done ?

2010-09-08 Thread Joseph Pachod

Bernhard Schauer wrote:
I think you could do it as follows. The js function 'bindYourEvent()' 
is called after the the components that are added to the 
AjaxRequestTarget are 're-painted'.


   form.add(new AjaxButton(set) {
   @Override
   protected void onSubmit(final AjaxRequestTarget target, 
final Form? form) {

   target.appendJavascript(bindYourEvent(););
   }

   });

mfg Bernhard


hi Bernard

The issue with this approach is that I would then have to think of 
adding the JS every time some re rendered components need some init call.


However, as BUQUET Fabrice said, it works with  
IHeaderResponse.renderOnDomReadyJavascript.


thanks anyway

++
joseph

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



Wicketstuff / compatible projects with wicket 1.5?

2010-09-08 Thread nino martinez wael
Hi

Im wondering which projects are compatible  tested with wicket 1.5?


Im considering to start a new project using 1.5 but are wondering if there
are any projects at all compatible with it.. I am going to need drag / drop
functionality.


regards Nino


Re: checkGroup - 2 out of 5?

2010-09-08 Thread nino martinez wael
and still need that validator...

2010/9/7 Xavier López xavil...@gmail.com

 To switch the last check with the first checked in case there are two of
 them checked already, you could also use an
 AjaxFormComponentUpdatingBehavior to do it server-side, though that would
 only be disadvantages. I remember some nasty issues with the onchange event
 on checkboxes with IE, and the server-side ajax would be just doing dom
 attribute manipulations. You'll be much better off doing it with JS, as
 Igor
 stated.

 Cheers,
 Xavi

 2010/9/7 nino martinez wael nino.martinez.w...@gmail.com

  yup validator's more correct
 
  2010/9/7 Xavier López xavil...@gmail.com
 
   I'd do it with a component validator. That would avoid the Form's
  onSubmit
   being called and getting the model updated with incorrect user data. Or
   also
   with a FormValidator. If I remember correctly, you can call
   getConvertedInput to get the Checkgroup's list of selected values.
  
   Cheers,
   Xavi
  
   2010/9/7 nino martinez wael nino.martinez.w...@gmail.com
  
you an also do it server side... just check your model on submit
 etc..
   
2010/9/6 Zeldor pgronkiew...@gmail.com
   

 Oh, I hoped that it can be avoided. So anyone has AJAX example at
  hand?
 --
 View this message in context:

   
  
 
 http://apache-wicket.1842946.n4.nabble.com/checkGroup-2-out-of-5-tp2527723p2527763.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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


   
  
 



 --
 Klein bottle for rent--inquire within.



[OT] where is JPA 2.0 API spec in maven?

2010-09-08 Thread nino martinez wael
Sorry to spam but I am wondering where the JPA 2.0 Spec are cant find
it in maven...

regards Nino

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



How can I capture the data on one panel 1 when i click submit button on panel 2

2010-09-08 Thread Ben

Hi,

I have a page and multiple panels added to it.

e.g I have panel1 and panel2 added to a page.

On Panel I have components RadioChoice, dropdownchoice,text area that
accepts input from the user.
Panel 2 has two textfields (accepts the login info) and submit button.

When i click submit button on panel2, how can I capture the data from
panel1.

Here is my panel1

public class ImageQualityPanel extends Panel {


public ImageQualityPanel(String id, WicketAnalysisForm aform) {
super(id);

ImageQuality imageQuality = new ImageQuality(); //model

add(new ImageQualityForm(imageQualityForm, new
CompoundPropertyModel(imageQuality), aform));
}

private static class ImageQualityForm extends Form {

public ImageQualityForm(String id, IModel model, WicketAnalysisForm
aform) {
super(id, model);

add(new Label(qualityQuestion, ()));
add(new Label(safetyQuestion, (...)));
add(new Label(locationQuestion, (...)));
add(new Label(commentsQuestion, (...)));

ListString options = Arrays.asList(Yes, No);

add(new RadioChoice(qualityGroup, options);
add(new RadioChoice(criteriaGroup, options);

TextArea notes = new TextArea(notes);
notes.setRequired(true);
add(notes);

DropDownChoice group = new DropDownChoice(location);
group.setChoices(new PropertyModel(model, location) {
public Object getObject() {
ListString l = new ArrayListString(5);
l.add(Location 1);
l.add(Location 2);
l.add(Location 3);
l.add(Location 4);
return l;
}
});
add(group);

aform.setImageQuality((ImageQuality)model.getObject());

I am getting null when i try to get the model data.

 
Thanks in anticipation


-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-can-I-capture-the-data-on-one-panel-1-when-i-click-submit-button-on-panel-2-tp2531350p2531350.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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



Re: [OT] where is JPA 2.0 API spec in maven?

2010-09-08 Thread Korbinian Bachl - privat

JEE 6:
dependency
groupIdjavax/groupId
artifactIdjavaee-api/artifactId
version6.0/version
scopeprovided/scope
/dependency

JPA 2:
dependency
groupIdorg.eclipse.persistence/groupId
artifactIdeclipselink/artifactId
version2.0.0/version
scopeprovided/scope
/dependency

Best,

Korbinian



Am 08.09.10 15:35, schrieb nino martinez wael:

Sorry to spam but I am wondering where the JPA 2.0 Spec are cant find
it in maven...

regards Nino

-
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: [OT] where is JPA 2.0 API spec in maven?

2010-09-08 Thread Matt Jensen


Group: org.hibernate.javax.persistence
Artifact: hibernate-jpa-2.0-api
Version: 1.0.0.Final

On 9/8/2010 8:35 AM, nino martinez wael wrote:

Sorry to spam but I am wondering where the JPA 2.0 Spec are cant find
it in maven...

regards Nino

-
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



Word-wrapping in Wicket-TinyMCE

2010-09-08 Thread Johan Haleby

Hi,

Has anyone managed to get word-wrapping to work in wicket-contrib-tinymce?
In that case how? By default you get a horizontal scrollbar when the
textline is larger than the size of the TinyMCE window. 

/Johan
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Word-wrapping-in-Wicket-TinyMCE-tp2531412p2531412.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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



Re: [OT] where is JPA 2.0 API spec in maven?

2010-09-08 Thread Jan Kriesten

Hi,

 JPA 2:
 dependency
 groupIdorg.eclipse.persistence/groupId
 artifactIdeclipselink/artifactId
 version2.0.0/version
 scopeprovided/scope
 /dependency

AFAIK the current version is 2.0.2

Best regards, --- Jan.


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



Re: How can I capture the data on one panel 1 when i click submit button on panel 2

2010-09-08 Thread Jeremy Thomerson
Is there a Wicket form wrapping both panels? If so, it will work, even if
both panels also have a form in them.

Jeremy Thomerson
http://wickettraining.com
-- sent from my smart phone, so please excuse spelling, formatting, or
compiler errors

On Sep 8, 2010 9:15 AM, Ben benarje...@yahoo.com wrote:


Hi,

I have a page and multiple panels added to it.

e.g I have panel1 and panel2 added to a page.

On Panel I have components RadioChoice, dropdownchoice,text area that
accepts input from the user.
Panel 2 has two textfields (accepts the login info) and submit button.

When i click submit button on panel2, how can I capture the data from
panel1.

Here is my panel1

public class ImageQualityPanel extends Panel {


   public ImageQualityPanel(String id, WicketAnalysisForm aform) {
   super(id);

   ImageQuality imageQuality = new ImageQuality(); //model

   add(new ImageQualityForm(imageQualityForm, new
CompoundPropertyModel(imageQuality), aform));
   }

   private static class ImageQualityForm extends Form {

   public ImageQualityForm(String id, IModel model, WicketAnalysisForm
aform) {
   super(id, model);

   add(new Label(qualityQuestion, ()));
   add(new Label(safetyQuestion, (...)));
   add(new Label(locationQuestion, (...)));
   add(new Label(commentsQuestion, (...)));

   ListString options = Arrays.asList(Yes, No);

   add(new RadioChoice(qualityGroup, options);
   add(new RadioChoice(criteriaGroup, options);

   TextArea notes = new TextArea(notes);
   notes.setRequired(true);
   add(notes);

   DropDownChoice group = new DropDownChoice(location);
   group.setChoices(new PropertyModel(model, location) {
   public Object getObject() {
   ListString l = new ArrayListString(5);
   l.add(Location 1);
   l.add(Location 2);
   l.add(Location 3);
   l.add(Location 4);
   return l;
   }
   });
   add(group);

   aform.setImageQuality((ImageQuality)model.getObject());

I am getting null when i try to get the model data.


Thanks in anticipation


--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/How-can-I-capture-the-data-on-one-panel-1-when-i-click-submit-button-on-panel-2-tp2531350p2531350.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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


RE: How can I capture the data on one panel 1 when i click submit button on panel 2

2010-09-08 Thread MONZON Jose
What you want is to implement the EventBus pattern (formally Observer
Pattern).

Basically, with an Eventbus, your panels subscribe to a given event and
when some other panel fires that event the subscriber gets the
message:

Panel1:
//Subscribe to event Type1.
eventBus.addHandler(EventType1.class,
new EventType1Handler() {
@Override
public void oneEvent(final EventType1 event) {
//do whatever with the event
}
});

Panel2:
onClick(.){

//After some action, fire that something has change to
all
//those subscribers that might be interested.
eventBus.fireEvent(new EventType1(whatever));
}

I'm quite new using Wicket, but I haven't seen anything like this
implemented. But I think it's quite trivial. It would be quite nice if
Wicket itself provides you with an out-of-the-box EventBus, the same way
GWT does. 

Have a look to the GWT implementation, you can practically copy-paste
it. There it's called HandlerManager.

I don't know what's the standard way to solve the problem you have.
Surelly everybody has run into it sooner or later. I'm very interested
in hearing what a seasoned Wicket developer has to say.




-Original Message-
From: Ben [mailto:benarje...@yahoo.com] 
Sent: Mittwoch, 8. September 2010 16:15
To: users@wicket.apache.org
Subject: How can I capture the data on one panel 1 when i click submit
button on panel 2


Hi,

I have a page and multiple panels added to it.

e.g I have panel1 and panel2 added to a page.

On Panel I have components RadioChoice, dropdownchoice,text area that
accepts input from the user.
Panel 2 has two textfields (accepts the login info) and submit button.

When i click submit button on panel2, how can I capture the data from
panel1.

Here is my panel1

public class ImageQualityPanel extends Panel {


public ImageQualityPanel(String id, WicketAnalysisForm aform) {
super(id);

ImageQuality imageQuality = new ImageQuality(); //model

add(new ImageQualityForm(imageQualityForm, new
CompoundPropertyModel(imageQuality), aform));
}

private static class ImageQualityForm extends Form {

public ImageQualityForm(String id, IModel model,
WicketAnalysisForm
aform) {
super(id, model);

add(new Label(qualityQuestion, ()));
add(new Label(safetyQuestion, (...)));
add(new Label(locationQuestion, (...)));
add(new Label(commentsQuestion, (...)));

ListString options = Arrays.asList(Yes, No);

add(new RadioChoice(qualityGroup, options);
add(new RadioChoice(criteriaGroup, options);

TextArea notes = new TextArea(notes);
notes.setRequired(true);
add(notes);

DropDownChoice group = new DropDownChoice(location);
group.setChoices(new PropertyModel(model, location) {
public Object getObject() {
ListString l = new ArrayListString(5);
l.add(Location 1);
l.add(Location 2);
l.add(Location 3);
l.add(Location 4);
return l;
}
});
add(group);

aform.setImageQuality((ImageQuality)model.getObject());

I am getting null when i try to get the model data.

 
Thanks in anticipation


-- 
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/How-can-I-capture-the-data-on
-one-panel-1-when-i-click-submit-button-on-panel-2-tp2531350p2531350.htm
l
Sent from the Wicket - User mailing list archive at Nabble.com.

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



 The EFG Mail Gateway made the following annotation 

This message is for the addressee only and may contain confidential or
privileged information. You must delete and not use it if you are not
the intended recipient. It may not be secure or error-free. All e-mail
communications to and from the EFG Financial Products Group may be monitored.
Processing of incoming e-mails cannot be guaranteed. Any views expressed
in this message are those of the individual sender. This message is for
information purposes only. All liability of the EFG Financial Products Group
and its entities for any damages resulting from e-mail use is excluded.
US persons are kindly requested to read the important legal information
presented at following URL: http://www.efgfp.com. If you suspect that the
message may have been intercepted or amended, please call the sender.
Should you require any further information, please contact the Compliance
Manager on complia...@efgfp.com.

Re: How can I capture the data on one panel 1 when i click submit button on panel 2

2010-09-08 Thread jcgarciam

Jose, Check this out

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

On Wed, Sep 8, 2010 at 12:38 PM, MONZON Jose [via Apache Wicket] 
ml-node+2531520-6845597-65...@n4.nabble.comml-node%2b2531520-6845597-65...@n4.nabble.com
 wrote:

 What you want is to implement the EventBus pattern (formally Observer
 Pattern).

 Basically, with an Eventbus, your panels subscribe to a given event and
 when some other panel fires that event the subscriber gets the
 message:

 Panel1:
 //Subscribe to event Type1.
 eventBus.addHandler(EventType1.class,
 new EventType1Handler() {
 @Override
 public void oneEvent(final EventType1 event) {
 //do whatever with the event
 }
 });

 Panel2:
 onClick(.){
 
 //After some action, fire that something has change to
 all
 //those subscribers that might be interested.
 eventBus.fireEvent(new EventType1(whatever));
 }

 I'm quite new using Wicket, but I haven't seen anything like this
 implemented. But I think it's quite trivial. It would be quite nice if
 Wicket itself provides you with an out-of-the-box EventBus, the same way
 GWT does.

 Have a look to the GWT implementation, you can practically copy-paste
 it. There it's called HandlerManager.

 I don't know what's the standard way to solve the problem you have.
 Surelly everybody has run into it sooner or later. I'm very interested
 in hearing what a seasoned Wicket developer has to say.




 -Original Message-
 From: Ben [mailto:[hidden 
 email]http://user/SendEmail.jtp?type=nodenode=2531520i=0]

 Sent: Mittwoch, 8. September 2010 16:15
 To: [hidden email] http://user/SendEmail.jtp?type=nodenode=2531520i=1
 Subject: How can I capture the data on one panel 1 when i click submit
 button on panel 2


 Hi,

 I have a page and multiple panels added to it.

 e.g I have panel1 and panel2 added to a page.

 On Panel I have components RadioChoice, dropdownchoice,text area that
 accepts input from the user.
 Panel 2 has two textfields (accepts the login info) and submit button.

 When i click submit button on panel2, how can I capture the data from
 panel1.

 Here is my panel1

 public class ImageQualityPanel extends Panel {


 public ImageQualityPanel(String id, WicketAnalysisForm aform) {
 super(id);

 ImageQuality imageQuality = new ImageQuality(); //model

 add(new ImageQualityForm(imageQualityForm, new
 CompoundPropertyModel(imageQuality), aform));
 }

 private static class ImageQualityForm extends Form {

 public ImageQualityForm(String id, IModel model,
 WicketAnalysisForm
 aform) {
 super(id, model);

 add(new Label(qualityQuestion, ()));
 add(new Label(safetyQuestion, (...)));
 add(new Label(locationQuestion, (...)));
 add(new Label(commentsQuestion, (...)));

 ListString options = Arrays.asList(Yes, No);

 add(new RadioChoice(qualityGroup, options);
 add(new RadioChoice(criteriaGroup, options);

 TextArea notes = new TextArea(notes);
 notes.setRequired(true);
 add(notes);

 DropDownChoice group = new DropDownChoice(location);
 group.setChoices(new PropertyModel(model, location) {
 public Object getObject() {
 ListString l = new ArrayListString(5);
 l.add(Location 1);
 l.add(Location 2);
 l.add(Location 3);
 l.add(Location 4);
 return l;
 }
 });
 add(group);

 aform.setImageQuality((ImageQuality)model.getObject());

 I am getting null when i try to get the model data.


 Thanks in anticipation


 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/How-can-I-capture-the-data-onhttp://apache-wicket.1842946.n4.nabble.com/How-can-I-capture-the-data-on?by-user=t
 -one-panel-1-when-i-click-submit-button-on-panel-2-tp2531350p2531350.htm
 l
 Sent from the Wicket - User mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=2531520i=2
 For additional commands, e-mail: [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=2531520i=3



  The EFG Mail Gateway made the following annotation 

 This message is for the addressee only and may contain confidential or
 privileged information. You must delete and not use it if you are not
 the intended recipient. It may not be secure or error-free. All e-mail
 communications to and from the EFG Financial Products Group may be
 monitored.
 Processing of incoming e-mails 

Re: [OT] where is JPA 2.0 API spec in maven?

2010-09-08 Thread Korbinian Bachl - privat
in fact the current is 2.1.1, but 2.0.0 is reference implementation and 
for the JPA 2.0 API it wont matter what 2.0.x it is (see scope provided 
here - just API);
- usually one uses JPA API of the persistence provider he's using as 
long as he won't depend on an app server;


Best,

Korbinian



Am 08.09.10 16:51, schrieb Jan Kriesten:


Hi,


JPA 2:
dependency
 groupIdorg.eclipse.persistence/groupId
 artifactIdeclipselink/artifactId
 version2.0.0/version
 scopeprovided/scope
 /dependency


AFAIK the current version is 2.0.2

Best regards, --- Jan.


-
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 Ajax integration

2010-09-08 Thread Rodolfo Hansen
How can I use Wicket.Ajax.Request to post a json string to a
DefaultAjaxBehaviour?

On the Javascript side I basically did something like this: 

function setupSend(xhr) {
xhr.setRequestHeader(Wicket-Ajax, true);
if (typeof(Wicket.Focus.lastFocusId) != undefined 
Wicket.Focus.lastFocusId !=   Wicket.Focus.lastFocusId != null)
xhr.setRequestHeader(Wicket-FocusedElementId,
Wicket.Focus.lastFocusId);
xhr.setRequestHeader(Accept, text/xml);
  };
  
  function success(data) {
var xml = data;
if (typeof xml == string) {
  xml = new ActiveXObject(Microsoft.XMLDOM);
  xml.async = false;
  xml.loadXML(data);
}
(new Wicket.Ajax.Call(${feedbackURL})).loadedCallback(xml);
  };
  
  function call(data, revertFunc) {
$.ajax({
  url : ${feedbackURL}, type: 'POST', contentType:
'application/json;charset=UTF-8'
 ,dataType: (($.browser.msie) ? text : xml), data :
$.toJSON(data)
 ,beforeSend : setupSend ,success : success, error : revertFunc
});
  };


to do something similar to what Wicket.Ajax.Request.post does, except I
change the contentType to 'application/json'


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