Re: The Wicket Reflex Game Post thoughts?

2008-09-27 Thread Nino Saturnino Martinez Vazquez Wael
I think it's already been taken care of.. IT's because the user clicks 
on something that no longer exists..


Adriano dos Santos Fernandes wrote:

Nino Saturnino Martinez Vazquez Wael wrote:

Hi Guys

One of the major problems with the game are that if you click a 
box(AjaxEventBehavior) while the heartbeat(AbstractAjaxTimerBehavior) 
are in process you will get an error, since the box's component has 
changed and no longer carries that behavior. I've tried to solve this 
by adding a transparent veil to the page once the heartbeat 
processes, it's simply not good enough, it's still possible to get 
errors. So how do I solve this?


I have one idea but im not liking it, all box's could have behaviors 
even if you wont get an score, that way we will not get an error.



This is a potential pitfall if you ever will have two Ajax components 
that can remove the ones behavior, if the user clicks the other while 
loading then it's gonna complain. On the other hand im not sure what 
wicket can do besides throw a runtime exception.


Can't you use synchronized (obj) { ... }, to serialize multiple 
threads of each ajax call?



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: Usage of Application class and why set to ThreadLocal

2008-09-27 Thread Johan Compagner
And its just handy.. You can get to the application by one call
everywhere in your code. Of couse we could have done with one
threadlocal like RequestCycle and  Application and Session can be got
from there. But those 3 are just handy quick accessed objects

On 9/26/08, James Carman [EMAIL PROTECTED] wrote:
 On Fri, Sep 26, 2008 at 7:28 AM, Takeshi Matsuba [EMAIL PROTECTED] wrote:
 Hi all.

 I understand that there is one Application class instance per
 WicketFilter.
 So, I can use Application class like on memory database.
 (Wicket In Action too. )

 I read source. I notice that Application class instance set ThreadLocal.
 I understand that value of threadLocal is Singleton per request in
 Servlet world.
 Can I use Application class like Singleton per WicketFilter?
 And why set to ThreadLocal?

 You could conceivably have two different Wicket applications running
 within the same webapp.  I suppose that's why the access is based on a
 ThreadLocal.

 -
 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: Re: Get object form Parameters

2008-09-27 Thread Eyal Golan
On Sat, Sep 27, 2008 at 8:38 AM, fish3934 [EMAIL PROTECTED] wrote:

 How to pass id and got that object from that id?

Instead of:
   PageParameters  para=new PageParameters();
   para.put(result,resultList);
do somethig like this:
para.put(listId, resultListId);
Where the resultListID is the ID that you can retrieve your list afterwords
(from a DAO or whatever).
Then in the other page instead of:
List list = (List)param.get(result);
Do:
Integer id = param.getInt(listId); // If I have a typo error please excuse
me, I'm not near an IDE now.
List list = myDao.getList(id);



 I am sorry,I learned wicket just a few days.Is there any other ways to pass
 an object form one page to another page?

Yes,
You can make your other page not bookmarkable and pass the object (in your
case the list) in the constructor.
public class MyPage extends WebPage {
  public MyPage(List? inputList) {
...

You can even make this page to have several constructors.
One that gets a List and one that gets PageParameters.

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


ListMultipleChoice Defalut Selection

2008-09-27 Thread Vaibhav Lolge

Hi,
I have a piece of code that uses ListMultipleChoice . I do some action
depending on the selected item in the list (eg: The List is a list of
categories of cars and on click of these there are subcategories shown).
A user then saves this is the DB. A user can edit his preferences from the
list, hence he is brought back to the same page. Now, I get the values from
the DB, but I fail to understand, how do I show these items as selected in
ListMultipleChoice ?
Please suggest. A quick reply is really appreciated. 
Thanks in advance.
-- 
View this message in context: 
http://www.nabble.com/ListMultipleChoice-Defalut-Selection-tp19702889p19702889.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]