Re: [Wicket-user] error(...) No page found for component

2007-03-31 Thread Eelco Hillenius
> copy on write has the advantage when it comes to iterating over the list.

Only a real advantage when there would be many threads/ many reads,
and adding is more expensive with this list. I would be surprised if
this list gives a better performance. But we can benchmark it. Another
disadvantage is that the Iterator of that list doesn't allow remove.

Eelco

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] error(...) No page found for component

2007-03-31 Thread Igor Vaynberg

copy on write has the advantage when it comes to iterating over the list.
the locking needs to be there because we lock on pagemaps and not on
session, so two pages in different pagemaps would need to be synced.

-igor


On 3/31/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote:


> Yeah, that does sound like overkill in a single-threaded environment.
> What other thread would ever be accessing a session's feedback messages?

Furthermore, copy on write is efficient when there are lots of reads
and just a couple of writes, but that's not the case I think. So
normal synchronization would almost certain be more efficient here.

Eelco

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] error(...) No page found for component

2007-03-31 Thread Eelco Hillenius
> Yeah, that does sound like overkill in a single-threaded environment.
> What other thread would ever be accessing a session's feedback messages?

Furthermore, copy on write is efficient when there are lots of reads
and just a couple of writes, but that's not the case I think. So
normal synchronization would almost certain be more efficient here.

Eelco

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] error(...) No page found for component

2007-03-31 Thread Jonathan Locke


Yeah, that does sound like overkill in a single-threaded environment.
What other thread would ever be accessing a session's feedback messages?


Eelco Hillenius wrote:
> 
> Do feedbackmessages in the session really need to be synchronized with
> CopyOnWriteArrayList? I'm in doubt whether synchronization helps that
> much, but if it does, wouldn't it be more efficient to use a normal
> synchronized one?
> 
> Eelco
> 
> 
> On 3/31/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
>> On 3/31/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
>> > i am not so sure this is correct. we often deal with two page instances
>> > inside the same request - the current one and the response page. this
>> breaks
>> > any kind of scoping as errors reported against current page will now
>> make it
>> > into response page?
>>
>> About the session messages... well, they have a slightly different
>> meaning: display whenever there is a feedback component rendered on
>> any page. This is useful when writing generic software where you know
>> that a message should be displayed, but you just don't know the target
>> (e.g. at the end of a wizard).
>>
>> About per-page or per-request... yeah, we've been there too. If we
>> look back at the history we can say that the page is the correct place
>> to have it. So, what we should do is put the messages for the pages in
>> the session, and at the start of rendering (right before attach),
>> iterate through those messages and the ones that have components
>> attached (are for pages) are then added to those pages. If there are
>> messages with components that are not coupled to a page, well tough
>> luck and discard them (those would throw an exception currently).
>>
>> One final thing we should fix is the fact that feedbackmessages don't
>> get cleaned up when there are no feedback components in the page. This
>> is a memory leak.
>>
>> Eelco
>>
> 
> -
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
> 
> 

-- 
View this message in context: 
http://www.nabble.com/error%28...%29-No-page-found-for-component-tf3497125.html#a9774835
Sent from the Wicket - User mailing list archive at Nabble.com.


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] error(...) No page found for component

2007-03-31 Thread Jonathan Locke


yeah, your patch would work, but i think we agree that the 
session approach is better and cleaner (both functionally and
conceptually) for the long term even if it could at least 
/conceivably/ break some especially odd code (which it 
seems likely does not even exist).  

the semantics are actually quite nice in the session version.  
messages added directly to the session would still have a 
null reporter and persist until rendered, as they currently 
do (no changes there).  

messages reported by components would all be cleared at 
the end of a request (not the beginning of the next one).  
this is conceptually clearer and simpler and it actually 
reduces memory load (as does the removal of all aspects 
of feedback message storage from Page).

so i can't actually see any important disadvantage to the 
session approach.  and there seem to be several nice 
little wins.  probably less code too.


Eelco Hillenius wrote:
> 
>> We chose that, yes.  But would it be better to simply have all feedback
>> messages stored in the session?  That would solve all our scoping
>> problems
>> wouldn't it?  Every feedback message would go into the session and then
>> feedback panels could pull them out when they're ready to.  If a feedback
>> message is in the session for more than one request cycle and it is not
>> cleared
>> by a feedback panel, we would discard it (and maybe warn in debug mode).
> 
> I think I'm fine with a session based solution. The thing that
> wouldn't work anymore is when you assign messages to components/ pages
> which are not rendered this request but a next request. That might be
> too far-fetched to support though. However, the solution which I'll
> post as a patch on the end of this message will support anything it
> does now. The thing I like about putting them in the session is that
> it is clean and will save a little bit of memory in the page. WDYT?
> 
> Eelco
> 
> Index:
> /Users/eelcohillenius/Documents/workspace_wicket/wicket-1.x/jdk-1.4/wicket/src/main/java/wicket/Component.java
> ===
> ---
> /Users/eelcohillenius/Documents/workspace_wicket/wicket-1.x/jdk-1.4/wicket/src/main/java/wicket/Component.java
> (revision
> 524461)
> +++
> /Users/eelcohillenius/Documents/workspace_wicket/wicket-1.x/jdk-1.4/wicket/src/main/java/wicket/Component.java
> (working
> copy)
> @@ -662,7 +662,7 @@
>*/
>   public final void debug(final String message)
>   {
> - getPage().getFeedbackMessages().debug(this, message);
> + Page.addMessage(new FeedbackMessage(this, message,
> FeedbackMessage.DEBUG));
>   }
> 
>   /**
> @@ -685,7 +685,7 @@
>*/
>   public final void error(final Serializable message)
>   {
> - getPage().getFeedbackMessages().error(this, message);
> + Page.addMessage(new FeedbackMessage(this, message,
> FeedbackMessage.ERROR));
>   }
> 
>   /**
> @@ -696,7 +696,7 @@
>*/
>   public final void fatal(final String message)
>   {
> - getPage().getFeedbackMessages().fatal(this, message);
> + Page.addMessage(new FeedbackMessage(this, message,
> FeedbackMessage.FATAL));
>   }
> 
>   /**
> @@ -1235,7 +1235,7 @@
>*/
>   public final void info(final String message)
>   {
> - getPage().getFeedbackMessages().info(this, message);
> + Page.addMessage(new FeedbackMessage(this, message,
> FeedbackMessage.INFO));
>   }
> 
>   /**
> @@ -2376,7 +2376,7 @@
>*/
>   public final void warn(final String message)
>   {
> - getPage().getFeedbackMessages().warn(this, message);
> + Page.addMessage(new FeedbackMessage(this, message,
> FeedbackMessage.WARNING));
>   }
> 
>   /**
> Index:
> /Users/eelcohillenius/Documents/workspace_wicket/wicket-1.x/jdk-1.4/wicket/src/main/java/wicket/feedback/FeedbackMessages.java
> ===
> ---
> /Users/eelcohillenius/Documents/workspace_wicket/wicket-1.x/jdk-1.4/wicket/src/main/java/wicket/feedback/FeedbackMessages.java
> (revision
> 524461)
> +++
> /Users/eelcohillenius/Documents/workspace_wicket/wicket-1.x/jdk-1.4/wicket/src/main/java/wicket/feedback/FeedbackMessages.java
> (working
> copy)
> @@ -301,7 +301,7 @@
>* @param message
>* @param level
>*/
> - public final void add(Component reporter, String message, int level) {
> + public final void add(Component reporter, Serializable message, int
> level) {
>   add(new FeedbackMessage(reporter, message, level));
>   }
>   
> @@ -311,7 +311,7 @@
>* @param message
>*the message
>*/
> - final void add(FeedbackMessage message)
> + public final void add(FeedbackMessage message)
>   {
>   if (log.isDebugEnabled())
>   {
> Index:
> /Users/eelcohillenius/Documents/wor

Re: [Wicket-user] error(...) No page found for component

2007-03-31 Thread Eelco Hillenius
> We chose that, yes.  But would it be better to simply have all feedback
> messages stored in the session?  That would solve all our scoping problems
> wouldn't it?  Every feedback message would go into the session and then
> feedback panels could pull them out when they're ready to.  If a feedback
> message is in the session for more than one request cycle and it is not
> cleared
> by a feedback panel, we would discard it (and maybe warn in debug mode).

I think I'm fine with a session based solution. The thing that
wouldn't work anymore is when you assign messages to components/ pages
which are not rendered this request but a next request. That might be
too far-fetched to support though. However, the solution which I'll
post as a patch on the end of this message will support anything it
does now. The thing I like about putting them in the session is that
it is clean and will save a little bit of memory in the page. WDYT?

Eelco

Index: 
/Users/eelcohillenius/Documents/workspace_wicket/wicket-1.x/jdk-1.4/wicket/src/main/java/wicket/Component.java
===
--- 
/Users/eelcohillenius/Documents/workspace_wicket/wicket-1.x/jdk-1.4/wicket/src/main/java/wicket/Component.java
  (revision
524461)
+++ 
/Users/eelcohillenius/Documents/workspace_wicket/wicket-1.x/jdk-1.4/wicket/src/main/java/wicket/Component.java
  (working
copy)
@@ -662,7 +662,7 @@
 */
public final void debug(final String message)
{
-   getPage().getFeedbackMessages().debug(this, message);
+   Page.addMessage(new FeedbackMessage(this, message, 
FeedbackMessage.DEBUG));
}

/**
@@ -685,7 +685,7 @@
 */
public final void error(final Serializable message)
{
-   getPage().getFeedbackMessages().error(this, message);
+   Page.addMessage(new FeedbackMessage(this, message, 
FeedbackMessage.ERROR));
}

/**
@@ -696,7 +696,7 @@
 */
public final void fatal(final String message)
{
-   getPage().getFeedbackMessages().fatal(this, message);
+   Page.addMessage(new FeedbackMessage(this, message, 
FeedbackMessage.FATAL));
}

/**
@@ -1235,7 +1235,7 @@
 */
public final void info(final String message)
{
-   getPage().getFeedbackMessages().info(this, message);
+   Page.addMessage(new FeedbackMessage(this, message, 
FeedbackMessage.INFO));
}

/**
@@ -2376,7 +2376,7 @@
 */
public final void warn(final String message)
{
-   getPage().getFeedbackMessages().warn(this, message);
+   Page.addMessage(new FeedbackMessage(this, message, 
FeedbackMessage.WARNING));
}

/**
Index: 
/Users/eelcohillenius/Documents/workspace_wicket/wicket-1.x/jdk-1.4/wicket/src/main/java/wicket/feedback/FeedbackMessages.java
===
--- 
/Users/eelcohillenius/Documents/workspace_wicket/wicket-1.x/jdk-1.4/wicket/src/main/java/wicket/feedback/FeedbackMessages.java
  (revision
524461)
+++ 
/Users/eelcohillenius/Documents/workspace_wicket/wicket-1.x/jdk-1.4/wicket/src/main/java/wicket/feedback/FeedbackMessages.java
  (working
copy)
@@ -301,7 +301,7 @@
 * @param message
 * @param level
 */
-   public final void add(Component reporter, String message, int level) {
+   public final void add(Component reporter, Serializable message, int 
level) {
add(new FeedbackMessage(reporter, message, level));
}

@@ -311,7 +311,7 @@
 * @param message
 *the message
 */
-   final void add(FeedbackMessage message)
+   public final void add(FeedbackMessage message)
{
if (log.isDebugEnabled())
{
Index: 
/Users/eelcohillenius/Documents/workspace_wicket/wicket-1.x/jdk-1.4/wicket/src/main/java/wicket/Page.java
===
--- 
/Users/eelcohillenius/Documents/workspace_wicket/wicket-1.x/jdk-1.4/wicket/src/main/java/wicket/Page.java
   (revision
524461)
+++ 
/Users/eelcohillenius/Documents/workspace_wicket/wicket-1.x/jdk-1.4/wicket/src/main/java/wicket/Page.java
   (working
copy)
@@ -18,6 +18,7 @@

 import java.util.ArrayList;
 import java.util.HashSet;
+import java.util.Iterator;
 import java.util.List;
 import java.util.Set;

@@ -25,6 +26,7 @@
 import org.apache.commons.logging.LogFactory;

 import wicket.authorization.UnauthorizedActionException;
+import wicket.feedback.FeedbackMessage;
 import wicket.feedback.FeedbackMessages;
 import wicket.feedback.IFeedback;
 import wicket.markup.MarkupException;
@@ -288,23 +290,24 @@
 */
public void detachModels()
{
-// // visit all this page's children to detach the models
-// visitChildren(new IV

Re: [Wicket-user] error(...) No page found for component

2007-03-31 Thread Jonathan Locke


Eelco Hillenius wrote:
> 
> About the session messages... well, they have a slightly different
> meaning: display whenever there is a feedback component rendered on
> any page. This is useful when writing generic software where you know
> that a message should be displayed, but you just don't know the target
> (e.g. at the end of a wizard).
> 

yeah, i don't know what i was thinking... threadlocal clearly doesn't 
work for session scoping.  duh.  ;-)


Eelco Hillenius wrote:
> 
> About per-page or per-request... yeah, we've been there too. If we
> look back at the history we can say that the page is the correct place
> to have it. 
> 

We chose that, yes.  But would it be better to simply have all feedback
messages stored in the session?  That would solve all our scoping problems
wouldn't it?  Every feedback message would go into the session and then
feedback panels could pull them out when they're ready to.  If a feedback
message is in the session for more than one request cycle and it is not
cleared
by a feedback panel, we would discard it (and maybe warn in debug mode).

-- 
View this message in context: 
http://www.nabble.com/error%28...%29-No-page-found-for-component-tf3497125.html#a9773999
Sent from the Wicket - User mailing list archive at Nabble.com.


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] error(...) No page found for component

2007-03-31 Thread Eelco Hillenius
Do feedbackmessages in the session really need to be synchronized with
CopyOnWriteArrayList? I'm in doubt whether synchronization helps that
much, but if it does, wouldn't it be more efficient to use a normal
synchronized one?

Eelco


On 3/31/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
> On 3/31/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> > i am not so sure this is correct. we often deal with two page instances
> > inside the same request - the current one and the response page. this breaks
> > any kind of scoping as errors reported against current page will now make it
> > into response page?
>
> About the session messages... well, they have a slightly different
> meaning: display whenever there is a feedback component rendered on
> any page. This is useful when writing generic software where you know
> that a message should be displayed, but you just don't know the target
> (e.g. at the end of a wizard).
>
> About per-page or per-request... yeah, we've been there too. If we
> look back at the history we can say that the page is the correct place
> to have it. So, what we should do is put the messages for the pages in
> the session, and at the start of rendering (right before attach),
> iterate through those messages and the ones that have components
> attached (are for pages) are then added to those pages. If there are
> messages with components that are not coupled to a page, well tough
> luck and discard them (those would throw an exception currently).
>
> One final thing we should fix is the fact that feedbackmessages don't
> get cleaned up when there are no feedback components in the page. This
> is a memory leak.
>
> Eelco
>

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] error(...) No page found for component

2007-03-31 Thread Eelco Hillenius
On 3/31/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> i am not so sure this is correct. we often deal with two page instances
> inside the same request - the current one and the response page. this breaks
> any kind of scoping as errors reported against current page will now make it
> into response page?

About the session messages... well, they have a slightly different
meaning: display whenever there is a feedback component rendered on
any page. This is useful when writing generic software where you know
that a message should be displayed, but you just don't know the target
(e.g. at the end of a wizard).

About per-page or per-request... yeah, we've been there too. If we
look back at the history we can say that the page is the correct place
to have it. So, what we should do is put the messages for the pages in
the session, and at the start of rendering (right before attach),
iterate through those messages and the ones that have components
attached (are for pages) are then added to those pages. If there are
messages with components that are not coupled to a page, well tough
luck and discard them (those would throw an exception currently).

One final thing we should fix is the fact that feedbackmessages don't
get cleaned up when there are no feedback components in the page. This
is a memory leak.

Eelco

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] error(...) No page found for component

2007-03-31 Thread Igor Vaynberg

i am not so sure this is correct. we often deal with two page instances
inside the same request - the current one and the response page. this breaks
any kind of scoping as errors reported against current page will now make it
into response page?

dont know how likely the above usecase is, but probably more likely then
having to report errors at component construction.

-igor


On 3/31/07, Jonathan Locke <[EMAIL PROTECTED]> wrote:




yeah, threadlocal would work.  it would also get rid of the need for
Session feedback messages.  in some sense, i think the error is really
being registered for the request (thread) anyway, not any object.
so i like that idea.  it can just be a threadlocal in the appropriate
class and everyone's happy, we actually remove code and component
stays the same size.  +1


Eelco Hillenius wrote:
>
>> Apparently the usecase is pretty rare (only discovered after 2 years of
>> production use)
>
> Well, you can't really know as you don't know how many people ever
> bumped across this and decided to implement a workaround without
> mentioning it to us. More importantly, I just don't think it is right
> users cannot do this, and there's a ton of ways to solve this. I agree
> with your queue idea, that's the nicest one.
>
> Eelco
>
>
-
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> opinions on IT & business topics through brief surveys-and earn cash
>
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>

--
View this message in context:
http://www.nabble.com/error%28...%29-No-page-found-for-component-tf3497125.html#a9773504
Sent from the Wicket - User mailing list archive at Nabble.com.


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] error(...) No page found for component

2007-03-31 Thread Jonathan Locke


if you can wait, i think we're going to be fixing this so you don't have to
make any changes.


serban.balamaci wrote:
> 
> Thanks for the answer. Do you mean that instead of doing the loading of
> the model in the constructor to do it onAttach() ?
> 
> 
> 
> Jonathan Locke wrote:
>> 
>> 
>> You component is not attached to a parent yet.
>> You could try doing that work in onAttach().
>> 
>> 
>> serban.balamaci wrote:
>>> 
>>> Hi.
>>> 
>>> I have a problem in that inside the constructor of a page(panel
>>> actually) i invoke a stored procedure which needs to get the model for
>>> the panel. The stored procedure may throw an error message. The error
>>> message should be seen by the user, he can understand what he did wrong.
>>> So inside the constructor i have something like this:
>>> 
>>> public PanelConstructor() {
>>>   try {
>>> 
>>>  invoke stored procedure
>>>.
>>>   } catch(UserPresentableException e) {
>>>error(e.getMessage);
>>>   }
>>> }
>>> 
>>> The problem is that if the error is thrown i get a No page found for
>>> component. I understand that the cause of the error is that the "error
>>> component" not being instantiated because of the constructor not being
>>> finished(or i think that's the cause). 
>>> 
>>> Any ideas of solutions that i can implement? 
>>> I know that i could set wicket to production instead of development and
>>> get rid of the stack trace. The problem is that i would like to keep the
>>> error message - to show the error message back to the user-. Should i
>>> instead of doing error(e.getMessage) rethrow the message inside a new
>>> defined exception and have a custom error page for that exception in
>>> which i would show only the message of the error.
>>> 
>>> Is there any option that would keep me from treating the errors in the
>>> constructor other than how i treat an error from a button push in which
>>> i do error(e.getMessage())?
>>> 
>>> Thanks.
>>> 
>>> 
>>> 
>>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/error%28...%29-No-page-found-for-component-tf3497125.html#a9773512
Sent from the Wicket - User mailing list archive at Nabble.com.


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] error(...) No page found for component

2007-03-31 Thread Jonathan Locke


yeah, threadlocal would work.  it would also get rid of the need for 
Session feedback messages.  in some sense, i think the error is really 
being registered for the request (thread) anyway, not any object.  
so i like that idea.  it can just be a threadlocal in the appropriate 
class and everyone's happy, we actually remove code and component
stays the same size.  +1


Eelco Hillenius wrote:
> 
>> Apparently the usecase is pretty rare (only discovered after 2 years of
>> production use)
> 
> Well, you can't really know as you don't know how many people ever
> bumped across this and decided to implement a workaround without
> mentioning it to us. More importantly, I just don't think it is right
> users cannot do this, and there's a ton of ways to solve this. I agree
> with your queue idea, that's the nicest one.
> 
> Eelco
> 
> -
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
> 
> 

-- 
View this message in context: 
http://www.nabble.com/error%28...%29-No-page-found-for-component-tf3497125.html#a9773504
Sent from the Wicket - User mailing list archive at Nabble.com.


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Lifecycle issue with getVariation

2007-03-31 Thread Igor Vaynberg

1.2.6

we no longer need bodycontainer in 1.3 because we have a much more elegant
system for handling such things

-igor


On 3/31/07, Chris Colman <[EMAIL PROTECTED]> wrote:


> > > Java objects construct the way that they do and we use Java object
> > > constructors because we like that simplicity.  Your bug is
reported
> > and
> > > will be fixed.
> >
> > Any time schedule for that?
>
>
> the fix is in svn
>
> -igor

Excellent news! What will be the first public release that includes it -
1.2.x or 1.3.x?

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] error(...) No page found for component

2007-03-31 Thread Eelco Hillenius
> Apparently the usecase is pretty rare (only discovered after 2 years of
> production use)

Well, you can't really know as you don't know how many people ever
bumped across this and decided to implement a workaround without
mentioning it to us. More importantly, I just don't think it is right
users cannot do this, and there's a ton of ways to solve this. I agree
with your queue idea, that's the nicest one.

Eelco

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] error(...) No page found for component

2007-03-31 Thread Eelco Hillenius
Sure, sounds good. Can you make a proposal please? It's kind of where
we started in the first versions, but then again, much was different
and this time that can work.

Eelco


On 3/31/07, Martijn Dashorst <[EMAIL PROTECTED]> wrote:
> I don't like the addition of the 4 bytes to the component. Apparently
> the usecase is pretty rare (only discovered after 2 years of
> production use), and this will increase memory usage considerably for
> a small benefit.
>
> Isn't a message queue that isn't bound to a component but to the
> current thread, that registers the object that receives the feedback,
> and is queried at the end of the request to store any messages at the
> appropriate place?
>
> Martijn
>
> On 4/1/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
> > Fix it like this:
> >
> > Index: 
> > /Users/eelcohillenius/Documents/workspace_wicket/wicket-1.x/jdk-1.4/wicket/src/main/java/wicket/Component.java
> > ===
> > --- 
> > /Users/eelcohillenius/Documents/workspace_wicket/wicket-1.x/jdk-1.4/wicket/src/main/java/wicket/Component.java
> >   (revision
> > 524461)
> > +++ 
> > /Users/eelcohillenius/Documents/workspace_wicket/wicket-1.x/jdk-1.4/wicket/src/main/java/wicket/Component.java
> >   (working
> > copy)
> > @@ -33,6 +33,7 @@
> >  import wicket.authorization.UnauthorizedActionException;
> >  import wicket.behavior.IBehavior;
> >  import wicket.feedback.FeedbackMessage;
> > +import wicket.feedback.FeedbackMessages;
> >  import wicket.markup.ComponentTag;
> >  import wicket.markup.MarkupException;
> >  import wicket.markup.MarkupStream;
> > @@ -457,6 +458,8 @@
> > private static final int FLAG_ATTACHING = 0x4000;
> > private static final int FLAG_DETACHING = 0x8000;
> >
> > +   /** List of feedback messages to add. */
> > +   private transient List feedbackMessages;
> >
> > /** Basic model IModelComparator implementation for normal object 
> > models */
> > private static final IModelComparator defaultModelComparator = new
> > IModelComparator()
> > @@ -662,7 +665,7 @@
> >  */
> > public final void debug(final String message)
> > {
> > -   getPage().getFeedbackMessages().debug(this, message);
> > +   add(new FeedbackMessage(this, message, 
> > FeedbackMessage.DEBUG));
> > }
> >
> > /**
> > @@ -685,7 +688,7 @@
> >  */
> > public final void error(final Serializable message)
> > {
> > -   getPage().getFeedbackMessages().error(this, message);
> > +   add(new FeedbackMessage(this, message, 
> > FeedbackMessage.ERROR));
> > }
> >
> > /**
> > @@ -696,7 +699,7 @@
> >  */
> > public final void fatal(final String message)
> > {
> > -   getPage().getFeedbackMessages().fatal(this, message);
> > +   add(new FeedbackMessage(this, message, 
> > FeedbackMessage.FATAL));
> > }
> >
> > /**
> > @@ -1235,7 +1238,7 @@
> >  */
> > public final void info(final String message)
> > {
> > -   getPage().getFeedbackMessages().info(this, message);
> > +   add(new FeedbackMessage(this, message, 
> > FeedbackMessage.INFO));
> > }
> >
> > /**
> > @@ -2376,7 +2379,7 @@
> >  */
> > public final void warn(final String message)
> > {
> > -   getPage().getFeedbackMessages().warn(this, message);
> > +   add(new FeedbackMessage(this, message, 
> > FeedbackMessage.WARNING));
> > }
> >
> > /**
> > @@ -2734,6 +2737,7 @@
> > {
> > setFlag(FLAG_ATTACHING, true);
> > setFlag(FLAG_ATTACHED, true);
> > +
> > onAttach();
> > if (getFlag(FLAG_ATTACHING))
> > {
> > @@ -3023,6 +3027,40 @@
> > }
> >
> > /**
> > +* Called by the containing page to enable components to add their
> > +* temporarily stored feedback messages to the messages instance of 
> > the
> > +* page.
> > +*
> > +* @param msgs
> > +*The feedback messages. Components can add messages to 
> > it
> > +*/
> > +   final void addFeedback(final FeedbackMessages msgs)
> > +   {
> > +   // add deferred messages if any
> > +   if (feedbackMessages != null)
> > +   {
> > +   for (Iterator i = feedbackMessages.iterator(); 
> > i.hasNext();)
> > +   {
> > +   msgs.add((FeedbackMessage)i.next());
> > +   }
> > +   // reset
> > +   feedbackMessages = null;
> > +   }
> > +   if (this instanceof MarkupContainer)
> > +   {
> > +   Markup

Re: [Wicket-user] error(...) No page found for component

2007-03-31 Thread Martijn Dashorst
I don't like the addition of the 4 bytes to the component. Apparently
the usecase is pretty rare (only discovered after 2 years of
production use), and this will increase memory usage considerably for
a small benefit.

Isn't a message queue that isn't bound to a component but to the
current thread, that registers the object that receives the feedback,
and is queried at the end of the request to store any messages at the
appropriate place?

Martijn

On 4/1/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
> Fix it like this:
>
> Index: 
> /Users/eelcohillenius/Documents/workspace_wicket/wicket-1.x/jdk-1.4/wicket/src/main/java/wicket/Component.java
> ===
> --- 
> /Users/eelcohillenius/Documents/workspace_wicket/wicket-1.x/jdk-1.4/wicket/src/main/java/wicket/Component.java
>   (revision
> 524461)
> +++ 
> /Users/eelcohillenius/Documents/workspace_wicket/wicket-1.x/jdk-1.4/wicket/src/main/java/wicket/Component.java
>   (working
> copy)
> @@ -33,6 +33,7 @@
>  import wicket.authorization.UnauthorizedActionException;
>  import wicket.behavior.IBehavior;
>  import wicket.feedback.FeedbackMessage;
> +import wicket.feedback.FeedbackMessages;
>  import wicket.markup.ComponentTag;
>  import wicket.markup.MarkupException;
>  import wicket.markup.MarkupStream;
> @@ -457,6 +458,8 @@
> private static final int FLAG_ATTACHING = 0x4000;
> private static final int FLAG_DETACHING = 0x8000;
>
> +   /** List of feedback messages to add. */
> +   private transient List feedbackMessages;
>
> /** Basic model IModelComparator implementation for normal object 
> models */
> private static final IModelComparator defaultModelComparator = new
> IModelComparator()
> @@ -662,7 +665,7 @@
>  */
> public final void debug(final String message)
> {
> -   getPage().getFeedbackMessages().debug(this, message);
> +   add(new FeedbackMessage(this, message, 
> FeedbackMessage.DEBUG));
> }
>
> /**
> @@ -685,7 +688,7 @@
>  */
> public final void error(final Serializable message)
> {
> -   getPage().getFeedbackMessages().error(this, message);
> +   add(new FeedbackMessage(this, message, 
> FeedbackMessage.ERROR));
> }
>
> /**
> @@ -696,7 +699,7 @@
>  */
> public final void fatal(final String message)
> {
> -   getPage().getFeedbackMessages().fatal(this, message);
> +   add(new FeedbackMessage(this, message, 
> FeedbackMessage.FATAL));
> }
>
> /**
> @@ -1235,7 +1238,7 @@
>  */
> public final void info(final String message)
> {
> -   getPage().getFeedbackMessages().info(this, message);
> +   add(new FeedbackMessage(this, message, FeedbackMessage.INFO));
> }
>
> /**
> @@ -2376,7 +2379,7 @@
>  */
> public final void warn(final String message)
> {
> -   getPage().getFeedbackMessages().warn(this, message);
> +   add(new FeedbackMessage(this, message, 
> FeedbackMessage.WARNING));
> }
>
> /**
> @@ -2734,6 +2737,7 @@
> {
> setFlag(FLAG_ATTACHING, true);
> setFlag(FLAG_ATTACHED, true);
> +
> onAttach();
> if (getFlag(FLAG_ATTACHING))
> {
> @@ -3023,6 +3027,40 @@
> }
>
> /**
> +* Called by the containing page to enable components to add their
> +* temporarily stored feedback messages to the messages instance of 
> the
> +* page.
> +*
> +* @param msgs
> +*The feedback messages. Components can add messages to it
> +*/
> +   final void addFeedback(final FeedbackMessages msgs)
> +   {
> +   // add deferred messages if any
> +   if (feedbackMessages != null)
> +   {
> +   for (Iterator i = feedbackMessages.iterator(); 
> i.hasNext();)
> +   {
> +   msgs.add((FeedbackMessage)i.next());
> +   }
> +   // reset
> +   feedbackMessages = null;
> +   }
> +   if (this instanceof MarkupContainer)
> +   {
> +   MarkupContainer container = (MarkupContainer)this;
> +   container.visitChildren(new IVisitor()
> +   {
> +   public Object component(Component component)
> +   {
> +   component.addFeedback(msgs);
> +   return IVisitor.CONTINUE_TRAVERSAL;
> +   }
> +   });
> +   }
> +   }

Re: [Wicket-user] error(...) No page found for component

2007-03-31 Thread Eelco Hillenius
Fix it like this:

Index: 
/Users/eelcohillenius/Documents/workspace_wicket/wicket-1.x/jdk-1.4/wicket/src/main/java/wicket/Component.java
===
--- 
/Users/eelcohillenius/Documents/workspace_wicket/wicket-1.x/jdk-1.4/wicket/src/main/java/wicket/Component.java
  (revision
524461)
+++ 
/Users/eelcohillenius/Documents/workspace_wicket/wicket-1.x/jdk-1.4/wicket/src/main/java/wicket/Component.java
  (working
copy)
@@ -33,6 +33,7 @@
 import wicket.authorization.UnauthorizedActionException;
 import wicket.behavior.IBehavior;
 import wicket.feedback.FeedbackMessage;
+import wicket.feedback.FeedbackMessages;
 import wicket.markup.ComponentTag;
 import wicket.markup.MarkupException;
 import wicket.markup.MarkupStream;
@@ -457,6 +458,8 @@
private static final int FLAG_ATTACHING = 0x4000;
private static final int FLAG_DETACHING = 0x8000;

+   /** List of feedback messages to add. */
+   private transient List feedbackMessages;

/** Basic model IModelComparator implementation for normal object 
models */
private static final IModelComparator defaultModelComparator = new
IModelComparator()
@@ -662,7 +665,7 @@
 */
public final void debug(final String message)
{
-   getPage().getFeedbackMessages().debug(this, message);
+   add(new FeedbackMessage(this, message, FeedbackMessage.DEBUG));
}

/**
@@ -685,7 +688,7 @@
 */
public final void error(final Serializable message)
{
-   getPage().getFeedbackMessages().error(this, message);
+   add(new FeedbackMessage(this, message, FeedbackMessage.ERROR));
}

/**
@@ -696,7 +699,7 @@
 */
public final void fatal(final String message)
{
-   getPage().getFeedbackMessages().fatal(this, message);
+   add(new FeedbackMessage(this, message, FeedbackMessage.FATAL));
}

/**
@@ -1235,7 +1238,7 @@
 */
public final void info(final String message)
{
-   getPage().getFeedbackMessages().info(this, message);
+   add(new FeedbackMessage(this, message, FeedbackMessage.INFO));
}

/**
@@ -2376,7 +2379,7 @@
 */
public final void warn(final String message)
{
-   getPage().getFeedbackMessages().warn(this, message);
+   add(new FeedbackMessage(this, message, 
FeedbackMessage.WARNING));
}

/**
@@ -2734,6 +2737,7 @@
{
setFlag(FLAG_ATTACHING, true);
setFlag(FLAG_ATTACHED, true);
+
onAttach();
if (getFlag(FLAG_ATTACHING))
{
@@ -3023,6 +3027,40 @@
}

/**
+* Called by the containing page to enable components to add their
+* temporarily stored feedback messages to the messages instance of the
+* page.
+*
+* @param msgs
+*The feedback messages. Components can add messages to it
+*/
+   final void addFeedback(final FeedbackMessages msgs)
+   {
+   // add deferred messages if any
+   if (feedbackMessages != null)
+   {
+   for (Iterator i = feedbackMessages.iterator(); 
i.hasNext();)
+   {
+   msgs.add((FeedbackMessage)i.next());
+   }
+   // reset
+   feedbackMessages = null;
+   }
+   if (this instanceof MarkupContainer)
+   {
+   MarkupContainer container = (MarkupContainer)this;
+   container.visitChildren(new IVisitor()
+   {
+   public Object component(Component component)
+   {
+   component.addFeedback(msgs);
+   return IVisitor.CONTINUE_TRAVERSAL;
+   }
+   });
+   }
+   }
+
+   /**
 * Gets the component at the given path.
 *
 * @param path
@@ -3163,6 +3201,21 @@
}

/**
+* Adds a feedback message to be added to the page later.
+*
+* @param msg
+*message
+*/
+   private final void add(FeedbackMessage msg)
+   {
+   if (feedbackMessages == null)
+   {
+   feedbackMessages = new ArrayList();
+   }
+   feedbackMessages.add(msg);
+   }
+
+   /**
 * Finds the root object for an IModel
 *
 * @param model
Index: 
/Users/eelcohillenius/Documents/workspace_wicket/wicket-1.x/jdk-1.4/wicket/src/main/java/wicket/feedback/Feedba

Re: [Wicket-user] Get versionManager null error after upgrading the wicket to the current snapshot.

2007-03-31 Thread Matej Knopp
Is it the latest svn version? There have been several important
versioning fixes lately, i suggest you checking the latest from svn.

-Matej

On 3/31/07, tooy li(Gmail) <[EMAIL PROTECTED]> wrote:
> I complained the ajax modal window cannot show every time when i click the 
> ajax link ,after the updgading ,it can work well. but i get a new problem,  I 
> used a modal winwo to input something,  when i open the modal window first, 
> it's ok,
> but when i open it again , it will generate the bellow error. i searched the 
> form ,and find someone also happen the same error.
>
>
> final DefaultDataTable table = new DefaultDataTable(listContainer, "dataList",
> columns, dataProvider, 15);
>   table.setOutputMarkupId(true);
>
>
>   final ModalWindow modal1 = new ModalWindow(this, "modal_add");
>
>   modal1.setPageMapName("modal_add-1");
>
>   modal1.setPageCreator(new ModalWindow.PageCreator()
>   {
>public Page createPage()
>{
> return new  EditFilterWordPage(getPage(), "");
>}
>   });
>   modal1.setWindowClosedCallback(new ModalWindow.WindowClosedCallback()
>   {
>public void onClose(final AjaxRequestTarget target)
>{
> target.addComponent(table);
>}
>   });
>   modal1.setCloseButtonCallback(new ModalWindow.CloseButtonCallback()
>   {
>public boolean onCloseButtonClicked(final AjaxRequestTarget target)
>{
> target.addComponent(table);
> return true;
>}
>   });
>
>   new AjaxLink(this, "createRecord") {
>public void onClick(AjaxRequestTarget target) {
> modal1.show(target);
>}
>   };
>
> the second open generate the below errror
> wicket.WicketRuntimeException: Error attaching this container for rendering: 
> [MarkupContainer [Component id = dataList, page = 
> com.sharera.adms.system.web.ListKeywordFilterPage, path = 
> 3:listContainer:dataList.BaseDefaultDataTable, isVisible = true, isVersioned 
> = true]]
>  at wicket.MarkupContainer.attachChildren(MarkupContainer.java:389)
>  at wicket.Component.attach(Component.java:2801)
>  at 
> wicket.ajax.AjaxRequestTarget.respondComponents(AjaxRequestTarget.java:428)
>  at wicket.ajax.AjaxRequestTarget.respond(AjaxRequestTarget.java:330)
>  at 
> wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:114)
>  at wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:958)
>  at wicket.RequestCycle.step(RequestCycle.java:1025)
>  at wicket.RequestCycle.steps(RequestCycle.java:1096)
>  at wicket.RequestCycle.request(RequestCycle.java:470)
>  at wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:244)
>  at wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:122)
>  at 
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1045)
>  at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:358)
>  at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:231)
>  at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:629)
>  at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:453)
>  at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:141)
>  at org.mortbay.jetty.Server.handle(Server.java:303)
>  at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:452)
>  at 
> org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:721)
>  at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:509)
>  at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:209)
>  at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:349)
>  at 
> org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:217)
>  at 
> org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)
> Caused by: java.lang.NullPointerException
>  at wicket.Page.componentStateChanging(Page.java:327)
>  at wicket.Component.addStateChange(Component.java:2573)
>  at wicket.MarkupContainer.removeAll(MarkupContainer.java:523)
>  at wicket.markup.repeater.RefreshingView.populate(RefreshingView.java:122)
>  at wicket.markup.repeater.RefreshingView.onAttach(RefreshingView.java:93)
>  at wicket.Component.attach(Component.java:2790)
>  at wicket.MarkupContainer.attachChildren(MarkupContainer.java:378)
>  ... 24 more
> -
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the ch

Re: [Wicket-user] error(...) No page found for component

2007-03-31 Thread Matej Knopp
Why don't we fix this how? Errors are stored in page. In component
constructor you don't know the page. What could work would be a
temporary array in component that would be copied to page in onattach,
but i don't really this is a common usecase.

If you need to add errors, just do it in onAttach.

-Matej

On 3/31/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
> Ok, I see.
>
> public final void error(final Serializable message)
> {
> getPage().getFeedbackMessages().error(this, message);
> }
>
> Why don't we fix this?
>
> Eelco
>
>
> On 3/31/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> > it works fine because you are calling error on a page and not on a
> > component. errors are stored at page-level.
> >
> > -igor
> >
> >
> >
> > On 3/31/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
> > >
> > > Weird problem. Can you give us a stack trace please? I tried this:
> > >
> > > Index:
> > /Users/eelcohillenius/Documents/workspace_wicket/wicket-1.x/jdk-1.5/wicket-examples/src/main/java/wicket/examples/helloworld/HelloWorld.java
> > >
> > ===
> > > ---
> > /Users/eelcohillenius/Documents/workspace_wicket/wicket-1.x/jdk-1.5/wicket-examples/src/main/java/wicket/examples/helloworld/HelloWorld.java
> >(revision
> > > 524461)
> > > +++
> > /Users/eelcohillenius/Documents/workspace_wicket/wicket-1.x/jdk-1.5/wicket-examples/src/main/java/wicket/examples/helloworld/HelloWorld.java
> >(working
> > > copy)
> > > @@ -17,7 +17,7 @@
> > > package wicket.examples.helloworld ;
> > >
> > > import wicket.examples.WicketExamplePage;
> > > -import wicket.markup.html.basic.Label;
> > > +import wicket.markup.html.panel.FeedbackPanel;
> > >
> > > /**
> > >   * Everybody's favorite example!
> > > @@ -31,6 +31,7 @@
> > >  */
> > > public HelloWorld()
> > > {
> > > -   add(new Label("message", "Hello World!"));
> > > +   error("test");
> > > +   add(new FeedbackPanel("message"));
> > > }
> > > }
> > > \ No newline at end of file
> > >
> > > And that works fine...
> > >
> > > Eelco
> > >
> > >
> > > On 3/31/07, serban.balamaci <[EMAIL PROTECTED]> wrote:
> > > >
> > > > Hi.
> > > >
> > > > I have a problem in that inside the constructor of a page(panel
> > actually) i
> > > > invoke a stored procedure which needs to get the model for the panel.
> > The
> > > > stored procedure may throw an error message. The error message should be
> > > > seen by the user, he can understand what he did wrong. So inside the
> > > > constructor i have something like this:
> > > >
> > > > public PanelConstructor() {
> > > >   try {
> > > >   } catch(UserPresentableException e) {
> > > >error(e.getMessage);
> > > >   }
> > > > }
> > > >
> > > > The problem is that if the error is thrown i get a No page found for
> > > > component. I understand that the cause of the error is that the "error
> > > > component" not being instantiated because of the constructor not being
> > > > finished(or i think that's the cause).
> > > >
> > > > Any ideas of solutions that i can implement?
> > > > I know that i could set wicket to production instead of development and
> > get
> > > > rid of the stack trace. The problem is that i would like to keep the
> > error
> > > > message - to show the error message back to the user-. Should i instead
> > of
> > > > doing error(e.getMessage) rethrow the message inside a new defined
> > exception
> > > > and have a custom error page for that exception in which i would show
> > only
> > > > the message of the error.
> > > >
> > > > Is there any option that would keep me from treating the errors in the
> > > > constructor other than how i treat an error from a button push?
> > > >
> > > > Thanks.
> > > >
> > > >
> > > >
> > > > --
> > > > View this message in context:
> > http://www.nabble.com/error%28...%29-No-page-found-for-component-tf3497125.html#a9767935
> > > > Sent from the Wicket - User mailing list archive at Nabble.com.
> > > >
> > > >
> > > >
> > -
> > > > Take Surveys. Earn Cash. Influence the Future of IT
> > > > Join SourceForge.net's Techsay panel and you'll get the chance to share
> > your
> > > > opinions on IT & business topics through brief surveys-and earn cash
> > > >
> > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > > > ___
> > > > Wicket-user mailing list
> > > > Wicket-user@lists.sourceforge.net
> > > >
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> > > >
> > >
> > >
> > -
> > > Take Surveys. Earn Cash. Influence the Future of IT
> > > Join SourceForge.net's Techsay panel and you'll get the chance to share
> > your
> > > opinions on IT & business topics through brief surveys-a

Re: [Wicket-user] Lifecycle issue with getVariation

2007-03-31 Thread Chris Colman
> > > Java objects construct the way that they do and we use Java object
> > > constructors because we like that simplicity.  Your bug is
reported
> > and
> > > will be fixed.
> >
> > Any time schedule for that?
> 
> 
> the fix is in svn
> 
> -igor

Excellent news! What will be the first public release that includes it -
1.2.x or 1.3.x?

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] error(...) No page found for component

2007-03-31 Thread Eelco Hillenius
Ok, I see.

public final void error(final Serializable message)
{
getPage().getFeedbackMessages().error(this, message);
}

Why don't we fix this?

Eelco


On 3/31/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> it works fine because you are calling error on a page and not on a
> component. errors are stored at page-level.
>
> -igor
>
>
>
> On 3/31/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
> >
> > Weird problem. Can you give us a stack trace please? I tried this:
> >
> > Index:
> /Users/eelcohillenius/Documents/workspace_wicket/wicket-1.x/jdk-1.5/wicket-examples/src/main/java/wicket/examples/helloworld/HelloWorld.java
> >
> ===
> > ---
> /Users/eelcohillenius/Documents/workspace_wicket/wicket-1.x/jdk-1.5/wicket-examples/src/main/java/wicket/examples/helloworld/HelloWorld.java
>(revision
> > 524461)
> > +++
> /Users/eelcohillenius/Documents/workspace_wicket/wicket-1.x/jdk-1.5/wicket-examples/src/main/java/wicket/examples/helloworld/HelloWorld.java
>(working
> > copy)
> > @@ -17,7 +17,7 @@
> > package wicket.examples.helloworld ;
> >
> > import wicket.examples.WicketExamplePage;
> > -import wicket.markup.html.basic.Label;
> > +import wicket.markup.html.panel.FeedbackPanel;
> >
> > /**
> >   * Everybody's favorite example!
> > @@ -31,6 +31,7 @@
> >  */
> > public HelloWorld()
> > {
> > -   add(new Label("message", "Hello World!"));
> > +   error("test");
> > +   add(new FeedbackPanel("message"));
> > }
> > }
> > \ No newline at end of file
> >
> > And that works fine...
> >
> > Eelco
> >
> >
> > On 3/31/07, serban.balamaci <[EMAIL PROTECTED]> wrote:
> > >
> > > Hi.
> > >
> > > I have a problem in that inside the constructor of a page(panel
> actually) i
> > > invoke a stored procedure which needs to get the model for the panel.
> The
> > > stored procedure may throw an error message. The error message should be
> > > seen by the user, he can understand what he did wrong. So inside the
> > > constructor i have something like this:
> > >
> > > public PanelConstructor() {
> > >   try {
> > >   } catch(UserPresentableException e) {
> > >error(e.getMessage);
> > >   }
> > > }
> > >
> > > The problem is that if the error is thrown i get a No page found for
> > > component. I understand that the cause of the error is that the "error
> > > component" not being instantiated because of the constructor not being
> > > finished(or i think that's the cause).
> > >
> > > Any ideas of solutions that i can implement?
> > > I know that i could set wicket to production instead of development and
> get
> > > rid of the stack trace. The problem is that i would like to keep the
> error
> > > message - to show the error message back to the user-. Should i instead
> of
> > > doing error(e.getMessage) rethrow the message inside a new defined
> exception
> > > and have a custom error page for that exception in which i would show
> only
> > > the message of the error.
> > >
> > > Is there any option that would keep me from treating the errors in the
> > > constructor other than how i treat an error from a button push?
> > >
> > > Thanks.
> > >
> > >
> > >
> > > --
> > > View this message in context:
> http://www.nabble.com/error%28...%29-No-page-found-for-component-tf3497125.html#a9767935
> > > Sent from the Wicket - User mailing list archive at Nabble.com.
> > >
> > >
> > >
> -
> > > Take Surveys. Earn Cash. Influence the Future of IT
> > > Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> > > opinions on IT & business topics through brief surveys-and earn cash
> > >
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > > ___
> > > Wicket-user mailing list
> > > Wicket-user@lists.sourceforge.net
> > >
> https://lists.sourceforge.net/lists/listinfo/wicket-user
> > >
> >
> >
> -
> > Take Surveys. Earn Cash. Influence the Future of IT
> > Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> > opinions on IT & business topics through brief surveys-and earn cash
> >
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > ___
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
>
>
> -
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourcefo

Re: [Wicket-user] error(...) No page found for component

2007-03-31 Thread Igor Vaynberg

it works fine because you are calling error on a page and not on a
component. errors are stored at page-level.

-igor


On 3/31/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote:


Weird problem. Can you give us a stack trace please? I tried this:

Index: /Users/eelcohillenius/Documents/workspace_wicket/wicket-1.x/jdk-1.5
/wicket-examples/src/main/java/wicket/examples/helloworld/HelloWorld.java
===
--- /Users/eelcohillenius/Documents/workspace_wicket/wicket-1.x/jdk-1.5
/wicket-examples/src/main/java/wicket/examples/helloworld/HelloWorld.java   
 (revision
524461)
+++ /Users/eelcohillenius/Documents/workspace_wicket/wicket-1.x/jdk-1.5
/wicket-examples/src/main/java/wicket/examples/helloworld/HelloWorld.java   
 (working
copy)
@@ -17,7 +17,7 @@
package wicket.examples.helloworld;

import wicket.examples.WicketExamplePage;
-import wicket.markup.html.basic.Label;
+import wicket.markup.html.panel.FeedbackPanel;

/**
  * Everybody's favorite example!
@@ -31,6 +31,7 @@
 */
public HelloWorld()
{
-   add(new Label("message", "Hello World!"));
+   error("test");
+   add(new FeedbackPanel("message"));
}
}
\ No newline at end of file

And that works fine...

Eelco


On 3/31/07, serban.balamaci <[EMAIL PROTECTED]> wrote:
>
> Hi.
>
> I have a problem in that inside the constructor of a page(panel
actually) i
> invoke a stored procedure which needs to get the model for the panel.
The
> stored procedure may throw an error message. The error message should be
> seen by the user, he can understand what he did wrong. So inside the
> constructor i have something like this:
>
> public PanelConstructor() {
>   try {
>   } catch(UserPresentableException e) {
>error(e.getMessage);
>   }
> }
>
> The problem is that if the error is thrown i get a No page found for
> component. I understand that the cause of the error is that the "error
> component" not being instantiated because of the constructor not being
> finished(or i think that's the cause).
>
> Any ideas of solutions that i can implement?
> I know that i could set wicket to production instead of development and
get
> rid of the stack trace. The problem is that i would like to keep the
error
> message - to show the error message back to the user-. Should i instead
of
> doing error(e.getMessage) rethrow the message inside a new defined
exception
> and have a custom error page for that exception in which i would show
only
> the message of the error.
>
> Is there any option that would keep me from treating the errors in the
> constructor other than how i treat an error from a button push?
>
> Thanks.
>
>
>
> --
> View this message in context:
http://www.nabble.com/error%28...%29-No-page-found-for-component-tf3497125.html#a9767935
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
>
-
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
your
> opinions on IT & business topics through brief surveys-and earn cash
>
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] error(...) No page found for component

2007-03-31 Thread Eelco Hillenius
Weird problem. Can you give us a stack trace please? I tried this:

Index: 
/Users/eelcohillenius/Documents/workspace_wicket/wicket-1.x/jdk-1.5/wicket-examples/src/main/java/wicket/examples/helloworld/HelloWorld.java
===
--- 
/Users/eelcohillenius/Documents/workspace_wicket/wicket-1.x/jdk-1.5/wicket-examples/src/main/java/wicket/examples/helloworld/HelloWorld.java
(revision
524461)
+++ 
/Users/eelcohillenius/Documents/workspace_wicket/wicket-1.x/jdk-1.5/wicket-examples/src/main/java/wicket/examples/helloworld/HelloWorld.java
(working
copy)
@@ -17,7 +17,7 @@
 package wicket.examples.helloworld;

 import wicket.examples.WicketExamplePage;
-import wicket.markup.html.basic.Label;
+import wicket.markup.html.panel.FeedbackPanel;

 /**
  * Everybody's favorite example!
@@ -31,6 +31,7 @@
 */
public HelloWorld()
{
-   add(new Label("message", "Hello World!"));
+   error("test");
+   add(new FeedbackPanel("message"));
}
 }
\ No newline at end of file

And that works fine...

Eelco


On 3/31/07, serban.balamaci <[EMAIL PROTECTED]> wrote:
>
> Hi.
>
> I have a problem in that inside the constructor of a page(panel actually) i
> invoke a stored procedure which needs to get the model for the panel. The
> stored procedure may throw an error message. The error message should be
> seen by the user, he can understand what he did wrong. So inside the
> constructor i have something like this:
>
> public PanelConstructor() {
>   try {
>   } catch(UserPresentableException e) {
>error(e.getMessage);
>   }
> }
>
> The problem is that if the error is thrown i get a No page found for
> component. I understand that the cause of the error is that the "error
> component" not being instantiated because of the constructor not being
> finished(or i think that's the cause).
>
> Any ideas of solutions that i can implement?
> I know that i could set wicket to production instead of development and get
> rid of the stack trace. The problem is that i would like to keep the error
> message - to show the error message back to the user-. Should i instead of
> doing error(e.getMessage) rethrow the message inside a new defined exception
> and have a custom error page for that exception in which i would show only
> the message of the error.
>
> Is there any option that would keep me from treating the errors in the
> constructor other than how i treat an error from a button push?
>
> Thanks.
>
>
>
> --
> View this message in context: 
> http://www.nabble.com/error%28...%29-No-page-found-for-component-tf3497125.html#a9767935
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] error(...) No page found for component

2007-03-31 Thread serban.balamaci

Thanks for the answer. Do you mean that instead of doing the loading of the
model in the constructor to do it onAttach() ?



Jonathan Locke wrote:
> 
> 
> You component is not attached to a parent yet.
> You could try doing that work in onAttach().
> 
> 
> serban.balamaci wrote:
>> 
>> Hi.
>> 
>> I have a problem in that inside the constructor of a page(panel actually)
>> i invoke a stored procedure which needs to get the model for the panel.
>> The stored procedure may throw an error message. The error message should
>> be seen by the user, he can understand what he did wrong. So inside the
>> constructor i have something like this:
>> 
>> public PanelConstructor() {
>>   try {
>> 
>>  invoke stored procedure
>>.
>>   } catch(UserPresentableException e) {
>>error(e.getMessage);
>>   }
>> }
>> 
>> The problem is that if the error is thrown i get a No page found for
>> component. I understand that the cause of the error is that the "error
>> component" not being instantiated because of the constructor not being
>> finished(or i think that's the cause). 
>> 
>> Any ideas of solutions that i can implement? 
>> I know that i could set wicket to production instead of development and
>> get rid of the stack trace. The problem is that i would like to keep the
>> error message - to show the error message back to the user-. Should i
>> instead of doing error(e.getMessage) rethrow the message inside a new
>> defined exception and have a custom error page for that exception in
>> which i would show only the message of the error.
>> 
>> Is there any option that would keep me from treating the errors in the
>> constructor other than how i treat an error from a button push in which i
>> do error(e.getMessage())?
>> 
>> Thanks.
>> 
>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/error%28...%29-No-page-found-for-component-tf3497125.html#a9772172
Sent from the Wicket - User mailing list archive at Nabble.com.


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] How do you update domain object from Model/DropDownChoice

2007-03-31 Thread Martijn Dashorst
I've written up a new example document for workign with drop down
choice components, as they seem to be a source of confusion (should be
available any time soon when Apache syncs the servers)

http://incubator.apache.org/wicket/examples.html

Martijn

On 3/31/07, Kurt R. Hoehn <[EMAIL PROTECTED]> wrote:
> That worked great!  Thank you for the assistance and advice.
>
> -kurt
>
> On Sat, 2007-03-31 at 09:17 -0800, Igor Vaynberg wrote:
> > On 3/31/07, Kurt R. Hoehn <[EMAIL PROTECTED]> wrote:
> > Wicket 2.0-SNAPSHOT
> > Wicket-Spring 2.0-SNAPSHOT
> >
> > wicket 2.0 has been discontinued for various reasons. you might want
> > to switch your project to the 1.x branch.
> >
> >
> >
> > new DropDownChoice(form, "profile",
> > profileManager.getProfiles(getProfile()),
> >
> > thats all you need - ie dont specify the model. that way ddc will use
> > the compound property model you have and put its selection into the
> > "profile" property for you.
> >
> > also notice that profilemanager.getprofiles(getprofile()) should be
> > new LoadableDetachableModel() { load() { return
> > profilemanager.getprofiles...
> >
> > -igor
> >
> >
> >
> >
> > -
> > Take Surveys. Earn Cash. Influence the Future of IT
> > Join SourceForge.net's Techsay panel and you'll get the chance to share your
> > opinions on IT & business topics through brief surveys-and earn cash
> > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > ___ Wicket-user mailing list 
> > Wicket-user@lists.sourceforge.net 
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>
> -
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>


-- 
Learn Wicket at ApacheCon Europe: http://apachecon.com
Join the wicket community at irc.freenode.net: ##wicket
Wicket 1.2.5 will keep your server alive. Download Wicket now!
http://wicketframework.org

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] climb symbolic

2007-03-31 Thread Sammy

NORTHWEST WIND 15 TO 25 MPH. NORTHWEST WIND TO 15 MPH. TO FORT CHAFFEE LINE BY 
10 AM. FLOOD WATERS ARE USUALLY DEEPER THAN THEY APPEAR. PARTLY TO MOSTLY 
CLOUDY SKIES WITH A FEW SNOW SHOWERS OR FLURRIES THIS MORNING.
MOST FLOOD DEATHS OCCUR IN AUTOMOBILES. THE COLD FRONT AND ASSOCIATED LINE OF 
SHOWERS WILL MOVE OUT OF OKLAHOMA AND INTO WESTERN ARKANSAS. SKAGWAY 530 AM ADT 
SAT MAR 31 2007 .
FLOOD WATERS ARE USUALLY DEEPER THAN THEY APPEAR. RUSSELLVILLE 755 AM CDT SAT 
MAR 31 2007 .
PARTLY TO MOSTLY CLOUDY SKIES WITH A FEW SNOW SHOWERS OR FLURRIES THIS MORNING.
NORTHWEST WIND 15 TO 25 MPH.
MOSTLY SUNNY SKIES THROUGH THE MORNING.

remoteness.gif
Description: GIF image
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Get versionManager null error after upgrading the wicket to the current snapshot.

2007-03-31 Thread tooy li(Gmail)
I complained the ajax modal window cannot show every time when i click the ajax 
link ,after the updgading ,it can work well. but i get a new problem,  I used a 
modal winwo to input something,  when i open the modal window first, it's ok,
but when i open it again , it will generate the bellow error. i searched the 
form ,and find someone also happen the same error.  


final DefaultDataTable table = new DefaultDataTable(listContainer, "dataList",
columns, dataProvider, 15);
  table.setOutputMarkupId(true);
 
  
  final ModalWindow modal1 = new ModalWindow(this, "modal_add");

  modal1.setPageMapName("modal_add-1");

  modal1.setPageCreator(new ModalWindow.PageCreator()
  {
   public Page createPage()
   {
return new  EditFilterWordPage(getPage(), "");
   }
  });
  modal1.setWindowClosedCallback(new ModalWindow.WindowClosedCallback()
  {
   public void onClose(final AjaxRequestTarget target)
   {
target.addComponent(table);
   }
  });
  modal1.setCloseButtonCallback(new ModalWindow.CloseButtonCallback()
  {
   public boolean onCloseButtonClicked(final AjaxRequestTarget target)
   {
target.addComponent(table);
return true;
   }
  });

  new AjaxLink(this, "createRecord") {
   public void onClick(AjaxRequestTarget target) {
modal1.show(target);
   }
  }; 

the second open generate the below errror
wicket.WicketRuntimeException: Error attaching this container for rendering: 
[MarkupContainer [Component id = dataList, page = 
com.sharera.adms.system.web.ListKeywordFilterPage, path = 
3:listContainer:dataList.BaseDefaultDataTable, isVisible = true, isVersioned = 
true]]
 at wicket.MarkupContainer.attachChildren(MarkupContainer.java:389)
 at wicket.Component.attach(Component.java:2801)
 at wicket.ajax.AjaxRequestTarget.respondComponents(AjaxRequestTarget.java:428)
 at wicket.ajax.AjaxRequestTarget.respond(AjaxRequestTarget.java:330)
 at 
wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:114)
 at wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:958)
 at wicket.RequestCycle.step(RequestCycle.java:1025)
 at wicket.RequestCycle.steps(RequestCycle.java:1096)
 at wicket.RequestCycle.request(RequestCycle.java:470)
 at wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:244)
 at wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:122)
 at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1045)
 at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:358)
 at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:231)
 at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:629)
 at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:453)
 at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:141)
 at org.mortbay.jetty.Server.handle(Server.java:303)
 at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:452)
 at 
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:721)
 at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:509)
 at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:209)
 at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:349)
 at 
org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:217)
 at 
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)
Caused by: java.lang.NullPointerException
 at wicket.Page.componentStateChanging(Page.java:327)
 at wicket.Component.addStateChange(Component.java:2573)
 at wicket.MarkupContainer.removeAll(MarkupContainer.java:523)
 at wicket.markup.repeater.RefreshingView.populate(RefreshingView.java:122)
 at wicket.markup.repeater.RefreshingView.onAttach(RefreshingView.java:93)
 at wicket.Component.attach(Component.java:2790)
 at wicket.MarkupContainer.attachChildren(MarkupContainer.java:378)
 ... 24 more
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] How do you update domain object from Model/DropDownChoice

2007-03-31 Thread Kurt R. Hoehn
That worked great!  Thank you for the assistance and advice.

-kurt

On Sat, 2007-03-31 at 09:17 -0800, Igor Vaynberg wrote:
> On 3/31/07, Kurt R. Hoehn <[EMAIL PROTECTED]> wrote:
> Wicket 2.0-SNAPSHOT
> Wicket-Spring 2.0-SNAPSHOT
> 
> wicket 2.0 has been discontinued for various reasons. you might want
> to switch your project to the 1.x branch.
> 
> 
> 
> new DropDownChoice(form, "profile",
> profileManager.getProfiles(getProfile()),
> 
> thats all you need - ie dont specify the model. that way ddc will use
> the compound property model you have and put its selection into the
> "profile" property for you. 
> 
> also notice that profilemanager.getprofiles(getprofile()) should be
> new LoadableDetachableModel() { load() { return
> profilemanager.getprofiles...
> 
> -igor
> 
> 
> 
> 
> -
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> ___ Wicket-user mailing list 
> Wicket-user@lists.sourceforge.net 
> https://lists.sourceforge.net/lists/listinfo/wicket-user


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Session Persistence in Wicket 1.2 - Recommendations?

2007-03-31 Thread Ryan Holmes
If you're using Tomcat, try the persistent manager with the file or  
JDBC based store.

http://tomcat.apache.org/tomcat-5.5-doc/config/manager.html

-Ryan

On Mar 30, 2007, at 8:55 AM, dukejansen wrote:

>
> Does anyone have any good recommendations for how I get started  
> with second
> level session storage in Wicket 1.2, via persistence to disk, for  
> (1) old
> page versions and (2) entire sessions when session expires? We  
> can't move to
> 1.3 or 2.0, so I'm trying to get an understanding of what my  
> options are
> before I dive into it.
> -- 
> View this message in context: http://www.nabble.com/Session- 
> Persistence-in-Wicket-1.2---Recommendations--tf3493043.html#a9755905
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -- 
> ---
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to  
> share your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php? 
> page=join.php&p=sourceforge&CID=DEVDEV
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] How do you update domain object from Model/DropDownChoice

2007-03-31 Thread Igor Vaynberg

On 3/31/07, Kurt R. Hoehn <[EMAIL PROTECTED]> wrote:


Wicket 2.0-SNAPSHOT
Wicket-Spring 2.0-SNAPSHOT



wicket 2.0 has been discontinued for various reasons. you might want to
switch your project to the 1.x branch.



new DropDownChoice(form, "profile",
profileManager.getProfiles(getProfile()),



thats all you need - ie dont specify the model. that way ddc will use the
compound property model you have and put its selection into the "profile"
property for you.

also notice that profilemanager.getprofiles(getprofile()) should be new
LoadableDetachableModel() { load() { return profilemanager.getprofiles...

-igor
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] error(...) No page found for component

2007-03-31 Thread Jonathan Locke


You component is not attached to a parent yet.
You could try doing that work in onAttach().


serban.balamaci wrote:
> 
> Hi.
> 
> I have a problem in that inside the constructor of a page(panel actually)
> i invoke a stored procedure which needs to get the model for the panel.
> The stored procedure may throw an error message. The error message should
> be seen by the user, he can understand what he did wrong. So inside the
> constructor i have something like this:
> 
> public PanelConstructor() {
>   try {
> 
>  invoke stored procedure
>.
>   } catch(UserPresentableException e) {
>error(e.getMessage);
>   }
> }
> 
> The problem is that if the error is thrown i get a No page found for
> component. I understand that the cause of the error is that the "error
> component" not being instantiated because of the constructor not being
> finished(or i think that's the cause). 
> 
> Any ideas of solutions that i can implement? 
> I know that i could set wicket to production instead of development and
> get rid of the stack trace. The problem is that i would like to keep the
> error message - to show the error message back to the user-. Should i
> instead of doing error(e.getMessage) rethrow the message inside a new
> defined exception and have a custom error page for that exception in which
> i would show only the message of the error.
> 
> Is there any option that would keep me from treating the errors in the
> constructor other than how i treat an error from a button push in which i
> do error(e.getMessage())?
> 
> Thanks.
> 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/error%28...%29-No-page-found-for-component-tf3497125.html#a9768516
Sent from the Wicket - User mailing list archive at Nabble.com.


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] How do you update domain object from Model/DropDownChoice

2007-03-31 Thread Kurt R. Hoehn
I'm a divorced Struts programmer the breakup took place when I found
Wicket.  So I'm new to Wicket and I have a question about
Model/DropDownChoice/Domain Object updating.

Sorry about the long email.

Here is my question:

How do I update the Buyer object with a different Profile object if the
user selected a different Profile object on the form.  I tried the
onSelectionChanged in the DropDownChoice component and that worked but I
would have to hit the submit button twice and that didn't feel right. 

So what is the most correct way to do this with in wicket?

My environment is:
Java 1.5
Wicket 2.0-SNAPSHOT
Wicket-Spring 2.0-SNAPSHOT
Hibernate 3.2.1-GA
Spring 2.0.2

Here is my code:

public class Profile
{
private String identity;
private String name;

... setters/getters ...
}

public class Buyer
{
private String identity;
private String firstName;
private String lastName;

private Profile profile;

... setters/getters ...
}

BuyerPage.html:




Select Profile


Profile1
Profile2




Last Name



First Name



...








public class BuyerPage extends MyBasePage
{
...

public BuyerPage(PageParameters params)
{
Buyer buyer = new Buyer();

IModel buyerModel = new CompoundPropertyModel(buyer);
new FeedbackPanel(this, "feedback");

identity = params.getString("identity");
if( identity != null )
{
buyer.setIdentity(identity);
buyer = buyerManager.findByIdentity(buyer);
if( buyer != null )
{
buyerModel = new CompoundPropertyModel(buyer);
}
}
else
{
isNew = true;
buyer.setProfile(getProfile());
}

initializeForm(buyerModel);
}

protected void initializeForm(IModel buyerModel)
{
BuyerForm form = new BuyerForm(this, "buyerForm", buyerModel);
TextField lastName = new TextField(form,
"contact.lastName");
lastName.setRequired(true);

TextField firstName = new TextField(form,
"contact.firstName");
firstName.setRequired(true);

... other components ...

Profile profile = buyerModel.getObject().getProfile();
new DropDownChoice(form, "profile", new
Model(profile), profileManager.getProfiles(getProfile()),
new IChoiceRenderer() {
public Object getDisplayValue(Profile profile)
{
return profile.getName();
}

public String getIdValue(Profile profile, int i)
{
return profile.getIdentity();
}
})
}

class BuyerForm extends Form
{
public BuyerForm(MarkupContainer markupContainer, String s,
IModel buyerModel)
{
super(markupContainer, s, buyerModel);
}

public void onSubmit()
{
buyerManager.save( getModelObject() );
setResponsePage(BuyerListPage.class);
}
}
}


TIA,
-kurt



-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] error(...) No page found for component

2007-03-31 Thread serban.balamaci

Hi.

I have a problem in that inside the constructor of a page(panel actually) i
invoke a stored procedure which needs to get the model for the panel. The
stored procedure may throw an error message. The error message should be
seen by the user, he can understand what he did wrong. So inside the
constructor i have something like this:

public PanelConstructor() {
  try {
  } catch(UserPresentableException e) {
   error(e.getMessage);
  }
}

The problem is that if the error is thrown i get a No page found for
component. I understand that the cause of the error is that the "error
component" not being instantiated because of the constructor not being
finished(or i think that's the cause). 

Any ideas of solutions that i can implement? 
I know that i could set wicket to production instead of development and get
rid of the stack trace. The problem is that i would like to keep the error
message - to show the error message back to the user-. Should i instead of
doing error(e.getMessage) rethrow the message inside a new defined exception
and have a custom error page for that exception in which i would show only
the message of the error.

Is there any option that would keep me from treating the errors in the
constructor other than how i treat an error from a button push?

Thanks.



-- 
View this message in context: 
http://www.nabble.com/error%28...%29-No-page-found-for-component-tf3497125.html#a9767935
Sent from the Wicket - User mailing list archive at Nabble.com.


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Custom XML markup

2007-03-31 Thread Jean-Baptiste Quenot
* Igor Vaynberg:
> On 3/26/07, Toscano <[EMAIL PROTECTED]> wrote:
> >
> >
> >I mean:
> >- The combo-option is treated as a new tag attribute, not as the name of
> >the
> >tag. Is there any way of maintain that "-" there?
> 
> 
> what wicket version are you using? this might be a bug in our xml parser.
> please open a jira issue.

Indeed it's a problem in our XML parser.  But the problem is
already fixed, see:

XmlPullParser does not respect the XML NCName syntax
https://issues.apache.org/jira/browse/WICKET-350
-- 
 Jean-Baptiste Quenot
aka  John Banana   Qwerty
http://caraldi.com/jbq/

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] complex user case

2007-03-31 Thread Korbinian Bachl
looks not very complex - 
 
base would be the "Autocomplete Example"
http://www.wicket-library.com/wicket-examples/ajax -> Auto Complete...
 
rest is a bit CSS playing + Contentvalidating - only the point with the
keystroke would need add. ajax and seems odd to me as i dont know a secure
way to capture keyboard input - as this is not valid for JS to bind a
command to a window (afaik), but i also dont see the reason you need this...

 
Regards
 


  _  

Von: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Im Auftrag von richard
schmidt
Gesendet: Samstag, 31. März 2007 12:45
An: wicket-user@lists.sourceforge.net
Betreff: [Wicket-user] complex user case


I am evaluating frameworks wrt a new project I will be working on.
 
The application requires a richish user interface (don't they all now!)
 
The 'richest' user case is 
 
1) The user starts entering the name of a client into a text field. 
 
2) After entering a few letters they enter a special keystroke. This results
in a server side call looking for clients with that name.
 
3) If only one client is found, then the clients name is entered into the
text field and the focus moves onto the next text field.
 
4) If more than one client is found, then a pop up is displayed to user.
This pop up contains the search results as well as extra controls so that
the user can further narrow his search. This could either be a multi page
table with ordering  and filtering, or a 'google type' search result. By
selecting one of the items, the pop up is closed and the client name is
entered into the text field and the focus moves to the next control. 
 
Can Wicket be used to implement the user case? Or should I look at stuff
like GWT or Swing?
 
Thanks
Richard
 

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] complex user case

2007-03-31 Thread Erik van Oosten
What comes close is Wicket's autocompletion field. It works just like 
google's autocompletion. It is quite flexible and easy to use.

Regards,
Erik.

richard schmidt wrote:
> I am evaluating frameworks wrt a new project I will be working on.
>  
> The application requires a richish user interface (don't they all now!)
>  
> The 'richest' user case is
>  
> 1) The user starts entering the name of a client into a text field.
>  
> 2) After entering a few letters they enter a special keystroke. This 
> results in a server side call looking for clients with that name.
>  
> 3) If only one client is found, then the clients name is entered into 
> the text field and the focus moves onto the next text field.
>  
> 4) If more than one client is found, then a pop up is displayed to 
> user. This pop up contains the search results as well as extra 
> controls so that the user can further narrow his search. This could 
> either be a multi page table with ordering  and filtering, or a 
> 'google type' search result. By selecting one of the items, the pop up 
> is closed and the client name is entered into the text field and the 
> focus moves to the next control.
>  
> Can Wicket be used to implement the user case? Or should I look at 
> stuff like GWT or Swing?
>  
> Thanks
> Richard
>  
>

-- 
Erik van Oosten
http://day-to-day-stuff.blogspot.com/


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] complex user case

2007-03-31 Thread richard schmidt

I am evaluating frameworks wrt a new project I will be working on.

The application requires a richish user interface (don't they all now!)

The 'richest' user case is

1) The user starts entering the name of a client into a text field.

2) After entering a few letters they enter a special keystroke. This results
in a server side call looking for clients with that name.

3) If only one client is found, then the clients name is entered into the
text field and the focus moves onto the next text field.

4) If more than one client is found, then a pop up is displayed to user.
This pop up contains the search results as well as extra controls so that
the user can further narrow his search. This could either be a multi page
table with ordering  and filtering, or a 'google type' search result. By
selecting one of the items, the pop up is closed and the client name is
entered into the text field and the focus moves to the next control.

Can Wicket be used to implement the user case? Or should I look at stuff
like GWT or Swing?

Thanks
Richard
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Wicket 1.3 ready for development?

2007-03-31 Thread Erik van Oosten
Thanks Eelco, Frank,

1.3 it will be.

Regards,
Erik.


-- 
Erik van Oosten
http://day-to-day-stuff.blogspot.com/


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user