Re: How to refresh ListView on ModalWindow

2010-08-28 Thread Sven Meier

Hi,

you're pushing your comments into the ListView.
Obviously changing the commentsList variable afterwards has no effect 
on what the ListView is iterating over.


To keep the comments up-to-date, use a model:

ListView eachComment=new ListView(eachComment, new PropertyModel(this, 
commentsList)){

HTH

Sven

On 08/27/2010 11:20 PM, zoran wrote:

Hi,

I have a list of products containing a link that should show a user comments
on each product in a modal window. I created a ModalWindow containing a
Panel. I send a list containing comments to this panel. I'm using a ListView
to show this comments e.g:

ListView eachComment=new ListView(eachComment, commentsList){

@Override
protected void populateItem(ListItem item) {
Comment comment=(Comment) item.getModelObject();
item.add(new 
Label(commentContent,comment.getContent()));
}
};

First time I select some product, the list is created in appropriate way.
However, when I close that ModalWindow and open another one for different
product, the first list is shown again. CommentsList containing the comments
is updated before populateItem is called, but it seems that I should make
something more. Do you have any suggestions?

Zoran
   



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



Re: EXception handling in Wicket

2010-08-28 Thread Antoine van Wel
I think you should prevent that SQLException from happening in the first
place by validating the form input.
Then use a FeedbackPanel to display suitable error messages. Just google for
example code with forms, it's basic stuff.

Otherwise, create a FeedbackPanel on your page, put a try .. catch block
around your sql methods and in case of an exception, write to the
FeedbackPanel using error(your message)



Antoine


On Fri, Aug 27, 2010 at 3:02 PM, arunarapole arunakumm...@gmail.com wrote:


 Thank you for replay i am very glad you have sent me the sample code thank
 you so much

 My problem is i have to handle SQLException and only message  to be display
 in hidden field  same webpage

 do u have any idea regarding this

 Aruna

 On Thu, Aug 26, 2010 at 10:14 PM, Nitnatsnok [via Apache Wicket] 
 ml-node+2340562-650873628-136...@n4.nabble.comml-node%2b2340562-650873628-136...@n4.nabble.com
 ml-node%2b2340562-650873628-136...@n4.nabble.comml-node%252b2340562-650873628-136...@n4.nabble.com
 
  wrote:

  Oh, also I set not to show Error Page on exception in WebApplication:
 
 
 getExceptionSettings().setUnexpectedExceptionDisplay(IExceptionSettings.SHOW_NO_EXCEPTION_PAGE);
 
 
  --
   View message @
 
 http://apache-wicket.1842946.n4.nabble.com/EXception-handling-in-Wicket-tp2340439p2340562.html
  To unsubscribe from EXception handling in Wicket, click here
 http://apache-wicket.1842946.n4.nabble.com/template/TplServlet.jtp?tpl=unsubscribe_by_codenode=2340439code=YXJ1bmFrdW1tYXJpQGdtYWlsLmNvbXwyMzQwNDM5fC00Njg4NjYxODg=
 .
 
 
 


 --


 Regards
 Aruna.R
 404-988-5562

 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/EXception-handling-in-Wicket-tp2340439p2341035.html
 Sent from the Wicket - User mailing list archive at Nabble.com.



Re: [1.5] new wicket URL-related questions

2010-08-28 Thread Antoine van Wel
 Q2: (a little n00b question) how can I find out which component makes my
 page stateful?


Check the wicket-devutils and StatelessChecker. It allows you to use an
annotation to validate the component is really stateless.


Antoine