RE: doctype and markup inheritance

2010-05-10 Thread Stefan Lindner
Yes, but both are missing in HTML A.


-Ursprüngliche Nachricht-
Von: Sven Meier [mailto:s...@meiers.net]
Gesendet: Di 11.05.2010 08:52
An: users@wicket.apache.org
Betreff: Re: doctype and markup inheritance
 

#setStripXmlDeclarationFromOutput() has nothing to do with doctype - it
controls the xml prolog.

Sven
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Html-root-tag-and-contents-repeating-in-response-after-302-redirect-tp2173315p2173399.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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




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

Re: doctype and markup inheritance

2010-05-10 Thread Sven Meier

#setStripXmlDeclarationFromOutput() has nothing to do with doctype - it
controls the xml prolog.

Sven
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Html-root-tag-and-contents-repeating-in-response-after-302-redirect-tp2173315p2173399.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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



Re: Wicket + security, what are the best options? Spring Security reached almost all the way...

2010-05-10 Thread Les Hazlewood
Just a quick note to Wicket and Wicket-Stuff Shiro users:

Shiro 1.0 is right around the corner.  We should be code-complete for
1.0 in a day or two and then we being the ASF voting process to
release the software.  A concrete (non snapshot) release is coming
very soon!

Best,

Les

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



Re: doctype and markup inheritance

2010-05-10 Thread Dr. Wolf Blecher
Hi Stefan,

as far as I understood markup inheritance correctly, the xml and doctype
of B is ignored and only the part that is specified inside the
... tags is taken over in A instead of
the ... part.
Everything that is specified additionally in B is only for previewing B
in a browser of your choice.
So the answer to your question is 1.

Wolf

Am 11.05.2010 08:09, schrieb Stefan Lindner:
> Dear Wicket wizzards,
>
> given is a page A with a HTML file that has no doctype, just starting with 
> ...
>
> The Page's class is extended by B and the markup of B has a proper HTML file 
> with XML and doctype lines.
>
> What is the intended behavior of wicket?
>
> 1. Ignore the exdending B's xml and doctype an use the settings form A
> 2. Override the settings from A with the proper doctype from B
> 3. Control it in Wicket's Application.init()?
>
> getMarkupSettings().setStripXmlDeclarationFromOutput(true/false) has no 
> effect. In my case (given A that cannot be modified) item 1. is true.
>
> Stefan
>
>   
>
>
>
> -
> 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 + security, what are the best options? Spring Security reached almost all the way...

2010-05-10 Thread PDiefent

where can I find the wicket-shiro-example stuff?
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-security-what-are-the-best-options-Spring-Security-reached-almost-all-the-way-tp2068415p2173369.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



doctype and markup inheritance

2010-05-10 Thread Stefan Lindner
Dear Wicket wizzards,

given is a page A with a HTML file that has no doctype, just starting with 
...

The Page's class is extended by B and the markup of B has a proper HTML file 
with XML and doctype lines.

What is the intended behavior of wicket?

1. Ignore the exdending B's xml and doctype an use the settings form A
2. Override the settings from A with the proper doctype from B
3. Control it in Wicket's Application.init()?

getMarkupSettings().setStripXmlDeclarationFromOutput(true/false) has no effect. 
In my case (given A that cannot be modified) item 1. is true.

Stefan


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

Html root tag and contents repeating in response after 302 redirect?

2010-05-10 Thread orange80

Hey guys, I noticed this today when I was working on a project and examining
responses in Firebug.  It looks like I'm getting the  root tag and all
of its contents twice in the http response after 302 redirects.

I have posted a very simple quickstart that will demonstrate the problem
consistently.  

here is my quickstart:
http://cosmiao.com/jps/wicket-2x-response-quickstart.zip

All you have to do is this:
(the behavior is the same with cache disabled or not)
1. open Firefox (v3.6.3) and activate the Firebug plugin (latest version
v1.5.4).  (the status of whether the browser cache is enabled or not does
not have any impact on the results here.)

2. enable Firebug and open the Net tab.

3. go to http://localhost:8080/

4. click on the link provided by jetty to get to the main page of our
quickstart.

4. in the Net tab you should see this:
GET myquickstart302
GET myquickstart302
GET hello   200

5. check the GET hello Response subtab -- notice the html repeated 2 extra
times.

6. reload the page from what should be your current url:
http://localhost:8080/myquickstart/hello

then you will see what we would normally expect--a response consisting of a
single  tag.  notice there are no 302 redirects in the Net tab.

7. if you go to Link A or Link B, which will entail a single 302 redirect,
you will see the html response repeated 1 extra time.

Basically the problem is that for each 302 redirect we get an extra repeat
of all the html in the response.  Interestingly, view source in Firefox will
display only one root  tag, but that might be because the browser only
reads the first … it gets.  At any rate, since Wicket uses
session-page-relative Url's, which obviously involve a lot of 302 redirects,
this is happening all the time.

I thought it might have to do with my Url coding strategy, but changing that
did not have any effect.  You can check this by checking out the other git
branch in the folder of my quickstart.

Can anyone, perhaps one of the devs, shed some light on what is going on
here and whether this is an actual bug, something wrong with Firebug, or
just me not understanding how something is supposed to work?

Thanks,
Jamie 

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Html-root-tag-and-contents-repeating-in-response-after-302-redirect-tp2173315p2173315.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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



Re: efficient resource downloading

2010-05-10 Thread Joe Fawzy
Hi dear
actually , access control and dynamic file generation requires using
services which is injected by spring
this cannot be easily done in pure servlet

my current solution using spring @Controller and write diretly to the
servlet response is somethingvery similar to writing a servlet
but as i am planning to deploy on appengine, the startup time for spring
especially when using spring mvc cannot be accepted (more than 30 sec)

so i am tring to figure out a pure wicket solution

thanks for your help
Joe

On Mon, May 10, 2010 at 5:34 AM, Igor Vaynberg wrote:

> write a servlet
>
> -igor
>
> On Sun, May 9, 2010 at 6:37 PM, Joe Fawzy  wrote:
> > Hi
> > i want to know if this is an efficient way to download some files
> >
> > i want my users to be able to download certain files just to registerd
> users
> > only so i can put that logic in the page constructor
> > but is this efficient way to do this as this may be called thausands of
> > times per hour   (the files generated dynamically)
> > does the construction of a page and all the other bits is heavy for such
> a
> > task
> >
> > i am using spring MVC right now with its rest style model and annotation
> but
> > it seems to me too heavyweight for the task
> >
> > so is this appropriate?
> > is there another way more efficient?
> >
> > public class DownloadManagerPage extends WebPage{
> >private static final long serialVersionUID = 1L;
> >
> >public DownloadManagerPage(PageParameters parameters) {
> >super(parameters);
> >if (registeredUser(parameters)) {
> >getRequestCycle().setRequestTarget(new
> > ResourceStreamRequestTarget(new AbstractResourceStreamWriter() {
> >private static final long serialVersionUID = 1L;
> >public void write(OutputStream output) {
> >output
> >}
> >
> >public String getContentType() {
> >return ..;
> >}
> >}));
> >}
> >}
> >
> >private boolean registeredUser(PageParameters parameters) {
> >return ;
> >}
> > }
> >
> > thanks in advance
> > Joe
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Is there any out-of-box form validator for checkbox input?

2010-05-10 Thread Igor Vaynberg
what would you validate with a CheckBox of type boolean? i believe if
you want to always require it be checked then simply call
setrequired(true).

-igor

On Mon, May 10, 2010 at 6:18 PM, David Chang  wrote:
> I am curious about this. I am playing wicket based on the book WIA. I am 
> unable to find an out-of-box form validator for checkbox input. I know I can 
> write one. But just wanted to ask folks here to confirm.
>
> Regards,
> David
>
>
>
>
> -
> 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



Is there any out-of-box form validator for checkbox input?

2010-05-10 Thread David Chang
I am curious about this. I am playing wicket based on the book WIA. I am unable 
to find an out-of-box form validator for checkbox input. I know I can write 
one. But just wanted to ask folks here to confirm.

Regards,
David


  

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



Re: error in customize FormComponentFeedbackBorder

2010-05-10 Thread David Chang
Igor, thanks for chiming. I got what you mean. 
Regards,
David

--- On Mon, 5/10/10, Igor Vaynberg  wrote:

> From: Igor Vaynberg 
> Subject: Re: error in customize FormComponentFeedbackBorder
> To: users@wicket.apache.org
> Date: Monday, May 10, 2010, 7:16 PM
> you cannot change the nesting of
> components, it has to be in sync with java code
> 
> -igor
> 
> On Mon, May 10, 2010 at 2:42 PM, David Chang 
> wrote:
> > I am hoping to write a component customizing
> FormComponentFeedbackBorder.
> >
> > In the related HTML (please ingore the blank content
> for ), the following is okay.
> >
> > 
> >   "errorIndicator">
> >  
> > 
> >
> > But the following:
> >
> > 
> >  
> >    
> >  
> > 
> >
> > always produces runtime error saying
> >
> > WicketMessage: Expected close tag for  wicket:id="fullNameBorder" id="fullNameBorder3e">
> >
> > The component (wicket:id="fullNameBorder") is what I
> am trying to attach the customized border component to.
> >
> > What is the wrong with the second way?
> >
> > Best,
> >
> > David
> >
> >
> >
> >
> >
> >
> -
> > 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: CSS Templating

2010-05-10 Thread Chris Colman
Have you looked at Compass/SCSS? That introduces
variables/parameterization/mixins into a higher level CSS language that
then generates CSS that browsers understand. I've used it a bit and it's
quite powerful and you end up writing heaps less css even if you're only
managing the CSS for a single site.

http://compass-style.org

Regards,
Chris Colman
http://pagebloom.com


>-Original Message-
>From: Eric Hamel [mailto:dantehick...@gmail.com]
>Sent: Monday, 10 May 2010 10:17 PM
>To: users@wicket.apache.org
>Subject: Re: CSS Templating
>
>Good Point. In all honesty, I'm looking for a practical way to "skin" 2
>applications which are identical layout wise. Inherently, I don't want
to
>manage 2 different stylesheets as that will lead to maintenance hell.
>
>The idea was to build a Template implemented in both applications to
which
>I
>would override/pass to the template
>colors/background-colors/background-image. Might not be the best
>approach...
>
>On Sat, May 8, 2010 at 3:42 AM, Chris Colman
>wrote:
>
>> That method of css generation you propose would be generating CSS
(even
>> if it were into a separate .css file) with each page render. If
you're
>> dealing with a lot of CSS that probably isn't the most efficient
method.
>>
>> Generating CSS at render time would mean the browser could not take
>> advantage of CSS caching - which would be bad in these days of quite
>> large CSS files.
>>
>> You might be better off considering a separate CSS generator that
>> doesn't generate CSS at 'page render time'.
>>
>>
>> >-Original Message-
>> >From: Eric Hamel [mailto:dantehick...@gmail.com]
>> >Sent: Saturday, 8 May 2010 5:52 AM
>> >To: users@wicket.apache.org
>> >Subject: CSS Templating
>> >
>> >All,
>> >
>> >I've been exploring the use of TextTemplateHeaderContributor.forCss
>> method
>> >to build a CSS template for multiple application.
>> >
>> >Take for example:
>> >
>> >IModel> model = new
>> >AbstractReadOnlyModel>(){
>> >
>> >private static final long serialVersionUID = 1L;
>> >
>> >@Override
>> >public Map getObject() {
>> > HashMap map = new HashMap();
>> >map.put("body-bgcolor", "red");
>> > return map;
>> >}
>> >
>> >};
>> > add(TextTemplateHeaderContributor.forCss(WelcomePage.class,
>> >"Template.css",
>> >model));
>> >
>> >with CSS template:
>> >
>> >body{
>> >
>> >background-color: ${body-bgcolor};
>> >
>> >}
>> >
>> >
>> >
>> >The output works. However, the template is contributing to the
header
>> in
>> >the
>> >form of:
>> >
>> >
>> >
>> >which is unacceptable. Is there a way to generate a .css file to be
>> used by
>> >the application ?
>> >
>> >Thank you
>> >
>> >--
>> >Sent by Eric Hamel
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>
>
>--
>Sent by Eric Hamel

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



Re: error in customize FormComponentFeedbackBorder

2010-05-10 Thread Igor Vaynberg
you cannot change the nesting of components, it has to be in sync with java code

-igor

On Mon, May 10, 2010 at 2:42 PM, David Chang  wrote:
> I am hoping to write a component customizing FormComponentFeedbackBorder.
>
> In the related HTML (please ingore the blank content for ), the 
> following is okay.
>
> 
>  
>  
> 
>
> But the following:
>
> 
>  
>    
>  
> 
>
> always produces runtime error saying
>
> WicketMessage: Expected close tag for  id="fullNameBorder3e">
>
> The component (wicket:id="fullNameBorder") is what I am trying to attach the 
> customized border component to.
>
> What is the wrong with the second way?
>
> Best,
>
> David
>
>
>
>
>
> -
> 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



Gmap2 and Wicket 1.4.8

2010-05-10 Thread Doug Leeper
I just upgraded to Wicket 1.4.8 from 1.4.6.  I am using Gmap2 (1.4.1).  Upon 
doing so, my maps are no longer showing a map...just a blank area with the 
google controls that are non-functional.

 Has anyone else experienced this?  Any work arounds?

Thanks in advance,
- Doug

Re: XJC NPA switch...

2010-05-10 Thread Craig Tataryn
Ad, this would be the wrong mailing list to post to :)

Nothing to see here people!!!

Craig.

On 2010-05-10, at 3:19 PM, Craig Tataryn wrote:

> Just thought I'd ask: recently for reasons unknown, we've started to have to 
> add a "-xjc-npa"  to our cxf-codegen-plugin configuration for our 
> WSDLs.  The error which caused us to use this parameter essentially states: 
> "package annotations should be in file package-info.java".  This seemed to 
> arise out of the blue not corresponding to any WSDL change.
> 
> Thanks,
> 
> Craig.
> 
> --
> Craig Tataryn
> site: http://www.basementcoders.com/
> podcast:http://feeds.feedburner.com/TheBasementCoders
> irc: ThaDon on freenode #basementcoders, ##wicket, #papernapkin
> twitter: craiger
> 



error in customize FormComponentFeedbackBorder

2010-05-10 Thread David Chang
I am hoping to write a component customizing FormComponentFeedbackBorder.

In the related HTML (please ingore the blank content for ), the following 
is okay.


  
  


But the following:


  

  


always produces runtime error saying 

WicketMessage: Expected close tag for 

The component (wicket:id="fullNameBorder") is what I am trying to attach the 
customized border component to.

What is the wrong with the second way?

Best,

David



  

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



Re: XJC NPA switch...

2010-05-10 Thread Jeremy Thomerson
Was that really a question?  If so, I certainly didn't see a question.  I
think maybe you inadvertently sent this to the wrong list.

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



On Mon, May 10, 2010 at 3:19 PM, Craig Tataryn  wrote:

> Just thought I'd ask: recently for reasons unknown, we've started to have
> to add a "-xjc-npa"  to our cxf-codegen-plugin configuration for
> our WSDLs.  The error which caused us to use this parameter essentially
> states: "package annotations should be in file package-info.java".  This
> seemed to arise out of the blue not corresponding to any WSDL change.
>
> Thanks,
>
> Craig.
>
> --
> Craig Tataryn
> site: http://www.basementcoders.com/
> podcast:http://feeds.feedburner.com/TheBasementCoders
> irc: ThaDon on freenode #basementcoders, ##wicket, #papernapkin
> twitter: craiger
>
>


Re: is possible that CryptedUrlWebRequestCodingStrategy not working

2010-05-10 Thread Igor Vaynberg
indeed, looking at the code everything is encrypted, so the problem
must be in your BookmarkablePageIncrementLink. only urls that are
generated via the coding strategy are encrypted, if you concatenate
strings yourself they will not be encrypted obviously.

-igor

On Mon, May 10, 2010 at 12:06 PM, Fernando Wermus
 wrote:
> Igor,
>    Wicket in Action explains
> "... Using this code, Wicket will encrypt all your URLs—including
> bookmarkable URLs. ...".
>
> I need fixed entry point for my stateless page,  but not readable for
> humans, because some hacker would like to extract all the information from
> the site.
>
> How can I achieve this?
>
>
> On Mon, May 10, 2010 at 4:01 PM, Igor Vaynberg wrote:
>
>> afair crypted strategy only encodes non-bookmarkable urls. it does not
>> encode bookmarkable urls because those are meant as entrypoints into
>> your application.
>>
>> -igor
>>
>> On Mon, May 10, 2010 at 11:38 AM, Fernando Wermus
>>  wrote:
>> > Hi all,
>> >    I create a PagingNavigator stateless. Instead of using a model to have
>> > the number page shown, my StatelessPagingNavigator shows the number
>> through
>> > parameters. I hope that the page number wouldnt have been showed using
>> > CryptedUrlWebRequestCodingStrategy, but It does. This is rather weird; I
>> > hope any could point me out some solution. Is my class written wrongly in
>> > some way?
>> >
>> >
>> > public class StatelessPagingNavigator extends PagingNavigator {
>> > private static final long serialVersionUID = 3576836044400027436L;
>> >
>> > public StatelessPagingNavigator(String id, DataView dataView) {
>> > super(id, dataView);
>> > }
>> >
>> > �...@override
>> > protected Link newPagingNavigationIncrementLink(final String id,
>> IPageable
>> > pageable, int increment) {
>> > * **PageParameters p=new PageParameters();*
>> > *
>> > *
>> > * **p.add("increment", String.valueOf(increment));*
>> > * **p.add("pageNumber", String.valueOf(pageable.getCurrentPage()));*
>> > Link link= new BookmarkablePageIncrementLink(id, pageable,
>> > getPage().getClass(), p){
>> > private static final long serialVersionUID = 1L;
>> >
>> > public boolean isEnabled()
>> > {
>> > return super.isEnabled() && StatelessPagingNavigator.this.isEnabled() &&
>> > StatelessPagingNavigator.this.isEnableAllowed();
>> > }
>> > };
>> >  return link;
>> > }
>> >
>> > @Override
>> > protected Link newPagingNavigationLink(final String id, final IPageable
>> > pageable, int pageNumber) {
>> > * **PageParameters p=new PageParameters();*
>> > * **p.add("pageNumber", String.valueOf(pageNumber));*
>> >  return new BookmarkablePagingNavigationLink(id, pageable,
>> > getPage().getClass(),  p){
>> > private static final long serialVersionUID = -3076648671049640420L;
>> >
>> > public boolean isEnabled()
>> > {
>> > //return false;
>> > return super.isEnabled() && StatelessPagingNavigator.this.isEnabled() &&
>> > StatelessPagingNavigator.this.isEnableAllowed();
>> > }
>> >  };
>> > }
>> >
>> > @Override
>> > protected PagingNavigation newNavigation(final IPageable pageable, final
>> > IPagingLabelProvider labelProvider) {
>> > return new PagingNavigation("navigation", pageable, labelProvider) {
>> > private static final long serialVersionUID = 1102823179571300337L;
>> >
>> > @Override
>> > protected Link newPagingNavigationLink(final String id, final IPageable
>> > pageable, int pageIndex) {
>> > * **PageParameters p=new PageParameters();*
>> > * **p.add("pageIndex", String.valueOf(pageIndex));*
>> >  return new BookmarkablePagingNavigation(id, pageable,
>> getPage().getClass(),
>> >  p){
>> > private static final long serialVersionUID = -3076648671049640420L;
>> >
>> > public boolean isEnabled()
>> > {
>> > return super.isEnabled() && StatelessPagingNavigator.this.isEnabled() &&
>> > StatelessPagingNavigator.this.isEnableAllowed();
>> > }
>> >  };
>> > }
>> > };
>> > }
>> > }
>> >
>> > thanks in advance
>> >
>> > --
>> > Fernando Wermus.
>> >
>> > www.linkedin.com/in/fernandowermus
>> >
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>
>
> --
> Fernando Wermus.
>
> www.linkedin.com/in/fernandowermus
>

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



XJC NPA switch...

2010-05-10 Thread Craig Tataryn
Just thought I'd ask: recently for reasons unknown, we've started to have to 
add a "-xjc-npa"  to our cxf-codegen-plugin configuration for our 
WSDLs.  The error which caused us to use this parameter essentially states: 
"package annotations should be in file package-info.java".  This seemed to 
arise out of the blue not corresponding to any WSDL change.

Thanks,

Craig.

--
Craig Tataryn
site: http://www.basementcoders.com/
podcast:http://feeds.feedburner.com/TheBasementCoders
irc: ThaDon on freenode #basementcoders, ##wicket, #papernapkin
twitter: craiger



html namespace, formatting...

2010-05-10 Thread Marzia Forli
Could someone more experienced with eclipse help me with configuring correctly 
the html documents to make eclipse happy and my documents valid, as I would 
like to use auto-completion, and later to parse them as xml... right now I am 
writing something like this:

http://www.w3.org/TR/html4/strict.dtd";>
http://www.w3.org/1999/xhtml"; 
xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd";>

But eclipse complains on the 2. line about 'Undefined attribute name (xmlns)' 
and using auto-completion I have all tags in uppercase...
Anybody have some small micro example ?
Also, am I wrong or eclipse formatting of html document sucks big time ?

Big thanks



  


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



Re: root context, IE, home page is not found

2010-05-10 Thread Jeremy Thomerson
Can you reopen that issue and attach a quickstart that demonstrates the
problem?

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



On Mon, May 10, 2010 at 8:26 AM, Jimi  wrote:

>
> Erik van Oosten wrote:
> > This might be related to
> > https://issues.apache.org/jira/browse/WICKET-2600?
>
> Well, it sure is related, and that ticket is marked as resolved with 1.4.5.
> But the bug still exist in 1.4.7, at least for me.
>
> /Jimi
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/root-context-IE-home-page-is-not-found-tp1877009p2165392.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: CSS Templating

2010-05-10 Thread Jeremy Thomerson
Instead of doing this, use cascading stylesheets like they were intended to
be used:

In both applications, have a "global.css" or similar that handles all of the
layout, etc, that is common to both sites.

Then, in each application, include a "appXYZ.css" that simply changes
colors, background images, etc, that you would presumably be doing on a
per-site basis.

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



On Mon, May 10, 2010 at 7:17 AM, Eric Hamel  wrote:

> Good Point. In all honesty, I'm looking for a practical way to "skin" 2
> applications which are identical layout wise. Inherently, I don't want to
> manage 2 different stylesheets as that will lead to maintenance hell.
>
> The idea was to build a Template implemented in both applications to which
> I
> would override/pass to the template
> colors/background-colors/background-image. Might not be the best
> approach...
>
> On Sat, May 8, 2010 at 3:42 AM, Chris Colman
> wrote:
>
> > That method of css generation you propose would be generating CSS (even
> > if it were into a separate .css file) with each page render. If you're
> > dealing with a lot of CSS that probably isn't the most efficient method.
> >
> > Generating CSS at render time would mean the browser could not take
> > advantage of CSS caching - which would be bad in these days of quite
> > large CSS files.
> >
> > You might be better off considering a separate CSS generator that
> > doesn't generate CSS at 'page render time'.
> >
> >
> > >-Original Message-
> > >From: Eric Hamel [mailto:dantehick...@gmail.com]
> > >Sent: Saturday, 8 May 2010 5:52 AM
> > >To: users@wicket.apache.org
> > >Subject: CSS Templating
> > >
> > >All,
> > >
> > >I've been exploring the use of TextTemplateHeaderContributor.forCss
> > method
> > >to build a CSS template for multiple application.
> > >
> > >Take for example:
> > >
> > >IModel> model = new
> > >AbstractReadOnlyModel>(){
> > >
> > >private static final long serialVersionUID = 1L;
> > >
> > >@Override
> > >public Map getObject() {
> > > HashMap map = new HashMap();
> > >map.put("body-bgcolor", "red");
> > > return map;
> > >}
> > >
> > >};
> > > add(TextTemplateHeaderContributor.forCss(WelcomePage.class,
> > >"Template.css",
> > >model));
> > >
> > >with CSS template:
> > >
> > >body{
> > >
> > >background-color: ${body-bgcolor};
> > >
> > >}
> > >
> > >
> > >
> > >The output works. However, the template is contributing to the header
> > in
> > >the
> > >form of:
> > >
> > >
> > >
> > >which is unacceptable. Is there a way to generate a .css file to be
> > used by
> > >the application ?
> > >
> > >Thank you
> > >
> > >--
> > >Sent by Eric Hamel
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
>
>
> --
> Sent by Eric Hamel
>


Re: is possible that CryptedUrlWebRequestCodingStrategy not working

2010-05-10 Thread Jeremy Thomerson
What is a hacker going to get from a URL like "/somepage"?

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



On Mon, May 10, 2010 at 2:06 PM, Fernando Wermus
wrote:

> Igor,
>Wicket in Action explains
> "... Using this code, Wicket will encrypt all your URLs—including
> bookmarkable URLs. ...".
>
> I need fixed entry point for my stateless page,  but not readable for
> humans, because some hacker would like to extract all the information from
> the site.
>
> How can I achieve this?
>
>
> On Mon, May 10, 2010 at 4:01 PM, Igor Vaynberg  >wrote:
>
> > afair crypted strategy only encodes non-bookmarkable urls. it does not
> > encode bookmarkable urls because those are meant as entrypoints into
> > your application.
> >
> > -igor
> >
> > On Mon, May 10, 2010 at 11:38 AM, Fernando Wermus
> >  wrote:
> > > Hi all,
> > >I create a PagingNavigator stateless. Instead of using a model to
> have
> > > the number page shown, my StatelessPagingNavigator shows the number
> > through
> > > parameters. I hope that the page number wouldnt have been showed using
> > > CryptedUrlWebRequestCodingStrategy, but It does. This is rather weird;
> I
> > > hope any could point me out some solution. Is my class written wrongly
> in
> > > some way?
> > >
> > >
> > > public class StatelessPagingNavigator extends PagingNavigator {
> > > private static final long serialVersionUID = 3576836044400027436L;
> > >
> > > public StatelessPagingNavigator(String id, DataView dataView) {
> > > super(id, dataView);
> > > }
> > >
> > >  @Override
> > > protected Link newPagingNavigationIncrementLink(final String id,
> > IPageable
> > > pageable, int increment) {
> > > * **PageParameters p=new PageParameters();*
> > > *
> > > *
> > > * **p.add("increment", String.valueOf(increment));*
> > > * **p.add("pageNumber", String.valueOf(pageable.getCurrentPage()));*
> > > Link link= new BookmarkablePageIncrementLink(id, pageable,
> > > getPage().getClass(), p){
> > > private static final long serialVersionUID = 1L;
> > >
> > > public boolean isEnabled()
> > > {
> > > return super.isEnabled() && StatelessPagingNavigator.this.isEnabled()
> &&
> > > StatelessPagingNavigator.this.isEnableAllowed();
> > > }
> > > };
> > >  return link;
> > > }
> > >
> > > @Override
> > > protected Link newPagingNavigationLink(final String id, final IPageable
> > > pageable, int pageNumber) {
> > > * **PageParameters p=new PageParameters();*
> > > * **p.add("pageNumber", String.valueOf(pageNumber));*
> > >  return new BookmarkablePagingNavigationLink(id, pageable,
> > > getPage().getClass(),  p){
> > > private static final long serialVersionUID = -3076648671049640420L;
> > >
> > > public boolean isEnabled()
> > > {
> > > //return false;
> > > return super.isEnabled() && StatelessPagingNavigator.this.isEnabled()
> &&
> > > StatelessPagingNavigator.this.isEnableAllowed();
> > > }
> > >  };
> > > }
> > >
> > > @Override
> > > protected PagingNavigation newNavigation(final IPageable pageable,
> final
> > > IPagingLabelProvider labelProvider) {
> > > return new PagingNavigation("navigation", pageable, labelProvider) {
> > > private static final long serialVersionUID = 1102823179571300337L;
> > >
> > > @Override
> > > protected Link newPagingNavigationLink(final String id, final IPageable
> > > pageable, int pageIndex) {
> > > * **PageParameters p=new PageParameters();*
> > > * **p.add("pageIndex", String.valueOf(pageIndex));*
> > >  return new BookmarkablePagingNavigation(id, pageable,
> > getPage().getClass(),
> > >  p){
> > > private static final long serialVersionUID = -3076648671049640420L;
> > >
> > > public boolean isEnabled()
> > > {
> > > return super.isEnabled() && StatelessPagingNavigator.this.isEnabled()
> &&
> > > StatelessPagingNavigator.this.isEnableAllowed();
> > > }
> > >  };
> > > }
> > > };
> > > }
> > > }
> > >
> > > thanks in advance
> > >
> > > --
> > > Fernando Wermus.
> > >
> > > www.linkedin.com/in/fernandowermus
> > >
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
>
>
> --
> Fernando Wermus.
>
> www.linkedin.com/in/fernandowermus
>


Re: is possible that CryptedUrlWebRequestCodingStrategy not working

2010-05-10 Thread Fernando Wermus
Igor,
Wicket in Action explains
"... Using this code, Wicket will encrypt all your URLs—including
bookmarkable URLs. ...".

I need fixed entry point for my stateless page,  but not readable for
humans, because some hacker would like to extract all the information from
the site.

How can I achieve this?


On Mon, May 10, 2010 at 4:01 PM, Igor Vaynberg wrote:

> afair crypted strategy only encodes non-bookmarkable urls. it does not
> encode bookmarkable urls because those are meant as entrypoints into
> your application.
>
> -igor
>
> On Mon, May 10, 2010 at 11:38 AM, Fernando Wermus
>  wrote:
> > Hi all,
> >I create a PagingNavigator stateless. Instead of using a model to have
> > the number page shown, my StatelessPagingNavigator shows the number
> through
> > parameters. I hope that the page number wouldnt have been showed using
> > CryptedUrlWebRequestCodingStrategy, but It does. This is rather weird; I
> > hope any could point me out some solution. Is my class written wrongly in
> > some way?
> >
> >
> > public class StatelessPagingNavigator extends PagingNavigator {
> > private static final long serialVersionUID = 3576836044400027436L;
> >
> > public StatelessPagingNavigator(String id, DataView dataView) {
> > super(id, dataView);
> > }
> >
> >  @Override
> > protected Link newPagingNavigationIncrementLink(final String id,
> IPageable
> > pageable, int increment) {
> > * **PageParameters p=new PageParameters();*
> > *
> > *
> > * **p.add("increment", String.valueOf(increment));*
> > * **p.add("pageNumber", String.valueOf(pageable.getCurrentPage()));*
> > Link link= new BookmarkablePageIncrementLink(id, pageable,
> > getPage().getClass(), p){
> > private static final long serialVersionUID = 1L;
> >
> > public boolean isEnabled()
> > {
> > return super.isEnabled() && StatelessPagingNavigator.this.isEnabled() &&
> > StatelessPagingNavigator.this.isEnableAllowed();
> > }
> > };
> >  return link;
> > }
> >
> > @Override
> > protected Link newPagingNavigationLink(final String id, final IPageable
> > pageable, int pageNumber) {
> > * **PageParameters p=new PageParameters();*
> > * **p.add("pageNumber", String.valueOf(pageNumber));*
> >  return new BookmarkablePagingNavigationLink(id, pageable,
> > getPage().getClass(),  p){
> > private static final long serialVersionUID = -3076648671049640420L;
> >
> > public boolean isEnabled()
> > {
> > //return false;
> > return super.isEnabled() && StatelessPagingNavigator.this.isEnabled() &&
> > StatelessPagingNavigator.this.isEnableAllowed();
> > }
> >  };
> > }
> >
> > @Override
> > protected PagingNavigation newNavigation(final IPageable pageable, final
> > IPagingLabelProvider labelProvider) {
> > return new PagingNavigation("navigation", pageable, labelProvider) {
> > private static final long serialVersionUID = 1102823179571300337L;
> >
> > @Override
> > protected Link newPagingNavigationLink(final String id, final IPageable
> > pageable, int pageIndex) {
> > * **PageParameters p=new PageParameters();*
> > * **p.add("pageIndex", String.valueOf(pageIndex));*
> >  return new BookmarkablePagingNavigation(id, pageable,
> getPage().getClass(),
> >  p){
> > private static final long serialVersionUID = -3076648671049640420L;
> >
> > public boolean isEnabled()
> > {
> > return super.isEnabled() && StatelessPagingNavigator.this.isEnabled() &&
> > StatelessPagingNavigator.this.isEnableAllowed();
> > }
> >  };
> > }
> > };
> > }
> > }
> >
> > thanks in advance
> >
> > --
> > Fernando Wermus.
> >
> > www.linkedin.com/in/fernandowermus
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: is possible that CryptedUrlWebRequestCodingStrategy not working

2010-05-10 Thread Igor Vaynberg
afair crypted strategy only encodes non-bookmarkable urls. it does not
encode bookmarkable urls because those are meant as entrypoints into
your application.

-igor

On Mon, May 10, 2010 at 11:38 AM, Fernando Wermus
 wrote:
> Hi all,
>    I create a PagingNavigator stateless. Instead of using a model to have
> the number page shown, my StatelessPagingNavigator shows the number through
> parameters. I hope that the page number wouldnt have been showed using
> CryptedUrlWebRequestCodingStrategy, but It does. This is rather weird; I
> hope any could point me out some solution. Is my class written wrongly in
> some way?
>
>
> public class StatelessPagingNavigator extends PagingNavigator {
> private static final long serialVersionUID = 3576836044400027436L;
>
> public StatelessPagingNavigator(String id, DataView dataView) {
> super(id, dataView);
> }
>
> �...@override
> protected Link newPagingNavigationIncrementLink(final String id, IPageable
> pageable, int increment) {
> * **PageParameters p=new PageParameters();*
> *
> *
> * **p.add("increment", String.valueOf(increment));*
> * **p.add("pageNumber", String.valueOf(pageable.getCurrentPage()));*
> Link link= new BookmarkablePageIncrementLink(id, pageable,
> getPage().getClass(), p){
> private static final long serialVersionUID = 1L;
>
> public boolean isEnabled()
> {
> return super.isEnabled() && StatelessPagingNavigator.this.isEnabled() &&
> StatelessPagingNavigator.this.isEnableAllowed();
> }
> };
>  return link;
> }
>
> @Override
> protected Link newPagingNavigationLink(final String id, final IPageable
> pageable, int pageNumber) {
> * **PageParameters p=new PageParameters();*
> * **p.add("pageNumber", String.valueOf(pageNumber));*
>  return new BookmarkablePagingNavigationLink(id, pageable,
> getPage().getClass(),  p){
> private static final long serialVersionUID = -3076648671049640420L;
>
> public boolean isEnabled()
> {
> //return false;
> return super.isEnabled() && StatelessPagingNavigator.this.isEnabled() &&
> StatelessPagingNavigator.this.isEnableAllowed();
> }
>  };
> }
>
> @Override
> protected PagingNavigation newNavigation(final IPageable pageable, final
> IPagingLabelProvider labelProvider) {
> return new PagingNavigation("navigation", pageable, labelProvider) {
> private static final long serialVersionUID = 1102823179571300337L;
>
> @Override
> protected Link newPagingNavigationLink(final String id, final IPageable
> pageable, int pageIndex) {
> * **PageParameters p=new PageParameters();*
> * **p.add("pageIndex", String.valueOf(pageIndex));*
>  return new BookmarkablePagingNavigation(id, pageable, getPage().getClass(),
>  p){
> private static final long serialVersionUID = -3076648671049640420L;
>
> public boolean isEnabled()
> {
> return super.isEnabled() && StatelessPagingNavigator.this.isEnabled() &&
> StatelessPagingNavigator.this.isEnableAllowed();
> }
>  };
> }
> };
> }
> }
>
> thanks in advance
>
> --
> Fernando Wermus.
>
> www.linkedin.com/in/fernandowermus
>

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



is possible that CryptedUrlWebRequestCodingStrategy not working

2010-05-10 Thread Fernando Wermus
Hi all,
I create a PagingNavigator stateless. Instead of using a model to have
the number page shown, my StatelessPagingNavigator shows the number through
parameters. I hope that the page number wouldnt have been showed using
CryptedUrlWebRequestCodingStrategy, but It does. This is rather weird; I
hope any could point me out some solution. Is my class written wrongly in
some way?


public class StatelessPagingNavigator extends PagingNavigator {
private static final long serialVersionUID = 3576836044400027436L;

public StatelessPagingNavigator(String id, DataView dataView) {
super(id, dataView);
}

 @Override
protected Link newPagingNavigationIncrementLink(final String id, IPageable
pageable, int increment) {
* **PageParameters p=new PageParameters();*
*
*
* **p.add("increment", String.valueOf(increment));*
* **p.add("pageNumber", String.valueOf(pageable.getCurrentPage()));*
Link link= new BookmarkablePageIncrementLink(id, pageable,
getPage().getClass(), p){
private static final long serialVersionUID = 1L;

public boolean isEnabled()
{
return super.isEnabled() && StatelessPagingNavigator.this.isEnabled() &&
StatelessPagingNavigator.this.isEnableAllowed();
}
};
 return link;
}

@Override
protected Link newPagingNavigationLink(final String id, final IPageable
pageable, int pageNumber) {
* **PageParameters p=new PageParameters();*
* **p.add("pageNumber", String.valueOf(pageNumber));*
 return new BookmarkablePagingNavigationLink(id, pageable,
getPage().getClass(),  p){
private static final long serialVersionUID = -3076648671049640420L;

public boolean isEnabled()
{
//return false;
return super.isEnabled() && StatelessPagingNavigator.this.isEnabled() &&
StatelessPagingNavigator.this.isEnableAllowed();
}
 };
}

@Override
protected PagingNavigation newNavigation(final IPageable pageable, final
IPagingLabelProvider labelProvider) {
return new PagingNavigation("navigation", pageable, labelProvider) {
private static final long serialVersionUID = 1102823179571300337L;

@Override
protected Link newPagingNavigationLink(final String id, final IPageable
pageable, int pageIndex) {
* **PageParameters p=new PageParameters();*
* **p.add("pageIndex", String.valueOf(pageIndex));*
 return new BookmarkablePagingNavigation(id, pageable, getPage().getClass(),
 p){
private static final long serialVersionUID = -3076648671049640420L;

public boolean isEnabled()
{
return super.isEnabled() && StatelessPagingNavigator.this.isEnabled() &&
StatelessPagingNavigator.this.isEnableAllowed();
}
 };
}
};
}
}

thanks in advance

-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: [wiQuery] Custom Link to wiQuery Page doest not initialize target page

2010-05-10 Thread Zilvinas Vilutis
Why don't you try: setResponsePage( MyPage.class );

In your case - the constructor is invoked earlier, that may cause problems.

Žilvinas Vilutis

Mobile:   (+370) 652 38353
E-mail:   cika...@gmail.com


On Mon, May 10, 2010 at 9:17 AM, Jens Zastrow  wrote:

> Hi experts,
>
> The following code (Link-example-code) breaks all of my wiQuery-enabled
> Pages.
>
> add(new Link("link", listItem.getModel()) {
>public void onClick() {
> setResponsePage(new MyPage());
>   }
> }
>
> The specified MyPage() ist entered, but without initializing the
> "wiQuery-Subsystem".
> Only after page 'reload' with browser-button everything (js etc.) is loaded
> and initialized.
>
> This only happens with Links, not with BookmarkablePagelinks.
> I'm using wicket 1.4.8 und wiquery 1.0.1.
>
> Anybody facing the same problem?
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


[wiQuery] Custom Link to wiQuery Page doest not initialize target page

2010-05-10 Thread Jens Zastrow

Hi experts,

The following code (Link-example-code) breaks all of my wiQuery-enabled 
Pages.


add(new Link("link", listItem.getModel()) {
public void onClick() {
 setResponsePage(new MyPage());
   }
}

The specified MyPage() ist entered, but without initializing the 
"wiQuery-Subsystem".
Only after page 'reload' with browser-button everything (js etc.) is 
loaded and initialized.


This only happens with Links, not with BookmarkablePagelinks.
I'm using wicket 1.4.8 und wiquery 1.0.1.

Anybody facing the same problem?

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



RE: WicketStuff jWicket - Where is it?

2010-05-10 Thread Stefan Lindner
Yes! It is. It's based upon jQuery 1.4.2 and jQuery-ui 1.8.0.
Version 1.8.1 of jQuery-ui is now available. If this new version is required I 
could integrate it next weekend. Let me know.

Stefan

-Ursprüngliche Nachricht-
Von: Charles Deal [mailto:chuckdea...@gmail.com] 
Gesendet: Montag, 10. Mai 2010 15:44
An: users@wicket.apache.org
Betreff: Re: WicketStuff jWicket - Where is it?

Crap, doesn't that just figure.  Is this the correct location for the
jWicket svn codebase?

https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-core/jwicket-parent


On Mon, May 10, 2010 at 9:41 AM, Charles Deal  wrote:

> I am currently using wicketstuff-jquery for jQuery integration.  However,
> that project seems to be stalled.  I've seen many good references to both
> wiQuery and jWicket on the list and jWicket seems to line up closer to what
> wicketstuff-jquery was.  Which I'm hoping will lead to less pain when
> swapping out the library.
>
> I've been searching this morning trying to find the distribtables for the
> project but have not been able to find anything recent (or that appears
> recent).  The wicketstuff repo (
> http://wicketstuff.org/maven/repository/org/wicketstuff/) shows numerous
> jwicket subprojects, but the 1.4-SNAPSHOT version of the jars is OLDER than
> the 1.4.2 version of the jars.  I don't know which jars to pull.
>
> So, I was going to pull the source and build it myself.  Now, I am having
> trouble finding the svn repo.  I expected to find the source here (
> https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/jwicket-parent)
> but instead I found (a presumably older) copy here (
> https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/releases/wicketstuff-core-1.4-rc7/jwicket-parent).
>
>
> The mailing list, over the last few months, references jWicket being at
> versions that look like 0.5.0, and most recently 0.5.7.  No mention of those
> versions was found in the wicketstuff repo for this project.
>
> Could someone confirm the latest version of jWicket or supply the path to
> the svn codebase?  It would be much appreciated.
>
> Chuck Deal
>

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



Re: Wicket + security, what are the best options? Spring Security reached almost all the way...

2010-05-10 Thread Adrian Wiesmann

3. Doesn't seem stable. [wicket-shiro] No maven repository (you have to
check out trunk and build yourself) and has three different SNAPSHOT
dependencies.


I can't talk for wicket-shiro, but using plain Shiro from your Wicket 
project is quite straightforward. Use the integration from wicket-shiro 
as a pointer and integrate everything directly into your project. I did 
it this way and am very happy with it so far.


Cheers,
Adrian

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



Re: Wicket + security, what are the best options? Spring Security reached almost all the way...

2010-05-10 Thread Fernando Wermus
you can try shiro. There is a shiro-wicket-web-app example which could help
you.

On Mon, May 10, 2010 at 9:54 AM, PDiefent  wrote:

>
> Thanks for this fast respnse. I will have a deeper look at it.
> Actually I hoped to find a much more simple solution, because I wanted to
> avoid Spring in my application and only use it for authentication ...
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Wicket-security-what-are-the-best-options-Spring-Security-reached-almost-all-the-way-tp2068415p2165351.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
>
>


-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: Inline Javascript comments

2010-05-10 Thread Igor Vaynberg
the core issue here is that liferay is removing linefeeds inside a
CDATA block, which it obviously shouldnt.

-igor

On Sun, May 9, 2010 at 11:48 PM, Jérôme Schell  wrote:
> Le 08/05/2010 22:41, Igor Vaynberg a écrit :
>> strange that its a problem for nothing else but liferay...
>
> Hello,
>
> Yes but I would rather say that the problem is revealed by Liferay
> because of its "remove line feeds" behavior.
> I'm still wondering why the sequence added by Wicket looks like that. If
> anybody has a pointer that explain in detail the sequence...
> Let's try to understand the preamble:
> 
>  => Add a HTML comment to hide the javascript comment opening
> */
>>>
>>> The thing is that Liferay now strips out the carriage returns on
>>> embedded javascript, so the sequence became (shortened):
>>> */
>>>
>>> The javascript is then not executed.
>>> Seeing this, I am wondering if the comment added by Wicket is correct.
>>> It seems there is not a good match between /* and */ so that would
>>> explain that the code is considered as beeing commented out and so not
>>> executed...
>
>
>
>
> -
> 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: AutoCompleteTextField uses wrong encoding?

2010-05-10 Thread Eike Kettner

Hi Matt

some long time ago I had a similiar problem with AjaxEditableLabel. I 
used tomcat and there you need to configure the connector using 
"useBodyEncodingForURI=true" to make tomcat use utf8 for encoding ajax 
requests.









eike

On 10.05.2010 15:27, Matthias Keller wrote:

Hi

I'm using an autocompletefield and it works fine so far. Except that 
when entering special characters, they don't get encoded correctly.
The query String is correct and sends the special character in encoded 
UTF-8:

GET http://localhost:9080/.../...&q=%C3%B6&random=...
%C3%B6 is UTF8 for "ö"

But in:
org.apache.wicket.extensions.ajax.markup.html.autocomplete.AbstractAutoCompleteBehavior.respond(AjaxRequestTarget) 


The following line
final String val = requestCycle.getRequest().getParameter("q");
returns an incorrect string: "ö" which would be the %C3%B6 in 
ISO-8859-1 (which happens to be my platform encoding)...
Thus the input parameter to my getChoices() call contains strange 
characters in this case...


It appears that the request isn't read out as UTF-8 somehow.. Since I 
don't know the AJAX internals, it's hard to find the culprit for me


I'm using Wicket 1.4.8

Matt




Re: WicketStuff jWicket - Where is it?

2010-05-10 Thread Charles Deal
Crap, doesn't that just figure.  Is this the correct location for the
jWicket svn codebase?

https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-core/jwicket-parent


On Mon, May 10, 2010 at 9:41 AM, Charles Deal  wrote:

> I am currently using wicketstuff-jquery for jQuery integration.  However,
> that project seems to be stalled.  I've seen many good references to both
> wiQuery and jWicket on the list and jWicket seems to line up closer to what
> wicketstuff-jquery was.  Which I'm hoping will lead to less pain when
> swapping out the library.
>
> I've been searching this morning trying to find the distribtables for the
> project but have not been able to find anything recent (or that appears
> recent).  The wicketstuff repo (
> http://wicketstuff.org/maven/repository/org/wicketstuff/) shows numerous
> jwicket subprojects, but the 1.4-SNAPSHOT version of the jars is OLDER than
> the 1.4.2 version of the jars.  I don't know which jars to pull.
>
> So, I was going to pull the source and build it myself.  Now, I am having
> trouble finding the svn repo.  I expected to find the source here (
> https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/jwicket-parent)
> but instead I found (a presumably older) copy here (
> https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/releases/wicketstuff-core-1.4-rc7/jwicket-parent).
>
>
> The mailing list, over the last few months, references jWicket being at
> versions that look like 0.5.0, and most recently 0.5.7.  No mention of those
> versions was found in the wicketstuff repo for this project.
>
> Could someone confirm the latest version of jWicket or supply the path to
> the svn codebase?  It would be much appreciated.
>
> Chuck Deal
>


WicketStuff jWicket - Where is it?

2010-05-10 Thread Charles Deal
I am currently using wicketstuff-jquery for jQuery integration.  However,
that project seems to be stalled.  I've seen many good references to both
wiQuery and jWicket on the list and jWicket seems to line up closer to what
wicketstuff-jquery was.  Which I'm hoping will lead to less pain when
swapping out the library.

I've been searching this morning trying to find the distribtables for the
project but have not been able to find anything recent (or that appears
recent).  The wicketstuff repo (
http://wicketstuff.org/maven/repository/org/wicketstuff/) shows numerous
jwicket subprojects, but the 1.4-SNAPSHOT version of the jars is OLDER than
the 1.4.2 version of the jars.  I don't know which jars to pull.

So, I was going to pull the source and build it myself.  Now, I am having
trouble finding the svn repo.  I expected to find the source here (
https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/jwicket-parent)
but instead I found (a presumably older) copy here (
https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/releases/wicketstuff-core-1.4-rc7/jwicket-parent).


The mailing list, over the last few months, references jWicket being at
versions that look like 0.5.0, and most recently 0.5.7.  No mention of those
versions was found in the wicketstuff repo for this project.

Could someone confirm the latest version of jWicket or supply the path to
the svn codebase?  It would be much appreciated.

Chuck Deal


AutoCompleteTextField uses wrong encoding?

2010-05-10 Thread Matthias Keller

Hi

I'm using an autocompletefield and it works fine so far. Except that 
when entering special characters, they don't get encoded correctly.
The query String is correct and sends the special character in encoded 
UTF-8:

GET http://localhost:9080/.../...&q=%C3%B6&random=...
%C3%B6 is UTF8 for "ö"

But in:
org.apache.wicket.extensions.ajax.markup.html.autocomplete.AbstractAutoCompleteBehavior.respond(AjaxRequestTarget)
The following line
final String val = requestCycle.getRequest().getParameter("q");
returns an incorrect string: "ö" which would be the %C3%B6 in 
ISO-8859-1 (which happens to be my platform encoding)...
Thus the input parameter to my getChoices() call contains strange 
characters in this case...


It appears that the request isn't read out as UTF-8 somehow.. Since I 
don't know the AJAX internals, it's hard to find the culprit for me


I'm using Wicket 1.4.8

Matt




smime.p7s
Description: S/MIME Cryptographic Signature


Re: root context, IE, home page is not found

2010-05-10 Thread Jimi

Erik van Oosten wrote:
> This might be related to
> https://issues.apache.org/jira/browse/WICKET-2600?

Well, it sure is related, and that ticket is marked as resolved with 1.4.5.
But the bug still exist in 1.4.7, at least for me.

/Jimi
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/root-context-IE-home-page-is-not-found-tp1877009p2165392.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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



Re: Problem with AjaxLazyLoad panel in IE7 and IE8

2010-05-10 Thread Kailash Yadav

After investigation, i fount that...
add(new AbstractDefaultAjaxBehavior()
{
private static final long serialVersionUID = 1L;

@Override
protected void respond(AjaxRequestTarget target)
{
Component component = 
getLazyLoadComponent(LAZY_LOAD_COMPONENT_ID);
AjaxLazyLoadPanel.this.replace(component);
target.addComponent(AjaxLazyLoadPanel.this);
setState((byte)2);
}

...
execution control is not return in respond(AjaxRequestTarget target) method
after page load... :(
please help me !!!
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Problem-with-AjaxLazyLoad-panel-in-IE7-and-IE8-tp2164997p2165386.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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



Re: Wicket + security, what are the best options? Spring Security reached almost all the way...

2010-05-10 Thread PDiefent

Thanks for this fast respnse. I will have a deeper look at it.
Actually I hoped to find a much more simple solution, because I wanted to
avoid Spring in my application and only use it for authentication ...
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-security-what-are-the-best-options-Spring-Security-reached-almost-all-the-way-tp2068415p2165351.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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



Re: CSS Templating

2010-05-10 Thread Eric Hamel
Good Point. In all honesty, I'm looking for a practical way to "skin" 2
applications which are identical layout wise. Inherently, I don't want to
manage 2 different stylesheets as that will lead to maintenance hell.

The idea was to build a Template implemented in both applications to which I
would override/pass to the template
colors/background-colors/background-image. Might not be the best approach...

On Sat, May 8, 2010 at 3:42 AM, Chris Colman
wrote:

> That method of css generation you propose would be generating CSS (even
> if it were into a separate .css file) with each page render. If you're
> dealing with a lot of CSS that probably isn't the most efficient method.
>
> Generating CSS at render time would mean the browser could not take
> advantage of CSS caching - which would be bad in these days of quite
> large CSS files.
>
> You might be better off considering a separate CSS generator that
> doesn't generate CSS at 'page render time'.
>
>
> >-Original Message-
> >From: Eric Hamel [mailto:dantehick...@gmail.com]
> >Sent: Saturday, 8 May 2010 5:52 AM
> >To: users@wicket.apache.org
> >Subject: CSS Templating
> >
> >All,
> >
> >I've been exploring the use of TextTemplateHeaderContributor.forCss
> method
> >to build a CSS template for multiple application.
> >
> >Take for example:
> >
> >IModel> model = new
> >AbstractReadOnlyModel>(){
> >
> >private static final long serialVersionUID = 1L;
> >
> >@Override
> >public Map getObject() {
> > HashMap map = new HashMap();
> >map.put("body-bgcolor", "red");
> > return map;
> >}
> >
> >};
> > add(TextTemplateHeaderContributor.forCss(WelcomePage.class,
> >"Template.css",
> >model));
> >
> >with CSS template:
> >
> >body{
> >
> >background-color: ${body-bgcolor};
> >
> >}
> >
> >
> >
> >The output works. However, the template is contributing to the header
> in
> >the
> >form of:
> >
> >
> >
> >which is unacceptable. Is there a way to generate a .css file to be
> used by
> >the application ?
> >
> >Thank you
> >
> >--
> >Sent by Eric Hamel
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Sent by Eric Hamel


RE: Wicket + Spring + WicketTester: org.apache.wicket.WicketRuntimeException: There is no application attached to current thread main

2010-05-10 Thread Lauwers, Kim
Okay,

Got my test green :-)


Here it is:

package be.thomascook.ui.pages.admin;

import be.thomascook.wicket.component.WicketFilter;
import org.apache.wicket.spring.injection.annot.SpringComponentInjector;
import org.apache.wicket.util.tester.WicketTester;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.testng.AbstractTestNGSpringContextTests;
import 
org.springframework.test.context.testng.AbstractTransactionalTestNGSpringContextTests;
import org.springframework.transaction.annotation.Transactional;
import org.testng.annotations.Test;

/**
 * @author Compi
 * @since 10-mei-2010
 */
@ContextConfiguration(locations = {
"/applicationContext-dao.xml",
"/applicationContext-service.xml",
"/applicationContext-database.xml"})
@Transactional
public class UserListPageTest extends 
AbstractTransactionalTestNGSpringContextTests {

@Autowired
private ApplicationContext applicationContext;
@Autowired
protected WicketFilter wicketApplication;

@Test
public void labelContainsHelloWorld()   {
WicketTester tester=new WicketTester();
tester.getApplication().addComponentInstantiationListener(new 
SpringComponentInjector(tester.getApplication(), applicationContext, true ));


tester.startPage(UserListPage.class);
tester.assertNoErrorMessage();
tester.assertLabel("title", "Users List");
}
}


Kind regards,
Kim

-Original Message-
From: Lauwers, Kim [mailto:kim.lauw...@thomascook.be] 
Sent: maandag 10 mei 2010 14:00
To: users@wicket.apache.org
Subject: Wicket + Spring + WicketTester: 
org.apache.wicket.WicketRuntimeException: There is no application attached to 
current thread main

Hello everybody,

 

I'm having problems with testing my wicket application with WicketTester

I get this error:

org.apache.wicket.WicketRuntimeException: There is no application attached to 
current thread main

 

è See below for fulle stacktrace.

 

 

I have been looking everywhere on the net, and I can't seem to get it working L

 

I have following WEB.XML

 

[WEB.XML]



http://java.sun.com/xml/ns/javaee"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";

 xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd";>



contextConfigLocation

classpath:applicationContext.xml



 



SLF4J helper

be.thomascook.SLF4JHelperServlet

1



 




org.springframework.web.context.ContextLoaderListener



 



opensessioninview


org.springframework.orm.hibernate3.support.OpenSessionInViewFilter





opensessioninview

/*



 



Jersey Spring Web Application


com.sun.jersey.spi.spring.container.servlet.SpringServlet




com.sun.jersey.config.property.JSPTemplatesBasePath

/WEB-INF/jsp



2





Jersey Spring Web Application

/rest/*



 



wicket-spring


org.apache.wicket.protocol.http.WicketFilter



applicationFactoryClassName


org.apache.wicket.spring.SpringWebApplicationFactory





applicationBean

wicketApplication





 



wicket-spring

/*





[/WEB.XML]

 

 

My WebApplication

In the init method we weave spring to our wicket

[APP]

public class WicketFilter extends WebApplication {

/**

 * Constructor.

 */

public WicketFilter() {

 

}

 

@Override

protected void init() {

addComponentInstantiationListener(new SpringComponentInjector(this));

}

 

public Class getHomePage() {

return UserListPage.class;

}

}

[/APP]

 

My userListPage

With the @SpringBean we inject a spring bean which is defined in our 
applicationContext.

[PAGE]

public class UserListPage extends TemplatePage {

 

@SpringBean(name = "userservice")

private GenericCRUDService service;

 

public UserListPage() {

setPageTitle("Users List");

this.add(new CRUDPanel("userlist", service, "username", 
"firstName", "lastName", "email", "enabled") {

@Override

protected void onEdit(IModel rowModel) {

UserPage page = new UserPage(rowModel);

setResponsePage(page);

}

});

}

}

[/PAGE]

 

 

And finally my test which fails

[TEST]

@ContextConfiguration(locations = {

"/applicationContext-dao.xml",

"/applicationContext-service.xml",

"/applicationContext-database.xml"})

public class UserListPageTest extends AbstractTestNGSpringContextTests {

 

@Autowired

private ApplicationContext applica

Wicket + Spring + WicketTester: org.apache.wicket.WicketRuntimeException: There is no application attached to current thread main

2010-05-10 Thread Lauwers, Kim
Hello everybody,

 

I'm having problems with testing my wicket application with WicketTester

I get this error:

org.apache.wicket.WicketRuntimeException: There is no application attached to 
current thread main

 

è See below for fulle stacktrace.

 

 

I have been looking everywhere on the net, and I can't seem to get it working L

 

I have following WEB.XML

 

[WEB.XML]



http://java.sun.com/xml/ns/javaee"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";

 xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd";>



contextConfigLocation

classpath:applicationContext.xml



 



SLF4J helper

be.thomascook.SLF4JHelperServlet

1



 




org.springframework.web.context.ContextLoaderListener



 



opensessioninview


org.springframework.orm.hibernate3.support.OpenSessionInViewFilter





opensessioninview

/*



 



Jersey Spring Web Application


com.sun.jersey.spi.spring.container.servlet.SpringServlet




com.sun.jersey.config.property.JSPTemplatesBasePath

/WEB-INF/jsp



2





Jersey Spring Web Application

/rest/*



 



wicket-spring


org.apache.wicket.protocol.http.WicketFilter



applicationFactoryClassName


org.apache.wicket.spring.SpringWebApplicationFactory





applicationBean

wicketApplication





 



wicket-spring

/*





[/WEB.XML]

 

 

My WebApplication

In the init method we weave spring to our wicket

[APP]

public class WicketFilter extends WebApplication {

/**

 * Constructor.

 */

public WicketFilter() {

 

}

 

@Override

protected void init() {

addComponentInstantiationListener(new SpringComponentInjector(this));

}

 

public Class getHomePage() {

return UserListPage.class;

}

}

[/APP]

 

My userListPage

With the @SpringBean we inject a spring bean which is defined in our 
applicationContext.

[PAGE]

public class UserListPage extends TemplatePage {

 

@SpringBean(name = "userservice")

private GenericCRUDService service;

 

public UserListPage() {

setPageTitle("Users List");

this.add(new CRUDPanel("userlist", service, "username", 
"firstName", "lastName", "email", "enabled") {

@Override

protected void onEdit(IModel rowModel) {

UserPage page = new UserPage(rowModel);

setResponsePage(page);

}

});

}

}

[/PAGE]

 

 

And finally my test which fails

[TEST]

@ContextConfiguration(locations = {

"/applicationContext-dao.xml",

"/applicationContext-service.xml",

"/applicationContext-database.xml"})

public class UserListPageTest extends AbstractTestNGSpringContextTests {

 

@Autowired

private ApplicationContext applicationContext;

@Autowired

protected WicketFilter wicketApplication;

 

@Test

public void labelContainsHelloWorld() {

 

wicketApplication.addComponentInstantiationListener(new 
SpringComponentInjector(wicketApplication, applicationContext, true));

 

WicketTester tester = new WicketTester(wicketApplication);

 

 

tester.startPage(UserListPage.class);

tester.assertNoErrorMessage();

tester.assertLabel("title", "Roles List");

}

}

[/TEST]

 

 

[EXCEPTION]

org.apache.wicket.WicketRuntimeException: There is no application attached to 
current thread main

at org.apache.wicket.Application.get(Application.java:179)

at 
org.apache.wicket.injection.web.InjectorHolder.setInjector(InjectorHolder.java:88)

at 
org.apache.wicket.spring.injection.annot.SpringComponentInjector.(SpringComponentInjector.java:104)

at 
be.thomascook.ui.pages.admin.UserListPageTest.labelContainsHelloWorld(UserListPageTest.java:46)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:597)

at 
org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:644)

at 
org.testng.internal.MethodHelper$1.runTestMethod(MethodHelper.java:762)

at 
org.springframework.test.context.testng.AbstractTestNGSpringContextTests.run(AbstractTestNGSpringContextTests.java:158)

 

Process finished with exit code 0

[/EXCEPTION]

 

 

 

Thanks in advance.

Kim

 



Re: Call Ajax on Parent Page from Popup page.

2010-05-10 Thread Serban Balamaci

I have solved it by overiding getPreconditionScript() in the behaviour to
return "return true;":
protected CharSequence getPreconditionScript() {
return "return true";
}

I hope I do not run into any problems with this.

Cheers.


-
http://balamaci.wordpress.com http://balamaci.wordpress.com 
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Call-Ajax-on-Parent-Page-from-Popup-page-tp2134034p2165297.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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



Re: Call Ajax on Parent Page from Popup page.

2010-05-10 Thread Serban Balamaci

Thank you Jeremy,
It's working this way, although that label was a simple container for the
script:

I do not understand why it was not working. 

Now I have a problem in the sense that it's working only let's say "the
first time". Because I get:
Ajax GET stopped because of precondition check,
url:?wicket:interface=:13:right-content-panel-container:right-content-panel-id:details-panel:tabs:panel:create-proposal-panel::IBehaviorListener:0:-1

I believe it's because this behavior is added in an ajax tab panel. If I
change the tab panel and then return back, I guess the behavior it's being
added again in the header and somehow gets mixed up. 

If I do not change tab panels it works every time.

It's not related to calling the function from the popup, I get this error
even if I do call the method as onclick in the same page.


-
http://balamaci.wordpress.com http://balamaci.wordpress.com 
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Call-Ajax-on-Parent-Page-from-Popup-page-tp2134034p2165281.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