Re: how to Get Context path

2009-07-17 Thread Gerald Fernando
Yes i mean context path of current class

Thanks&Regards,
Gerald A

On Fri, Jul 17, 2009 at 6:32 PM, Linda van der Pal <
lvd...@heritageagenturen.nl> wrote:

> Per,
>
> Look at the reply he gave me to that same question.
>
> Linda
>
> Per Newgro wrote:
>
>>  Gerald Fernando schrieb:
>>
>>> Hello Friends,
>>> how to get the context path of current class
>>>
>>> Thanks&Regards,
>>> Gerald A
>>>
>>>
>>>
>> Can you please explain what you mean with "context path of current class"?
>>
>> Cheers
>> Per
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>> 
>>
>>
>> No virus found in this incoming message.
>> Checked by AVG - www.avg.com Version: 8.5.375 / Virus Database:
>> 270.13.18/2243 - Release Date: 07/17/09 06:08:00
>>
>>
>>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: What already redirecting error?

2009-07-17 Thread Martin Makundi
None lead to my code, that's my point. The only thing I have used is
setResponsePage().

**
Martin

2009/7/17 Igor Vaynberg :
> pull the call hierarchy on
> org.apache.wicket.protocol.http.BufferedWebResponse.redirect and see
> what paths lead to your code.
>
> -igor
>
> On Fri, Jul 17, 2009 at 11:05 AM, Martin
> Makundi wrote:
>> I don't have a clue where that occured...
>>
>> **
>> Martin
>>
>> 2009/7/17 Alex Objelean :
>>>
>>> Show us your code.
>>>
>>> Alex Objelean
>>>
>>>
>>> MartinM wrote:

 At least I do not know of any such redirects...

 **
 Martin

 2009/7/17 Igor Vaynberg :
> you are triggering a redirect after something else has already done so.
>
> -igor
>
> On Fri, Jul 17, 2009 at 1:38 AM, Martin
> Makundi wrote:
>> Hi!
>>
>> What is this error and how can I avoid it? Don't even know why it comes:
>>
>> 2009-07-17 11:43:22,804 181242389 [btpool0-503] ERROR RequestCycle  -
>> Already redirecting to '?wicket:interface=:0:9:::'. Cannot redirect
>> more than once
>> org.apache.wicket.WicketRuntimeException: Already redirecting to
>> '?wicket:interface=:0:9:::'. Cannot redirect more than once
>>       at
>> org.apache.wicket.protocol.http.BufferedWebResponse.redirect(BufferedWebResponse.java:101)
>>       at
>> org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:257)
>>       at
>> org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:105)
>>       at org.apache.wicket.RequestCycle.respond(RequestCycle.java:1258)
>>       at org.apache.wicket.RequestCycle.step(RequestCycle.java:1325)
>>       at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1419)
>>       at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
>>       at
>> org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:456)
>>       at
>> org.apache.wicket.protocol.http.WicketServlet.doPost(WicketServlet.java:160)
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

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



>>>
>>> --
>>> View this message in context: 
>>> http://www.nabble.com/What-already-redirecting-error--tp24530668p24538774.html
>>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>>
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

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



Re: Markup for disabled Link - Proposal (add behavior instead of markup)

2009-07-17 Thread keithrbennett

I got this working with the following code in the constructor of my Link
subclass:

http://gist.github.com/149344

...and removing the text from the HTML element so it wouldn't display
alongside the image.

I don't know if this is the best way, though.

It would probably make sense for me to refactor this into a class or
something, but it would be even nicer if it were built into Wicket, assuming
it's a common use case to display an image when disabled.

- Keith




keithrbennett wrote:
> 
> Pixologe -
> 
> I am a relative beginner at Wicket, but FWIW your ideas sound reasonable
> and helpful.
> 
> I have a link with an image, and would like to display an alternate image
> if the link is disabled.  I understand that it should be a span element so
> that clicking has no effect.
> 
> Can you, Igor, or anyone, explain to me, or point me to resources, that
> would show me how to do this?
> 
> Thanks,
> Keith Bennett
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Markup-for-disabled-Link---Proposal-%28add-behavior-instead-of-markup%29-tp19570584p24543114.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: wicketstuff tinymce for Wicket 1.3.5/6

2009-07-17 Thread Steve Swinsburg
Ok so I was including the 1.3-SNAPSHOT version in testing, added the  
TinyMCEBehaviour to my textarea, everything built fine, but it did  
nothing. No markup was rendered either, nor anything in the logs.


Is it broken right now?

Tending towards making my own component if this one doesn't work.

Steve




On 17/07/2009, at 4:15 PM, Jeremy Thomerson wrote:


You have to build yourself.  Most of the wicketstuff projects were not
built with release numbers prior to 1.4 / the wicketstuff-core work.

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




On Fri, Jul 17, 2009 at 4:53 AM, Steve
Swinsburg wrote:

Hi all,

What's the version of TinyMCE from wicketstuff thats recommended  
for 1.3.5
or 1.3.6? I only see 1.3-SNAPSHOT in the Maven repo but am not too  
keen on

putting a SNAPSHOT jar into production.


   org.wicketstuff
   wicket-contrib-tinymce
   1.3-SNAPSHOT


Thanks,
Steve


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




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



Re: border error

2009-07-17 Thread Jason Lea
is it due to closing the tabs div with the short version  instead 
of ?

I had a feeling wicket doesn't like the  version...

Fernando Wermus wrote:

Igor,
Here it is: the border is in the page.





label contents here



On Fri, Jul 17, 2009 at 1:34 PM, Igor Vaynberg wrote:

  

you dont have  in PaginaTestBorder.html

-igor

On Fri, Jul 17, 2009 at 1:30 PM, Fernando
Wermus wrote:


What am I doing wrong in this very simple example?


public class PaginaTestBorder  extends AuthenticatedWebPage{
   public PaginaTestBorder(){
   add(new EmptyPanel("tabs"));
   MyBorder border = new MyBorder("border");
   border.add(new Label("label", "I am the label"));
   add(border);
   }
}


MyBorder.html

 Everything outside of the  tags will be ignored.
 Might be handy as preview code.
   
before the border contents 
 
after the border contents 
   




class MyBorder extends Border
{

  public MyBorder(String id)
  {
  super(id);
  }
}

WicketMessage: The component(s) below failed to render. A common
problem is that you have added a component in code but forgot to
reference it in the markup (thus the component will never be
rendered).

1. [MarkupContainer [Component id = border]]
2. [MarkupContainer [Component id = _body]]
3. [Component id = label]

Root cause:

org.apache.wicket.WicketRuntimeException: The component(s) below
failed to render. A common problem is that you have added a component
in code but forgot to reference it in the markup (thus the component
will never be rendered).

1. [MarkupContainer [Component id = border]]
2. [MarkupContainer [Component id = _body]]
3. [Component id = label]





--
Fernando Wermus.

www.linkedin.com/in/fernandowermus

  

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






  


--
Jason Lea




Re: StatelessForm problem - Not all parameters were encoded.

2009-07-17 Thread Igor Vaynberg
forms do not support indexed strategies since they need actual
parameternames.

-igor

2009/7/17 Norbert Sándor 

> Hello,
>
> When my page contains a StatelessForm, the exception below is thrown. When
> I replace the StatelessForm with a normal Form, it works as expected.
> I do nothing special, the page contains only the StatelessForm (even no
> components inside the form, just a static HTML submit button).
>
> The exception is thrown only when using IndexedHybridUrlCodingStrategy,
> when I switch to QueryStringUrlCodingStrategy the page renders normally.
> I use 1.4-rc7.
>
> Thanks for your help in advance!
> Regards:
> Norbi
>
>
>
> org.apache.wicket.WicketRuntimeException: Not all parameters were encoded.
> Make sure all parameter names are integers in consecutive order starting
> with zero. Current parameter names are: [wicket:interface]
>   at
> org.apache.wicket.request.target.coding.IndexedHybridUrlCodingStrategy.appendParameters(IndexedHybridUrlCodingStrategy.java:78)
> [wicket-1.4-rc7.jar:1.4-rc7]
>   at
> org.apache.wicket.request.target.coding.HybridUrlCodingStrategy.encode(HybridUrlCodingStrategy.java:430)
> [wicket-1.4-rc7.jar:1.4-rc7]
>   at
> org.apache.wicket.protocol.http.request.WebRequestCodingStrategy.pathForTarget(WebRequestCodingStrategy.java:492)
> [wicket-1.4-rc7.jar:1.4-rc7]
>   at
> org.apache.wicket.protocol.http.request.WebRequestCodingStrategy.encode(WebRequestCodingStrategy.java:250)
> [wicket-1.4-rc7.jar:1.4-rc7]
>   at org.apache.wicket.RequestCycle.encodeUrlFor(RequestCycle.java:811)
> [wicket-1.4-rc7.jar:1.4-rc7]
>   at org.apache.wicket.RequestCycle.urlFor(RequestCycle.java:927)
> [wicket-1.4-rc7.jar:1.4-rc7]
>   at org.apache.wicket.RequestCycle.urlFor(RequestCycle.java:976)
> [wicket-1.4-rc7.jar:1.4-rc7]
>   at org.apache.wicket.Component.urlFor(Component.java:3339)
> [wicket-1.4-rc7.jar:1.4-rc7]
>   at org.apache.wicket.markup.html.form.Form.onComponentTag(Form.java:1806)
> [wicket-1.4-rc7.jar:1.4-rc7]
>   at org.apache.wicket.Component.renderComponent(Component.java:2587)
> [wicket-1.4-rc7.jar:1.4-rc7]
>   at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1536)
> [wicket-1.4-rc7.jar:1.4-rc7]
>   at org.apache.wicket.markup.html.form.Form.onRender(Form.java:1997)
> [wicket-1.4-rc7.jar:1.4-rc7]
>   at org.apache.wicket.Component.render(Component.java:2447)
> [wicket-1.4-rc7.jar:1.4-rc7]
>   at
> org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1414)
> [wicket-1.4-rc7.jar:1.4-rc7]
>   at org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1552)
> [wicket-1.4-rc7.jar:1.4-rc7]
>   at org.apache.wicket.Page.onRender(Page.java:1547)
> [wicket-1.4-rc7.jar:1.4-rc7]
>   at org.apache.wicket.Component.render(Component.java:2447)
> [wicket-1.4-rc7.jar:1.4-rc7]
>   at org.apache.wicket.Page.renderPage(Page.java:914)
> [wicket-1.4-rc7.jar:1.4-rc7]
>   at
> org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:262)
> [wicket-1.4-rc7.jar:1.4-rc7]
>   at
> org.apache.wicket.request.target.coding.HybridUrlCodingStrategy$HybridBookmarkablePageRequestTarget.respond(HybridUrlCodingStrategy.java:907)
> [wicket-1.4-rc7.jar:1.4-rc7]
>   at
> org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:105)
> [wicket-1.4-rc7.jar:1.4-rc7]
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: border error

2009-07-17 Thread Igor Vaynberg
nothing really jumps out at me. create a quickstart and attach it to a jira
issue.

-igor

On Fri, Jul 17, 2009 at 1:45 PM, Fernando Wermus
wrote:

> Igor,
>Here it is: the border is in the page.
>
> 
>
>
>
>label contents here
>
> 
>
> On Fri, Jul 17, 2009 at 1:34 PM, Igor Vaynberg  >wrote:
>
> > you dont have  in PaginaTestBorder.html
> >
> > -igor
> >
> > On Fri, Jul 17, 2009 at 1:30 PM, Fernando
> > Wermus wrote:
> > > What am I doing wrong in this very simple example?
> > >
> > >
> > > public class PaginaTestBorder  extends AuthenticatedWebPage{
> > >public PaginaTestBorder(){
> > >add(new EmptyPanel("tabs"));
> > >MyBorder border = new MyBorder("border");
> > >border.add(new Label("label", "I am the label"));
> > >add(border);
> > >}
> > > }
> > >
> > >
> > > MyBorder.html
> > > 
> > >  Everything outside of the  tags will be ignored.
> > >  Might be handy as preview code.
> > >
> > > before the border contents 
> > >  
> > > after the border contents 
> > >
> > > 
> > >
> > >
> > >
> > > class MyBorder extends Border
> > > {
> > >
> > >   public MyBorder(String id)
> > >   {
> > >   super(id);
> > >   }
> > > }
> > >
> > > WicketMessage: The component(s) below failed to render. A common
> > > problem is that you have added a component in code but forgot to
> > > reference it in the markup (thus the component will never be
> > > rendered).
> > >
> > > 1. [MarkupContainer [Component id = border]]
> > > 2. [MarkupContainer [Component id = _body]]
> > > 3. [Component id = label]
> > >
> > > Root cause:
> > >
> > > org.apache.wicket.WicketRuntimeException: The component(s) below
> > > failed to render. A common problem is that you have added a component
> > > in code but forgot to reference it in the markup (thus the component
> > > will never be rendered).
> > >
> > > 1. [MarkupContainer [Component id = border]]
> > > 2. [MarkupContainer [Component id = _body]]
> > > 3. [Component id = label]
> > >
> > >
> > >
> > >
> > >
> > > --
> > > Fernando Wermus.
> > >
> > > www.linkedin.com/in/fernandowermus
> > >
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
>
>
> --
> Fernando Wermus.
>
> www.linkedin.com/in/fernandowermus
>


StatelessForm problem - Not all parameters were encoded.

2009-07-17 Thread Norbert Sándor

Hello,

When my page contains a StatelessForm, the exception below is thrown. 
When I replace the StatelessForm with a normal Form, it works as expected.
I do nothing special, the page contains only the StatelessForm (even no 
components inside the form, just a static HTML submit button).


The exception is thrown only when using IndexedHybridUrlCodingStrategy, 
when I switch to QueryStringUrlCodingStrategy the page renders normally.

I use 1.4-rc7.

Thanks for your help in advance!
Regards:
Norbi



org.apache.wicket.WicketRuntimeException: Not all parameters were 
encoded. Make sure all parameter names are integers in consecutive order 
starting with zero. Current parameter names are: [wicket:interface]
   at 
org.apache.wicket.request.target.coding.IndexedHybridUrlCodingStrategy.appendParameters(IndexedHybridUrlCodingStrategy.java:78) 
[wicket-1.4-rc7.jar:1.4-rc7]
   at 
org.apache.wicket.request.target.coding.HybridUrlCodingStrategy.encode(HybridUrlCodingStrategy.java:430) 
[wicket-1.4-rc7.jar:1.4-rc7]
   at 
org.apache.wicket.protocol.http.request.WebRequestCodingStrategy.pathForTarget(WebRequestCodingStrategy.java:492) 
[wicket-1.4-rc7.jar:1.4-rc7]
   at 
org.apache.wicket.protocol.http.request.WebRequestCodingStrategy.encode(WebRequestCodingStrategy.java:250) 
[wicket-1.4-rc7.jar:1.4-rc7]
   at 
org.apache.wicket.RequestCycle.encodeUrlFor(RequestCycle.java:811) 
[wicket-1.4-rc7.jar:1.4-rc7]
   at org.apache.wicket.RequestCycle.urlFor(RequestCycle.java:927) 
[wicket-1.4-rc7.jar:1.4-rc7]
   at org.apache.wicket.RequestCycle.urlFor(RequestCycle.java:976) 
[wicket-1.4-rc7.jar:1.4-rc7]
   at org.apache.wicket.Component.urlFor(Component.java:3339) 
[wicket-1.4-rc7.jar:1.4-rc7]
   at 
org.apache.wicket.markup.html.form.Form.onComponentTag(Form.java:1806) 
[wicket-1.4-rc7.jar:1.4-rc7]
   at org.apache.wicket.Component.renderComponent(Component.java:2587) 
[wicket-1.4-rc7.jar:1.4-rc7]
   at 
org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1536) 
[wicket-1.4-rc7.jar:1.4-rc7]
   at org.apache.wicket.markup.html.form.Form.onRender(Form.java:1997) 
[wicket-1.4-rc7.jar:1.4-rc7]
   at org.apache.wicket.Component.render(Component.java:2447) 
[wicket-1.4-rc7.jar:1.4-rc7]
   at 
org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1414) 
[wicket-1.4-rc7.jar:1.4-rc7]
   at 
org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1552) 
[wicket-1.4-rc7.jar:1.4-rc7]
   at org.apache.wicket.Page.onRender(Page.java:1547) 
[wicket-1.4-rc7.jar:1.4-rc7]
   at org.apache.wicket.Component.render(Component.java:2447) 
[wicket-1.4-rc7.jar:1.4-rc7]
   at org.apache.wicket.Page.renderPage(Page.java:914) 
[wicket-1.4-rc7.jar:1.4-rc7]
   at 
org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:262) 
[wicket-1.4-rc7.jar:1.4-rc7]
   at 
org.apache.wicket.request.target.coding.HybridUrlCodingStrategy$HybridBookmarkablePageRequestTarget.respond(HybridUrlCodingStrategy.java:907) 
[wicket-1.4-rc7.jar:1.4-rc7]
   at 
org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:105) 
[wicket-1.4-rc7.jar:1.4-rc7]


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



Re: border error

2009-07-17 Thread Fernando Wermus
Igor,
Here it is: the border is in the page.





label contents here



On Fri, Jul 17, 2009 at 1:34 PM, Igor Vaynberg wrote:

> you dont have  in PaginaTestBorder.html
>
> -igor
>
> On Fri, Jul 17, 2009 at 1:30 PM, Fernando
> Wermus wrote:
> > What am I doing wrong in this very simple example?
> >
> >
> > public class PaginaTestBorder  extends AuthenticatedWebPage{
> >public PaginaTestBorder(){
> >add(new EmptyPanel("tabs"));
> >MyBorder border = new MyBorder("border");
> >border.add(new Label("label", "I am the label"));
> >add(border);
> >}
> > }
> >
> >
> > MyBorder.html
> > 
> >  Everything outside of the  tags will be ignored.
> >  Might be handy as preview code.
> >
> > before the border contents 
> >  
> > after the border contents 
> >
> > 
> >
> >
> >
> > class MyBorder extends Border
> > {
> >
> >   public MyBorder(String id)
> >   {
> >   super(id);
> >   }
> > }
> >
> > WicketMessage: The component(s) below failed to render. A common
> > problem is that you have added a component in code but forgot to
> > reference it in the markup (thus the component will never be
> > rendered).
> >
> > 1. [MarkupContainer [Component id = border]]
> > 2. [MarkupContainer [Component id = _body]]
> > 3. [Component id = label]
> >
> > Root cause:
> >
> > org.apache.wicket.WicketRuntimeException: The component(s) below
> > failed to render. A common problem is that you have added a component
> > in code but forgot to reference it in the markup (thus the component
> > will never be rendered).
> >
> > 1. [MarkupContainer [Component id = border]]
> > 2. [MarkupContainer [Component id = _body]]
> > 3. [Component id = label]
> >
> >
> >
> >
> >
> > --
> > Fernando Wermus.
> >
> > www.linkedin.com/in/fernandowermus
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: border error

2009-07-17 Thread Igor Vaynberg
you dont have  in PaginaTestBorder.html

-igor

On Fri, Jul 17, 2009 at 1:30 PM, Fernando
Wermus wrote:
> What am I doing wrong in this very simple example?
>
>
> public class PaginaTestBorder  extends AuthenticatedWebPage{
>    public PaginaTestBorder(){
>        add(new EmptyPanel("tabs"));
>        MyBorder border = new MyBorder("border");
>        border.add(new Label("label", "I am the label"));
>        add(border);
>    }
> }
>
>
> MyBorder.html
> 
>  Everything outside of the  tags will be ignored.
>  Might be handy as preview code.
>    
>     before the border contents 
>      
>     after the border contents 
>    
> 
>
>
>
> class MyBorder extends Border
> {
>
>   public MyBorder(String id)
>   {
>       super(id);
>   }
> }
>
> WicketMessage: The component(s) below failed to render. A common
> problem is that you have added a component in code but forgot to
> reference it in the markup (thus the component will never be
> rendered).
>
> 1. [MarkupContainer [Component id = border]]
> 2. [MarkupContainer [Component id = _body]]
> 3. [Component id = label]
>
> Root cause:
>
> org.apache.wicket.WicketRuntimeException: The component(s) below
> failed to render. A common problem is that you have added a component
> in code but forgot to reference it in the markup (thus the component
> will never be rendered).
>
> 1. [MarkupContainer [Component id = border]]
> 2. [MarkupContainer [Component id = _body]]
> 3. [Component id = label]
>
>
>
>
>
> --
> Fernando Wermus.
>
> www.linkedin.com/in/fernandowermus
>

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



border error

2009-07-17 Thread Fernando Wermus
What am I doing wrong in this very simple example?


public class PaginaTestBorder  extends AuthenticatedWebPage{
public PaginaTestBorder(){
add(new EmptyPanel("tabs"));
MyBorder border = new MyBorder("border");
border.add(new Label("label", "I am the label"));
add(border);
}
}


MyBorder.html

 Everything outside of the  tags will be ignored.
 Might be handy as preview code.

 before the border contents 
  
 after the border contents 





class MyBorder extends Border
{

   public MyBorder(String id)
   {
   super(id);
   }
}

WicketMessage: The component(s) below failed to render. A common
problem is that you have added a component in code but forgot to
reference it in the markup (thus the component will never be
rendered).

1. [MarkupContainer [Component id = border]]
2. [MarkupContainer [Component id = _body]]
3. [Component id = label]

Root cause:

org.apache.wicket.WicketRuntimeException: The component(s) below
failed to render. A common problem is that you have added a component
in code but forgot to reference it in the markup (thus the component
will never be rendered).

1. [MarkupContainer [Component id = border]]
2. [MarkupContainer [Component id = _body]]
3. [Component id = label]





-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: SpringBean: component-based verses session in scope.

2009-07-17 Thread Igor Vaynberg
if you declare the service reference as a component field with
@SpringBean then it is directly accessible within your component code.

-igor

On Fri, Jul 17, 2009 at 12:49 PM, satar wrote:
>
> Oh... I see, so it doesn't matter which way I go because underneath the
> covers it is a single instance of the session anyway. Still less code to
> manage/write if I define access to the injected sessions within the session
> class. Now I just need to learn and understand what you meant by the comment
> why not use:
>
>  matrixCheckItemService.foo()
>
> That one is throwing me but I am fairly new with web architectures period so
> I probably am not reading into that. What I am doing with:
>
> MatrixCheckItemService matrixCheckItemService =
> ((MatrixSession)WebSession.get()).getCheckItemService();
>
> is getting a pointer to my service that I injected within my session class,
> then I call matrixCheckItemService.foo(). Are you suggesting that I make the
> session's injected instance public instead of private beings there can only
> be one session level instance anyway because it is handled underneath the
> covers at the spring context?
>
> Sorry if I appear ignorant... I am still very green behind the ears.
>
>
> --
> View this message in context: 
> http://www.nabble.com/SpringBean%3A-component-based-verses-session-in-scope.-tp24539500p24540596.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

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



Re: SpringBean: component-based verses session in scope.

2009-07-17 Thread satar

Oh... I see, so it doesn't matter which way I go because underneath the
covers it is a single instance of the session anyway. Still less code to
manage/write if I define access to the injected sessions within the session
class. Now I just need to learn and understand what you meant by the comment
why not use:

  matrixCheckItemService.foo()

That one is throwing me but I am fairly new with web architectures period so
I probably am not reading into that. What I am doing with:

MatrixCheckItemService matrixCheckItemService =
((MatrixSession)WebSession.get()).getCheckItemService();

is getting a pointer to my service that I injected within my session class,
then I call matrixCheckItemService.foo(). Are you suggesting that I make the
session's injected instance public instead of private beings there can only
be one session level instance anyway because it is handled underneath the
covers at the spring context?

Sorry if I appear ignorant... I am still very green behind the ears.


-- 
View this message in context: 
http://www.nabble.com/SpringBean%3A-component-based-verses-session-in-scope.-tp24539500p24540596.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Markup for disabled Link - Proposal (add behavior instead of markup)

2009-07-17 Thread keithrbennett

Pixologe -

I am a relative beginner at Wicket, but FWIW your ideas sound reasonable and
helpful.

I have a link with an image, and would like to display an alternate image if
the link is disabled.  I understand that it should be a span element so that
clicking has no effect.

Can you, Igor, or anyone, explain to me, or point me to resources, that
would show me how to do this?

Thanks,
Keith Bennett



pixologe wrote:
> 
> Thanks for inspiration, igor. :)
> Well, it would not help the mentioned problem of not being able to change
> the style of an element depending on its child elements. However, as I
> thought about this, I realized that I could do some global changes in the
> weird templates and stylesheets I got, so CSS could differentiate by
> a.myClass and span.myClass. As these changes would cause a lot of
> side-effects in the files, I think I'll better stick with the
> AttributeAppender I've currently got in there.
> 
> Still I think that having markup in Java strings as well as using [em] to
> mark disabledness are not the best ideas - but let's not discuss this any
> longer :)
> 
> Cheers.
> 

-- 
View this message in context: 
http://www.nabble.com/Markup-for-disabled-Link---Proposal-%28add-behavior-instead-of-markup%29-tp19570584p24540451.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: SpringBean: component-based verses session in scope.

2009-07-17 Thread Igor Vaynberg
erm. i meant

matrixCheckItemService.foo()

-igor

On Fri, Jul 17, 2009 at 12:08 PM, Igor Vaynberg wrote:
> what gets injected into the component and what gets injected into
> session are the *same* thing - a pointer to something in the spring
> context.
>
> so why would you want to write
>
> MatrixCheckItemService matrixCheckItemService =
> ((MatrixSession)WebSession.get()).getCheckItemService();
>
> when you can just write
> matrixCheckItemService.getCheckItemService()
>
> ?
>
> -igor
>
> On Fri, Jul 17, 2009 at 12:04 PM, satar wrote:
>>
>> Igor, I was more asking for opinions on whether it better to define my
>> @SpringBean injections in my session class verses within components that
>> need them. In the later, I may end up injecting the same session class in
>> more than one component class. What I am doing now is moving those instances
>> out into the session class and accessing within the component with a call to
>> a session-level method:
>>
>> ...
>>    // get our Check items from the database
>>    MatrixCheckItemService matrixCheckItemService = ((MatrixSession)
>> WebSession
>>        .get()).getCheckItemService();
>> ...
>>
>> I have a working solution either way. I was just looking for insight on what
>> smart, highly knowledgeable peeps like yourself thought was better.
>> --
>> View this message in context: 
>> http://www.nabble.com/SpringBean%3A-component-based-verses-session-in-scope.-tp24539500p24539994.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>

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



Re: SpringBean: component-based verses session in scope.

2009-07-17 Thread Igor Vaynberg
what gets injected into the component and what gets injected into
session are the *same* thing - a pointer to something in the spring
context.

so why would you want to write

MatrixCheckItemService matrixCheckItemService =
((MatrixSession)WebSession.get()).getCheckItemService();

when you can just write
matrixCheckItemService.getCheckItemService()

?

-igor

On Fri, Jul 17, 2009 at 12:04 PM, satar wrote:
>
> Igor, I was more asking for opinions on whether it better to define my
> @SpringBean injections in my session class verses within components that
> need them. In the later, I may end up injecting the same session class in
> more than one component class. What I am doing now is moving those instances
> out into the session class and accessing within the component with a call to
> a session-level method:
>
> ...
>    // get our Check items from the database
>    MatrixCheckItemService matrixCheckItemService = ((MatrixSession)
> WebSession
>        .get()).getCheckItemService();
> ...
>
> I have a working solution either way. I was just looking for insight on what
> smart, highly knowledgeable peeps like yourself thought was better.
> --
> View this message in context: 
> http://www.nabble.com/SpringBean%3A-component-based-verses-session-in-scope.-tp24539500p24539994.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

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



Re: SpringBean: component-based verses session in scope.

2009-07-17 Thread satar

Igor, I was more asking for opinions on whether it better to define my
@SpringBean injections in my session class verses within components that
need them. In the later, I may end up injecting the same session class in
more than one component class. What I am doing now is moving those instances
out into the session class and accessing within the component with a call to
a session-level method:

...
// get our Check items from the database
MatrixCheckItemService matrixCheckItemService = ((MatrixSession)
WebSession
.get()).getCheckItemService();
...

I have a working solution either way. I was just looking for insight on what
smart, highly knowledgeable peeps like yourself thought was better.
-- 
View this message in context: 
http://www.nabble.com/SpringBean%3A-component-based-verses-session-in-scope.-tp24539500p24539994.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: SpringBean: component-based verses session in scope.

2009-07-17 Thread Igor Vaynberg
spring provides a scoping mechanism and supports session scope out of
the box. why dont you google around for that, might save you some
headaches.

-igor

On Fri, Jul 17, 2009 at 11:27 AM, Steve Tarlton wrote:
> My app is using Spring/Hibernate and I am using the @SpringBean annotation
> based dependency injection to tie in my services. During my development, I
> found I needed access to one of the services at the session layer and found
> a thread that discussed how to do that by calling out
> "InjectorHolder.getInjector().inject(this);" in the init when constructing
> the session.
>
> Now I am wondering if it is more optimal to move all of my other service
> lookup injectors to the session scope. To me, it seems that this would be
> more optimal as the app would only need to inject the service once as
> opposed to potentially many times if replicated within several components.
> However, the trade-off may be holding service-level data at a session level,
> thus sticking around for the life of the session. Is this a correct
> analysis, or is it simply good practice to create injectors to services at
> the session layer so that only one instance is ever created for a given
> session?
>

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



Re: What already redirecting error?

2009-07-17 Thread Igor Vaynberg
pull the call hierarchy on
org.apache.wicket.protocol.http.BufferedWebResponse.redirect and see
what paths lead to your code.

-igor

On Fri, Jul 17, 2009 at 11:05 AM, Martin
Makundi wrote:
> I don't have a clue where that occured...
>
> **
> Martin
>
> 2009/7/17 Alex Objelean :
>>
>> Show us your code.
>>
>> Alex Objelean
>>
>>
>> MartinM wrote:
>>>
>>> At least I do not know of any such redirects...
>>>
>>> **
>>> Martin
>>>
>>> 2009/7/17 Igor Vaynberg :
 you are triggering a redirect after something else has already done so.

 -igor

 On Fri, Jul 17, 2009 at 1:38 AM, Martin
 Makundi wrote:
> Hi!
>
> What is this error and how can I avoid it? Don't even know why it comes:
>
> 2009-07-17 11:43:22,804 181242389 [btpool0-503] ERROR RequestCycle  -
> Already redirecting to '?wicket:interface=:0:9:::'. Cannot redirect
> more than once
> org.apache.wicket.WicketRuntimeException: Already redirecting to
> '?wicket:interface=:0:9:::'. Cannot redirect more than once
>       at
> org.apache.wicket.protocol.http.BufferedWebResponse.redirect(BufferedWebResponse.java:101)
>       at
> org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:257)
>       at
> org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:105)
>       at org.apache.wicket.RequestCycle.respond(RequestCycle.java:1258)
>       at org.apache.wicket.RequestCycle.step(RequestCycle.java:1325)
>       at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1419)
>       at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
>       at
> org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:456)
>       at
> org.apache.wicket.protocol.http.WicketServlet.doPost(WicketServlet.java:160)
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

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


>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>>
>>>
>>
>> --
>> View this message in context: 
>> http://www.nabble.com/What-already-redirecting-error--tp24530668p24538774.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

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



SpringBean: component-based verses session in scope.

2009-07-17 Thread Steve Tarlton
My app is using Spring/Hibernate and I am using the @SpringBean annotation
based dependency injection to tie in my services. During my development, I
found I needed access to one of the services at the session layer and found
a thread that discussed how to do that by calling out
"InjectorHolder.getInjector().inject(this);" in the init when constructing
the session.

Now I am wondering if it is more optimal to move all of my other service
lookup injectors to the session scope. To me, it seems that this would be
more optimal as the app would only need to inject the service once as
opposed to potentially many times if replicated within several components.
However, the trade-off may be holding service-level data at a session level,
thus sticking around for the life of the session. Is this a correct
analysis, or is it simply good practice to create injectors to services at
the session layer so that only one instance is ever created for a given
session?


Re: What already redirecting error?

2009-07-17 Thread Martin Makundi
I don't have a clue where that occured...

**
Martin

2009/7/17 Alex Objelean :
>
> Show us your code.
>
> Alex Objelean
>
>
> MartinM wrote:
>>
>> At least I do not know of any such redirects...
>>
>> **
>> Martin
>>
>> 2009/7/17 Igor Vaynberg :
>>> you are triggering a redirect after something else has already done so.
>>>
>>> -igor
>>>
>>> On Fri, Jul 17, 2009 at 1:38 AM, Martin
>>> Makundi wrote:
 Hi!

 What is this error and how can I avoid it? Don't even know why it comes:

 2009-07-17 11:43:22,804 181242389 [btpool0-503] ERROR RequestCycle  -
 Already redirecting to '?wicket:interface=:0:9:::'. Cannot redirect
 more than once
 org.apache.wicket.WicketRuntimeException: Already redirecting to
 '?wicket:interface=:0:9:::'. Cannot redirect more than once
       at
 org.apache.wicket.protocol.http.BufferedWebResponse.redirect(BufferedWebResponse.java:101)
       at
 org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:257)
       at
 org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:105)
       at org.apache.wicket.RequestCycle.respond(RequestCycle.java:1258)
       at org.apache.wicket.RequestCycle.step(RequestCycle.java:1325)
       at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1419)
       at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
       at
 org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:456)
       at
 org.apache.wicket.protocol.http.WicketServlet.doPost(WicketServlet.java:160)

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


>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>>
>
> --
> View this message in context: 
> http://www.nabble.com/What-already-redirecting-error--tp24530668p24538774.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

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



Re: Not working AjaxFormSubmitBehavior in Tomcat behind HTTP Server

2009-07-17 Thread Anton Veretennikov
Thank you, Igor and Russell,

As almost everything is working as expected with RewriteRule, why
AjaxFormSubmitBehavior is not working? I see that new additional
redirect appears in logs. Context name is added to URLs when they are
constructed in urlFor?
If so, is it technically possible to recognize it and [optionally with
some setting] remove context name from URLs being constructed inside
wicket itself?

-- Tony

On Fri, Jul 17, 2009 at 6:07 PM, Russell
Simpkins wrote:
>
> Actually,
> "If" you sub domain your apps, then they can all be ROOT.war e.g. 
> app1.myhost.com vs myhost.com/app1 - look at doing virtual hosts in tomcat if 
> interested.
> Russ
>
>> Date: Fri, 17 Jul 2009 13:29:35 +0800
>> Subject: Re: Not working AjaxFormSubmitBehavior in Tomcat behind HTTP Server
>> From: anton.veretenni...@gmail.com
>> To: users@wicket.apache.org
>>
>> Igor, I have several applications working on one server. They can't
>> all be ROOT.war.
>>
>> -- Tony
>>
>> On Fri, Jul 17, 2009 at 11:40 AM, Igor Vaynberg 
>> wrote:
>> > rename it to ROOT.war
>> >
>> > -igor
>> >
>> > On Thu, Jul 16, 2009 at 7:00 PM, Anton Veretennikov <
>> > anton.veretenni...@gmail.com> wrote:
>> >
>> >> Thank you, Igor, for your suggestion.
>> >>
>> >> I need full hiding of app name. Renaming still creates additional path
>> >> in url like http://sitename.com/AppName/
>> >>
>> >> May be there exists other way or my URL Rewriting is not correct:
>> >>
>> >> 
>> >>  ServerName www.sitename.com
>> >>  ServerAlias sitename.com
>> >>  ProxyPass / ajp://127.0.0.1:8009/AppName/
>> >>  ProxyPassReverse / ajp://127.0.0.1:8009/AppName/
>> >>  ProxyPassReverseCookieDomain    localhost  sitename.com
>> >>  ProxyPassReverseCookiePath /AppName /
>> >>  RewriteEngine  on
>> >>  RewriteRule    ^/AppName/(.*)$  /$1  [R]
>> >> 
>> >>
>> >> -- Tony
>> >>
>> >> On Fri, Jul 17, 2009 at 12:15 AM, Igor Vaynberg
>> >> wrote:
>> >> > just rename your war to something else before deploying it.
>> >> >
>> >> > -igor
>> >> >
>> >> > On Thu, Jul 16, 2009 at 8:25 AM, Anton
>> >> > Veretennikov wrote:
>> >> >> Hello, wicket users and developers,
>> >> >>
>> >> >> This is a problem I can't work out myself, I need your help.
>> >> >>
>> >> >> In a local environment (direct calls to Tomcat) AjaxFormSubmitBehavior
>> >> >> works as expected.
>> >> >> But in production I try to hide application name (let's say,
>> >> >> AppNamePay-1.0-SNAPSHOT) from URL using RewriteRule.
>> >> >>
>> >> >> Logs show that somehow application name bobs up when I create a link
>> >> >> with AjaxFormSubmitBehavior.
>> >> >> This can be seen from httpd logs (302 status):
>> >> >>
>> >> >> xx.22.151.6 - - [16/Jul/2009:14:14:30 +] "GET
>> >> >> /AppNamePay-1.0-SNAPSHOT/?wicket:interface=:0:5::: HTTP/1.1" 302 312
>> >> >> "http://sitename.com/?wicket:interface=:0:4:::"; "Mozilla/5.0 (Windows;
>> >> >> U; Windows NT 5.1; ru; rv:1.9.0.6) Gecko/2009011913 Firefox/3.0.6"
>> >> >>
>> >> >> And from catched calls using HttpFox:
>> >> >>
>> >> >> GET     302     Redirect to:
>> >> >> http://sitename.com/AppNamePay-1.0-SNAPSHOT/?wicket:interface=:0:3:::
>> >> http://sitename.com
>> >> >>
>> >> /?wicket:interface=:0:outterDiv:leftPanel:content:updatableDiv:hidableDiv:electronicUpdatable:list:0:item:border:switch:buttons2:acceptSum:2:ILinkListener::
>> >> >> (Status-Line)   HTTP/1.1 302 Moved Temporarily
>> >> >> GET     302     Redirect to:
>> >> >> http://sitename.com/?wicket:interface=:0:3:::
>> >> http://sitename.com/AppNamePay-1.0-SNAPSHOT/?wicket:interface=:0:3:::
>> >> >> (Status-Line)   HTTP/1.1 302 Found
>> >> >>
>> >> >> How it could be that wicket knows about AppNamePay-1.0-SNAPSHOT?
>> >> >> Other Ajax stuff seems working without problem.
>> >> >>
>> >> >> Wicket is 1.4-rc7
>> >> >>
>> >> >> --Tony
>> >> >>
>> >> >> -
>> >> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> >> >> For additional commands, e-mail: users-h...@wicket.apache.org
>> >> >>
>> >> >>
>> >> >
>> >> > -
>> >> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> >> > For additional commands, e-mail: users-h...@wicket.apache.org
>> >> >
>> >> >
>> >>
>> >> -
>> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> >> For additional commands, e-mail: users-h...@wicket.apache.org
>> >>
>> >>
>> >
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>
> _
> Windows Live™ SkyDrive™: Get 25 GB of free online storage.
> http://windowslive.com/online/skydrive?ocid=TXT_TAGLM_WL_SD_25GB_062009

-
To unsubscribe, e-m

Re: What already redirecting error?

2009-07-17 Thread Alex Objelean

Show us your code.

Alex Objelean


MartinM wrote:
> 
> At least I do not know of any such redirects...
> 
> **
> Martin
> 
> 2009/7/17 Igor Vaynberg :
>> you are triggering a redirect after something else has already done so.
>>
>> -igor
>>
>> On Fri, Jul 17, 2009 at 1:38 AM, Martin
>> Makundi wrote:
>>> Hi!
>>>
>>> What is this error and how can I avoid it? Don't even know why it comes:
>>>
>>> 2009-07-17 11:43:22,804 181242389 [btpool0-503] ERROR RequestCycle  -
>>> Already redirecting to '?wicket:interface=:0:9:::'. Cannot redirect
>>> more than once
>>> org.apache.wicket.WicketRuntimeException: Already redirecting to
>>> '?wicket:interface=:0:9:::'. Cannot redirect more than once
>>>       at
>>> org.apache.wicket.protocol.http.BufferedWebResponse.redirect(BufferedWebResponse.java:101)
>>>       at
>>> org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:257)
>>>       at
>>> org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:105)
>>>       at org.apache.wicket.RequestCycle.respond(RequestCycle.java:1258)
>>>       at org.apache.wicket.RequestCycle.step(RequestCycle.java:1325)
>>>       at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1419)
>>>       at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
>>>       at
>>> org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:456)
>>>       at
>>> org.apache.wicket.protocol.http.WicketServlet.doPost(WicketServlet.java:160)
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/What-already-redirecting-error--tp24530668p24538774.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: AutoCompleteTextField with initial focus not working

2009-07-17 Thread Mathias Nilsson

document.forms[0].elements.mytxt.focus();
-- 
View this message in context: 
http://www.nabble.com/AutoCompleteTextField-with-initial-focus-not-working-tp24516661p24537398.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: What already redirecting error?

2009-07-17 Thread Martin Makundi
At least I do not know of any such redirects...

**
Martin

2009/7/17 Igor Vaynberg :
> you are triggering a redirect after something else has already done so.
>
> -igor
>
> On Fri, Jul 17, 2009 at 1:38 AM, Martin
> Makundi wrote:
>> Hi!
>>
>> What is this error and how can I avoid it? Don't even know why it comes:
>>
>> 2009-07-17 11:43:22,804 181242389 [btpool0-503] ERROR RequestCycle  -
>> Already redirecting to '?wicket:interface=:0:9:::'. Cannot redirect
>> more than once
>> org.apache.wicket.WicketRuntimeException: Already redirecting to
>> '?wicket:interface=:0:9:::'. Cannot redirect more than once
>>       at 
>> org.apache.wicket.protocol.http.BufferedWebResponse.redirect(BufferedWebResponse.java:101)
>>       at 
>> org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:257)
>>       at 
>> org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:105)
>>       at org.apache.wicket.RequestCycle.respond(RequestCycle.java:1258)
>>       at org.apache.wicket.RequestCycle.step(RequestCycle.java:1325)
>>       at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1419)
>>       at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
>>       at 
>> org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:456)
>>       at 
>> org.apache.wicket.protocol.http.WicketServlet.doPost(WicketServlet.java:160)
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

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



Re: What already redirecting error?

2009-07-17 Thread Igor Vaynberg
you are triggering a redirect after something else has already done so.

-igor

On Fri, Jul 17, 2009 at 1:38 AM, Martin
Makundi wrote:
> Hi!
>
> What is this error and how can I avoid it? Don't even know why it comes:
>
> 2009-07-17 11:43:22,804 181242389 [btpool0-503] ERROR RequestCycle  -
> Already redirecting to '?wicket:interface=:0:9:::'. Cannot redirect
> more than once
> org.apache.wicket.WicketRuntimeException: Already redirecting to
> '?wicket:interface=:0:9:::'. Cannot redirect more than once
>       at 
> org.apache.wicket.protocol.http.BufferedWebResponse.redirect(BufferedWebResponse.java:101)
>       at 
> org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:257)
>       at 
> org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:105)
>       at org.apache.wicket.RequestCycle.respond(RequestCycle.java:1258)
>       at org.apache.wicket.RequestCycle.step(RequestCycle.java:1325)
>       at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1419)
>       at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
>       at 
> org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:456)
>       at 
> org.apache.wicket.protocol.http.WicketServlet.doPost(WicketServlet.java:160)
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

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



Re: Radio and Radio Group problems

2009-07-17 Thread Igor Vaynberg
where and how are you actually pulling out the selection?

-igor

On Fri, Jul 17, 2009 at 1:21 AM, Trojahn,
Cassia wrote:
> Igor Vaynberg wrote:
>>
>> where is your Form in your example?
>>
>> -igor
>>
>> On Thu, Jul 16, 2009 at 7:04 AM, Trojahn,
>> Cassia wrote:
>>
>>>
>>> Trojahn, Cassia wrote:
>>>

 Always the last of the list is the selected.
 I had tried also this proposal .. and it does not work.

 Michael O'Cleirigh wrote:

>
> Hello,
>
> I don't think you need to track the selected (true/false) state your
> self.  Let the radio group model do it automatically for you like:
>
> listLanguages.add(new NameWrapper("English", "en", "");
> listLanguages.add(new NameWrapper("German", "de", ""));
> listLanguages.add(new NameWrapper("French", "fr", ""));
> listLanguages.add(new NameWrapper("Italian", "it", "");
> listLanguages.add(new NameWrapper("Polish", "pl", "");
>
> // set the selected radio to be the first in the list 'English'
> final RadioGroup groupQuery = new RadioGroup("groupLanguagesQuery", new
> Model(listLanguages.get(0)));
> listLanguagesQuery = new ListView("listLanguagesQuery",listLanguages) {
>          protected void populateItem(ListItem item) {
>               String lang =
> ((NameWrapper)item.getModelObject()).getName();
>              item.add(new Label("nameLanguageQuery", new
> StringResourceModel(lang, this, null,"")));
>              item.add(new Radio("checkLanguageQuery",
> item.getModel(),groupQuery));
>          }
>      };
>
> groupQuery.add(listLanguagesQuery);
>
> Now the model object value of the RadioGroup 'groupQuery' will have the
> NameWrapper for the selected choice.  A NameWrapper instance is
> selected if
> it is returned by groupQuery.getModelObject();
>
> Regards,
>
> Mike
>
>>
>> I had tried this option and it does not work.
>>
>> Michael Mosmann wrote:
>>
>>>
>>> Hi,
>>>
>>> .. i am not sure. The model of RadioGroup should contain, wich item
>>> is
>>> selected. The model of Radio should reflect the associated value. So
>>> if
>>> model of RadioGroup contains "fr" and Property "selected" of item nr.
>>> 3
>>> is "fr" this Radio is selected.
>>>
>>> maybe this will help..
>>> mm:)
>>>
>>>
>>>

 I have a problem when using the Radio component.
 Using a list of languages, where each item is a NameWrapper object
 with a property "selected". The property "selected" is associated to
 the
 radio component.
 However, when presenting to the user the corresponding list of
 radios,
 the language Polish is true, and not English (it should be the
 selected
 option).

  listLanguages.add(new NameWrapper("English", "en", "", true));
  listLanguages.add(new NameWrapper("German", "de", "", false));
  listLanguages.add(new NameWrapper("French", "fr", "", false));
  listLanguages.add(new NameWrapper("Italian", "it", "", false));
  listLanguages.add(new NameWrapper("Polish", "pl", "", false));

  final RadioGroup groupQuery = new RadioGroup("groupLanguagesQuery",
 new Model());
  listLanguagesQuery = new
 ListView("listLanguagesQuery",listLanguages)
 {
           protected void populateItem(ListItem item) {
                String lang =
 ((NameWrapper)item.getModelObject()).getName();
               item.add(new Label("nameLanguageQuery", new
 StringResourceModel(lang, this, null,"")));
               item.add(new Radio("checkLanguageQuery", new
 PropertyModel(item.getModel(), "selected"),groupQuery));
           }
       };
 groupQuery.add(listLanguagesQuery);

 Any ideas? I really need to solve this issue.

 Thank you so much.


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

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


>>>
>>> I send the code of the application.
>>> if someone can help me 
>>>
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>

Re: AutoCompleteTextField with initial focus not working

2009-07-17 Thread Igor Vaynberg
i dont think that invokes the onfocus() handler, you might have to
call it manually yourself.

-igor

On Fri, Jul 17, 2009 at 1:18 AM, Marieke Vandamme  wrote:
>
> document.getElementById('mytxt').focus();
>
>
> igor.vaynberg wrote:
> >
> > how are you setting the initial focus?
> >
> > -igor
> >
> > On Thu, Jul 16, 2009 at 6:45 AM, Marieke
> > Vandamme wrote:
> >> Hello,
> >>
> >> I have AutoCompleteTextField which has the focus when my page is loaded.
> >> When I just start typing (because the field has initial focus), then no
> >> list is shown.
> >> If I leave the field and then click in it again (loosing focus and then
> >> gaining it again), the list is shown.
> >>
> >> Can somebody help me with this or is it a bug?
> >> Many thanks in advance! Marieke.
> >>  DISCLAIMER 
> >>  http://www.tvh.be/newen/pages/emaildisclaimer.html
> >> http://www.tvh.be/newen/pages/emaildisclaimer.html
> >>
> >> "This message is delivered to all addressees subject to the conditions
> >> set forth in the attached disclaimer, which is an integral part of this
> >> message."
> >>
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
> >
>
> --
> View this message in context: 
> http://www.nabble.com/AutoCompleteTextField-with-initial-focus-not-working-tp24516661p24530409.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>

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



Re: override isEnabledInHierarchy?

2009-07-17 Thread Martin Makundi
Yes, you could do it another way. Make each component that you want to
enable/disable like this:
form.add(new xxxFormComponent("id") {
  @Override
  isEnabled() {
 return your logic here;
  }
});

2009/7/17 Steve Lowery :
> I would like to build a simple form whose markup looks like the
> following:
>
>
>
> 
>
>       
>
>              
>
>                     
>
>                           
>
>                                  [Label]
>
>                                   wicket:id="editLink">[edit]
>
>                           
>
>                     
>
>                     
>
>                           
>
>                                  [attr1]
>
>                                   wicket:id="attr1"/>
>
>                           
>
>                           
>
>                                  [attr2]
>
>                                   wicket:id="longitude"/>
>
>                           
>
>                     
>
>                     
>
>                           
>
>                                  
>
>                                          wicket:id="submit">[submit]
>
>                                          wicket:id="cancel">[cancel]
>
>                                  
>
>                           
>
>                     
>
>              
>
>       
>
> 
>
>
>
> I call setEnabled(false) on the Form when it is constructed which makes
> its FormComponents disabled making a "read only" version of the form.
> I'd then like the editLink.onClick() to enable the form, which will
> enable it's components.  However, since the editLink is a child of the
> Form which is initially disabled, that link is disabled.  I am looking
> for a way to not have the link be disabled eventhough the form it is in
> is disabled.  My thought was for that link, I could override
> isEnabledInHierarchy() to just negate the value returned by super (if
> the form is disabled the link is enabled and vice versa), but that
> method is final, so no can do.
>
>
>
> Is anyone aware of another way I could go about doing this?  I know I
> could create a wicket component on say the tbody element and have it be
> disabled, but then the link would have to be passed which element(s) it
> needs to enable when clicked and I was hoping to just be able to use the
> hierarchy so I can make the EditLink a reusable component since this is
> a very common use case for us (having read only forms that become
> editable with a click).
>
>
>
> Thanks in advance!
>
> Steve
>
>

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



Re: Customizing signinpanel

2009-07-17 Thread Mathias Nilsson

Just extends the SignInPanel and provide your own markup and properties
-- 
View this message in context: 
http://www.nabble.com/Customizing-signinpanel-tp24535148p24536526.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: wicketstuff tinymce for Wicket 1.3.5/6

2009-07-17 Thread Jeremy Thomerson
You have to build yourself.  Most of the wicketstuff projects were not
built with release numbers prior to 1.4 / the wicketstuff-core work.

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




On Fri, Jul 17, 2009 at 4:53 AM, Steve
Swinsburg wrote:
> Hi all,
>
> What's the version of TinyMCE from wicketstuff thats recommended for 1.3.5
> or 1.3.6? I only see 1.3-SNAPSHOT in the Maven repo but am not too keen on
> putting a SNAPSHOT jar into production.
>
> 
>        org.wicketstuff
>        wicket-contrib-tinymce
>        1.3-SNAPSHOT
> 
>
> Thanks,
> Steve

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



Re: IModel parameters of StringResourceModel not getting detached

2009-07-17 Thread Johan Compagner
please make a jira issue for this
The detach of StringResourcemodel should walk over its param to check if it
is a model and call detach on those.

On Fri, Jul 17, 2009 at 10:44, Jonas  wrote:

> A question about StringResourceModel: it supports IModels in the
> 'parameters' Object[] that
> are properly handled in StringResourceModel#getString, meaning they
> could get attached because
> of StringResourceModel. Shouldn't it also be the StringResourceModel's
> responsibility to properly
> detach them (from #onDetach)?
>
> Who's in general responsible to detach an IModel, specially those who
> aren't a Component's
> 'default' IModel? Is that correct that any code that calls
> IModel#getObject() should also
> call IModel#detach() later in the same request?
>
> cheers,
> Jonas
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: How to Hidden/Disabled Wicket tree with implementation wicket security

2009-07-17 Thread Warren Bell

Your hive should have something like this with whatever actions you want:

permission ${ComponentPermission} 
"${MyPage}:myPanel:myForm:myWebMarkupContainer", "inherit, render, enable";


And also secure anything in the container like buttons:

permission ${ComponentPermission} 
"${MyPage}:myPanel:myForm:myWebMarkupContainer:myButton", "inherit, 
render, enable";


I seem to remember a similar problem that I had. It involved the way I 
used a WebMarkupContainer, a form and a panel. I messed around with how 
I nested the different components and I got it to work. Go figure?


Warren

Rizal Indra wrote:

Thanks for quick reply Warren,
exactly my code SecureWebMarkupContainer.java is same as with your code.
But its still not working. 
I am newbie in java wicket, so i need more example/hint for understanding its. I am sure that missing something but i dont know how to solve it.


Can anyone help me? thanks 




--- Pada Kam, 16/7/09, Warren Bell  menulis:

  

Dari: Warren Bell 
Judul: Re: How to Hidden/Disabled Wicket tree with implementation wicket 
security
Kepada: users@wicket.apache.org, bujang_kuan...@yahoo.com
Tanggal: Kamis, 16 Juli, 2009, 11:09 AM
Try this:

Warren

public class SecureWebMarkupContainer extends
WebMarkupContainer implements ISecureComponent {

   public SecureWebMarkupContainer(String
id)
   {
super(id);

   setSecurityCheck(new
ComponentSecurityCheck(this));
   }
 public
SecureWebMarkupContainer(String id, IModel model)
   {
   super(id, model);
   setSecurityCheck(new
ComponentSecurityCheck(this));
   }
 public final void
setSecurityCheck(ISecurityCheck check)
   {
   
   SecureComponentHelper.setSecurityCheck(this,

check);
   }

   public final ISecurityCheck
getSecurityCheck()
   {
   return
SecureComponentHelper.getSecurityCheck(this);
   }

   public boolean isActionAuthorized(String
action)
   {
   return
SecureComponentHelper.isActionAuthorized(this, action);
   }

   public boolean
isActionAuthorized(WaspAction action)
   {
   return
SecureComponentHelper.isActionAuthorized(this, action);
   }

   public boolean isAuthenticated()
   {
   return
SecureComponentHelper.isAuthenticated(this);
   }
 public boolean
isAuthenticatedAndAuthorized(String action)
   {
   return isAuthenticated()
&& isActionAuthorized(action);
   }

{


Rizal Indra wrote:


Hi,
I have created my welcome page with menu tree 
(http://wicketstuff.org/wicket13/nested/ ). I want to
  

hide/disabled some item menu depend on user right
principal.


I have try put some tricks but not work :-)
MyTree.java
public class MyTree extends Tree {
@Override
 protected void
  

populateTreeItem(WebMarkupContainer item, int level) {

 
  

   System.out.println(" getting
populateTreeItem...");

 
  

   super.populateTreeItem(item, level);


 final TreeNode
  

node = (TreeNode)item.getModelObject();


 MarkupContainer
  

nodeLink =  newNodeLink(item, "nodeLink", node);

 
  

   SecureWebMarkupContainer swmc = new
SecureWebMarkupContainer("hiddenMenu");

 
  

   swmc.add(nodeLink);

 
  

   //item.add(nodeLink);


 item.add(swmc);
 }
}

SecureWebMarkupContainer.java
public class SecureWebMarkupContainer extends
  

WebMarkupContainer implements ISecureComponent {


...
}

can anyone give some example/advice how to make it
  
work. thanks 


   Pemanasan global? Apa
  

sih itu? Temukan jawabannya di Yahoo! Answers! http://id.answers.yahoo.com

  

-


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

  

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






  Berbagi foto Flickr dengan teman di dalam Messenger. Jelajahi Yahoo! 
Messenger yang serba baru sekarang! http://id.messenger.yahoo.com
  



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



override isEnabledInHierarchy?

2009-07-17 Thread Steve Lowery
I would like to build a simple form whose markup looks like the
following:

 



   

  

 

   

  [Label]

  [edit]

   

 

 

   

  [attr1]

  

   

   

  [attr2]

  

   

 

 

   

  

 [submit]

 [cancel]

  

   

 

  

   



 

I call setEnabled(false) on the Form when it is constructed which makes
its FormComponents disabled making a "read only" version of the form.
I'd then like the editLink.onClick() to enable the form, which will
enable it's components.  However, since the editLink is a child of the
Form which is initially disabled, that link is disabled.  I am looking
for a way to not have the link be disabled eventhough the form it is in
is disabled.  My thought was for that link, I could override
isEnabledInHierarchy() to just negate the value returned by super (if
the form is disabled the link is enabled and vice versa), but that
method is final, so no can do.

 

Is anyone aware of another way I could go about doing this?  I know I
could create a wicket component on say the tbody element and have it be
disabled, but then the link would have to be passed which element(s) it
needs to enable when clicked and I was hoping to just be able to use the
hierarchy so I can make the EditLink a reusable component since this is
a very common use case for us (having read only forms that become
editable with a click).

 

Thanks in advance!

Steve



Re: PropertyModel doesnt update bean

2009-07-17 Thread Serkan Camurcuoglu

you should use a form and an ajaxsubmitlink instead of a normal ajaxlink..



Wadi Jalil Maluf wrote:

Hi all,

I have a UserBean and I created a propertyModel for that
bean so when a TextField text is modified the property name of the UserBean
updates. I use this in a model windows, added a link so when it clicks I use
the value from the textfield but the value is always null. Should I use a
form?How can I solve or read about this? Cause everywhere I see
documentation seems that should work the way I did it.




userBean=new UserBean();

final PropertyModel messageModel = new
PropertyModel(userBean,"name");

 


textField=new TextField("msg",messageModel);




add(new AjaxLink("Save")

{

public void onClick(AjaxRequestTarget target)

{

modal.close(target);

java.lang.String user = userBean.getName();//this is null

 


}

}

 


Any help would be appreciated , thanks,

Wadi


  



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



Customizing signinpanel

2009-07-17 Thread Ed _


Hi,

I am using the SignInPanel - was wondering if there is a way to customize the 
labels of the fields - like change the "username" to just "name" and "password" 
to "key". 

Also what is the Reset functionality - is there a way to get rid of that button 
too. 

thanks,

Ed

_
Lauren found her dream laptop. Find the PC that’s right for you.
http://www.microsoft.com/windows/choosepc/?ocid=ftp_val_wl_290

PropertyModel doesnt update bean

2009-07-17 Thread Wadi Jalil Maluf
Hi all,

I have a UserBean and I created a propertyModel for that
bean so when a TextField text is modified the property name of the UserBean
updates. I use this in a model windows, added a link so when it clicks I use
the value from the textfield but the value is always null. Should I use a
form?How can I solve or read about this? Cause everywhere I see
documentation seems that should work the way I did it.



userBean=new UserBean();

final PropertyModel messageModel = new
PropertyModel(userBean,"name");

 

textField=new TextField("msg",messageModel);



add(new AjaxLink("Save")

{

public void onClick(AjaxRequestTarget target)

{

modal.close(target);

java.lang.String user = userBean.getName();//this is null

 

}

}

 

Any help would be appreciated , thanks,

Wadi



Re: how to Get Context path

2009-07-17 Thread Linda van der Pal

Per,

Look at the reply he gave me to that same question.

Linda

Per Newgro wrote:

Gerald Fernando schrieb:

Hello Friends,
how to get the context path of current class

Thanks&Regards,
Gerald A

  
Can you please explain what you mean with "context path of current 
class"?


Cheers
Per

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



No virus found in this incoming message.
Checked by AVG - www.avg.com 
Version: 8.5.375 / Virus Database: 270.13.18/2243 - Release Date: 07/17/09 06:08:00


  



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



Re: how to Get Context path

2009-07-17 Thread Per Newgro

Gerald Fernando schrieb:

Hello Friends,
how to get the context path of current class

Thanks&Regards,
Gerald A

  

Can you please explain what you mean with "context path of current class"?

Cheers
Per

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



AW: How to get context path of Application

2009-07-17 Thread Tokalak Ahmet
To locate the file use MyClass.class.getResource()





Von: Gerald Fernando 
An: users@wicket.apache.org
Gesendet: Freitag, den 17. Juli 2009, 12:50:39 Uhr
Betreff: Re: How to get context path of Application

if i do this webRequest cannot be resolved to a type and RequestCycle cannot
be resolved what can i do

Thanks&Regards,
Gerald A

On Fri, Jul 17, 2009 at 2:53 PM, Linda van der Pal <
lvd...@heritageagenturen.nl> wrote:

> Well I guess Alex already gave the answer.
>
>
>> ((WebRequest)RequestCycle.get().getRequest()).getHttpServletRequest().getContextPath()
>>
>
> Alex Objelean
>>
>
>
> Linda
>
>
> Gerald Fernando wrote:
>
>> Hi Linda,
>> Actually my page need to call a XML file.I have stored that file in my web
>> content .error shows that the system could not find the file.but i give a
>> absolute path it is working so i need to get my tomcat path to access that
>> file.
>> How can i access that file?Is there any other way.
>> am expecting your reply urgent.
>>
>> Thanks®ards,
>> Gerald A
>>
>> On Fri, Jul 17, 2009 at 1:12 PM, Linda van der Pal <
>> lvd...@heritageagenturen.nl> wrote:
>>
>>
>>
>>> What is it exactly you are trying to do?
>>>
>>> Linda
>>>
>>> Gerald Fernando wrote:
>>>
>>>
>>>
  How to get context path of Application

 Thanks7Regards,
 Gerald A


  


 No virus found in this incoming message.
 Checked by AVG - www.avg.com Version: 8.5.375 / Virus Database:
 270.13.17/2242 - Release Date: 07/16/09 18:00:00





>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>>
>>>
>>>
>>
>>  
>>
>>
>> No virus found in this incoming message.
>> Checked by AVG - www.avg.com Version: 8.5.375 / Virus Database:
>> 270.13.17/2242 - Release Date: 07/16/09 18:00:00
>>
>>
>>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>



  

RE: Validation component feedback in table column

2009-07-17 Thread Kenneth NA

I have already added one ComponentFeedbackPanel in the populateItem() method

final ComponentFeedbackPanel tfFeedback = new 
ComponentFeedbackPanel("tfFeedback", tf);
tfFeedback.setOutputMarkupId(true);
item.add(tfFeedback);


and if I also add the suggested code in the validator in method 
onValidate(IValidatable validatable) when the validation fails, I get the 
following error:


WicketMessage: The component(s) below failed to render. A common problem is 
that you have added a component in code but forgot to reference it in the 
markup (thus the component will never be rendered).
1. [MarkupContainer [Component id = tfFeedback]]
2. [MarkupContainer [Component id = feedbackul]]
3. [MarkupContainer [Component id = messages]]
4. [MarkupContainer [Component id = 0]]
5. [Component id = message]

...

 

So, I still wonder, have can I solve this problem?

 

/Kenneth
 
> From: russellsimpk...@hotmail.com
> To: users@wicket.apache.org
> Subject: RE: Validation component feedback in table column
> Date: Fri, 17 Jul 2009 06:03:35 -0400
> 
> 
> Use the ComponentFeedbackPanel, 
> ccFeedback = new ComponentFeedbackPanel("ccNumberError",ccNumber);
> ccFeedback.setOutputMarkupId(true);
> addOrReplace(ccFeedback);then you can do this:
> 
> 
> From: rinoc...@live.se
> To: users@wicket.apache.org
> Subject: Validation component feedback in table column
> Date: Fri, 17 Jul 2009 10:34:19 +0200
> 
> 
> 
> 
> 
> 
> 
> 
> I have been experimenting with this for while more, but I can't seem to get 
> it to work as I want.
> 
> I have attached a small quickstart.
> 
> I have a table with an input field on each row, where I want to validate that 
> the entered input value should not be allowed to be more than the displayed 
> value, in that case, a message should be displayed next to the field, in the 
> table.
> 
> I have added an onblur event to the input field and also a validator.
> 
> If I enter a value above the limit and tab out of the field, the validation 
> message is displayed next to the field. If I instead enter a errornous value 
> an click the submit button, the error message(s) is displayed in the form 
> feeback and not next to the field. How do I get the validation error to be 
> displayed next to the field?
> 
> 
> 
> I have been reading alot of examples, javadoc and source now and can't get it 
> to work the wy I want.
> I wonder how I change my code to get it to work?
> 
> 
> 
> /Kenneth
> 
> > Date: Sat, 11 Jul 2009 22:09:32 -0500
> > Subject: Re: Validation and component feedback for editable column 
> > component in table/list
> > From: jer...@wickettraining.com
> > To: users@wicket.apache.org
> > 
> > Seems like you might be missing the part where you have to add a
> > feedback panel to display the error messages in a form. Since you
> > mention that your previous application showed the message near the
> > field, this page might help you:
> > 
> > http://stuq.nl/weblog/2008-09-03/user-friendly-form-validation-with-wicket
> > 
> > --
> > Jeremy Thomerson
> > http://www.wickettraining.com
> > 
> > 
> > 
> 
> Gör personlighetstestet på MSN Dejting, se vem du passar ihop med! MSN Dejting
> _
> Windows Live™ SkyDrive™: Get 25 GB of free online storage.
> http://windowslive.com/online/skydrive?ocid=TXT_TAGLM_WL_SD_25GB_062009

_
Hitta kärleken nu i vår!
http://dejting.se.msn.com/channel/index.aspx?trackingid=1002952

Re: How to get context path of Application

2009-07-17 Thread Gerald Fernando
if i do this webRequest cannot be resolved to a type and RequestCycle cannot
be resolved what can i do

Thanks&Regards,
Gerald A

On Fri, Jul 17, 2009 at 2:53 PM, Linda van der Pal <
lvd...@heritageagenturen.nl> wrote:

> Well I guess Alex already gave the answer.
>
>
>> ((WebRequest)RequestCycle.get().getRequest()).getHttpServletRequest().getContextPath()
>>
>
> Alex Objelean
>>
>
>
> Linda
>
>
> Gerald Fernando wrote:
>
>> Hi Linda,
>> Actually my page need to call a XML file.I have stored that file in my web
>> content .error shows that the system could not find the file.but i give a
>> absolute path it is working so i need to get my tomcat path to access that
>> file.
>> How can i access that file?Is there any other way.
>> am expecting your reply urgent.
>>
>> Thanks®ards,
>> Gerald A
>>
>> On Fri, Jul 17, 2009 at 1:12 PM, Linda van der Pal <
>> lvd...@heritageagenturen.nl> wrote:
>>
>>
>>
>>> What is it exactly you are trying to do?
>>>
>>> Linda
>>>
>>> Gerald Fernando wrote:
>>>
>>>
>>>
  How to get context path of Application

 Thanks7Regards,
 Gerald A


  


 No virus found in this incoming message.
 Checked by AVG - www.avg.com Version: 8.5.375 / Virus Database:
 270.13.17/2242 - Release Date: 07/16/09 18:00:00





>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>>
>>>
>>>
>>
>>  
>>
>>
>> No virus found in this incoming message.
>> Checked by AVG - www.avg.com Version: 8.5.375 / Virus Database:
>> 270.13.17/2242 - Release Date: 07/16/09 18:00:00
>>
>>
>>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


AW: Background-Thread blocking Wicket-App

2009-07-17 Thread Tokalak Ahmet
Thanks you and Jonas for the feedbacks.

You reminded me of the kind of usage of the Connection object. On first request 
after the application has started, a permanent connection is established and 
used by all following requests.
I've forgotten to change this after the first development steps :-(  
Thank you for reminding me of this.
The code looks like:

public class ConnectionFactory {
private static Connection conn = null;
   
private ConnectionFactory() {
}

public static Connection getConnection() throws Exception {
if (conn == null) {
...
conn = DriverManager.getConnection(url, user, password);
}

return conn;
}
}









Von: Russell Simpkins 
An: users@wicket.apache.org
Gesendet: Freitag, den 17. Juli 2009, 12:15:06 Uhr
Betreff: RE: Background-Thread blocking Wicket-App


Running a thread should not block the entire application - are you using 
connection pooling with more than one max active connection? Maybe you should 
send the code you use to kick off the thread. If you have any code that is 
synchronized on a shared resource, that might block others.
Russ


> Date: Fri, 17 Jul 2009 09:24:10 +
> From: toka...@yahoo.de
> Subject: Background-Thread blocking Wicket-App
> To: users@wicket.apache.org
> 
> Hi All,
> 
> we've got a page which does time consuming tasks. 
> Because of that, every time a user calls the page a new background-thread is 
> started (only if not running already) and 
> the user is informed that the task is running and the page will be updated 
> with fresh data as quickly as the thread has finished.
> 
> We've realized that the WHOLE application is blocked until the 
> background-thread finishes. That is no other page can be called
> by the user who has started the thraed. The app is also not responding to 
> other users as long as the thread is running.
> 
> The background thread class i'm using is a simple thread extending the thread 
> class and retrieving data from a very very big database in its run method.
> 
> I'm using Wicket 1.3.5 on Tomcat6.0.18
> 
> Any ideas?
> 
> 
>  

_
Hotmail® has ever-growing storage! Don’t worry about storage limits. 
http://windowslive.com/Tutorial/Hotmail/Storage?ocid=TXT_TAGLM_WL_HM_Tutorial_Storage_062009


  

RE: Background-Thread blocking Wicket-App

2009-07-17 Thread Russell Simpkins

Running a thread should not block the entire application - are you using 
connection pooling with more than one max active connection? Maybe you should 
send the code you use to kick off the thread. If you have any code that is 
synchronized on a shared resource, that might block others.
Russ


> Date: Fri, 17 Jul 2009 09:24:10 +
> From: toka...@yahoo.de
> Subject: Background-Thread blocking Wicket-App
> To: users@wicket.apache.org
> 
> Hi All,
> 
> we've got a page which does time consuming tasks. 
> Because of that, every time a user calls the page a new background-thread is 
> started (only if not running already) and 
> the user is informed that the task is running and the page will be updated 
> with fresh data as quickly as the thread has finished.
> 
> We've realized that the WHOLE application is blocked until the 
> background-thread finishes. That is no other page can be called
> by the user who has started the thraed. The app is also not responding to 
> other users as long as the thread is running.
> 
> The background thread class i'm using is a simple thread extending the thread 
> class and retrieving data from a very very big database in its run method.
> 
> I'm using Wicket 1.3.5 on Tomcat6.0.18
> 
> Any ideas?
> 
> 
>   

_
Hotmail® has ever-growing storage! Don’t worry about storage limits. 
http://windowslive.com/Tutorial/Hotmail/Storage?ocid=TXT_TAGLM_WL_HM_Tutorial_Storage_062009

RE: Not working AjaxFormSubmitBehavior in Tomcat behind HTTP Server

2009-07-17 Thread Russell Simpkins

Actually,
"If" you sub domain your apps, then they can all be ROOT.war e.g. 
app1.myhost.com vs myhost.com/app1 - look at doing virtual hosts in tomcat if 
interested.
Russ

> Date: Fri, 17 Jul 2009 13:29:35 +0800
> Subject: Re: Not working AjaxFormSubmitBehavior in Tomcat behind HTTP Server
> From: anton.veretenni...@gmail.com
> To: users@wicket.apache.org
> 
> Igor, I have several applications working on one server. They can't
> all be ROOT.war.
> 
> -- Tony
> 
> On Fri, Jul 17, 2009 at 11:40 AM, Igor Vaynberg 
> wrote:
> > rename it to ROOT.war
> >
> > -igor
> >
> > On Thu, Jul 16, 2009 at 7:00 PM, Anton Veretennikov <
> > anton.veretenni...@gmail.com> wrote:
> >
> >> Thank you, Igor, for your suggestion.
> >>
> >> I need full hiding of app name. Renaming still creates additional path
> >> in url like http://sitename.com/AppName/
> >>
> >> May be there exists other way or my URL Rewriting is not correct:
> >>
> >> 
> >>  ServerName www.sitename.com
> >>  ServerAlias sitename.com
> >>  ProxyPass / ajp://127.0.0.1:8009/AppName/
> >>  ProxyPassReverse / ajp://127.0.0.1:8009/AppName/
> >>  ProxyPassReverseCookieDomainlocalhost  sitename.com
> >>  ProxyPassReverseCookiePath /AppName /
> >>  RewriteEngine  on
> >>  RewriteRule^/AppName/(.*)$  /$1  [R]
> >> 
> >>
> >> -- Tony
> >>
> >> On Fri, Jul 17, 2009 at 12:15 AM, Igor Vaynberg
> >> wrote:
> >> > just rename your war to something else before deploying it.
> >> >
> >> > -igor
> >> >
> >> > On Thu, Jul 16, 2009 at 8:25 AM, Anton
> >> > Veretennikov wrote:
> >> >> Hello, wicket users and developers,
> >> >>
> >> >> This is a problem I can't work out myself, I need your help.
> >> >>
> >> >> In a local environment (direct calls to Tomcat) AjaxFormSubmitBehavior
> >> >> works as expected.
> >> >> But in production I try to hide application name (let's say,
> >> >> AppNamePay-1.0-SNAPSHOT) from URL using RewriteRule.
> >> >>
> >> >> Logs show that somehow application name bobs up when I create a link
> >> >> with AjaxFormSubmitBehavior.
> >> >> This can be seen from httpd logs (302 status):
> >> >>
> >> >> xx.22.151.6 - - [16/Jul/2009:14:14:30 +] "GET
> >> >> /AppNamePay-1.0-SNAPSHOT/?wicket:interface=:0:5::: HTTP/1.1" 302 312
> >> >> "http://sitename.com/?wicket:interface=:0:4:::"; "Mozilla/5.0 (Windows;
> >> >> U; Windows NT 5.1; ru; rv:1.9.0.6) Gecko/2009011913 Firefox/3.0.6"
> >> >>
> >> >> And from catched calls using HttpFox:
> >> >>
> >> >> GET 302 Redirect to:
> >> >> http://sitename.com/AppNamePay-1.0-SNAPSHOT/?wicket:interface=:0:3:::
> >> http://sitename.com
> >> >>
> >> /?wicket:interface=:0:outterDiv:leftPanel:content:updatableDiv:hidableDiv:electronicUpdatable:list:0:item:border:switch:buttons2:acceptSum:2:ILinkListener::
> >> >> (Status-Line)   HTTP/1.1 302 Moved Temporarily
> >> >> GET 302 Redirect to:
> >> >> http://sitename.com/?wicket:interface=:0:3:::
> >> http://sitename.com/AppNamePay-1.0-SNAPSHOT/?wicket:interface=:0:3:::
> >> >> (Status-Line)   HTTP/1.1 302 Found
> >> >>
> >> >> How it could be that wicket knows about AppNamePay-1.0-SNAPSHOT?
> >> >> Other Ajax stuff seems working without problem.
> >> >>
> >> >> Wicket is 1.4-rc7
> >> >>
> >> >> --Tony
> >> >>
> >> >> -
> >> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >> >> For additional commands, e-mail: users-h...@wicket.apache.org
> >> >>
> >> >>
> >> >
> >> > -
> >> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >> > For additional commands, e-mail: users-h...@wicket.apache.org
> >> >
> >> >
> >>
> >> -
> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >> For additional commands, e-mail: users-h...@wicket.apache.org
> >>
> >>
> >
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 

_
Windows Live™ SkyDrive™: Get 25 GB of free online storage.
http://windowslive.com/online/skydrive?ocid=TXT_TAGLM_WL_SD_25GB_062009

RE: Validation component feedback in table column

2009-07-17 Thread Russell Simpkins

Use the ComponentFeedbackPanel, 
ccFeedback = new ComponentFeedbackPanel("ccNumberError",ccNumber);
ccFeedback.setOutputMarkupId(true);
addOrReplace(ccFeedback);then you can do this:


From: rinoc...@live.se
To: users@wicket.apache.org
Subject: Validation component feedback in table column
Date: Fri, 17 Jul 2009 10:34:19 +0200








I have been experimenting with this for while more, but I can't seem to get it 
to work as I want.

I have attached a small quickstart.

I have a table with an input field on each row, where I want to validate that 
the entered input value should not be allowed to be more than the displayed 
value, in that case, a message should be displayed next to the field, in the 
table.

I have added an onblur event to the input field and also a validator.

If I enter a value above the limit and tab out of the field, the validation 
message is displayed next to the field. If I instead enter a errornous value an 
click the submit button, the error message(s) is displayed in the form feeback 
and not next to the field. How do I get the validation error to be displayed 
next to the field?

 

I have been reading alot of examples, javadoc and source now and can't get it 
to work the wy I want.
I wonder how I change my code to get it to work?

 

/Kenneth
 
> Date: Sat, 11 Jul 2009 22:09:32 -0500
> Subject: Re: Validation and component feedback for editable column component 
> in table/list
> From: jer...@wickettraining.com
> To: users@wicket.apache.org
> 
> Seems like you might be missing the part where you have to add a
> feedback panel to display the error messages in a form. Since you
> mention that your previous application showed the message near the
> field, this page might help you:
> 
> http://stuq.nl/weblog/2008-09-03/user-friendly-form-validation-with-wicket
> 
> --
> Jeremy Thomerson
> http://www.wickettraining.com
> 
> 
> 

Gör personlighetstestet på MSN Dejting, se vem du passar ihop med! MSN Dejting
_
Windows Live™ SkyDrive™: Get 25 GB of free online storage.
http://windowslive.com/online/skydrive?ocid=TXT_TAGLM_WL_SD_25GB_062009

wicketstuff tinymce for Wicket 1.3.5/6

2009-07-17 Thread Steve Swinsburg

Hi all,

What's the version of TinyMCE from wicketstuff thats recommended for  
1.3.5 or 1.3.6? I only see 1.3-SNAPSHOT in the Maven repo but am not  
too keen on putting a SNAPSHOT jar into production.



org.wicketstuff
wicket-contrib-tinymce
1.3-SNAPSHOT


Thanks,
Steve

Re: Background-Thread blocking Wicket-App

2009-07-17 Thread Jonas
Sounds like your background thread is holding a lock that is also
acquired during page rendering. Maybe you can find
out which lock is contended by creating a thread dump using visualvm
or jstack from jdk 1.6


On Fri, Jul 17, 2009 at 11:24 AM, Tokalak Ahmet wrote:
> Hi All,
>
> we've got a page which does time consuming tasks.
> Because of that, every time a user calls the page a new background-thread is 
> started (only if not running already) and
> the user is informed that the task is running and the page will be updated 
> with fresh data as quickly as the thread has finished.
>
> We've realized that the WHOLE application is blocked until the 
> background-thread finishes. That is no other page can be called
> by the user who has started the thraed. The app is also not responding to 
> other users as long as the thread is running.
>
> The background thread class i'm using is a simple thread extending the thread 
> class and retrieving data from a very very big database in its run method.
>
> I'm using Wicket 1.3.5 on Tomcat6.0.18
>
> Any ideas?
>
>
>

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



Re: Anybody know what is this situation?

2009-07-17 Thread Michał Letyński
I got the same error. It's also totally random. But i have a bit 
different situation.
In my page i have panel, inside this panel i got panel which is 
anonymous class and inside of this panel is InlineFrame with Page.

Any clues how to solve this ?


Jeremy Thomerson pisze:

Generally unexplained class issues like this are because the same
class gets loaded a second time from a different class loader.  I once
had it throwing a ClassCastException that ClassA != ClassA.  Hard to
track down, though.

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




On Fri, Jul 3, 2009 at 4:27 PM, bgooren wrote:
  

I got the same error today, seems totally random.

The only possible explanation I have is that maybe the subclass (LoginPage$1
in your case) stores a PageHolder class instead of the actual page
(LoginPage) when serialized, and when LoginPage$1 is deserialized, the
PageHolder retrieves/points to a different Page.

I was just as baffled as you since in my case the two classes were totally
different, like in your case (com.application.MainPage vs
wicket.quickstart.LoginPage).
In my case it's two pages from the same application, but they are
functionally separate and never interact.

In my case I made the inner class that caused the problem a static inner
class. Since I have been unable to reproduce the problem I cannot confirm if
this resolves the problem.

Can you share what kind of class LoginPage$1 is? (it's the first anonymous
inner class in LoginPage) Is it a class which extends IModel?

Also, you someone from the Wicket team confirm if my explanation above is
possible at all (PageHolder retrieving a different class when
deserializing)?

Bas


MartinM wrote:


Anybody know what is this situation? Wicket 1.4-rc4

From production:

2009-05-18 16:32:44,316 19598423 [btpool0-112] ERROR RequestCycle  -
cannot assign instance of com.application.MainPage to field
wicket.quickstart.LoginPage$1.this$0 of type
wicket.quickstart.LoginPage in instance of
wicket.quickstart.LoginPage$1
java.lang.ClassCastException: cannot assign instance of
com.application.MainPage to field wicket.quickstart.LoginPage$1.this$0
of type wicket.quickstart.LoginPage in instance of
wicket.quickstart.LoginPage$1
   at
java.io.ObjectStreamClass$FieldReflector.setObjFieldValues(ObjectStreamClass.java:2032)
   at
java.io.ObjectStreamClass.setObjFieldValues(ObjectStreamClass.java:1212)

.. etc ...

  

--
View this message in context: 
http://www.nabble.com/Anybody-know-what-is-this-situation--tp23597800p24329006.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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





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


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



Background-Thread blocking Wicket-App

2009-07-17 Thread Tokalak Ahmet
Hi All,

we've got a page which does time consuming tasks. 
Because of that, every time a user calls the page a new background-thread is 
started (only if not running already) and 
the user is informed that the task is running and the page will be updated with 
fresh data as quickly as the thread has finished.

We've realized that the WHOLE application is blocked until the 
background-thread finishes. That is no other page can be called
by the user who has started the thraed. The app is also not responding to other 
users as long as the thread is running.

The background thread class i'm using is a simple thread extending the thread 
class and retrieving data from a very very big database in its run method.

I'm using Wicket 1.3.5 on Tomcat6.0.18

Any ideas?


  

Re: How to get context path of Application

2009-07-17 Thread Linda van der Pal

Well I guess Alex already gave the answer.


((WebRequest)RequestCycle.get().getRequest()).getHttpServletRequest().getContextPath()



Alex Objelean



Linda

Gerald Fernando wrote:

Hi Linda,
Actually my page need to call a XML file.I have stored that file in my web
content .error shows that the system could not find the file.but i give a
absolute path it is working so i need to get my tomcat path to access that
file.
How can i access that file?Is there any other way.
am expecting your reply urgent.

Thanks®ards,
Gerald A

On Fri, Jul 17, 2009 at 1:12 PM, Linda van der Pal <
lvd...@heritageagenturen.nl> wrote:

  

What is it exactly you are trying to do?

Linda

Gerald Fernando wrote:



 How to get context path of Application

Thanks7Regards,
Gerald A

 


No virus found in this incoming message.
Checked by AVG - www.avg.com Version: 8.5.375 / Virus Database:
270.13.17/2242 - Release Date: 07/16/09 18:00:00



  

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





  




No virus found in this incoming message.
Checked by AVG - www.avg.com 
Version: 8.5.375 / Virus Database: 270.13.17/2242 - Release Date: 07/16/09 18:00:00


  



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



Re: How to get context path of Application

2009-07-17 Thread Gerald Fernando
Hi Linda,
Actually my page need to call a XML file.I have stored that file in my web
content .error shows that the system could not find the file.but i give a
absolute path it is working so i need to get my tomcat path to access that
file.
How can i access that file?Is there any other way.
am expecting your reply urgent.

Thanks®ards,
Gerald A

On Fri, Jul 17, 2009 at 1:12 PM, Linda van der Pal <
lvd...@heritageagenturen.nl> wrote:

> What is it exactly you are trying to do?
>
> Linda
>
> Gerald Fernando wrote:
>
>>  How to get context path of Application
>>
>> Thanks7Regards,
>> Gerald A
>>
>>  
>>
>>
>> No virus found in this incoming message.
>> Checked by AVG - www.avg.com Version: 8.5.375 / Virus Database:
>> 270.13.17/2242 - Release Date: 07/16/09 18:00:00
>>
>>
>>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


IModel parameters of StringResourceModel not getting detached

2009-07-17 Thread Jonas
A question about StringResourceModel: it supports IModels in the
'parameters' Object[] that
are properly handled in StringResourceModel#getString, meaning they
could get attached because
of StringResourceModel. Shouldn't it also be the StringResourceModel's
responsibility to properly
detach them (from #onDetach)?

Who's in general responsible to detach an IModel, specially those who
aren't a Component's
'default' IModel? Is that correct that any code that calls
IModel#getObject() should also
call IModel#detach() later in the same request?

cheers,
Jonas

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



What already redirecting error?

2009-07-17 Thread Martin Makundi
Hi!

What is this error and how can I avoid it? Don't even know why it comes:

2009-07-17 11:43:22,804 181242389 [btpool0-503] ERROR RequestCycle  -
Already redirecting to '?wicket:interface=:0:9:::'. Cannot redirect
more than once
org.apache.wicket.WicketRuntimeException: Already redirecting to
'?wicket:interface=:0:9:::'. Cannot redirect more than once
   at 
org.apache.wicket.protocol.http.BufferedWebResponse.redirect(BufferedWebResponse.java:101)
   at 
org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:257)
   at 
org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:105)
   at org.apache.wicket.RequestCycle.respond(RequestCycle.java:1258)
   at org.apache.wicket.RequestCycle.step(RequestCycle.java:1325)
   at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1419)
   at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
   at 
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:456)
   at 
org.apache.wicket.protocol.http.WicketServlet.doPost(WicketServlet.java:160)

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



Re: Radio and Radio Group problems

2009-07-17 Thread Trojahn, Cassia

Igor Vaynberg wrote:

where is your Form in your example?

-igor

On Thu, Jul 16, 2009 at 7:04 AM, Trojahn,
Cassia wrote:
  

Trojahn, Cassia wrote:


Always the last of the list is the selected.
I had tried also this proposal .. and it does not work.

Michael O'Cleirigh wrote:
  

Hello,

I don't think you need to track the selected (true/false) state your
self.  Let the radio group model do it automatically for you like:

listLanguages.add(new NameWrapper("English", "en", "");
listLanguages.add(new NameWrapper("German", "de", ""));
listLanguages.add(new NameWrapper("French", "fr", ""));
listLanguages.add(new NameWrapper("Italian", "it", "");
listLanguages.add(new NameWrapper("Polish", "pl", "");

// set the selected radio to be the first in the list 'English'
final RadioGroup groupQuery = new RadioGroup("groupLanguagesQuery", new
Model(listLanguages.get(0)));
listLanguagesQuery = new ListView("listLanguagesQuery",listLanguages) {
  protected void populateItem(ListItem item) {
   String lang =
((NameWrapper)item.getModelObject()).getName();
  item.add(new Label("nameLanguageQuery", new
StringResourceModel(lang, this, null,"")));
  item.add(new Radio("checkLanguageQuery",
item.getModel(),groupQuery));
  }
  };

groupQuery.add(listLanguagesQuery);

Now the model object value of the RadioGroup 'groupQuery' will have the
NameWrapper for the selected choice.  A NameWrapper instance is selected if
it is returned by groupQuery.getModelObject();

Regards,

Mike


I had tried this option and it does not work.

Michael Mosmann wrote:
  

Hi,

.. i am not sure. The model of RadioGroup should contain, wich item is
selected. The model of Radio should reflect the associated value. So if
model of RadioGroup contains "fr" and Property "selected" of item nr. 3
is "fr" this Radio is selected.

maybe this will help..
mm:)




I have a problem when using the Radio component.
Using a list of languages, where each item is a NameWrapper object
with a property "selected". The property "selected" is associated to the
radio component.
However, when presenting to the user the corresponding list of radios,
the language Polish is true, and not English (it should be the selected
option).

 listLanguages.add(new NameWrapper("English", "en", "", true));
 listLanguages.add(new NameWrapper("German", "de", "", false));
 listLanguages.add(new NameWrapper("French", "fr", "", false));
 listLanguages.add(new NameWrapper("Italian", "it", "", false));
 listLanguages.add(new NameWrapper("Polish", "pl", "", false));

 final RadioGroup groupQuery = new RadioGroup("groupLanguagesQuery",
new Model());
 listLanguagesQuery = new ListView("listLanguagesQuery",listLanguages)
{
   protected void populateItem(ListItem item) {
String lang =
((NameWrapper)item.getModelObject()).getName();
   item.add(new Label("nameLanguageQuery", new
StringResourceModel(lang, this, null,"")));
   item.add(new Radio("checkLanguageQuery", new
PropertyModel(item.getModel(), "selected"),groupQuery));
   }
   };
groupQuery.add(listLanguagesQuery);

Any ideas? I really need to solve this issue.

Thank you so much.

  


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



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

  

I send the code of the application.
if someone can help me 


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




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

  
Thank you for your reply, but with the form the problem is not solved (I 
attach the code with the form).

Any other idea?

/*
 * HomePage.java
 *
 * Created on July 16, 2009, 3:44 PM
 */
 
package com.myapp.wicket;

import java.util.ArrayList;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.form.Radio;
import org.apache.wicket.markup.html.form.RadioGroup;
import org.apache.wicket.markup.html.list.ListItem;
import org.apache.wicket.markup.html.list.ListView;
import org.apache.wicket.model.Model;
import org.apache.wicket.model.PropertyModel;

public class HomePage extends BasePage {
private static final long serialVersionUID = 1L;
public HomePage() {

Form form = new Form("form");
ArrayList listLanguages = new ArrayList();
  

Re: AutoCompleteTextField with initial focus not working

2009-07-17 Thread Marieke Vandamme

document.getElementById('mytxt').focus();


igor.vaynberg wrote:
> 
> how are you setting the initial focus?
> 
> -igor
> 
> On Thu, Jul 16, 2009 at 6:45 AM, Marieke
> Vandamme wrote:
>> Hello,
>>
>> I have AutoCompleteTextField which has the focus when my page is loaded.
>> When I just start typing (because the field has initial focus), then no
>> list is shown.
>> If I leave the field and then click in it again (loosing focus and then
>> gaining it again), the list is shown.
>>
>> Can somebody help me with this or is it a bug?
>> Many thanks in advance! Marieke.
>>  DISCLAIMER 
>>  http://www.tvh.be/newen/pages/emaildisclaimer.html 
>> http://www.tvh.be/newen/pages/emaildisclaimer.html  
>>
>> "This message is delivered to all addressees subject to the conditions
>> set forth in the attached disclaimer, which is an integral part of this
>> message."
>>
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/AutoCompleteTextField-with-initial-focus-not-working-tp24516661p24530409.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: WicketStuff Developers - please read

2009-07-17 Thread Martin Funk

good work,

thank you.

May I add a Number "0" item to the list.

0 - Don't commit code that breaks the build "mvn install"

mf

Am 16.07.2009 um 23:38 schrieb Jeremy Thomerson:


I'm trying to build wicketstuff-core 1.4-rc7 to match the Wicket
release.  I have spent hours tracking down pom issues where you
either:

1 - declared a specific version of Wicket to use.  Don't do this -
it's declared in the parent pom and it should always match Wicket's
trunk (or in this case a release that I'm building against).

2 - declared a specific version of your project (0.1-SNAPSHOT /
1.0-SNAPSHOT / etc).  Don't do this.  The projects in wicketstuff-core
will be versioned to match Wicket releases.  If you want to version
yours a different way - move it out of wicketstuff-core and version it
however you want to.

Thank you!!

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

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




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



Re: How to get context path of Application

2009-07-17 Thread Linda van der Pal

What is it exactly you are trying to do?

Linda

Gerald Fernando wrote:

How to get context path of Application

Thanks7Regards,
Gerald A

  




No virus found in this incoming message.
Checked by AVG - www.avg.com 
Version: 8.5.375 / Virus Database: 270.13.17/2242 - Release Date: 07/16/09 18:00:00


  



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



Re: How to get context path of Application

2009-07-17 Thread Alex Objelean

((WebRequest)RequestCycle.get().getRequest()).getHttpServletRequest().getContextPath()

Alex Objelean


Gerald Fernando wrote:
> 
> How to get context path of Application
> 
> Thanks7Regards,
> Gerald A
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-get-context-path-of-Application-tp24529877p24529972.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



How to get context path of Application

2009-07-17 Thread Gerald Fernando
How to get context path of Application

Thanks7Regards,
Gerald A


how to Get Context path

2009-07-17 Thread Gerald Fernando
Hello Friends,
how to get the context path of current class

Thanks&Regards,
Gerald A