Re: How make continous row index in dataTable

2010-05-11 Thread cleverpig
hi,Erwin!

Thank you so fast and accurate response!
That's great help to me!

2010/5/11 Erwin Bolwidt 
>
> Hi,
>
> You can do it like this:
>
> private private DefaultDataTable dataTable;
>
> // ...
>
> new AbstractColumn(new Model("#")) {
> public void populateItem(Item> cellItem,
> String componentId,
> IModel rowModel) {
> Item item = (Item) cellItem.getParent().getParent();
> int index = dataTable.getCurrentPage() * dataTable.getRowsPerPage() +
> item.getIndex() + 1;
> cellItem.add(new Label(componentId, String.valueOf(index)));
> }
> }
>
> Regards,
> Erwin Bolwidt
>
>
> On 5/11/10 9:56 AM, cleverpig wrote:
> > hi,everybody!
> >
> > I used this way to build dataTable:
> > DataProvider+Column defines+DataTable.
> >
> > I want to add a index column at the first column,and hope that keeping
> > continuous index number.
> > So whenever turn to another page it will hold continuously,just not
> > renew from 1.
> >
> > But now,I can get a sample code to implement index number in each
> > page,not ontinuous index number yet.
> >
> > IColumn[] columns={
> >       new AbstractColumn(new ResourceModel("column.index")){
> >
> >               private static final long serialVersionUID = 0L;
> >
> >                       @Override
> >                       public void populateItem(Item cellItem, String 
> > componentId, IModel
> > rowModel) {
> >                               Item 
> > item=(Item)cellItem.getParent().getParent();
> >                               cellItem.add(new Label(componentId,new 
> > Model(item.getIndex()+1)));
> >                       }
> >               },
> >       ...
> > };
> >
> > DataTable dataTable=new DataTable("entries",columns,dataProvider,5);
> > ...
> >
> > How to make continous row index in dataTable? Hoping that the wise
> > friend to help me.
> >
> >
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>



--
cleverpig(Dan)
Location: Beijing
Address: Room 4018,No.A2 South Avenue Fuxingmen Beijing,P.R.China
Zipcode: 100031
MSN: great_liu...@hotmail.com
QQ: 149291732
Skype: cleverpigatmatrix
Facebook ID:cleverpig
Blog: cleverpig.name/dan/
Tags: del.icio.us/cleverpig
Twitter: twitter.com/cleverpig
新浪微博: t.sina.com.cn/cleverpig
Organization: www.beijing-open-party.org
or...@facebook: http://www.facebook.com/group.php?gid=8159558294

-
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-11 Thread Jeremy Thomerson
Great.  We definitely want to see it if you can reproduce it.  What I find
is that 75% of the time, it turns out to be an error of something else
conflicting, or else I find the problem in my own code if I try to boil it
down to the simplest quickstart possible.

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



On Tue, May 11, 2010 at 2:34 AM, Jimi  wrote:

>
> I tried to recreate the issue in a simple quickstart project, but that
> seems
> to be easier said then done. The only time this bug shows its ugly face is
> when a logged in user uses the logout link, and is [supposed to be]
> redirected to the home page (ie the login page). I tried to debug it to see
> where it goes wrong, but there are just too many filters and too many
> classes involved so the task was too daunting for me at the moment.
>
> I guess the only way to recreate this is to use Wicket Security, and
> possibly also Spring Security, in the "quickstart". I will try to do this
> when I have the time, maybe during the upcoming public holiday this week.
>
> /Jim
>
>
> Jeremy Thomerson wrote:
> >
> > 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
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/root-context-IE-home-page-is-not-found-tp1877009p2173452.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: is possible that CryptedUrlWebRequestCodingStrategy not working

2010-05-11 Thread Jeremy Thomerson
You're subscribing to a mythical line of reasoning.  You're trying to
protect against page-scraping by using URL obfuscation to hide the meaning
of query string parameters.  I have actually done (legitimate, legal,
purposefui) page scraping in the past for a couple of tasks - believe me -
you are only going to slow down a page scraper by about thirty seconds.  If
you really have data worth scraping, it doesn't matter if I have to do this:

1 - pull up homepage
2 - determine that I can change "/foo/1" to "/foo/2" to get the second page

or this:

1 - pull up homepage
2 - determine that I have to look for a link by search pattern .someclass
someelement a#next-page and use the href of that link to get second page of
results

And (as a page scraper) - I wouldn't even care that I need to have a session
for the crypted url strategy to work.  I can easily do that with any number
of http bot clients (including httpunit, etc).

Bottom line is: if you use "security by obscurity", you're only fooling
yourself into thinking it's secure.  If you need something secured, put a
paywall in front of it.  (Of course, then I'll just buy an account and
scrape it any way if I'm a determined competitor).

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



On Tue, May 11, 2010 at 9:13 AM, Fernando Wermus
wrote:

> Jeremy,
> There is a database with huge amount of data that could be collected by
> someone else. If the url has a clear meaning, to say: /data/0, /data/1.
> They
> can get all the data from there. I would like to have fixed and encripted
> urls.
>
> On Mon, May 10, 2010 at 4:17 PM, Jeremy Thomerson <
> jer...@wickettraining.com
> > wrote:
>
> > 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 <
> igor.vaynb...@gmail.com
> > > >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();
> > > > > }
> > > > >  };
> > > > > }
> > > > >
> > > > >

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

2010-05-11 Thread orange80

Igor,

You were totally right.  I went into 1.4.8 src, inside WebResponse and
printed out the argument like this:
public void write(AppendingStringBuffer asb)
{
log.info("asb output:\n" + String.valueOf(asb.getValue()));
try
{
httpServletResponse.getWriter().write(asb.getValue(), 
0, asb.length());
}
catch (IOException e)
{
throw new WicketRuntimeException("Error while writing 
to servlet output
writer.", e);
}
}

As far as I could tell from outputting all the arguments to write methods in
WebResponse and Response, this is probably the only (or at least primary)
place where the response gets sent out.

What I found is that responses that came after one or more 302's still has
only one ... tag, which is the correct response obviously.  It
looks like there must be a bug in Firebug.  I'll see if I can confirm it
independently and maybe file a bug.

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-tp2173315p2195536.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: is possible that CryptedUrlWebRequestCodingStrategy not working

2010-05-11 Thread Igor Vaynberg
you will have to tweak the default strategy for your usecase. by
default the strategy uses a secret stored in session to encrypt. if a
search bot does not support sessions it will not be able to follow
links from one page to the next.

-igor

On Tue, May 11, 2010 at 1:23 PM, Fernando Wermus
 wrote:
> Yes, it is.
>
> I will review my case.
>
> I have the following urls:
>
> valiousData/pagenumber/0, valiousData/pagenumber/1,
> valiousData/pagenumber/2, valiousData/pagenumber/3
>
> I want fixed urls or stable ones because I would like the searcher robots
> could follow this links. But I don't want a programmer ask for each of these
> pages to get all the information is in it. I don't want them to be readable
> for a programmer. I thought applying bookmarkablePageLink +
> CryptedUrlWebRequestCodingStrategy I would get this both needs.
>
>
> ps: I need this for an app demo and right now I am not worry about how good
> is CryptedUrlWebRequestCodingStrategy algorithms.
>
> -fer
>
> On Tue, May 11, 2010 at 2:02 PM, Igor Vaynberg wrote:
>
>> if thats the case why make the url bookmarkable?
>>
>> -igor
>>
>> On Tue, May 11, 2010 at 7:13 AM, Fernando Wermus
>>  wrote:
>> > Jeremy,
>> >     There is a database with huge amount of data that could be collected
>> by
>> > someone else. If the url has a clear meaning, to say: /data/0, /data/1.
>> They
>> > can get all the data from there. I would like to have fixed and encripted
>> > urls.
>> >
>> > On Mon, May 10, 2010 at 4:17 PM, Jeremy Thomerson <
>> jer...@wickettraining.com
>> >> wrote:
>> >
>> >> 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 <
>> igor.vaynb...@gmail.com
>> >> > >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()
>> >> > &&
>> >> > > > S

Re: efficient resource downloading

2010-05-11 Thread Igor Vaynberg
On Tue, May 11, 2010 at 11:24 AM, Zilvinas Vilutis  wrote:
> If you need to have the current session in a servlet, you may use the
> WicketSessionFilter which "injects" the wicket session into a
> ServletRequest.

rather it binds it to the threadlocal so you can say Session.get()

-igor

>
> In any way you want to use it - your chosen implementation of security part
> will still be heavyweight.
>
> Not sure if you can submit authentification details using a post request -
> but I'd suggest to use some simple web server as "lighthttpd" or "thttpd"
> for frequent resource access secured lighter then spring.
>
> Žilvinas Vilutis
>
> Mobile:   (+370) 652 38353
> E-mail:   cika...@gmail.com
>
>
> On Tue, May 11, 2010 at 11:06 AM, vladimir.kovalyuk wrote:
>
>>
>> Since you wrote that you employ Spring MCV I presume you don't use any page
>> state when constructing your dynamic resource, instead you parse URL
>> parameters. Thus your resource seems to be shared resource.
>>
>> I used to extend WebResource (provide your own dynamic implementation of
>> IResourceStream) for that task and register it as a shared resource at the
>> application initialization time. For the resources that have persistent
>> URLs
>> I used to mount them with shared resource url coding strategy.
>>
>> Since shared resources are handled by Wicket filter I always have access to
>> the session and can check permissions.
>>
>> I like that I can handle the cache by throwing
>> AbortWithWebErrorCodeException(HttpServletResponse.SC_NOT_MODIFIED)
>> exception if the resource hasn't changed since recent download.
>>
>> I would like to ask Igor to comment on that. Code maintainers expressed
>> some
>> thoughts about future support of IResourceStream.
>>
>> --
>> View this message in context:
>> http://apache-wicket.1842946.n4.nabble.com/efficient-resource-downloading-tp2164866p2174267.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: Customizing CheckBoxMultipleChoice Images?

2010-05-11 Thread Zilvinas Vilutis
IE6/7 does not support those CSS selectors [type=checkbox] as far as I
remember


Žilvinas Vilutis

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


On Tue, May 11, 2010 at 11:23 AM, Corbin, James wrote:

> Thanks Igor.
>
> I know this isn't a wicket issue...but,
>
> I'm able to style some aspects of the checkbox's by specifying css as in,
>
> div. input[type=checkbox]
> {
> ...
> }
>
> Or
>
> div. input[type=checkbox]:checked
> {
> ...
> }
>
> But if I specify the background attribute in either of these sections, it
> doesn't change the they image for the selected or unselected checkbox state.
>
> I've seen a fair number of examples on how to change the checkbox images
> using css and custom javascript, but I hoped it was possible with just css.
>
> J.D.
>
>
>
> -Original Message-
> From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com]
> Sent: Tuesday, May 11, 2010 11:08 AM
> To: users@wicket.apache.org
> Subject: Re: Customizing CheckBoxMultipleChoice Images?
>
> put the choice component into a div with a class attribute, then in
> css you can do div. input[type=checkbox]
> 
>
> -igor
>
> On Tue, May 11, 2010 at 9:23 AM, Corbin, James 
> wrote:
> > Hello,
> >
> > I would like to customize the images used for the selected and unselected
> states of the checkboxes rendered as part of the CheckBoxMultipleChoice
> component, but not sure how to do this...
> >
> > I've read a few sources that indicate this can be done by specifying a
> class="styled" on the markup for the checkbox, but not sure I have access to
> doing so through wicket.
> >
> > The idea is to specify the following, (obviously the
> CheckBoxMultipleChoice will generate this markup)
> > 
> >
> > Once the input markup specifies the "styled" class, theoretically you can
> customize the background images using css.
> >
> > Is this the right approach and if so, how can I add a style attribute to
> the generated  element?
> >
> > Thanks,
> > J.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: Customizing CheckBoxMultipleChoice Images?

2010-05-11 Thread Igor Vaynberg
i wasnt aware of the fact that it was possible, ive only ever seen
people implement that kind of stuff using custom image/anchor
components.

-igor

On Tue, May 11, 2010 at 11:23 AM, Corbin, James  wrote:
> Thanks Igor.
>
> I know this isn't a wicket issue...but,
>
> I'm able to style some aspects of the checkbox's by specifying css as in,
>
> div. input[type=checkbox]
> {
> ...
> }
>
> Or
>
> div. input[type=checkbox]:checked
> {
> ...
> }
>
> But if I specify the background attribute in either of these sections, it 
> doesn't change the they image for the selected or unselected checkbox state.
>
> I've seen a fair number of examples on how to change the checkbox images 
> using css and custom javascript, but I hoped it was possible with just css.
>
> J.D.
>
>
>
> -Original Message-
> From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com]
> Sent: Tuesday, May 11, 2010 11:08 AM
> To: users@wicket.apache.org
> Subject: Re: Customizing CheckBoxMultipleChoice Images?
>
> put the choice component into a div with a class attribute, then in
> css you can do div. input[type=checkbox]
> 
>
> -igor
>
> On Tue, May 11, 2010 at 9:23 AM, Corbin, James  
> wrote:
>> Hello,
>>
>> I would like to customize the images used for the selected and unselected 
>> states of the checkboxes rendered as part of the CheckBoxMultipleChoice 
>> component, but not sure how to do this...
>>
>> I've read a few sources that indicate this can be done by specifying a 
>> class="styled" on the markup for the checkbox, but not sure I have access to 
>> doing so through wicket.
>>
>> The idea is to specify the following, (obviously the CheckBoxMultipleChoice 
>> will generate this markup)
>> 
>>
>> Once the input markup specifies the "styled" class, theoretically you can 
>> customize the background images using css.
>>
>> Is this the right approach and if so, how can I add a style attribute to the 
>> generated  element?
>>
>> Thanks,
>> J.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
>
>

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



Re: is possible that CryptedUrlWebRequestCodingStrategy not working

2010-05-11 Thread Fernando Wermus
Yes, it is.

I will review my case.

I have the following urls:

valiousData/pagenumber/0, valiousData/pagenumber/1,
valiousData/pagenumber/2, valiousData/pagenumber/3

I want fixed urls or stable ones because I would like the searcher robots
could follow this links. But I don't want a programmer ask for each of these
pages to get all the information is in it. I don't want them to be readable
for a programmer. I thought applying bookmarkablePageLink +
CryptedUrlWebRequestCodingStrategy I would get this both needs.


ps: I need this for an app demo and right now I am not worry about how good
is CryptedUrlWebRequestCodingStrategy algorithms.

-fer

On Tue, May 11, 2010 at 2:02 PM, Igor Vaynberg wrote:

> if thats the case why make the url bookmarkable?
>
> -igor
>
> On Tue, May 11, 2010 at 7:13 AM, Fernando Wermus
>  wrote:
> > Jeremy,
> > There is a database with huge amount of data that could be collected
> by
> > someone else. If the url has a clear meaning, to say: /data/0, /data/1.
> They
> > can get all the data from there. I would like to have fixed and encripted
> > urls.
> >
> > On Mon, May 10, 2010 at 4:17 PM, Jeremy Thomerson <
> jer...@wickettraining.com
> >> wrote:
> >
> >> 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 <
> igor.vaynb...@gmail.com
> >> > >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
> >> > > >

Re: efficient resource downloading

2010-05-11 Thread Zilvinas Vilutis
If you need to have the current session in a servlet, you may use the
WicketSessionFilter which "injects" the wicket session into a
ServletRequest.

In any way you want to use it - your chosen implementation of security part
will still be heavyweight.

Not sure if you can submit authentification details using a post request -
but I'd suggest to use some simple web server as "lighthttpd" or "thttpd"
for frequent resource access secured lighter then spring.

Žilvinas Vilutis

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


On Tue, May 11, 2010 at 11:06 AM, vladimir.kovalyuk wrote:

>
> Since you wrote that you employ Spring MCV I presume you don't use any page
> state when constructing your dynamic resource, instead you parse URL
> parameters. Thus your resource seems to be shared resource.
>
> I used to extend WebResource (provide your own dynamic implementation of
> IResourceStream) for that task and register it as a shared resource at the
> application initialization time. For the resources that have persistent
> URLs
> I used to mount them with shared resource url coding strategy.
>
> Since shared resources are handled by Wicket filter I always have access to
> the session and can check permissions.
>
> I like that I can handle the cache by throwing
> AbortWithWebErrorCodeException(HttpServletResponse.SC_NOT_MODIFIED)
> exception if the resource hasn't changed since recent download.
>
> I would like to ask Igor to comment on that. Code maintainers expressed
> some
> thoughts about future support of IResourceStream.
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/efficient-resource-downloading-tp2164866p2174267.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: Customizing CheckBoxMultipleChoice Images?

2010-05-11 Thread Corbin, James
Thanks Igor.

I know this isn't a wicket issue...but,

I'm able to style some aspects of the checkbox's by specifying css as in,

div. input[type=checkbox]
{
...
}

Or

div. input[type=checkbox]:checked
{
...
}

But if I specify the background attribute in either of these sections, it 
doesn't change the they image for the selected or unselected checkbox state.

I've seen a fair number of examples on how to change the checkbox images using 
css and custom javascript, but I hoped it was possible with just css.

J.D.



-Original Message-
From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] 
Sent: Tuesday, May 11, 2010 11:08 AM
To: users@wicket.apache.org
Subject: Re: Customizing CheckBoxMultipleChoice Images?

put the choice component into a div with a class attribute, then in
css you can do div. input[type=checkbox]


-igor

On Tue, May 11, 2010 at 9:23 AM, Corbin, James  wrote:
> Hello,
>
> I would like to customize the images used for the selected and unselected 
> states of the checkboxes rendered as part of the CheckBoxMultipleChoice 
> component, but not sure how to do this...
>
> I've read a few sources that indicate this can be done by specifying a 
> class="styled" on the markup for the checkbox, but not sure I have access to 
> doing so through wicket.
>
> The idea is to specify the following, (obviously the CheckBoxMultipleChoice 
> will generate this markup)
> 
>
> Once the input markup specifies the "styled" class, theoretically you can 
> customize the background images using css.
>
> Is this the right approach and if so, how can I add a style attribute to the 
> generated  element?
>
> Thanks,
> J.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: efficient resource downloading

2010-05-11 Thread vladimir.kovalyuk

Since you wrote that you employ Spring MCV I presume you don't use any page
state when constructing your dynamic resource, instead you parse URL
parameters. Thus your resource seems to be shared resource.

I used to extend WebResource (provide your own dynamic implementation of
IResourceStream) for that task and register it as a shared resource at the
application initialization time. For the resources that have persistent URLs
I used to mount them with shared resource url coding strategy.

Since shared resources are handled by Wicket filter I always have access to
the session and can check permissions.

I like that I can handle the cache by throwing
AbortWithWebErrorCodeException(HttpServletResponse.SC_NOT_MODIFIED)
exception if the resource hasn't changed since recent download.

I would like to ask Igor to comment on that. Code maintainers expressed some
thoughts about future support of IResourceStream.

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/efficient-resource-downloading-tp2164866p2174267.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: Ajax and JS

2010-05-11 Thread Ernesto Reinaldo Barreiro
Hi Eyal,

Why not use wicket native AJAX? On wiQuery there is a DialogButton
class you can use to add buttons to the dialog. This class  has a
method

public void setJsScope(JsScope jsScope) {
this.jsScope = jsScope;
}

which you can easily use to write wicket AJAX callback. e.g.

if(callbacks.contains(DraggableEvent.DRAG)){
draggableBehavior.setInnerDragEvent(new 
JsScopeUiEvent() {
private static final long serialVersionUID = 1L;

/* (non-Javadoc)
 * @see 
org.odlabs.wiquery.core.javascript.JsScope#execute(org.odlabs.wiquery.core.javascript.JsScopeContext)
 */
@Override
protected void execute(JsScopeContext 
scopeContext) {
scopeContext.append("wicketAjaxGet('" + 
getCallbackUrl(true)
+ "&" + DRAG_TYPE + "=" 
+ DraggableEvent.DRAG.toString().toLowerCase()
+ "',null,null, 
function() {return true;})");
}
});
}
on DraggableAjaxBehavior Maybe WiQuery should provide a class
ready to use for this use case.

Best,

Ernesto

On Tue, May 11, 2010 at 7:05 PM, Eyal Golan  wrote:
> Hello,
> I want to perform an Ajax operation using a JS.
>
> The situation is that I have a Dialog (from JQuery, well actually WiQuery)
> and I want a button there to perform an Ajax operation.
> How do I bind JS and Ajax?
> I tried AbstractDefaultAjaxBehavior and getUrl.
> I tried to make an ajaxLink and then to simulate the onclick of it.
> No success..
>
> Thanks for any help
>
> Eyal Golan
> egola...@gmail.com
>
> Visit: http://jvdrums.sourceforge.net/
> LinkedIn: http://www.linkedin.com/in/egolan74
>
> P  Save a tree. Please don't print this e-mail unless it's really necessary
>

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



Re: Ajax and JS

2010-05-11 Thread Igor Vaynberg
in wicket examples there is an example that shows ajax with the
prototype js lib, adapt that to use jquery.

-igor

On Tue, May 11, 2010 at 10:05 AM, Eyal Golan  wrote:
> Hello,
> I want to perform an Ajax operation using a JS.
>
> The situation is that I have a Dialog (from JQuery, well actually WiQuery)
> and I want a button there to perform an Ajax operation.
> How do I bind JS and Ajax?
> I tried AbstractDefaultAjaxBehavior and getUrl.
> I tried to make an ajaxLink and then to simulate the onclick of it.
> No success..
>
> Thanks for any help
>
> Eyal Golan
> egola...@gmail.com
>
> Visit: http://jvdrums.sourceforge.net/
> LinkedIn: http://www.linkedin.com/in/egolan74
>
> P  Save a tree. Please don't print this e-mail unless it's really necessary
>

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



Re: Customizing CheckBoxMultipleChoice Images?

2010-05-11 Thread Igor Vaynberg
put the choice component into a div with a class attribute, then in
css you can do div. input[type=checkbox]


-igor

On Tue, May 11, 2010 at 9:23 AM, Corbin, James  wrote:
> Hello,
>
> I would like to customize the images used for the selected and unselected 
> states of the checkboxes rendered as part of the CheckBoxMultipleChoice 
> component, but not sure how to do this...
>
> I've read a few sources that indicate this can be done by specifying a 
> class="styled" on the markup for the checkbox, but not sure I have access to 
> doing so through wicket.
>
> The idea is to specify the following, (obviously the CheckBoxMultipleChoice 
> will generate this markup)
> 
>
> Once the input markup specifies the "styled" class, theoretically you can 
> customize the background images using css.
>
> Is this the right approach and if so, how can I add a style attribute to the 
> generated  element?
>
> Thanks,
> J.D.
>
>
>

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



Re: warp persist, guice & wicket: use warp persist during wicket application startup to load db objects

2010-05-11 Thread Igor Vaynberg
if this was spring i would tell you that you need to start a
transaction, which in turn will bind a hibernate session to a
threadlocal context. it probably works in a request because you have a
filter that does that for you, so look at that filter and see what it
does.

-igor

On Tue, May 11, 2010 at 7:40 AM, Christoph Grün  wrote:
> Hi all,
>
>  I am using Wicket together with Guice and Warp Persist/Servlet.
>
> I have registered the PersistenceService in the contextInitialized method.
> However, I would like to do some data loading from the database when wicket
> starts, and like to access Hibernate Daos. I am getting the error:
>
>  org.hibernate.HibernateException: No session currently bound to execution
> context
>
>                at
> org.hibernate.context.ManagedSessionContext.currentSession(ManagedSessionCon
> text.java:50)
>
>                at
> org.hibernate.impl.SessionFactoryImpl.getCurrentSession(SessionFactoryImpl.j
> ava:591)
>
>                at
> com.wideplay.warp.hibernate.SessionProvider.get(SessionProvider.java:42)
>
>                at
> com.wideplay.warp.hibernate.SessionProvider.get(SessionProvider.java:32)
>
>  Using Hibernate from an HTTP request is no problem. How can I configure
> Warp to use it directly from WicketApplication, so that I can load the
> database objects and use them for incoming HTTP requests?
>
> Thanks a lot, Christoph
>
>  public class Init extends WarpServletContextListener {
>
>
>
>   �...@override
>
>    public void contextInitialized(ServletContextEvent event) {
>
>        super.contextInitialized(event);
>
>        INJ.getInstance(PersistenceService.class).start();
>
>        event.getServletContext().setAttribute("injector", INJ);
>
>    }
>
>
>
>   �...@override
>
>    public void contextDestroyed(ServletContextEvent event) {
>
>        super.contextDestroyed(event);
>
>    }
>
>
>
>
>
>

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



Ajax and JS

2010-05-11 Thread Eyal Golan
Hello,
I want to perform an Ajax operation using a JS.

The situation is that I have a Dialog (from JQuery, well actually WiQuery)
and I want a button there to perform an Ajax operation.
How do I bind JS and Ajax?
I tried AbstractDefaultAjaxBehavior and getUrl.
I tried to make an ajaxLink and then to simulate the onclick of it.
No success..

Thanks for any help

Eyal Golan
egola...@gmail.com

Visit: http://jvdrums.sourceforge.net/
LinkedIn: http://www.linkedin.com/in/egolan74

P  Save a tree. Please don't print this e-mail unless it's really necessary


Re: is possible that CryptedUrlWebRequestCodingStrategy not working

2010-05-11 Thread Igor Vaynberg
no, nothing seems weird indeed. i guess the next step is for you to
set a breakpoing in crypted encoding strategy and see why your url is
not being encrypted. if you still cant figure it out you are welcome
to create a quickstart.

-igor

On Tue, May 11, 2010 at 7:27 AM, Fernando Wermus
 wrote:
> I don't see anything weird in BookmarkablePageIncrementLink code, any help I
> do appreciate
>
> package com.misPartidos.web.widgets.seo.navigation;
>
> import org.apache.wicket.Page;
> import org.apache.wicket.PageParameters;
> import org.apache.wicket.markup.html.link.BookmarkablePageLink;
> import org.apache.wicket.markup.html.navigation.paging.IPageable;
>
> public class BookmarkablePageIncrementLink extends BookmarkablePageLink {
> private static final long serialVersionUID = 5584517284841095213L;
>
> /** The PageableListView the page links are referring to. */
> protected final IPageable pageable;
> �...@suppresswarnings("unchecked")
> public BookmarkablePageIncrementLink(String id, IPageable pageable, Class
> clazz, PageParameters p) {
> super(id, clazz, p);
> setAutoEnable(true);
> this.pageable = pageable;
> }
> /**
>  * Determines the next page number for the pageable component.
>  *
>  * @return the new page number
>  */
> public final int getPageNumber()
> {
> // Determine the page number based on the current
> // PageableListView page and the increment
> int idx = pageable.getCurrentPage() +
> getPageParameters().getInt("increment");
>
> // make sure the index lies between 0 and the last page
> return Math.max(0, Math.min(pageable.getPageCount() - 1, idx));
> }
>
> /**
>  * @return True if it is referring to the first page of the underlying
> PageableListView.
>  */
> public boolean isFirst()
> {
> return pageable.getCurrentPage() <= 0;
> }
>
> /**
>  * @return True if it is referring to the last page of the underlying
> PageableListView.
>  */
> public boolean isLast()
> {
> return pageable.getCurrentPage() >= (pageable.getPageCount() - 1);
> }
>
> /**
>  * Returns true if the page link links to the given page.
>  *
>  * @param page
>  *            ignored
>  * @return True if this link links to the given page
>  * @see
> org.apache.wicket.markup.html.link.PageLink#linksTo(org.apache.wicket.Page)
>  */
> public boolean linksTo(final Page page)
> {
> int increment=getPageParameters().getInt("increment");
> pageable.getCurrentPage();
> return ((increment < 0) && isFirst()) || ((increment > 0) && isLast());
> }
> }
>
>
> On Mon, May 10, 2010 at 5:33 PM, Igor Vaynberg wrote:
>
>> 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()
>> &&
>> >> > StatelessPagingNa

Re: is possible that CryptedUrlWebRequestCodingStrategy not working

2010-05-11 Thread Igor Vaynberg
if thats the case why make the url bookmarkable?

-igor

On Tue, May 11, 2010 at 7:13 AM, Fernando Wermus
 wrote:
> Jeremy,
>     There is a database with huge amount of data that could be collected by
> someone else. If the url has a clear meaning, to say: /data/0, /data/1. They
> can get all the data from there. I would like to have fixed and encripted
> urls.
>
> On Mon, May 10, 2010 at 4:17 PM, Jeremy Thomerson > wrote:
>
>> 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.a

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

2010-05-11 Thread Igor Vaynberg
when i do view source in the browser i only see a single html page.
what you are seeing may just be an artifact of having firebug enabled.

-igor

On Mon, May 10, 2010 at 10:01 PM, orange80  wrote:
>
> 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 myquickstart        302
>        GET myquickstart        302
>        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
>
>

-
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-11 Thread Charles Deal
Sorry, no.  I became aware of the project when I began using the
wicketstuff-jquery project.  Here is the sourceforge page for it:
https://sourceforge.net/projects/json-lib/

I'm actually using it in conjunction with your Behaviors now, by supplying
its output to the rawOptions field.  And I am writing a SortableBehavior
based on your hierarchy, but using the json-lib objects internally.  It is
by no means a full implementation, but it is enough for me right now.

On Tue, May 11, 2010 at 9:26 AM, Stefan Lindner  wrote:

> Hi Charles,
>
> I see what you mean. Are you the maintainer of this json-lib project? I
> prefer to be independent from other projets at this stage because I suffered
> from some stalled projects in the past.
> If the 1.0 is in sight for the jwicket project I will rethink using
> json-lib project if composing the javascript string can be handled with it.
>
> Stefan
>
>
> -Ursprüngliche Nachricht-
> Von: Charles Deal [mailto:chuckdea...@gmail.com]
> Gesendet: Di 11.05.2010 15:13
> An: users@wicket.apache.org
> Betreff: Re: : WicketStuff jWicket - Where is it?
>
> In JQueryAjaxBehavior, you have five protected inner classes that (by my
> interpretation) are creating the JSON formatted string to pass to the
> jQuery
> methods.
>
> DraggableBehavior, for example, has an options property of type JsMap.  In
> the getJsBuilder method of that class, you call toString() on the options
> property which basically produces a JSON string.
>
> I was just saying that that internal code could be replaced with the
> json-lib project which accomplishes the same task and would remove the
> "duplicate" code from this project.  And yes, ideally, I won't "see" any
> JSON in the code, but that doesn't remove the fact that the code must
> generate the options object for the jQuery behaviors.
>
>
> On Tue, May 11, 2010 at 7:51 AM, Stefan Lindner 
> wrote:
>
> > Are you sure you are talking about jwicket? Where dou you see any JSON
> > stuff in jwicket?
> >
> >
> > -Ursprüngliche Nachricht-
> > Von: Charles Deal [mailto:chuckdea...@gmail.com]
> > Gesendet: Di 11.05.2010 13:39
> > An: users@wicket.apache.org
> > Betreff: Re: WicketStuff jWicket - Where is it?
> >
> > Thanks, I was able to get things sorted out.  Is there a "support" site
> for
> > this project?  Live examples, wiki, jira.  Are you using wicketstuff for
> > those facilities?
> >
> > I found a couple of things that I'd like to report.
> >
> > Also, one of the things I did like about the wicketstuff-jquery project
> was
> > how it handled the options.  It did use an external dependency [1] to
> > handle
> > the JSON stuff.  Each behavior basically had an Options class that went
> > with
> > it, that knew how to build the JSON object.  I didn't initially care for
> > it,
> > but then I realized that it really reduced the noise on the behavior and
> > left the options to be supplied by the user. Even though this adds an
> > external dependency, it would remove the JSON specific classes from this
> > code base so that it could be really focused on the jquery tasks.
> >
> >
> > [1]  
> >net.sf.json-lib
> >json-lib
> >2.2.2
> >jdk15
> >
> >
> > On Mon, May 10, 2010 at 12:16 PM, Stefan Lindner  > >wrote:
> >
> > > 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

Customizing CheckBoxMultipleChoice Images?

2010-05-11 Thread Corbin, James
Hello,

I would like to customize the images used for the selected and unselected 
states of the checkboxes rendered as part of the CheckBoxMultipleChoice 
component, but not sure how to do this...

I've read a few sources that indicate this can be done by specifying a 
class="styled" on the markup for the checkbox, but not sure I have access to 
doing so through wicket.

The idea is to specify the following, (obviously the CheckBoxMultipleChoice 
will generate this markup)


Once the input markup specifies the "styled" class, theoretically you can 
customize the background images using css.

Is this the right approach and if so, how can I add a style attribute to the 
generated  element?

Thanks,
J.D.




RE: WicketStuff jWicket - Where is it?

2010-05-11 Thread Stefan Jozsa
> 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.

please,
Stefan


  


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



warp persist, guice & wicket: use warp persist during wicket application startup to load db objects

2010-05-11 Thread Christoph Grün
Hi all,

 I am using Wicket together with Guice and Warp Persist/Servlet.

I have registered the PersistenceService in the contextInitialized method.
However, I would like to do some data loading from the database when wicket
starts, and like to access Hibernate Daos. I am getting the error: 

 org.hibernate.HibernateException: No session currently bound to execution
context

at
org.hibernate.context.ManagedSessionContext.currentSession(ManagedSessionCon
text.java:50)

at
org.hibernate.impl.SessionFactoryImpl.getCurrentSession(SessionFactoryImpl.j
ava:591)

at
com.wideplay.warp.hibernate.SessionProvider.get(SessionProvider.java:42)

at
com.wideplay.warp.hibernate.SessionProvider.get(SessionProvider.java:32)

 Using Hibernate from an HTTP request is no problem. How can I configure
Warp to use it directly from WicketApplication, so that I can load the
database objects and use them for incoming HTTP requests?

Thanks a lot, Christoph

 public class Init extends WarpServletContextListener {

 

@Override

public void contextInitialized(ServletContextEvent event) {

super.contextInitialized(event);

INJ.getInstance(PersistenceService.class).start();

event.getServletContext().setAttribute("injector", INJ);

}

 

@Override

public void contextDestroyed(ServletContextEvent event) {

super.contextDestroyed(event);

}

 

 



Re: is possible that CryptedUrlWebRequestCodingStrategy not working

2010-05-11 Thread Istvan Soos
Fernando,

It would be better to protect you application in an other way: e.g.
create the ids with random, fixed-length postfixes. My practice is to
create 4-length postfix with 0-9a-zA-Z random pattern. This is 62^4
possibility for each id in the sequence, e.g. 1aiP7, and 2pN63 is
valid, but 1aiP6 is not (because it does not exists in the database).
And if you strip the 4-length postfix, you can get a normal sequence
(1, 2, ..., 9, a, ..., z, A, ..., Z, 10, 11, ...)

Looking it in other way, if you create a hash for each id and accept
only request knowing the hash, you are a bit safer (until a hacker
decodes the hash algorithm).

Hope it helps,
  Istvan

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



Re: is possible that CryptedUrlWebRequestCodingStrategy not working

2010-05-11 Thread Fernando Wermus
I don't see anything weird in BookmarkablePageIncrementLink code, any help I
do appreciate

package com.misPartidos.web.widgets.seo.navigation;

import org.apache.wicket.Page;
import org.apache.wicket.PageParameters;
import org.apache.wicket.markup.html.link.BookmarkablePageLink;
import org.apache.wicket.markup.html.navigation.paging.IPageable;

public class BookmarkablePageIncrementLink extends BookmarkablePageLink {
private static final long serialVersionUID = 5584517284841095213L;

/** The PageableListView the page links are referring to. */
protected final IPageable pageable;
 @SuppressWarnings("unchecked")
public BookmarkablePageIncrementLink(String id, IPageable pageable, Class
clazz, PageParameters p) {
super(id, clazz, p);
setAutoEnable(true);
this.pageable = pageable;
}
/**
 * Determines the next page number for the pageable component.
 *
 * @return the new page number
 */
public final int getPageNumber()
{
// Determine the page number based on the current
// PageableListView page and the increment
int idx = pageable.getCurrentPage() +
getPageParameters().getInt("increment");

// make sure the index lies between 0 and the last page
return Math.max(0, Math.min(pageable.getPageCount() - 1, idx));
}

/**
 * @return True if it is referring to the first page of the underlying
PageableListView.
 */
public boolean isFirst()
{
return pageable.getCurrentPage() <= 0;
}

/**
 * @return True if it is referring to the last page of the underlying
PageableListView.
 */
public boolean isLast()
{
return pageable.getCurrentPage() >= (pageable.getPageCount() - 1);
}

/**
 * Returns true if the page link links to the given page.
 *
 * @param page
 *ignored
 * @return True if this link links to the given page
 * @see
org.apache.wicket.markup.html.link.PageLink#linksTo(org.apache.wicket.Page)
 */
public boolean linksTo(final Page page)
{
int increment=getPageParameters().getInt("increment");
pageable.getCurrentPage();
return ((increment < 0) && isFirst()) || ((increment > 0) && isLast());
}
}


On Mon, May 10, 2010 at 5:33 PM, Igor Vaynberg wrote:

> 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;
> >> >

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

2010-05-11 Thread Fernando Wermus
try

  
   org.wicketstuff
   wicket-shiro
   1.4-SNAPSHOT
  

On Tue, May 11, 2010 at 3:15 AM, PDiefent  wrote:

>
> 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
>
>


-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: is possible that CryptedUrlWebRequestCodingStrategy not working

2010-05-11 Thread Fernando Wermus
Jeremy,
 There is a database with huge amount of data that could be collected by
someone else. If the url has a clear meaning, to say: /data/0, /data/1. They
can get all the data from there. I would like to have fixed and encripted
urls.

On Mon, May 10, 2010 at 4:17 PM, Jeremy Thomerson  wrote:

> 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
> >
>



-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


AW: : WicketStuff jWicket - Where is it?

2010-05-11 Thread Stefan Lindner
Hi Charles,

I see what you mean. Are you the maintainer of this json-lib project? I prefer 
to be independent from other projets at this stage because I suffered from some 
stalled projects in the past.
If the 1.0 is in sight for the jwicket project I will rethink using json-lib 
project if composing the javascript string can be handled with it.

Stefan


-Ursprüngliche Nachricht-
Von: Charles Deal [mailto:chuckdea...@gmail.com]
Gesendet: Di 11.05.2010 15:13
An: users@wicket.apache.org
Betreff: Re: : WicketStuff jWicket - Where is it?
 
In JQueryAjaxBehavior, you have five protected inner classes that (by my
interpretation) are creating the JSON formatted string to pass to the jQuery
methods.

DraggableBehavior, for example, has an options property of type JsMap.  In
the getJsBuilder method of that class, you call toString() on the options
property which basically produces a JSON string.

I was just saying that that internal code could be replaced with the
json-lib project which accomplishes the same task and would remove the
"duplicate" code from this project.  And yes, ideally, I won't "see" any
JSON in the code, but that doesn't remove the fact that the code must
generate the options object for the jQuery behaviors.


On Tue, May 11, 2010 at 7:51 AM, Stefan Lindner  wrote:

> Are you sure you are talking about jwicket? Where dou you see any JSON
> stuff in jwicket?
>
>
> -Ursprüngliche Nachricht-
> Von: Charles Deal [mailto:chuckdea...@gmail.com]
> Gesendet: Di 11.05.2010 13:39
> An: users@wicket.apache.org
> Betreff: Re: WicketStuff jWicket - Where is it?
>
> Thanks, I was able to get things sorted out.  Is there a "support" site for
> this project?  Live examples, wiki, jira.  Are you using wicketstuff for
> those facilities?
>
> I found a couple of things that I'd like to report.
>
> Also, one of the things I did like about the wicketstuff-jquery project was
> how it handled the options.  It did use an external dependency [1] to
> handle
> the JSON stuff.  Each behavior basically had an Options class that went
> with
> it, that knew how to build the JSON object.  I didn't initially care for
> it,
> but then I realized that it really reduced the noise on the behavior and
> left the options to be supplied by the user. Even though this adds an
> external dependency, it would remove the JSON specific classes from this
> code base so that it could be really focused on the jquery tasks.
>
>
> [1]  
>net.sf.json-lib
>json-lib
>2.2.2
>jdk15
>
>
> On Mon, May 10, 2010 at 12:16 PM, Stefan Lindner  >wrote:
>
> > 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 

Does anybody use AjaxLazyLoadPanelTester

2010-05-11 Thread Stefan Lindner
Does anybody use AjaxLazyLoadPanelTester with success? We have to start a new 
request cycle manually before calling executeAjaxLazyLoadPanel.

Stefan





Re: : WicketStuff jWicket - Where is it?

2010-05-11 Thread Charles Deal
In JQueryAjaxBehavior, you have five protected inner classes that (by my
interpretation) are creating the JSON formatted string to pass to the jQuery
methods.

DraggableBehavior, for example, has an options property of type JsMap.  In
the getJsBuilder method of that class, you call toString() on the options
property which basically produces a JSON string.

I was just saying that that internal code could be replaced with the
json-lib project which accomplishes the same task and would remove the
"duplicate" code from this project.  And yes, ideally, I won't "see" any
JSON in the code, but that doesn't remove the fact that the code must
generate the options object for the jQuery behaviors.


On Tue, May 11, 2010 at 7:51 AM, Stefan Lindner  wrote:

> Are you sure you are talking about jwicket? Where dou you see any JSON
> stuff in jwicket?
>
>
> -Ursprüngliche Nachricht-
> Von: Charles Deal [mailto:chuckdea...@gmail.com]
> Gesendet: Di 11.05.2010 13:39
> An: users@wicket.apache.org
> Betreff: Re: WicketStuff jWicket - Where is it?
>
> Thanks, I was able to get things sorted out.  Is there a "support" site for
> this project?  Live examples, wiki, jira.  Are you using wicketstuff for
> those facilities?
>
> I found a couple of things that I'd like to report.
>
> Also, one of the things I did like about the wicketstuff-jquery project was
> how it handled the options.  It did use an external dependency [1] to
> handle
> the JSON stuff.  Each behavior basically had an Options class that went
> with
> it, that knew how to build the JSON object.  I didn't initially care for
> it,
> but then I realized that it really reduced the noise on the behavior and
> left the options to be supplied by the user. Even though this adds an
> external dependency, it would remove the JSON specific classes from this
> code base so that it could be really focused on the jquery tasks.
>
>
> [1]  
>net.sf.json-lib
>json-lib
>2.2.2
>jdk15
>
>
> On Mon, May 10, 2010 at 12:16 PM, Stefan Lindner  >wrote:
>
> > 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
> >
> >
>
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>


Re: How make continous row index in dataTable

2010-05-11 Thread Erwin Bolwidt
Hi,

You can do it like this:

private private DefaultDataTable dataTable;

// ...

new AbstractColumn(new Model("#")) {
public void populateItem(Item> cellItem,
String componentId,
IModel rowModel) {
Item item = (Item) cellItem.getParent().getParent();
int index = dataTable.getCurrentPage() * dataTable.getRowsPerPage() +
item.getIndex() + 1;
cellItem.add(new Label(componentId, String.valueOf(index)));
}
}

Regards,
Erwin Bolwidt


On 5/11/10 9:56 AM, cleverpig wrote:
> hi,everybody!
>
> I used this way to build dataTable:
> DataProvider+Column defines+DataTable.
>
> I want to add a index column at the first column,and hope that keeping
> continuous index number.
> So whenever turn to another page it will hold continuously,just not
> renew from 1.
>
> But now,I can get a sample code to implement index number in each
> page,not ontinuous index number yet.
>
> IColumn[] columns={
>   new AbstractColumn(new ResourceModel("column.index")){
>
>   private static final long serialVersionUID = 0L;
>
>   @Override
>   public void populateItem(Item cellItem, String 
> componentId, IModel
> rowModel) {
>   Item 
> item=(Item)cellItem.getParent().getParent();
>   cellItem.add(new Label(componentId,new 
> Model(item.getIndex()+1)));
>   }
>   },
>   ...
> };
>
> DataTable dataTable=new DataTable("entries",columns,dataProvider,5);
> ...
>
> How to make continous row index in dataTable? Hoping that the wise
> friend to help me.
>
>   


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



: WicketStuff jWicket - Where is it?

2010-05-11 Thread Stefan Lindner
Are you sure you are talking about jwicket? Where dou you see any JSON stuff in 
jwicket?


-Ursprüngliche Nachricht-
Von: Charles Deal [mailto:chuckdea...@gmail.com]
Gesendet: Di 11.05.2010 13:39
An: users@wicket.apache.org
Betreff: Re: WicketStuff jWicket - Where is it?
 
Thanks, I was able to get things sorted out.  Is there a "support" site for
this project?  Live examples, wiki, jira.  Are you using wicketstuff for
those facilities?

I found a couple of things that I'd like to report.

Also, one of the things I did like about the wicketstuff-jquery project was
how it handled the options.  It did use an external dependency [1] to handle
the JSON stuff.  Each behavior basically had an Options class that went with
it, that knew how to build the JSON object.  I didn't initially care for it,
but then I realized that it really reduced the noise on the behavior and
left the options to be supplied by the user. Even though this adds an
external dependency, it would remove the JSON specific classes from this
code base so that it could be really focused on the jquery tasks.


[1]  
net.sf.json-lib
json-lib
2.2.2
jdk15


On Mon, May 10, 2010 at 12:16 PM, Stefan Lindner wrote:

> 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
>
>



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

Re: AjaxEditableLabel unicode issue

2010-05-11 Thread Jens Zastrow

Hi,

We switched from a http to a ajp based tomcat-connector and didnt 
configured the URIEncoding="UTF-8" properly.

Thanks a lot, everything is working now.

Am 11.05.2010 13:34, schrieb Steve Swinsburg:

Hi,

Is this after the value has been submitted and perhaps stored in a database, 
then retrieved and displayed again? If so, is your database setup as UTF-8? 
Also, if using Tomcat, is the connector setup as UTF-8 also?

For Wicket, try setting this *:

getRequestCycleSettings().setResponseRequestEncoding("UTF-8");
getMarkupSettings().setDefaultMarkupEncoding("UTF-8");

in your Application#init

If you don't set the default markup encoding explicitly, the default for it is 
the 'os provided encoding' (see:
IMarkupSettings#getDefaultMarkupEncoding)

If Tomcat, add URIEncoding="UTF-8" to your connector.

See if that helps.

cheers,
Steve

* came up on list back in early 2009.


On 11/05/2010, at 9:16 PM, Jens Zastrow wrote:

   

Hi,

I cannot enter/save unicode chars with a AjaxEditableLabel (e.g. german/arabic).

Enter: 'ü'
Value: 'ü'

All unicode-chars seems to be converted to utf-8 since the single char ü is 
converter to double-bytes?

Thanks
Jens

-
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

   


--
dipl. inform jens zastrow

phone | +49.152.04840108
mail  | m...@jens-zastrow.de
web   | http://jens-zastrow.de
xing  | http://www.xing.com/profile/Jens_Zastrow


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



Re: CSS Templating

2010-05-11 Thread Eric Hamel
Agreed. This is what I ended up doing. Thanks for the ideas all.

On Mon, May 10, 2010 at 3:28 PM, Jeremy Thomerson  wrote:

> 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
> >
>



-- 
Sent by Eric Hamel


Re: WicketStuff jWicket - Where is it?

2010-05-11 Thread Charles Deal
Thanks, I was able to get things sorted out.  Is there a "support" site for
this project?  Live examples, wiki, jira.  Are you using wicketstuff for
those facilities?

I found a couple of things that I'd like to report.

Also, one of the things I did like about the wicketstuff-jquery project was
how it handled the options.  It did use an external dependency [1] to handle
the JSON stuff.  Each behavior basically had an Options class that went with
it, that knew how to build the JSON object.  I didn't initially care for it,
but then I realized that it really reduced the noise on the behavior and
left the options to be supplied by the user. Even though this adds an
external dependency, it would remove the JSON specific classes from this
code base so that it could be really focused on the jquery tasks.


[1]  
net.sf.json-lib
json-lib
2.2.2
jdk15


On Mon, May 10, 2010 at 12:16 PM, Stefan Lindner wrote:

> 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: AjaxEditableLabel unicode issue

2010-05-11 Thread Steve Swinsburg
Hi,

Is this after the value has been submitted and perhaps stored in a database, 
then retrieved and displayed again? If so, is your database setup as UTF-8? 
Also, if using Tomcat, is the connector setup as UTF-8 also?

For Wicket, try setting this *:

getRequestCycleSettings().setResponseRequestEncoding("UTF-8");
getMarkupSettings().setDefaultMarkupEncoding("UTF-8");

in your Application#init

If you don't set the default markup encoding explicitly, the default for it is 
the 'os provided encoding' (see:
IMarkupSettings#getDefaultMarkupEncoding)

If Tomcat, add URIEncoding="UTF-8" to your connector. 

See if that helps.

cheers,
Steve

* came up on list back in early 2009.


On 11/05/2010, at 9:16 PM, Jens Zastrow wrote:

> Hi,
> 
> I cannot enter/save unicode chars with a AjaxEditableLabel (e.g. 
> german/arabic).
> 
> Enter: 'ü'
> Value: 'ü'
> 
> All unicode-chars seems to be converted to utf-8 since the single char ü is 
> converter to double-bytes?
> 
> Thanks
> Jens
> 
> -
> 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-11 Thread James Carman
Martin, how many patches have you submitted? ;)

On Tue, May 11, 2010 at 3:59 AM, Martin Grigorov  wrote:
> On Mon, 2010-05-10 at 23:32 -0700, Les Hazlewood wrote:
>> 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
> You said the same 4 months ago ;-)
>>
>> -
>> 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



AjaxEditableLabel unicode issue

2010-05-11 Thread Jens Zastrow

Hi,

I cannot enter/save unicode chars with a AjaxEditableLabel (e.g. 
german/arabic).


Enter: 'ü'
Value: 'ü'

All unicode-chars seems to be converted to utf-8 since the single char ü 
is converter to double-bytes?


Thanks
Jens

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



Re: GMap2 and zoom_changed

2010-05-11 Thread Martin Funk
you are aware of gmap2-examples?

http://wicketstuff.org/confluence/display/STUFFWIKI/wicket-contrib-gmap2

once there look at the 'Listen Examples'

mf




2010/5/11 dleeper 

>
> This is what I am currently doing.
>
> zoomChangedListener = new ZoomChangedListener();
>add(zoomChangedListener);
>
>map.add(new HeaderContributor(new IHeaderContributor() {
>private static final long serialVersionUID = 1L;
>
>public void renderHead(IHeaderResponse response) {
>
>
> response.renderOnDomReadyJavascript(zoomChangedListener.getJSinit().toString());
>}
>}));
>
> public class ZoomChangedListener extends AbstractDefaultAjaxBehavior
>{
>private static final long serialVersionUID = 1L;
>
>@Override
>protected void respond(AjaxRequestTarget target)
>{
>Request request = RequestCycle.get().getRequest();
>
>String zoom = request.getParameter("zoom");
>
>System.out.println( "NEW ZOOM: " + zoom );
>
>}
>
>public Object getJSinit()
>{
>return map.getJSinvoke("addListener('zoom_changed',
> '" +
> this.getCallbackUrl()
>+ "')");
>}
>}
>
> Unfortunately the respond is not being called.  Not sure why.
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/GMap2-and-zoom-changed-tp2173428p2173506.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: html namespace, formatting...

2010-05-11 Thread Zilvinas Vilutis
Formatting should work fine, just I don't like it as it merges several lines
into one and there is no "never merge lines" option as there is in java.

Not sure about auto-completion - I've seen a DTD somewhere which supports
autocompletion, but it was long ago... and I don't need it anymore, as
knowing 3 wicket tags is enough :) You can create your own auto-complete
tags in eclipse, if you really need it.


Žilvinas Vilutis

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


On Tue, May 11, 2010 at 1:44 AM, Marzia Forli wrote:

> Thanks Zilvinas, eclipse now it's quiet and I have a code-completion of
> html tags, but there is no help for 'wicket:XXX' attributes, is it possible
> to enable it somehow ? Also formatting, so nice for '.java' doesn't function
> for '.html' how do you handle those issues ?
> Thank you...
>
>
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: html namespace, formatting...

2010-05-11 Thread Marzia Forli
Thanks Zilvinas, eclipse now it's quiet and I have a code-completion of html 
tags, but there is no help for 'wicket:XXX' attributes, is it possible to 
enable it somehow ? Also formatting, so nice for '.java' doesn't function for 
'.html' how do you handle those issues ?
Thank you...


  


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



Re: GMap2 and zoom_changed

2010-05-11 Thread dleeper

This is what I am currently doing.

zoomChangedListener = new ZoomChangedListener();
add(zoomChangedListener);

map.add(new HeaderContributor(new IHeaderContributor() {
private static final long serialVersionUID = 1L;

public void renderHead(IHeaderResponse response) {

response.renderOnDomReadyJavascript(zoomChangedListener.getJSinit().toString());
}
}));

public class ZoomChangedListener extends AbstractDefaultAjaxBehavior
{
private static final long serialVersionUID = 1L;

@Override
protected void respond(AjaxRequestTarget target)
{
Request request = RequestCycle.get().getRequest();

String zoom = request.getParameter("zoom");

System.out.println( "NEW ZOOM: " + zoom );

}

public Object getJSinit()
{
return map.getJSinvoke("addListener('zoom_changed', '" +
this.getCallbackUrl()
+ "')");
}
}

Unfortunately the respond is not being called.  Not sure why.
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/GMap2-and-zoom-changed-tp2173428p2173506.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-11 Thread Les Hazlewood
If it's any consolation, we only have a few remaining issues in Jira
that should be finished today and tomorrow.  4 months ago, there was
still over 50+ issues to resolve ;)  Security frameworks are hard to
get right - better to have a great 1.0 release than a crappy one :)

On Tue, May 11, 2010 at 12:59 AM, Martin Grigorov  wrote:
> On Mon, 2010-05-10 at 23:32 -0700, Les Hazlewood wrote:
>> 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
> You said the same 4 months ago ;-)
>>
>> -
>> 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: Wicket + security, what are the best options? Spring Security reached almost all the way...

2010-05-11 Thread Martin Grigorov
On Mon, 2010-05-10 at 23:32 -0700, Les Hazlewood wrote:
> 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
You said the same 4 months ago ;-)
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 
> 



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



Re: how to query in dataTable?

2010-05-11 Thread cleverpig
Thanks,Jeremy! I do not know how to express my thanks to you!
I got the answer with a quiet heart.Because I doubt since too many unknown.

2010/5/8 Jeremy Thomerson :
> look at the wicket examples [1] and see the data table examples.  you will
> need to implement an IDataProvider
>
> http://wicketstuff.org/wicket/repeater/
>
> --
> Jeremy Thomerson
> http://www.wickettraining.com
>
>
>
> 2010/5/7 cleverpig 
>
>> Hello everybody!
>>
>> I am a beginner of wicket. Now I meet a problem:"how to query inside
>> dataTable?"
>>
>> I found some information that can use IDataProvider implemented class
>> to resolve it, but can find complete code for reference.
>>
>> I don't know if you are not experiencing the same problem, so ask for
>> help and teach.
>> thanks~
>>
>> --
>> cleverpig(Dan)
>> Location: Beijing
>> Address: Room 4018,No.A2 South Avenue Fuxingmen Beijing,P.R.China
>> Zipcode: 100031
>> MSN: great_liu...@hotmail.com
>> QQ: 149291732
>> Skype: cleverpigatmatrix
>> Facebook ID:cleverpig
>> Blog: cleverpig.name/dan/
>> Tags: del.icio.us/cleverpig
>> Twitter: twitter.com/cleverpig
>> 新浪微博: t.sina.com.cn/cleverpig
>> Organization: www.beijing-open-party.org
>> or...@facebook: http://www.facebook.com/group.php?gid=8159558294
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>



-- 
cleverpig(Dan)
Location: Beijing
Address: Room 4018,No.A2 South Avenue Fuxingmen Beijing,P.R.China
Zipcode: 100031
MSN: great_liu...@hotmail.com
QQ: 149291732
Skype: cleverpigatmatrix
Facebook ID:cleverpig
Blog: cleverpig.name/dan/
Tags: del.icio.us/cleverpig
Twitter: twitter.com/cleverpig
新浪微博: t.sina.com.cn/cleverpig
Organization: www.beijing-open-party.org
or...@facebook: http://www.facebook.com/group.php?gid=8159558294

-
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-11 Thread Jimi

I tried to recreate the issue in a simple quickstart project, but that seems
to be easier said then done. The only time this bug shows its ugly face is
when a logged in user uses the logout link, and is [supposed to be]
redirected to the home page (ie the login page). I tried to debug it to see
where it goes wrong, but there are just too many filters and too many
classes involved so the task was too daunting for me at the moment.

I guess the only way to recreate this is to use Wicket Security, and
possibly also Spring Security, in the "quickstart". I will try to do this
when I have the time, maybe during the upcoming public holiday this week.

/Jim


Jeremy Thomerson wrote:
> 
> 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
>>
>>
> 
> 

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/root-context-IE-home-page-is-not-found-tp1877009p2173452.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



GMap2 and zoom_changed

2010-05-11 Thread Doug Leeper
I was under the impression that when the GMap2 zoomed in/out, the Wicket GMap2 
object would be updated.   When I query Wicket GMap2 upon a dblclick after I 
had zoomed in, the zoom level had not changed.

Should this be the case?

If not, I would like to be able to add a zoom_changed listener on the GMap2 in 
my app.  What is the best way to do so?  Does anyone have any examples?

Thanks in advance,

 - Doug


Re: Gmap2 and Wicket 1.4.8

2010-05-11 Thread dleeper

I believe I found the issue.

Our wicket application has an iframe that shows the contents of an other
wicket application.  I changed the wicket version on the local wicket
application.  However, the iframe'd wicket application was not changed.

When I synced up the wicket versions...everything was fine.


-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Gmap2-and-Wicket-1-4-8-tp2173066p2173420.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-11 Thread Zilvinas Vilutis
See no problem of using spring services within a servlet, see my servlet
example: http://pastebin.com/6tWstvAL

Žilvinas Vilutis

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


On Mon, May 10, 2010 at 8:10 PM, Joe Fawzy  wrote:

> 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: html namespace, formatting...

2010-05-11 Thread Zilvinas Vilutis
My "BasePage.html" contains these lines in the beginning:

http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd";>



while ALL the others simply:

http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd";>



and eclipse wtp keeps quiet :)




Žilvinas Vilutis

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


On Mon, May 10, 2010 at 12:52 PM, Marzia Forli wrote:

> 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: Gmap2 and Wicket 1.4.8

2010-05-11 Thread Martin Funk
when the blank area is already rendered the app has already come quite far.

out of my mind I'd check the Google Key.
Also I remember Firefox beeing quite picky on 'wicket' elements. If they
were present in or around the div element containing the map, it wouldn't be
rendered.

mf

2010/5/11 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