Re: Browser file download complete callback

2008-11-04 Thread Igor Vaynberg
hmm, seems like a bug. it looks like we now close the input stream
directly instead of using close() which allows users not to have to
keep a reference to the stream. #close() can probably be removed.
please open a jira issue.

-igor

On Mon, Nov 3, 2008 at 3:28 AM, bjolletz [EMAIL PROTECTED] wrote:

 Hi!

 I would like to have a download link through which a user can download some
 bytearray from my database. So far no problem, I accomplish this by creating
 a new WebResource and implementing the getResourceStream method.

 My problem is that I would like to be notified when the user is finished
 downloading so that I can mark the downloaded item as downloaded in my
 database. I'm using an AbstractResourceStream and I thought I would be able
 to do this by overriding the close() method. However, the close method of
 the AbstractResourceStream never seems to be called.

 The implementation of the getResourceStream() method of my WebResource
 object:

public IResourceStream getResourceStream() {
return new AbstractResourceStream() {
ByteArrayInputStream bais;
public InputStream getInputStream() throws
 ResourceStreamNotFoundException {
bais = getByteArrayInputStreamFromDB();
return bais;
}

public void close() throws IOException {
bais.close();
markByteArrayAsDownloadedInDB();
}
};
}


 Why is it that the close() method is never called? Is there a better/other
 way to do it? Is it at all possible to get a callback when a user is
 finished downloading the bytearray?

 Thanks in advance!

 /Daniel
 --
 View this message in context: 
 http://www.nabble.com/Browser-file-download-complete-callback-tp20300290p20300290.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Re: Browser file download complete callback

2008-11-04 Thread bjolletz

Thanks for the reply!

So you're suggesting that the close() method of the IResourceStream should
be removed?

Isn't there a point in having the close() method? In my case, by overriding
the close() method, it would be possible to be notified when a download is
complete. Don't know how else I would accomplish that (any suggestions?).

Wouldn't it be a better idea to implement a close() method with default
close behaviour in the abstract classes implementing the IResourceStream
interface? That way, by extending one of these abstract resource stream
classes, you dont have to mind about the close() method if you dont want to.

/Daniel



igor.vaynberg wrote:
 
 hmm, seems like a bug. it looks like we now close the input stream
 directly instead of using close() which allows users not to have to
 keep a reference to the stream. #close() can probably be removed.
 please open a jira issue.
 
 -igor
 
 On Mon, Nov 3, 2008 at 3:28 AM, bjolletz [EMAIL PROTECTED]
 wrote:

 Hi!

 I would like to have a download link through which a user can download
 some
 bytearray from my database. So far no problem, I accomplish this by
 creating
 a new WebResource and implementing the getResourceStream method.

 My problem is that I would like to be notified when the user is finished
 downloading so that I can mark the downloaded item as downloaded in my
 database. I'm using an AbstractResourceStream and I thought I would be
 able
 to do this by overriding the close() method. However, the close method of
 the AbstractResourceStream never seems to be called.

 The implementation of the getResourceStream() method of my WebResource
 object:

public IResourceStream getResourceStream() {
return new AbstractResourceStream() {
ByteArrayInputStream bais;
public InputStream getInputStream() throws
 ResourceStreamNotFoundException {
bais = getByteArrayInputStreamFromDB();
return bais;
}

public void close() throws IOException {
bais.close();
markByteArrayAsDownloadedInDB();
}
};
}


 Why is it that the close() method is never called? Is there a
 better/other
 way to do it? Is it at all possible to get a callback when a user is
 finished downloading the bytearray?

 Thanks in advance!

 /Daniel
 --
 View this message in context:
 http://www.nabble.com/Browser-file-download-complete-callback-tp20300290p20300290.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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


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

-- 
View this message in context: 
http://www.nabble.com/Browser-file-download-complete-callback-tp20300290p20318122.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



WASP/SWARM status

2008-11-04 Thread Wayne Pope
Hi,

After the staggering loss of Maurice I was wondering if anyone had picked up
the baton with WASP/SWARM?
I look at svn and the last update was from mrmean so I presume not.

I just wanted to check

Thanks
Wayne


Re: WASP/SWARM status

2008-11-04 Thread Wayne Pope
hi Nino,

no I was looking at :
https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicket-security/

let me checkout the other and have a look

I never know where I'm ment to find things with Wicket!

On Tue, Nov 4, 2008 at 10:10 AM, Nino Saturnino Martinez Vazquez Wael 
[EMAIL PROTECTED] wrote:

 I've been wondering the same thing...

 Where this what you looked at?


 https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/branches/wicket-security-1.4-earlyaccess/


 Wayne Pope wrote:

 Hi,

 After the staggering loss of Maurice I was wondering if anyone had picked
 up
 the baton with WASP/SWARM?
 I look at svn and the last update was from mrmean so I presume not.

 I just wanted to check

 Thanks
 Wayne




 --
 -Wicket for love

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


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




Re: attribute modifier on onclick

2008-11-04 Thread Michael Sparer

show us some code

miro wrote:
 
 I have a linkthis contains a label , now I want  to change the style
 of the label   whenever user clicks on the link ,  to do this   I override 
 the method onClick()  in  link component  I am retrieving the label  and
 adding  simpleattributemodifier to the label , but there is no change ,
 when I see the generated html it does not include  the added style  , can
 I change the style of a component in  any of the   events of a component ?
 


-
Michael Sparer
http://talk-on-tech.blogspot.com
-- 
View this message in context: 
http://www.nabble.com/attribute-modifier-on-onclick-tp20310246p20318681.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: AjaxFallbackButton and setDefaultFormProcessing(false)

2008-11-04 Thread Michael Sparer

you could try nesting two forms - the inner form would then be the username
that gets submitted by the ajaxbutton.
if you then submit the outer form eventually the inner form gets resubmitted
as well ... AFAIK

and in case you're wondering: wicket supports nested forms (HTML doesn't)
and converts the inner form into a div ...

hope that helps,
Michael


jpswain wrote:
 
 I'm building a registration page for my wicket app, and I'm having trouble
 getting an AjaxFallbackButton to work the way I would like it to.  I have
 several fields for the user to fill out on my registration page, including
 email, password, desired-username, etc.
 
 What I want is to have an AjaxFallbackButton next to desired-username to
 see if it is available and then display a label saying whether it is or
 isn't available.  This works fine when AjaxFallbackButton's
 setDefaultFormProcessing is set to true (as by default).  However, this
 runs the onSubmit() of the form, not just the onSubmit() of the button
 itself as I want it to.
 
 If I do ajaxFallbackButton.setDefaultFormProcessing(false) then it gets
 nothing from the model.
 
 
 When I have used non-Ajax buttons in the past with Wicket, I called
 textField.updateModel() and then called textField.getModelObject(), which
 made it possible to retrieve values with defaultFormProcessing set to
 false and therefore did not run the form's onSubmit() method.  However
 when I do this with AjaxFallbackButton I get a null pointer execption :(.
 
 
 If this is too incomprehensible, I can try to make a quickstart
 demonstrating the problem.  I'm really not sure what appropriate behavior
 with these forms/buttons is to begin with though, so I would really
 appreciate help.  I have pasted my class which may help.
 
 Thanks!
 Jamie
 
 -
 
 package com.musictramp.wicket.pages.tests;
 
 import org.apache.wicket.PageParameters;
 import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.ajax.markup.html.form.AjaxFallbackButton;
 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.TextField;
 import org.apache.wicket.model.Model;
 
 @SuppressWarnings(unchecked)
 public class TestPage extends WebPage{
 private static final long serialVersionUID = 1L;
 
 // *** INSTANCE VARS ***
 private TextField textField;
 private Label label;
 
 // *** CONSTRUCTOR ***
 public TestPage () {
 this(null);
 }
 public TestPage(PageParameters params) {
 Form form = new Form(form){
 @Override
 protected void onSubmit() {
 System.out.println( form onSubmit());
 }
 };
 
 textField = new TextField(textField, new Model());
 textField.setOutputMarkupId(true);
 
 label = new Label(label, new Model());
 label.setOutputMarkupId(true);
 
 AjaxFallbackButton ajaxFallbackButton = new
 AjaxFallbackButton(button, form) {
 @Override
 protected void onSubmit(AjaxRequestTarget target, Form form) {
 System.out.println( Ajax button submit:);
 
 String s1 = textField.getModelObject().toString();
 System.out.println(s1= + s1);
 label.setDefaultModelObject(s1);
 
 if (target != null) {
 target.addComponent(label);
 }
 }
 };
 
 // If this is uncommented, then s1 comes out blank:
 //ajaxFallbackButton.setDefaultFormProcessing(false);
 
 form.add(textField);
 form.add(label);
 form.add(ajaxFallbackButton);
 
 add(form);
 
 
 }
 
 
 } // CLOSE CLASS.
 
 
 


-
Michael Sparer
http://talk-on-tech.blogspot.com
-- 
View this message in context: 
http://www.nabble.com/AjaxFallbackButton-and-setDefaultFormProcessing%28false%29-tp20316060p20318750.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: WASP/SWARM status

2008-11-04 Thread Nino Saturnino Martinez Vazquez Wael
Hehe, I can understand... I figure that Maurice where playing around 
with wicket 1.4 and wicket security, and created a branch for it.. So my 
bet are that it probably need a lot of updates, to get it going.. If 
it's still unmaintained. And I actually wrote an mail to the dev list 
about the continuation of swarm, but thats a while ago..


http://www.nabble.com/In-memoriam%3A-Maurice-Marrink-td18813738.html#a18932415

I might have been asking too quickly. But the question still remains to 
be answered. And it would be a real shame if nobody continued it.


Wayne Pope wrote:

hi Nino,

no I was looking at :
https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicket-security/

let me checkout the other and have a look

I never know where I'm ment to find things with Wicket!

On Tue, Nov 4, 2008 at 10:10 AM, Nino Saturnino Martinez Vazquez Wael 
[EMAIL PROTECTED] wrote:

  

I've been wondering the same thing...

Where this what you looked at?


https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/branches/wicket-security-1.4-earlyaccess/


Wayne Pope wrote:



Hi,

After the staggering loss of Maurice I was wondering if anyone had picked
up
the baton with WASP/SWARM?
I look at svn and the last update was from mrmean so I presume not.

I just wanted to check

Thanks
Wayne



  

--
-Wicket for love

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


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





  


--
-Wicket for love

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


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



Re: WASP/SWARM status

2008-11-04 Thread Wayne Pope
I'm going to see if I can get it working against 1.4 m3

On Tue, Nov 4, 2008 at 10:25 AM, Nino Saturnino Martinez Vazquez Wael 
[EMAIL PROTECTED] wrote:

 Hehe, I can understand... I figure that Maurice where playing around with
 wicket 1.4 and wicket security, and created a branch for it.. So my bet are
 that it probably need a lot of updates, to get it going.. If it's still
 unmaintained. And I actually wrote an mail to the dev list about the
 continuation of swarm, but thats a while ago..


 http://www.nabble.com/In-memoriam%3A-Maurice-Marrink-td18813738.html#a18932415

 I might have been asking too quickly. But the question still remains to be
 answered. And it would be a real shame if nobody continued it.


 Wayne Pope wrote:

 hi Nino,

 no I was looking at :

 https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicket-security/

 let me checkout the other and have a look

 I never know where I'm ment to find things with Wicket!

 On Tue, Nov 4, 2008 at 10:10 AM, Nino Saturnino Martinez Vazquez Wael 
 [EMAIL PROTECTED] wrote:



 I've been wondering the same thing...

 Where this what you looked at?



 https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/branches/wicket-security-1.4-earlyaccess/


 Wayne Pope wrote:



 Hi,

 After the staggering loss of Maurice I was wondering if anyone had
 picked
 up
 the baton with WASP/SWARM?
 I look at svn and the last update was from mrmean so I presume not.

 I just wanted to check

 Thanks
 Wayne





 --
 -Wicket for love

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


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








 --
 -Wicket for love

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


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




Re: QueryStringUrlCodingStrategy question

2008-11-04 Thread Martijn Dashorst
don't use cryptedurlencodingstrategy. That will encrypt your URLs.

Martijn
On 11/3/08, jchappelle [EMAIL PROTECTED] wrote:

 I have the following code:

   PageParameters parms = new PageParameters();
   parms.put(answerId, Long.toString(answer.getEntityId()));
   add(new BookmarkablePageLink(edit, EditBlogEntryPage.class, 
 parms));

 In my Application init method I have:

   mount(new QueryStringUrlCodingStrategy(answerdetails,
 EditBlogEntryPage.class));

 When I click the edit link to get to my page my URL looks like:

 http://localhost/robojot/answerdetails/?x=SvX0Lakly72TaK8AnLyL*A

 Can someone tell me why it doesn't look like the following:
 /answerdetails?answerId=123

 Thanks
 --
 View this message in context:
 http://www.nabble.com/QueryStringUrlCodingStrategy-question-tp20309566p20309566.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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




-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.3.4 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

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



Wicket integration with good charts api

2008-11-04 Thread Tomasz Dziurko
My client needs in his application very good looking charts (simple
bars with some gradienst and 3D effects). Unfortunately he didn't like
what JFreeChart library offers so I must find and implement another
solution.
Questions are:
1. Is there any other chart library easy to integrate with Wicket?
2.off-topicWhich chart api (could be me commercial, client is
paying) could you suggest?/off-topic

Thank you for your help

Regards
-- 
Tomasz Dziurko

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



Re: Illegal State Exception on DefaultTeeModel.removeNodeFromParent

2008-11-04 Thread Hannes Schubert

Hi all,

so far I did not isolate the issue. However, I found a workaround: 
exception was thrown only if node had been expanded. If I do collapse 
the node before removal, it does not fail again...


Best regards
Hannes

Matej Knopp wrote:

Might be a big. Jira issue with attached quickstart project to reproduce it
would be helpful.

-Matej

On Mon, Oct 27, 2008 at 11:24 AM, Hannes Schubert [EMAIL PROTECTED] wrote:

  

Hi all,

if I call removeNodeFromParent for the last (and only) child node of a
parent node on second or deeper level in a TreeTable, Wicket throws an
IllegalStateException like this:

ERROR - RequestCycle   - Cannot remove [MarkupContainer
[Component id = 11, page = No Page, path = 11.AbstractTree$TreeItem]] from
null parent!
java.lang.IllegalStateException: Cannot remove [MarkupContainer [Component
id = 11, page = No Page, path = 11.AbstractTree$TreeItem]] from null
parent!
  at org.apache.wicket.Component.remove(Component.java:2204)
  at
org.apache.wicket.markup.html.tree.AbstractTree.removeItem(AbstractTree.java:1441)
  at
org.apache.wicket.markup.html.tree.AbstractTree.treeNodesRemoved(AbstractTree.java:832)
  at
javax.swing.tree.DefaultTreeModel.fireTreeNodesRemoved(DefaultTreeModel.java:530)
  at
javax.swing.tree.DefaultTreeModel.nodesWereRemoved(DefaultTreeModel.java:310)
  at
javax.swing.tree.DefaultTreeModel.removeNodeFromParent(DefaultTreeModel.java:244)

It runs well if child node is not the last child of parent. Before calling
removeNodeFromParent() the instance method  TreeNode.getParent()  always
returns the valid instance of DefaultMutableTreeNode. So tree seems to be
intact for me...

Any hints?

Best regards
Hannes Schubert

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





  



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



Re: Where is code for ActionPanel used in repeater examples?

2008-11-04 Thread James Carman
Look at FormPage.java (the FormPage$ActionPanel.html file gave me a hint :).

On Tue, Nov 4, 2008 at 4:51 AM, palun [EMAIL PROTECTED] wrote:

 Where is the code for ActionPanel used in the examples on
 http://wicketstuff.org/wicket13/repeater/?wicket:bookmarkablePage=sources:org.apache.wicket.examples.repeater.Index
 ?

 I'm using Wicket vers. 1.3.4. (Is that the problem?)

 Thanks,
 /ulf

 --
 View this message in context: 
 http://www.nabble.com/Where-is-code-for-ActionPanel-used-in-repeater-examples--tp20319149p20319149.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



RE: Wicket 1.4 and Wicketstuff/Dojo/DragAndDrop

2008-11-04 Thread Reinout van Schouwen
Op maandag 28-04-2008 om 14:18 uur [tijdzone +0200], schreef Arthur
Bogaart:
 Hi Stefan,
 
 I presume this build is based on the 'old' dojo-0.4 version? If so,
 are there any plans in updating the wicketstuff-dojo project to
 dojo-1.1.0 or is there to much resistance since Dojo has changed it's
 api already a couple of times?

I was looking at wicketstuff-dojo today and would like an answer to this
question as well! :-)

regards,

-- 
Reinout van Schouwen


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



Re: How does serialization work?

2008-11-04 Thread Adriano dos Santos Fernandes
I had a serialization problem (when redeploying the application in 
Tomcat) that I can't understand... Basically, I had this on my 
Page.onBeforeRender:

---
   visitChildren(TextField.class, new VisitorTextField?() {
   private static final long serialVersionUID = 1L;

   public Object component(TextField? textField)
   {
   textField.add(new AjaxEventBehavior(onchange) {
   private static final long serialVersionUID = 1L;

   @Override
   protected void onEvent(AjaxRequestTarget target)
   {
   if (mode == Mode.NAVIGATE)
   {
   mode = Mode.EDIT;
   setupMode();
   target.addComponent(buttonPanel);
   }
   }
   });

   setupValidators(textField);
   return IVisitor.CONTINUE_TRAVERSAL;
   }
   });
---

The non-serializable class was the one created by new 
VisitorTextField? () { ... }. Creating MyVisitor and replacing this 
call solved the problem:

---
   private abstract class MyVisitorX extends Component
   implements IVisitorX, Serializable
   {
   private static final long serialVersionUID = 1L;
   }
---

Why should a non-serializable Visitor could case this problem? Does 
(why?) it get cached on the page?



Adriano


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



Re: attribute modifier on onclick

2008-11-04 Thread miro

I found the problem its because of   ListView   setReuseItems(boolean
reuseItems) .
by default it is  false  setting it to true will not create new instances of
my ListItems.  


Alex Objelean wrote:
 
 You probably want to use AjaxLink and when the link is clicked - add to
 the target the link itself, in order to see the change.
 
 
 miro wrote:
 
 upon debugging i foundthe constructor MyLink()  was getting called
 afteronClick() so any changes I make in onClick to components
 behaviour will get washed away because its adding the componentsagain
 , to better understand  what happens when a link is clicked ?  the
 component is created again ?
  
 
 here is the code 
 code
  PageableListView   batchesListView= new 
 PageableListView(batches,batches,10){
  
  /**
   * 
   */
  private static final long serialVersionUID = 1L;
 
  @Override
  protected void populateItem(ListItem item) {
  final BatcheModel   
 batcheModel=(BatcheModel)item.getModelObject();
  
  
  class MyLink extends Link  {
  public MyLink() {
  super(batch, new 
 Model(batcheModel));
  add(new 
 Label(name,batcheModel.getName()));
  add(new Label(date, new 
 Date().toString()));
  }
  @Override
  public void onClick() {
  final BatcheModel   
 batcheModel=(BatcheModel)getModelObject();
  AuditsModel auditsModel=null;
  
 if(batcheModel.getName().equals(test1)){
  auditsModel= new 
 AuditsModel(test1,test1,test1);
  }
  
 if(batcheModel.getName().equals(test2)){
  auditsModel= new 
 AuditsModel(test2,test2,test2);
  }
  
 if(batcheModel.getName().equals(test3)){
  auditsModel= new 
 AuditsModel(test3,test3,test3);
  }
  ListAuditsModel audits= new 
 ArrayListAuditsModel();
  audits.add(auditsModel);
  PageableListView 
 pageableListView=   (PageableListView)
 AuditSelectionPage.this.get(audits);
  pageableListView.setModel(new 
 Model((Serializable)audits));
  Label  label=(Label)get(name);
  get(name).add(new 
 SimpleAttributeModifier(style,
 color:blue;));
  get(date).add(new 
 SimpleAttributeModifier(style,
 color:blue;));
  }
  }
  
  item.add(new MyLink());
 
 /code
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/attribute-modifier-on-onclick-tp20310246p20324340.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: PageParameters in wicket 1.2.7 problem

2008-11-04 Thread Rik Overvelde

This is what the 1.2 javadoc says about it:

protected WebPage(PageParameters parameters)

Constructor which receives wrapped query string parameters for a 
request. Having this constructor public means that your page is 
'bookmarkable' and hence can be called/ created from anywhere. For 
bookmarkable pages (as opposed to when you construct page instances 
yourself, this constructor will be used in preference to a no-arg 
constructor, if both exist. Note that nothing is done with the page 
parameters argument. This constructor is provided so that tools such as 
IDEs will include it their list of suggested constructors for derived 
classes.


So passing it down should not make any difference.

I've solved the problem using the cookies tip by the way, thanks for the 
help.



Martijn Dashorst wrote:

IIRC You should pass in the page parameters all the way down to the Wicket page:

super(parameters, Valideren gegevens)

Martijn

On Mon, Nov 3, 2008 at 8:41 AM, Rik Overvelde [EMAIL PROTECTED] wrote:
  

Basically, the code that executes is:

public ValidatePage(PageParameters parameters)
{
  super(Valideren gegevens);

  String code = parameters.getString(code);
 If I put a breakpoint right after this, I already get the incorrect
code. The page that I use extends a page that contains the basic layout/menu
from the page, but that page does no redirecting either.
 I'm reading up on the session sharing, but from what I can see that is not
recommended because of security issues. I didn't think about using cookies
though, so thanks for that suggestion. That sounds like it would be the best
solution.

Nino Saturnino Martinez Vazquez Wael wrote:


Strange, but as you said you had the idea that it could be a bug. But it
still strikes me a bit strange that the page are redirected, and results in
an modifified link.. Could you provide a cut out of the code?

Otherwise the idea with the servlet should be fine, I think you can enable
shared sessions somewhere in tomcat at least... Otherwise you could do it
with an encrypted session cookie..

Rik Overvelde wrote:
  

Hi Nino,

I don't link to the verification page from inside the application itself.
Instead, the link is send in an email to the user when he changes his email
adress. When they click the link, the page is opened. In a lot of cases the
users are still logged in on the application, meaning that a second tab is
opened. If that is the case, the url changes in the way that I described. If
there is no other tab with the application open when the user clicks the
link, the page works fine (meaning that the page parameters are being read).
Also, when the bug occurs it triggers an error message which tells that the
given code is incorrect, which means that the page parameters are read at
that point as well.



Nino Saturnino Martinez Vazquez Wael wrote:


Hi Rik

Im not sure about this, it's been some months(if not years) since i've
touched 1.2.x.  How are you linking to verification page when logged in, for
me it looks like you are not using pageparameters at all but instead just
instantiate the page with an other constructor..

Rik Overvelde wrote:
  

Hey everyone,

I'm having a problem with page parameters in wicket 1.2.7 when multiple
tabs are opened. I'm working on a verification system for email adresses,
which sends a mail with an url containing a guid to a user. I've mounted the
page using a queryStringUrlCodingStrategy which results in an address like:
http://page.com/verificatie?code=0572f18d-a9b1-4b92-bb89-7243b9e35d24.
When the link is opened while you're already logged in though, wicket
changes the url while loading in something like this:
http://page.com/verificatie?code=%5BLjava.lang.String%3B%4087bf0bwicket:pageMapName=wicket-0
From what I understand, this is a known issue with wicket 1.2 and is
solved in wicket 1.3. The application I'm working on however is already
fairly large and because of time constraints it is impossible right now to
migrate to 1.3 so I'm looking for a workaround for this.

One thing that I've been thinking about is to have the verification
link point you to a non wicket servlet, which writes the guid to its
session, then forwards you to a wicket page that retrieves the guid from the
other servlets session. Is there a way to get the other servlets session in
wicket?

If anyone has another suggestions for getting around this problem I'd
love to hear it.

With regards,

Rik Overvelde


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



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



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

find if an item in my case a link was clicked in a listView

2008-11-04 Thread miro

ListView contains listItem in my case I have links . We have a method onClick  
in a link from which I can knowthe link which was clicked , is there a
way to find among the listItems if a Item was clicked   in method  
renderItem(ListItem item)  ?  I am changing the color of my link to red
which ever was clicked , now when user clicks the second link i should
change the color of first link to   balck and color of the second link to
red , to have this behaviour I must identify the link which was clicked
-- 
View this message in context: 
http://www.nabble.com/find-if-an--item-in-my-case-a-link-was---clicked-in-a-listView-tp20324606p20324606.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: How does serialization work?

2008-11-04 Thread Johan Compagner
thats simple

what you there create is an inner class in an inner class...

so your textfield has a ajax behavior that is an inner class fo the Visitor
inner class so that behavior has a parent reference to the visitor..
make that ajax behavior his own class and your problem is solved

johan


On Tue, Nov 4, 2008 at 4:26 PM, Adriano dos Santos Fernandes 
[EMAIL PROTECTED] wrote:

 I had a serialization problem (when redeploying the application in Tomcat)
 that I can't understand... Basically, I had this on my Page.onBeforeRender:
 ---
   visitChildren(TextField.class, new VisitorTextField?() {
   private static final long serialVersionUID = 1L;

   public Object component(TextField? textField)
   {
   textField.add(new AjaxEventBehavior(onchange) {
   private static final long serialVersionUID = 1L;

   @Override
   protected void onEvent(AjaxRequestTarget target)
   {
   if (mode == Mode.NAVIGATE)
   {
   mode = Mode.EDIT;
   setupMode();
   target.addComponent(buttonPanel);
   }
   }
   });

   setupValidators(textField);
   return IVisitor.CONTINUE_TRAVERSAL;
   }
   });
 ---

 The non-serializable class was the one created by new
 VisitorTextField? () { ... }. Creating MyVisitor and replacing this
 call solved the problem:
 ---
   private abstract class MyVisitorX extends Component
   implements IVisitorX, Serializable
   {
   private static final long serialVersionUID = 1L;
   }
 ---

 Why should a non-serializable Visitor could case this problem? Does (why?)
 it get cached on the page?


 Adriano



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




RE: Wicket 1.4 and Wicketstuff/Dojo/DragAndDrop

2008-11-04 Thread Stefan Lindner
My work was for the wicket 1.4 trunk 6 months ago. Some things have changed 
since then. Actually I'm stuck into converting a huge wicket 2.0 Application to 
1.4. It's a pain! I think I will get back to the Dojo project in 3 weeks. Then 
I will try to build a version for current wicket 1.4 trunk.
For former development I will no longer trust in wicketstuff projects. Perhaps 
I will build my own drag and drop library based upon jquery.

Stefan

-Ursprüngliche Nachricht-
Von: Reinout van Schouwen [mailto:[EMAIL PROTECTED] 
Gesendet: Dienstag, 4. November 2008 16:18
Cc: users
Betreff: Re: AW: Wicket 1.4 and Wicketstuff/Dojo/DragAndDrop
Wichtigkeit: Hoch

Hi Stefan,

Op vrijdag 25-04-2008 om 18:03 uur [tijdzone +0200], schreef Stefan Lindner:

 To all the other WicketStuff Dojo users: I have successfully built a
 version for current wicket 1.4 trunk. If someone nedds it, please let
 me know!

Actually I'm trying to get it for wicket 1.3.5, but please make your
work available so that others don't have to duplicate it. Thanks! :)

regards,

-- 
Reinout van Schouwen


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


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



Re: How does serialization work?

2008-11-04 Thread Adriano dos Santos Fernandes

Johan Compagner escreveu:

thats simple

what you there create is an inner class in an inner class...

so your textfield has a ajax behavior that is an inner class fo the Visitor
inner class so that behavior has a parent reference to the visitor..
make that ajax behavior his own class and your problem is solved

Very good catch. :-) Unfortunately the exception was not helpful.

Thanks,


Adriano


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



Re: wicket-spring dependency in maven repository

2008-11-04 Thread Antony Stubbs

I've opened a jira issue
https://issues.apache.org/jira/browse/WICKET-1913



Erik van Oosten wrote:
 
 Doug Donohoe wrote:
 I'm using wicket-spring-annot and ran into a small problem with maven
 dependencies.  The wicket-spring-annot project depends on wicket-spring.

   
 
 This has come up a number of times already. Hopefully not as often in 
 the future as it is now also on the wiki :)
 http://cwiki.apache.org/WICKET/spring.html
 
 Regards,
 Erik.
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 


-
___

http://stubbisms.wordpress.com http://stubbisms.wordpress.com 
-- 
View this message in context: 
http://www.nabble.com/wicket-spring-dependency-in-maven-repository-tp16764208p2034.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Problem using UTF-8 and QueryStringUrlCodingStrategy

2008-11-04 Thread ssanchez

Hello,

I'm trying to use UTF-8 as the default encoding in a web application using
Wicket and Spring. Although everything seems to be working properly, I'm
facing a problem when dealing with a page mounted using the
QueryStringUrlCodingStrategy.

The application configuration

* The html pages include the meta tag

meta http-equiv=Content-Type content=text/html; charset=UTF-8 /

* getRequestCycleSettings().setResponseRequestEncoding() returns UTF-8 as
the encoding

* I've configured the Spring CharacterEncodingFilter as the first filter in
the web.xml

 filter
filter-namecharsetFilter/filter-name
filter-class
org.springframework.web.filter.CharacterEncodingFilter
/filter-class
init-param
param-nameencoding/param-name
param-valueUTF-8/param-value
/init-param
 /filter 
 filter-mapping
  filter-namecharsetFilter/filter-name
  url-pattern/*/url-pattern
 /filter-mapping 

The problem

If I have a page mounted as:
  mount(new QueryStringUrlCodingStrategy(/search/feed, 
SearchFeedPage.class));

and, in another page, a link to that one:
  BookmarkablePageLink(feed, SearchFeedPage.class, 
theParameters);
where theParameters include, for example, a parameter with the value día 

The link is correctly encoded (using UTF-8) but, once it is clicked, it is
not correctly decoded. 

Is there something missed in the configuration? is it a bug? If, instead of
using QueryStringUrlCodingStrategy I mount the page as:
  mountBookmarkablePage(/search/feed, SearchFeedPage.class); everything
works correctly

Thanks




-- 
View this message in context: 
http://www.nabble.com/Problem-using-UTF-8-and-QueryStringUrlCodingStrategy-tp20325317p20325317.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



No behavior listener found

2008-11-04 Thread Martin Makundi
Hi!

What does this error mean?

No behavior listener found with behaviorId 0

What is being done wrong? Normally, the site works ok but the error
log shows this kind of error.

Am I manifesting some known Wicket antipattern which causes this
error? Or is it just a result of another illegal state?

   at 
org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:95)
   at 
org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:91)
   at 
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1174)
   at org.apache.wicket.RequestCycle.step(RequestCycle.java:1251)
   at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1352)
   at org.apache.wicket.RequestCycle.request(RequestCycle.java:499)
   at 
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:375)
   at 
org.apache.wicket.protocol.http.WicketServlet.doPost(WicketServlet.java:145)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
   at wicket.quickstart.TakpServlet.service(TakpServlet.java:58)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
   at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:491)
   at 
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:367)
   at 
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:185)
   at 
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
   at 
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:689)
   at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:391)
   at 
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:146)
   at 
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
   at 
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
   at org.mortbay.jetty.Server.handle(Server.java:285)
   at 
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:457)
   at 
org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:765)
   at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:627)
   at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:203)
   at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:357)
   at 
org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:217)
   at 
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)


**
Martin

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



Re: Browser file download complete callback

2008-11-04 Thread Igor Vaynberg
the problem is that we would have to pass around the inputstream and
iresourcestream unless we put the burden on you to make
getreinputstream() return the same inputstream for the same request...

you can pretty easily create a decorator for inputstream and intercept
close(), its not perfect but it will work for right now while we
figure out what to do with iresourcestream#close

-igor

On Tue, Nov 4, 2008 at 1:35 AM, bjolletz [EMAIL PROTECTED] wrote:

 Thanks for the reply!

 So you're suggesting that the close() method of the IResourceStream should
 be removed?

 Isn't there a point in having the close() method? In my case, by overriding
 the close() method, it would be possible to be notified when a download is
 complete. Don't know how else I would accomplish that (any suggestions?).

 Wouldn't it be a better idea to implement a close() method with default
 close behaviour in the abstract classes implementing the IResourceStream
 interface? That way, by extending one of these abstract resource stream
 classes, you dont have to mind about the close() method if you dont want to.

 /Daniel



 igor.vaynberg wrote:

 hmm, seems like a bug. it looks like we now close the input stream
 directly instead of using close() which allows users not to have to
 keep a reference to the stream. #close() can probably be removed.
 please open a jira issue.

 -igor

 On Mon, Nov 3, 2008 at 3:28 AM, bjolletz [EMAIL PROTECTED]
 wrote:

 Hi!

 I would like to have a download link through which a user can download
 some
 bytearray from my database. So far no problem, I accomplish this by
 creating
 a new WebResource and implementing the getResourceStream method.

 My problem is that I would like to be notified when the user is finished
 downloading so that I can mark the downloaded item as downloaded in my
 database. I'm using an AbstractResourceStream and I thought I would be
 able
 to do this by overriding the close() method. However, the close method of
 the AbstractResourceStream never seems to be called.

 The implementation of the getResourceStream() method of my WebResource
 object:

public IResourceStream getResourceStream() {
return new AbstractResourceStream() {
ByteArrayInputStream bais;
public InputStream getInputStream() throws
 ResourceStreamNotFoundException {
bais = getByteArrayInputStreamFromDB();
return bais;
}

public void close() throws IOException {
bais.close();
markByteArrayAsDownloadedInDB();
}
};
}


 Why is it that the close() method is never called? Is there a
 better/other
 way to do it? Is it at all possible to get a callback when a user is
 finished downloading the bytearray?

 Thanks in advance!

 /Daniel
 --
 View this message in context:
 http://www.nabble.com/Browser-file-download-complete-callback-tp20300290p20300290.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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




 --
 View this message in context: 
 http://www.nabble.com/Browser-file-download-complete-callback-tp20300290p20318122.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Re: Browser file download complete callback

2008-11-04 Thread Igor Vaynberg
another problem with close is that you would have to internally keep a
reference to the inputstream(), and what if getinputstream() was
called more then once because for example you are generating a xls, a
csv, and a png all at once...then your close() has to keep track of
multiple references?

-igor

On Tue, Nov 4, 2008 at 9:22 AM, Igor Vaynberg [EMAIL PROTECTED] wrote:
 the problem is that we would have to pass around the inputstream and
 iresourcestream unless we put the burden on you to make
 getreinputstream() return the same inputstream for the same request...

 you can pretty easily create a decorator for inputstream and intercept
 close(), its not perfect but it will work for right now while we
 figure out what to do with iresourcestream#close

 -igor

 On Tue, Nov 4, 2008 at 1:35 AM, bjolletz [EMAIL PROTECTED] wrote:

 Thanks for the reply!

 So you're suggesting that the close() method of the IResourceStream should
 be removed?

 Isn't there a point in having the close() method? In my case, by overriding
 the close() method, it would be possible to be notified when a download is
 complete. Don't know how else I would accomplish that (any suggestions?).

 Wouldn't it be a better idea to implement a close() method with default
 close behaviour in the abstract classes implementing the IResourceStream
 interface? That way, by extending one of these abstract resource stream
 classes, you dont have to mind about the close() method if you dont want to.

 /Daniel



 igor.vaynberg wrote:

 hmm, seems like a bug. it looks like we now close the input stream
 directly instead of using close() which allows users not to have to
 keep a reference to the stream. #close() can probably be removed.
 please open a jira issue.

 -igor

 On Mon, Nov 3, 2008 at 3:28 AM, bjolletz [EMAIL PROTECTED]
 wrote:

 Hi!

 I would like to have a download link through which a user can download
 some
 bytearray from my database. So far no problem, I accomplish this by
 creating
 a new WebResource and implementing the getResourceStream method.

 My problem is that I would like to be notified when the user is finished
 downloading so that I can mark the downloaded item as downloaded in my
 database. I'm using an AbstractResourceStream and I thought I would be
 able
 to do this by overriding the close() method. However, the close method of
 the AbstractResourceStream never seems to be called.

 The implementation of the getResourceStream() method of my WebResource
 object:

public IResourceStream getResourceStream() {
return new AbstractResourceStream() {
ByteArrayInputStream bais;
public InputStream getInputStream() throws
 ResourceStreamNotFoundException {
bais = getByteArrayInputStreamFromDB();
return bais;
}

public void close() throws IOException {
bais.close();
markByteArrayAsDownloadedInDB();
}
};
}


 Why is it that the close() method is never called? Is there a
 better/other
 way to do it? Is it at all possible to get a callback when a user is
 finished downloading the bytearray?

 Thanks in advance!

 /Daniel
 --
 View this message in context:
 http://www.nabble.com/Browser-file-download-complete-callback-tp20300290p20300290.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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




 --
 View this message in context: 
 http://www.nabble.com/Browser-file-download-complete-callback-tp20300290p20318122.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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




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



Render a Wicket page to a string for HTML email

2008-11-04 Thread Jörn Zaefferer
Hi,

I've found this article on how to render a page to a String:
http://www.danwalmsley.com/2008/10/21/render-a-wicket-page-to-a-string-for-html-email/

It seemed to be exactly what I was looking for. Copying the code into
my app, I got a compiler error on the line where the WebRequest is
created. Using the constructor to ServletWebRequest helped.

Nonetheless, I get only an empty string back, no clue whats going wrong.

I'm using Wicket 1.3.5.

Any ideas?

Jörn


ApacheCon live video streaming available; keynotes and Apache 101 are free

2008-11-04 Thread Martijn Dashorst
Can't make ApacheCon this week in New Orleans?  You can still watch all
the keynotes, Apache 101 sessions, and system administration track in
live video streams:

  http://streaming.linux-magazin.de/en/program_apacheconus08.htm?ann

Keynotes and the Apache 101 lunchtime sessions are free; the full
sysadmin track, including httpd performance, security, and server stack
administration talks are available for a fee.

Keynotes include:
- David Recordon, Six Apart  (Wednesday 09:30)
  Learning from Apache to create Open Specifications

- Shahani Markus Weerawarana, Ph.D.  (Thursday 11:30)
  Standing on the Shoulders of Giants

- Sam Ramji, Microsoft  (Friday 11:30)
  struct.new(future, :open, :microsoft)


  Reminder: New Orleans is CST or UTC/GMT -6 hours.


Advance notice: ApacheCon EU 2009 returns to Amsterdam, 23-27 March.  We
had a great response to our CFP and look forward to announcing the
schedule in the next month.

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



Re: find if an item in my case a link was clicked in a listView

2008-11-04 Thread Igor Vaynberg
you can provide your own impl of listitem that has an attribute that
you set to true when it is clicked. then override oncomponenttag() and
perform any magic there based on the attribute.

-igor

On Tue, Nov 4, 2008 at 8:33 AM, miro [EMAIL PROTECTED] wrote:

 ListView contains listItem in my case I have links . We have a method onClick
 in a link from which I can knowthe link which was clicked , is there a
 way to find among the listItems if a Item was clicked   in method
 renderItem(ListItem item)  ?  I am changing the color of my link to red
 which ever was clicked , now when user clicks the second link i should
 change the color of first link to   balck and color of the second link to
 red , to have this behaviour I must identify the link which was clicked
 --
 View this message in context: 
 http://www.nabble.com/find-if-an--item-in-my-case-a-link-was---clicked-in-a-listView-tp20324606p20324606.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Re: No behavior listener found

2008-11-04 Thread Igor Vaynberg
looks like the behavior that generated the callbakc url being invoked
is no longer there...

do you have any temporary behaviors on that component?

-igor

On Tue, Nov 4, 2008 at 9:07 AM, Martin Makundi
[EMAIL PROTECTED] wrote:
 Hi!

 What does this error mean?

 No behavior listener found with behaviorId 0

 What is being done wrong? Normally, the site works ok but the error
 log shows this kind of error.

 Am I manifesting some known Wicket antipattern which causes this
 error? Or is it just a result of another illegal state?

   at 
 org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:95)
   at 
 org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:91)
   at 
 org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1174)
   at org.apache.wicket.RequestCycle.step(RequestCycle.java:1251)
   at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1352)
   at org.apache.wicket.RequestCycle.request(RequestCycle.java:499)
   at 
 org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:375)
   at 
 org.apache.wicket.protocol.http.WicketServlet.doPost(WicketServlet.java:145)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
   at wicket.quickstart.TakpServlet.service(TakpServlet.java:58)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
   at 
 org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:491)
   at 
 org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:367)
   at 
 org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:185)
   at 
 org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
   at 
 org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:689)
   at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:391)
   at 
 org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:146)
   at 
 org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
   at 
 org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
   at org.mortbay.jetty.Server.handle(Server.java:285)
   at 
 org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:457)
   at 
 org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:765)
   at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:627)
   at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:203)
   at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:357)
   at 
 org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:217)
   at 
 org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)


 **
 Martin

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



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



Re: Render a Wicket page to a string for HTML email

2008-11-04 Thread Igor Vaynberg
without seeing your code we have to resort to waving a dead chicken in
front of our screens or making swags.

-igor

On Tue, Nov 4, 2008 at 9:19 AM, Jörn Zaefferer
[EMAIL PROTECTED] wrote:
 Hi,

 I've found this article on how to render a page to a String:
 http://www.danwalmsley.com/2008/10/21/render-a-wicket-page-to-a-string-for-html-email/

 It seemed to be exactly what I was looking for. Copying the code into
 my app, I got a compiler error on the line where the WebRequest is
 created. Using the constructor to ServletWebRequest helped.

 Nonetheless, I get only an empty string back, no clue whats going wrong.

 I'm using Wicket 1.3.5.

 Any ideas?

 Jörn


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



Re: Render a Wicket page to a string for HTML email

2008-11-04 Thread Martijn Dashorst
Are you  in New Orleans in some voodoo bar? Why not join us at ApacheCon? :)

Martijn

On Tue, Nov 4, 2008 at 10:43 AM, Igor Vaynberg [EMAIL PROTECTED] wrote:
 without seeing your code we have to resort to waving a dead chicken in
 front of our screens or making swags.

 -igor

 On Tue, Nov 4, 2008 at 9:19 AM, Jörn Zaefferer
 [EMAIL PROTECTED] wrote:
 Hi,

 I've found this article on how to render a page to a String:
 http://www.danwalmsley.com/2008/10/21/render-a-wicket-page-to-a-string-for-html-email/

 It seemed to be exactly what I was looking for. Copying the code into
 my app, I got a compiler error on the line where the WebRequest is
 created. Using the constructor to ServletWebRequest helped.

 Nonetheless, I get only an empty string back, no clue whats going wrong.

 I'm using Wicket 1.3.5.

 Any ideas?

 Jörn


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





-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.3.4 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

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



RE: Losing session information

2008-11-04 Thread Dane Laverty
Great, I'll check that out. I didn't realize that the mail list would
chop up my code formatting so horribly -- thanks for taking the time to
slog through it anyway.

-Original Message-
From: Igor Vaynberg [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 03, 2008 12:02 PM
To: users@wicket.apache.org
Subject: Re: Losing session information

a couple of things to look into:

access to Session is not synchronized, so make sure you sync
everything yourself.

if you have a stateless page it will not store the session in
httpsession, you might have to do that manually by calling
session.bind()

-igor


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



Re: Render a Wicket page to a string for HTML email

2008-11-04 Thread Igor Vaynberg
saving up vacation days for the caribbean baby :)

-igor

On Tue, Nov 4, 2008 at 9:55 AM, Martijn Dashorst
[EMAIL PROTECTED] wrote:
 Are you  in New Orleans in some voodoo bar? Why not join us at ApacheCon? :)

 Martijn

 On Tue, Nov 4, 2008 at 10:43 AM, Igor Vaynberg [EMAIL PROTECTED] wrote:
 without seeing your code we have to resort to waving a dead chicken in
 front of our screens or making swags.

 -igor

 On Tue, Nov 4, 2008 at 9:19 AM, Jörn Zaefferer
 [EMAIL PROTECTED] wrote:
 Hi,

 I've found this article on how to render a page to a String:
 http://www.danwalmsley.com/2008/10/21/render-a-wicket-page-to-a-string-for-html-email/

 It seemed to be exactly what I was looking for. Copying the code into
 my app, I got a compiler error on the line where the WebRequest is
 created. Using the constructor to ServletWebRequest helped.

 Nonetheless, I get only an empty string back, no clue whats going wrong.

 I'm using Wicket 1.3.5.

 Any ideas?

 Jörn


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





 --
 Become a Wicket expert, learn from the best: http://wicketinaction.com
 Apache Wicket 1.3.4 is released
 Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

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



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



Re: No behavior listener found

2008-11-04 Thread Martin Makundi
What is a temporary behavior?

I do not understand conceptually how a behavior can be invoked if it
is no longer there..

The error log shows a nearby nullpointer exception which might have
occurred during the same OnAjaxChangeBehavior .. maybe it led into an
illegal state:

   at org.apache.wicket.Component.setModelObject(Component.java:2951)
   at 
org.apache.wicket.markup.html.form.FormComponent.updateModel(FormComponent.java:1082)
   at org.apache.wicket.markup.html.form.Form$19.validate(Form.java:1810)
   at 
org.apache.wicket.markup.html.form.Form$ValidationVisitor.formComponent(Form.java:162)
   at 
org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:426)
   at 
org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:413)
   at 
org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:413)
   at 
org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:413)
   at 
org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:413)
   at 
org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:413)
   at 
org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:413)
   at 
org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:413)
   at 
org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrder(FormComponent.java:390)
   at 
org.apache.wicket.markup.html.form.Form.visitFormComponentsPostOrder(Form.java:1049)
   at 
org.apache.wicket.markup.html.form.Form.internalUpdateFormComponentModels(Form.java:1801)
   at 
org.apache.wicket.markup.html.form.Form.updateFormComponentModels(Form.java:1769)
   at org.apache.wicket.markup.html.form.Form.process(Form.java:851)
   at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:793)
   at 
org.apache.wicket.ajax.form.AjaxFormSubmitBehavior.onEvent(AjaxFormSubmitBehavior.java:132)
   at 
org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:161)
   at 
org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:298)
   at 
org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:100)
   at 
org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:91)



2008/11/4 Igor Vaynberg [EMAIL PROTECTED]:
 looks like the behavior that generated the callbakc url being invoked
 is no longer there...

 do you have any temporary behaviors on that component?

 -igor

 On Tue, Nov 4, 2008 at 9:07 AM, Martin Makundi
 [EMAIL PROTECTED] wrote:
 Hi!

 What does this error mean?

 No behavior listener found with behaviorId 0

 What is being done wrong? Normally, the site works ok but the error
 log shows this kind of error.

 Am I manifesting some known Wicket antipattern which causes this
 error? Or is it just a result of another illegal state?

   at 
 org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:95)
   at 
 org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:91)
   at 
 org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1174)
   at org.apache.wicket.RequestCycle.step(RequestCycle.java:1251)
   at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1352)
   at org.apache.wicket.RequestCycle.request(RequestCycle.java:499)
   at 
 org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:375)
   at 
 org.apache.wicket.protocol.http.WicketServlet.doPost(WicketServlet.java:145)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
   at wicket.quickstart.TakpServlet.service(TakpServlet.java:58)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
   at 
 org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:491)
   at 
 org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:367)
   at 
 org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:185)
   at 
 org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
   at 
 org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:689)
   at 
 org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:391)
   at 
 org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:146)
   at 
 org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
   at 
 

Re: No behavior listener found

2008-11-04 Thread James Carman
Bad example, because AttributeAppender isn't temporary, but I've
written one for requesting the focus onload and that had to be
temporary.

On Tue, Nov 4, 2008 at 12:03 PM, James Carman
[EMAIL PROTECTED] wrote:
 A temporary behavior returns true from isTemporary().  Some behaviors
 don't need to be remembered on the server-side (like
 AttributeAppender, for example).

 On Tue, Nov 4, 2008 at 12:01 PM, Martin Makundi
 [EMAIL PROTECTED] wrote:
 What is a temporary behavior?

 I do not understand conceptually how a behavior can be invoked if it
 is no longer there..

 The error log shows a nearby nullpointer exception which might have
 occurred during the same OnAjaxChangeBehavior .. maybe it led into an
 illegal state:

   at org.apache.wicket.Component.setModelObject(Component.java:2951)
   at 
 org.apache.wicket.markup.html.form.FormComponent.updateModel(FormComponent.java:1082)
   at org.apache.wicket.markup.html.form.Form$19.validate(Form.java:1810)
   at 
 org.apache.wicket.markup.html.form.Form$ValidationVisitor.formComponent(Form.java:162)
   at 
 org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:426)
   at 
 org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:413)
   at 
 org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:413)
   at 
 org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:413)
   at 
 org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:413)
   at 
 org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:413)
   at 
 org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:413)
   at 
 org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:413)
   at 
 org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrder(FormComponent.java:390)
   at 
 org.apache.wicket.markup.html.form.Form.visitFormComponentsPostOrder(Form.java:1049)
   at 
 org.apache.wicket.markup.html.form.Form.internalUpdateFormComponentModels(Form.java:1801)
   at 
 org.apache.wicket.markup.html.form.Form.updateFormComponentModels(Form.java:1769)
   at org.apache.wicket.markup.html.form.Form.process(Form.java:851)
   at 
 org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:793)
   at 
 org.apache.wicket.ajax.form.AjaxFormSubmitBehavior.onEvent(AjaxFormSubmitBehavior.java:132)
   at 
 org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:161)
   at 
 org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:298)
   at 
 org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:100)
   at 
 org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:91)



 2008/11/4 Igor Vaynberg [EMAIL PROTECTED]:
 looks like the behavior that generated the callbakc url being invoked
 is no longer there...

 do you have any temporary behaviors on that component?

 -igor

 On Tue, Nov 4, 2008 at 9:07 AM, Martin Makundi
 [EMAIL PROTECTED] wrote:
 Hi!

 What does this error mean?

 No behavior listener found with behaviorId 0

 What is being done wrong? Normally, the site works ok but the error
 log shows this kind of error.

 Am I manifesting some known Wicket antipattern which causes this
 error? Or is it just a result of another illegal state?

   at 
 org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:95)
   at 
 org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:91)
   at 
 org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1174)
   at org.apache.wicket.RequestCycle.step(RequestCycle.java:1251)
   at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1352)
   at org.apache.wicket.RequestCycle.request(RequestCycle.java:499)
   at 
 org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:375)
   at 
 org.apache.wicket.protocol.http.WicketServlet.doPost(WicketServlet.java:145)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
   at wicket.quickstart.TakpServlet.service(TakpServlet.java:58)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
   at 
 org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:491)
   at 
 org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:367)
   at 
 org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:185)
   at 
 

Re: No behavior listener found

2008-11-04 Thread Igor Vaynberg
the error means that a behavior constructed the url, but when the user
followed the url the behavior could no longer be found.

what npe? can you show the full stack trace?

-igor

On Tue, Nov 4, 2008 at 10:01 AM, Martin Makundi
[EMAIL PROTECTED] wrote:
 What is a temporary behavior?

 I do not understand conceptually how a behavior can be invoked if it
 is no longer there..

 The error log shows a nearby nullpointer exception which might have
 occurred during the same OnAjaxChangeBehavior .. maybe it led into an
 illegal state:

   at org.apache.wicket.Component.setModelObject(Component.java:2951)
   at 
 org.apache.wicket.markup.html.form.FormComponent.updateModel(FormComponent.java:1082)
   at org.apache.wicket.markup.html.form.Form$19.validate(Form.java:1810)
   at 
 org.apache.wicket.markup.html.form.Form$ValidationVisitor.formComponent(Form.java:162)
   at 
 org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:426)
   at 
 org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:413)
   at 
 org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:413)
   at 
 org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:413)
   at 
 org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:413)
   at 
 org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:413)
   at 
 org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:413)
   at 
 org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:413)
   at 
 org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrder(FormComponent.java:390)
   at 
 org.apache.wicket.markup.html.form.Form.visitFormComponentsPostOrder(Form.java:1049)
   at 
 org.apache.wicket.markup.html.form.Form.internalUpdateFormComponentModels(Form.java:1801)
   at 
 org.apache.wicket.markup.html.form.Form.updateFormComponentModels(Form.java:1769)
   at org.apache.wicket.markup.html.form.Form.process(Form.java:851)
   at 
 org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:793)
   at 
 org.apache.wicket.ajax.form.AjaxFormSubmitBehavior.onEvent(AjaxFormSubmitBehavior.java:132)
   at 
 org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:161)
   at 
 org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:298)
   at 
 org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:100)
   at 
 org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:91)



 2008/11/4 Igor Vaynberg [EMAIL PROTECTED]:
 looks like the behavior that generated the callbakc url being invoked
 is no longer there...

 do you have any temporary behaviors on that component?

 -igor

 On Tue, Nov 4, 2008 at 9:07 AM, Martin Makundi
 [EMAIL PROTECTED] wrote:
 Hi!

 What does this error mean?

 No behavior listener found with behaviorId 0

 What is being done wrong? Normally, the site works ok but the error
 log shows this kind of error.

 Am I manifesting some known Wicket antipattern which causes this
 error? Or is it just a result of another illegal state?

   at 
 org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:95)
   at 
 org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:91)
   at 
 org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1174)
   at org.apache.wicket.RequestCycle.step(RequestCycle.java:1251)
   at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1352)
   at org.apache.wicket.RequestCycle.request(RequestCycle.java:499)
   at 
 org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:375)
   at 
 org.apache.wicket.protocol.http.WicketServlet.doPost(WicketServlet.java:145)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
   at wicket.quickstart.TakpServlet.service(TakpServlet.java:58)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
   at 
 org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:491)
   at 
 org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:367)
   at 
 org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:185)
   at 
 org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
   at 
 org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:689)
   at 
 

Re: No behavior listener found

2008-11-04 Thread James Carman
A temporary behavior returns true from isTemporary().  Some behaviors
don't need to be remembered on the server-side (like
AttributeAppender, for example).

On Tue, Nov 4, 2008 at 12:01 PM, Martin Makundi
[EMAIL PROTECTED] wrote:
 What is a temporary behavior?

 I do not understand conceptually how a behavior can be invoked if it
 is no longer there..

 The error log shows a nearby nullpointer exception which might have
 occurred during the same OnAjaxChangeBehavior .. maybe it led into an
 illegal state:

   at org.apache.wicket.Component.setModelObject(Component.java:2951)
   at 
 org.apache.wicket.markup.html.form.FormComponent.updateModel(FormComponent.java:1082)
   at org.apache.wicket.markup.html.form.Form$19.validate(Form.java:1810)
   at 
 org.apache.wicket.markup.html.form.Form$ValidationVisitor.formComponent(Form.java:162)
   at 
 org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:426)
   at 
 org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:413)
   at 
 org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:413)
   at 
 org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:413)
   at 
 org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:413)
   at 
 org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:413)
   at 
 org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:413)
   at 
 org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:413)
   at 
 org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrder(FormComponent.java:390)
   at 
 org.apache.wicket.markup.html.form.Form.visitFormComponentsPostOrder(Form.java:1049)
   at 
 org.apache.wicket.markup.html.form.Form.internalUpdateFormComponentModels(Form.java:1801)
   at 
 org.apache.wicket.markup.html.form.Form.updateFormComponentModels(Form.java:1769)
   at org.apache.wicket.markup.html.form.Form.process(Form.java:851)
   at 
 org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:793)
   at 
 org.apache.wicket.ajax.form.AjaxFormSubmitBehavior.onEvent(AjaxFormSubmitBehavior.java:132)
   at 
 org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:161)
   at 
 org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:298)
   at 
 org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:100)
   at 
 org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:91)



 2008/11/4 Igor Vaynberg [EMAIL PROTECTED]:
 looks like the behavior that generated the callbakc url being invoked
 is no longer there...

 do you have any temporary behaviors on that component?

 -igor

 On Tue, Nov 4, 2008 at 9:07 AM, Martin Makundi
 [EMAIL PROTECTED] wrote:
 Hi!

 What does this error mean?

 No behavior listener found with behaviorId 0

 What is being done wrong? Normally, the site works ok but the error
 log shows this kind of error.

 Am I manifesting some known Wicket antipattern which causes this
 error? Or is it just a result of another illegal state?

   at 
 org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:95)
   at 
 org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:91)
   at 
 org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1174)
   at org.apache.wicket.RequestCycle.step(RequestCycle.java:1251)
   at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1352)
   at org.apache.wicket.RequestCycle.request(RequestCycle.java:499)
   at 
 org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:375)
   at 
 org.apache.wicket.protocol.http.WicketServlet.doPost(WicketServlet.java:145)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
   at wicket.quickstart.TakpServlet.service(TakpServlet.java:58)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
   at 
 org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:491)
   at 
 org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:367)
   at 
 org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:185)
   at 
 org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
   at 
 org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:689)
   at 
 org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:391)
   at 
 

Re: No behavior listener found

2008-11-04 Thread Martin Makundi
The behavior might actually by a button's ajax submit.

The npe occurs finally at the setModelObject:

2008-11-04 17:29:24,730 30836229 [btpool0-40] ERROR RequestCycle  -
java.lang.NullPointerException
   at com.xx.view.EditorPanel$ListOfStuff$1.setObject(EditorPanel.java:481)

**
Martin

2008/11/4 Igor Vaynberg [EMAIL PROTECTED]:
 the error means that a behavior constructed the url, but when the user
 followed the url the behavior could no longer be found.

 what npe? can you show the full stack trace?

 -igor

 On Tue, Nov 4, 2008 at 10:01 AM, Martin Makundi
 [EMAIL PROTECTED] wrote:
 What is a temporary behavior?

 I do not understand conceptually how a behavior can be invoked if it
 is no longer there..

 The error log shows a nearby nullpointer exception which might have
 occurred during the same OnAjaxChangeBehavior .. maybe it led into an
 illegal state:

   at org.apache.wicket.Component.setModelObject(Component.java:2951)
   at 
 org.apache.wicket.markup.html.form.FormComponent.updateModel(FormComponent.java:1082)
   at org.apache.wicket.markup.html.form.Form$19.validate(Form.java:1810)
   at 
 org.apache.wicket.markup.html.form.Form$ValidationVisitor.formComponent(Form.java:162)
   at 
 org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:426)
   at 
 org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:413)
   at 
 org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:413)
   at 
 org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:413)
   at 
 org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:413)
   at 
 org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:413)
   at 
 org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:413)
   at 
 org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:413)
   at 
 org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrder(FormComponent.java:390)
   at 
 org.apache.wicket.markup.html.form.Form.visitFormComponentsPostOrder(Form.java:1049)
   at 
 org.apache.wicket.markup.html.form.Form.internalUpdateFormComponentModels(Form.java:1801)
   at 
 org.apache.wicket.markup.html.form.Form.updateFormComponentModels(Form.java:1769)
   at org.apache.wicket.markup.html.form.Form.process(Form.java:851)
   at 
 org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:793)
   at 
 org.apache.wicket.ajax.form.AjaxFormSubmitBehavior.onEvent(AjaxFormSubmitBehavior.java:132)
   at 
 org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:161)
   at 
 org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:298)
   at 
 org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:100)
   at 
 org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:91)



 2008/11/4 Igor Vaynberg [EMAIL PROTECTED]:
 looks like the behavior that generated the callbakc url being invoked
 is no longer there...

 do you have any temporary behaviors on that component?

 -igor

 On Tue, Nov 4, 2008 at 9:07 AM, Martin Makundi
 [EMAIL PROTECTED] wrote:
 Hi!

 What does this error mean?

 No behavior listener found with behaviorId 0

 What is being done wrong? Normally, the site works ok but the error
 log shows this kind of error.

 Am I manifesting some known Wicket antipattern which causes this
 error? Or is it just a result of another illegal state?

   at 
 org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:95)
   at 
 org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:91)
   at 
 org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1174)
   at org.apache.wicket.RequestCycle.step(RequestCycle.java:1251)
   at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1352)
   at org.apache.wicket.RequestCycle.request(RequestCycle.java:499)
   at 
 org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:375)
   at 
 org.apache.wicket.protocol.http.WicketServlet.doPost(WicketServlet.java:145)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
   at wicket.quickstart.TakpServlet.service(TakpServlet.java:58)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
   at 
 org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:491)
   at 
 

Re: How does serialization work?

2008-11-04 Thread Johan Compagner
we still have a last x pages stored on disk.
it is just not a number of pages but it is how many pages fit in the default
window size of the file on disk (1 file per pagemap)

by default it is 10MB per pagemap and 100MB per total session.
so by default you can hold 10 pagemaps of 10MB after that least used
pagemaps are cleared.

johan


On Tue, Nov 4, 2008 at 12:48 AM, Igor Vaynberg [EMAIL PROTECTED]wrote:

 it is cleaned up when the session expires. it used to be that we only
 kept X last pages in the store, but now that we use disc that seems to
 be redundant.

 -igor

 On Mon, Nov 3, 2008 at 4:08 PM, Graeme Knight [EMAIL PROTECTED]
 wrote:
 
  Hi.
 
  I wondered another thing - how and when are the serialized objects
 cleaned
  up? Is there a mechanism for making sure large amounts of memory or disk
 are
  not soaked up by long running sessions and lots of user interactions?
 
  Thanks again, Graeme.
 
 
  Graeme Knight wrote:
 
  Timo!
 
  Thanks for your answers - so you think its better NOT to have the
  components as private member variables? I may misunderstand...
 
  'Tapestry' in Action LOL! Sorry! I'm moving over from that world
 into
  the Wicket world...
 
  Wicket in Action - VERY readable and well written, but perhaps I didn't
  get far enough along to get to the serialization parts (I'm just
 beginning
  Part 2).
 
  Cheers, Graeme.
 
  Timo Rantalaiho wrote:
 
  On Mon, 03 Nov 2008, GK1971 wrote:
  through the forum but couldn't find the answer. Couldn't find the
  answers
  from Tapestry in Action (I'm sure they are there if anyone can point
 me
  at a
  page).
 
  You might want to have a look at Wicket in Action :--)
 
  1) Exactly WHAT is getting serialized and where and when?
 
  The page, which includes its whole Component tree.
 
  2) What are the main classes in the framework responsible for
  serialization
  that I can look at (I have the source)? I guess I am after
 understanding
  the
  flow of logic.
 
  I find it easiest to start from Session.requestDetached().
  There you have
 
page.getPageMap().put(page);
 
=
 
SecondLevelCacheSessionStore.put(Page)
 
=
 
DiskPageStore.storePage(String sessionId, Page page)
 
  and there's already stuff about serialisation.
 
  I'm sure that someone can give you a more scientific answer :)
 
  3) What happens if I make userIdField and passwordField scoped to the
  constructor only? Is it common not to have them as member objects and
  why?
  (I've not tried this yet, just wondered).
 
  In here
 
  add( userIdField );
  add( passwordField );
 
  you add them as children of the constructed component.
  You can always access them for example with a visitor, if
  needed, and holding references to them makes it harder to
  replace them if needed (though it shouldn't be a problem if
  they won't be replaced).
 
  Best wishes,
  Timo
 
  --
  Timo Rantalaiho
  Reaktor Innovations OyURL: http://www.ri.fi/ 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 
 
  --
  View this message in context:
 http://www.nabble.com/How-does-serialization-work--tp20311180p20312968.html
  Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 

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




Re: Feedback/Error message.

2008-11-04 Thread Nick Heudecker
Or just style it with CSS.

On Tue, Nov 4, 2008 at 9:46 AM, Graeme Knight [EMAIL PROTECTED] wrote:


 Hey!

 Cool - add a feedback panel then set error - I like that! I didn't get to
 that part in the Wicket in Action as yet but I see how it works!

 Actually - my authentication method is very similar to the one on the book
 (again not got to that part yet), so I'm pretty psyched I'm heading in the
 right direction!

 I'm assuming if I wanted a panel with an icon and an error message I just
 create a component with a feedback panel and an image and populate
 accordingly?

 Cheers, Graeme.


 igor.vaynberg wrote:
 
  On Mon, Nov 3, 2008 at 8:02 PM, Graeme Knight [EMAIL PROTECTED]
  wrote:
  3) onSubmit authenticates against the database through a load on a
  LoadableDetachableModel, and returns the result as the model's object.
 
  ^ sounds interesting...paste your code.
 
  -igor
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

 --
 View this message in context:
 http://www.nabble.com/Feedback-Error-message.-tp20315444p20327425.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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




-- 
Nick Heudecker
Professional Wicket Training  Consulting
http://www.systemmobile.com

Eventful - Intelligent Event Management
http://www.eventfulhq.com


Re: Handling exceptions during render

2008-11-04 Thread aditsu


Alex Objelean wrote:
 
 Can you be more specific? What kind of unexpected runtime exceptions are
 you talking about? I don't think I understood you correctly.
 

It could be anything.. NPE (probably the most popular),
IllegalArgumentException and its descendants, ArithmeticException,
ClassCastException, IndexOutOfBoundsException etc... or a wrapper for a
checked exception.
It can happen in the application code or can be thrown from library code.
As for the reasons.. again there are lots of possibilities: invalid input,
buggy code, invalid data received from 3rd party, unhandled edge case,
unavailable resource, high load, etc.



 Any runtime exception thrown by the wicket is caused by a programming
 error... there is no sense to catch it without fixing the problem in your
 code. 
 

That sounds foolish to me, unless you consider any failure to handle any of
the situations described above, to be a programming error.
And I disagree a LOT more about the second sentence: usually when an
application is launched, it already passed some kind of testing which found
everything to be working well, and the application works well for a while,
then an unexpected exception happens. These exceptions in production are
very good friends of Murphy and tend to follow several laws, such as:
- Whatever can go wrong will go wrong, and at the worst possible time, in
the worst possible way
- Every non trivial program has at least one bug
- If you perceive that there are four possible ways in which something can
go wrong, and circumvent these, then a fifth way, unprepared for, will
promptly develop
- If the input editor has been designed to reject all bad input, an
ingenious idiot will discover a method to get bad data past it
So anyway, when (not if) the unexpected exception is thrown in production
code, what would you rather have the users see (whether there are 10, 1000
or 1000 users)? A big internal error page? Or a mostly-working page,
but with one part missing or showing an error message? Especially if access
to that same page is required in order to fix the problem!
-- 
View this message in context: 
http://www.nabble.com/Handling-exceptions-during-render-tp20301737p20327592.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Moving from Tapestry to Wicket?

2008-11-04 Thread Eelco Hillenius
 Honestly in our application (we have a roadmap for scalability) we are
 likely to get several hundred concurrent sessions per server with a few kb
 of state stored in the HTTPSession. Its not that much.

That's definitively no problem for even a very modest setup.

 What I was more
 concerned about was Page storage and storage that I can't control (for
 example, if I couldn't control IModel storage I would be concerned).

Well, when using any framework that abstracts stuff for you, you'll
trade convenience for transparency. I believe Wicket's architecture is
very open and it is easy enough to customize how it works for what you
want, but the more you want to deviate from the default, the more work
it'll be. I think you should just build the darn thing and optimize
when you have proof (through load testing for instance) that you are
hitting a bottle neck. :-)

Do try to work with detachable models (LoadableDetachableModel is my
favorite) where you can, because that will save considerably
especially with complex domain models and avoid lazy loading problems
with frameworks like Hibernate.

 We are unlikely to have spikes of traffic, but we are more likely to have
 dribs and drabs of users who potentially keep sessions open for perhaps
 minutes to hours.

Not a problem at all.

 For our initial scaling the client will have an affinity to a specific
 server. We can control the number of users that we have on a server. We can
 then scale our servers horizontally if we hit a scaling issue on one of the
 servers. I'm starting not to worry about it too much.

Yeah, with just a few hundred users clustering won't be much of a
problem either. Once you start to hit tens of thousands of concurrent
sessions you have to take this stuff more seriously, but until then in
my experience you'll be tweaking your database and business logic etc
way before Wicket gets to be in the way :-)

Eelco

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



Re: Feedback/Error message.

2008-11-04 Thread Graeme Knight

Hey!

Cool - add a feedback panel then set error - I like that! I didn't get to
that part in the Wicket in Action as yet but I see how it works!

Actually - my authentication method is very similar to the one on the book
(again not got to that part yet), so I'm pretty psyched I'm heading in the
right direction!

I'm assuming if I wanted a panel with an icon and an error message I just
create a component with a feedback panel and an image and populate
accordingly?

Cheers, Graeme.


igor.vaynberg wrote:
 
 On Mon, Nov 3, 2008 at 8:02 PM, Graeme Knight [EMAIL PROTECTED]
 wrote:
 3) onSubmit authenticates against the database through a load on a
 LoadableDetachableModel, and returns the result as the model's object.
 
 ^ sounds interesting...paste your code.
 
 -igor
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Feedback-Error-message.-tp20315444p20327425.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Moving from Tapestry to Wicket?

2008-11-04 Thread Graeme Knight

Hey Eelco!

Awesome! Thanks for your answers - they really helped. I appreciate the
time. BTW, Wicket in Action is a really well written book compared to others
in the genre. Thanks to you and Martijn for the hard work! It came at the
right time for me and we have decided to make the move from Tapestry.

Let you know how it goes, and I'll be on the forums plenty I am sure!

Cheers, Graeme.


Eelco Hillenius wrote:
 
 Honestly in our application (we have a roadmap for scalability) we are
 likely to get several hundred concurrent sessions per server with a few
 kb
 of state stored in the HTTPSession. Its not that much.
 
 That's definitively no problem for even a very modest setup.
 
 What I was more
 concerned about was Page storage and storage that I can't control (for
 example, if I couldn't control IModel storage I would be concerned).
 
 Well, when using any framework that abstracts stuff for you, you'll
 trade convenience for transparency. I believe Wicket's architecture is
 very open and it is easy enough to customize how it works for what you
 want, but the more you want to deviate from the default, the more work
 it'll be. I think you should just build the darn thing and optimize
 when you have proof (through load testing for instance) that you are
 hitting a bottle neck. :-)
 
 Do try to work with detachable models (LoadableDetachableModel is my
 favorite) where you can, because that will save considerably
 especially with complex domain models and avoid lazy loading problems
 with frameworks like Hibernate.
 
 We are unlikely to have spikes of traffic, but we are more likely to have
 dribs and drabs of users who potentially keep sessions open for perhaps
 minutes to hours.
 
 Not a problem at all.
 
 For our initial scaling the client will have an affinity to a specific
 server. We can control the number of users that we have on a server. We
 can
 then scale our servers horizontally if we hit a scaling issue on one of
 the
 servers. I'm starting not to worry about it too much.
 
 Yeah, with just a few hundred users clustering won't be much of a
 problem either. Once you start to hit tens of thousands of concurrent
 sessions you have to take this stuff more seriously, but until then in
 my experience you'll be tweaking your database and business logic etc
 way before Wicket gets to be in the way :-)
 
 Eelco
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Moving-from-Tapestry-to-Wicket--tp20254394p20328386.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Advice for a YUI Button Component

2008-11-04 Thread Nino Saturnino Martinez Vazquez Wael
Sure.. Just make the javascript call what ever the link calls.. You can 
see the input events contrib on wicketstuff on howto do this..


Adriano dos Santos Fernandes wrote:

Hi!

I didn't found any project integrating YUI Button with Wicket, and I'd 
want it. The problem that I'm seen is that onclick should not be on 
the button tag, but specified from javascript.


Would be possible to have *Link classes working (inheriting, or with 
behaviors) this way without need to reimplement all them?


Thanks,


Adriano


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



--
-Wicket for love

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


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



Re: attribute modifier on onclick

2008-11-04 Thread Alex Objelean

You probably want to use AjaxLink and when the link is clicked - add to the
target the link itself, in order to see the change.


miro wrote:
 
 upon debugging i foundthe constructor MyLink()  was getting called
 afteronClick() so any changes I make in onClick to components
 behaviour will get washed away because its adding the componentsagain
 , to better understand  what happens when a link is clicked ?  the
 component is created again ?
  
 
 here is the code 
 code
   PageableListView   batchesListView= new 
 PageableListView(batches,batches,10){
   
   /**
* 
*/
   private static final long serialVersionUID = 1L;
 
   @Override
   protected void populateItem(ListItem item) {
   final BatcheModel   
 batcheModel=(BatcheModel)item.getModelObject();
   
   
   class MyLink extends Link  {
   public MyLink() {
   super(batch, new 
 Model(batcheModel));
   add(new 
 Label(name,batcheModel.getName()));
   add(new Label(date, new 
 Date().toString()));
   }
   @Override
   public void onClick() {
   final BatcheModel   
 batcheModel=(BatcheModel)getModelObject();
   AuditsModel auditsModel=null;
   
 if(batcheModel.getName().equals(test1)){
   auditsModel= new 
 AuditsModel(test1,test1,test1);
   }
   
 if(batcheModel.getName().equals(test2)){
   auditsModel= new 
 AuditsModel(test2,test2,test2);
   }
   
 if(batcheModel.getName().equals(test3)){
   auditsModel= new 
 AuditsModel(test3,test3,test3);
   }
   ListAuditsModel audits= new 
 ArrayListAuditsModel();
   audits.add(auditsModel);
   PageableListView 
 pageableListView=   (PageableListView)
 AuditSelectionPage.this.get(audits);
   pageableListView.setModel(new 
 Model((Serializable)audits));
   Label  label=(Label)get(name);
   get(name).add(new 
 SimpleAttributeModifier(style,
 color:blue;));
   get(date).add(new 
 SimpleAttributeModifier(style,
 color:blue;));
   }
   }
   
   item.add(new MyLink());
 
 /code
 
 

-- 
View this message in context: 
http://www.nabble.com/attribute-modifier-on-onclick-tp20310246p20323946.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: AW: Wicket 1.4 and Wicketstuff/Dojo/DragAndDrop

2008-11-04 Thread Reinout van Schouwen
Hi Stefan,

Op vrijdag 25-04-2008 om 18:03 uur [tijdzone +0200], schreef Stefan Lindner:

 To all the other WicketStuff Dojo users: I have successfully built a
 version for current wicket 1.4 trunk. If someone nedds it, please let
 me know!

Actually I'm trying to get it for wicket 1.3.5, but please make your
work available so that others don't have to duplicate it. Thanks! :)

regards,

-- 
Reinout van Schouwen


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



Re: Wicket integration with good charts api

2008-11-04 Thread Martijn Dashorst
If you don't mind sending your chart data to google, google charts
might be a good solution. Other than that, you'll probably be heading
into the flash chart area (there are a lot of flash libraries for
creating flashy charts). I haven't used any of them, so you should try
some out.

Martijn

On Tue, Nov 4, 2008 at 7:43 AM, Tomasz Dziurko [EMAIL PROTECTED] wrote:
 My client needs in his application very good looking charts (simple
 bars with some gradienst and 3D effects). Unfortunately he didn't like
 what JFreeChart library offers so I must find and implement another
 solution.
 Questions are:
 1. Is there any other chart library easy to integrate with Wicket?
 2.off-topicWhich chart api (could be me commercial, client is
 paying) could you suggest?/off-topic

 Thank you for your help

 Regards
 --
 Tomasz Dziurko

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





-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.3.4 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

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



Advice for a YUI Button Component

2008-11-04 Thread Adriano dos Santos Fernandes

Hi!

I didn't found any project integrating YUI Button with Wicket, and I'd 
want it. The problem that I'm seen is that onclick should not be on the 
button tag, but specified from javascript.


Would be possible to have *Link classes working (inheriting, or with 
behaviors) this way without need to reimplement all them?


Thanks,


Adriano


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



Re: Advice for a YUI Button Component

2008-11-04 Thread Adriano dos Santos Fernandes

Thanks, Nino.

That is the good and easy way that I want to know.


Adriano


Nino Saturnino Martinez Vazquez Wael escreveu:
Sure.. Just make the javascript call what ever the link calls.. You 
can see the input events contrib on wicketstuff on howto do this..


Adriano dos Santos Fernandes wrote:

Hi!

I didn't found any project integrating YUI Button with Wicket, and 
I'd want it. The problem that I'm seen is that onclick should not be 
on the button tag, but specified from javascript.


Would be possible to have *Link classes working (inheriting, or with 
behaviors) this way without need to reimplement all them?


Thanks,


Adriano


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



Question about property expressions

2008-11-04 Thread Jan Stette
Hi all,

if I have a class like this:

class SomeClass {
   String getValue(String key);
}

...is there a way I can use a property expression to get values out of this
class?  E.g. using an expression like value[myKey].
In other words, something very similar to if the class looked like this:

class SomeClass {
   MapString, String getValues();
}

(of course, the expression would be values[myKey] in this case)

Unfortunately, in this instance the class isn't one that I can change.  So,
is the former example possible with the property expressions that come with
Wicket?  If not, what is the easiest way to extend these to do what I want -
overriding AbstractPropertyModel.getObject()?

Regards,
Jan


Re: Wicket integration with good charts api

2008-11-04 Thread Nino Saturnino Martinez Vazquez Wael
You do know there are an abundance of jfreecharts right, they are highly 
customizable.. And theres even a javaweb start thing where they demo 
it... But you probably did show them this...


http://www.jfree.org/jfreechart/jfreechart-1.0.11-demo.jnlp

Tomasz Dziurko wrote:

My client needs in his application very good looking charts (simple
bars with some gradienst and 3D effects). Unfortunately he didn't like
what JFreeChart library offers so I must find and implement another
solution.
Questions are:
1. Is there any other chart library easy to integrate with Wicket?
2.off-topicWhich chart api (could be me commercial, client is
paying) could you suggest?/off-topic

Thank you for your help

Regards
  


--
-Wicket for love

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


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



Re: No behavior listener found

2008-11-04 Thread Nino Saturnino Martinez Vazquez Wael

Hi Martin

I got them a lot when creating the wicket reaction game.. For me the 
problem where that I added new components all the time and if in the 
mean time the component disappared (we are talking miliseconds) and the 
user managed to click the cells then they would get the problem..


Martin Makundi wrote:

Hi!

What does this error mean?

No behavior listener found with behaviorId 0

What is being done wrong? Normally, the site works ok but the error
log shows this kind of error.

Am I manifesting some known Wicket antipattern which causes this
error? Or is it just a result of another illegal state?

   at 
org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:95)
   at 
org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:91)
   at 
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1174)
   at org.apache.wicket.RequestCycle.step(RequestCycle.java:1251)
   at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1352)
   at org.apache.wicket.RequestCycle.request(RequestCycle.java:499)
   at 
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:375)
   at 
org.apache.wicket.protocol.http.WicketServlet.doPost(WicketServlet.java:145)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
   at wicket.quickstart.TakpServlet.service(TakpServlet.java:58)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
   at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:491)
   at 
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:367)
   at 
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:185)
   at 
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
   at 
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:689)
   at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:391)
   at 
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:146)
   at 
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
   at 
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
   at org.mortbay.jetty.Server.handle(Server.java:285)
   at 
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:457)
   at 
org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:765)
   at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:627)
   at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:203)
   at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:357)
   at 
org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:217)
   at 
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)


**
Martin

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

  


--
-Wicket for love

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


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



Re: Question about property expressions

2008-11-04 Thread Igor Vaynberg
no you cannot use propertymodel, but you can easily write your own
model that calls the method directly.

-igor

On Tue, Nov 4, 2008 at 12:52 PM, Jan Stette [EMAIL PROTECTED] wrote:
 Hi all,

 if I have a class like this:

 class SomeClass {
   String getValue(String key);
 }

 ...is there a way I can use a property expression to get values out of this
 class?  E.g. using an expression like value[myKey].
 In other words, something very similar to if the class looked like this:

 class SomeClass {
   MapString, String getValues();
 }

 (of course, the expression would be values[myKey] in this case)

 Unfortunately, in this instance the class isn't one that I can change.  So,
 is the former example possible with the property expressions that come with
 Wicket?  If not, what is the easiest way to extend these to do what I want -
 overriding AbstractPropertyModel.getObject()?

 Regards,
 Jan


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



Re: Wicket integration with good charts api

2008-11-04 Thread Rob Sonke

Google charts good enough? (see wicket stuff projects)

Tomasz Dziurko wrote:

My client needs in his application very good looking charts (simple
bars with some gradienst and 3D effects). Unfortunately he didn't like
what JFreeChart library offers so I must find and implement another
solution.
Questions are:
1. Is there any other chart library easy to integrate with Wicket?
2.off-topicWhich chart api (could be me commercial, client is
paying) could you suggest?/off-topic

Thank you for your help

Regards
  


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



Re: WASP/SWARM status

2008-11-04 Thread Nino Saturnino Martinez Vazquez Wael

I've been wondering the same thing...

Where this what you looked at?

https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/branches/wicket-security-1.4-earlyaccess/

Wayne Pope wrote:

Hi,

After the staggering loss of Maurice I was wondering if anyone had picked up
the baton with WASP/SWARM?
I look at svn and the last update was from mrmean so I presume not.

I just wanted to check

Thanks
Wayne

  


--
-Wicket for love

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


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



Where is code for ActionPanel used in repeater examples?

2008-11-04 Thread palun

Where is the code for ActionPanel used in the examples on
http://wicketstuff.org/wicket13/repeater/?wicket:bookmarkablePage=sources:org.apache.wicket.examples.repeater.Index
?

I'm using Wicket vers. 1.3.4. (Is that the problem?)

Thanks,
/ulf

-- 
View this message in context: 
http://www.nabble.com/Where-is-code-for-ActionPanel-used-in-repeater-examples--tp20319149p20319149.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: attribute modifier on onclick

2008-11-04 Thread miro

upon debugging i foundthe constructor MyLink()  was getting called after   
onClick() so any changes I make in onClick to components behaviour will get
washed away because its adding the componentsagain , to better
understand  what happens when a link is clicked ?  the component is created
again ?
 

here is the code 
code
PageableListView   batchesListView= new 
PageableListView(batches,batches,10){

/**
 * 
 */
private static final long serialVersionUID = 1L;

@Override
protected void populateItem(ListItem item) {
final BatcheModel   
batcheModel=(BatcheModel)item.getModelObject();


class MyLink extends Link  {
public MyLink() {
super(batch, new 
Model(batcheModel));
add(new 
Label(name,batcheModel.getName()));
add(new Label(date, new 
Date().toString()));
}
@Override
public void onClick() {
final BatcheModel   
batcheModel=(BatcheModel)getModelObject();
AuditsModel auditsModel=null;

if(batcheModel.getName().equals(test1)){
auditsModel= new 
AuditsModel(test1,test1,test1);
}

if(batcheModel.getName().equals(test2)){
auditsModel= new 
AuditsModel(test2,test2,test2);
}

if(batcheModel.getName().equals(test3)){
auditsModel= new 
AuditsModel(test3,test3,test3);
}
ListAuditsModel audits= new 
ArrayListAuditsModel();
audits.add(auditsModel);
PageableListView 
pageableListView=   (PageableListView)
AuditSelectionPage.this.get(audits);
pageableListView.setModel(new 
Model((Serializable)audits));
Label  label=(Label)get(name);
get(name).add(new 
SimpleAttributeModifier(style, color:blue;));
get(date).add(new 
SimpleAttributeModifier(style, color:blue;));
}
}

item.add(new MyLink());

/code

Michael Sparer wrote:
 
 show us some code
 
 miro wrote:
 
 I have a linkthis contains a label , now I want  to change the style
 of the label   whenever user clicks on the link ,  to do this   I
 override  the method onClick()  in  link component  I am retrieving the
 label  and adding  simpleattributemodifier to the label , but there is no
 change , when I see the generated html it does not include  the added
 style  , can I change the style of a component in  any of the   events of
 a component ?
 
 
 

-- 
View this message in context: 
http://www.nabble.com/attribute-modifier-on-onclick-tp20310246p20320579.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: WASP/SWARM status

2008-11-04 Thread Nino Saturnino Martinez Vazquez Wael

Great :)

And please ask if you run into troubles..And if no one comes back on 
this say that they have something that they just need to checkin (which 
are unlikely to happen). You can check it in, do you have svn rights?


Wayne Pope wrote:

I'm going to see if I can get it working against 1.4 m3

On Tue, Nov 4, 2008 at 10:25 AM, Nino Saturnino Martinez Vazquez Wael 
[EMAIL PROTECTED] wrote:

  

Hehe, I can understand... I figure that Maurice where playing around with
wicket 1.4 and wicket security, and created a branch for it.. So my bet are
that it probably need a lot of updates, to get it going.. If it's still
unmaintained. And I actually wrote an mail to the dev list about the
continuation of swarm, but thats a while ago..


http://www.nabble.com/In-memoriam%3A-Maurice-Marrink-td18813738.html#a18932415

I might have been asking too quickly. But the question still remains to be
answered. And it would be a real shame if nobody continued it.


Wayne Pope wrote:



hi Nino,

no I was looking at :

https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicket-security/

let me checkout the other and have a look

I never know where I'm ment to find things with Wicket!

On Tue, Nov 4, 2008 at 10:10 AM, Nino Saturnino Martinez Vazquez Wael 
[EMAIL PROTECTED] wrote:



  

I've been wondering the same thing...

Where this what you looked at?



https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/branches/wicket-security-1.4-earlyaccess/


Wayne Pope wrote:





Hi,

After the staggering loss of Maurice I was wondering if anyone had
picked
up
the baton with WASP/SWARM?
I look at svn and the last update was from mrmean so I presume not.

I just wanted to check

Thanks
Wayne





  

--
-Wicket for love

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


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







  

--
-Wicket for love

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


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





  


--
-Wicket for love

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


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



Re: WASP/SWARM status

2008-11-04 Thread Wayne Pope
Last touched in July by maurice:
'initial compilation against wicket 1.4 (no generics yet)'



On Tue, Nov 4, 2008 at 10:16 AM, Wayne Pope 
[EMAIL PROTECTED] wrote:

 hi Nino,

 no I was looking at :

 https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicket-security/

 let me checkout the other and have a look

 I never know where I'm ment to find things with Wicket!


 On Tue, Nov 4, 2008 at 10:10 AM, Nino Saturnino Martinez Vazquez Wael 
 [EMAIL PROTECTED] wrote:

 I've been wondering the same thing...

 Where this what you looked at?


 https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/branches/wicket-security-1.4-earlyaccess/


 Wayne Pope wrote:

 Hi,

 After the staggering loss of Maurice I was wondering if anyone had picked
 up
 the baton with WASP/SWARM?
 I look at svn and the last update was from mrmean so I presume not.

 I just wanted to check

 Thanks
 Wayne




 --
 -Wicket for love

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


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





Re: ApacheCon live video streaming available; keynotes and Apache 101 are free

2008-11-04 Thread Jeremy Thomerson
I also have the privilege of attending, so I am planning on live blogging
from the sessions that I attend.  You will definitely get at least a picture
or two of Martijn presenting tomorrow's session: Wicket in Action.

My blog is here: http://www.jeremythomerson.com/blog/
Bruno Borges is also attending with us, and his blog is here:
http://blog.brunoborges.com.br/



-- 
Jeremy Thomerson
http://www.wickettraining.com

On Tue, Nov 4, 2008 at 10:30 AM, Martijn Dashorst [EMAIL PROTECTED]wrote:

 Can't make ApacheCon this week in New Orleans?  You can still watch all
 the keynotes, Apache 101 sessions, and system administration track in
 live video streams:

  http://streaming.linux-magazin.de/en/program_apacheconus08.htm?ann

 Keynotes and the Apache 101 lunchtime sessions are free; the full
 sysadmin track, including httpd performance, security, and server stack
 administration talks are available for a fee.

 Keynotes include:
 - David Recordon, Six Apart  (Wednesday 09:30)
  Learning from Apache to create Open Specifications

 - Shahani Markus Weerawarana, Ph.D.  (Thursday 11:30)
  Standing on the Shoulders of Giants

 - Sam Ramji, Microsoft  (Friday 11:30)
  struct.new(future, :open, :microsoft)


  Reminder: New Orleans is CST or UTC/GMT -6 hours.


 Advance notice: ApacheCon EU 2009 returns to Amsterdam, 23-27 March.  We
 had a great response to our CFP and look forward to announcing the
 schedule in the next month.

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




Slogging through Wicket's guts

2008-11-04 Thread danelav

I'm trying to understand how Wicket's RequestCycle works in order to resolve
the problem I explained in my previous post, Losing session information.
I'm using Eclipse's debugger to step through the process, but I've hit a
wall.

I'm using Wicket 1.3.4, and I get stuck at RequestListenerInterface, line
183. At this point, Wicket calls method.invoke(..). The object method
has IFormSubmitListener as its class and onFormSubmitted as its method
name.

This is apparently an important line, since it's the place where the
submitted form values get transferred from the request to the session.
However, IFormSubmitListener.onFormSubmitted doesn't do anything.
IFormSubmitListener is an interface. Can anyone explain to me how Wicket
uses an interface with an empty method to transfer values from the request
to the session?

My stack looks like this, if that helps:

RequestListenerInterface.invoke(Page, Component) line: 183  
ListenerInterfaceRequestTarget.processEvents(RequestCycle) line: 73 
WebRequestCycleProcessor(AbstractRequestCycleProcessor).processEvents(RequestCycle)
line: 91
FoodHandlerWebRequestCycle(RequestCycle).processEventsAndRespond() line:
1171
FoodHandlerWebRequestCycle(RequestCycle).step() line: 1248  
FoodHandlerWebRequestCycle(RequestCycle).steps() line: 1349 
FoodHandlerWebRequestCycle(RequestCycle).request() line: 493
WicketFilter.doGet(HttpServletRequest, HttpServletResponse) line: 387   
WicketServlet.doPost(HttpServletRequest, HttpServletResponse) line: 145 
...
-- 
View this message in context: 
http://www.nabble.com/Slogging-through-Wicket%27s-guts-tp20334397p20334397.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Looking for an example of Remember-me login functionality

2008-11-04 Thread fatefree

I'm hoping to find a working example of a remember-me type login. I don't
mean that the username is stored in a cookie, but rather the user doesn't
need to go to a login page as they are authenticated through cookies
immediately.

I have struggled to try and piece together the code from this example: 
http://swik.net/User:go4info/go4blog/wicket,+acegi+and+remember+me+authentication/bmcu1
Wicket-Remember-Me-Authentication 

But i have never been able to put the fragments together to make a working
demo. Acegi and Auth Roles is the way I am currently authenticating, but I
am willing to drop the entire combo if there is an easier way. It also
worries me a little that every url is filtered through acegi when they don't
all need to be, but thats a different discussion altogether.

So if anyone has accomplished this, or knows of a place with more
information I would greatly appreciate it.
-- 
View this message in context: 
http://www.nabble.com/Looking-for-an-example-of-Remember-me-login-functionality-tp20334450p20334450.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Slogging through Wicket's guts

2008-11-04 Thread Igor Vaynberg
it uses reflection to invoke the proper methods. the contract of the
listener interface is that they contain a single void method that
takes no arguments, this method is then invoked on the component via
reflection. so since form implements iformsubmitlsitener its
onformsubmitted() method will be invoked.

-igor

On Tue, Nov 4, 2008 at 4:35 PM, danelav [EMAIL PROTECTED] wrote:

 I'm trying to understand how Wicket's RequestCycle works in order to resolve
 the problem I explained in my previous post, Losing session information.
 I'm using Eclipse's debugger to step through the process, but I've hit a
 wall.

 I'm using Wicket 1.3.4, and I get stuck at RequestListenerInterface, line
 183. At this point, Wicket calls method.invoke(..). The object method
 has IFormSubmitListener as its class and onFormSubmitted as its method
 name.

 This is apparently an important line, since it's the place where the
 submitted form values get transferred from the request to the session.
 However, IFormSubmitListener.onFormSubmitted doesn't do anything.
 IFormSubmitListener is an interface. Can anyone explain to me how Wicket
 uses an interface with an empty method to transfer values from the request
 to the session?

 My stack looks like this, if that helps:

 RequestListenerInterface.invoke(Page, Component) line: 183
 ListenerInterfaceRequestTarget.processEvents(RequestCycle) line: 73
 WebRequestCycleProcessor(AbstractRequestCycleProcessor).processEvents(RequestCycle)
 line: 91
 FoodHandlerWebRequestCycle(RequestCycle).processEventsAndRespond() line:
 1171
 FoodHandlerWebRequestCycle(RequestCycle).step() line: 1248
 FoodHandlerWebRequestCycle(RequestCycle).steps() line: 1349
 FoodHandlerWebRequestCycle(RequestCycle).request() line: 493
 WicketFilter.doGet(HttpServletRequest, HttpServletResponse) line: 387
 WicketServlet.doPost(HttpServletRequest, HttpServletResponse) line: 145
 ...
 --
 View this message in context: 
 http://www.nabble.com/Slogging-through-Wicket%27s-guts-tp20334397p20334397.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Re: Looking for an example of Remember-me login functionality

2008-11-04 Thread Igor Vaynberg
this kind of code needs to go into your authorization strategy. there
instead of redirecting to login page you first check for cookies and
if the proper cookie is found simply return true instead of
redirecting to login page. you can use
(webrequest)requestcycle.get().getrequest() to get to cookies.

-igor

On Tue, Nov 4, 2008 at 4:40 PM, fatefree [EMAIL PROTECTED] wrote:

 I'm hoping to find a working example of a remember-me type login. I don't
 mean that the username is stored in a cookie, but rather the user doesn't
 need to go to a login page as they are authenticated through cookies
 immediately.

 I have struggled to try and piece together the code from this example:
 http://swik.net/User:go4info/go4blog/wicket,+acegi+and+remember+me+authentication/bmcu1
 Wicket-Remember-Me-Authentication

 But i have never been able to put the fragments together to make a working
 demo. Acegi and Auth Roles is the way I am currently authenticating, but I
 am willing to drop the entire combo if there is an easier way. It also
 worries me a little that every url is filtered through acegi when they don't
 all need to be, but thats a different discussion altogether.

 So if anyone has accomplished this, or knows of a place with more
 information I would greatly appreciate it.
 --
 View this message in context: 
 http://www.nabble.com/Looking-for-an-example-of-Remember-me-login-functionality-tp20334450p20334450.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Re: Question about property expressions

2008-11-04 Thread Jan Stette
Sure.  To explain a bit more why I'm asking: I have a table component that's
configured using property expressions as to what's shown in each column.
The types of objects to be shown in the table are not known in advance,
hence having a hard coded model for a specific type of class isn't really
desirable.  Given this, do you think it would make sense to provide an
extended property model, so that it could cope with the type of example of
objects I showed below?

Thanks,
Jan


2008/11/4 Igor Vaynberg [EMAIL PROTECTED]

 no you cannot use propertymodel, but you can easily write your own
 model that calls the method directly.

 -igor

 On Tue, Nov 4, 2008 at 12:52 PM, Jan Stette [EMAIL PROTECTED] wrote:
  Hi all,
 
  if I have a class like this:
 
  class SomeClass {
String getValue(String key);
  }
 
  ...is there a way I can use a property expression to get values out of
 this
  class?  E.g. using an expression like value[myKey].
  In other words, something very similar to if the class looked like this:
 
  class SomeClass {
MapString, String getValues();
  }
 
  (of course, the expression would be values[myKey] in this case)
 
  Unfortunately, in this instance the class isn't one that I can change.
  So,
  is the former example possible with the property expressions that come
 with
  Wicket?  If not, what is the easiest way to extend these to do what I
 want -
  overriding AbstractPropertyModel.getObject()?
 
  Regards,
  Jan
 

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




PropertyColumn and generics

2008-11-04 Thread Luke Ma

I'm writing a custom BooleanChoiceFilteredPropertyColumnT extends
ChoiceFilteredPropertyColumnT (on 1.4-m3).  When implementing

@Override
public void populateItem(final Item cellItem, final String componentId,
final IModel model)

I get a warning about Item and IModel needing to be parameterized.  Makes
sense.  But if I parameterize it, I get:

Name clash: The method populateItem(ItemICellPopulatorT, String,
IModelT) of type BooleanChoiceFilteredPropertyColumnT has the same
erasure as populateItem(Item, String, IModel) of type PropertyColumnT but
does not override itBooleanChoiceFilteredPropertyColumn.java

So it turns out that even though Item and IModel have been generified (as
well as PropertyColumn), the signature of populateItem in PropertyColumn is
still:

public void populateItem(Item item, String componentId, IModel model)

Shouldn't that be:

public void populateItem(ItemICellPopulatorT item, String 
componentId,
IModelT model)

, the way it is in ICellPopulator? Am I smoking or misunderstanding
generics?

Luke
-- 
View this message in context: 
http://www.nabble.com/PropertyColumn-and-generics-tp20335170p20335170.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Looking for an example of Remember-me login functionality

2008-11-04 Thread fatefree

Thanks igor, I looked into that and unfortunately the method that controls
that is declared final in auth roles' AuthenticatedWebApplication (public
final void onUnauthorizedInstantiation(final Component component))

What I came to realize is that by configuring acegi's standard remember-me
processing filter, acegi will take care of looking for a cookie and using it
to authenticate. The problem seems to be in creating the cookie for the
first time, since I don't see how I can use acegi (which traditionally uses
authenticationProcessingFilter, that seems to be url driven) to hook into a
successful authentication and create the cookie.

So my plan to remedy that was to inject the remember me service into the
application, and create the cookie after the submission of the login form.
I'll experiment with that tomorrow and share my results. But i appreciate
the feedback


igor.vaynberg wrote:
 
 this kind of code needs to go into your authorization strategy. there
 instead of redirecting to login page you first check for cookies and
 if the proper cookie is found simply return true instead of
 redirecting to login page. you can use
 (webrequest)requestcycle.get().getrequest() to get to cookies.
 
 -igor
 

-- 
View this message in context: 
http://www.nabble.com/Looking-for-an-example-of-Remember-me-login-functionality-tp20334450p20335335.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Design question : accessing components between panels

2008-11-04 Thread Arun Wagle
Hello ,

I have an application which renders a page.
This page has two panels , panel A and panel B
Each panel has some components in it.

Now I want to access some component in panel B from panel A.

Can someone tell me how do I get a handle to panel B in panel A ?

If I have an instance of the page, then I can do a *get(id of panel B)* to
get the instance of panel B
But how do I get the instance of the home page in panel A ?

How can I acheive this scenarion in the best possible way?

Can someone please help me as I have lot of cases with these scenarious ?




Regards,
Arun Wagle


Re: Handling exceptions during render

2008-11-04 Thread aditsu


igor.vaynberg wrote:
 
 i would hate a user to look at a signup form without a signup button
 because something inside it caused an error.
 
 i would also hate to see a user at a checkout page with a missing
 $500.00 discount amount shown because there was an error in the
 discount label.
 

Some forms can be submitted by pressing enter, but anyway, there are indeed
cases where removing a small component is not a good idea.
It's probably better to replace the whole form or the whole checkout list
with an error message, or in some cases replace/redirect the whole page (the
current behavior).
Anyway, I want to have the option to catch exceptions from child components
at certain points that I can define. And I think I got a new idea..
involving replace and RestartResponseException

Adrian
-- 
View this message in context: 
http://www.nabble.com/Handling-exceptions-during-render-tp20301737p20336435.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Handling exceptions during render

2008-11-04 Thread aditsu


aditsu wrote:
 
 Anyway, I want to have the option to catch exceptions from child
 components at certain points that I can define. And I think I got a new
 idea.. involving replace and RestartResponseException
 

Well, it seems to work, except I had to call setAuto(true) on the
replacement component, to avoid a Cannot modify component hierarchy after
render phase has started (page version cant change then anymore) exception.
I'm not entirely sure what setAuto does, I hope it doesn't break anything in
this case.
What does that exception mean anyway?

Adrian
-- 
View this message in context: 
http://www.nabble.com/Handling-exceptions-during-render-tp20301737p20336613.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Design question : accessing components between panels

2008-11-04 Thread Igor Vaynberg
component#getPage()

-igor

On Tue, Nov 4, 2008 at 9:28 PM, Arun Wagle [EMAIL PROTECTED] wrote:
 Hello ,

 I have an application which renders a page.
 This page has two panels , panel A and panel B
 Each panel has some components in it.

 Now I want to access some component in panel B from panel A.

 Can someone tell me how do I get a handle to panel B in panel A ?

 If I have an instance of the page, then I can do a *get(id of panel B)* to
 get the instance of panel B
 But how do I get the instance of the home page in panel A ?

 How can I acheive this scenarion in the best possible way?

 Can someone please help me as I have lot of cases with these scenarious ?




 Regards,
 Arun Wagle


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



adding favicon using behavior

2008-11-04 Thread Eyal Golan
Hi,
We have a behavior that is added to our main page (we use markup
inheritance).
In the behavior we add CSS links (and JS).
We want to add a favicon as well.
Here's what we did:
response.getResponse().write(link rel=\SHORTCUT ICON\
href=\/resources/favicon.ico\/\n);

Is this the best way?

Thanks

-- 
Eyal Golan
[EMAIL PROTECTED]

Visit: http://jvdrums.sourceforge.net/
LinkedIn: http://www.linkedin.com/in/egolan74

P  Save a tree. Please don't print this e-mail unless it's really necessary


Re: adding favicon using behavior

2008-11-04 Thread Igor Vaynberg
use iheadercontributor

-igor

On Tue, Nov 4, 2008 at 11:43 PM, Eyal Golan [EMAIL PROTECTED] wrote:
 Hi,
 We have a behavior that is added to our main page (we use markup
 inheritance).
 In the behavior we add CSS links (and JS).
 We want to add a favicon as well.
 Here's what we did:
 response.getResponse().write(link rel=\SHORTCUT ICON\
 href=\/resources/favicon.ico\/\n);

 Is this the best way?

 Thanks

 --
 Eyal Golan
 [EMAIL PROTECTED]

 Visit: http://jvdrums.sourceforge.net/
 LinkedIn: http://www.linkedin.com/in/egolan74

 P  Save a tree. Please don't print this e-mail unless it's really necessary


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