Re: Error detaching RequestCycle listener error

2011-09-21 Thread Martin Grigorov
I see how this can happen ...

I guess org.apache.wicket.serialize.java.JavaSerializer.serialize(Object)
returns null and logs an exception with message:
Error serializing object " + object.getClass() + " [object=" + object + "]"

please create a ticket

On Wed, Sep 21, 2011 at 7:11 PM, Martin A  wrote:
> Hello, guys,
>
> I encounter a strange error in my wicket logs. I don't have any idea what
> the reason may be. Would you give some hints?
> I have a simple WebApplication subclass with nothing special in it.
>
> Thank you!
>
> Here's the stacktrace
>
> 20-09-2011 16:46:44,875 ERROR
> org.apache.wicket.request.cycle.RequestCycleListenerCollection$3.notify:105
> - Error detaching request cycle listener:
> org.apache.wicket.Application$2@b45ad3d
> java.lang.IllegalArgumentException: Argument 'data' may not be null.
> at org.apache.wicket.util.lang.Args.notNull(Args.java:39)
> at
> org.apache.wicket.pageStore.AsynchronousDataStore$Entry.(AsynchronousDataStore.java:271)
> at
> org.apache.wicket.pageStore.AsynchronousDataStore.storeData(AsynchronousDataStore.java:215)
> at
> org.apache.wicket.pageStore.DefaultPageStore.storePageData(DefaultPageStore.java:115)
> at
> org.apache.wicket.pageStore.DefaultPageStore.storePage(DefaultPageStore.java:144)
> at
> org.apache.wicket.page.PageStoreManager$PersistentRequestAdapter.storeTouchedPages(PageStoreManager.java:377)
> at
> org.apache.wicket.page.RequestAdapter.commitRequest(RequestAdapter.java:171)
> at
> org.apache.wicket.page.AbstractPageManager.commitRequest(AbstractPageManager.java:94)
> at
> org.apache.wicket.page.PageManagerDecorator.commitRequest(PageManagerDecorator.java:68)
> at
> org.apache.wicket.page.PageAccessSynchronizer$2.commitRequest(PageAccessSynchronizer.java:213)
> at org.apache.wicket.Application$2.onDetach(Application.java:1552)
> at
> org.apache.wicket.request.cycle.RequestCycleListenerCollection$3.notify(RequestCycleListenerCollection.java:101)
> at
> org.apache.wicket.request.cycle.RequestCycleListenerCollection$3.notify(RequestCycleListenerCollection.java:97)
> at
> org.apache.wicket.util.listener.ListenerCollection.reversedNotify(ListenerCollection.java:121)
> at
> org.apache.wicket.util.listener.ListenerCollection.reversedNotify(ListenerCollection.java:112)
> at
> org.apache.wicket.request.cycle.RequestCycleListenerCollection.onDetach(RequestCycleListenerCollection.java:95)
> at
> org.apache.wicket.request.cycle.RequestCycle.onDetach(RequestCycle.java:542)
> at
> org.apache.wicket.request.cycle.RequestCycle.detach(RequestCycle.java:481)
> at
> org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:257)
> at
> org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:162)
> at
> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:218)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:185)
> at
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:151)
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
> at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
> at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:405)
> at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:269)
> at
> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:515)
> at
> org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:302)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> at java.lang.Thread.run(Thread.java:662)
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Re: Bookmarkable Page URLs

2011-09-21 Thread Martin Grigorov
It seems that you mounted this page with IndexedUrlCodingStrategy.
Use non-indexed one instead.

On Thu, Sep 22, 2011 at 2:01 AM, Amorgos  wrote:
> My bookmarkable pages are showing like this..
> index.html/wicket:pageMapName/wicket-1
>
> is it possible to change it so that everything after index.html are GET
> variables?
>
> The reason why this is important to me is that the page on my site
> (index.html) has a Google+ icon on it which seems to rely on the fact that
> "index.html" is the page, and not "index.html/etcetc" so when people click
> on the Google+ icon, it basically registers it as the wrong url.
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/Bookmarkable-Page-URLs-tp3831829p3831829.html
> Sent from the Users forum 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
>
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Re: how to get HttpServletRequest in wicket 1.5

2011-09-21 Thread nhsoft.yhw
Q5:my code for wicket1.5 as follow:

final Link lnkExport = new Link("export") {

public void onClick() {
Shop shop = shopService.read(shopId);
// temporarily switch off paging of results
final JxlExportShop jxlExportShop = new 
JxlExportShop(shop);

getRequestCycle().scheduleRequestHandlerAfterCurrent(new
IRequestHandler() {

@Override
public void detach(IRequestCycle 
requestCycle) {
}

@Override
public void respond(IRequestCycle 
requestCycle) {
try {
Shop shop = 
shopService.read(shopId);
String fileName = 
shop.getShopCity() + "_" + shop.getShopName() +
"_version_" + shop.getShopVersion() + ".xls";
fileName = new 
String(fileName.getBytes("gb2312"), "iso8859-1");

HttpServletResponse 
httpResponse =
(HttpServletResponse)requestCycle.getResponse().getContainerResponse();

httpResponse.setContentType( "application/vnd.ms-excel" );

httpResponse.setHeader("Content-disposition", "attachment; filename="
+ fileName );

jxlExportShop.exportToExcel(httpResponse.getOutputStream());
} catch (Exception e) {
throw new 
RuntimeException(e);
}
}
});
}
};  

-
http://www.517wm.com
外卖订餐分享工具
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/how-to-get-HttpServletRequest-in-wicket-1-5-tp3798272p3832287.html
Sent from the Users forum 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: IHeaderContributor#renderHead does not inject CSS on panel swap

2011-09-21 Thread Alec Swan
I was not able to reproduce this with CSS and realized that the
problem might be with injecting JavaScript on swapping.  i also
noticed the following errors in the log files:

org.apache.wicket.protocol.http.PageExpiredException: No behaviors
attached to component [MarkupContainer [Component id =
mainMenuItemLink]]
at 
org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:105)

What could have caused these?

I also inspected the page that has this problem in production with
Firebug and noticed this in the  section:


$(document).ready(function() {
$("a.fancy").fancybox({
'width' : '75%',
'height' : '90%',
'autoScale' : false,
'transitionIn' : 'elastic',
'transitionOut' : 'fade',
'type' : 'iframe'
});
});
; Wicket.functionExecuterCallbacks['script1'](); delete
Wicket.functionExecuterCallbacks['script1'];


The top of the file was written by us, but the last line was appended
by Wicket. Could you explain what this is doing?

Thanks,

Alec

On Thu, Sep 15, 2011 at 9:21 PM, Igor Vaynberg  wrote:
> that should work, please create a quickstart.
>
> -igor
>
> On Thu, Sep 15, 2011 at 8:06 PM, Alec Swan  wrote:
>> Hello,
>>
>> Our app uses panel swapping as a tabbing implementation.
>>
>> I noticed that if I inject CSS using
>> component.add(CSSPackageResource.getHeaderContribution(resourceRef,
>> media)) during panel construction, then the CSS is included correctly
>> and takes effect after the panel swap. However, if I inject the same
>> CSS in IHeaderContributor#renderHead() using
>> response.renderCSSReference(resourceRef, media) then CSS is not
>> included after the panel swap and hence does not take effect.
>>
>> How can I get CSS injection to work in IHeaderContributor#renderHead()?
>>
>> Thanks,
>>
>> Alec
>>
>> -
>> 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: Glitch in PageParameter API

2011-09-21 Thread Igor Vaynberg
there is no need for a workaround, this is a codesmell - nothing more.

-igor


On Wed, Sep 21, 2011 at 1:12 PM, Jorge Gallardo
 wrote:
> https://issues.apache.org/jira/browse/WICKET-4076 created
>
> What is your suggested workaround?
>
> Thanks
> JG
>
> On Wed, Sep 21, 2011 at 3:06 PM, Igor Vaynberg wrote:
>
>> sure, as long as INamedParameters#getAllNamed() still uses
>> PageParameters#NamedPair which of course will not fix anything
>>
>> -igor
>>
>> On Wed, Sep 21, 2011 at 12:55 PM, Bruno Borges 
>> wrote:
>> > Well, it could be done in 1.5.x this way:
>> >
>> > PageParameters.NamedPairs extends INamedParameters.NamedPairs
>> >
>> > In 1.6 then PP.NP  could be dropped.
>> >
>> > What about that?
>> >
>> >
>> > *Bruno Borges*
>> > (21) 7672-7099
>> > *www.brunoborges.com*
>> >
>> >
>> >
>> > On Wed, Sep 21, 2011 at 12:13 PM, Igor Vaynberg > >wrote:
>> >
>> >> cant do in 1.5.x. make a ticket and schedule for 1.6.0
>> >>
>> >> -igor
>> >>
>> >>
>> >> On Wed, Sep 21, 2011 at 8:12 AM, Martin Grigorov 
>> >> wrote:
>> >> > On Wed, Sep 21, 2011 at 6:08 PM, Jorge Gallardo
>> >> >  wrote:
>> >> >> Folks,
>> >> >>
>> >> >> In an attempt to create my own implementation of PageParameterEncoder
>> >> and
>> >> >> PageParameters, I encountered the following problem with the API:
>> >> >>
>> >> >> The interface INamedParameters<
>> >>
>> http://wicket.apache.org/apidocs/1.5/org/apache/wicket/request/mapper/parameter/INamedParameters.html
>> >> >
>> >> >> defines
>> >> >> the method getAllNamed()<
>> >>
>> http://wicket.apache.org/apidocs/1.5/org/apache/wicket/request/mapper/parameter/INamedParameters.html#getAllNamed()
>> >> >
>> >> >> that
>> >> >> returns a list of
>> >> >> NamedPairs<
>> >>
>> http://wicket.apache.org/apidocs/1.5/org/apache/wicket/request/mapper/parameter/PageParameters.NamedPair.html
>> >> >
>> >> >> defined
>> >> >> as inner class of
>> >> >> PageParameters<
>> >>
>> http://wicket.apache.org/apidocs/1.5/org/apache/wicket/request/mapper/parameter/PageParameters.html
>> >> >
>> >> >>  .
>> >> >>
>> >> >> I believe that an interface shouldnt be referencing any element from
>> an
>> >> >> implementation to be a true extensible interface.
>> >> >> A quick fix to this could be to convert NamedPair to a standard class
>> >> and
>> >> >> make it extensible as well.
>> >> > Or make it INamedParameters.NamedPair
>> >> >>
>> >> >> Thoughts?
>> >> >>
>> >> >> --
>> >> >> Jorge Gallardo
>> >> >> 
>> >> >> jorgeagalla...@gmail.com
>> >> >>
>> >> >
>> >> >
>> >> >
>> >> > --
>> >> > Martin Grigorov
>> >> > jWeekend
>> >> > Training, Consulting, Development
>> >> > http://jWeekend.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
>>
>>
>
>
> --
> Jorge Gallardo
> 
> jorgeagalla...@gmail.com
>

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



Re: Glitch in PageParameter API

2011-09-21 Thread Jorge Gallardo
https://issues.apache.org/jira/browse/WICKET-4076 created

What is your suggested workaround?

Thanks
JG

On Wed, Sep 21, 2011 at 3:06 PM, Igor Vaynberg wrote:

> sure, as long as INamedParameters#getAllNamed() still uses
> PageParameters#NamedPair which of course will not fix anything
>
> -igor
>
> On Wed, Sep 21, 2011 at 12:55 PM, Bruno Borges 
> wrote:
> > Well, it could be done in 1.5.x this way:
> >
> > PageParameters.NamedPairs extends INamedParameters.NamedPairs
> >
> > In 1.6 then PP.NP  could be dropped.
> >
> > What about that?
> >
> >
> > *Bruno Borges*
> > (21) 7672-7099
> > *www.brunoborges.com*
> >
> >
> >
> > On Wed, Sep 21, 2011 at 12:13 PM, Igor Vaynberg  >wrote:
> >
> >> cant do in 1.5.x. make a ticket and schedule for 1.6.0
> >>
> >> -igor
> >>
> >>
> >> On Wed, Sep 21, 2011 at 8:12 AM, Martin Grigorov 
> >> wrote:
> >> > On Wed, Sep 21, 2011 at 6:08 PM, Jorge Gallardo
> >> >  wrote:
> >> >> Folks,
> >> >>
> >> >> In an attempt to create my own implementation of PageParameterEncoder
> >> and
> >> >> PageParameters, I encountered the following problem with the API:
> >> >>
> >> >> The interface INamedParameters<
> >>
> http://wicket.apache.org/apidocs/1.5/org/apache/wicket/request/mapper/parameter/INamedParameters.html
> >> >
> >> >> defines
> >> >> the method getAllNamed()<
> >>
> http://wicket.apache.org/apidocs/1.5/org/apache/wicket/request/mapper/parameter/INamedParameters.html#getAllNamed()
> >> >
> >> >> that
> >> >> returns a list of
> >> >> NamedPairs<
> >>
> http://wicket.apache.org/apidocs/1.5/org/apache/wicket/request/mapper/parameter/PageParameters.NamedPair.html
> >> >
> >> >> defined
> >> >> as inner class of
> >> >> PageParameters<
> >>
> http://wicket.apache.org/apidocs/1.5/org/apache/wicket/request/mapper/parameter/PageParameters.html
> >> >
> >> >>  .
> >> >>
> >> >> I believe that an interface shouldnt be referencing any element from
> an
> >> >> implementation to be a true extensible interface.
> >> >> A quick fix to this could be to convert NamedPair to a standard class
> >> and
> >> >> make it extensible as well.
> >> > Or make it INamedParameters.NamedPair
> >> >>
> >> >> Thoughts?
> >> >>
> >> >> --
> >> >> Jorge Gallardo
> >> >> 
> >> >> jorgeagalla...@gmail.com
> >> >>
> >> >
> >> >
> >> >
> >> > --
> >> > Martin Grigorov
> >> > jWeekend
> >> > Training, Consulting, Development
> >> > http://jWeekend.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
>
>


-- 
Jorge Gallardo

jorgeagalla...@gmail.com


Re: Glitch in PageParameter API

2011-09-21 Thread Igor Vaynberg
sure, as long as INamedParameters#getAllNamed() still uses
PageParameters#NamedPair which of course will not fix anything

-igor

On Wed, Sep 21, 2011 at 12:55 PM, Bruno Borges  wrote:
> Well, it could be done in 1.5.x this way:
>
> PageParameters.NamedPairs extends INamedParameters.NamedPairs
>
> In 1.6 then PP.NP  could be dropped.
>
> What about that?
>
>
> *Bruno Borges*
> (21) 7672-7099
> *www.brunoborges.com*
>
>
>
> On Wed, Sep 21, 2011 at 12:13 PM, Igor Vaynberg 
> wrote:
>
>> cant do in 1.5.x. make a ticket and schedule for 1.6.0
>>
>> -igor
>>
>>
>> On Wed, Sep 21, 2011 at 8:12 AM, Martin Grigorov 
>> wrote:
>> > On Wed, Sep 21, 2011 at 6:08 PM, Jorge Gallardo
>> >  wrote:
>> >> Folks,
>> >>
>> >> In an attempt to create my own implementation of PageParameterEncoder
>> and
>> >> PageParameters, I encountered the following problem with the API:
>> >>
>> >> The interface INamedParameters<
>> http://wicket.apache.org/apidocs/1.5/org/apache/wicket/request/mapper/parameter/INamedParameters.html
>> >
>> >> defines
>> >> the method getAllNamed()<
>> http://wicket.apache.org/apidocs/1.5/org/apache/wicket/request/mapper/parameter/INamedParameters.html#getAllNamed()
>> >
>> >> that
>> >> returns a list of
>> >> NamedPairs<
>> http://wicket.apache.org/apidocs/1.5/org/apache/wicket/request/mapper/parameter/PageParameters.NamedPair.html
>> >
>> >> defined
>> >> as inner class of
>> >> PageParameters<
>> http://wicket.apache.org/apidocs/1.5/org/apache/wicket/request/mapper/parameter/PageParameters.html
>> >
>> >>  .
>> >>
>> >> I believe that an interface shouldnt be referencing any element from an
>> >> implementation to be a true extensible interface.
>> >> A quick fix to this could be to convert NamedPair to a standard class
>> and
>> >> make it extensible as well.
>> > Or make it INamedParameters.NamedPair
>> >>
>> >> Thoughts?
>> >>
>> >> --
>> >> Jorge Gallardo
>> >> 
>> >> jorgeagalla...@gmail.com
>> >>
>> >
>> >
>> >
>> > --
>> > Martin Grigorov
>> > jWeekend
>> > Training, Consulting, Development
>> > http://jWeekend.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



Re: Glitch in PageParameter API

2011-09-21 Thread Bruno Borges
Well, it could be done in 1.5.x this way:

PageParameters.NamedPairs extends INamedParameters.NamedPairs

In 1.6 then PP.NP  could be dropped.

What about that?


*Bruno Borges*
(21) 7672-7099
*www.brunoborges.com*



On Wed, Sep 21, 2011 at 12:13 PM, Igor Vaynberg wrote:

> cant do in 1.5.x. make a ticket and schedule for 1.6.0
>
> -igor
>
>
> On Wed, Sep 21, 2011 at 8:12 AM, Martin Grigorov 
> wrote:
> > On Wed, Sep 21, 2011 at 6:08 PM, Jorge Gallardo
> >  wrote:
> >> Folks,
> >>
> >> In an attempt to create my own implementation of PageParameterEncoder
> and
> >> PageParameters, I encountered the following problem with the API:
> >>
> >> The interface INamedParameters<
> http://wicket.apache.org/apidocs/1.5/org/apache/wicket/request/mapper/parameter/INamedParameters.html
> >
> >> defines
> >> the method getAllNamed()<
> http://wicket.apache.org/apidocs/1.5/org/apache/wicket/request/mapper/parameter/INamedParameters.html#getAllNamed()
> >
> >> that
> >> returns a list of
> >> NamedPairs<
> http://wicket.apache.org/apidocs/1.5/org/apache/wicket/request/mapper/parameter/PageParameters.NamedPair.html
> >
> >> defined
> >> as inner class of
> >> PageParameters<
> http://wicket.apache.org/apidocs/1.5/org/apache/wicket/request/mapper/parameter/PageParameters.html
> >
> >>  .
> >>
> >> I believe that an interface shouldnt be referencing any element from an
> >> implementation to be a true extensible interface.
> >> A quick fix to this could be to convert NamedPair to a standard class
> and
> >> make it extensible as well.
> > Or make it INamedParameters.NamedPair
> >>
> >> Thoughts?
> >>
> >> --
> >> Jorge Gallardo
> >> 
> >> jorgeagalla...@gmail.com
> >>
> >
> >
> >
> > --
> > Martin Grigorov
> > jWeekend
> > Training, Consulting, Development
> > http://jWeekend.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: creating a textarea with a radiobutton using Listview

2011-09-21 Thread wholalotta
Hi manuelbarzi,

Thanks for the usefull websites I reviewed all of them and 
I tried the following. I created a radiogroup but still i can select all
radiobuttons right now..I just want to be able to select one radiobutton and
set the boolean attribute true in related NameWrapper object. And also right
now still cant understand how can i set a boolean value with radio buttons?
İt gives me the index value of the radiobutton when i submit the form...I am
a little bir stuck and cannot go forward



public class FormInput extends WebPage
{
public FormInput()
{
final FeedbackPanel feedback = new FeedbackPanel("feedback");
add(feedback);
add(new InputForm("inputForm"));
}

private class InputForm extends Form
{
private List data;

public InputForm(String name)
{
super(name);

// add some dummy data
data = new ArrayList();
data.add(new NameWrapper());
data.add(new NameWrapper());
data.add(new NameWrapper());
data.add(new NameWrapper());

ListView listView = new ListView("list", data)
{

@Override
protected void populateItem(ListItem item) {
NameWrapper wrapper = 
(NameWrapper)item.getModelObject();
item.add(new TextArea("name", new 
PropertyModel(wrapper, "name")));
final RadioGroup adminRadioGroup = new 
RadioGroup("radiogroup", new
PropertyModel(wrapper, "selected"));
item.add(adminRadioGroup);
adminRadioGroup.add(new 
Radio("radioCheck", new
Model(item.getIndex()+1)));
}
};
listView.setReuseItems(true);
add(listView);
}


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/creating-a-textarea-with-a-radiobutton-using-Listview-tp3829602p3831177.html
Sent from the Users forum 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



Error detaching RequestCycle listener error

2011-09-21 Thread Martin A
Hello, guys,

I encounter a strange error in my wicket logs. I don't have any idea what
the reason may be. Would you give some hints?
I have a simple WebApplication subclass with nothing special in it.

Thank you!

Here's the stacktrace

20-09-2011 16:46:44,875 ERROR
org.apache.wicket.request.cycle.RequestCycleListenerCollection$3.notify:105
- Error detaching request cycle listener:
org.apache.wicket.Application$2@b45ad3d
java.lang.IllegalArgumentException: Argument 'data' may not be null.
at org.apache.wicket.util.lang.Args.notNull(Args.java:39)
at
org.apache.wicket.pageStore.AsynchronousDataStore$Entry.(AsynchronousDataStore.java:271)
at
org.apache.wicket.pageStore.AsynchronousDataStore.storeData(AsynchronousDataStore.java:215)
at
org.apache.wicket.pageStore.DefaultPageStore.storePageData(DefaultPageStore.java:115)
at
org.apache.wicket.pageStore.DefaultPageStore.storePage(DefaultPageStore.java:144)
at
org.apache.wicket.page.PageStoreManager$PersistentRequestAdapter.storeTouchedPages(PageStoreManager.java:377)
at
org.apache.wicket.page.RequestAdapter.commitRequest(RequestAdapter.java:171)
at
org.apache.wicket.page.AbstractPageManager.commitRequest(AbstractPageManager.java:94)
at
org.apache.wicket.page.PageManagerDecorator.commitRequest(PageManagerDecorator.java:68)
at
org.apache.wicket.page.PageAccessSynchronizer$2.commitRequest(PageAccessSynchronizer.java:213)
at org.apache.wicket.Application$2.onDetach(Application.java:1552)
at
org.apache.wicket.request.cycle.RequestCycleListenerCollection$3.notify(RequestCycleListenerCollection.java:101)
at
org.apache.wicket.request.cycle.RequestCycleListenerCollection$3.notify(RequestCycleListenerCollection.java:97)
at
org.apache.wicket.util.listener.ListenerCollection.reversedNotify(ListenerCollection.java:121)
at
org.apache.wicket.util.listener.ListenerCollection.reversedNotify(ListenerCollection.java:112)
at
org.apache.wicket.request.cycle.RequestCycleListenerCollection.onDetach(RequestCycleListenerCollection.java:95)
at
org.apache.wicket.request.cycle.RequestCycle.onDetach(RequestCycle.java:542)
at
org.apache.wicket.request.cycle.RequestCycle.detach(RequestCycle.java:481)
at
org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:257)
at
org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:162)
at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:218)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:185)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:151)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:405)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:269)
at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:515)
at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:302)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)


RE: ModalWindow problem

2011-09-21 Thread Sotil Bertanzetti, Matteo
Thanks for help.

I already tried, but it didn't work.

Matteo Sotil

-Missatge original-
De: Dan Retzlaff [mailto:dretzl...@gmail.com] 
Enviat: miércoles, 21 de septiembre de 2011 17:11
Per a: users@wicket.apache.org
Tema: Re: ModalWindow problem

Try giving your modal page a reference to the outer page object, and not
just a model within it. This way serialization of the modal page will
encounter the outer page and update its pagemap entry. I don't know what's
up with 1.5, but with certain request patterns we found this necessary even
in 1.4.

On Wed, Sep 21, 2011 at 4:44 AM, Sotil Bertanzetti, Matteo <
mso...@gencat.cat> wrote:

> Is there another option?, I would have to do a lot of changes to implement
> Panel backed ModalWindow.
>
> Maybe I stay on wicket 1.4 for a while.
>
> Matteo Sotil
>
> -Missatge original-
> De: Martin Grigorov [mailto:mgrigo...@apache.org]
> Enviat: miércoles, 21 de septiembre de 2011 13:19
> Per a: users@wicket.apache.org
> Tema: Re: ModalWindow problem
>
> On Wed, Sep 21, 2011 at 12:25 PM, Sotil Bertanzetti, Matteo
>  wrote:
> > Thanks for responding.
> >
> > I'm using a dynamic model (PropertyModel) but it doesn't work either.
> > For me it's an important loss of functionality. I use it on modal
> > windows, to show a search page (with TabbedPanel, list with
> > pagination...) and select one register; could you please suggest me some
> > alternative?.
>
> Use ModalWindow backed by a Panel instead of a Page. It is much more
> stable.
> There are many tickets for ModalWindow backed by a Page.
>
> >
> > Thank you.
> >
> > Matteo Sotil
> >
> > -Missatge original-
> > De: Andrea Del Bene [mailto:adelb...@ciseonweb.it]
> > Enviat: martes, 20 de septiembre de 2011 18:16
> > Per a: users@wicket.apache.org
> > Tema: Re: ModalWindow problem
> >
> > Hi,
> >
> > we dealt this topic in this issue:
> >
> > https://issues.apache.org/jira/browse/WICKET-3809
> >
> > Basically starting from Wicket 1.5 you can't share static models between
> >
> > pages.
> >> Hello.
> >>
> >>
> >>
> >> I have a problem with ModalWindow in wicket 1.5.0.
> >>
> >> I create a ModalWindow from a page, and that modal window changes
> >> original page's model; some textfields should change their value
> >> according to model change, but they not; in fact seems as if model had
> >> not really changed. ModalWindow's content is a page, not a component;
> > if
> >> I use a component as content, it works, but I need it to be a page.
> > This
> >> worked correctly on wicket 1.4.18.
> >>
> >>
> >>
> >> Matteo Sotil
> >>
> >> 935526855
> >>
> >> mso...@gencat.cat
> >>
> >>
> >
> >
> > -
> > 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
> >
> >
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.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: Glitch in PageParameter API

2011-09-21 Thread Igor Vaynberg
cant do in 1.5.x. make a ticket and schedule for 1.6.0

-igor


On Wed, Sep 21, 2011 at 8:12 AM, Martin Grigorov  wrote:
> On Wed, Sep 21, 2011 at 6:08 PM, Jorge Gallardo
>  wrote:
>> Folks,
>>
>> In an attempt to create my own implementation of PageParameterEncoder and
>> PageParameters, I encountered the following problem with the API:
>>
>> The interface 
>> INamedParameters
>> defines
>> the method 
>> getAllNamed()
>> that
>> returns a list of
>> NamedPairs
>> defined
>> as inner class of
>> PageParameters
>>  .
>>
>> I believe that an interface shouldnt be referencing any element from an
>> implementation to be a true extensible interface.
>> A quick fix to this could be to convert NamedPair to a standard class and
>> make it extensible as well.
> Or make it INamedParameters.NamedPair
>>
>> Thoughts?
>>
>> --
>> Jorge Gallardo
>> 
>> jorgeagalla...@gmail.com
>>
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.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: Glitch in PageParameter API

2011-09-21 Thread Martin Grigorov
On Wed, Sep 21, 2011 at 6:08 PM, Jorge Gallardo
 wrote:
> Folks,
>
> In an attempt to create my own implementation of PageParameterEncoder and
> PageParameters, I encountered the following problem with the API:
>
> The interface 
> INamedParameters
> defines
> the method 
> getAllNamed()
> that
> returns a list of
> NamedPairs
> defined
> as inner class of
> PageParameters
>  .
>
> I believe that an interface shouldnt be referencing any element from an
> implementation to be a true extensible interface.
> A quick fix to this could be to convert NamedPair to a standard class and
> make it extensible as well.
Or make it INamedParameters.NamedPair
>
> Thoughts?
>
> --
> Jorge Gallardo
> 
> jorgeagalla...@gmail.com
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



RE: BookmarkablePageLink works differently in 1.5?

2011-09-21 Thread Chris Colman
That was it: the placeholders added to the mount URL pattern for parameters in 
the directory style 

eg., /${val1}/${val2}

actually contribute to the mount point, effectively extending it.

>-Original Message-
>From: Martin Grigorov [mailto:mgrigo...@apache.org]
>Sent: Wednesday, 21 September 2011 9:53 PM
>To: users@wicket.apache.org
>Subject: Re: BookmarkablePageLink works differently in 1.5?
>
>maybe it is because of the placeholders in the mount path.
>remove them and use just the API for indexed parameters to set/get them.
>
>On Wed, Sep 21, 2011 at 2:40 PM, Chris Colman
> wrote:
>> Some of the pages are working now but the generated HTML code sure has
>some interest URLs:
>>
>> 
>> Getting started
>>
>> The href value has a few too many '/' slashes in it for my liking. Any
>idea why it might be adding so many slashes?
>>
>> The links work ok but look very strange.
>>
>> In 1.4 the links looked normal with no ../../ and /
>>
>> Any ideas what might be causing this?
>>
>>
>>
>>>-Original Message-
>>>From: Chris Colman [mailto:chr...@stepaheadsoftware.com]
>>>Sent: Wednesday, 21 September 2011 4:17 PM
>>>To: users@wicket.apache.org
>>>Subject: RE: BookmarkablePageLink works differently in 1.5?
>>>
i meant:

mount(new MountedMapper("/content/home", HomePage.class, new
MyCustomPageParameterEncoder());

-igor
>>>
>>>Arh! I didn't think of that.
>>>
>>>Would the PageParameterEncoder passed into the MountedMapper be used by
>any
>>>BookmarkablePageLink instance when it encodes the URL or does the encoder
>>>need to be separately specified for the BookmarkablePageLink?
>>>

On Tue, Sep 20, 2011 at 9:12 PM, Chris Colman
 wrote:
> The pages are mounted but with 1.4 I mounted them all like:
>
> mountPage("/content/home");
> mountPage("/content/about");
> mountPage("/content/product");
> ...
>
> Any links to the page would suffix the parameters to the mount point
like:
>
> /content/home/o/123
> /content/about/o/123
> /content/product/o/123/p/756
> ...
>
> With 1.4 I could mount them all in a similar way and let the page
>itself
interpret the parameters according to what it expected.
>
> I guess in 1.5 I will have to mount each page in a way that explicitly
declares its particular parameter composition:
>
> mountPage("/content/home/${dummy_o}/${o}");
> mountPage("/content/about/${dummy_o}/${o}");
> mountPage("/content/product/${dummy_o}/${o}/${dummy_c}/${c}");
> ...
>
> I kind of arrived at that conclusion yesterday. The problem I was
>having
today was more to do with getting BookmarkablePageLink to produce URLs
>>>with
the /n/v/ style instead of the ?n=v style but I think I've almost worked
that out.
>
> I have to simulate the name/value pairing of 1.4 /n/v style parameters
>>>by
outputting a dummy parameter name (where the name used to be in 1.4) and
the real value.
>
>
>
>>-Original Message-
>>From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com]
>>Sent: Wednesday, 21 September 2011 12:25 PM
>>To: users@wicket.apache.org
>>Subject: Re: BookmarkablePageLink works differently in 1.5?
>>
>>mountmapper also uses pageparameters, can you not mount your
>pages?
>>
>>-igor
>>
>>
>>On Tue, Sep 20, 2011 at 6:31 PM, Chris Colman
>> wrote:
>>> It looks like the parameter encoding/decoding is all done via the
>>> interface:
>>>
>>> IPageParametersEncoder
>>>
>>> Which has only a single implementation which obviously
>encodes/decodes
>>> the  new 1.5 style.
>>>
>>> Would it be possible to provide a 1.4 legacy implementation of
>>> IPageParametersEncoder to allowing upgrading a 1.4 wicket
>application
to
>>> 1.5 but maintain support for existing URLs that already exist for
>the
>>> 1.4 built web application?
>>>
>>> Could the setting of the IPageParameterEncoder implementation be an
>>> application or page setting?
>>>
-Original Message-
From: Chris Colman [mailto:chr...@stepaheadsoftware.com]
Sent: Wednesday, 21 September 2011 11:14 AM
To: users@wicket.apache.org
Subject: BookmarkablePageLink works differently in 1.5?

It seems that in Wicket 1.5 BookmarkablePageLink's produce URLs that
employ query parameters

Eg.,

?name1=value1&name2=value2

instead of the directory style parameters of 1.4.x

Eg.,
/name1/value1/name2/value2

While this may not be a problem for new Wicket applications the
thousands of URLs of existing 1.4 Wicket applications are referenced
from many existing websites and search engines on the web.

Is there a replacement for BookmarkablePageLink in 1.5 that can
>>>produce
the 1.4 

Re: ModalWindow problem

2011-09-21 Thread Dan Retzlaff
Try giving your modal page a reference to the outer page object, and not
just a model within it. This way serialization of the modal page will
encounter the outer page and update its pagemap entry. I don't know what's
up with 1.5, but with certain request patterns we found this necessary even
in 1.4.

On Wed, Sep 21, 2011 at 4:44 AM, Sotil Bertanzetti, Matteo <
mso...@gencat.cat> wrote:

> Is there another option?, I would have to do a lot of changes to implement
> Panel backed ModalWindow.
>
> Maybe I stay on wicket 1.4 for a while.
>
> Matteo Sotil
>
> -Missatge original-
> De: Martin Grigorov [mailto:mgrigo...@apache.org]
> Enviat: miércoles, 21 de septiembre de 2011 13:19
> Per a: users@wicket.apache.org
> Tema: Re: ModalWindow problem
>
> On Wed, Sep 21, 2011 at 12:25 PM, Sotil Bertanzetti, Matteo
>  wrote:
> > Thanks for responding.
> >
> > I'm using a dynamic model (PropertyModel) but it doesn't work either.
> > For me it's an important loss of functionality. I use it on modal
> > windows, to show a search page (with TabbedPanel, list with
> > pagination...) and select one register; could you please suggest me some
> > alternative?.
>
> Use ModalWindow backed by a Panel instead of a Page. It is much more
> stable.
> There are many tickets for ModalWindow backed by a Page.
>
> >
> > Thank you.
> >
> > Matteo Sotil
> >
> > -Missatge original-
> > De: Andrea Del Bene [mailto:adelb...@ciseonweb.it]
> > Enviat: martes, 20 de septiembre de 2011 18:16
> > Per a: users@wicket.apache.org
> > Tema: Re: ModalWindow problem
> >
> > Hi,
> >
> > we dealt this topic in this issue:
> >
> > https://issues.apache.org/jira/browse/WICKET-3809
> >
> > Basically starting from Wicket 1.5 you can't share static models between
> >
> > pages.
> >> Hello.
> >>
> >>
> >>
> >> I have a problem with ModalWindow in wicket 1.5.0.
> >>
> >> I create a ModalWindow from a page, and that modal window changes
> >> original page's model; some textfields should change their value
> >> according to model change, but they not; in fact seems as if model had
> >> not really changed. ModalWindow's content is a page, not a component;
> > if
> >> I use a component as content, it works, but I need it to be a page.
> > This
> >> worked correctly on wicket 1.4.18.
> >>
> >>
> >>
> >> Matteo Sotil
> >>
> >> 935526855
> >>
> >> mso...@gencat.cat
> >>
> >>
> >
> >
> > -
> > 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
> >
> >
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Glitch in PageParameter API

2011-09-21 Thread Jorge Gallardo
Folks,

In an attempt to create my own implementation of PageParameterEncoder and
PageParameters, I encountered the following problem with the API:

The interface 
INamedParameters
defines
the method 
getAllNamed()
that
returns a list of
NamedPairs
defined
as inner class of
PageParameters
 .

I believe that an interface shouldnt be referencing any element from an
implementation to be a true extensible interface.
A quick fix to this could be to convert NamedPair to a standard class and
make it extensible as well.

Thoughts?

-- 
Jorge Gallardo

jorgeagalla...@gmail.com


Re: How to get request page in Wicket 1.5

2011-09-21 Thread Igor Vaynberg
you can pass a PageReference to the edit page, something like
setResponsePage(new EditPage(itemModel, getPageReference())
then when its time to go back you can say
setResponsePage(reference.getPage())

-igor



On Wed, Sep 21, 2011 at 1:11 AM, Florian B.  wrote:
> My idea is to store the current page within the session and use it on later
> pages to navigate back to the previous page.
>
> For example I've got several pages with pageable lists of items the user can
> edit. When the use edits an item and clicks the save button he gets back to
> the previous page. This is done by simply calling
> setResponsePage(.class);. The problem here is that always the
> first page of the list will be displayed and not the one when the user
> clicked the item for editing.
>
> As setResponePage() also takes an Page object I thought about passing the
> object of the Page from the previous Request to the method which was stored
> in the session so the page with the list would show exactly the state when
> the user clicked the item for editing.
>
> Perhaps I'm totally wrong on this. But I thought it would be easier than
> passing the current page number of the list to the edit page and use it
> there to jump back to the correct list page after editing of the item was
> finished.
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/How-to-get-request-page-in-Wicket-1-5-tp3827411p3829284.html
> Sent from the Users forum 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: AttributeModifier and AjaxLink in 1.5

2011-09-21 Thread Marcel Hoerr
works perfectly, thanks a lot.

 Original-Nachricht 
> Datum: Wed, 21 Sep 2011 16:56:54 +0300
> Von: Martin Grigorov 
> An: users@wicket.apache.org
> Betreff: Re: AttributeModifier and AjaxLink in 1.5

> in 1.5 AjaxLink adds its AjaxEventBehavior in its #onInitialize()
> method. that's why it comes second
> You'll have to override onInitialize and add your behavior there
> 
> On Wed, Sep 21, 2011 at 4:52 PM, Marcel Hoerr  wrote:
> > hey guys,
> >
> > i have a problem with an AttributeModifer and an AjaxLink in wicket 1.5.
> we havea custom AttributeModifier ("onclick") which basicly adds a
> javascript confirm to the given component (Button or in this case an 
> AjaxLink).
> >
> > in wicket 1.4 the AttributeModifier is added after the AjaxEventBehavior
> (and its "onclick") of the AjaxLink, in wicket 1.5 the AttributeModifier
> comes first and gets overriden by the AjaxEventBehavior of the AjaxLink.
> >
> > is this a bug or a feature?
> > --
> > Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
> > belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
> 
> 
> 
> -- 
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 

-- 
NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie!   
Jetzt informieren: http://www.gmx.net/de/go/freephone

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



Re: AttributeModifier and AjaxLink in 1.5

2011-09-21 Thread Bas Gooren
Since you want to decorate the javascript generated by the AjaxLink, why 
not override AjaxLink#getAjaxCallDecorator() and override the generated 
javascript in #decorateScript()?


This is how we do it, albeit internally since we've created an 
AjaxConfirmLink subclass:


@Override
protected IAjaxCallDecorator getAjaxCallDecorator()
{
final String confirmation = Javascript.escapeSingle( 
confirmModel.getObject().toString() );


return new AjaxCallDecorator()
{

@Override
public CharSequence decorateScript( CharSequence script )
{
return String.format( "if( !confirm('%s') ) return 
false; %s", confirmation, script );

}

};
}

Op 21-9-2011 15:56, schreef Martin Grigorov:

in 1.5 AjaxLink adds its AjaxEventBehavior in its #onInitialize()
method. that's why it comes second
You'll have to override onInitialize and add your behavior there

On Wed, Sep 21, 2011 at 4:52 PM, Marcel Hoerr  wrote:

hey guys,

i have a problem with an AttributeModifer and an AjaxLink in wicket 1.5. we havea custom 
AttributeModifier ("onclick") which basicly adds a javascript confirm to the 
given component (Button or in this case an AjaxLink).

in wicket 1.4 the AttributeModifier is added after the AjaxEventBehavior (and its 
"onclick") of the AjaxLink, in wicket 1.5 the AttributeModifier comes first and 
gets overriden by the AjaxEventBehavior of the AjaxLink.

is this a bug or a feature?
--
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de

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







Re: creating a textarea with a radiobutton using Listview

2011-09-21 Thread manuelbarzi
yet another example on RadioGroup with DataView repeater
https://cwiki.apache.org/WICKET/using-radiogroups.html
.



On Wed, Sep 21, 2011 at 3:44 PM, manuelbarzi  wrote:
> see if this doc on ListView + Checkboxes may give you a hint
> https://cwiki.apache.org/WICKET/listview-with-checkboxes.html
> .
>
>
>
> On Wed, Sep 21, 2011 at 2:18 PM, wholalotta  wrote:
>> Thanks but still couldnt figure out how will i set the boolean values
>> according to the selected radiobutton in List? Can I do something with the
>> index value? Is it stored in radiogroup that I attached my List into?
>>
>> Accessing the cell/row index:
>>
>> protected void populateItem(ListItem item) {
>>        // cell index
>>        item.getIndex();
>>
>>        // row index
>>        ((Item)item.getParent().getParent()).getIndex();
>> }
>>
>> --
>> View this message in context: 
>> http://apache-wicket.1842946.n4.nabble.com/creating-a-textarea-with-a-radiobutton-using-Listview-tp3829602p3829760.html
>> Sent from the Users forum 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: AttributeModifier and AjaxLink in 1.5

2011-09-21 Thread Martin Grigorov
in 1.5 AjaxLink adds its AjaxEventBehavior in its #onInitialize()
method. that's why it comes second
You'll have to override onInitialize and add your behavior there

On Wed, Sep 21, 2011 at 4:52 PM, Marcel Hoerr  wrote:
> hey guys,
>
> i have a problem with an AttributeModifer and an AjaxLink in wicket 1.5. we 
> havea custom AttributeModifier ("onclick") which basicly adds a javascript 
> confirm to the given component (Button or in this case an AjaxLink).
>
> in wicket 1.4 the AttributeModifier is added after the AjaxEventBehavior (and 
> its "onclick") of the AjaxLink, in wicket 1.5 the AttributeModifier comes 
> first and gets overriden by the AjaxEventBehavior of the AjaxLink.
>
> is this a bug or a feature?
> --
> Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
> belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



AttributeModifier and AjaxLink in 1.5

2011-09-21 Thread Marcel Hoerr
hey guys,

i have a problem with an AttributeModifer and an AjaxLink in wicket 1.5. we 
havea custom AttributeModifier ("onclick") which basicly adds a javascript 
confirm to the given component (Button or in this case an AjaxLink).

in wicket 1.4 the AttributeModifier is added after the AjaxEventBehavior (and 
its "onclick") of the AjaxLink, in wicket 1.5 the AttributeModifier comes first 
and gets overriden by the AjaxEventBehavior of the AjaxLink.

is this a bug or a feature?
-- 
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de

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



Re: creating a textarea with a radiobutton using Listview

2011-09-21 Thread manuelbarzi
see if this doc on ListView + Checkboxes may give you a hint
https://cwiki.apache.org/WICKET/listview-with-checkboxes.html
.



On Wed, Sep 21, 2011 at 2:18 PM, wholalotta  wrote:
> Thanks but still couldnt figure out how will i set the boolean values
> according to the selected radiobutton in List? Can I do something with the
> index value? Is it stored in radiogroup that I attached my List into?
>
> Accessing the cell/row index:
>
> protected void populateItem(ListItem item) {
>        // cell index
>        item.getIndex();
>
>        // row index
>        ((Item)item.getParent().getParent()).getIndex();
> }
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/creating-a-textarea-with-a-radiobutton-using-Listview-tp3829602p3829760.html
> Sent from the Users forum 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: BookmarkablePageLink works differently in 1.5?

2011-09-21 Thread Chris Colman
>maybe it is because of the placeholders in the mount path.
>remove them and use just the API for indexed parameters to set/get them.

By placeholders do you mean this part:

/${dummy_o}/${o}/${dummy_c}/${c}

in

mountPage("/content/product/${dummy_o}/${o}/${dummy_c}/${c}");

?

I had them there so that it 'defines' the named parameters so that all existing 
code that reads parameter values can continue to work unchanged.

Eg., 

Existing code like:

parameters.get("o").toString(); 
(this had to be changed slightly to conform to 1.5 method names)

should still work which is preferable to changing all parameter reading code to 
indexed based parameters.

I guess that by adding name/value pairs as a suffix in the mount it is actually 
extending the mount point to include those extra name/value pairs which is why 
the ../../ is being added to the link's URL.

In 1.4.x we never had to 'define' these name/value pairs and so the mount point 
never included them.


>
>On Wed, Sep 21, 2011 at 2:40 PM, Chris Colman
> wrote:
>> Some of the pages are working now but the generated HTML code sure has
>some interest URLs:
>>
>> 
>> Getting started
>>
>> The href value has a few too many '/' slashes in it for my liking. Any
>idea why it might be adding so many slashes?
>>
>> The links work ok but look very strange.
>>
>> In 1.4 the links looked normal with no ../../ and /
>>
>> Any ideas what might be causing this?
>>
>>
>>
>>>-Original Message-
>>>From: Chris Colman [mailto:chr...@stepaheadsoftware.com]
>>>Sent: Wednesday, 21 September 2011 4:17 PM
>>>To: users@wicket.apache.org
>>>Subject: RE: BookmarkablePageLink works differently in 1.5?
>>>
i meant:

mount(new MountedMapper("/content/home", HomePage.class, new
MyCustomPageParameterEncoder());

-igor
>>>
>>>Arh! I didn't think of that.
>>>
>>>Would the PageParameterEncoder passed into the MountedMapper be used by
>any
>>>BookmarkablePageLink instance when it encodes the URL or does the encoder
>>>need to be separately specified for the BookmarkablePageLink?
>>>

On Tue, Sep 20, 2011 at 9:12 PM, Chris Colman
 wrote:
> The pages are mounted but with 1.4 I mounted them all like:
>
> mountPage("/content/home");
> mountPage("/content/about");
> mountPage("/content/product");
> ...
>
> Any links to the page would suffix the parameters to the mount point
like:
>
> /content/home/o/123
> /content/about/o/123
> /content/product/o/123/p/756
> ...
>
> With 1.4 I could mount them all in a similar way and let the page
>itself
interpret the parameters according to what it expected.
>
> I guess in 1.5 I will have to mount each page in a way that explicitly
declares its particular parameter composition:
>
> mountPage("/content/home/${dummy_o}/${o}");
> mountPage("/content/about/${dummy_o}/${o}");
> mountPage("/content/product/${dummy_o}/${o}/${dummy_c}/${c}");
> ...
>
> I kind of arrived at that conclusion yesterday. The problem I was
>having
today was more to do with getting BookmarkablePageLink to produce URLs
>>>with
the /n/v/ style instead of the ?n=v style but I think I've almost worked
that out.
>
> I have to simulate the name/value pairing of 1.4 /n/v style parameters
>>>by
outputting a dummy parameter name (where the name used to be in 1.4) and
the real value.
>
>
>
>>-Original Message-
>>From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com]
>>Sent: Wednesday, 21 September 2011 12:25 PM
>>To: users@wicket.apache.org
>>Subject: Re: BookmarkablePageLink works differently in 1.5?
>>
>>mountmapper also uses pageparameters, can you not mount your
>pages?
>>
>>-igor
>>
>>
>>On Tue, Sep 20, 2011 at 6:31 PM, Chris Colman
>> wrote:
>>> It looks like the parameter encoding/decoding is all done via the
>>> interface:
>>>
>>> IPageParametersEncoder
>>>
>>> Which has only a single implementation which obviously
>encodes/decodes
>>> the  new 1.5 style.
>>>
>>> Would it be possible to provide a 1.4 legacy implementation of
>>> IPageParametersEncoder to allowing upgrading a 1.4 wicket
>application
to
>>> 1.5 but maintain support for existing URLs that already exist for
>the
>>> 1.4 built web application?
>>>
>>> Could the setting of the IPageParameterEncoder implementation be an
>>> application or page setting?
>>>
-Original Message-
From: Chris Colman [mailto:chr...@stepaheadsoftware.com]
Sent: Wednesday, 21 September 2011 11:14 AM
To: users@wicket.apache.org
Subject: BookmarkablePageLink works differently in 1.5?

It seems that in Wicket 1.5 BookmarkablePageLink's produce URLs that
employ query parameters

Eg.,

?name1=value1&name2=value2

instead of 

Re: Peculiar Redirect Behaviour

2011-09-21 Thread Martin Grigorov
2011/9/21 Frédéric Donckels :
>> It seems to be (yet another) WebSphere issue...
> It seems to be the case, indeed (no issue with JBoss, for example).
>
> Any idea how I could address this?
I have no good solution...
As final resort you can create your WebSphereServletWebResponse that
extends ServletWebResponse and makes #sendRedirect() working for WS.
Register it by overriding
org.apache.wicket.protocol.http.WebApplication.newWebResponse(WebRequest,
HttpServletResponse)
>
> Regards,
>
> Frédéric
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Re: Peculiar Redirect Behaviour

2011-09-21 Thread Frédéric Donckels
> It seems to be (yet another) WebSphere issue...
It seems to be the case, indeed (no issue with JBoss, for example).

Any idea how I could address this?

Regards,

Frédéric

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



Re: Peculiar Redirect Behaviour

2011-09-21 Thread Martin Grigorov
It seems to be (yet another) WebSphere issue...

encodeURL() and encodeRedirectURL() doesn't mandate by Servlet spec
absolute URLs.
javax.servlet.http.HttpServletResponse.sendRedirect(String) is the one
that cares to make the URL absolute.

Let says you are at http://www.example.com/page1
then you make setResponsePage(SomePage.class) so the new URL should be
'wicket/bookmarkable/com.example.SomePage' and this is the key for the
buffered/stored response.

No matter whether you send
http://www.example.com/wicket/bookmarkable/com.example.SomePage (for
non-Ajax #sendRedirect() should make it absolute by spec) or
wicket/bookmarkable/com.example.SomePage (for Ajax this is enough for
document.location to make the new url) at the end the Request's Url in
the second request should be the same and it will be used as a key to
check whether there is a stored response to render.

The absolute url that is removed in this fix would break many
applications which are behind a reverse proxy. Working with relative
Urls is preferred.

2011/9/21 Frédéric Donckels :
> Hi Martin,
>
> Tried to reach you on ##wicket, but you just left :)
>
> As part of https://issues.apache.org/jira/browse/WICKET-3885
> in ServletWebResponse, in the sendRedirect(..) method,
>
> you made the following change:
>                        redirect = true;
>                        url = getAbsoluteURL(url);  -> removed
>                        url = encodeRedirectURL(url);
>
> This makes the url encoding directly delegated to the container
> servlet response.
>
> This breaks the bookmarkable links on Webpshere with Wicket 1.5 after RC 5.1
>
> I have a link to another page created using bookmarkable page link.
> When in the WebPageRenderer, the storeBufferedResponse(..) method is
> called, the url object contains wicket / bookmarkable / com.viveo
> segements. This is used to created the key for the buffered response.
>
> When the redirect is written to the response instance, without the
> getAbsoluteURL, the "wicket/bookmarkable" part is not written in the
> answer. This, later, when the redirect is handled, makes it impossible
> to retrieve the buffered response (the buffered mapper cannot build
> the proper id later without the wicket/bookmarkable part and the end
> result is 404) .
>
> If this is a fix for an ajax issue, could it be done only in the
> "isAjax()" part of that method?
>
> Regards,
>
> Frederic
>
>
>
>
> On Wed, Aug 31, 2011 at 16:47, Martin Grigorov  wrote:
>> 2011/8/31 Frédéric Donckels :
>>> This happens with Wicket 1.5 RC7 on Websphere)
>>> (it looks, pending further investigations, but Websphere is insanely
>>> slow, that it doesn't happen within JBoss or if we use 1.5 RC 5.1)
>>>
>>> The page object is rendered in a buffered response but when the
>>> redirect for the web response is handled the server 404's.
>> what is the current url when Wicket looks in the map with stored responses ?
>>>
>>> When I step-by-step debug, inside WebApplication.hasBufferedResponse,
>>> I see two values:
>>> Vt5jB33iN64TTSvEKU4xchbwicket/bookmarkable/com.viveo.ingissa.alert.web.compliance.ComplianceListPage?2&riskType=ALERT.TRN.COFI
>> when this was saved you were at /something1
>>> and
>>> Vt5jB33iN64TTSvEKU4xchbcom.viveo.ingissa.alert.web.compliance.ComplianceListPage?2&riskType=ALERT.TRN.COFI
>> when this was generated you were at /wicket/bookmarkable/something2
>>>
>>> those are supposedly addressing the same buffered response but the
>>> keys are different. How could that be?
>>>
>>> What could be done to solve that?
>>>
>>> Regards,
>>>
>>> F.D.
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>>
>>
>>
>>
>> --
>> Martin Grigorov
>> jWeekend
>> Training, Consulting, Development
>> http://jWeekend.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
>
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Re: creating a textarea with a radiobutton using Listview

2011-09-21 Thread wholalotta
Thanks but still couldnt figure out how will i set the boolean values
according to the selected radiobutton in List? Can I do something with the
index value? Is it stored in radiogroup that I attached my List into?

Accessing the cell/row index:

protected void populateItem(ListItem item) {
// cell index
item.getIndex();

// row index
((Item)item.getParent().getParent()).getIndex();
}

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/creating-a-textarea-with-a-radiobutton-using-Listview-tp3829602p3829760.html
Sent from the Users forum 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: Peculiar Redirect Behaviour

2011-09-21 Thread Frédéric Donckels
Hi Martin,

Tried to reach you on ##wicket, but you just left :)

As part of https://issues.apache.org/jira/browse/WICKET-3885
in ServletWebResponse, in the sendRedirect(..) method,

you made the following change:
redirect = true;
url = getAbsoluteURL(url);  -> removed
url = encodeRedirectURL(url);

This makes the url encoding directly delegated to the container
servlet response.

This breaks the bookmarkable links on Webpshere with Wicket 1.5 after RC 5.1

I have a link to another page created using bookmarkable page link.
When in the WebPageRenderer, the storeBufferedResponse(..) method is
called, the url object contains wicket / bookmarkable / com.viveo
segements. This is used to created the key for the buffered response.

When the redirect is written to the response instance, without the
getAbsoluteURL, the "wicket/bookmarkable" part is not written in the
answer. This, later, when the redirect is handled, makes it impossible
to retrieve the buffered response (the buffered mapper cannot build
the proper id later without the wicket/bookmarkable part and the end
result is 404) .

If this is a fix for an ajax issue, could it be done only in the
"isAjax()" part of that method?

Regards,

Frederic




On Wed, Aug 31, 2011 at 16:47, Martin Grigorov  wrote:
> 2011/8/31 Frédéric Donckels :
>> This happens with Wicket 1.5 RC7 on Websphere)
>> (it looks, pending further investigations, but Websphere is insanely
>> slow, that it doesn't happen within JBoss or if we use 1.5 RC 5.1)
>>
>> The page object is rendered in a buffered response but when the
>> redirect for the web response is handled the server 404's.
> what is the current url when Wicket looks in the map with stored responses ?
>>
>> When I step-by-step debug, inside WebApplication.hasBufferedResponse,
>> I see two values:
>> Vt5jB33iN64TTSvEKU4xchbwicket/bookmarkable/com.viveo.ingissa.alert.web.compliance.ComplianceListPage?2&riskType=ALERT.TRN.COFI
> when this was saved you were at /something1
>> and
>> Vt5jB33iN64TTSvEKU4xchbcom.viveo.ingissa.alert.web.compliance.ComplianceListPage?2&riskType=ALERT.TRN.COFI
> when this was generated you were at /wicket/bookmarkable/something2
>>
>> those are supposedly addressing the same buffered response but the
>> keys are different. How could that be?
>>
>> What could be done to solve that?
>>
>> Regards,
>>
>> F.D.
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.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: BookmarkablePageLink works differently in 1.5?

2011-09-21 Thread Martin Grigorov
maybe it is because of the placeholders in the mount path.
remove them and use just the API for indexed parameters to set/get them.

On Wed, Sep 21, 2011 at 2:40 PM, Chris Colman
 wrote:
> Some of the pages are working now but the generated HTML code sure has some 
> interest URLs:
>
> 
> Getting started
>
> The href value has a few too many '/' slashes in it for my liking. Any idea 
> why it might be adding so many slashes?
>
> The links work ok but look very strange.
>
> In 1.4 the links looked normal with no ../../ and /
>
> Any ideas what might be causing this?
>
>
>
>>-Original Message-
>>From: Chris Colman [mailto:chr...@stepaheadsoftware.com]
>>Sent: Wednesday, 21 September 2011 4:17 PM
>>To: users@wicket.apache.org
>>Subject: RE: BookmarkablePageLink works differently in 1.5?
>>
>>>i meant:
>>>
>>>mount(new MountedMapper("/content/home", HomePage.class, new
>>>MyCustomPageParameterEncoder());
>>>
>>>-igor
>>
>>Arh! I didn't think of that.
>>
>>Would the PageParameterEncoder passed into the MountedMapper be used by any
>>BookmarkablePageLink instance when it encodes the URL or does the encoder
>>need to be separately specified for the BookmarkablePageLink?
>>
>>>
>>>On Tue, Sep 20, 2011 at 9:12 PM, Chris Colman
>>> wrote:
 The pages are mounted but with 1.4 I mounted them all like:

 mountPage("/content/home");
 mountPage("/content/about");
 mountPage("/content/product");
 ...

 Any links to the page would suffix the parameters to the mount point
>>>like:

 /content/home/o/123
 /content/about/o/123
 /content/product/o/123/p/756
 ...

 With 1.4 I could mount them all in a similar way and let the page itself
>>>interpret the parameters according to what it expected.

 I guess in 1.5 I will have to mount each page in a way that explicitly
>>>declares its particular parameter composition:

 mountPage("/content/home/${dummy_o}/${o}");
 mountPage("/content/about/${dummy_o}/${o}");
 mountPage("/content/product/${dummy_o}/${o}/${dummy_c}/${c}");
 ...

 I kind of arrived at that conclusion yesterday. The problem I was having
>>>today was more to do with getting BookmarkablePageLink to produce URLs
>>with
>>>the /n/v/ style instead of the ?n=v style but I think I've almost worked
>>>that out.

 I have to simulate the name/value pairing of 1.4 /n/v style parameters
>>by
>>>outputting a dummy parameter name (where the name used to be in 1.4) and
>>>the real value.



>-Original Message-
>From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com]
>Sent: Wednesday, 21 September 2011 12:25 PM
>To: users@wicket.apache.org
>Subject: Re: BookmarkablePageLink works differently in 1.5?
>
>mountmapper also uses pageparameters, can you not mount your pages?
>
>-igor
>
>
>On Tue, Sep 20, 2011 at 6:31 PM, Chris Colman
> wrote:
>> It looks like the parameter encoding/decoding is all done via the
>> interface:
>>
>> IPageParametersEncoder
>>
>> Which has only a single implementation which obviously encodes/decodes
>> the  new 1.5 style.
>>
>> Would it be possible to provide a 1.4 legacy implementation of
>> IPageParametersEncoder to allowing upgrading a 1.4 wicket application
>>>to
>> 1.5 but maintain support for existing URLs that already exist for the
>> 1.4 built web application?
>>
>> Could the setting of the IPageParameterEncoder implementation be an
>> application or page setting?
>>
>>>-Original Message-
>>>From: Chris Colman [mailto:chr...@stepaheadsoftware.com]
>>>Sent: Wednesday, 21 September 2011 11:14 AM
>>>To: users@wicket.apache.org
>>>Subject: BookmarkablePageLink works differently in 1.5?
>>>
>>>It seems that in Wicket 1.5 BookmarkablePageLink's produce URLs that
>>>employ query parameters
>>>
>>>Eg.,
>>>
>>>?name1=value1&name2=value2
>>>
>>>instead of the directory style parameters of 1.4.x
>>>
>>>Eg.,
>>>/name1/value1/name2/value2
>>>
>>>While this may not be a problem for new Wicket applications the
>>>thousands of URLs of existing 1.4 Wicket applications are referenced
>>>from many existing websites and search engines on the web.
>>>
>>>Is there a replacement for BookmarkablePageLink in 1.5 that can
>>produce
>>>the 1.4 style URLs? (Or could BookmarkablePageLink take an option like
>>>'legacyStyle' that, when set to true, will create legacy (1.4) style
>>>URLs?)
>>>
>>>Regards,
>>>Chris
>>>
>>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>
>-
>To unsubscribe, e-mail

Re: Redirect behaves differently between 1.4.15 and 1.4.18

2011-09-21 Thread Martin Grigorov
I'm not sure whether you are Maven user but if you are then create a
new quickstart project
(http://wicket.apache.org/start/quickstart.html), put your files in it
and attach the zipped application to a ticket in our Jira.

To run the test in your zip I'll have to create the application
myself, copy your files in it, ...
It is not that much but I prefer to do it with your help.

On Wed, Sep 21, 2011 at 2:43 PM, Gert-Jan Schouten
 wrote:
> How is the zip incomplete? It's a unit-test, so it does not run standalone.
> It requires either wicket-1.4.15 or wicket-1.4.18 to be on the classpath.
> wicket.apache.org/help says: "We can help you much quicker if you provide us
> with a JUnit test case that demonstrates your issue. e.g. if you think
> you’ve found a bug, can you create a test case to demonstrate the bug?" So,
> that's what I did.
>
> Also there is no "error". It's just an assertion that fails in one case and
> succeeds in the other. I've done some further investigation and it appears
> that MockHttpServletResponse.redirectLocation has the correct value with
> 1.4.15, but has null with 1.4.18.
>
> It appears that MockHttpServletResponse.initialize() is run only once with
> 1.4.15, but is run TWICE with 1.4.18, thereby setting redirectLocation to
> null again.
>
> I appreciate the help and if you have any other requirements for my unit
> test, please let me know.
>
> Cheers,
>
>
> Gert-Jan Schouten
> Java Developer
>
> Roboreus
> 1 New Oxford Street
> London WC1a 1NU
> T: +44 (0) 7832916802
> E: gert-jan.schou...@roboreus.com
> Skype: gert.jan.schouten
>
> On 21/09/11 12:17, Martin Grigorov wrote:
>
> Check what is the redirect url and what you expect. I guess it is a
> matter of single character.
> Your .zip is incomplete and I'll have to spend my time to finish it
> and debug it.
>
> At least paste the error.
>
> On Wed, Sep 21, 2011 at 12:25 PM, Gert-Jan Schouten
>  wrote:
>
> Hello all!
>
> As I haven't received a single response yet, even though I created a unit
> test that fails after upgrading to a new version, which seems serious to me,
> I would like to ask you again:
>
> This week we upgraded to Wicket 1.4.18 from 1.4.15 and suddenly, our unit
> tests started failing. It seems that it is caused by the fact that redirect
> behave differently. I have attached a unit test that demostrates this. It
> passes with 1.4.15, but fails with 1.4.18. To spare you the effort of
> unpacking the zip, here's the test class (Note: Page1 is a simple WebPage
> that redirects to Page2 in it's onInitialize(), all classes are in the zip):
>
> package com.roboreus.geosweep.wicket;
>
> import org.apache.wicket.PageParameters;
> import org.apache.wicket.RequestCycle;
> import org.apache.wicket.util.tester.WicketTester;
> import org.junit.Test;
>
> import static junit.framework.Assert.assertTrue;
>
> public class RedirectTest {
>
>     @Test
>     public void testRedirect() throws Exception {
>
>         WicketTester tester = new WicketTester();
>         tester.startPage(Page1.class);
>
>         assertTrue("Redirect expected",
> tester.getServletResponse().isRedirect());
>         String redirectLocation =
> tester.getServletResponse().getRedirectLocation();
>         assertTrue("Expected redirect location",
> !(redirectLocation.isEmpty()));
>
>         String redirectUrl = RequestCycle.get().urlFor(Page2.class, new
> PageParameters()).toString();
>         assertTrue("Expected redirect to '" + redirectUrl + "', but instead
> got one to '" + redirectLocation + "'.",
>                    redirectLocation.contains(redirectUrl));
>     }
> }
>
> Do any of you know the cause of this and how to solve it?
>
> Thanks and regards!
>
> Gert-Jan Schouten
>
>
> --
>
> Gert-Jan Schouten
> Java Developer
>
> Roboreus
> 1 New Oxford Street
> London WC1a 1NU
> T: +44 (0) 7832916802
> E: gert-jan.schou...@roboreus.com
> Skype: gert.jan.schouten
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>
>
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



RE: ModalWindow problem

2011-09-21 Thread Sotil Bertanzetti, Matteo
Is there another option?, I would have to do a lot of changes to implement 
Panel backed ModalWindow. 

Maybe I stay on wicket 1.4 for a while.

Matteo Sotil

-Missatge original-
De: Martin Grigorov [mailto:mgrigo...@apache.org] 
Enviat: miércoles, 21 de septiembre de 2011 13:19
Per a: users@wicket.apache.org
Tema: Re: ModalWindow problem

On Wed, Sep 21, 2011 at 12:25 PM, Sotil Bertanzetti, Matteo
 wrote:
> Thanks for responding.
>
> I'm using a dynamic model (PropertyModel) but it doesn't work either.
> For me it's an important loss of functionality. I use it on modal
> windows, to show a search page (with TabbedPanel, list with
> pagination...) and select one register; could you please suggest me some
> alternative?.

Use ModalWindow backed by a Panel instead of a Page. It is much more stable.
There are many tickets for ModalWindow backed by a Page.

>
> Thank you.
>
> Matteo Sotil
>
> -Missatge original-
> De: Andrea Del Bene [mailto:adelb...@ciseonweb.it]
> Enviat: martes, 20 de septiembre de 2011 18:16
> Per a: users@wicket.apache.org
> Tema: Re: ModalWindow problem
>
> Hi,
>
> we dealt this topic in this issue:
>
> https://issues.apache.org/jira/browse/WICKET-3809
>
> Basically starting from Wicket 1.5 you can't share static models between
>
> pages.
>> Hello.
>>
>>
>>
>> I have a problem with ModalWindow in wicket 1.5.0.
>>
>> I create a ModalWindow from a page, and that modal window changes
>> original page's model; some textfields should change their value
>> according to model change, but they not; in fact seems as if model had
>> not really changed. ModalWindow's content is a page, not a component;
> if
>> I use a component as content, it works, but I need it to be a page.
> This
>> worked correctly on wicket 1.4.18.
>>
>>
>>
>> Matteo Sotil
>>
>> 935526855
>>
>> mso...@gencat.cat
>>
>>
>
>
> -
> 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
>
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Re: Redirect behaves differently between 1.4.15 and 1.4.18

2011-09-21 Thread Gert-Jan Schouten
How is the zip incomplete? It's a unit-test, so it does not run 
standalone. It requires either wicket-1.4.15 or wicket-1.4.18 to be on 
the classpath. wicket.apache.org/help says: "We can help you much 
quicker if you provide us with a JUnit test case that demonstrates your 
issue. e.g. if you think you’ve found a bug, can you create a test case 
to demonstrate the bug?" So, that's what I did.


Also there is no "error". It's just an assertion that fails in one case 
and succeeds in the other. I've done some further investigation and it 
appears that MockHttpServletResponse.redirectLocation has the correct 
value with 1.4.15, but has null with 1.4.18.


It appears that MockHttpServletResponse.initialize() is run only once 
with 1.4.15, but is run TWICE with 1.4.18, thereby setting 
redirectLocation to null again.


I appreciate the help and if you have any other requirements for my unit 
test, please let me know.


Cheers,


*Gert-Jan Schouten
Java Developer*

Roboreus
1 New Oxford Street
London WC1a 1NU
T: +44 (0) 7832916802
E: gert-jan.schou...@roboreus.com
Skype: gert.jan.schouten


On 21/09/11 12:17, Martin Grigorov wrote:

Check what is the redirect url and what you expect. I guess it is a
matter of single character.
Your .zip is incomplete and I'll have to spend my time to finish it
and debug it.

At least paste the error.

On Wed, Sep 21, 2011 at 12:25 PM, Gert-Jan Schouten
  wrote:

Hello all!

As I haven't received a single response yet, even though I created a unit
test that fails after upgrading to a new version, which seems serious to me,
I would like to ask you again:

This week we upgraded to Wicket 1.4.18 from 1.4.15 and suddenly, our unit
tests started failing. It seems that it is caused by the fact that redirect
behave differently. I have attached a unit test that demostrates this. It
passes with 1.4.15, but fails with 1.4.18. To spare you the effort of
unpacking the zip, here's the test class (Note: Page1 is a simple WebPage
that redirects to Page2 in it's onInitialize(), all classes are in the zip):

package com.roboreus.geosweep.wicket;

import org.apache.wicket.PageParameters;
import org.apache.wicket.RequestCycle;
import org.apache.wicket.util.tester.WicketTester;
import org.junit.Test;

import static junit.framework.Assert.assertTrue;

public class RedirectTest {

 @Test
 public void testRedirect() throws Exception {

 WicketTester tester = new WicketTester();
 tester.startPage(Page1.class);

 assertTrue("Redirect expected",
tester.getServletResponse().isRedirect());
 String redirectLocation =
tester.getServletResponse().getRedirectLocation();
 assertTrue("Expected redirect location",
!(redirectLocation.isEmpty()));

 String redirectUrl = RequestCycle.get().urlFor(Page2.class, new
PageParameters()).toString();
 assertTrue("Expected redirect to '" + redirectUrl + "', but instead
got one to '" + redirectLocation + "'.",
redirectLocation.contains(redirectUrl));
 }
}

Do any of you know the cause of this and how to solve it?

Thanks and regards!

Gert-Jan Schouten


--

Gert-Jan Schouten
Java Developer

Roboreus
1 New Oxford Street
London WC1a 1NU
T: +44 (0) 7832916802
E: gert-jan.schou...@roboreus.com
Skype: gert.jan.schouten

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






RE: BookmarkablePageLink works differently in 1.5?

2011-09-21 Thread Chris Colman
Some of the pages are working now but the generated HTML code sure has some 
interest URLs:


Getting started

The href value has a few too many '/' slashes in it for my liking. Any idea why 
it might be adding so many slashes?

The links work ok but look very strange.

In 1.4 the links looked normal with no ../../ and /

Any ideas what might be causing this?



>-Original Message-
>From: Chris Colman [mailto:chr...@stepaheadsoftware.com]
>Sent: Wednesday, 21 September 2011 4:17 PM
>To: users@wicket.apache.org
>Subject: RE: BookmarkablePageLink works differently in 1.5?
>
>>i meant:
>>
>>mount(new MountedMapper("/content/home", HomePage.class, new
>>MyCustomPageParameterEncoder());
>>
>>-igor
>
>Arh! I didn't think of that.
>
>Would the PageParameterEncoder passed into the MountedMapper be used by any
>BookmarkablePageLink instance when it encodes the URL or does the encoder
>need to be separately specified for the BookmarkablePageLink?
>
>>
>>On Tue, Sep 20, 2011 at 9:12 PM, Chris Colman
>> wrote:
>>> The pages are mounted but with 1.4 I mounted them all like:
>>>
>>> mountPage("/content/home");
>>> mountPage("/content/about");
>>> mountPage("/content/product");
>>> ...
>>>
>>> Any links to the page would suffix the parameters to the mount point
>>like:
>>>
>>> /content/home/o/123
>>> /content/about/o/123
>>> /content/product/o/123/p/756
>>> ...
>>>
>>> With 1.4 I could mount them all in a similar way and let the page itself
>>interpret the parameters according to what it expected.
>>>
>>> I guess in 1.5 I will have to mount each page in a way that explicitly
>>declares its particular parameter composition:
>>>
>>> mountPage("/content/home/${dummy_o}/${o}");
>>> mountPage("/content/about/${dummy_o}/${o}");
>>> mountPage("/content/product/${dummy_o}/${o}/${dummy_c}/${c}");
>>> ...
>>>
>>> I kind of arrived at that conclusion yesterday. The problem I was having
>>today was more to do with getting BookmarkablePageLink to produce URLs
>with
>>the /n/v/ style instead of the ?n=v style but I think I've almost worked
>>that out.
>>>
>>> I have to simulate the name/value pairing of 1.4 /n/v style parameters
>by
>>outputting a dummy parameter name (where the name used to be in 1.4) and
>>the real value.
>>>
>>>
>>>
-Original Message-
From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com]
Sent: Wednesday, 21 September 2011 12:25 PM
To: users@wicket.apache.org
Subject: Re: BookmarkablePageLink works differently in 1.5?

mountmapper also uses pageparameters, can you not mount your pages?

-igor


On Tue, Sep 20, 2011 at 6:31 PM, Chris Colman
 wrote:
> It looks like the parameter encoding/decoding is all done via the
> interface:
>
> IPageParametersEncoder
>
> Which has only a single implementation which obviously encodes/decodes
> the  new 1.5 style.
>
> Would it be possible to provide a 1.4 legacy implementation of
> IPageParametersEncoder to allowing upgrading a 1.4 wicket application
>>to
> 1.5 but maintain support for existing URLs that already exist for the
> 1.4 built web application?
>
> Could the setting of the IPageParameterEncoder implementation be an
> application or page setting?
>
>>-Original Message-
>>From: Chris Colman [mailto:chr...@stepaheadsoftware.com]
>>Sent: Wednesday, 21 September 2011 11:14 AM
>>To: users@wicket.apache.org
>>Subject: BookmarkablePageLink works differently in 1.5?
>>
>>It seems that in Wicket 1.5 BookmarkablePageLink's produce URLs that
>>employ query parameters
>>
>>Eg.,
>>
>>?name1=value1&name2=value2
>>
>>instead of the directory style parameters of 1.4.x
>>
>>Eg.,
>>/name1/value1/name2/value2
>>
>>While this may not be a problem for new Wicket applications the
>>thousands of URLs of existing 1.4 Wicket applications are referenced
>>from many existing websites and search engines on the web.
>>
>>Is there a replacement for BookmarkablePageLink in 1.5 that can
>produce
>>the 1.4 style URLs? (Or could BookmarkablePageLink take an option like
>>'legacyStyle' that, when set to true, will create legacy (1.4) style
>>URLs?)
>>
>>Regards,
>>Chris
>>
>>
>
> -
> 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: ModalWindow problem

2011-09-21 Thread Martin Grigorov
On Wed, Sep 21, 2011 at 12:25 PM, Sotil Bertanzetti, Matteo
 wrote:
> Thanks for responding.
>
> I'm using a dynamic model (PropertyModel) but it doesn't work either.
> For me it's an important loss of functionality. I use it on modal
> windows, to show a search page (with TabbedPanel, list with
> pagination...) and select one register; could you please suggest me some
> alternative?.

Use ModalWindow backed by a Panel instead of a Page. It is much more stable.
There are many tickets for ModalWindow backed by a Page.

>
> Thank you.
>
> Matteo Sotil
>
> -Missatge original-
> De: Andrea Del Bene [mailto:adelb...@ciseonweb.it]
> Enviat: martes, 20 de septiembre de 2011 18:16
> Per a: users@wicket.apache.org
> Tema: Re: ModalWindow problem
>
> Hi,
>
> we dealt this topic in this issue:
>
> https://issues.apache.org/jira/browse/WICKET-3809
>
> Basically starting from Wicket 1.5 you can't share static models between
>
> pages.
>> Hello.
>>
>>
>>
>> I have a problem with ModalWindow in wicket 1.5.0.
>>
>> I create a ModalWindow from a page, and that modal window changes
>> original page's model; some textfields should change their value
>> according to model change, but they not; in fact seems as if model had
>> not really changed. ModalWindow's content is a page, not a component;
> if
>> I use a component as content, it works, but I need it to be a page.
> This
>> worked correctly on wicket 1.4.18.
>>
>>
>>
>> Matteo Sotil
>>
>> 935526855
>>
>> mso...@gencat.cat
>>
>>
>
>
> -
> 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
>
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Re: Redirect behaves differently between 1.4.15 and 1.4.18

2011-09-21 Thread Martin Grigorov
Check what is the redirect url and what you expect. I guess it is a
matter of single character.
Your .zip is incomplete and I'll have to spend my time to finish it
and debug it.

At least paste the error.

On Wed, Sep 21, 2011 at 12:25 PM, Gert-Jan Schouten
 wrote:
> Hello all!
>
> As I haven't received a single response yet, even though I created a unit
> test that fails after upgrading to a new version, which seems serious to me,
> I would like to ask you again:
>
> This week we upgraded to Wicket 1.4.18 from 1.4.15 and suddenly, our unit
> tests started failing. It seems that it is caused by the fact that redirect
> behave differently. I have attached a unit test that demostrates this. It
> passes with 1.4.15, but fails with 1.4.18. To spare you the effort of
> unpacking the zip, here's the test class (Note: Page1 is a simple WebPage
> that redirects to Page2 in it's onInitialize(), all classes are in the zip):
>
> package com.roboreus.geosweep.wicket;
>
> import org.apache.wicket.PageParameters;
> import org.apache.wicket.RequestCycle;
> import org.apache.wicket.util.tester.WicketTester;
> import org.junit.Test;
>
> import static junit.framework.Assert.assertTrue;
>
> public class RedirectTest {
>
>     @Test
>     public void testRedirect() throws Exception {
>
>         WicketTester tester = new WicketTester();
>         tester.startPage(Page1.class);
>
>         assertTrue("Redirect expected",
> tester.getServletResponse().isRedirect());
>         String redirectLocation =
> tester.getServletResponse().getRedirectLocation();
>         assertTrue("Expected redirect location",
> !(redirectLocation.isEmpty()));
>
>         String redirectUrl = RequestCycle.get().urlFor(Page2.class, new
> PageParameters()).toString();
>         assertTrue("Expected redirect to '" + redirectUrl + "', but instead
> got one to '" + redirectLocation + "'.",
>                    redirectLocation.contains(redirectUrl));
>     }
> }
>
> Do any of you know the cause of this and how to solve it?
>
> Thanks and regards!
>
> Gert-Jan Schouten
>
>
> --
>
> Gert-Jan Schouten
> Java Developer
>
> Roboreus
> 1 New Oxford Street
> London WC1a 1NU
> T: +44 (0) 7832916802
> E: gert-jan.schou...@roboreus.com
> Skype: gert.jan.schouten
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Re: creating a textarea with a radiobutton using Listview

2011-09-21 Thread manuelbarzi
may repeaters usage help you
https://cwiki.apache.org/WICKET/listview-and-other-repeaters.html
.



On Wed, Sep 21, 2011 at 1:08 PM, wholalotta  wrote:
> Hi,
>
> I want to create a form which contains textareas and radiobuttons line by
> line like;
>
> Textarea Radiobutton
> Textarea Radiobutton
>
> My object to fill via a form contains two fields;
>
> public Class Line () {
>    private String textInput;
>    private Boolean isSelected;
> }
>
> My aim is to take some input from the user for the textareas and force user
> to set the boolean attributes of the object attached to the form true for
> only one of them. When I use checkbox, there is one problem, user can check
> all checkboxes and set the related boolean value as true. To eliminate this,
> I need to use radio. But in this time, When I use radiogroup, it doesnt
> allow me to put textareas between wicket radigroup tags. Because right now I
> am adding the textareas into the form and it says me that i need to add all
> components to this radiogroup instead of form. I do not want to display
> radiobuttons as a row or as a column. I want one textarea and one radibutton
> next to it which the radiobuttons are in the same group. How can I create
> this structure by using ListView. Right now I am thinking to get Listitem
> index value of the selected radiobutton and use it in a switch to set the
> boolean values of the fields.
>
> Any comments?
>
>
>
> Thanks
> Arda
>
>
>
>
>
>
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/creating-a-textarea-with-a-radiobutton-using-Listview-tp3829602p3829602.html
> Sent from the Users forum 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



creating a textarea with a radiobutton using Listview

2011-09-21 Thread wholalotta
Hi, 

I want to create a form which contains textareas and radiobuttons line by
line like;

Textarea Radiobutton
Textarea Radiobutton

My object to fill via a form contains two fields;

public Class Line () {
private String textInput;
private Boolean isSelected;
}

My aim is to take some input from the user for the textareas and force user
to set the boolean attributes of the object attached to the form true for
only one of them. When I use checkbox, there is one problem, user can check
all checkboxes and set the related boolean value as true. To eliminate this,
I need to use radio. But in this time, When I use radiogroup, it doesnt
allow me to put textareas between wicket radigroup tags. Because right now I
am adding the textareas into the form and it says me that i need to add all
components to this radiogroup instead of form. I do not want to display
radiobuttons as a row or as a column. I want one textarea and one radibutton
next to it which the radiobuttons are in the same group. How can I create
this structure by using ListView. Right now I am thinking to get Listitem
index value of the selected radiobutton and use it in a switch to set the
boolean values of the fields.

Any comments?



Thanks
Arda







--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/creating-a-textarea-with-a-radiobutton-using-Listview-tp3829602p3829602.html
Sent from the Users forum 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: ModalWindow problem

2011-09-21 Thread Sotil Bertanzetti, Matteo
Thanks for responding.

I'm using a dynamic model (PropertyModel) but it doesn't work either.
For me it's an important loss of functionality. I use it on modal
windows, to show a search page (with TabbedPanel, list with
pagination...) and select one register; could you please suggest me some
alternative?.

Thank you.

Matteo Sotil

-Missatge original-
De: Andrea Del Bene [mailto:adelb...@ciseonweb.it] 
Enviat: martes, 20 de septiembre de 2011 18:16
Per a: users@wicket.apache.org
Tema: Re: ModalWindow problem

Hi,

we dealt this topic in this issue:

https://issues.apache.org/jira/browse/WICKET-3809

Basically starting from Wicket 1.5 you can't share static models between

pages.
> Hello.
>
>
>
> I have a problem with ModalWindow in wicket 1.5.0.
>
> I create a ModalWindow from a page, and that modal window changes
> original page's model; some textfields should change their value
> according to model change, but they not; in fact seems as if model had
> not really changed. ModalWindow's content is a page, not a component;
if
> I use a component as content, it works, but I need it to be a page.
This
> worked correctly on wicket 1.4.18.
>
>
>
> Matteo Sotil
>
> 935526855
>
> mso...@gencat.cat
>
>


-
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 request page in Wicket 1.5

2011-09-21 Thread Florian B.
My idea is to store the current page within the session and use it on later
pages to navigate back to the previous page. 

For example I've got several pages with pageable lists of items the user can
edit. When the use edits an item and clicks the save button he gets back to
the previous page. This is done by simply calling
setResponsePage(.class);. The problem here is that always the
first page of the list will be displayed and not the one when the user
clicked the item for editing. 

As setResponePage() also takes an Page object I thought about passing the
object of the Page from the previous Request to the method which was stored
in the session so the page with the list would show exactly the state when
the user clicked the item for editing. 

Perhaps I'm totally wrong on this. But I thought it would be easier than
passing the current page number of the list to the edit page and use it
there to jump back to the correct list page after editing of the item was
finished. 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-get-request-page-in-Wicket-1-5-tp3827411p3829284.html
Sent from the Users forum 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: BookmarkablePageLink works differently in 1.5?

2011-09-21 Thread Chris Colman
>Use need to use PageParameters.set(int, Object) to add indexed parameter.
>I guess you pass #set(String, Object) instead.

Yes, I've just been finding all the code that builds BookmarkablePageLink's 
using the set(String, Object) method and converting it to set(int, Object). 
There's quite a lot of it! ;)

>
>See #testEncodeX() methods in
>org.apache.wicket.request.mapper.MountedMapperTest
>
>On Wed, Sep 21, 2011 at 9:17 AM, Chris Colman
> wrote:
>>>i meant:
>>>
>>>mount(new MountedMapper("/content/home", HomePage.class, new
>>>MyCustomPageParameterEncoder());
>>>
>>>-igor
>>
>> Arh! I didn't think of that.
>>
>> Would the PageParameterEncoder passed into the MountedMapper be used by
>any BookmarkablePageLink instance when it encodes the URL or does the
>encoder need to be separately specified for the BookmarkablePageLink?
>>
>>>
>>>On Tue, Sep 20, 2011 at 9:12 PM, Chris Colman
>>> wrote:
 The pages are mounted but with 1.4 I mounted them all like:

 mountPage("/content/home");
 mountPage("/content/about");
 mountPage("/content/product");
 ...

 Any links to the page would suffix the parameters to the mount point
>>>like:

 /content/home/o/123
 /content/about/o/123
 /content/product/o/123/p/756
 ...

 With 1.4 I could mount them all in a similar way and let the page
>itself
>>>interpret the parameters according to what it expected.

 I guess in 1.5 I will have to mount each page in a way that explicitly
>>>declares its particular parameter composition:

 mountPage("/content/home/${dummy_o}/${o}");
 mountPage("/content/about/${dummy_o}/${o}");
 mountPage("/content/product/${dummy_o}/${o}/${dummy_c}/${c}");
 ...

 I kind of arrived at that conclusion yesterday. The problem I was
>having
>>>today was more to do with getting BookmarkablePageLink to produce URLs
>with
>>>the /n/v/ style instead of the ?n=v style but I think I've almost worked
>>>that out.

 I have to simulate the name/value pairing of 1.4 /n/v style parameters
>by
>>>outputting a dummy parameter name (where the name used to be in 1.4) and
>>>the real value.



>-Original Message-
>From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com]
>Sent: Wednesday, 21 September 2011 12:25 PM
>To: users@wicket.apache.org
>Subject: Re: BookmarkablePageLink works differently in 1.5?
>
>mountmapper also uses pageparameters, can you not mount your pages?
>
>-igor
>
>
>On Tue, Sep 20, 2011 at 6:31 PM, Chris Colman
> wrote:
>> It looks like the parameter encoding/decoding is all done via the
>> interface:
>>
>> IPageParametersEncoder
>>
>> Which has only a single implementation which obviously
>encodes/decodes
>> the  new 1.5 style.
>>
>> Would it be possible to provide a 1.4 legacy implementation of
>> IPageParametersEncoder to allowing upgrading a 1.4 wicket application
>>>to
>> 1.5 but maintain support for existing URLs that already exist for the
>> 1.4 built web application?
>>
>> Could the setting of the IPageParameterEncoder implementation be an
>> application or page setting?
>>
>>>-Original Message-
>>>From: Chris Colman [mailto:chr...@stepaheadsoftware.com]
>>>Sent: Wednesday, 21 September 2011 11:14 AM
>>>To: users@wicket.apache.org
>>>Subject: BookmarkablePageLink works differently in 1.5?
>>>
>>>It seems that in Wicket 1.5 BookmarkablePageLink's produce URLs that
>>>employ query parameters
>>>
>>>Eg.,
>>>
>>>?name1=value1&name2=value2
>>>
>>>instead of the directory style parameters of 1.4.x
>>>
>>>Eg.,
>>>/name1/value1/name2/value2
>>>
>>>While this may not be a problem for new Wicket applications the
>>>thousands of URLs of existing 1.4 Wicket applications are referenced
>>>from many existing websites and search engines on the web.
>>>
>>>Is there a replacement for BookmarkablePageLink in 1.5 that can
>produce
>>>the 1.4 style URLs? (Or could BookmarkablePageLink take an option
>like
>>>'legacyStyle' that, when set to true, will create legacy (1.4) style
>>>URLs?)
>>>
>>>Regards,
>>>Chris
>>>
>>>
>>
>> -
>> 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


>>>
>>>--