Re: wicket tester & forms

2010-01-05 Thread Paul Szulc
I found more such problems. All described here:

http://paulszulc.wordpress.com/2009/08/03/wicket-testing-pitfalls-and-api-issues/

On Wed, Jan 6, 2010 at 7:28 AM, Martin Makundi <
martin.maku...@koodaripalvelut.com> wrote:

> With quickstart example that can reproduce the problem
>
> 2010/1/6 Martin Makundi :
> > Report in jira
> >
> > 2010/1/6 Douglas Ferguson :
> >> I just found an issue in wicket tester.
> >>
> >> If you submit a form with hidden fields it will attempt to set the
> models on those hidden fields.
> >>
> >> My app depends on this.
> >>
> >> D/
> >>
> >>
> >> -
> >> 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
>
>


-- 
Best regards,
Paul Szulc

http://paulszulc.wordpress.com


Re: wicket tester & forms

2010-01-05 Thread Martin Makundi
With quickstart example that can reproduce the problem

2010/1/6 Martin Makundi :
> Report in jira
>
> 2010/1/6 Douglas Ferguson :
>> I just found an issue in wicket tester.
>>
>> If you submit a form with hidden fields it will attempt to set the models on 
>> those hidden fields.
>>
>> My app depends on this.
>>
>> D/
>>
>>
>> -
>> 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: wicket tester & forms

2010-01-05 Thread Martin Makundi
Report in jira

2010/1/6 Douglas Ferguson :
> I just found an issue in wicket tester.
>
> If you submit a form with hidden fields it will attempt to set the models on 
> those hidden fields.
>
> My app depends on this.
>
> D/
>
>
> -
> 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



wicket tester & forms

2010-01-05 Thread Douglas Ferguson
I just found an issue in wicket tester.

If you submit a form with hidden fields it will attempt to set the models on 
those hidden fields.

My app depends on this.

D/


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



IE & Autocomplete JS

2010-01-05 Thread Douglas Ferguson
I'm am trying to debug some IE 8 issues with autocomplete and IE seems to be 
caching the Javascript.

Is there anything special about response.renderJavascriptReference(JS_RESOURCE) 
that would cause IE to hang onto it?

I have made changes to the js, then tested in firefox and I see the changes. In 
IE I still see the old behavior prior to the js change.

D/





Re: SV: Wicket and portlets JSR 286

2010-01-05 Thread Mansour Al Akeel
Thank you Tor:
I am using wicket 1.4.5. I was able to find some examples for events
but I am having difficulties getting my code to work with wicket. Here's a
refrence:
http://blog.xebia.com/2009/04/19/inter-portlet-coordination-with-jsr-286/

In my code I am trying to send the event from onClick, which I
think, resulting in an exception: 

WicketMessage: Method onLinkClicked of interface
org.apache.wicket.markup.html.link.ILinkListener targeted at component
[MarkupContainer [Component id = link]] threw an exception

Root cause:

java.lang.IllegalArgumentException: Payload has not the right class at
org.apache.jetspeed.events.EventCoordinationServiceImpl.createEvent(EventCoordinationServiceImpl.java:98)
 at
org.apache.jetspeed.container.providers.EventProviderImpl.createEvent(EventProviderImpl.java:49)
 at
org.apache.pluto.container.impl.StateAwareResponseImpl.setEvent(StateAwareResponseImpl.java:140)
 at
com.sardonyxsolutions.automotive.ReportSelectorView$1.onClick(ReportSelectorView.java:25)
at org.apache.wicket.markup.html.link.Link.onLinkClicked(Link.java:224)
at java.lang.reflect.Method.invoke(Method.java:597) at
org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:182)


And here's the correspoinding part of my code:

public ReportSelectorView() {
add(new Link("link") {
@Override
public void onClick() {

PortletRequestContext context = (PortletRequestContext) 
RequestContext .get();
ActionResponse response = (ActionResponse) context 
.getPortletResponse();
QName qname = new QName("http://example.com";, "ReportName");
ReportType report = new ReportType();
report.setReportPath("SomePath");
response.setEvent(qname, report);
System.out.println("Sending Event");
}
});
}


What I think I need to do, is to create an event within
processAction(request,responce) method in the portlet. The problem would
be to create an action event URL. 
I am still playing around trying to find my way. If you have any idea
please let me know. By the way, I am new to wicket, and I still don't
fully understand the concept of Models. Do you think Models can help
keeping the code simple and somving the issue in this case ? 

Any idea or advice, is highly appreciated.




On Tue Jan 05,2010 11:50 am, Wilhelmsen Tor Iver wrote:
> > I am having a problem finding a resource or an example for portlets
> > communications with events "processEvent(EventRequest request,
> > EventResponse response)"
> > how do I dispatch and event from wicket page? for example if I have a
> > ViewPage and I need to send an event to a subscribed portlet , how do
> > I do it ?
> 
> It seems WicketPortlet does not override GenericPortlet.processEvent() at 
> least as of 1.4.3; try subclassing WicketPortlet and add 
> @ProcessEvent(eventname) annotation to a method of your own.
> 
> As for routing you should be able to configure that in your container 
> combined with the relevant elements in portlet.xml. Dispatching is done via 
> the PortletResponse.setEvent() as the spec says.
> 
> - Tor Iver
> 
> -
> 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: DateTextField and DatePicker Default Date

2010-01-05 Thread Per Newgro

Check http://developer.yahoo.com/yui/calendar/#behavior


 Setting Configuration Options


Cheers
Per


DateTextField and DatePicker Default Date

2010-01-05 Thread wic...@geofflancaster.com
Is it possible to make the DateTextField and DatePicker (used together)
default to a specific date?

For example, right now it automatically puts in todays date. Can I make it
automatically put in 30 days before?


mail2web.com - Microsoft® Exchange solutions from a leading provider -
http://link.mail2web.com/Business/Exchange



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



Re: More than one access denied page

2010-01-05 Thread Fernando Wermus
I implemented the interface you mention on my own xxxAuthorizationStrategy,
but It doesnt work. I think this is because the user isnt authenticated and
he is trying to access a protected page.



On Tue, Jan 5, 2010 at 7:50 AM, Wilhelmsen Tor Iver wrote:

> > I would like to have two access denied pages according to some
> > parameters.
> > Is this possible?
>
> In your implementation of IUnauthorizedComponentInstantiationListener check
> for the parameters (e.g. placed into the request or the like) and set a
> different responsepage or redirect to a different page based on this.
>
> - Tor Iver
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: 301 Redirect

2010-01-05 Thread VGJ
Hmm...is there a better way?  I don't want to do anything
container/app-server specific, honestly.

I found this:

http://old.nabble.com/302-vs.-301-Redirect-ts14156515.html#a14156515

Is there still no way to perform a 301 redirect?  Any alternatives?

On Tue, Jan 5, 2010 at 9:35 AM, Martin Makundi <
martin.maku...@koodaripalvelut.com> wrote:

> It's jetty specific. You have to look at sources if this resolution
> works for you.
>
> **
> Martin
>
> 2010/1/5 VGJ :
> > Is "HttpStatus" Jetty-specific?  I'm unable to resolve the class.  I'll
> see
> > if I can somehow piece this together on the Glassfish side.
> >
> > Thanks.
> >
> > On Tue, Jan 5, 2010 at 9:10 AM, Martin Makundi <
> > martin.maku...@koodaripalvelut.com> wrote:
> >
> >> In WicketApplication.init()
> >>
> >> 2010/1/5 VGJ :
> >> > You'll have to forgive my ignorance - where in your app do you do
> this?
> >> >
> >> > On Tue, Jan 5, 2010 at 8:55 AM, Martin Makundi <
> >> > martin.maku...@koodaripalvelut.com> wrote:
> >> >
> >> >> This is what we do with jetty:
> >> >>
> >> >>try {
> >> >>  // Force 302 redirect status code into 301 'permanent redirect'
> >> >>  Field statusField =
> >> >> HttpStatus.class.getDeclaredField("__responseLine");
> >> >>  statusField.setAccessible(true);
> >> >>  Buffer[] responseLine = (Buffer[])
> >> statusField.get(HttpStatus.class);
> >> >>  byte[] bytes = responseLine[302].toString().replace("302",
> >> >> "301").getBytes();
> >> >>  responseLine[302] = new
> >> >> ByteArrayBuffer(bytes,0,bytes.length,Buffer.IMMUTABLE);
> >> >>} catch (Exception e) {
> >> >>  Utils.errorLog(getClass(), e);
> >> >>}
> >> >>
> >> >>
> >> >> 2010/1/5 VGJ :
> >> >> > Along with all of the SEO stuff I'm working on these days - I'm
> being
> >> >> asked
> >> >> > to use 301 redirects on the sites we're optimizing.  How would this
> be
> >> >> done
> >> >> > in with Wicket?  Are there alternatives, if not?
> >> >> >
> >> >> > Thanks!
> >> >> >
> >> >>
> >> >> -
> >> >> 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: Palette selector width and sort

2010-01-05 Thread wic...@geofflancaster.com
Ok, I figured that out. Is there a way to make the menus have horizontal
scroll bars?

Original Message:
-
From: Fatih Mehmet Ucar fmu...@gmail.com
Date: Tue, 5 Jan 2010 16:54:45 +
To: users@wicket.apache.org
Subject: Re: Palette selector width and sort


Palette palette = new Palette("palette", new Model(new ArrayList()), new
Model(
(Serializable)persons), renderer, 10, true){
public ResourceReference getCSS(){
  return .;
}
};


you can use firefox to get the original css.
copy all css to a new file
change width in css
and return that file inside getCSS above.


fmu


2010/1/5 wic...@geofflancaster.com :
> Any suggestions on how to do that?
>
> Original Message:
> -
> From: Fatih Mehmet Ucar fmu...@gmail.com
> Date: Tue, 5 Jan 2010 16:31:33 +
> To: users@wicket.apache.org
> Subject: Re: Palette selector width and sort
>
>
> for width, you can override css returning method in palette.
>
> 2010/1/5 wic...@geofflancaster.com :
>> How can I change the width of the "available" and "selected" menus on a
>> palette?
>>
>> Also, is it possible to sort the choices after they are moved between the
>> two menus so they aren't just appended to the end but sorted
> alphabetically?
>>
>> ie. moving an item from "available" to "selected" will sort items now in
>> "selected" and vice versa
>>
>>
>> 
>> mail2web.com – What can On Demand Business Solutions do for you?
>> http://link.mail2web.com/Business/SharePoint
>>
>>
>>
>> -
>> 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
>
>
>
> 
> mail2web.com – Enhanced email for the mobile individual based on
Microsoft®
> Exchange - http://link.mail2web.com/Personal/EnhancedEmail
>
>
>
> -
> 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




mail2web.com - Microsoft® Exchange solutions from a leading provider -
http://link.mail2web.com/Business/Exchange



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



add additional tinymce settinngs

2010-01-05 Thread tubin gen
I want to add addfitional setting to tinymce init

by default TinyMCESettings adds the follwoing


tinyMCE.init({
mode : "exact",
elements : "recommendation24c",
language : "en",
theme : "simple" });

please tell   me how to add the additional setting  ?

tinyMCE.init({
mode : "exact",
elements : "d_vsebina,d_cilji",
width : "100%",
content_css: "arial.css",
valid_elements : "p,ul[type],ol[type],li,b,i,u",
 paste_auto_cleanup_on_paste : true,
 paste_convert_headers_to_strong : false,
 paste_strip_class_attributes : "all"
});


Re: Palette selector width and sort

2010-01-05 Thread Fatih Mehmet Ucar
Palette palette = new Palette("palette", new Model(new ArrayList()), new Model(
(Serializable)persons), renderer, 10, true){
public ResourceReference getCSS(){
  return .;
}
};


you can use firefox to get the original css.
copy all css to a new file
change width in css
and return that file inside getCSS above.


fmu


2010/1/5 wic...@geofflancaster.com :
> Any suggestions on how to do that?
>
> Original Message:
> -
> From: Fatih Mehmet Ucar fmu...@gmail.com
> Date: Tue, 5 Jan 2010 16:31:33 +
> To: users@wicket.apache.org
> Subject: Re: Palette selector width and sort
>
>
> for width, you can override css returning method in palette.
>
> 2010/1/5 wic...@geofflancaster.com :
>> How can I change the width of the "available" and "selected" menus on a
>> palette?
>>
>> Also, is it possible to sort the choices after they are moved between the
>> two menus so they aren't just appended to the end but sorted
> alphabetically?
>>
>> ie. moving an item from "available" to "selected" will sort items now in
>> "selected" and vice versa
>>
>>
>> 
>> mail2web.com – What can On Demand Business Solutions do for you?
>> http://link.mail2web.com/Business/SharePoint
>>
>>
>>
>> -
>> 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
>
>
>
> 
> mail2web.com – Enhanced email for the mobile individual based on Microsoft®
> Exchange - http://link.mail2web.com/Personal/EnhancedEmail
>
>
>
> -
> 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: Palette selector width and sort

2010-01-05 Thread wic...@geofflancaster.com
Any suggestions on how to do that?

Original Message:
-
From: Fatih Mehmet Ucar fmu...@gmail.com
Date: Tue, 5 Jan 2010 16:31:33 +
To: users@wicket.apache.org
Subject: Re: Palette selector width and sort


for width, you can override css returning method in palette.

2010/1/5 wic...@geofflancaster.com :
> How can I change the width of the "available" and "selected" menus on a
> palette?
>
> Also, is it possible to sort the choices after they are moved between the
> two menus so they aren't just appended to the end but sorted
alphabetically?
>
> ie. moving an item from "available" to "selected" will sort items now in
> "selected" and vice versa
>
>
> 
> mail2web.com – What can On Demand Business Solutions do for you?
> http://link.mail2web.com/Business/SharePoint
>
>
>
> -
> 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




mail2web.com – Enhanced email for the mobile individual based on Microsoft®
Exchange - http://link.mail2web.com/Personal/EnhancedEmail



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



Re: 301 Redirect

2010-01-05 Thread Martin Makundi
It's jetty specific. You have to look at sources if this resolution
works for you.

**
Martin

2010/1/5 VGJ :
> Is "HttpStatus" Jetty-specific?  I'm unable to resolve the class.  I'll see
> if I can somehow piece this together on the Glassfish side.
>
> Thanks.
>
> On Tue, Jan 5, 2010 at 9:10 AM, Martin Makundi <
> martin.maku...@koodaripalvelut.com> wrote:
>
>> In WicketApplication.init()
>>
>> 2010/1/5 VGJ :
>> > You'll have to forgive my ignorance - where in your app do you do this?
>> >
>> > On Tue, Jan 5, 2010 at 8:55 AM, Martin Makundi <
>> > martin.maku...@koodaripalvelut.com> wrote:
>> >
>> >> This is what we do with jetty:
>> >>
>> >>    try {
>> >>      // Force 302 redirect status code into 301 'permanent redirect'
>> >>      Field statusField =
>> >> HttpStatus.class.getDeclaredField("__responseLine");
>> >>      statusField.setAccessible(true);
>> >>      Buffer[] responseLine = (Buffer[])
>> statusField.get(HttpStatus.class);
>> >>      byte[] bytes = responseLine[302].toString().replace("302",
>> >> "301").getBytes();
>> >>      responseLine[302] = new
>> >> ByteArrayBuffer(bytes,0,bytes.length,Buffer.IMMUTABLE);
>> >>    } catch (Exception e) {
>> >>      Utils.errorLog(getClass(), e);
>> >>    }
>> >>
>> >>
>> >> 2010/1/5 VGJ :
>> >> > Along with all of the SEO stuff I'm working on these days - I'm being
>> >> asked
>> >> > to use 301 redirects on the sites we're optimizing.  How would this be
>> >> done
>> >> > in with Wicket?  Are there alternatives, if not?
>> >> >
>> >> > Thanks!
>> >> >
>> >>
>> >> -
>> >> 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: 301 Redirect

2010-01-05 Thread VGJ
Is "HttpStatus" Jetty-specific?  I'm unable to resolve the class.  I'll see
if I can somehow piece this together on the Glassfish side.

Thanks.

On Tue, Jan 5, 2010 at 9:10 AM, Martin Makundi <
martin.maku...@koodaripalvelut.com> wrote:

> In WicketApplication.init()
>
> 2010/1/5 VGJ :
> > You'll have to forgive my ignorance - where in your app do you do this?
> >
> > On Tue, Jan 5, 2010 at 8:55 AM, Martin Makundi <
> > martin.maku...@koodaripalvelut.com> wrote:
> >
> >> This is what we do with jetty:
> >>
> >>try {
> >>  // Force 302 redirect status code into 301 'permanent redirect'
> >>  Field statusField =
> >> HttpStatus.class.getDeclaredField("__responseLine");
> >>  statusField.setAccessible(true);
> >>  Buffer[] responseLine = (Buffer[])
> statusField.get(HttpStatus.class);
> >>  byte[] bytes = responseLine[302].toString().replace("302",
> >> "301").getBytes();
> >>  responseLine[302] = new
> >> ByteArrayBuffer(bytes,0,bytes.length,Buffer.IMMUTABLE);
> >>} catch (Exception e) {
> >>  Utils.errorLog(getClass(), e);
> >>}
> >>
> >>
> >> 2010/1/5 VGJ :
> >> > Along with all of the SEO stuff I'm working on these days - I'm being
> >> asked
> >> > to use 301 redirects on the sites we're optimizing.  How would this be
> >> done
> >> > in with Wicket?  Are there alternatives, if not?
> >> >
> >> > Thanks!
> >> >
> >>
> >> -
> >> 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: Palette selector width and sort

2010-01-05 Thread Fatih Mehmet Ucar
for width, you can override css returning method in palette.

2010/1/5 wic...@geofflancaster.com :
> How can I change the width of the "available" and "selected" menus on a
> palette?
>
> Also, is it possible to sort the choices after they are moved between the
> two menus so they aren't just appended to the end but sorted alphabetically?
>
> ie. moving an item from "available" to "selected" will sort items now in
> "selected" and vice versa
>
>
> 
> mail2web.com – What can On Demand Business Solutions do for you?
> http://link.mail2web.com/Business/SharePoint
>
>
>
> -
> 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



Palette selector width and sort

2010-01-05 Thread wic...@geofflancaster.com
How can I change the width of the "available" and "selected" menus on a
palette?

Also, is it possible to sort the choices after they are moved between the
two menus so they aren't just appended to the end but sorted alphabetically?

ie. moving an item from "available" to "selected" will sort items now in
"selected" and vice versa



mail2web.com – What can On Demand Business Solutions do for you?
http://link.mail2web.com/Business/SharePoint



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



Re: 301 Redirect

2010-01-05 Thread Martin Makundi
In WicketApplication.init()

2010/1/5 VGJ :
> You'll have to forgive my ignorance - where in your app do you do this?
>
> On Tue, Jan 5, 2010 at 8:55 AM, Martin Makundi <
> martin.maku...@koodaripalvelut.com> wrote:
>
>> This is what we do with jetty:
>>
>>    try {
>>      // Force 302 redirect status code into 301 'permanent redirect'
>>      Field statusField =
>> HttpStatus.class.getDeclaredField("__responseLine");
>>      statusField.setAccessible(true);
>>      Buffer[] responseLine = (Buffer[]) statusField.get(HttpStatus.class);
>>      byte[] bytes = responseLine[302].toString().replace("302",
>> "301").getBytes();
>>      responseLine[302] = new
>> ByteArrayBuffer(bytes,0,bytes.length,Buffer.IMMUTABLE);
>>    } catch (Exception e) {
>>      Utils.errorLog(getClass(), e);
>>    }
>>
>>
>> 2010/1/5 VGJ :
>> > Along with all of the SEO stuff I'm working on these days - I'm being
>> asked
>> > to use 301 redirects on the sites we're optimizing.  How would this be
>> done
>> > in with Wicket?  Are there alternatives, if not?
>> >
>> > Thanks!
>> >
>>
>> -
>> 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: 301 Redirect

2010-01-05 Thread VGJ
You'll have to forgive my ignorance - where in your app do you do this?

On Tue, Jan 5, 2010 at 8:55 AM, Martin Makundi <
martin.maku...@koodaripalvelut.com> wrote:

> This is what we do with jetty:
>
>try {
>  // Force 302 redirect status code into 301 'permanent redirect'
>  Field statusField =
> HttpStatus.class.getDeclaredField("__responseLine");
>  statusField.setAccessible(true);
>  Buffer[] responseLine = (Buffer[]) statusField.get(HttpStatus.class);
>  byte[] bytes = responseLine[302].toString().replace("302",
> "301").getBytes();
>  responseLine[302] = new
> ByteArrayBuffer(bytes,0,bytes.length,Buffer.IMMUTABLE);
>} catch (Exception e) {
>  Utils.errorLog(getClass(), e);
>}
>
>
> 2010/1/5 VGJ :
> > Along with all of the SEO stuff I'm working on these days - I'm being
> asked
> > to use 301 redirects on the sites we're optimizing.  How would this be
> done
> > in with Wicket?  Are there alternatives, if not?
> >
> > Thanks!
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: 301 Redirect

2010-01-05 Thread Martin Makundi
This is what we do with jetty:

try {
  // Force 302 redirect status code into 301 'permanent redirect'
  Field statusField = HttpStatus.class.getDeclaredField("__responseLine");
  statusField.setAccessible(true);
  Buffer[] responseLine = (Buffer[]) statusField.get(HttpStatus.class);
  byte[] bytes = responseLine[302].toString().replace("302",
"301").getBytes();
  responseLine[302] = new
ByteArrayBuffer(bytes,0,bytes.length,Buffer.IMMUTABLE);
} catch (Exception e) {
  Utils.errorLog(getClass(), e);
}


2010/1/5 VGJ :
> Along with all of the SEO stuff I'm working on these days - I'm being asked
> to use 301 redirects on the sites we're optimizing.  How would this be done
> in with Wicket?  Are there alternatives, if not?
>
> Thanks!
>

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



301 Redirect

2010-01-05 Thread VGJ
Along with all of the SEO stuff I'm working on these days - I'm being asked
to use 301 redirects on the sites we're optimizing.  How would this be done
in with Wicket?  Are there alternatives, if not?

Thanks!


Solved: Track selected entries in either of a Palette's Choices components?

2010-01-05 Thread Martin Dietze
On Fri, December 25, 2009, Martin Dietze wrote:

> I desperately need to find out which entries in a Palette's two
> Choices components are selected, e.g. to allow additional
> operations on them using Ajax.

I solved this issue. First of all: currently the AbstractOptions
class used by Palette does not support accessing this
information via Ajax because of these lines:

|  // A piece of javascript to avoid serializing the options during AJAX
|  // serialization.
|  getResponse().write(
|  JavascriptUtils.SCRIPT_OPEN_TAG +
|  "if (typeof(Wicket) != \"undefined\" && typeof(Wicket.Form) 
!= \"undefined\")" +
|  "Wicket.Form.excludeFromAjaxSerialization." + 
getMarkupId() + "='true';" +
|  JavascriptUtils.SCRIPT_CLOSE_TAG);

Thus, in order to get this working at all, we'll have to patch
Wicket. The patch is very simple, we move this code into a 
separate method which can be overridden by derived classes.
I created an issue for this and attached the patch [1].

Now having applied the patch we proceed as follows. 
First, we need to derive our own Choices and Selection
components in which we override the above code by an empty 
method, so that we get the selection POSTed at all. Now
we can override various methods as needed; in my case 
implementing a custom convertInput() method was sufficient,
so that I could access the currently selected entries in
the two SELECTs by calling their getConvertedInput() methods
which seemed the least invasive change and least likely to
cause any trouble with the Palette's core functionality.

Next, I derived my own custom class from Palette in which
I needed to override the factory methods for creating the 
Choices and Selection components. Pretty easy in the end.

Cheers,

M'bert

[1] https://issues.apache.org/jira/secure/ManageAttachments.jspa?id=12444712

-- 
--- / http://herbert.the-little-red-haired-girl.org / -
=+= 
Perl ist der gegl�ckte Versuch, einen braindump direkt ausf�hrbar zu
machen.  -- Lutz Donnerhacke in dasr

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



Re: Detecting an external change to the ModelObject of a Form

2010-01-05 Thread Steve Swinsburg
Good stuff, can you put this up on in Confluence with some code samples?

http://cwiki.apache.org/WICKET/reference-library.html

cheers,
Steve


On 05/01/2010, at 10:31 PM, Stijn Maller wrote:

> Oooops, in case some of you are baffled that this code would work, let me
> put your mind at ease, it doesn't. :o)
> 
> I overlooked the fact that a plain Model does not have the ability to chain
> another Model. (ie a constructor accepting another Model)
> So the code sample I gave wouldn't work, in my real code I actually used a
> CompoundPropertyModel, which does have this ability, so it worked for me.
> 
> If you don't want to use CompoundPropertyModel you can still use the code
> below, but you'll have to use an implementation of IChainingModel instead of
> a plain Model.
> 
> Kind regards,
> Stijn
> 
> 
> 2010/1/5 Stijn Maller 
> 
>> Hi Janning,
>> 
>> That's definately better then exposing the form, but it still makes me have
>> to insert an extra methodcall everywhere I update the modelobject. Here's
>> what I implemented a couple of seconds ago and it seems to be doing what I
>> wanted just fine, and no listener needed either.
>> 
>> Instead of:
>> 
>> Form detailForm = new Form("detailForm", model);
>> 
>> I do:
>> Form detailForm = new Form("detailForm");
>> IModel wrappingModel = new Model(model) {
>>private Object previousModelObject = null;
>> 
>>@Override
>>public Object getObject() {
>>if (previousModelObject != super.getObject()) {
>>detailForm.modelChanged();
>>previousModelObject = super.getObject();
>>}
>>return super.getObject();
>>}
>>};
>> }
>> detailForm.setModel(wrappingModel);
>> 
>> 
>> 2010/1/5 Janning Vygen 
>> 
>> 
>>> your "master" knows about your "detail" panel. so why don't you call
>>> detail.modelChanged();
>>> 
>>> and in your DetailPanel:
>>> 
>>> onModelChanged() {
>>> form.modelChanged(); // or whatever is needed...
>>> form.clearInput();
>>> super.onModelChanged()
>>> }
>>> 
>>> Your form is still managed by your detail panel only.
>>> 
>>> kind regards
>>> Janning
>>> 
>>> On Tuesday 05 January 2010 11:03:59 Stijn Maller wrote:
 Thanks Martin,
 
 You're right, a Model that calls ModelObjectChangedListener is basically
 what I am looking for, but I don't think it exists. I'll write one
>>> myself,
 but I just wanted to check first to make sure I wasn't reinventing the
 wheel or missing something obvious.
 
 Kind regards,
 Stijn
 
 
 2010/1/4 Martin Makundi 
 
> Hi!
> 
> clearinput is right.  don't know if there is a IModel that has change
> listener, but sure you can make your own that detects when the master
 
 changes. You need to repaint the components anyways
 
> (target.addComponents), so why not clear input at the same time?
> 
> **
> Martin
>>> 
>>> 
>>> 
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>> 
>>> 
>> 



smime.p7s
Description: S/MIME cryptographic signature


Re: Detecting an external change to the ModelObject of a Form

2010-01-05 Thread Stijn Maller
Oooops, in case some of you are baffled that this code would work, let me
put your mind at ease, it doesn't. :o)

I overlooked the fact that a plain Model does not have the ability to chain
another Model. (ie a constructor accepting another Model)
So the code sample I gave wouldn't work, in my real code I actually used a
CompoundPropertyModel, which does have this ability, so it worked for me.

If you don't want to use CompoundPropertyModel you can still use the code
below, but you'll have to use an implementation of IChainingModel instead of
a plain Model.

Kind regards,
Stijn


2010/1/5 Stijn Maller 

> Hi Janning,
>
> That's definately better then exposing the form, but it still makes me have
> to insert an extra methodcall everywhere I update the modelobject. Here's
> what I implemented a couple of seconds ago and it seems to be doing what I
> wanted just fine, and no listener needed either.
>
> Instead of:
>
> Form detailForm = new Form("detailForm", model);
>
> I do:
> Form detailForm = new Form("detailForm");
> IModel wrappingModel = new Model(model) {
> private Object previousModelObject = null;
>
> @Override
> public Object getObject() {
> if (previousModelObject != super.getObject()) {
> detailForm.modelChanged();
> previousModelObject = super.getObject();
> }
> return super.getObject();
> }
> };
> }
> detailForm.setModel(wrappingModel);
>
>
> 2010/1/5 Janning Vygen 
>
>
>> your "master" knows about your "detail" panel. so why don't you call
>> detail.modelChanged();
>>
>> and in your DetailPanel:
>>
>> onModelChanged() {
>>  form.modelChanged(); // or whatever is needed...
>>  form.clearInput();
>>  super.onModelChanged()
>> }
>>
>> Your form is still managed by your detail panel only.
>>
>> kind regards
>> Janning
>>
>> On Tuesday 05 January 2010 11:03:59 Stijn Maller wrote:
>> > Thanks Martin,
>> >
>> > You're right, a Model that calls ModelObjectChangedListener is basically
>> > what I am looking for, but I don't think it exists. I'll write one
>> myself,
>> > but I just wanted to check first to make sure I wasn't reinventing the
>> > wheel or missing something obvious.
>> >
>> > Kind regards,
>> > Stijn
>> >
>> >
>> > 2010/1/4 Martin Makundi 
>> >
>> > > Hi!
>> > >
>> > > clearinput is right.  don't know if there is a IModel that has change
>> > > listener, but sure you can make your own that detects when the master
>> >
>> > changes. You need to repaint the components anyways
>> >
>> > > (target.addComponents), so why not clear input at the same time?
>> > >
>> > > **
>> > > Martin
>>
>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>


SV: Wicket and portlets JSR 286

2010-01-05 Thread Wilhelmsen Tor Iver
> I am having a problem finding a resource or an example for portlets
> communications with events "processEvent(EventRequest request,
> EventResponse response)"
> how do I dispatch and event from wicket page? for example if I have a
> ViewPage and I need to send an event to a subscribed portlet , how do
> I do it ?

It seems WicketPortlet does not override GenericPortlet.processEvent() at least 
as of 1.4.3; try subclassing WicketPortlet and add @ProcessEvent(eventname) 
annotation to a method of your own.

As for routing you should be able to configure that in your container combined 
with the relevant elements in portlet.xml. Dispatching is done via the 
PortletResponse.setEvent() as the spec says.

- Tor Iver

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



Re: Detecting an external change to the ModelObject of a Form

2010-01-05 Thread Stijn Maller
Hi Janning,

That's definately better then exposing the form, but it still makes me have
to insert an extra methodcall everywhere I update the modelobject. Here's
what I implemented a couple of seconds ago and it seems to be doing what I
wanted just fine, and no listener needed either.

Instead of:
Form detailForm = new Form("detailForm", model);

I do:
Form detailForm = new Form("detailForm");
IModel wrappingModel = new Model(model) {
private Object previousModelObject = null;

@Override
public Object getObject() {
if (previousModelObject != super.getObject()) {
detailForm.modelChanged();
previousModelObject = super.getObject();
}
return super.getObject();
}
};
}
detailForm.setModel(wrappingModel);


2010/1/5 Janning Vygen 

>
> your "master" knows about your "detail" panel. so why don't you call
> detail.modelChanged();
>
> and in your DetailPanel:
>
> onModelChanged() {
>  form.modelChanged(); // or whatever is needed...
>  form.clearInput();
>  super.onModelChanged()
> }
>
> Your form is still managed by your detail panel only.
>
> kind regards
> Janning
>
> On Tuesday 05 January 2010 11:03:59 Stijn Maller wrote:
> > Thanks Martin,
> >
> > You're right, a Model that calls ModelObjectChangedListener is basically
> > what I am looking for, but I don't think it exists. I'll write one
> myself,
> > but I just wanted to check first to make sure I wasn't reinventing the
> > wheel or missing something obvious.
> >
> > Kind regards,
> > Stijn
> >
> >
> > 2010/1/4 Martin Makundi 
> >
> > > Hi!
> > >
> > > clearinput is right.  don't know if there is a IModel that has change
> > > listener, but sure you can make your own that detects when the master
> >
> > changes. You need to repaint the components anyways
> >
> > > (target.addComponents), so why not clear input at the same time?
> > >
> > > **
> > > Martin
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Detecting an external change to the ModelObject of a Form

2010-01-05 Thread Janning Vygen

your "master" knows about your "detail" panel. so why don't you call 
detail.modelChanged();

and in your DetailPanel:

onModelChanged() {
  form.modelChanged(); // or whatever is needed...
  form.clearInput();
  super.onModelChanged()
}

Your form is still managed by your detail panel only. 

kind regards
Janning 

On Tuesday 05 January 2010 11:03:59 Stijn Maller wrote:
> Thanks Martin,
>
> You're right, a Model that calls ModelObjectChangedListener is basically
> what I am looking for, but I don't think it exists. I'll write one myself,
> but I just wanted to check first to make sure I wasn't reinventing the
> wheel or missing something obvious.
>
> Kind regards,
> Stijn
>
>
> 2010/1/4 Martin Makundi 
>
> > Hi!
> >
> > clearinput is right.  don't know if there is a IModel that has change
> > listener, but sure you can make your own that detects when the master
>
> changes. You need to repaint the components anyways
>
> > (target.addComponents), so why not clear input at the same time?
> >
> > **
> > Martin



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



Re: Detecting an external change to the ModelObject of a Form

2010-01-05 Thread Stijn Maller
Thanks Martin,

You're right, a Model that calls ModelObjectChangedListener is basically
what I am looking for, but I don't think it exists. I'll write one myself,
but I just wanted to check first to make sure I wasn't reinventing the wheel
or missing something obvious.

Kind regards,
Stijn


2010/1/4 Martin Makundi 

> Hi!
>
> clearinput is right.  don't know if there is a IModel that has change
> listener, but sure you can make your own that detects when the master

changes. You need to repaint the components anyways
> (target.addComponents), so why not clear input at the same time?
>
> **
> Martin
>
>


Re: Detecting an external change to the ModelObject of a Form

2010-01-05 Thread Stijn Maller
Thanks Igor,

But I would really like to avoid the extra methodcall everywhere I change
the modelobject, especially if it means exposing the form outside of the
Panel. I'm looking more for a solution that allows the panel/form to detect
whenever someone else has changed its model. This way the rest of my code
just has to know that there is a model to update and a panel to repaint and
nothing more.

Just out of interest though, from your answer I deduct that for my case it's
better to call form.modelchanged() over form.clearInput(), right?

2010/1/4 Igor Vaynberg 

> call form.modelchanged()
>
> -igor
>


SV: More than one access denied page

2010-01-05 Thread Wilhelmsen Tor Iver
> I would like to have two access denied pages according to some
> parameters.
> Is this possible?

In your implementation of IUnauthorizedComponentInstantiationListener check for 
the parameters (e.g. placed into the request or the like) and set a different 
responsepage or redirect to a different page based on this.

- Tor Iver

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



Re: Referring image using Resource Reference

2010-01-05 Thread vela

Hello again,

Thanks & its works fine

-- 
View this message in context: 
http://old.nabble.com/Referring-image-using-Resource-Reference-tp27014229p27025529.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Wicket and portlets JSR 286

2010-01-05 Thread Mansour Al Akeel
I am having a problem finding a resource or an example for portlets
communications with events "processEvent(EventRequest request,
EventResponse response)"
how do I dispatch and event from wicket page? for example if I have a
ViewPage and I need to send an event to a subscribed portlet , how do
I do it ?

Another thing is setting attributes and access them in  the Page from
the WicketPortlet, After processAction or doView. I need to send some
preferences to the edit page.

Thank you.

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



Wicket Training - Winter Course Schedule

2010-01-05 Thread Cemal Bayramoglu
Below are dates for scheduled, public Wicket courses [1] this winter in London:
Jan11-12(Mon-Tue)
Jan16-17(Sat-Sun)
Feb1-2(Mon-Tue)
Feb13-14(Sat-Sun)
Feb15-16(Mon-Tue)

Other public dates may be possible on request subject to instructor
availability.
We have run this course  (JW703) over 30 times in various countries
and for students from all over the world. If you would like to attend
our Jan11-12 course, subscribers to this list can use voucher
WU_JAN1112 on our booking page for an extra10% discount.

We will update this thread with dates for courses in Amsterdam soon.

Regards - Cemal
jWeekend
OO & Java Technologies, Wicket
Consulting, Development, Training
http://jWeekend.com

[1] http://jweekend.com/dev/JW703

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



Re: Referring image using Resource Reference

2010-01-05 Thread Jonas
take a closer look at ContextImage's contructor and its javadoc:

/**
 * Constructor
 *
 * @param id
 * @param contextRelativePath
 *context-relative path eg images/border.jpg
 */
public ContextImage(String id, String contextRelativePath)


so try changing your code to the following:
form.add(new ContextImage("images", "image/calendarIcon.gif"));

that sould work just fine.
I think ResourceReference is only applicable if the resource is accessible on
the webapps classpath, thus not directly accessible via context and to
be served by wicket.


On Tue, Jan 5, 2010 at 8:45 AM, vela  wrote:
>
> Hello again,
>
> In the project setup, the Page class and their corresponding html files are
> not placed in the same directory. The Page class are placed under the
> package com.image and their corresponding html files are placed inside the
> html directory under the context root.
>
> If I place the image file inside the com.image directory or html directory,
> it is getting called. But I need to call the image file inside the image
> directory under the context root.
>
> In the Page class, the context image has call been called as
>
> form.add(new ContextImage("images", new Model(new
> ResourceReference("image/calendarIcon.gif";
>
>
>
>
> --
> View this message in context: 
> http://old.nabble.com/Referring-image-using-Resource-Reference-tp27014229p27024782.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

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