Re: wicket URL rewrite in Opera

2009-05-01 Thread kan
2009/4/30 Mathias Nilsson :

> www.eddyemery.com/items/brand/17
It's ridiculous, but if I go on the url, firstly it responses with

Status: 302 Moved Temporarily
Location: https://www.eddyemery.com/items/brand/../../items/brand/17

And seems the Opera is confused. Try to get rid of the redirect, not
sure why does it appear.


-- 
WBR, kan.

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



Re: GWT-like

2009-04-29 Thread kan
Yes, I thought about jQuery, and even have found a WickeXt project.
But it doesn't give a flexibility - so I cannot easily mix and manage
pre-load/cache strategies.
And I don't know easy way to make AJAX requests cached, only by
explicit javascript, and it eliminates Wicket advantages.

2009/4/29 Jeremy Thomerson :
> That's the main difference between GWT and Wicket - so if you really
> NEED it all client-side, then use GWT.
>
> As far as your tab problem - sure, you can do this with Wicket.  The
> default (I believe - it's been a while since I used the tabbed panel)
> is to load the other tab via ajax.  But if you want some tabbed panels
> to preload everything, just use jQuery or dojo, etc to make that
> tabbed panel - IOW, output all of the markup with Wicket and add the
> tabs as a JS effect.  It eliminates the server callbacks.  Make this a
> reusable component and you can use it wherever you want it.
>
> Remember not to prematurely optimize.  Code maintenance costs more
> than operational costs.
>
> --
> Jeremy Thomerson
> http://www.wickettraining.com
>
>
>
>
> On Wed, Apr 29, 2009 at 10:06 AM, kan  wrote:
>> Is there any easy way to make wicket applications like GWT? I mean to
>> make a "heavy client side", so it will allow easy manage data
>> pre-loading and requests (AJAX too) caching. The aim is to minimize
>> amount of web-server requests.
>> Say, I have several tabs on a page. Some tabs should have all data
>> pre-loaded and switched immediately (no requests to server). Some tabs
>> are "big", so they do an AJAX request for data, but only if a tab is
>> opened first time.
>>
>> --
>> WBR, kan.
>>
>> -
>> 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
>
>



-- 
WBR, kan.

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



GWT-like

2009-04-29 Thread kan
Is there any easy way to make wicket applications like GWT? I mean to
make a "heavy client side", so it will allow easy manage data
pre-loading and requests (AJAX too) caching. The aim is to minimize
amount of web-server requests.
Say, I have several tabs on a page. Some tabs should have all data
pre-loaded and switched immediately (no requests to server). Some tabs
are "big", so they do an AJAX request for data, but only if a tab is
opened first time.

-- 
WBR, kan.

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



Re: .html-templates compiler

2009-02-17 Thread kan
I mean if you have a wicket:id="abc", it will generate class with...
emm... not sure, say method "getAbc()" which will return an object
which represents an element, so it can be bound to a Component. So, in
java-code you can use only elements which are actually exist in
html-markup.
Maybe something similar then set of java classes are generated for wsdl or xsd.

2009/2/16 Igor Vaynberg :
> sorry, what are you trying to do with this?
>
> if we preparse the markup and break it up into tags at compile time we
> still have to store it somehow and load it at runtime. so that format
> would need to be more efficient at storing markup than xml already is,
> but the parser is a very tinny percentage of the request and it only
> happens on the first load of markup - we cache the parsed structure.
> so you would have a very small gain at the high price of introducing a
> compilation step into the build process...
>
> is it worth it?
>
> -igor
>
> On Mon, Feb 16, 2009 at 9:46 AM, kan  wrote:
>> But html-template just is a regular file, a class resource compiled in
>> jar, you cannot change/generate it dynamically in run-time.
>> Dynamic markup allows to build a component-tree in run-time, but
>> doesn't allow to change html-template or assigned java-class itself.
>>
>> 2009/2/16 Igor Vaynberg :
>>> the point of all those wicket:ids is to generate dynamic markup.
>>> dynamic meaning runtime.
>>>
>>> -igor
>>>
>>> On Mon, Feb 16, 2009 at 8:22 AM, kan  wrote:
>>>> Just random thought...
>>>> Has anybody thought to make wicket html-template compiler? I think it
>>>> could be quite useful - it can check all wicket:id, all hrefs and so
>>>> on checked at compile-time. And also it can gain some performance,
>>>> because it will not require to parse html at run-time.
>>>>
>>>> --
>>>> WBR, kan.
>>>>
>>>> -
>>>> 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
>>>
>>>
>>
>>
>>
>> --
>> WBR, kan.
>>
>> -
>> 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
>
>



-- 
WBR, kan.

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



Re: .html-templates compiler

2009-02-16 Thread kan
But html-template just is a regular file, a class resource compiled in
jar, you cannot change/generate it dynamically in run-time.
Dynamic markup allows to build a component-tree in run-time, but
doesn't allow to change html-template or assigned java-class itself.

2009/2/16 Igor Vaynberg :
> the point of all those wicket:ids is to generate dynamic markup.
> dynamic meaning runtime.
>
> -igor
>
> On Mon, Feb 16, 2009 at 8:22 AM, kan  wrote:
>> Just random thought...
>> Has anybody thought to make wicket html-template compiler? I think it
>> could be quite useful - it can check all wicket:id, all hrefs and so
>> on checked at compile-time. And also it can gain some performance,
>> because it will not require to parse html at run-time.
>>
>> --
>> WBR, kan.
>>
>> -
>> 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
>
>



-- 
WBR, kan.

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



.html-templates compiler

2009-02-16 Thread kan
Just random thought...
Has anybody thought to make wicket html-template compiler? I think it
could be quite useful - it can check all wicket:id, all hrefs and so
on checked at compile-time. And also it can gain some performance,
because it will not require to parse html at run-time.

-- 
WBR, kan.

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



Re: London Wicket Event - 4th February @ Google

2009-02-03 Thread kan
Can you please notice security staff on the reception, in case if somebody late?

2009/2/2 jWeekend :
>
> With around 47 names registered (41 with confirmed attendance so far) for our
> http://jweekend.com/dev/LWUGReg/ London Wicket Event  on Wednesday evening,
> we have only a few places left.
> I can confirm that we are definitely going ahead despite the problems the
> snow is causing. The airports should be open again tomorrow and other
> transport will hopefully be back to usual service levels.
> In the quite unlikely event that Daan or Jan have trouble with their flights
> we will have plenty of Wicket topics to cover.
>
> Regards - Cemal
> http://www.jWeekend.co.uk jWeekend
>
>
>
> jWeekend wrote:
>>
>> We already have some 35 registered guests (29 confirmed) for our next
>> London Wicket Event on the evening of February 4th, at Google (close to
>> Victoria station). We have space for 15 more so if you are interested in
>> coming  http://jweekend.com/dev/LWUGReg/ register  soon and remember to
>> confirm your place.
>>
>> Regards - Cemal
>>  http://www.jWeekend.co.uk jWeekend
>>
>>
>> jWeekend wrote:
>>>
>>> Our next London Wicket Event will be on the evening of Wednesday,
>>> February 4th, at Google.
>>> This time we have presentations lined-up from three experienced
>>> Java/Wicket developers who have been experimenting with Scala and Wicket,
>>> just for fun, and, in some cases, on commercial development projects
>>> (yes, there are already Wicket applications built using Scala out there).
>>> Al's presentation is called "Abstraction" - you know what to expect!
>>> Al and I will also run a more concrete, general Wicket Q&A to wrap things
>>> up as usual.
>>>
>>> We'll be getting in some hot Pizza for around 18:15 and then:
>>> *  http://www.jWeekend.com Cemal Bayramoglu :  Welcome/Introduction
>>> *  http://www.stuq.nl Daan van Etten : Basic Introduction to Scala
>>> With Wicket
>>> * Dean Phersson-Chapman: Experiences Converting an Existing Wicket
>>> Application To Scala
>>> *  http://www.footprint.de Jan Kriesten : Real World Scala and Wicket
>>> *  http://herebebeasties.com/ Al Maw : ABSTRACTION!
>>> * Al Maw & Cemal Bayramoglu: General Wicket Q&A
>>> If you're not in a rush to get away join us for the customary visit to a
>>> local pub straight after the Q&A.
>>>
>>> We're lucky to attract a very good crowd and they say really nice things
>>> about our events, so if you've never been, you'd most likely enjoy the
>>> experience.
>>>
>>> Full details and registration are at
>>> http://www.jweekend.co.uk/dev/LWUGReg/ at the usual place . Register
>>> early and don't forget to confirm (or cancel) your registration using the
>>> link in the automated email.
>>>
>>> We'd like to thank Google for generously continuing to host our events.
>>>
>>> Regards - Cemal
>>>  http://www.jWeekend.co.uk jWeekend
>>>
>>
>>
>
> --
> View this message in context: 
> http://www.nabble.com/London-Wicket-Event---4th-February-%40-Google-tp21428590p21794293.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
>
>



-- 
WBR, kan.

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



Re: How can we make runtime templates switching?

2008-12-17 Thread kan
Also you can use borders instead of panels, they allow to replace
inheritance by aggregation.

2008/12/17 Alex Chew :
> Hi, all
>
> I think i fall in troubles with template switching during runtime.
>
> Formerly we build the whole application with default template using markup
> inheritance.
> Unfortunately,we are requested to support runtime templates switching .
> In other words, our customer want to use different templates to fit their
> needs with setting but not developing.
> The final effective is just like joomla!'s template managment.
>
> The problem is,
> We using EXTENDS to support default template with markup inheritance.
> But we cannot change base class while in runtime.
>
> Can anybody show me the light? Any advice will be appreciated.
> Thanks in advance.
>
> BR,
> Alex
>



-- 
WBR, kan.

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



Re: setResponsePage + anchor

2008-12-16 Thread kan
Take a look on this:
http://cwiki.apache.org/WICKET/faqs.html#FAQs-Howtoadd%2523anchor%2528opaque%2529topageurl%253F

2008/12/16 Charlie Dobbie :
> Hi Janos,
>
> Thanks for your response.  That's an interesting solution to the problem!
>
> I have been digging through the setResponsePage etc code, trying to find a
> way to fit this into the framework directly, and have come up empty-handed.
> It would seem logical to me that there should be a way to specify either a
> String id or a Component directly inside the request target, but I can't see
> how to fit it in.
>
> It looks like your solution is the best available at the moment.
>
> Regards,
> Charlie.
>
>
>
> 2008/12/4 Cserep Janos 
>
>> I'm doing it like this from my Page:
>>
>>  @Override
>>public void renderHead(IHeaderResponse response) {
>>
>>if (anchor != null) {
>>
>>response.renderOnLoadJavascript("location.href='#" + anchor +
>> "';");
>>anchor = null;
>>}
>>}
>>
>> Just have a setter for the anchor property on the Page instance you
>> pass to setResponsePage().
>>
>> janos
>>
>>
>> On Thu, Dec 4, 2008 at 1:53 PM, Charlie Dobbie 
>> wrote:
>> > Hi,
>> >
>> > I know you can set an anchor when you are coming from a Link component,
>> but
>> > how can I set an anchor without the Link?
>> >
>> > From a Button's onSubmit, I am calling setResponsePage with a Page
>> instance,
>> > and have a reference to a component on that page that I would like the
>> > browser to jump directly to.  From my research so far, I don't believe
>> this
>> > to be possible, but easily could have missed something!
>> >
>> > Is there a way to do this?
>> >
>> > Regards,
>> > Charlie.
>> >
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>



-- 
WBR, kan.

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



Re: Modify textfield input before validation

2008-12-11 Thread kan
As I remember, wicket trims spaces already, so you don't need do
anything special about it.

For DB, if you use hibernate (or if not, anyway you should have data
objects for your business entities), you can have something like that:
public class MyEntity
{
// This is mapped to database, but not for public, only database will use it.
  private String siteUrlStr;
// this is your public interface:
  public SiteUrl getSiteUrl(){return new SiteUrl(getSiteUrlStr());}
  public void setSiteUrl(SiteUrl url){siteUrlStr = url.getStr();}
}

And in code the lists should be treated as List, Collection or so, not
as comma-separated strings (only in some particular places like
persisting in database or in user interface).

2008/12/11 pixologe <[EMAIL PROTECTED]>:
>
> Thanks for your ideas...
>
> But huh... is there really no "wicket way" to achieve this?
>
> After all I would not think that it is uncommon to fix simple things in user
> input before validation, e.g. trim strings, discard empty items in comma
> separated lists etc.
>
> Your solutions would work both I think, I just do not like the idea of doing
> things like these with javascript.
> Also, retrieving a String value from DB and wrapping it into an object just
> in order to be able to convert it back does not seem right to me...
>
> I'll probably stick to the js solution (reluctantly ;-), but if there is
> really no elegant way, I would love to see one in future wicket versions.
>
> Thanks for inspiration!
> best regards
> --
> View this message in context: 
> http://www.nabble.com/Modify-textfield-input-before-validation-tp20952903p20956050.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
WBR, kan.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Modify textfield input before validation

2008-12-11 Thread kan
As for me, I think it's better to make a client side javascript, which
do the prepend in "onchange" event.
But in your case, maybe just make a class like
class SiteUrl implements Serializable
{
  private final String url;
  public SiteUrl(final String url)
  {
this.url = url;
  }
  public String getUrl(){return url;}
}
(or event use URL from jdk).
and implement IConverter for it.

2008/12/11 pixologe <[EMAIL PROTECTED]>:
>
> Hi all,
>
> How can/should modification of (textual) user input be implemented, so that
> it runs before validation?
> (e.g. prepend a URL with "http://"; if the user did not do so)
>
> My thoughts were:
>
> IConverter - but other threads on the list point out that it is only to be
> used for type conversion, not for String->String conversion.
>
> IModel - but setObject is called after validation.
>
> IValidator - but IValidatable has not setValue, thus modification is not
> possible here.
>
> Thanks for any hints and regards
> --
> View this message in context: 
> http://www.nabble.com/Modify-textfield-input-before-validation-tp20952903p20952903.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
WBR, kan.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: passing list from java class to javascript

2008-12-11 Thread KAN
http://json.org/ ?

2008/12/11 Ashis <[EMAIL PROTECTED]>:
>
> Hello all,
>   I have a question i need to pass list from java class to javascript.
>
>  How can i do this stuff?
>
> Thanks
> --
> View this message in context: 
> http://www.nabble.com/passing-list-from-java-class-to-javascript-tp20949804p20949804.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
WBR, kan.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Page indirection

2008-12-04 Thread kan
Not sure what do you want and why is it about wicket?
Why not just make a "redirector service", like:
interface IRedirector
{
  void redirect(PageParams pp);
}

class TournamentRedirector implements IRedirector
{
  void redirect(PageParams pp)
  {
setResponsePage(EditTournament.class, pp);
  }
}

class SpecialTournamentRedirector implements IRedirector
{
  void redirect(PageParams pp)
  {
setResponsePage(SpecialEditTournament.class, pp);
  }
}

and inject one of these objects?

2008/12/4 Steve Flasby <[EMAIL PROTECTED]>:
> Hi,
>
> I am looking to add a little more configurability to my Wicket app.
> At the moment all forward requests are coded something like:
>
>setResponsePage( EditTournament.class, pp );
>
> but I would like to be able to configure this more flexibly. For
> example, for certain installations I may want to forward to a
> subclass of EditTournament to handle a specialized version of this
> page with some additional input fields.
>
> I was hoping to use Guice for this (I dont like String based config),
> but it seems to be hard to selectively inject classes:
>
>@Inject(optional=true)
>Class mEditTournament = EditTournament.class;
>...
>setResponsePage( mEditTournament, pp );
>
> as this approach requires a coding standard of always injecting Pages
> as well as there being currently no simple way to selectively inject
> constants using Guice.
>
> I would override   setResponse(..)  but these are final methods so that
> route is also closed.
>
> I hope what Im trying to do is clear, can anyone offer a solution?
>
>
> Cheers - Steve
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
WBR, kan.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Why can't I initialize PasswordTextField?

2008-12-03 Thread kan
2008/12/3 James Carman <[EMAIL PROTECTED]>:

> The browser's saved passwords support doesn't transmit your password over
> HTTP along with the rest of the markup, though.  It just remembers it and
> auto-populates it for you once it receives the HTML from the site.  So, it's
> as unsafe as your computer is (hopefully you use a password on your
> computer). :)
Actually in this case site just sends back a value which browser has
sent in cookie. So, the site doesn't sent anything which browser
doesn't know.

-- 
WBR, kan.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Wicket Session grows too big real fast

2008-12-02 Thread kan
For remoting could have a sense to make DTO for the sake of Singe
Responsibility Principle.

2008/11/26 James Carman <[EMAIL PROTECTED]>:
> Not exactly.   It might be okay for web projects like this, but if you need
> to do any remoting, this won't work.  Our domain entities have to be
> serializable.
>
> On Wed, Nov 26, 2008 at 11:22 AM, Bruno Cesar Borges <
> [EMAIL PROTECTED]> wrote:
>
>> Now that is a really good advice. :-)
>>
>> -Mensagem original-
>> De: kan [mailto:[EMAIL PROTECTED]
>> Enviada em: quarta-feira, 26 de novembro de 2008 14:19
>> Para: users@wicket.apache.org
>> Assunto: Re: Wicket Session grows too big real fast
>>
>>
>> I am not sure if it always applicable, but usually I do not do
>> "implements Serializable" for domain objects (it works well with
>> Hibernated POJOs). In this case the Wicket cannot serialize a
>> component, and if it was a link to any such object - wicket just
>> reports about it into log, so you can see right away which component
>> has tried to "steal" a reference to an object (like in your situation
>> with inner class).
>>
>> 2008/11/26 jhp <[EMAIL PROTECTED]>:
>> >
>> > Removing references pointing to previous pages solved a lot, very good
>> point.
>> > Also making sure that individual domain objects don't get stored to
>> session
>> > makes  a difference. I have still a lot of code to go through to make
>> sure
>> > that all unnecessary references don't get stored to session, but making a
>> > few changes in the most important pages makes already a big difference.
>> >
>> > I noticed that this is a problem that others have experienced too. I
>> guess
>> > it is pretty easy unintentionally stuff the session with domain objects
>> ,and
>> > if using modern day persistence framework, those domain objects can be
>> quite
>> > large if they have collections etc.
>> >
>> > I think there is a need for small document outlining the common pitfalls
>> and
>> > remedies for them. I haven't seen such. Wicket reference of course tells
>> > about LoadableDetachableModel, but this thread has info that I haven't
>> found
>> > anywhere else. I might try compose such a document, if I just have the
>> time
>> > and energy in the near future.
>> >
>> > Thanks to Martijn, Johan and John for your responses!
>> >
>> > BR,
>> > Jukka
>> >
>> >
>> >
>> >
>> > Martijn Dashorst wrote:
>> >>
>> >> With Wicket 1.3 only one page should be stored in session. You should
>> >> check if you don't keep references between pages -> that would result
>> >> in 1+N pages (with N being the number of pages you reference in your
>> >> page).
>> >>
>> >> Other than that: using LDM's and DataView/DataProvider instead of
>> >> ListView will help considerably.
>> >>
>> >> Martijn
>> >>
>> >
>> > --
>> > View this message in context:
>> http://www.nabble.com/Wicket-Session-grows-too-big-real-fast-tp20697077p20702093.html
>> > Sent from the Wicket - User mailing list archive at Nabble.com.
>> >
>> >
>> > -
>> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>> > For additional commands, e-mail: [EMAIL PROTECTED]
>> >
>> >
>>
>>
>>
>> --
>> WBR, kan.
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>> ***
>> "Atenção: Esta mensagem foi enviada para uso exclusivo do(s)
>> destinatários(s) acima identificado(s),
>> podendo conter informações e/ou documentos confidencias/privilegiados e seu
>> sigilo é protegido por
>> lei. Caso você tenha recebido por engano, por favor, informe o remetente e
>> apague-a de seu sistema.
>> Notificamos que é proibido por lei a sua retenção, disseminação,
>> distribuição, cópia ou uso sem
>> expressa autorização do remetente. Opiniões pessoais do remetente não
>> refletem, necessariamente,
>> o ponto de vista da CETIP, o qual é divulgado somente por pessoas
>> autorizadas."
>>
>>
>> "Warning: This message was sent for exclusive use of the addressees above
>> identified, possibly
>> containing information and or privileged/confidential documents whose
>> content is protected by law.
>> In case you have mistakenly received it, please notify the sender and
>> delete it from your system.
>> Be noticed that the law forbids the retention, dissemination, distribution,
>> copy or use without
>> express authorization from the sender. Personal opinions of the sender do
>> not necessarily reflect
>> CETIP's point of view, which is only divulged by authorized personnel."
>>
>> ***
>>
>



-- 
WBR, kan.


Re: Create custom UrlCodingStrategy

2008-12-02 Thread kan
Oh sorry, I thought you want use it with mount. In this case you
have to deal with IRequestCodingStrategy, not with
IRequestTargetUrlCodingStrategy.
Seems you can make your implementation which proxies given rcu
(usually it will be WebRequestCodingStrategy or crypted), it passes
encode/decode to it adding/cutting "variance" part of url.
Then you have to override WebApplication.newRequestCycleProcessor
WebRequestCycleProcessor.newRequestCodingStrategy and which will
return your strategy.
Maybe it's not best way to do it, but I don't see any better.

2008/12/2 Mathias P.W Nilsson <[EMAIL PROTECTED]>:
>
> Thanks!
>
> I will look at this and maybe come back on the subject. One problem that I
> saw was that the request didn't get printed in the UrlCodingStrategy because
> it was not mounted in init. Maybe I'm wrong about this and need to look it
> over again.
> --
> View this message in context: 
> http://www.nabble.com/Create-custom-UrlCodingStrategy-tp20660813p20794183.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
WBR, kan.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Create custom UrlCodingStrategy

2008-12-02 Thread kan
RTFS :)
If you look at any implementation, say
BookmarkablePageRequestTargetUrlCodingStrategy.decode, you'll see how
RequestParameters are turning in IRequestTarget, and encode does
opposite - IRequestTarget is turning in url.
You can set page a parameter (say "variation") from desired part of
url and override in your page class the method:
@Override
public String getVariation()
{
  return getPageParameters().getAsString("variation");
}

It's just thoughts, I never tried it myself. :)

2008/12/2 Mathias P.W Nilsson <[EMAIL PROTECTED]>:
>
> Ok
>
> Is there any topic on UrlRewriteFilter and Wicket. I still need to set
> variation and locale even when I use UrlRewriteFilter.
> --
> View this message in context: 
> http://www.nabble.com/Create-custom-UrlCodingStrategy-tp20660813p20793471.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
WBR, kan.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Create custom UrlCodingStrategy

2008-12-02 Thread kan
I only afraid, you cannot mount to "root".
So, it will be "http://localhost/company/edgesoft/something";,
"http://localhost/company/another/something";
Maybe easier and much more flexible for you will be UrlRewriteFilter.

2008/12/2 kan <[EMAIL PROTECTED]>:
> Basically, just implement IRequestTargetUrlCodingStrategy. :)
> What is precise question?
>
> 2008/11/24 Mathias P.W Nilsson <[EMAIL PROTECTED]>:
>>
>> Hi,
>>
>> I need some info in how to create my own UrlCodingStrategy
>>
>> This is the preconditions.
>> I have a database with 20 - 100 customers that needs to access this
>> application. Every customer has it's own properties files and css variation.
>>
>> What I want is that let's say Edgesoft wants to use the application. Then
>> the user will access
>> http://localhost/app/edgesoft
>>
>> If I want to mount Base.class I do not want to do /edgesoft/base only base
>> and the UrlCodingStrategy will handle the rest for me. Check if the customer
>> exists, set variation and then continue with the request.
>>
>> An example.
>> http://localhost/edgesoft/order/order/13
>> http://localhost/another/order/order/14
>> mount( MyStrategy( "/order/" ,  );
>>
>> This should go to the exact same page but with different variation and
>> properties. How can this be achieved. What classes do I need to subclass to
>> make this happen?
>> --
>> View this message in context: 
>> http://www.nabble.com/Create-custom-UrlCodingStrategy-tp20660813p20660813.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
>
>
> --
> WBR, kan.
>



-- 
WBR, kan.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Create custom UrlCodingStrategy

2008-12-02 Thread kan
Basically, just implement IRequestTargetUrlCodingStrategy. :)
What is precise question?

2008/11/24 Mathias P.W Nilsson <[EMAIL PROTECTED]>:
>
> Hi,
>
> I need some info in how to create my own UrlCodingStrategy
>
> This is the preconditions.
> I have a database with 20 - 100 customers that needs to access this
> application. Every customer has it's own properties files and css variation.
>
> What I want is that let's say Edgesoft wants to use the application. Then
> the user will access
> http://localhost/app/edgesoft
>
> If I want to mount Base.class I do not want to do /edgesoft/base only base
> and the UrlCodingStrategy will handle the rest for me. Check if the customer
> exists, set variation and then continue with the request.
>
> An example.
> http://localhost/edgesoft/order/order/13
> http://localhost/another/order/order/14
> mount( MyStrategy( "/order/" ,  );
>
> This should go to the exact same page but with different variation and
> properties. How can this be achieved. What classes do I need to subclass to
> make this happen?
> --
> View this message in context: 
> http://www.nabble.com/Create-custom-UrlCodingStrategy-tp20660813p20660813.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -----
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
WBR, kan.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: make invisible if model object is null

2008-12-01 Thread kan
https://issues.apache.org/jira/browse/WICKET-1964

2008/12/1 Igor Vaynberg <[EMAIL PROTECTED]>:
> we should add ibehavior.isVisibilityAllowed(Component) or something
> like that for 1.5 release. feel free to create a jira issue.
>
> -igor
>
> On Mon, Dec 1, 2008 at 3:03 AM, kan <[EMAIL PROTECTED]> wrote:
>> I use the next construction very often:
>>
>> [markup]
>> 
>> Something here, description, comments etc: > wicket:id="somethinig">
>> 
>>
>> [java]
>> add(new Label("something")
>> {
>>@Override
>>public boolean isVisible() {
>>return super.isVisible() && getDefaultModelObject() != null;
>>}
>> });
>>
>> And there are a lot different components which should be hidden with
>> some arounding text if they have null value of model object.
>> How to make this more elegant?
>> First obvious way - inherit from Label, and make something
>> LabelInvisibleNull, but it is very bad, because a lot different
>> components (not only Label, but Image, WebMarkupContainer, some my
>> custom components, etc) require this behavior.
>> Second - more meaningful - make a IBehavior. But it doesn't work. In
>> "bind" is to early to check model, but in "beforeRender" is too late
>> to change visibility.
>> Is there any other option?
>>
>>
>> --
>> WBR, kan.
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
WBR, kan.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



make invisible if model object is null

2008-12-01 Thread kan
I use the next construction very often:

[markup]

Something here, description, comments etc: 


[java]
add(new Label("something")
{
@Override
public boolean isVisible() {
return super.isVisible() && getDefaultModelObject() != null;
}
});

And there are a lot different components which should be hidden with
some arounding text if they have null value of model object.
How to make this more elegant?
First obvious way - inherit from Label, and make something
LabelInvisibleNull, but it is very bad, because a lot different
components (not only Label, but Image, WebMarkupContainer, some my
custom components, etc) require this behavior.
Second - more meaningful - make a IBehavior. But it doesn't work. In
"bind" is to early to check model, but in "beforeRender" is too late
to change visibility.
Is there any other option?


-- 
WBR, kan.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Set format date "inline"

2008-11-27 Thread kan
Yes, I know. But it takes Class only. And I have several different
formats (just date, date+time+tz, "human readable date" like "2 days
ago" and so on), how can I substitute a format in given piece of code
like add(new Label("someDate"))?

2008/11/27 Bruno Cesar Borges <[EMAIL PROTECTED]>:
> @Override
>public IConverter getConverter(Class type)
>{
>return MyConverter();
>}
>
> -Mensagem original-
> De: kan [mailto:[EMAIL PROTECTED]
> Enviada em: quinta-feira, 27 de novembro de 2008 14:57
> Para: users@wicket.apache.org
> Assunto: Set format date "inline"
>
>
> I have a MyPojo with property java.util.Date someDate
> I use CompoundPropertyModel
> Now I add components on my page, like add(new Label("someDate")) and
> it automagically uses IConvertor to convert from Date to string.
> But in some places of web-site I need print only "27/11/2008", in some
> places better will be "2 days ago", in some places "27/11/2008
> 16:53:34 UTC" and so on.
> What is an elegant way to specify a format in particular piece of code?
>
> --
> WBR, kan.
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
> ***
> "Atenção: Esta mensagem foi enviada para uso exclusivo do(s) destinatários(s) 
> acima identificado(s),
> podendo conter informações e/ou documentos confidencias/privilegiados e seu 
> sigilo é protegido por
> lei. Caso você tenha recebido por engano, por favor, informe o remetente e 
> apague-a de seu sistema.
> Notificamos que é proibido por lei a sua retenção, disseminação, 
> distribuição, cópia ou uso sem
> expressa autorização do remetente. Opiniões pessoais do remetente não 
> refletem, necessariamente,
> o ponto de vista da CETIP, o qual é divulgado somente por pessoas 
> autorizadas."
>
>
> "Warning: This message was sent for exclusive use of the addressees above 
> identified, possibly
> containing information and or privileged/confidential documents whose content 
> is protected by law.
> In case you have mistakenly received it, please notify the sender and delete 
> it from your system.
> Be noticed that the law forbids the retention, dissemination, distribution, 
> copy or use without
> express authorization from the sender. Personal opinions of the sender do not 
> necessarily reflect
> CETIP's point of view, which is only divulged by authorized personnel."
> ***
>



-- 
WBR, kan.


Set format date "inline"

2008-11-27 Thread kan
I have a MyPojo with property java.util.Date someDate
I use CompoundPropertyModel
Now I add components on my page, like add(new Label("someDate")) and
it automagically uses IConvertor to convert from Date to string.
But in some places of web-site I need print only "27/11/2008", in some
places better will be "2 days ago", in some places "27/11/2008
16:53:34 UTC" and so on.
What is an elegant way to specify a format in particular piece of code?

-- 
WBR, kan.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: nice URL for forms

2008-11-27 Thread kan
Just a thought. Does it have any sense to make something like
"BookmarkablePageForm" component?
So, the component would be designed to use with  and takes
Page.class (and maybe PageParameters which could be serialized as set
of ). It generates "action" attribute which points
to the page (probably mounted) and behaves like BookmarkablePageLink,
but data could be taken from form input.
Example:
[SomePage.html]

[SomePage.java]
add(new BookmarkablePageForm("search", SearchPage.class));
[SearchPage.java]
pubilc SearchPage(PageParameters params)
{
// use params.getAsString("q") as search criteria.
}

Could it be useful for anybody?

2008/11/18 Jeremy Thomerson <[EMAIL PROTECTED]>:
> See this answer from Johan maybe two days ago on the same question:
> http://www.nabble.com/Simple-GET-based-stateless-form-to20535056.html#a20536810
>
> --
> Jeremy Thomerson
> http://www.wickettraining.com
>
> On Tue, Nov 18, 2008 at 6:15 AM, Anatoly Kupriyanov <[EMAIL PROTECTED]>wrote:
>
>> I have a simple search form. with query text field "q" and "go"
>> button. I do the form method=get and stateless (as search form shd be
>> I guess).
>> The url becomes:
>>
>> http://127.0.0.1:8080/site/search/wicket:interface/:20:design:search::IFormSubmitListener::/?search7c_hf_0=&..%2F..%2F..%2F..%2Fclient%2Fsearch%2Fwicket%3Ainterface%2F%3A30%3Adesign%3Asearch%3A%3AIFormSubmitListener%3A%3A%2F=&q=word
>>
>> What can I do to make it more RESTful?
>>
>> PS: wicket v1.4-rc1
>>
>> --
>> WBR, kan.
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>



-- 
WBR, kan.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: continueToOriginalDestination and POST

2008-11-26 Thread kan
Yes, I am talking about timeouts.
Actually... Maybe I want from wicket more than it was designed for. In
some cases state of web-application could be on client-side and
doesn't need to be in server-side session, only exception is
auth-data. And I don't like fact that user faces with "page expired"
error message or losses post data.
But maybe yes, easier would be just make a periodic poll to keep session.

2008/11/26 Jeremy Thomerson <[EMAIL PROTECTED]>:
> You could add a feature request (and a patch?).
>
> My point was don't let them start on the form until they are signed in if
> being signed in is required for submitting the form.  This just makes sense.
>
> Or, if what you're saying is that they are timing out while working on the
> form, add an ajax update behavior that will keep them signed in / session
> current.
>
> On Wed, Nov 26, 2008 at 12:36 PM, kan <[EMAIL PROTECTED]> wrote:
>
>> A user has started to work with the form, then was distracted for 20
>> minutes, then he comes back and presses "submit".
>> Is it difficult to store PageParameters too?
>>
>> 2008/11/26 Jeremy Thomerson <[EMAIL PROTECTED]>:
>>  > They shouldn't be able to access the bookmarkable page with the form
>> (or,
>> > access the page, but have the form hidden until signed-in).  For
>> > continueToOriginalDestination, IIRC, Wicket just stores the URL, so you
>> > can't go back to a POST.
>> >
>> > On Wed, Nov 26, 2008 at 10:27 AM, kan <[EMAIL PROTECTED]> wrote:
>> >
>> >> I have a site which requires authentication. I've made it via
>> >> @AuthorizeInstantiation.
>> >> Works well. But if a bookmarkable page has a  with method POST,
>> >> and user presses "submit" after timeout, it redirects him to SignIn
>> >> screen. After successful login the site redirects back (usinig
>> >> continueToOriginalDestination) to the page and happens not very good
>> >> thing - method on form onSubmit is called but with no data on it,
>> >> because POST is lost during that redirects. Is there any easy reliable
>> >> solution of the problem?
>> >>
>> >> --
>> >> WBR, kan.
>> >>
>> >> -
>> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> >> For additional commands, e-mail: [EMAIL PROTECTED]
>> >>
>> >>
>> >
>> >
>> > --
>> > Jeremy Thomerson
>> > http://www.wickettraining.com
>> >
>>
>>
>>
>> --
>>  WBR, kan.
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
>
> --
> Jeremy Thomerson
> http://www.wickettraining.com
>



-- 
WBR, kan.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: continueToOriginalDestination and POST

2008-11-26 Thread kan
A user has started to work with the form, then was distracted for 20
minutes, then he comes back and presses "submit".
Is it difficult to store PageParameters too?

2008/11/26 Jeremy Thomerson <[EMAIL PROTECTED]>:
> They shouldn't be able to access the bookmarkable page with the form (or,
> access the page, but have the form hidden until signed-in).  For
> continueToOriginalDestination, IIRC, Wicket just stores the URL, so you
> can't go back to a POST.
>
> On Wed, Nov 26, 2008 at 10:27 AM, kan <[EMAIL PROTECTED]> wrote:
>
>> I have a site which requires authentication. I've made it via
>> @AuthorizeInstantiation.
>> Works well. But if a bookmarkable page has a  with method POST,
>> and user presses "submit" after timeout, it redirects him to SignIn
>> screen. After successful login the site redirects back (usinig
>> continueToOriginalDestination) to the page and happens not very good
>> thing - method on form onSubmit is called but with no data on it,
>> because POST is lost during that redirects. Is there any easy reliable
>> solution of the problem?
>>
>> --
>> WBR, kan.
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
>
> --
> Jeremy Thomerson
> http://www.wickettraining.com
>



-- 
WBR, kan.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



continueToOriginalDestination and POST

2008-11-26 Thread kan
I have a site which requires authentication. I've made it via
@AuthorizeInstantiation.
Works well. But if a bookmarkable page has a  with method POST,
and user presses "submit" after timeout, it redirects him to SignIn
screen. After successful login the site redirects back (usinig
continueToOriginalDestination) to the page and happens not very good
thing - method on form onSubmit is called but with no data on it,
because POST is lost during that redirects. Is there any easy reliable
solution of the problem?

-- 
WBR, kan.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Wicket Session grows too big real fast

2008-11-26 Thread kan
I am not sure if it always applicable, but usually I do not do
"implements Serializable" for domain objects (it works well with
Hibernated POJOs). In this case the Wicket cannot serialize a
component, and if it was a link to any such object - wicket just
reports about it into log, so you can see right away which component
has tried to "steal" a reference to an object (like in your situation
with inner class).

2008/11/26 jhp <[EMAIL PROTECTED]>:
>
> Removing references pointing to previous pages solved a lot, very good point.
> Also making sure that individual domain objects don't get stored to session
> makes  a difference. I have still a lot of code to go through to make sure
> that all unnecessary references don't get stored to session, but making a
> few changes in the most important pages makes already a big difference.
>
> I noticed that this is a problem that others have experienced too. I guess
> it is pretty easy unintentionally stuff the session with domain objects ,and
> if using modern day persistence framework, those domain objects can be quite
> large if they have collections etc.
>
> I think there is a need for small document outlining the common pitfalls and
> remedies for them. I haven't seen such. Wicket reference of course tells
> about LoadableDetachableModel, but this thread has info that I haven't found
> anywhere else. I might try compose such a document, if I just have the time
> and energy in the near future.
>
> Thanks to Martijn, Johan and John for your responses!
>
> BR,
> Jukka
>
>
>
>
> Martijn Dashorst wrote:
>>
>> With Wicket 1.3 only one page should be stored in session. You should
>> check if you don't keep references between pages -> that would result
>> in 1+N pages (with N being the number of pages you reference in your
>> page).
>>
>> Other than that: using LDM's and DataView/DataProvider instead of
>> ListView will help considerably.
>>
>> Martijn
>>
>
> --
> View this message in context: 
> http://www.nabble.com/Wicket-Session-grows-too-big-real-fast-tp20697077p20702093.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
WBR, kan.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: ListView model is CompoundPropertyModel>

2008-11-21 Thread kan
How to get appropriate item model inside populateItem method? Why
ListView cannot do it automatically?

2008/11/21 Igor Vaynberg <[EMAIL PROTECTED]>:
> item's model needs to be compound, not listview's
>
> -igor
>
> On Fri, Nov 21, 2008 at 9:45 AM, kan <[EMAIL PROTECTED]> wrote:
>> ListView model is CompoundPropertyModel>
>> And when I populate items such what:
>>
>> protected void populateItem(final ListItem item)
>> {
>>  item.add(new Label("fullName"));
>> }
>>
>> I getting error:
>> WicketMessage:  The expression 'fullName' is neither an index nor is
>> it a method or field for the list class java.util.ArrayList
>>
>> Why ListView doesn't set appropriate item's model to items?
>>
>> --
>> WBR, kan.
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
WBR, kan.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



ListView model is CompoundPropertyModel>

2008-11-21 Thread kan
ListView model is CompoundPropertyModel>
And when I populate items such what:

protected void populateItem(final ListItem item)
{
  item.add(new Label("fullName"));
}

I getting error:
WicketMessage:  The expression 'fullName' is neither an index nor is
it a method or field for the list class java.util.ArrayList

Why ListView doesn't set appropriate item's model to items?

-- 
WBR, kan.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Very custom URL mapping

2008-11-21 Thread kan
If wicket cannot do it, try http://tuckey.org/urlrewrite/

2008/11/19 Leszek Gawron <[EMAIL PROTECTED]>:
> Hello
>
> I would like to achieve the following url space:
> / redirects to /form
>
> /form - home page with a from
> /form?something - followup of a home page's form
>
> /resources/*.css
> /resources/*.jpg - resources served from /resources
>
> / - SomePage with  in PageParamters
>
>
> I know it would be a lot easier if I could do /somePage/ but
> unfortunately the requirement is different.
>
> How can I achieve something like this without rewritng 90% of wicket's url
> matching logic ?
>
>lg
> --
> Leszek Gawron
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
WBR, kan.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Two wicket apps

2008-11-20 Thread kan
Any ideas on it?

 Yet another question. In my admin application I want to have a link
 "show client screens". The link must follow to the main site with a
 client already signed it (in other words the WebSession, but from
different app is set to hold
 chosen client id). What is a way to do it?

-- 
WBR, kan.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



HTTPS, again

2008-10-15 Thread kan
I have web-site with login form in header, so the form does appear on
all pages. Normally it does work insecure, so the page could be viewed
insecure, but the form on it must be secure, otherwise it will send
username/password over insecure http.  I found in wicket wiki a
solution for a page it checks page for RequiredSSL annotation and
redirects if not ssl. But in my case the https should be before, in
url, but not after data is sent already. I mean  for
login form must be "https://...";. How to do it?

Also, as I understand, sessionid for insecure connection should be
transferred to secure and after it the sessionid should be generated
again, otherwise hacker can use this sessionid stolen from insecure
connection to intrude into session data which is expected to be
secure. Am I right? Is there easy way to do it in wicket?

-- 
WBR, kan.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Having Wicket append #someanchor

2008-10-07 Thread kan
2008/10/7 Nino Saturnino Martinez Vazquez Wael <[EMAIL PROTECTED]>:
> :)
Huh? :)
Yes, not brilliant solution but works for some cases... ;)
Actually it's quite possible to make it for all strategies, but
requires  to change wicket code.

-- 
WBR, kan.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Having Wicket append #someanchor

2008-10-06 Thread kan
http://cwiki.apache.org/confluence/display/WICKET/FAQs#FAQs-Howtoadd%23anchor(opaque)topageurl%3F

2008/10/6 Nino Saturnino Martinez Vazquez Wael <[EMAIL PROTECTED]>:
> Could you add it to the wiki?
>
> http://cwiki.apache.org/WICKET/
>
> kan wrote:
>>
>> I've made custom url coding strategy which finds key named "#" in
>> PageParameters and encodes it as anchor part (opaque part).
>>
>> 2008/10/2 Nino Saturnino Martinez Vazquez Wael <[EMAIL PROTECTED]>:
>>
>>>
>>> I would probably just do a simple javascript and make a
>>> headercontribution... But I guess it's not really the standard way when
>>> it
>>> comes to anchors...
>>>
>>> Craig Tataryn wrote:
>>>
>>>>
>>>> *bump*
>>>>
>>>> On Wed, Oct 1, 2008 at 2:04 PM, Craig Tataryn <[EMAIL PROTECTED]>
>>>> wrote:
>>>>
>>>>
>>>>
>>>>>
>>>>> I was wondering if there is a way to have Wicket append some anchor
>>>>> information to a response page?
>>>>>
>>>>> So if I were on: MyPage.html, then they click a submit button and the
>>>>> server side codes does a setResponsePage(MyPage.class) I would want the
>>>>> actual page to be MyPage.html#someanchor
>>>>>
>>>>> A suggestion on ##wicket was to do a redirect through
>>>>> httpServletResponse
>>>>> and rewrite the url myself, but I wanted to know if Wicket supported
>>>>> this
>>>>> a
>>>>> bit more "out of the box"
>>>>>
>>>>> Thanks!
>>>>>
>>>>> Craig.
>>>>>
>>>>> --
>>>>> Craig Tataryn
>>>>> site: http://www.basementcoders.com/
>>>>> podcast:http://feeds.feedburner.com/TheBasementCoders
>>>>> irc: ThaDon on freenode #basementcoders, ##wicket, #papernapkin
>>>>> im: [EMAIL PROTECTED], skype: craig.tataryn
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>
>>> --
>>> -Wicket for love
>>>
>>> Nino Martinez Wael
>>> Java Specialist @ Jayway DK
>>> http://www.jayway.dk
>>> +45 2936 7684
>>>
>>>
>>> -
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>>
>>
>>
>>
>>
>
> --
> -Wicket for love
>
> Nino Martinez Wael
> Java Specialist @ Jayway DK
> http://www.jayway.dk
> +45 2936 7684
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
WBR, kan.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Having Wicket append #someanchor

2008-10-06 Thread kan
I've made custom url coding strategy which finds key named "#" in
PageParameters and encodes it as anchor part (opaque part).

2008/10/2 Nino Saturnino Martinez Vazquez Wael <[EMAIL PROTECTED]>:
> I would probably just do a simple javascript and make a
> headercontribution... But I guess it's not really the standard way when it
> comes to anchors...
>
> Craig Tataryn wrote:
>>
>> *bump*
>>
>> On Wed, Oct 1, 2008 at 2:04 PM, Craig Tataryn <[EMAIL PROTECTED]> wrote:
>>
>>
>>>
>>> I was wondering if there is a way to have Wicket append some anchor
>>> information to a response page?
>>>
>>> So if I were on: MyPage.html, then they click a submit button and the
>>> server side codes does a setResponsePage(MyPage.class) I would want the
>>> actual page to be MyPage.html#someanchor
>>>
>>> A suggestion on ##wicket was to do a redirect through httpServletResponse
>>> and rewrite the url myself, but I wanted to know if Wicket supported this
>>> a
>>> bit more "out of the box"
>>>
>>> Thanks!
>>>
>>> Craig.
>>>
>>> --
>>> Craig Tataryn
>>> site: http://www.basementcoders.com/
>>> podcast:http://feeds.feedburner.com/TheBasementCoders
>>> irc: ThaDon on freenode #basementcoders, ##wicket, #papernapkin
>>> im: [EMAIL PROTECTED], skype: craig.tataryn
>>>
>>>
>>
>>
>>
>>
>
> --
> -Wicket for love
>
> Nino Martinez Wael
> Java Specialist @ Jayway DK
> http://www.jayway.dk
> +45 2936 7684
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
WBR, kan.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Use wicket page templates not for webapplication

2008-09-17 Thread kan
http://cwiki.apache.org/WICKET/use-wicket-as-template-engine.html

-- 
WBR, kan.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: StatelessForm data becomes PageParameters and as result is doubling

2008-09-17 Thread kan
2008/9/17 Michael Sparer <[EMAIL PROTECTED]>:

> without looking at code - can't you circumvent the problem by using POST
> instead of GET?
I use post already.
I got it. I have
class MyPage extends WebPage
{
 public MyPage(PageParameters parameters)
 {
   super(parameters);// --- this line is the problem.
 }
}

So... "parameters" variable has all submission data... Not sure how to
solve it correctly. I have to determine somehow which parameters are
page parameters, but which are just some form inside.

-- 
WBR, kan.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Mysterious classnotfoundexceptions

2008-09-16 Thread kan
2008/9/12 Ritesh Trivedi <[EMAIL PROTECTED]>:

> java.lang.NoClassDefFoundError:
I had the exception (not ClassNotFoundException) on Windows if class
name cAsE doesn't match file name.

-- 
WBR, kan.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Cyrillic characters

2008-09-16 Thread kan
2008/9/16 akunosh <[EMAIL PROTECTED]>:

> i'm getting questions marks!
I don't think it's wicket problem. Just trace character data encodings
between database and web-server. Most probably you missed character
set somewhere, as I heard Tomcat misconfiguration is very often the
issue.


-- 
WBR, kan.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



StatelessForm data becomes PageParameters and as result is doubling

2008-09-16 Thread kan
If I have stateless form on a page, and form is submitted, page is
constructed again with all form data as parameters. Ok, it's not great
but it's impossible to avoid.
But, if the form has validation errors and the same page is rendered
again, it has all that parameters in  and next
request has the parameters doubled - from currently data from "post"
and previous data from query string.
How to avoid it?

-- 
WBR, kan.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Use wicket page templates not for webapplication

2008-09-16 Thread kan
2008/8/27 Nino Saturnino Martinez Vazquez Wael <[EMAIL PROTECTED]>:

> I did something similar once, but realized somewhere in the process that it
> werent exactly the same content writing a mail as the web page. I used the
> wicket text templates heavy instead.
Ok, I've made it. I've created "class TemplaterApplication extends
Application" (and all related classes Request, RequestCycle, etc) and
WicketTemplater over it. It takes TemplatePage (child of wicket.Page)
implementation and writes result to given java.io.Writer. All stuff
like sessions, versioning, request parameters are disabled,
TemplatePage is always stateless.
Yes, web page is not the same as email, but very-very close. Of
course, it's nearly impossible to reuse the same WebPage, but you can
reuse some your components both on WebPage and TemplatePage. And of
course it's possible to use most standard wicket components like
wicket:border, wicket:extend, repeaters, etc...
Yet another great benefits, but I've not done it yet:
- it's possible to make auto-linking of resources. Say, if you have
 on your page, the generated email will have the image attached
and properly linked as "cid:" resource.
- if you have a link in email to your web-site back, it could be
properly handled and checked if it actually links to correct Page.

If somebody find it interesting, I can to share my code and actually
it's possible to make "html templater" and "html email generator" as
yet another library.

-- 
WBR, kan.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Use wicket page templates not for webapplication

2008-08-26 Thread kan
Can I render a page but not in web environment? E.g. I want to create
an javax.mail with html-body and want to reuse my wicket components to
generate content. So, no servlets, no sessions, no requests/responses,
no ajax - just render a page to a stream.

-- 
WBR, kan.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



How to include some parameters in template? Custom tag? Component?

2008-08-07 Thread kan
I have some page template which I want to include some blocks which
look same but some minor differences. Something like this
...

Please try our apple and play on our
cool apple computers.



So, after rendering my:productInfo could be replaced by some html
which may contain given product description, image, link to buy, etc.

I cannot to use  because it less obvious
and cannot give me structured parameters (like category, id) and I
have to add each wicket:id in .java-file, which could be annoying to
change two places.

I found wicket:component tag, but it's experimental and not recommended to use.

I think to implement own IComponentResolver to handle my:productInfo
tags. Is it the best way? Or is there other way to do it?

-- 
WBR, kan.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]