file listing in the browser

2013-04-29 Thread pen
Hi,
I am using wicket 1.5. 
I would like to know how to implement, given a directory (/tmp/backup/) list
all the files from that directory in the browser. I have a bunch of csv
files . 
I want to navigate to the page backup.html in the browse and list all the
files from that directory. All these running in tomcat.

Thanks 
Pen 



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/file-listing-in-the-browser-tp4658393.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



replacing parent panel how to

2011-11-11 Thread pen
Hi All,

I have two panels left and right panels. I have two Ajax links on the left
panel, page1 and page2. clicking on either of them i can replace the right
panels. 
But now I have some link on the right panel, I need to replace the whole
right panel itself, without changing the rest of the page.
I tried lot of things but didn't work. Any help would be greatly
appreciated.  

`Pen

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/replacing-parent-panel-how-to-tp4032603p4032603.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



template navigation using ajax

2011-11-02 Thread pen
Hi All,

I need to build a Ajax pages, similar to wicket template example using
markup inheritance. Instead of refreshing whole pages when clicked on page1
or page2. Only the content on the right side should be refreshed using Ajax. 
What is the best way to implement this?

`Pen 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/template-navigation-using-ajax-tp3983962p3983962.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: template navigation using ajax

2011-11-02 Thread pen
This is the wicket page example
http://www.wicket-library.com/wicket-examples/template/wicket/bookmarkable/org.apache.wicket.examples.template.pageinheritance.Page1?0

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/template-navigation-using-ajax-tp3983962p3983966.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 attach treelink to pages

2011-10-13 Thread pen
thanks Martin for quick response,
my question is how to do the same thing in the nested tree component, I have
looked at the wicket examples but none of them have what I am looking.
They have basic nested tree component hyperlink, but on clicking the page
link, it should navigate to respective page.

`Pen 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-attach-treelink-to-pages-tp3900319p3901894.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



How to attach treelink to pages

2011-10-12 Thread pen
Hi all,

I am building a tree component, with the list of pages,

 root
  -Page1
  -page2
  -page3

onclick it should navigate to respective page accordingly. some thing like
this,
add(new BookmarkablePageLinkVoid(page1, UserList.class));
add(new BookmarkablePageLinkVoid(page2, RoleList.class));

How to get this in tree component and set the responsepage ?

tree = new LinkTree(tree, createTreeModel()){ 
@Override
protected void onNodeLinkClicked(Object node, BaseTree tree,
AjaxRequestTarget target) {
super.onNodeLinkClicked(node, tree, target);

final DefaultMutableTreeNode treeNode = 
(DefaultMutableTreeNode) node;
final IModel model = (IModel) treeNode.getUserObject(); 

setResponsePage(  ?  );

}

Thanks.
Pen


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-attach-treelink-to-pages-tp3900319p3900319.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 dynamically generate HTML page?

2007-12-05 Thread Pen


Thanks Matthijs,

I got a chance to look at Wouter Huijnink slides. This is what exactly I am
looking. Can you please forward the AutoComponentPanel code. That would be
great.

~Praveen



Matthijs Wensveen-2 wrote:
 
 Hello Praveen,
 
 Wouter Huijnink presented something similar to what you need at the 
 wicket meetup in Amsterdam. We generate html dynamically from xml, using 
 xslt. A component called AutoComponentPanel parses the html and adds 
 components to the hierarchy accordingly. This is actually a two-step 
 process. The first step is telling wicket you want to supply markup 
 yourself instead of letting wicket read it from the corresponding html 
 file. You can do this by implementing IMarkupResourceStreamProvider and 
 if applicable also IMarkupCacheKeyProvider. Then you need to parse the 
 markup stream and add components.
 
 If you're interested I can send the AutoComponentPanel code. It still 
 needs some work to make it shine, but we plan to open source it anyway 
 as part of a wicket-based QTI framework.
 
 PS. Unfortunately Wouter's slides aren't uploaded yet.
 
 
 Pen wrote:
 thanks Johan for your reply. I did take look into your slides. 

 We can generate HTML pages, we have no issue with it. But how to display
 this newly created HTML pages which only exists in memory, there is no
 physical file. And also to navigate to this new HTML page.

 For example If I create a simple HTML page at runtime like below
 test.html.
 How to display it and navigate to it. As it also requires corresponding
 test.java. This is simple one. But what if we have wicket:Ids we need
 construct the Java files with all the action listener also.

 test.html 

 html
 body
h1Hello world! /h1
 /body
 html


 ~Praveen



 Johan Compagner wrote:
   
 Generate on one side the html by a servlet or special template
 generator, that reads in your db data and generate the component
 structure on the other side.

 Look at he slides i put on of the presentation that i did for the
 wicket user group in the netherlands

 2007/12/4, Pen [EMAIL PROTECTED]:
 
 I looked into the example wicketstuff-crud, this is basically in memory
 database with basic CRUD operation. this is not what exactly I am
 looking.
 Let me restate the question. We have application where in user can
 create
 a
 webpages using web designer by drag-n-drop where is html elements like
 text,
 image, selection box, combo box and save it in DB.
 It will be Json format parse it to POJO and store in DB. for example
 Image
 object looks like this
 which has got position, style, etc .
 [{position:({left:60, top:40}),
 size:({width:100,height:80}),
 positionTop:40,positionLeft:60,sizeWidth:100,sizeHeight:80,
 cssClass:,
 style:left:60px;top:40px;width:100px;height:80px;,
 ]}}]})

 Now we need to read from the DB and reconstruct the same Image object
 has
 a
 html page. We can construct the above object with HTML tags.
 But the question is how to display this html pages, since it exists
 only
 in
 memory and also how to navigate to this newly created page.

 ~Praveen







 igor.vaynberg wrote:
   
 see how wicketstuff-crud does it in wicket-stuff svn

 -igor


 On Dec 3, 2007 6:30 PM, Pen [EMAIL PROTECTED] wrote:
 
 I am a new wicker user.  We need to construct/generate  a HTML page
 dynamically at runtime from the HTML elements like image and text. 
   
 This
   
 page only exists in memory(session/cache) and  there is no physical
   
 file.
   
 so
 how to generate such page and corresponding java class. How this can
   
 be
   
 done
 for static elements like image and text versus dynamically for form
 submit.
 Also how to navigate to this newly generated html page.

 ~Praveen
 --
 View this message in context:

   
 http://www.nabble.com/How-to-dynamically-generate-HTML-page--tf4940771.html#a14143413
   
 Sent from the Wicket - User mailing list archive at Nabble.com.


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


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



 
 --
 View this message in context:
 http://www.nabble.com/How-to-dynamically-generate-HTML-page--tf4940771.html#a14156946
 Sent from the Wicket - User mailing list archive at Nabble.com.


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


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



 

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

Re: How to dynamically generate HTML page?

2007-12-04 Thread Pen


thanks igor.. 



igor.vaynberg wrote:
 
 see how wicketstuff-crud does it in wicket-stuff svn
 
 -igor
 
 
 On Dec 3, 2007 6:30 PM, Pen [EMAIL PROTECTED] wrote:


 I am a new wicker user.  We need to construct/generate  a HTML page
 dynamically at runtime from the HTML elements like image and text.  This
 page only exists in memory(session/cache) and  there is no physical file.
 so
 how to generate such page and corresponding java class. How this can be
 done
 for static elements like image and text versus dynamically for form
 submit.
 Also how to navigate to this newly generated html page.

 ~Praveen
 --
 View this message in context:
 http://www.nabble.com/How-to-dynamically-generate-HTML-page--tf4940771.html#a14143413
 Sent from the Wicket - User mailing list archive at Nabble.com.


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


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

-- 
View this message in context: 
http://www.nabble.com/How-to-dynamically-generate-HTML-page--tf4940771.html#a14155610
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: How to dynamically generate HTML page?

2007-12-04 Thread Pen


I looked into the example wicketstuff-crud, this is basically in memory
database with basic CRUD operation. this is not what exactly I am looking. 
Let me restate the question. We have application where in user can create a
webpages using web designer by drag-n-drop where is html elements like text,
image, selection box, combo box and save it in DB. 
It will be Json format parse it to POJO and store in DB. for example Image
object looks like this
which has got position, style, etc .
[{position:({left:60, top:40}),
size:({width:100,height:80}),
positionTop:40,positionLeft:60,sizeWidth:100,sizeHeight:80,
cssClass:,
style:left:60px;top:40px;width:100px;height:80px;,
]}}]})

Now we need to read from the DB and reconstruct the same Image object has a
html page. We can construct the above object with HTML tags.
But the question is how to display this html pages, since it exists only in
memory and also how to navigate to this newly created page. 

~Praveen







igor.vaynberg wrote:
 
 see how wicketstuff-crud does it in wicket-stuff svn
 
 -igor
 
 
 On Dec 3, 2007 6:30 PM, Pen [EMAIL PROTECTED] wrote:


 I am a new wicker user.  We need to construct/generate  a HTML page
 dynamically at runtime from the HTML elements like image and text.  This
 page only exists in memory(session/cache) and  there is no physical file.
 so
 how to generate such page and corresponding java class. How this can be
 done
 for static elements like image and text versus dynamically for form
 submit.
 Also how to navigate to this newly generated html page.

 ~Praveen
 --
 View this message in context:
 http://www.nabble.com/How-to-dynamically-generate-HTML-page--tf4940771.html#a14143413
 Sent from the Wicket - User mailing list archive at Nabble.com.


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


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

-- 
View this message in context: 
http://www.nabble.com/How-to-dynamically-generate-HTML-page--tf4940771.html#a14156946
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: How to dynamically generate HTML page?

2007-12-04 Thread Pen


thanks Johan for your reply. I did take look into your slides. 

We can generate HTML pages, we have no issue with it. But how to display
this newly created HTML pages which only exists in memory, there is no
physical file. And also to navigate to this new HTML page.

For example If I create a simple HTML page at runtime like below test.html.
How to display it and navigate to it. As it also requires corresponding
test.java. This is simple one. But what if we have wicket:Ids we need
construct the Java files with all the action listener also.

test.html 

html
body
   h1Hello world! /h1
/body
html


~Praveen



Johan Compagner wrote:
 
 Generate on one side the html by a servlet or special template
 generator, that reads in your db data and generate the component
 structure on the other side.
 
 Look at he slides i put on of the presentation that i did for the
 wicket user group in the netherlands
 
 2007/12/4, Pen [EMAIL PROTECTED]:


 I looked into the example wicketstuff-crud, this is basically in memory
 database with basic CRUD operation. this is not what exactly I am
 looking.
 Let me restate the question. We have application where in user can create
 a
 webpages using web designer by drag-n-drop where is html elements like
 text,
 image, selection box, combo box and save it in DB.
 It will be Json format parse it to POJO and store in DB. for example
 Image
 object looks like this
 which has got position, style, etc .
 [{position:({left:60, top:40}),
 size:({width:100,height:80}),
 positionTop:40,positionLeft:60,sizeWidth:100,sizeHeight:80,
 cssClass:,
 style:left:60px;top:40px;width:100px;height:80px;,
 ]}}]})

 Now we need to read from the DB and reconstruct the same Image object has
 a
 html page. We can construct the above object with HTML tags.
 But the question is how to display this html pages, since it exists only
 in
 memory and also how to navigate to this newly created page.

 ~Praveen







 igor.vaynberg wrote:
 
  see how wicketstuff-crud does it in wicket-stuff svn
 
  -igor
 
 
  On Dec 3, 2007 6:30 PM, Pen [EMAIL PROTECTED] wrote:
 
 
  I am a new wicker user.  We need to construct/generate  a HTML page
  dynamically at runtime from the HTML elements like image and text. 
 This
  page only exists in memory(session/cache) and  there is no physical
 file.
  so
  how to generate such page and corresponding java class. How this can
 be
  done
  for static elements like image and text versus dynamically for form
  submit.
  Also how to navigate to this newly generated html page.
 
  ~Praveen
  --
  View this message in context:
 
 http://www.nabble.com/How-to-dynamically-generate-HTML-page--tf4940771.html#a14143413
  Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

 --
 View this message in context:
 http://www.nabble.com/How-to-dynamically-generate-HTML-page--tf4940771.html#a14156946
 Sent from the Wicket - User mailing list archive at Nabble.com.


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


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

-- 
View this message in context: 
http://www.nabble.com/How-to-dynamically-generate-HTML-page--tf4940771.html#a14158861
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: howto JSON Wicket works?

2007-11-26 Thread Pen


I am not really understanding your question? we are not creating any json
object in browser. I believe that 's what we want to do in the normal form 
submit create the json object. 
This is just a simple example to demonstrate the Ajax round trip. Here
bascially you get the updated data back. This can happen if we have form
submit and a grid which gets updated on the form submit.

Can you please look into the below example and provide some solution. I have
copied both the html and java code. If you can tell me how to handle the
data in wicket and send it back in the below example that would be great. I
am not receving the form post data in the request object in wicket.

Thanks
~Pen


Johan Compagner wrote:
 
 Again, why do you try to generate a json object in the browser??
 Why not create a normal wicket form that you post to the server and
 then in the form submit method you create the json object
 
 On 11/24/07, Pen [EMAIL PROTECTED] wrote:


 I don't know how to get the postdata from the request object in wicket. I
 do
 see the request being sent. As you see from the example I am struck
 there, I
 don't know how to proceed further.
 This is just a basic example of round trip using Json, AJax and wicket
 through form submit. You get the Json data modify it update back the
 form.
 There will be more complicated of this like grid update.
 Also there can be normal form submit of Json object. In either case I
 don't
 know how to handle on the server in wicket. I have done lot using JSP, it
 looks bit different here. And no good documentation.
 If you can provide some coding example or some pointer it would be great.

 ~Pen





 Johan Compagner wrote:
 
  Which part goes wrong?
  Do you see the request being send?
  Why do this though json? If you need json objects on the server why
  not using  a normal form post and create the json object on the
  server?
 
  2007/11/24, Pen [EMAIL PROTECTED]:
 
  Greetings,
 
  I want to know how to handle the Jquery, JSon data in the wicket. What
 is
  the best way to do it.
  I have created simple form which sends the json data across to server
 and
  replies back to the form.
  I am not sure how to handle the request and response in wicket. I am
  using
  Json-lib 2.1 for jdk1.5
  Can anybody analyze the below program and suggest me what is wrong.
 
  demo.html
  head
script src=scripts/jquery-1.2.1.js type=text/javascript
  charset=utf-8/script 
script type=text/javascript charset=utf-8
$(document).ready(function() {
$(#testForm).submit(sendForm);
});

function sendForm(e) {
e.preventDefault();
var data = {
field1: $(#field1).val(),
field2: $(#field2).val(),
field3: $(#field3).val(),
};

$(#sent .content).html(data.toSource());
$.post(demo, message=[ + data.toSource() + ];, 
  receiveForm,
  json);
};  

 function receiveForm(data) {
$(#field1).val(data.field1);
$(#field2).val(data.field2);
$(#field3).val(data.field3);

$(#received .content).html(data.toSource());
};
/script

  /head
  body
 
  form wicket:id=testForm  
h1 id=formForm/h1

label for=field1Field One:/label
input type=text id=field1 /

label for=field2Field Two:/label
input type=text id=field2 /

label for=field3Field Three:/label
input type=text id=field3 /

input type=submit id=submitter value=Post the data /
  /form
 
  div id=sent class=readout
h1 id=sent_data:Sent Data:/h1
div class=content

/div
  /div
  div id=received class=readout
 
h1 id=received_dataReceived Data:/h1
div class=content

/div
  /div
  /body
  /html
 
  Here is the wicket program to handle this
 
  demo.java
  public class Demo extends BasePage {
public Demo() {

Form form = new Form(testForm,new 
  CompoundPropertyModel(this));
add(form);
form.add(new AjaxFormSubmitBehavior(form,onsubmit){
private static final long serialVersionUID = 1L;
  
 
protected void onSubmit(AjaxRequestTarget target) {
Request request = getRequest();
String data = request.getParameter(data); 
  
try {
JSONObject jsonData = new JSONObject();
JSONObject selectedNode = 
  jsonData.getJSONObject(data); 
} catch (Exception e) {
throw new

Re: howto JSON Wicket works?

2007-11-24 Thread Pen


I don't know how to get the postdata from the request object in wicket. I do
see the request being sent. As you see from the example I am struck there, I
don't know how to proceed further. 
This is just a basic example of round trip using Json, AJax and wicket
through form submit. You get the Json data modify it update back the form.
There will be more complicated of this like grid update.
Also there can be normal form submit of Json object. In either case I don't
know how to handle on the server in wicket. I have done lot using JSP, it
looks bit different here. And no good documentation.
If you can provide some coding example or some pointer it would be great.

~Pen





Johan Compagner wrote:
 
 Which part goes wrong?
 Do you see the request being send?
 Why do this though json? If you need json objects on the server why
 not using  a normal form post and create the json object on the
 server?
 
 2007/11/24, Pen [EMAIL PROTECTED]:

 Greetings,

 I want to know how to handle the Jquery, JSon data in the wicket. What is
 the best way to do it.
 I have created simple form which sends the json data across to server and
 replies back to the form.
 I am not sure how to handle the request and response in wicket. I am
 using
 Json-lib 2.1 for jdk1.5
 Can anybody analyze the below program and suggest me what is wrong.

 demo.html
 head
  script src=scripts/jquery-1.2.1.js type=text/javascript
 charset=utf-8/script
  script type=text/javascript charset=utf-8
  $(document).ready(function() {
  $(#testForm).submit(sendForm);
  });
  
  function sendForm(e) {
  e.preventDefault();
  var data = {
  field1: $(#field1).val(),
  field2: $(#field2).val(),
  field3: $(#field3).val(),
  };
  
  $(#sent .content).html(data.toSource());
  $.post(demo, message=[ + data.toSource() + ];, 
 receiveForm,
 json);
  };  
  
   function receiveForm(data) {
  $(#field1).val(data.field1);
  $(#field2).val(data.field2);
  $(#field3).val(data.field3);
  
  $(#received .content).html(data.toSource());
  };
  /script
  
 /head
 body

 form wicket:id=testForm  
  h1 id=formForm/h1
  
  label for=field1Field One:/label
  input type=text id=field1 /
  
  label for=field2Field Two:/label
  input type=text id=field2 /
  
  label for=field3Field Three:/label
  input type=text id=field3 /
  
  input type=submit id=submitter value=Post the data /
 /form

 div id=sent class=readout
  h1 id=sent_data:Sent Data:/h1
  div class=content
  
  /div
 /div
 div id=received class=readout

  h1 id=received_dataReceived Data:/h1
  div class=content
  
  /div
 /div
 /body
 /html

 Here is the wicket program to handle this

 demo.java
 public class Demo extends BasePage {
  public Demo() {
  
  Form form = new Form(testForm,new 
 CompoundPropertyModel(this));
  add(form);
  form.add(new AjaxFormSubmitBehavior(form,onsubmit){
  private static final long serialVersionUID = 1L;
 

  protected void onSubmit(AjaxRequestTarget target) {
  Request request = getRequest();
  String data = request.getParameter(data); 
 
  try {
  JSONObject jsonData = new JSONObject();
  JSONObject selectedNode = 
 jsonData.getJSONObject(data); 
  } catch (Exception e) {
  throw new RuntimeException(Failed to 
 parse selected node from
 reply: 
 + data);
  }
  //target.addComponent(received)// Add to the 
 response data
  }
  });
  }
 }


 ~Pen
 --
 View this message in context:
 http://www.nabble.com/howto-JSON-Wicket-works--tf4865188.html#a13922782
 Sent from the Wicket - User mailing list archive at Nabble.com.


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


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

-- 
View this message in context: 
http://www.nabble.com/howto-JSON-Wicket-works--tf4865188.html#a13928701
Sent from the Wicket - User

howto JSON Wicket works?

2007-11-23 Thread Pen

Greetings,

I want to know how to handle the Jquery, JSon data in the wicket. What is
the best way to do it.
I have created simple form which sends the json data across to server and
replies back to the form.
I am not sure how to handle the request and response in wicket. I am using
Json-lib 2.1 for jdk1.5
Can anybody analyze the below program and suggest me what is wrong.

demo.html
head
script src=scripts/jquery-1.2.1.js type=text/javascript
charset=utf-8/script   
script type=text/javascript charset=utf-8
$(document).ready(function() {
$(#testForm).submit(sendForm);
});

function sendForm(e) {
e.preventDefault();
var data = {
field1: $(#field1).val(),
field2: $(#field2).val(),
field3: $(#field3).val(),
};

$(#sent .content).html(data.toSource());
$.post(demo, message=[ + data.toSource() + ];, 
receiveForm,
json);
};  

 function receiveForm(data) {
$(#field1).val(data.field1);
$(#field2).val(data.field2);
$(#field3).val(data.field3);

$(#received .content).html(data.toSource());
};
/script

/head
body

form wicket:id=testForm  
h1 id=formForm/h1

label for=field1Field One:/label
input type=text id=field1 /

label for=field2Field Two:/label
input type=text id=field2 /

label for=field3Field Three:/label
input type=text id=field3 /

input type=submit id=submitter value=Post the data /
/form

div id=sent class=readout
h1 id=sent_data:Sent Data:/h1
div class=content

/div
/div
div id=received class=readout

h1 id=received_dataReceived Data:/h1
div class=content

/div
/div
/body
/html

Here is the wicket program to handle this 

demo.java
public class Demo extends BasePage {
public Demo() {

Form form = new Form(testForm,new 
CompoundPropertyModel(this));
add(form);
form.add(new AjaxFormSubmitBehavior(form,onsubmit){
private static final long serialVersionUID = 1L;


protected void onSubmit(AjaxRequestTarget target) {
Request request = getRequest();
String data = request.getParameter(data); 

try {
JSONObject jsonData = new JSONObject();
JSONObject selectedNode = 
jsonData.getJSONObject(data); 
} catch (Exception e) {
throw new RuntimeException(Failed to 
parse selected node from reply: 
+ data);
} 
//target.addComponent(received)// Add to the 
response data
}
});
}
}


~Pen
-- 
View this message in context: 
http://www.nabble.com/howto-JSON-Wicket-works--tf4865188.html#a13922782
Sent from the Wicket - User mailing list archive at Nabble.com.


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



How Wicket Ajax?

2007-11-08 Thread Pen

We are using the Wicket as our MVC framework. I have read wicket has a very
good Ajax support . I am newbie. Does anybody know how to use it with jquery
and json with wicket.
Here is an example Jquery grid example and json, but the server side code is
in PHP, how to do it in wicket

http://trirand.com/jqgrid/jqgrid.html

Any sample example will be greatly appreciated.

~Pen
-- 
View this message in context: 
http://www.nabble.com/How-Wicket-Ajax--tf4776029.html#a13661957
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: How to Jquery, Json, wicket spring?

2007-11-06 Thread Pen



David Bernard-2 wrote:
 
 Hi,
 
 I started the wicketstuff-jquery project, currently there is no doc/wiki,
 only the [source][1] is available and a demo application ([source][2],
 [war][3]).
 For the communication with between client and server, I used the native
 Wicket API, simpler than trying to write it in JSON (client and server).
 
 every feedbacks, helps,... are welcome through this mailing list (please
 prefix subject with [wicketstuff-jquery] or via the issue tracker) [4].
 
 [1]:
 https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-jquery/
 [2]:
 https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-jquery-examples/
 [3]:
 http://alchim.sourceforge.net/download/wicketstuff-jquery-examples-0.1-SNAPSHOT.war
 [4]: http://wicketstuff.org/jira/browse/WSJQUERY
 
 Thanks for the reply ,we are using jquery, Json and wicket. Do you have
 any example or pointer to that it would be great. 
 
 Pen wrote:
 
 We are developing a new web based application in wicket, we need to
 integrate Ajax(Jquery 1.2) with JSON data format and wicket(1.3). 
 Does anybody know how to do this? any sample example or pointer will be
 great full. I have googled and could not find anything.
 Also is there any example to integrate Wicket(1.3) with spring using new
 spring annotations 2.5?
 
 thanks
 Pen
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/How-to-Jquery%2C-Json%2C-wicket-spring--tf4749547.html#a13612834
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: How to Jquery, Json, wicket spring?

2007-11-05 Thread Pen



David Bernard-2 wrote:
 
 Hi,
 
 I started the wicketstuff-jquery project, currently there is no doc/wiki,
 only the [source][1] is available and a demo application ([source][2],
 [war][3]).
 For the communication with between client and server, I used the native
 Wicket API, simpler than trying to write it in JSON (client and server).
 
 every feedbacks, helps,... are welcome through this mailing list (please
 prefix subject with [wicketstuff-jquery] or via the issue tracker) [4].
 
 [1]:
 https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-jquery/
 [2]:
 https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-jquery-examples/
 [3]:
 http://alchim.sourceforge.net/download/wicketstuff-jquery-examples-0.1-SNAPSHOT.war
 [4]: http://wicketstuff.org/jira/browse/WSJQUERY
 
  thanks I will take look into it.
 
 Pen wrote:
 
 We are developing a new web based application in wicket, we need to
 integrate Ajax(Jquery 1.2) with JSON data format and wicket(1.3). 
 Does anybody know how to do this? any sample example or pointer will be
 great full. I have googled and could not find anything.
 Also is there any example to integrate Wicket(1.3) with spring using new
 spring annotations 2.5?
 
 thanks
 Pen
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/How-to-Jquery%2C-Json%2C-wicket-spring--tf4749547.html#a13592076
Sent from the Wicket - User mailing list archive at Nabble.com.


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



How to Jquery, Json, wicket spring?

2007-11-04 Thread Pen


We are developing a new web based application in wicket, we need to
integrate Ajax(Jquery 1.2) with JSON data format and wicket(1.3). 
Does anybody know how to do this? any sample example or pointer will be
great full. I have googled and could not find anything.
Also is there any example to integrate Wicket(1.3) with spring using new
spring annotations 2.5?

thanks
Pen
-- 
View this message in context: 
http://www.nabble.com/How-to-Jquery%2C-Json%2C-wicket-spring--tf4749547.html#a13581144
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Wicket Session Management?

2007-10-30 Thread Pen

Thanks Matej for your quick reply, these are stupid questions asked by the
team members, who are resisting to implement Wicket. Trying to come up with
some issues.

So basically you are telling that session management is not a issue at all
in wicket, that's good.


Thanks Again!

Dummy


Matej Knopp-2 wrote:
 
 Pen  wrote / napĂ­sal(a):
 I have a few question regarding the wicket usage. we are trying to
 Implement
 wicket as our next MVC framework, Can please someone answer the questions
 below
 
 Hi
 
 - about session support - wicket stores the render state of most
 renderer's
 in session for different users of the systems. This means large/very
 large
 sessions that need to be supported, means memory crunch, performance
 degradation and implementing the failover at production level really
 hard.
 Wicket doesn't store a render state of renderer's (have no clue what 
 that might be). Wicket stores a component tree of last page in session.
 
 Btw. this doesn't even sound like a question, it sounds like stating 
 facts, not to mention that the facts are based on wrong assumtptions.
 
 Very large sessions? I've seen a model 2 application with sessions over 
 a megabyte. Usually a wicket page is (unless it's a big one - with lot 
 of components) around 30kb (of course this is very relative, this just 
 reflects my experience with most of my wicket based projects). I don't 
 think a 30kb session results in performance degradation or makes 
 implementing failover difficult.
 
 
 - Also it looks like wicket  requires code changes when more pages are
 added
 and each page needs to have separate handler and it can not be done in
 configuration file. This may become an issue when number of pages
 increase
 in future.
 
 
 What handler? What configuration file? Page has a class that implements 
 the logic (probably what you mean by handler). How is this related to 
 a config file? Wicket doesn't need any config file. There's no external 
 plumbing. I fail to see how this results in an issue with increased page 
 numbers, as the pages are completely independent.
 
 Also I'm kinda missing a question mark in this question again, which 
 make it seem like a statement (wrong again as far as I can tell). I'm 
 not sure if that was intended.
 
 -Matej
 
 Dummy
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Wicket-Session-Management--tf4721575.html#a13500318
Sent from the Wicket - User mailing list archive at Nabble.com.


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