Re: Wicket Quickstart Installation Guide for Beginners

2009-03-03 Thread Nano Surbakti
Hi Dane,

Thanks for the tutorial. Very clear and straightforward. :)

--
Nano Surbakti

On Wed, Mar 4, 2009 at 6:36 AM, Dane Laverty  wrote:
> I tried attaching it, but I guess that doesn't work. You can check it
> out here:
>
> https://www.foodhandler.org/wicketGuide/WicketQuickstartGuide.pdf
>
> or here
>
> https://www.foodhandler.org/wicketGuide/WicketQuickstartGuide.doc
>

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



Re: Please Please Portlet

2009-03-03 Thread Niels van Kampenhout
On Tue, Mar 3, 2009 at 7:43 AM, Francisco Diaz Trepat - gmail
 wrote:
> Hi all, I decided to ask for help, since last night I had nightmares of xml
> files extrangulating me.
> I read the portlet how-to in the wiki, probably misread it. I have an
> application that has no portlet usage (as in no blabla extends blaportlet),
> but I was told that all the application could be seen from inside a portle,
> simply by configure xmls:
>
> web.xml
> portlet.xml
> sun-web.xml
>
> (using Netbeans, wicket 1.4rc2, glassfish v3, portlet-container from
> open-portal project)
>
>
> I have this on the web.xml:
>
>   
>      WicketFilter
>
>  org.apache.wicket.protocol.http.WicketFilter
>
>      
>      
>         portletOnlyFilter
>         true
>      
>
>      
>         detectPortletContext
>         true
>      
>
>
>      
>         configuration
>         development
>      
>
>     
>         filterMappingUrlPattern
>
> /MyApplicationThatDoesNotWorkWithPortlet/*
>      
>
> I have this on the portlet.xml:
>
> 
>   
>       MyApplicationThatDoesNotWorkWithPortlet
> portlet version
>       MyApplicationThatDoesNotWorkWithPortlet 
>       MyApplicationThatDoesNotWorkWithPortlet -
> Portlet
>
>  org.apache.wicket.protocol.http.portlet.WicketPortlet
>
>      
>        wicketFilterPath
>        /MyApplicationThatDoesNotWorkWithPortlet
>      
>
>      -1
>      
>         */*
>         VIEW
>      
>      
>         MyApplicationThatDoesNotWorkWithPortlet
>
> Portlet MyApplicationThatDoesNotWorkWithPortlet
>      
>   
> 
>
> finally I have this on the sun-web.xml:
>
> 
>  /MyApplicationThatDoesNotWorkWithPortlet
>  
>  
>    
>      Keep a copy of the generated servlet class' java
> code.
>    
>  
> 
>
> Please, could someone help me out. I couldn't find a comprehensive guide to
> these 3 xml file and I am sure that I am missing something.

I suggest looking at the web.xml and portlet.xml in wicket-examples
[1]. That's what I did and I had my Wicket app running as a portlet in
no time.

One thing I miss in your filter configuration is the init-param
'applicationClassName' which should have your Wicket application class
as value.

HTH,

Niels

[1] 
http://svn.apache.org/repos/asf/wicket/releases/wicket-1.4-rc2/wicket-examples/

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



Wicket Stuff - YUI Change

2009-03-03 Thread Michael Laccetti
Modified addMenuItem(String, Link) to addMenuItem(String, AbstractLink) in 
org.wicketstuff.yui.markup.html.menu2.YuiMenu so that an ExternalLink can be 
passed in.  Committed as r4586 - let me know if there are any problems with 
this.

Michael

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



Re: Wicket Quickstart Installation Guide for Beginners

2009-03-03 Thread Martijn Dashorst
I think the admins disabled attachments for non-committers. Can you
attach them through a JIRA issue? then someone with the correct
permissions can upload them. Just make sure to give them identifiable
names, and don't forget to check the "Intended for inclusion in Apache
products" check box :)

Martijn

On Wed, Mar 4, 2009 at 1:45 AM, Dane Laverty  wrote:
> Thanks, it looks good. I checked the Confluence website about adding
> images to a page and it says:
>
>> To attach a file to a page,
>>
>>   1. Go to the page and click on the 'Attachments' tab.
>>
>>   2. Browse through your files and select the file you'd like to
> attach.
>>
>>   3. Enter a description for the attachment in the 'Comment' text
> field (optional).
>>
>>   4. Click 'Attach more files' if required.
>>
>>   5. Click 'Attach File'.
>
> I'm not seeing any 'Attachments' tab. Do I need different permissions?
> Or do I have to link to an image hosted elsewhere?
>
>
> -Original Message-
> From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com]
> Sent: Tuesday, March 03, 2009 4:23 PM
> To: users@wicket.apache.org
> Subject: Re: Wicket Quickstart Installation Guide for Beginners
>
> i got you most of the way there, you just need to upload images and
> put them in the right place
>
> when you hit edit page, switch to the first tab which says "rich
> format" that should give you a nice wysiwig editor to work with.
>
> -igor
>
> On Tue, Mar 3, 2009 at 4:08 PM, Dane Laverty 
> wrote:
>> I attempted to do that, but without any luck. I'm not at all familiar
>> with wikis, but I'd be happy to do it if someone will point me in the
>> right direction.
>>
>> -Original Message-
>> From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com]
>> Sent: Tuesday, March 03, 2009 3:44 PM
>> To: users@wicket.apache.org
>> Subject: Re: Wicket Quickstart Installation Guide for Beginners
>>
>> you can add a link to it off our wiki. or possibly upload it to the
>> wiki, not sure how attachments there work.
>>
>> -igor
>>
>> -
>> 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
>
>



-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.3.5 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

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



WicketStuff Core - 1.4-rc2 release cut and available

2009-03-03 Thread Jeremy Thomerson
Tonight I finally bit the bullet and built a release of wicketstuff-core to
match the 1.4-rc2 tag of Wicket.  Now if you are using wicket 1.4-rc2, you
can also include any artifact that's a child of wicketstuff-core with the
version 1.4-rc2 as well, without having to home build your own.

The repo is available here: http://www.wickettraining.com/ws-repo/

Is there someone who has access to the official wicketstuff.org server /
repo that can mirror that?  Or I can mirror to it, or something.  That would
be better since that is where people normally look.

PS - I built this using mvn release:prepare / release:perform, so it should
be reproducible now that I got all the little bugs out of the pom files (I
think).  I'll try to document the process next time.

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


Tabbed Panel problem

2009-03-03 Thread Ashis

Hello all,
   I am using Ajax Tabbed Panel.I have 4 tabs.First tab contains login form
and javascript to display images. When i run the project all works fine,
javascript displaying images also gets load but if i click the first tab
again the javascript displaying images does not gets load and blank page is
displayed in browser

Please suggest me some help
Thank you
-- 
View this message in context: 
http://www.nabble.com/Tabbed-Panel-problem-tp22324325p22324325.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: Question re: style and variation

2009-03-03 Thread Anton Veretennikov
Only if someone needs to implement other file name policy and at the
same time don't want to copy & paste.
My mite only: this is encapsulating AND flexible but...difficult to code.

On Wed, Mar 4, 2009 at 12:01 PM, Igor Vaynberg  wrote:
> for every panel, textfield, label, tabbedpanel, etc, etc, etc?
>
> -igor
>
> On Tue, Mar 3, 2009 at 8:58 PM, Anton Veretennikov
>  wrote:
>> extend common base component?
>>
>> On Wed, Mar 4, 2009 at 11:56 AM, Igor Vaynberg  
>> wrote:
>>> that would be extremely tedious if you want to override it for all
>>> components in your application :)
>>>
>>> -igor
>>>
>>> On Tue, Mar 3, 2009 at 8:54 PM, Anton Veretennikov
>>>  wrote:
 per each component?

 On Wed, Mar 4, 2009 at 11:52 AM, Igor Vaynberg  
 wrote:
> we cannot make this overridable because it breaks encapsulation.
>
> imagine you write a table component that includes styles and
> variations. i then want to use it in my app where i have overwritten
> this syntax, now my app wont pick up your styles and variations.
>
> so we need to come up with something simple that everyone can agree on.
>
> -igor
>
> On Tue, Mar 3, 2009 at 8:48 PM, Anton Veretennikov
>  wrote:
>> String getFileNameTemplate() {
>>  return 
>> "fileName([styleName][_variationName])[language[_territory][.codese...@modifier]]";
>> }
>>
>>
>> On Wed, Mar 4, 2009 at 11:47 AM, Igor Vaynberg  
>> wrote:
>>> but there is a special rule about the _ prefix to indicate a
>>> variation, where as a simple empty bracket is easy - its always
>>> consistent [style][variation][locale]. just my two cents.
>>>
>>> personally i never had to use variations myself, but there were
>>> threads in the past about them, so i guess someone somewhere is using
>>> them.
>>>
>>> -igor
>>>
>>> On Tue, Mar 3, 2009 at 8:44 PM, jWeekend  
>>> wrote:

 Igor,

 I'd say your

 "HomePage[style_variation]_US_en.html that way a style only version 
 can be
 HomePage[style]_US_en.html and variation only would be
 HomePage[_variation]_US_en.html we can then forbid the use of _ in 
 style and
 variation names. "

 is the best option (so far). There are no special rules or empty 
 brakets
 unless you choose to use Wicket specific features (style and 
 variation).
 And, it somehow looks less ugly than some of the other suggestions,
 especially mine!

 Thanks for the example use-case; I expect someone, somewhere out there 
 is
 making good use of "variations".

 Regards - Cemal
 http://jWeekend.com jWeekend




 igor.vaynberg wrote:
>
> i dont like the fact that there is now a -, (, ), and _ in the name
>
> i can live with something like HomePage()(variation)_US_en.html vs
>
> HomePage()(variation)(US_en)
>
> maybe even simpler would be do
>
> HomePage[style_variation]_US_en.html
>
> that way a style only version can be HomePage[style]_US_en.html
>
> and variation only would be HomePage[_variation]_US_en.html
>
> we can then forbid the use of _ in style and variation names.
>
> its a little more complex but avoids an empty [] or () to indicate
> variation only markup.
>
> I still think that HomePage[][variation][US_en].html does look cleaner
> and simpler then
>
> HomePage[][variation]_US_en.html or HomePage[_variation]_US_en.html
>
> because in HomePage[][variation][US_en] you only have to know [] as
> separators.
>
>
> the usecases for variations vary. suppose your application is divided
> in two frames and the user can select the color scheme for both.
> having a single value for style wont work here, it has to be per
> component.
>
> -igor
>
> On Tue, Mar 3, 2009 at 7:18 PM, jWeekend 
> wrote:
>>
>> Igor,
>>
>> In Java, variant is the least significant component(s) of a locale:
>> lang_COUNTRY_variant  .
>>
>> Wicket adds style and variation (right?) so maybe only these 
>> components
>> of
>> the filename should have a special marker. That way, some level of
>> consistentcy is maintained and the Wicket specific style & variation 
>> are
>> clearly identifiable.
>> So, for example, HomePage-aStyle(aVariation)_th_TH_TH.html   - in 
>> this
>> example you'd need to double check that dash and the parenthesis can 
>> be
>> used
>> in file names on all relevant filesystems 

Wicket Stuff Simile Timeline: yuicompressor

2009-03-03 Thread Jeremy Thomerson
I had to exclude **/*.java from the yui-compressor plugin so that the
project would build.  I have never used yui-compressor, and didn't do much
investigating before making this change - I just know that it was leading to
zero byte class files after the java compiler had run and then
yui-compressor blew the class files away.  To whoever owns the simile
project - is this okay?  I can revert if needed - let me know.

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


Re: Question re: style and variation

2009-03-03 Thread Igor Vaynberg
for every panel, textfield, label, tabbedpanel, etc, etc, etc?

-igor

On Tue, Mar 3, 2009 at 8:58 PM, Anton Veretennikov
 wrote:
> extend common base component?
>
> On Wed, Mar 4, 2009 at 11:56 AM, Igor Vaynberg  
> wrote:
>> that would be extremely tedious if you want to override it for all
>> components in your application :)
>>
>> -igor
>>
>> On Tue, Mar 3, 2009 at 8:54 PM, Anton Veretennikov
>>  wrote:
>>> per each component?
>>>
>>> On Wed, Mar 4, 2009 at 11:52 AM, Igor Vaynberg  
>>> wrote:
 we cannot make this overridable because it breaks encapsulation.

 imagine you write a table component that includes styles and
 variations. i then want to use it in my app where i have overwritten
 this syntax, now my app wont pick up your styles and variations.

 so we need to come up with something simple that everyone can agree on.

 -igor

 On Tue, Mar 3, 2009 at 8:48 PM, Anton Veretennikov
  wrote:
> String getFileNameTemplate() {
>  return 
> "fileName([styleName][_variationName])[language[_territory][.codese...@modifier]]";
> }
>
>
> On Wed, Mar 4, 2009 at 11:47 AM, Igor Vaynberg  
> wrote:
>> but there is a special rule about the _ prefix to indicate a
>> variation, where as a simple empty bracket is easy - its always
>> consistent [style][variation][locale]. just my two cents.
>>
>> personally i never had to use variations myself, but there were
>> threads in the past about them, so i guess someone somewhere is using
>> them.
>>
>> -igor
>>
>> On Tue, Mar 3, 2009 at 8:44 PM, jWeekend  
>> wrote:
>>>
>>> Igor,
>>>
>>> I'd say your
>>>
>>> "HomePage[style_variation]_US_en.html that way a style only version can 
>>> be
>>> HomePage[style]_US_en.html and variation only would be
>>> HomePage[_variation]_US_en.html we can then forbid the use of _ in 
>>> style and
>>> variation names. "
>>>
>>> is the best option (so far). There are no special rules or empty brakets
>>> unless you choose to use Wicket specific features (style and variation).
>>> And, it somehow looks less ugly than some of the other suggestions,
>>> especially mine!
>>>
>>> Thanks for the example use-case; I expect someone, somewhere out there 
>>> is
>>> making good use of "variations".
>>>
>>> Regards - Cemal
>>> http://jWeekend.com jWeekend
>>>
>>>
>>>
>>>
>>> igor.vaynberg wrote:

 i dont like the fact that there is now a -, (, ), and _ in the name

 i can live with something like HomePage()(variation)_US_en.html vs

 HomePage()(variation)(US_en)

 maybe even simpler would be do

 HomePage[style_variation]_US_en.html

 that way a style only version can be HomePage[style]_US_en.html

 and variation only would be HomePage[_variation]_US_en.html

 we can then forbid the use of _ in style and variation names.

 its a little more complex but avoids an empty [] or () to indicate
 variation only markup.

 I still think that HomePage[][variation][US_en].html does look cleaner
 and simpler then

 HomePage[][variation]_US_en.html or HomePage[_variation]_US_en.html

 because in HomePage[][variation][US_en] you only have to know [] as
 separators.


 the usecases for variations vary. suppose your application is divided
 in two frames and the user can select the color scheme for both.
 having a single value for style wont work here, it has to be per
 component.

 -igor

 On Tue, Mar 3, 2009 at 7:18 PM, jWeekend 
 wrote:
>
> Igor,
>
> In Java, variant is the least significant component(s) of a locale:
> lang_COUNTRY_variant  .
>
> Wicket adds style and variation (right?) so maybe only these 
> components
> of
> the filename should have a special marker. That way, some level of
> consistentcy is maintained and the Wicket specific style & variation 
> are
> clearly identifiable.
> So, for example, HomePage-aStyle(aVariation)_th_TH_TH.html   - in this
> example you'd need to double check that dash and the parenthesis can 
> be
> used
> in file names on all relevant filesystems (you could even make the
> markers
> configurable I suppose in Application#init and/or using system 
> properties
> ...). Of course it's not pretty; at the end of the day, your stuck 
> with
> character strings so you can't stop people confusing themselves (and
> maybe
> Wicket too) with funky file names using these "special" characters.
>>

Re: Non-serializable model objects

2009-03-03 Thread Timo Rantalaiho
On Tue, 03 Mar 2009, Chris Hansen wrote:
> The situation that I'm dealing with most commonly is where I'm dealing
> with simple, DTO-like POJOS with no-arg constructors and
> getters/setters (why they are not serializable in the first place is
> beyond me). It just seems like it would be possible, in this simple
> case, to create a proxy for each object in the object graph which is
> not serializable until you get down to the actual data (i.e.
> primitives, Strings, etc.) which is serializable. The proxies would
> have to keep track of whatever information they need to de-serialize
> themselves (e.g. class name and constructor). It seems like this has
> not been implemented, but do you think it is possible to do so?

That sounds cumbersome too :)

If the objects are in fact serializable, why can't you make 
them Serializable?

Alternatively, you could create Serializable wrappers for them. 
Doing that to DTOs sounds strange though :)

Some people use HttpSessionStore and don't replicate nor
persist their sessions, but I suppose that's not a supported
nor advisable approach.

Best wishes,
Timo


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



Re: Non-serializable model objects

2009-03-03 Thread Igor Vaynberg
of course its possible, you will basically be rewriting java's
serialization mechanism :) its been done before - eg xstream.

is it recommended or safe? probably not, so do at your own risk.
imagine a dao that holds onto a datasource. serializing the datasource
is probably not the best idea. also serializing singletons is not a
good idea because upon deserialization you will end up with many
instances of the singleton. imho, there are very good reason why some
objects are not declared serializable. does the flipside of the coin
exist? of course, ive seen it - but it hasnt happened very often.

-igor

On Tue, Mar 3, 2009 at 8:54 PM, Chris Hansen  wrote:
> Makes sense, and thanks for the quick replies.
>
> The situation that I'm dealing with most commonly is where I'm dealing
> with simple, DTO-like POJOS with no-arg constructors and
> getters/setters (why they are not serializable in the first place is
> beyond me). It just seems like it would be possible, in this simple
> case, to create a proxy for each object in the object graph which is
> not serializable until you get down to the actual data (i.e.
> primitives, Strings, etc.) which is serializable. The proxies would
> have to keep track of whatever information they need to de-serialize
> themselves (e.g. class name and constructor). It seems like this has
> not been implemented, but do you think it is possible to do so?
>
> -Chris
>
> On Tue, Mar 3, 2009 at 9:43 PM, Igor Vaynberg  wrote:
>> objects you put into the model are stored in components, which are in
>> turn stored in httpsession and are serialized to disk. in order to be
>> serialized to disk or to be stored in httpsession (per servlet spec)
>> those objects must be serializable.
>>
>> if your object is not serializable and all you do is wrap it in a
>> serializable proxy this will not help you much when it comes to dump
>> the page to disk.
>>
>> what is happening in wicket-guice and wicket-spring is that only
>> references you get from your  container are held us serializable
>> proxies. this works because when it comes time to serialize the
>> component these values can be discarded because they can be later
>> looked up from the container again. but if your value is not
>> discardable this approach wont work.
>>
>> makes sense?
>>
>> -igor
>>
>> On Tue, Mar 3, 2009 at 8:36 PM, Chris Hansen  
>> wrote:
>>> Hi all,
>>>
>>> First off, I'm new to Wicket and I have to say I'm really liking it so far.
>>>
>>> One concern I have is related to using non-serializable objects. If
>>> I'm not mistaken, some other web frameworks will create dynamic,
>>> serializable proxies for your non-serializable objects automatically,
>>> when possible. I saw that this type of functionality is used in
>>> Wicket's Guice integration, but I am wondering why it isn't a part of
>>> Wicket proper. Using serializable model objects seems like a fine
>>> goal, but what if those model objects are in a library which is not
>>> under our control and they happen to not be serializable?
>>>
>>> There must be downsides to the proxy approach that I'm not aware of,
>>> or an easier way to work with non-serializable model objects. Am I
>>> missing something?
>>>
>>> Thanks,
>>> Chris
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

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



Re: Question re: style and variation

2009-03-03 Thread Anton Veretennikov
extend common base component?

On Wed, Mar 4, 2009 at 11:56 AM, Igor Vaynberg  wrote:
> that would be extremely tedious if you want to override it for all
> components in your application :)
>
> -igor
>
> On Tue, Mar 3, 2009 at 8:54 PM, Anton Veretennikov
>  wrote:
>> per each component?
>>
>> On Wed, Mar 4, 2009 at 11:52 AM, Igor Vaynberg  
>> wrote:
>>> we cannot make this overridable because it breaks encapsulation.
>>>
>>> imagine you write a table component that includes styles and
>>> variations. i then want to use it in my app where i have overwritten
>>> this syntax, now my app wont pick up your styles and variations.
>>>
>>> so we need to come up with something simple that everyone can agree on.
>>>
>>> -igor
>>>
>>> On Tue, Mar 3, 2009 at 8:48 PM, Anton Veretennikov
>>>  wrote:
 String getFileNameTemplate() {
  return 
 "fileName([styleName][_variationName])[language[_territory][.codese...@modifier]]";
 }


 On Wed, Mar 4, 2009 at 11:47 AM, Igor Vaynberg  
 wrote:
> but there is a special rule about the _ prefix to indicate a
> variation, where as a simple empty bracket is easy - its always
> consistent [style][variation][locale]. just my two cents.
>
> personally i never had to use variations myself, but there were
> threads in the past about them, so i guess someone somewhere is using
> them.
>
> -igor
>
> On Tue, Mar 3, 2009 at 8:44 PM, jWeekend  
> wrote:
>>
>> Igor,
>>
>> I'd say your
>>
>> "HomePage[style_variation]_US_en.html that way a style only version can 
>> be
>> HomePage[style]_US_en.html and variation only would be
>> HomePage[_variation]_US_en.html we can then forbid the use of _ in style 
>> and
>> variation names. "
>>
>> is the best option (so far). There are no special rules or empty brakets
>> unless you choose to use Wicket specific features (style and variation).
>> And, it somehow looks less ugly than some of the other suggestions,
>> especially mine!
>>
>> Thanks for the example use-case; I expect someone, somewhere out there is
>> making good use of "variations".
>>
>> Regards - Cemal
>> http://jWeekend.com jWeekend
>>
>>
>>
>>
>> igor.vaynberg wrote:
>>>
>>> i dont like the fact that there is now a -, (, ), and _ in the name
>>>
>>> i can live with something like HomePage()(variation)_US_en.html vs
>>>
>>> HomePage()(variation)(US_en)
>>>
>>> maybe even simpler would be do
>>>
>>> HomePage[style_variation]_US_en.html
>>>
>>> that way a style only version can be HomePage[style]_US_en.html
>>>
>>> and variation only would be HomePage[_variation]_US_en.html
>>>
>>> we can then forbid the use of _ in style and variation names.
>>>
>>> its a little more complex but avoids an empty [] or () to indicate
>>> variation only markup.
>>>
>>> I still think that HomePage[][variation][US_en].html does look cleaner
>>> and simpler then
>>>
>>> HomePage[][variation]_US_en.html or HomePage[_variation]_US_en.html
>>>
>>> because in HomePage[][variation][US_en] you only have to know [] as
>>> separators.
>>>
>>>
>>> the usecases for variations vary. suppose your application is divided
>>> in two frames and the user can select the color scheme for both.
>>> having a single value for style wont work here, it has to be per
>>> component.
>>>
>>> -igor
>>>
>>> On Tue, Mar 3, 2009 at 7:18 PM, jWeekend 
>>> wrote:

 Igor,

 In Java, variant is the least significant component(s) of a locale:
 lang_COUNTRY_variant  .

 Wicket adds style and variation (right?) so maybe only these components
 of
 the filename should have a special marker. That way, some level of
 consistentcy is maintained and the Wicket specific style & variation 
 are
 clearly identifiable.
 So, for example, HomePage-aStyle(aVariation)_th_TH_TH.html   - in this
 example you'd need to double check that dash and the parenthesis can be
 used
 in file names on all relevant filesystems (you could even make the
 markers
 configurable I suppose in Application#init and/or using system 
 properties
 ...). Of course it's not pretty; at the end of the day, your stuck with
 character strings so you can't stop people confusing themselves (and
 maybe
 Wicket too) with funky file names using these "special" characters.

 The javadoc says: Whereas Styles are Session (user) specific, 
 variations
 are
 component specific. E.g. if the Style is "ocean" and the Variation is
 "NorthSea", than the resources are given the names suffixed with
 "_ocean_NorthSea".

 Is t

Re: Question re: style and variation

2009-03-03 Thread Igor Vaynberg
that would be extremely tedious if you want to override it for all
components in your application :)

-igor

On Tue, Mar 3, 2009 at 8:54 PM, Anton Veretennikov
 wrote:
> per each component?
>
> On Wed, Mar 4, 2009 at 11:52 AM, Igor Vaynberg  
> wrote:
>> we cannot make this overridable because it breaks encapsulation.
>>
>> imagine you write a table component that includes styles and
>> variations. i then want to use it in my app where i have overwritten
>> this syntax, now my app wont pick up your styles and variations.
>>
>> so we need to come up with something simple that everyone can agree on.
>>
>> -igor
>>
>> On Tue, Mar 3, 2009 at 8:48 PM, Anton Veretennikov
>>  wrote:
>>> String getFileNameTemplate() {
>>>  return 
>>> "fileName([styleName][_variationName])[language[_territory][.codese...@modifier]]";
>>> }
>>>
>>>
>>> On Wed, Mar 4, 2009 at 11:47 AM, Igor Vaynberg  
>>> wrote:
 but there is a special rule about the _ prefix to indicate a
 variation, where as a simple empty bracket is easy - its always
 consistent [style][variation][locale]. just my two cents.

 personally i never had to use variations myself, but there were
 threads in the past about them, so i guess someone somewhere is using
 them.

 -igor

 On Tue, Mar 3, 2009 at 8:44 PM, jWeekend  
 wrote:
>
> Igor,
>
> I'd say your
>
> "HomePage[style_variation]_US_en.html that way a style only version can be
> HomePage[style]_US_en.html and variation only would be
> HomePage[_variation]_US_en.html we can then forbid the use of _ in style 
> and
> variation names. "
>
> is the best option (so far). There are no special rules or empty brakets
> unless you choose to use Wicket specific features (style and variation).
> And, it somehow looks less ugly than some of the other suggestions,
> especially mine!
>
> Thanks for the example use-case; I expect someone, somewhere out there is
> making good use of "variations".
>
> Regards - Cemal
> http://jWeekend.com jWeekend
>
>
>
>
> igor.vaynberg wrote:
>>
>> i dont like the fact that there is now a -, (, ), and _ in the name
>>
>> i can live with something like HomePage()(variation)_US_en.html vs
>>
>> HomePage()(variation)(US_en)
>>
>> maybe even simpler would be do
>>
>> HomePage[style_variation]_US_en.html
>>
>> that way a style only version can be HomePage[style]_US_en.html
>>
>> and variation only would be HomePage[_variation]_US_en.html
>>
>> we can then forbid the use of _ in style and variation names.
>>
>> its a little more complex but avoids an empty [] or () to indicate
>> variation only markup.
>>
>> I still think that HomePage[][variation][US_en].html does look cleaner
>> and simpler then
>>
>> HomePage[][variation]_US_en.html or HomePage[_variation]_US_en.html
>>
>> because in HomePage[][variation][US_en] you only have to know [] as
>> separators.
>>
>>
>> the usecases for variations vary. suppose your application is divided
>> in two frames and the user can select the color scheme for both.
>> having a single value for style wont work here, it has to be per
>> component.
>>
>> -igor
>>
>> On Tue, Mar 3, 2009 at 7:18 PM, jWeekend 
>> wrote:
>>>
>>> Igor,
>>>
>>> In Java, variant is the least significant component(s) of a locale:
>>> lang_COUNTRY_variant  .
>>>
>>> Wicket adds style and variation (right?) so maybe only these components
>>> of
>>> the filename should have a special marker. That way, some level of
>>> consistentcy is maintained and the Wicket specific style & variation are
>>> clearly identifiable.
>>> So, for example, HomePage-aStyle(aVariation)_th_TH_TH.html   - in this
>>> example you'd need to double check that dash and the parenthesis can be
>>> used
>>> in file names on all relevant filesystems (you could even make the
>>> markers
>>> configurable I suppose in Application#init and/or using system 
>>> properties
>>> ...). Of course it's not pretty; at the end of the day, your stuck with
>>> character strings so you can't stop people confusing themselves (and
>>> maybe
>>> Wicket too) with funky file names using these "special" characters.
>>>
>>> The javadoc says: Whereas Styles are Session (user) specific, variations
>>> are
>>> component specific. E.g. if the Style is "ocean" and the Variation is
>>> "NorthSea", than the resources are given the names suffixed with
>>> "_ocean_NorthSea".
>>>
>>> Is there a standard use-case where the solution involves using variation
>>> (that's in keeping with the original intent)?
>>>
>>> Regards - Cemal
>>> http://jWeekend.com jWeekend
>>>
>>>
>>> igor.vaynberg wrote:

 y

Re: Question re: style and variation

2009-03-03 Thread Anton Veretennikov
per each component?

On Wed, Mar 4, 2009 at 11:52 AM, Igor Vaynberg  wrote:
> we cannot make this overridable because it breaks encapsulation.
>
> imagine you write a table component that includes styles and
> variations. i then want to use it in my app where i have overwritten
> this syntax, now my app wont pick up your styles and variations.
>
> so we need to come up with something simple that everyone can agree on.
>
> -igor
>
> On Tue, Mar 3, 2009 at 8:48 PM, Anton Veretennikov
>  wrote:
>> String getFileNameTemplate() {
>>  return 
>> "fileName([styleName][_variationName])[language[_territory][.codese...@modifier]]";
>> }
>>
>>
>> On Wed, Mar 4, 2009 at 11:47 AM, Igor Vaynberg  
>> wrote:
>>> but there is a special rule about the _ prefix to indicate a
>>> variation, where as a simple empty bracket is easy - its always
>>> consistent [style][variation][locale]. just my two cents.
>>>
>>> personally i never had to use variations myself, but there were
>>> threads in the past about them, so i guess someone somewhere is using
>>> them.
>>>
>>> -igor
>>>
>>> On Tue, Mar 3, 2009 at 8:44 PM, jWeekend  
>>> wrote:

 Igor,

 I'd say your

 "HomePage[style_variation]_US_en.html that way a style only version can be
 HomePage[style]_US_en.html and variation only would be
 HomePage[_variation]_US_en.html we can then forbid the use of _ in style 
 and
 variation names. "

 is the best option (so far). There are no special rules or empty brakets
 unless you choose to use Wicket specific features (style and variation).
 And, it somehow looks less ugly than some of the other suggestions,
 especially mine!

 Thanks for the example use-case; I expect someone, somewhere out there is
 making good use of "variations".

 Regards - Cemal
 http://jWeekend.com jWeekend




 igor.vaynberg wrote:
>
> i dont like the fact that there is now a -, (, ), and _ in the name
>
> i can live with something like HomePage()(variation)_US_en.html vs
>
> HomePage()(variation)(US_en)
>
> maybe even simpler would be do
>
> HomePage[style_variation]_US_en.html
>
> that way a style only version can be HomePage[style]_US_en.html
>
> and variation only would be HomePage[_variation]_US_en.html
>
> we can then forbid the use of _ in style and variation names.
>
> its a little more complex but avoids an empty [] or () to indicate
> variation only markup.
>
> I still think that HomePage[][variation][US_en].html does look cleaner
> and simpler then
>
> HomePage[][variation]_US_en.html or HomePage[_variation]_US_en.html
>
> because in HomePage[][variation][US_en] you only have to know [] as
> separators.
>
>
> the usecases for variations vary. suppose your application is divided
> in two frames and the user can select the color scheme for both.
> having a single value for style wont work here, it has to be per
> component.
>
> -igor
>
> On Tue, Mar 3, 2009 at 7:18 PM, jWeekend 
> wrote:
>>
>> Igor,
>>
>> In Java, variant is the least significant component(s) of a locale:
>> lang_COUNTRY_variant  .
>>
>> Wicket adds style and variation (right?) so maybe only these components
>> of
>> the filename should have a special marker. That way, some level of
>> consistentcy is maintained and the Wicket specific style & variation are
>> clearly identifiable.
>> So, for example, HomePage-aStyle(aVariation)_th_TH_TH.html   - in this
>> example you'd need to double check that dash and the parenthesis can be
>> used
>> in file names on all relevant filesystems (you could even make the
>> markers
>> configurable I suppose in Application#init and/or using system properties
>> ...). Of course it's not pretty; at the end of the day, your stuck with
>> character strings so you can't stop people confusing themselves (and
>> maybe
>> Wicket too) with funky file names using these "special" characters.
>>
>> The javadoc says: Whereas Styles are Session (user) specific, variations
>> are
>> component specific. E.g. if the Style is "ocean" and the Variation is
>> "NorthSea", than the resources are given the names suffixed with
>> "_ocean_NorthSea".
>>
>> Is there a standard use-case where the solution involves using variation
>> (that's in keeping with the original intent)?
>>
>> Regards - Cemal
>> http://jWeekend.com jWeekend
>>
>>
>> igor.vaynberg wrote:
>>>
>>> yeah, not to mention it might get quiet ugly
>>>
>>> mypanel_style.html
>>> mypanel_style__variant.html
>>> mypanel_style__variant___locale.html
>>>
>>> mypanel__variant.html
>>>
>>> mypanel___locale.html
>>>
>>> markup(locale)(style)(variant) might work and is simpler
>>>
>>

Re: Non-serializable model objects

2009-03-03 Thread Chris Hansen
Makes sense, and thanks for the quick replies.

The situation that I'm dealing with most commonly is where I'm dealing
with simple, DTO-like POJOS with no-arg constructors and
getters/setters (why they are not serializable in the first place is
beyond me). It just seems like it would be possible, in this simple
case, to create a proxy for each object in the object graph which is
not serializable until you get down to the actual data (i.e.
primitives, Strings, etc.) which is serializable. The proxies would
have to keep track of whatever information they need to de-serialize
themselves (e.g. class name and constructor). It seems like this has
not been implemented, but do you think it is possible to do so?

-Chris

On Tue, Mar 3, 2009 at 9:43 PM, Igor Vaynberg  wrote:
> objects you put into the model are stored in components, which are in
> turn stored in httpsession and are serialized to disk. in order to be
> serialized to disk or to be stored in httpsession (per servlet spec)
> those objects must be serializable.
>
> if your object is not serializable and all you do is wrap it in a
> serializable proxy this will not help you much when it comes to dump
> the page to disk.
>
> what is happening in wicket-guice and wicket-spring is that only
> references you get from your  container are held us serializable
> proxies. this works because when it comes time to serialize the
> component these values can be discarded because they can be later
> looked up from the container again. but if your value is not
> discardable this approach wont work.
>
> makes sense?
>
> -igor
>
> On Tue, Mar 3, 2009 at 8:36 PM, Chris Hansen  wrote:
>> Hi all,
>>
>> First off, I'm new to Wicket and I have to say I'm really liking it so far.
>>
>> One concern I have is related to using non-serializable objects. If
>> I'm not mistaken, some other web frameworks will create dynamic,
>> serializable proxies for your non-serializable objects automatically,
>> when possible. I saw that this type of functionality is used in
>> Wicket's Guice integration, but I am wondering why it isn't a part of
>> Wicket proper. Using serializable model objects seems like a fine
>> goal, but what if those model objects are in a library which is not
>> under our control and they happen to not be serializable?
>>
>> There must be downsides to the proxy approach that I'm not aware of,
>> or an easier way to work with non-serializable model objects. Am I
>> missing something?
>>
>> Thanks,
>> Chris
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

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



Re: Question re: style and variation

2009-03-03 Thread Igor Vaynberg
we cannot make this overridable because it breaks encapsulation.

imagine you write a table component that includes styles and
variations. i then want to use it in my app where i have overwritten
this syntax, now my app wont pick up your styles and variations.

so we need to come up with something simple that everyone can agree on.

-igor

On Tue, Mar 3, 2009 at 8:48 PM, Anton Veretennikov
 wrote:
> String getFileNameTemplate() {
>  return 
> "fileName([styleName][_variationName])[language[_territory][.codese...@modifier]]";
> }
>
>
> On Wed, Mar 4, 2009 at 11:47 AM, Igor Vaynberg  
> wrote:
>> but there is a special rule about the _ prefix to indicate a
>> variation, where as a simple empty bracket is easy - its always
>> consistent [style][variation][locale]. just my two cents.
>>
>> personally i never had to use variations myself, but there were
>> threads in the past about them, so i guess someone somewhere is using
>> them.
>>
>> -igor
>>
>> On Tue, Mar 3, 2009 at 8:44 PM, jWeekend  wrote:
>>>
>>> Igor,
>>>
>>> I'd say your
>>>
>>> "HomePage[style_variation]_US_en.html that way a style only version can be
>>> HomePage[style]_US_en.html and variation only would be
>>> HomePage[_variation]_US_en.html we can then forbid the use of _ in style and
>>> variation names. "
>>>
>>> is the best option (so far). There are no special rules or empty brakets
>>> unless you choose to use Wicket specific features (style and variation).
>>> And, it somehow looks less ugly than some of the other suggestions,
>>> especially mine!
>>>
>>> Thanks for the example use-case; I expect someone, somewhere out there is
>>> making good use of "variations".
>>>
>>> Regards - Cemal
>>> http://jWeekend.com jWeekend
>>>
>>>
>>>
>>>
>>> igor.vaynberg wrote:

 i dont like the fact that there is now a -, (, ), and _ in the name

 i can live with something like HomePage()(variation)_US_en.html vs

 HomePage()(variation)(US_en)

 maybe even simpler would be do

 HomePage[style_variation]_US_en.html

 that way a style only version can be HomePage[style]_US_en.html

 and variation only would be HomePage[_variation]_US_en.html

 we can then forbid the use of _ in style and variation names.

 its a little more complex but avoids an empty [] or () to indicate
 variation only markup.

 I still think that HomePage[][variation][US_en].html does look cleaner
 and simpler then

 HomePage[][variation]_US_en.html or HomePage[_variation]_US_en.html

 because in HomePage[][variation][US_en] you only have to know [] as
 separators.


 the usecases for variations vary. suppose your application is divided
 in two frames and the user can select the color scheme for both.
 having a single value for style wont work here, it has to be per
 component.

 -igor

 On Tue, Mar 3, 2009 at 7:18 PM, jWeekend 
 wrote:
>
> Igor,
>
> In Java, variant is the least significant component(s) of a locale:
> lang_COUNTRY_variant  .
>
> Wicket adds style and variation (right?) so maybe only these components
> of
> the filename should have a special marker. That way, some level of
> consistentcy is maintained and the Wicket specific style & variation are
> clearly identifiable.
> So, for example, HomePage-aStyle(aVariation)_th_TH_TH.html   - in this
> example you'd need to double check that dash and the parenthesis can be
> used
> in file names on all relevant filesystems (you could even make the
> markers
> configurable I suppose in Application#init and/or using system properties
> ...). Of course it's not pretty; at the end of the day, your stuck with
> character strings so you can't stop people confusing themselves (and
> maybe
> Wicket too) with funky file names using these "special" characters.
>
> The javadoc says: Whereas Styles are Session (user) specific, variations
> are
> component specific. E.g. if the Style is "ocean" and the Variation is
> "NorthSea", than the resources are given the names suffixed with
> "_ocean_NorthSea".
>
> Is there a standard use-case where the solution involves using variation
> (that's in keeping with the original intent)?
>
> Regards - Cemal
> http://jWeekend.com jWeekend
>
>
> igor.vaynberg wrote:
>>
>> yeah, not to mention it might get quiet ugly
>>
>> mypanel_style.html
>> mypanel_style__variant.html
>> mypanel_style__variant___locale.html
>>
>> mypanel__variant.html
>>
>> mypanel___locale.html
>>
>> markup(locale)(style)(variant) might work and is simpler
>>
>> mypanel(en_us).html
>>
>> mypanel(en_us)()(variant).html
>>
>> but sure looks ugly... :)
>>
>> not sure which one is better
>>
>> -igor
>>
>>
>> On Mon, Mar 2, 2009 at 11:30 PM, Ned Collyer

Re: Question re: style and variation

2009-03-03 Thread Anton Veretennikov
String getFileNameTemplate() {
  return 
"fileName([styleName][_variationName])[language[_territory][.codese...@modifier]]";
}


On Wed, Mar 4, 2009 at 11:47 AM, Igor Vaynberg  wrote:
> but there is a special rule about the _ prefix to indicate a
> variation, where as a simple empty bracket is easy - its always
> consistent [style][variation][locale]. just my two cents.
>
> personally i never had to use variations myself, but there were
> threads in the past about them, so i guess someone somewhere is using
> them.
>
> -igor
>
> On Tue, Mar 3, 2009 at 8:44 PM, jWeekend  wrote:
>>
>> Igor,
>>
>> I'd say your
>>
>> "HomePage[style_variation]_US_en.html that way a style only version can be
>> HomePage[style]_US_en.html and variation only would be
>> HomePage[_variation]_US_en.html we can then forbid the use of _ in style and
>> variation names. "
>>
>> is the best option (so far). There are no special rules or empty brakets
>> unless you choose to use Wicket specific features (style and variation).
>> And, it somehow looks less ugly than some of the other suggestions,
>> especially mine!
>>
>> Thanks for the example use-case; I expect someone, somewhere out there is
>> making good use of "variations".
>>
>> Regards - Cemal
>> http://jWeekend.com jWeekend
>>
>>
>>
>>
>> igor.vaynberg wrote:
>>>
>>> i dont like the fact that there is now a -, (, ), and _ in the name
>>>
>>> i can live with something like HomePage()(variation)_US_en.html vs
>>>
>>> HomePage()(variation)(US_en)
>>>
>>> maybe even simpler would be do
>>>
>>> HomePage[style_variation]_US_en.html
>>>
>>> that way a style only version can be HomePage[style]_US_en.html
>>>
>>> and variation only would be HomePage[_variation]_US_en.html
>>>
>>> we can then forbid the use of _ in style and variation names.
>>>
>>> its a little more complex but avoids an empty [] or () to indicate
>>> variation only markup.
>>>
>>> I still think that HomePage[][variation][US_en].html does look cleaner
>>> and simpler then
>>>
>>> HomePage[][variation]_US_en.html or HomePage[_variation]_US_en.html
>>>
>>> because in HomePage[][variation][US_en] you only have to know [] as
>>> separators.
>>>
>>>
>>> the usecases for variations vary. suppose your application is divided
>>> in two frames and the user can select the color scheme for both.
>>> having a single value for style wont work here, it has to be per
>>> component.
>>>
>>> -igor
>>>
>>> On Tue, Mar 3, 2009 at 7:18 PM, jWeekend 
>>> wrote:

 Igor,

 In Java, variant is the least significant component(s) of a locale:
 lang_COUNTRY_variant  .

 Wicket adds style and variation (right?) so maybe only these components
 of
 the filename should have a special marker. That way, some level of
 consistentcy is maintained and the Wicket specific style & variation are
 clearly identifiable.
 So, for example, HomePage-aStyle(aVariation)_th_TH_TH.html   - in this
 example you'd need to double check that dash and the parenthesis can be
 used
 in file names on all relevant filesystems (you could even make the
 markers
 configurable I suppose in Application#init and/or using system properties
 ...). Of course it's not pretty; at the end of the day, your stuck with
 character strings so you can't stop people confusing themselves (and
 maybe
 Wicket too) with funky file names using these "special" characters.

 The javadoc says: Whereas Styles are Session (user) specific, variations
 are
 component specific. E.g. if the Style is "ocean" and the Variation is
 "NorthSea", than the resources are given the names suffixed with
 "_ocean_NorthSea".

 Is there a standard use-case where the solution involves using variation
 (that's in keeping with the original intent)?

 Regards - Cemal
 http://jWeekend.com jWeekend


 igor.vaynberg wrote:
>
> yeah, not to mention it might get quiet ugly
>
> mypanel_style.html
> mypanel_style__variant.html
> mypanel_style__variant___locale.html
>
> mypanel__variant.html
>
> mypanel___locale.html
>
> markup(locale)(style)(variant) might work and is simpler
>
> mypanel(en_us).html
>
> mypanel(en_us)()(variant).html
>
> but sure looks ugly... :)
>
> not sure which one is better
>
> -igor
>
>
> On Mon, Mar 2, 2009 at 11:30 PM, Ned Collyer 
> wrote:
>>
>> Yep :).
>>
>> I at least 1 thought on this matter.
>>
>> Currently, I have a "webapp" module - which will have my components in
>> it,
>> and my components variants.
>>
>> I have pushed all i18n into properties files - which is working thus
>> far.
>>
>> I allow the clients to customise their HTML from another folder - ie,
>> someplace on the filesystem outside of the war.
>>
>> The lookup for html files for me .. should be
>>
>> custom dir - myPanel_my

Re: Question re: style and variation

2009-03-03 Thread Igor Vaynberg
but there is a special rule about the _ prefix to indicate a
variation, where as a simple empty bracket is easy - its always
consistent [style][variation][locale]. just my two cents.

personally i never had to use variations myself, but there were
threads in the past about them, so i guess someone somewhere is using
them.

-igor

On Tue, Mar 3, 2009 at 8:44 PM, jWeekend  wrote:
>
> Igor,
>
> I'd say your
>
> "HomePage[style_variation]_US_en.html that way a style only version can be
> HomePage[style]_US_en.html and variation only would be
> HomePage[_variation]_US_en.html we can then forbid the use of _ in style and
> variation names. "
>
> is the best option (so far). There are no special rules or empty brakets
> unless you choose to use Wicket specific features (style and variation).
> And, it somehow looks less ugly than some of the other suggestions,
> especially mine!
>
> Thanks for the example use-case; I expect someone, somewhere out there is
> making good use of "variations".
>
> Regards - Cemal
> http://jWeekend.com jWeekend
>
>
>
>
> igor.vaynberg wrote:
>>
>> i dont like the fact that there is now a -, (, ), and _ in the name
>>
>> i can live with something like HomePage()(variation)_US_en.html vs
>>
>> HomePage()(variation)(US_en)
>>
>> maybe even simpler would be do
>>
>> HomePage[style_variation]_US_en.html
>>
>> that way a style only version can be HomePage[style]_US_en.html
>>
>> and variation only would be HomePage[_variation]_US_en.html
>>
>> we can then forbid the use of _ in style and variation names.
>>
>> its a little more complex but avoids an empty [] or () to indicate
>> variation only markup.
>>
>> I still think that HomePage[][variation][US_en].html does look cleaner
>> and simpler then
>>
>> HomePage[][variation]_US_en.html or HomePage[_variation]_US_en.html
>>
>> because in HomePage[][variation][US_en] you only have to know [] as
>> separators.
>>
>>
>> the usecases for variations vary. suppose your application is divided
>> in two frames and the user can select the color scheme for both.
>> having a single value for style wont work here, it has to be per
>> component.
>>
>> -igor
>>
>> On Tue, Mar 3, 2009 at 7:18 PM, jWeekend 
>> wrote:
>>>
>>> Igor,
>>>
>>> In Java, variant is the least significant component(s) of a locale:
>>> lang_COUNTRY_variant  .
>>>
>>> Wicket adds style and variation (right?) so maybe only these components
>>> of
>>> the filename should have a special marker. That way, some level of
>>> consistentcy is maintained and the Wicket specific style & variation are
>>> clearly identifiable.
>>> So, for example, HomePage-aStyle(aVariation)_th_TH_TH.html   - in this
>>> example you'd need to double check that dash and the parenthesis can be
>>> used
>>> in file names on all relevant filesystems (you could even make the
>>> markers
>>> configurable I suppose in Application#init and/or using system properties
>>> ...). Of course it's not pretty; at the end of the day, your stuck with
>>> character strings so you can't stop people confusing themselves (and
>>> maybe
>>> Wicket too) with funky file names using these "special" characters.
>>>
>>> The javadoc says: Whereas Styles are Session (user) specific, variations
>>> are
>>> component specific. E.g. if the Style is "ocean" and the Variation is
>>> "NorthSea", than the resources are given the names suffixed with
>>> "_ocean_NorthSea".
>>>
>>> Is there a standard use-case where the solution involves using variation
>>> (that's in keeping with the original intent)?
>>>
>>> Regards - Cemal
>>> http://jWeekend.com jWeekend
>>>
>>>
>>> igor.vaynberg wrote:

 yeah, not to mention it might get quiet ugly

 mypanel_style.html
 mypanel_style__variant.html
 mypanel_style__variant___locale.html

 mypanel__variant.html

 mypanel___locale.html

 markup(locale)(style)(variant) might work and is simpler

 mypanel(en_us).html

 mypanel(en_us)()(variant).html

 but sure looks ugly... :)

 not sure which one is better

 -igor


 On Mon, Mar 2, 2009 at 11:30 PM, Ned Collyer 
 wrote:
>
> Yep :).
>
> I at least 1 thought on this matter.
>
> Currently, I have a "webapp" module - which will have my components in
> it,
> and my components variants.
>
> I have pushed all i18n into properties files - which is working thus
> far.
>
> I allow the clients to customise their HTML from another folder - ie,
> someplace on the filesystem outside of the war.
>
> The lookup for html files for me .. should be
>
> custom dir - myPanel_myVariant_myStyle.html
> webapp.war - myPanel_myVariant_myStyle.html
> custom dir - myPanel_myVariant.html
> webapp.war - myPanel_myVariant.html
> custom dir - myPanel_myStyle.html
> webapp.war - myPanel_myStyle.html
> custom dir - myPanel.html
> webapp.war - myPanel.html
>
> I have a similar thing in place for

Re: Question re: style and variation

2009-03-03 Thread jWeekend

Igor,

I'd say your 

"HomePage[style_variation]_US_en.html that way a style only version can be
HomePage[style]_US_en.html and variation only would be
HomePage[_variation]_US_en.html we can then forbid the use of _ in style and
variation names. "

is the best option (so far). There are no special rules or empty brakets
unless you choose to use Wicket specific features (style and variation).
And, it somehow looks less ugly than some of the other suggestions,
especially mine!

Thanks for the example use-case; I expect someone, somewhere out there is
making good use of "variations".

Regards - Cemal
http://jWeekend.com jWeekend 




igor.vaynberg wrote:
> 
> i dont like the fact that there is now a -, (, ), and _ in the name
> 
> i can live with something like HomePage()(variation)_US_en.html vs
> 
> HomePage()(variation)(US_en)
> 
> maybe even simpler would be do
> 
> HomePage[style_variation]_US_en.html
> 
> that way a style only version can be HomePage[style]_US_en.html
> 
> and variation only would be HomePage[_variation]_US_en.html
> 
> we can then forbid the use of _ in style and variation names.
> 
> its a little more complex but avoids an empty [] or () to indicate
> variation only markup.
> 
> I still think that HomePage[][variation][US_en].html does look cleaner
> and simpler then
> 
> HomePage[][variation]_US_en.html or HomePage[_variation]_US_en.html
> 
> because in HomePage[][variation][US_en] you only have to know [] as
> separators.
> 
> 
> the usecases for variations vary. suppose your application is divided
> in two frames and the user can select the color scheme for both.
> having a single value for style wont work here, it has to be per
> component.
> 
> -igor
> 
> On Tue, Mar 3, 2009 at 7:18 PM, jWeekend 
> wrote:
>>
>> Igor,
>>
>> In Java, variant is the least significant component(s) of a locale:
>> lang_COUNTRY_variant  .
>>
>> Wicket adds style and variation (right?) so maybe only these components
>> of
>> the filename should have a special marker. That way, some level of
>> consistentcy is maintained and the Wicket specific style & variation are
>> clearly identifiable.
>> So, for example, HomePage-aStyle(aVariation)_th_TH_TH.html   - in this
>> example you'd need to double check that dash and the parenthesis can be
>> used
>> in file names on all relevant filesystems (you could even make the
>> markers
>> configurable I suppose in Application#init and/or using system properties
>> ...). Of course it's not pretty; at the end of the day, your stuck with
>> character strings so you can't stop people confusing themselves (and
>> maybe
>> Wicket too) with funky file names using these "special" characters.
>>
>> The javadoc says: Whereas Styles are Session (user) specific, variations
>> are
>> component specific. E.g. if the Style is "ocean" and the Variation is
>> "NorthSea", than the resources are given the names suffixed with
>> "_ocean_NorthSea".
>>
>> Is there a standard use-case where the solution involves using variation
>> (that's in keeping with the original intent)?
>>
>> Regards - Cemal
>> http://jWeekend.com jWeekend
>>
>>
>> igor.vaynberg wrote:
>>>
>>> yeah, not to mention it might get quiet ugly
>>>
>>> mypanel_style.html
>>> mypanel_style__variant.html
>>> mypanel_style__variant___locale.html
>>>
>>> mypanel__variant.html
>>>
>>> mypanel___locale.html
>>>
>>> markup(locale)(style)(variant) might work and is simpler
>>>
>>> mypanel(en_us).html
>>>
>>> mypanel(en_us)()(variant).html
>>>
>>> but sure looks ugly... :)
>>>
>>> not sure which one is better
>>>
>>> -igor
>>>
>>>
>>> On Mon, Mar 2, 2009 at 11:30 PM, Ned Collyer 
>>> wrote:

 Yep :).

 I at least 1 thought on this matter.

 Currently, I have a "webapp" module - which will have my components in
 it,
 and my components variants.

 I have pushed all i18n into properties files - which is working thus
 far.

 I allow the clients to customise their HTML from another folder - ie,
 someplace on the filesystem outside of the war.

 The lookup for html files for me .. should be

 custom dir - myPanel_myVariant_myStyle.html
 webapp.war - myPanel_myVariant_myStyle.html
 custom dir - myPanel_myVariant.html
 webapp.war - myPanel_myVariant.html
 custom dir - myPanel_myStyle.html
 webapp.war - myPanel_myStyle.html
 custom dir - myPanel.html
 webapp.war - myPanel.html

 I have a similar thing in place for properties files - and the result
 is
 actually a merge of the properties between filesystem and classpath.

 So many ways to skin a cat.  If only we could skin this cat with
 locale,
 style AND variant - each optional.

 More static count of delimiters? Folder structure? Different
 delimiters?
 Different data in filename? Contents of file?

 The balancing act is keeping it simple - which its currently nailed,
 but
 not
 quite as useful as it could be!!!



Re: Non-serializable model objects

2009-03-03 Thread Chris Hansen
I'm familiar with that approach, but it seems a bit cumbersome -
especially for collections of non-serializable objects. I was hoping
there was some other way.

-Chris

On Tue, Mar 3, 2009 at 9:41 PM, Jeremy Thomerson
 wrote:
> Use a LoadableDetachableModel that can re-inflate / re-retrieve your
> serializable object.  It may only need to store something like a class name
> and an integer ID, etc.  This keeps session state small as well.
> Serialization of all models allows for easier clustering when your site
> becomes the next Twitter.
>
> --
> Jeremy Thomerson
> http://www.wickettraining.com
>
>
> On Tue, Mar 3, 2009 at 10:36 PM, Chris Hansen wrote:
>
>> Hi all,
>>
>> First off, I'm new to Wicket and I have to say I'm really liking it so far.
>>
>> One concern I have is related to using non-serializable objects. If
>> I'm not mistaken, some other web frameworks will create dynamic,
>> serializable proxies for your non-serializable objects automatically,
>> when possible. I saw that this type of functionality is used in
>> Wicket's Guice integration, but I am wondering why it isn't a part of
>> Wicket proper. Using serializable model objects seems like a fine
>> goal, but what if those model objects are in a library which is not
>> under our control and they happen to not be serializable?
>>
>> There must be downsides to the proxy approach that I'm not aware of,
>> or an easier way to work with non-serializable model objects. Am I
>> missing something?
>>
>> Thanks,
>> Chris
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>

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



Re: Non-serializable model objects

2009-03-03 Thread Igor Vaynberg
objects you put into the model are stored in components, which are in
turn stored in httpsession and are serialized to disk. in order to be
serialized to disk or to be stored in httpsession (per servlet spec)
those objects must be serializable.

if your object is not serializable and all you do is wrap it in a
serializable proxy this will not help you much when it comes to dump
the page to disk.

what is happening in wicket-guice and wicket-spring is that only
references you get from your  container are held us serializable
proxies. this works because when it comes time to serialize the
component these values can be discarded because they can be later
looked up from the container again. but if your value is not
discardable this approach wont work.

makes sense?

-igor

On Tue, Mar 3, 2009 at 8:36 PM, Chris Hansen  wrote:
> Hi all,
>
> First off, I'm new to Wicket and I have to say I'm really liking it so far.
>
> One concern I have is related to using non-serializable objects. If
> I'm not mistaken, some other web frameworks will create dynamic,
> serializable proxies for your non-serializable objects automatically,
> when possible. I saw that this type of functionality is used in
> Wicket's Guice integration, but I am wondering why it isn't a part of
> Wicket proper. Using serializable model objects seems like a fine
> goal, but what if those model objects are in a library which is not
> under our control and they happen to not be serializable?
>
> There must be downsides to the proxy approach that I'm not aware of,
> or an easier way to work with non-serializable model objects. Am I
> missing something?
>
> Thanks,
> Chris
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

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



Re: Non-serializable model objects

2009-03-03 Thread Jeremy Thomerson
Use a LoadableDetachableModel that can re-inflate / re-retrieve your
serializable object.  It may only need to store something like a class name
and an integer ID, etc.  This keeps session state small as well.
Serialization of all models allows for easier clustering when your site
becomes the next Twitter.

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


On Tue, Mar 3, 2009 at 10:36 PM, Chris Hansen wrote:

> Hi all,
>
> First off, I'm new to Wicket and I have to say I'm really liking it so far.
>
> One concern I have is related to using non-serializable objects. If
> I'm not mistaken, some other web frameworks will create dynamic,
> serializable proxies for your non-serializable objects automatically,
> when possible. I saw that this type of functionality is used in
> Wicket's Guice integration, but I am wondering why it isn't a part of
> Wicket proper. Using serializable model objects seems like a fine
> goal, but what if those model objects are in a library which is not
> under our control and they happen to not be serializable?
>
> There must be downsides to the proxy approach that I'm not aware of,
> or an easier way to work with non-serializable model objects. Am I
> missing something?
>
> Thanks,
> Chris
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Non-serializable model objects

2009-03-03 Thread Chris Hansen
Hi all,

First off, I'm new to Wicket and I have to say I'm really liking it so far.

One concern I have is related to using non-serializable objects. If
I'm not mistaken, some other web frameworks will create dynamic,
serializable proxies for your non-serializable objects automatically,
when possible. I saw that this type of functionality is used in
Wicket's Guice integration, but I am wondering why it isn't a part of
Wicket proper. Using serializable model objects seems like a fine
goal, but what if those model objects are in a library which is not
under our control and they happen to not be serializable?

There must be downsides to the proxy approach that I'm not aware of,
or an easier way to work with non-serializable model objects. Am I
missing something?

Thanks,
Chris

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



Re: Question re: style and variation

2009-03-03 Thread Igor Vaynberg
i dont like the fact that there is now a -, (, ), and _ in the name

i can live with something like HomePage()(variation)_US_en.html vs

HomePage()(variation)(US_en)

maybe even simpler would be do

HomePage[style_variation]_US_en.html

that way a style only version can be HomePage[style]_US_en.html

and variation only would be HomePage[_variation]_US_en.html

we can then forbid the use of _ in style and variation names.

its a little more complex but avoids an empty [] or () to indicate
variation only markup.

I still think that HomePage[][variation][US_en].html does look cleaner
and simpler then

HomePage[][variation]_US_en.html or HomePage[_variation]_US_en.html

because in HomePage[][variation][US_en] you only have to know [] as separators.


the usecases for variations vary. suppose your application is divided
in two frames and the user can select the color scheme for both.
having a single value for style wont work here, it has to be per
component.

-igor

On Tue, Mar 3, 2009 at 7:18 PM, jWeekend  wrote:
>
> Igor,
>
> In Java, variant is the least significant component(s) of a locale:
> lang_COUNTRY_variant  .
>
> Wicket adds style and variation (right?) so maybe only these components of
> the filename should have a special marker. That way, some level of
> consistentcy is maintained and the Wicket specific style & variation are
> clearly identifiable.
> So, for example, HomePage-aStyle(aVariation)_th_TH_TH.html   - in this
> example you'd need to double check that dash and the parenthesis can be used
> in file names on all relevant filesystems (you could even make the markers
> configurable I suppose in Application#init and/or using system properties
> ...). Of course it's not pretty; at the end of the day, your stuck with
> character strings so you can't stop people confusing themselves (and maybe
> Wicket too) with funky file names using these "special" characters.
>
> The javadoc says: Whereas Styles are Session (user) specific, variations are
> component specific. E.g. if the Style is "ocean" and the Variation is
> "NorthSea", than the resources are given the names suffixed with
> "_ocean_NorthSea".
>
> Is there a standard use-case where the solution involves using variation
> (that's in keeping with the original intent)?
>
> Regards - Cemal
> http://jWeekend.com jWeekend
>
>
> igor.vaynberg wrote:
>>
>> yeah, not to mention it might get quiet ugly
>>
>> mypanel_style.html
>> mypanel_style__variant.html
>> mypanel_style__variant___locale.html
>>
>> mypanel__variant.html
>>
>> mypanel___locale.html
>>
>> markup(locale)(style)(variant) might work and is simpler
>>
>> mypanel(en_us).html
>>
>> mypanel(en_us)()(variant).html
>>
>> but sure looks ugly... :)
>>
>> not sure which one is better
>>
>> -igor
>>
>>
>> On Mon, Mar 2, 2009 at 11:30 PM, Ned Collyer 
>> wrote:
>>>
>>> Yep :).
>>>
>>> I at least 1 thought on this matter.
>>>
>>> Currently, I have a "webapp" module - which will have my components in
>>> it,
>>> and my components variants.
>>>
>>> I have pushed all i18n into properties files - which is working thus far.
>>>
>>> I allow the clients to customise their HTML from another folder - ie,
>>> someplace on the filesystem outside of the war.
>>>
>>> The lookup for html files for me .. should be
>>>
>>> custom dir - myPanel_myVariant_myStyle.html
>>> webapp.war - myPanel_myVariant_myStyle.html
>>> custom dir - myPanel_myVariant.html
>>> webapp.war - myPanel_myVariant.html
>>> custom dir - myPanel_myStyle.html
>>> webapp.war - myPanel_myStyle.html
>>> custom dir - myPanel.html
>>> webapp.war - myPanel.html
>>>
>>> I have a similar thing in place for properties files - and the result is
>>> actually a merge of the properties between filesystem and classpath.
>>>
>>> So many ways to skin a cat.  If only we could skin this cat with locale,
>>> style AND variant - each optional.
>>>
>>> More static count of delimiters? Folder structure? Different delimiters?
>>> Different data in filename? Contents of file?
>>>
>>> The balancing act is keeping it simple - which its currently nailed, but
>>> not
>>> quite as useful as it could be!!!
>>>
>>>
>>> igor.vaynberg wrote:

 the problem is, if you have MyPanel_foo.html, is foo the style, the
 variation, or the locale?

 perhaps we can identify the parts differently...needs some thinking.

 -igor

>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Question-re%3A-style-and-variation-tp22302526p22303708.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: Trying to stay stateless but having some issues

2009-03-03 Thread Jeremy Thomerson
The continuation URL looks to only be stored if you arrived at the page by a
call to PageMap#redirectToInterceptPage, which is called by
RestartResponseAtInterceptPage exception.  It's also stored in the session
(or rather, the PageMap, which is stored in the session).  So, yes, you
would need a session to store that info into.

A suggestion might be to add the return URL to the sign in form as a hidden
field, which you could redirect to in your onSubmit by throwing new
RedirectException(urlFromForm).  That doesn't sound like the cleanest
solution.  I'd have to think more to come up with something else.

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

On Tue, Mar 3, 2009 at 9:44 PM, Matt Welch  wrote:

>
> I'm trying to keep my app stateless wherever possible, especially on the
> pages that serve merely as an introduction to the app but have no heavy
> dynamic functionality.
>
> On many of these pages I have a sing-in panel. This sign-in panel contains
> a
> stateless username/password form. The onSubmit of the stateless form looks
> like this:
>
>
>@Override
>protected void onSubmit() {
>if (GVWebSession.get().authenticate(username, password)) {
>if (!continueToOriginalDestination()){
>setResponsePage(getPage().getPageClass());
>}
>} else {
>error(getLocalizer().getString("signin.failed",
> this));
>}
>}
>
>
> This doesn't seem to work. The behavior I want pretty common. I want the
> same page displayed, but now with the user logged in and the sign-in form
> replaced with a "welcome " message or something like that. What
> actually
> occurs is (from the users' point of view) nothing. The page is redisplayed
> and the form comes back up. I can debug the form submission and I see that
> the users is being properly authenticated. I assume I'm doing something
> wrong with my setResponsePage() call. If I comment out that
> setResponsPage()
> call, the login works and the page is displayed correctly but I then have a
> long, ugly URL.
>
> I happen to go to a non-stateless page and a session is created, and then
> come back to a stateless page, this login procedure works correctly, so I
> assume that my problem has something to do with their not being a session
> created yet. That seems odd though, because one wouldn't think my situation
> would be that unusual.
>
> Any suggestions?
> --
> View this message in context:
> http://www.nabble.com/Trying-to-stay-stateless-but-having-some-issues-tp22323101p22323101.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
>
>


Trying to stay stateless but having some issues

2009-03-03 Thread Matt Welch

I'm trying to keep my app stateless wherever possible, especially on the
pages that serve merely as an introduction to the app but have no heavy
dynamic functionality.

On many of these pages I have a sing-in panel. This sign-in panel contains a
stateless username/password form. The onSubmit of the stateless form looks
like this:


@Override
protected void onSubmit() {
if (GVWebSession.get().authenticate(username, password)) {
if (!continueToOriginalDestination()){
setResponsePage(getPage().getPageClass());
}
} else {
error(getLocalizer().getString("signin.failed", this));
}
}


This doesn't seem to work. The behavior I want pretty common. I want the
same page displayed, but now with the user logged in and the sign-in form
replaced with a "welcome " message or something like that. What actually
occurs is (from the users' point of view) nothing. The page is redisplayed
and the form comes back up. I can debug the form submission and I see that
the users is being properly authenticated. I assume I'm doing something
wrong with my setResponsePage() call. If I comment out that setResponsPage()
call, the login works and the page is displayed correctly but I then have a
long, ugly URL. 

I happen to go to a non-stateless page and a session is created, and then
come back to a stateless page, this login procedure works correctly, so I
assume that my problem has something to do with their not being a session
created yet. That seems odd though, because one wouldn't think my situation
would be that unusual. 

Any suggestions?
-- 
View this message in context: 
http://www.nabble.com/Trying-to-stay-stateless-but-having-some-issues-tp22323101p22323101.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 - Session Management

2009-03-03 Thread Jeremy Thomerson
I'm not sure exactly what you're asking.  Is it one of the following?

- I have two apps in two JVMs - how do I transfer state from one app to the
second when clicking a link from one to the other?
- I have two apps in two JVMs - how do I expire state in the first when
moving to the second?

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


On Mon, Mar 2, 2009 at 7:26 AM, subbu_tce wrote:

>
> Hi,
>
> I have two wicket applications running in two different JVMs.
>
> If clicking on a link in the first wicket application that runs in the
> first
> JVM, is redirected to the second wicket application that runs in second
> JVM,
> What support does Wicket provide to manage the page map in the session for
> the first wicket application other than manually invalidating the objects
> in
> the session when redirected to the second wicket application?
>
> Moreover, I understand the state of all wicket components are maintained in
> the session. But does wicket provide any programmatic extension points to
> have the partially/fully managed on the client side?
>
> And also please help me point to good materials/articles on session
> management and custom session management in wicket.
>
> Thanks,
> Subbu.
> --
> View this message in context:
> http://www.nabble.com/Wicket---Session-Management-tp22288083p22288083.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 - Multi Instance Support

2009-03-03 Thread Jeremy Thomerson
No problem - glad I could help.  As a note for the future, you should always
reply back to the list when asking follow up questions rather than asking a
single person - you are far more likely to be successful in finding your
answer.

As regards multi window support - it's not completely fail safe because it
relies on JavaScript - see
http://fisheye6.atlassian.com/browse/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/WebPage.java?r=740481#l136

I'm not sure there's a way to handle multiple windows without javascript, so
I don't think you could ever have a 100% fail safe way of enabling automatic
multi window support.

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

On Tue, Mar 3, 2009 at 8:07 PM,  wrote:

> Hi Jeremy,
>
> Thanks for your reply.
> I read in the java docs that the method getAutomaticMultiWindowSupport() in
> the Application classis not completely fail safe.
> Do you have any idea whether this feature will be completely fail safe in
> the upcoming versions?
>
> And also i have asked a question with respect to state management in
> wicket. Please help me with if you have any answers on the same.
>
> Thanks,
> Subbu.
>
> Jeremy Thomerson-5 wrote:
> >
> > Multiple browser windows viewing the same application?  You can turn on
> > multi-window support in your application init method by adding:
> >
> > getPageMapSettings().setAutomaticMultiwindowSupport(true) - I think
> that's
> > the naming
> >
> > This uses different page maps for each window / tab that's open.
> >
> >
> >
> > --
> > Jeremy Thomerson
> > http://www.wickettraining.com
> >
> > On Sun, Mar 1, 2009 at 4:51 AM, subbu_tce
> > wrote:
> >
> >>
> >> Hi,
> >>
> >> Does wicket provide any support for multiple application instances per
> >> user's session?
> >>
> >> In other words, how does wicket handle multiple browser windows for the
> >> sample application.
> >>
> >> Thanks.
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/Wicket---Multi-Instance-Support-tp22271257p22271257.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
> >>
> >>
> >
> >
> Quoted from:
>
> http://www.nabble.com/Wicket---Multi-Instance-Support-tp22271257p22276418.html
>
>


Re: Question re: style and variation

2009-03-03 Thread jWeekend

Igor,

In Java, variant is the least significant component(s) of a locale:
lang_COUNTRY_variant  . 

Wicket adds style and variation (right?) so maybe only these components of
the filename should have a special marker. That way, some level of
consistentcy is maintained and the Wicket specific style & variation are
clearly identifiable.
So, for example, HomePage-aStyle(aVariation)_th_TH_TH.html   - in this
example you'd need to double check that dash and the parenthesis can be used
in file names on all relevant filesystems (you could even make the markers
configurable I suppose in Application#init and/or using system properties
...). Of course it's not pretty; at the end of the day, your stuck with
character strings so you can't stop people confusing themselves (and maybe
Wicket too) with funky file names using these "special" characters.

The javadoc says: Whereas Styles are Session (user) specific, variations are
component specific. E.g. if the Style is "ocean" and the Variation is
"NorthSea", than the resources are given the names suffixed with
"_ocean_NorthSea".

Is there a standard use-case where the solution involves using variation
(that's in keeping with the original intent)?

Regards - Cemal
http://jWeekend.com jWeekend 


igor.vaynberg wrote:
> 
> yeah, not to mention it might get quiet ugly
> 
> mypanel_style.html
> mypanel_style__variant.html
> mypanel_style__variant___locale.html
> 
> mypanel__variant.html
> 
> mypanel___locale.html
> 
> markup(locale)(style)(variant) might work and is simpler
> 
> mypanel(en_us).html
> 
> mypanel(en_us)()(variant).html
> 
> but sure looks ugly... :)
> 
> not sure which one is better
> 
> -igor
> 
> 
> On Mon, Mar 2, 2009 at 11:30 PM, Ned Collyer 
> wrote:
>>
>> Yep :).
>>
>> I at least 1 thought on this matter.
>>
>> Currently, I have a "webapp" module - which will have my components in
>> it,
>> and my components variants.
>>
>> I have pushed all i18n into properties files - which is working thus far.
>>
>> I allow the clients to customise their HTML from another folder - ie,
>> someplace on the filesystem outside of the war.
>>
>> The lookup for html files for me .. should be
>>
>> custom dir - myPanel_myVariant_myStyle.html
>> webapp.war - myPanel_myVariant_myStyle.html
>> custom dir - myPanel_myVariant.html
>> webapp.war - myPanel_myVariant.html
>> custom dir - myPanel_myStyle.html
>> webapp.war - myPanel_myStyle.html
>> custom dir - myPanel.html
>> webapp.war - myPanel.html
>>
>> I have a similar thing in place for properties files - and the result is
>> actually a merge of the properties between filesystem and classpath.
>>
>> So many ways to skin a cat.  If only we could skin this cat with locale,
>> style AND variant - each optional.
>>
>> More static count of delimiters? Folder structure? Different delimiters?
>> Different data in filename? Contents of file?
>>
>> The balancing act is keeping it simple - which its currently nailed, but
>> not
>> quite as useful as it could be!!!
>>
>>
>> igor.vaynberg wrote:
>>>
>>> the problem is, if you have MyPanel_foo.html, is foo the style, the
>>> variation, or the locale?
>>>
>>> perhaps we can identify the parts differently...needs some thinking.
>>>
>>> -igor
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Question-re%3A-style-and-variation-tp22302526p22303708.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
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Question-re%3A-style-and-variation-tp22302526p22322875.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: a bit of topic but i couldnt resist ....

2009-03-03 Thread jWeekend

Johan,

The question is phrased in such an ambiguous way that it's not even clear if
you're using Java!

If your col1 and set1 refer to the same object then your "foreach" is not
going to get very far (concurrent modification) so I'll assume thatcol1
!= set1  .

>From a non-functional perspective (acceptable performance, for instance), a
smart implementation of removeAll may loop around the smaller of the two
collections, unlike your "foreach". Now that may seem irrelevant, but if
col1 is a hashed (and well hashed) the removeAll may finish in an acceptable
timeframe if it is an optimised implementation whereas your for loop code
could go on for longer (potentially, unacceptably long).

Functionally,  the first problem you face is that both remove and removeAll
are "optional", so either one, or even both of your snippets may just throw
an exception at you. If they both throw the same  exception, I suppose you
may even argue that your 2 snippets are functionally the same for those
implementations of the two collections! If only one throws an
UnsupportedOperationException then they are not equivalent.

The question of the Set being sorted or not is also interesting, but may be
a red herring if remove and removeAll are implemented consistently (but they
may not be). If the elements of your collections are Comparables, then "it
is recommended but not strictly required" that (x.compareTo(y)==0) ==
(x.equals(y)). Comparator's compare method contract is similarly loose.
Put this in your test case:
public void testComparingEquals(){
BigDecimal onePointOh = new BigDecimal("1.0");
BigDecimal onePointOhOh = new BigDecimal("1.00");
assertEquals(0, onePointOh.compareTo(onePointOhOh));
assertFalse(onePointOh.equals(onePointOhOh));   
}
... yes, it passes!
That means that you could have elements of the same type in both your
collections and still get a different result from each of your two snippets
depending on the Comparator passed in to a sorted collection referred to by
set1.

I think there may be more stuff that can go wrong here, but let's see where
this thread heads off to!

Regards - Cemal
http://jWeekend.com jWeekend 




Johan Compagner wrote:
> 
> Is this the same?
> 
> Set set1 = xxx
> Collection col1 = xxx;
> 
> foreach (col in col1)
> set1.remove(col)
> 
> or
> 
> set1.removeAll(col1);
> 
> 
> ???
> 
> 

-- 
View this message in context: 
http://www.nabble.com/a-bit-of-topic-but-i-couldnt-resist--tp22319709p22321977.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: a bit of topic but i couldnt resist ....

2009-03-03 Thread Ryan McKinley


On Mar 3, 2009, at 6:19 PM, Johan Compagner wrote:


why should that matter?


I am not suggesting that it *should* -- only that experience tells me  
modifying the collection you are iterating over sometimes have funny  
results.


I agree that either choice should be equivalent.





I am taking here purely about interfaces.. So what should an  
implementation

matter?
So you are saying that we have to know the implementations of that  
inside

all my methods to know what really happens?

(this is pretty much my point i want to make)

lets make the set1 a TreeSet() and col1 a HashSet() 
and both have the same kind of objects



That should be fine, no?  In that case you are really talking about:

Set set1 = aaa;
Collection col1 = bbb;
...







On Wed, Mar 4, 2009 at 00:13, Ryan McKinley  wrote:


Is your 'xxx' the instance inn each case?

Depending on the implementation, removing from the thing you are  
iterating

over may cause some wierdness.



On Mar 3, 2009, at 5:44 PM, Johan Compagner wrote:

Is this the same?


Set set1 = xxx
Collection col1 = xxx;

foreach (col in col1)
set1.remove(col)

or

set1.removeAll(col1);


???




-
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 Quickstart Installation Guide for Beginners

2009-03-03 Thread Dane Laverty
Thanks, it looks good. I checked the Confluence website about adding
images to a page and it says:

> To attach a file to a page,
>
>   1. Go to the page and click on the 'Attachments' tab.
>
>   2. Browse through your files and select the file you'd like to
attach.
>
>   3. Enter a description for the attachment in the 'Comment' text
field (optional).
>
>   4. Click 'Attach more files' if required.
>
>   5. Click 'Attach File'.

I'm not seeing any 'Attachments' tab. Do I need different permissions?
Or do I have to link to an image hosted elsewhere?


-Original Message-
From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] 
Sent: Tuesday, March 03, 2009 4:23 PM
To: users@wicket.apache.org
Subject: Re: Wicket Quickstart Installation Guide for Beginners

i got you most of the way there, you just need to upload images and
put them in the right place

when you hit edit page, switch to the first tab which says "rich
format" that should give you a nice wysiwig editor to work with.

-igor

On Tue, Mar 3, 2009 at 4:08 PM, Dane Laverty 
wrote:
> I attempted to do that, but without any luck. I'm not at all familiar
> with wikis, but I'd be happy to do it if someone will point me in the
> right direction.
>
> -Original Message-
> From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com]
> Sent: Tuesday, March 03, 2009 3:44 PM
> To: users@wicket.apache.org
> Subject: Re: Wicket Quickstart Installation Guide for Beginners
>
> you can add a link to it off our wiki. or possibly upload it to the
> wiki, not sure how attachments there work.
>
> -igor
>
> -
> 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: Markup inheritance and composition mix

2009-03-03 Thread Dragut Razvan

Hi Igor,

First, thanks answering.

I have posted the demo code that throws this exception in a pastebin here :

 http://pastebin.com/f28244adb

If there's anything unclear, please let me know.

Cheers,

Razvan


igor.vaynberg wrote:
> 
> its really had to tell whats going on because your markup is being
> stripped, why dont you paste it all into a pastebin and send us a link
> to that instead.
> 
> -igor
> 
> On Mon, Mar 2, 2009 at 5:49 PM, Dragut Razvan  wrote:
>>
>> sorry for posting for the third time but need to make sure everything is
>> visible :
>>
>>
>>    [C content]
>>
>>
>>
>>
>> Dragut Razvan wrote:
>>>
>>> there where seems that text is missing is 2 spans ... one contains the
>>> other one. B contains C
>>>
>>>
>>> Dragut Razvan wrote:

 Hi everyone,

 I am new to wicket and I am encountering a problem when I am trying to
 mix some panel inheritance and composition. I don't know whether I'm
 doing something wrong or it is not supposed to work like that but hope
 you can help with some advice. So here's my hierarchy :

 Panel -> A -> B . This is an inheritance relationship where panel B
 extends panel A which extends Panel.
 Panel -> C .

 If I add panel B and panel C to a page everything works fine.

 If I am trying to add panel C to panel B ( bPanelInstance.add(C) ) and
 add panel B to the page then I am getting into problems (even if C is
 an
 EmptyPanel instance) :

 If I have


     [C content]


 I get an exception saying that the end tag for panel "b" is missing,
 though the end tag is there. Here's a sample of my exception where the
 name "login" equates to "b" from my exmaple.

 WicketMessage: close tag not found for tag: . Component:
 [MarkupContainer
 [Component id = login]]

 Root cause:

 org.apache.wicket.markup.MarkupException: close tag not found for tag:
 .
 Component: [MarkupContainer [Component id = login]]
 at
 org.apache.wicket.markup.html.panel.Panel.onComponentTagBody(Panel.java:123)
 at org.apache.wicket.Component.renderComponent(Component.java:2596)
 at
 org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1521)
 at org.apache.wicket.Component.render(Component.java:2421)
 at
 org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1399)
 at
 org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1537)
 at org.apache.wicket.Page.onRender(Page.java:1522)
 at org.apache.wicket.Component.render(Component.java:2421)
 at org.apache.wicket.Page.renderPage(Page.java:926)

 Adding a panel to another one works fine unless is one of my extended
 panels, therefore I guess it's something that I am missing when I am
 extending the panels. The way I am extending the panels is standard and
 only I only override that required constructor and nothing else.

 To summarize :
 I have some markup inheritance with panels which works fine. I get the
 above error when I am trying to add a panel using Panel's add method to
 my extended panels. The html markup it's correct and it's not missing
 any
 tags. Markup inheritance is done in the simplest way by only providing
 the panel id constructor.

 Do you have any idea why this happens ? If you think it should not
 happen, you have tried it, you do not get into this and cannot
 reproduce
 the error, can you provide a simple working example of this scenario ?

 I am using Wicket 1.4-rc2.

 Thanks very much,

 Kind Regards,

 Razvan

>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Markup-inheritance-and-composition-mix-tp22300927p22301004.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://www.nabble.com/Markup-inheritance-and-composition-mix-tp22300927p22321225.html
Sent from the Wicket - User mailing list archive at Nabble.com.


Re: Wicket Quickstart Installation Guide for Beginners

2009-03-03 Thread Igor Vaynberg
i got you most of the way there, you just need to upload images and
put them in the right place

when you hit edit page, switch to the first tab which says "rich
format" that should give you a nice wysiwig editor to work with.

-igor

On Tue, Mar 3, 2009 at 4:08 PM, Dane Laverty  wrote:
> I attempted to do that, but without any luck. I'm not at all familiar
> with wikis, but I'd be happy to do it if someone will point me in the
> right direction.
>
> -Original Message-
> From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com]
> Sent: Tuesday, March 03, 2009 3:44 PM
> To: users@wicket.apache.org
> Subject: Re: Wicket Quickstart Installation Guide for Beginners
>
> you can add a link to it off our wiki. or possibly upload it to the
> wiki, not sure how attachments there work.
>
> -igor
>
> -
> 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: Question re: style and variation

2009-03-03 Thread Jeremy Thomerson
what if you prepend a letter for what it is?  something like:

mypanel_s_style_v_variant_l_locale.html - or something like that?  so that
it doesn't matter what order they're in?


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

On Tue, Mar 3, 2009 at 4:57 PM, Ned Collyer  wrote:

>
> IMO, the brackets approach works because it clearly separates each of the
> sections.
>
> It is a bit ugly, but its still simple.
>
> Can't please everyone all of the time, but we can try to give the clients
> the right stuff, and the devs the power to build it :).
>
>
> yeah, not to mention it might get quiet ugly
>
> mypanel_style.html
> mypanel_style__variant.html
> mypanel_style__variant___locale.html
>
> mypanel__variant.html
>
> mypanel___locale.html
>
> markup(locale)(style)(variant) might work and is simpler
>
> mypanel(en_us).html
>
> mypanel(en_us)()(variant).html
>
> but sure looks ugly... :)
>
> not sure which one is better
>
> -igor
>
> --
> View this message in context:
> http://www.nabble.com/Question-re%3A-style-and-variation-tp22302526p22319926.html
> - Show quoted text -
> 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 Quickstart Installation Guide for Beginners

2009-03-03 Thread Dane Laverty
I attempted to do that, but without any luck. I'm not at all familiar
with wikis, but I'd be happy to do it if someone will point me in the
right direction.

-Original Message-
From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] 
Sent: Tuesday, March 03, 2009 3:44 PM
To: users@wicket.apache.org
Subject: Re: Wicket Quickstart Installation Guide for Beginners

you can add a link to it off our wiki. or possibly upload it to the
wiki, not sure how attachments there work.

-igor

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



Re: Wicket Quickstart Installation Guide for Beginners

2009-03-03 Thread Igor Vaynberg
you can add a link to it off our wiki. or possibly upload it to the
wiki, not sure how attachments there work.

-igor

On Tue, Mar 3, 2009 at 3:36 PM, Dane Laverty  wrote:
> I tried attaching it, but I guess that doesn't work. You can check it
> out here:
>
> https://www.foodhandler.org/wicketGuide/WicketQuickstartGuide.pdf
>
> or here
>
> https://www.foodhandler.org/wicketGuide/WicketQuickstartGuide.doc
>
> -Original Message-
> From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com]
> Sent: Tuesday, March 03, 2009 3:27 PM
> To: users@wicket.apache.org
> Subject: Re: Wicket Quickstart Installation Guide for Beginners
>
> you forgot the link :)
>
> -igor
>
> On Tue, Mar 3, 2009 at 3:21 PM, Dane Laverty 
> wrote:
>> I've just finished a Wicket Quickstart Guide for some of my coworkers
> who
>> are interested in using Wicket. It steps through installation of
> Maven,
>> Eclipse, M2Eclipse, WTP, and a Quickstart. I thought I'd pass it along
> here
>> in case it's of value to anyone else.
>>
>> -
>> 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
>
>

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



RE: Wicket Quickstart Installation Guide for Beginners

2009-03-03 Thread Dane Laverty
I tried attaching it, but I guess that doesn't work. You can check it
out here:

https://www.foodhandler.org/wicketGuide/WicketQuickstartGuide.pdf

or here

https://www.foodhandler.org/wicketGuide/WicketQuickstartGuide.doc 

-Original Message-
From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] 
Sent: Tuesday, March 03, 2009 3:27 PM
To: users@wicket.apache.org
Subject: Re: Wicket Quickstart Installation Guide for Beginners

you forgot the link :)

-igor

On Tue, Mar 3, 2009 at 3:21 PM, Dane Laverty 
wrote:
> I've just finished a Wicket Quickstart Guide for some of my coworkers
who
> are interested in using Wicket. It steps through installation of
Maven,
> Eclipse, M2Eclipse, WTP, and a Quickstart. I thought I'd pass it along
here
> in case it's of value to anyone else.
>
> -
> 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: a bit of topic but i couldnt resist ....

2009-03-03 Thread Martin Makundi
> lets make the set1 a TreeSet() and col1 a HashSet() 
> and both have the same kind of objects

By default they are the same, but you can change the behavior by
initializing treeset with a comparator or having your elements
implement comparable... I guess hashSet will not care about the
comparators.

http://java.sun.com/docs/books/tutorial/collections/index.html

**
Martin

> On Wed, Mar 4, 2009 at 00:13, Ryan McKinley  wrote:
>
>> Is your 'xxx' the instance inn each case?
>>
>> Depending on the implementation, removing from the thing you are iterating
>> over may cause some wierdness.
>>
>>
>>
>> On Mar 3, 2009, at 5:44 PM, Johan Compagner wrote:
>>
>>  Is this the same?
>>>
>>> Set set1 = xxx
>>> Collection col1 = xxx;
>>>
>>> foreach (col in col1)
>>> set1.remove(col)
>>>
>>> or
>>>
>>> set1.removeAll(col1);
>>>
>>>
>>> ???
>>>
>>
>>
>> -
>> 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 Authorization Problem !!

2009-03-03 Thread Marco Santos

I already discovery what was wrong. Thanks anyway.

on the Application Base class the AuthorizationStrategy and
UnauthorizedComponentInstantiationListener must be registred like this:

@Override
protected void init() {
NetCasasAuthorizationStrategy authorizationStrategy = new
NetCasasAuthorizationStrategy();
   
getSecuritySettings().setAuthorizationStrategy(authorizationStrategy);
   
getSecuritySettings().setUnauthorizedComponentInstantiationListener(authorizationStrategy);
}

Once again, thanks

-- 
View this message in context: 
http://www.nabble.com/%21%21-Wicket-Authorization-Problem-%21%21-tp22318987p22320534.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 Quickstart Installation Guide for Beginners

2009-03-03 Thread Igor Vaynberg
you forgot the link :)

-igor

On Tue, Mar 3, 2009 at 3:21 PM, Dane Laverty  wrote:
> I’ve just finished a Wicket Quickstart Guide for some of my coworkers who
> are interested in using Wicket. It steps through installation of Maven,
> Eclipse, M2Eclipse, WTP, and a Quickstart. I thought I’d pass it along here
> in case it’s of value to anyone else.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>

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



Wicket Quickstart Installation Guide for Beginners

2009-03-03 Thread Dane Laverty
I've just finished a Wicket Quickstart Guide for some of my coworkers
who are interested in using Wicket. It steps through installation of
Maven, Eclipse, M2Eclipse, WTP, and a Quickstart. I thought I'd pass it
along here in case it's of value to anyone else. 

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

Re: Wicket pages as plugin

2009-03-03 Thread Randy S.
Thanks Igor. I guess the trick would be knowing what is safe to filter out
without breaking Wicket. I'll look into this filter.

On Mar 3, 2009 5:15 PM, "Igor Vaynberg"  wrote:

you can use iresponsefilter to strip whatever you want from the generated
html.

-igor

On Tue, Mar 3, 2009 at 3:11 PM, Randy S.  wrote: > Hi
all. I am evaluating Wi...

- To
unsubscribe, e-mail: users-...


Re: a bit of topic but i couldnt resist ....

2009-03-03 Thread Johan Compagner
why should that matter?

I am taking here purely about interfaces.. So what should an implementation
matter?
So you are saying that we have to know the implementations of that inside
all my methods to know what really happens?

(this is pretty much my point i want to make)

lets make the set1 a TreeSet() and col1 a HashSet() 
and both have the same kind of objects



On Wed, Mar 4, 2009 at 00:13, Ryan McKinley  wrote:

> Is your 'xxx' the instance inn each case?
>
> Depending on the implementation, removing from the thing you are iterating
> over may cause some wierdness.
>
>
>
> On Mar 3, 2009, at 5:44 PM, Johan Compagner wrote:
>
>  Is this the same?
>>
>> Set set1 = xxx
>> Collection col1 = xxx;
>>
>> foreach (col in col1)
>> set1.remove(col)
>>
>> or
>>
>> set1.removeAll(col1);
>>
>>
>> ???
>>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Wicket pages as plugin

2009-03-03 Thread Igor Vaynberg
you can use iresponsefilter to strip whatever you want from the generated html.

-igor

On Tue, Mar 3, 2009 at 3:11 PM, Randy S.  wrote:
> Hi all. I am evaluating Wicket for our company and also have the same
> question.
>
> There are cases when iframes work just fine (even better), but other cases
> when an in-DOM solution is needed. For example, if the app needs to display
> something like a fly-out or simulated pop-up outside the screen space of the
> app, the boundary of the iframe prevents such UI elements from going outside
> the iframe.
>
> Naturally, apps running in such a way would have constraints because they're
> sharing the DOM, JS and CSS with other apps (e.g., like a portal page). But
> it would add flexibility to Wicket.
>
> -Randy S.
>
> On Mar 3, 2009 7:49 AM, "Sébastien Piller"  wrote:
>
> We use iframes for that. It works quite well.
>
> Stefan Lindner wrote: > > Dear wicket users and wizzards! > > Is ist
> possible to use wicket to imp...
>

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



Re: a bit of topic but i couldnt resist ....

2009-03-03 Thread Ryan McKinley

Is your 'xxx' the instance inn each case?

Depending on the implementation, removing from the thing you are  
iterating over may cause some wierdness.



On Mar 3, 2009, at 5:44 PM, Johan Compagner wrote:


Is this the same?

Set set1 = xxx
Collection col1 = xxx;

foreach (col in col1)
set1.remove(col)

or

set1.removeAll(col1);


???



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



Re: Wicket pages as plugin

2009-03-03 Thread Randy S.
Hi all. I am evaluating Wicket for our company and also have the same
question.

There are cases when iframes work just fine (even better), but other cases
when an in-DOM solution is needed. For example, if the app needs to display
something like a fly-out or simulated pop-up outside the screen space of the
app, the boundary of the iframe prevents such UI elements from going outside
the iframe.

Naturally, apps running in such a way would have constraints because they're
sharing the DOM, JS and CSS with other apps (e.g., like a portal page). But
it would add flexibility to Wicket.

-Randy S.

On Mar 3, 2009 7:49 AM, "Sébastien Piller"  wrote:

We use iframes for that. It works quite well.

Stefan Lindner wrote: > > Dear wicket users and wizzards! > > Is ist
possible to use wicket to imp...


Re: Question re: style and variation

2009-03-03 Thread Ned Collyer

IMO, the brackets approach works because it clearly separates each of the
sections.

It is a bit ugly, but its still simple.

Can't please everyone all of the time, but we can try to give the clients
the right stuff, and the devs the power to build it :).


yeah, not to mention it might get quiet ugly

mypanel_style.html
mypanel_style__variant.html
mypanel_style__variant___locale.html

mypanel__variant.html

mypanel___locale.html

markup(locale)(style)(variant) might work and is simpler

mypanel(en_us).html

mypanel(en_us)()(variant).html

but sure looks ugly... :)

not sure which one is better

-igor

-- 
View this message in context: 
http://www.nabble.com/Question-re%3A-style-and-variation-tp22302526p22319926.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



a bit of topic but i couldnt resist ....

2009-03-03 Thread Johan Compagner
Is this the same?

Set set1 = xxx
Collection col1 = xxx;

foreach (col in col1)
set1.remove(col)

or

set1.removeAll(col1);


???


!! Wicket Authorization Problem !!

2009-03-03 Thread Marco Santos

Hello there. I'm having problems developing Authorization on my
webapplication. I have followed the steps of the chapter 12 of Wicket in
Action. When i try to access to a protected page, the page is renderend
instead of redirected to the Login page. Here is my code. I was wondering if
anyone knows what am i missing.

-->Application Base class

public class NetCasasApplication extends WebApplication{

public NetCasasApplication() {
addComponentInstantiationListener(new
IComponentInstantiationListener() {

public void onInstantiation(Component component) {
   
if(!getSecuritySettings().getAuthorizationStrategy().isInstantiationAuthorized(component.getClass()))
{
   
getSecuritySettings().getUnauthorizedComponentInstantiationListener().onUnauthorizedInstantiation(component);
}
}
});
}

@Override
public Class getHomePage() {
return Index.class;
}

@Override
public Session newSession(Request request, Response response) {
return new NetCasasSession(request);
}

}

--> The Protected page (NetCasas extends WebPage) each page that is suppose
to protected extends this class

package pt.msoftware.netcasas.wicket.security;
import pt.msoftware.netcasas.wicket.NetCasasBasePage;

public class ProtectedPage extends NetCasasBasePage {

}

-->The AuthorizationStrategy

public class NetCasasAuthorizationStrategy implements
IAuthorizationStrategy, IUnauthorizedComponentInstantiationListener {

public boolean isInstantiationAuthorized(Class componentClass) {
if(ProtectedPage.class.isAssignableFrom(componentClass)) {
return NetCasasSession.get().isAuthenticated();
}

return true;
}

public boolean isActionAuthorized(Component component, Action action) {
throw new UnsupportedOperationException("Not supported yet.");
}

public void onUnauthorizedInstantiation(Component component) {
throw new RestartResponseAtInterceptPageException(Login.class);
}

}

On the constructor of the Application Base class (NetCasasApplication) an
interceptor is registered. when i try to access a protected page, the method
onInstantiation is executed. Inside the call
getSecuritySettings().getAuthorizationStrategy() always return a
IAuthorizationStrategy, never a NetCasasAuthorizationStrategy. So the method
NetCasasAuthorizationStrategy.isInstantiationAuthorized is never executed.
So i guess something is missing. Someone knows what?

Thanks for the help.

Os meus melhores cumprimenstos / Best Regards

Marco Santos

-- 
View this message in context: 
http://www.nabble.com/%21%21-Wicket-Authorization-Problem-%21%21-tp22318987p22318987.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: VOTE: Remove ? extends from constructor of DropDownChoice

2009-03-03 Thread Igor Vaynberg
it has nothing to do with us wanting to "lock" something down. i am
simply stating that the read-only nature is a side-effect of a widened
type declaration. it is something we should all be aware of.

-igor

On Tue, Mar 3, 2009 at 1:02 PM, Brill Pappin  wrote:
> I usually think of them as read only as well, however why would you presume
> read only?
>
> they are pretty much exactly the same semantically and if I thought of some
> cool trick I could do modifying the list, I'd hate to be prevented from
> doing so simply because someone wanted to lock down an API that didn't
> really need locking down.
> I think the syntax doesn't really mean read only, and if the wicket
> developers really want it to be read only, wrapping the list would be the
> way to go.
>
> I'm for the plain old > because its simple and explicit...  extends T>> would be my next choice because it widens the scope.
>
> - Brill
>
> On 2-Mar-09, at 3:44 PM, James Carman wrote:
>
>> Aren't both the "choices" model in DDC and the actual model of
>> ListView supposed to be considered read-only (as far as the component
>> is concerned)?  The DDC and ListView don't need to be able to alter
>> those models anyway, right?  Perhaps my experience is just too
>> limited, but I don't think I've ever tried to do either one of your
>> usecases (I always consider them read-only).
>>
>>
>> On Mon, Mar 2, 2009 at 3:24 PM, Igor Vaynberg 
>> wrote:
>>>
>>> see WICKET-2126
>>>
>>> -igor
>>>
>>> On Mon, Mar 2, 2009 at 12:19 PM, James Carman
>>>  wrote:

 I vote -0.99 on this (non-binding of course).  I'd vote +1 to making
 ListView accept List rather than making DDC less
 flexible.

 On Mon, Mar 2, 2009 at 3:11 PM, Brill Pappin  wrote:
>
> Ok, as suggested, here is the thread, and the first vote.
>
> +1
> for making the generic definition the same for all list type
> components.
>
> FYI -  you can also "vote" in the issue I just created at (which might
> actually be a better place to vote):
> https://issues.apache.org/jira/browse/WICKET-2137
>
> - Brill
>
>
>
>
> On 28-Feb-09, at 5:18 PM, Jeremy Thomerson wrote:
>
>> Perhaps start a vote thread, with the subject something like: "VOTE:
>> Remove
>> ? extends from constructor of DropDownChoice".
>>
>> I'd be +1 non-binding
>>
>>
>> --
>> Jeremy Thomerson
>> http://www.wickettraining.com
>>
>>
>> On Sat, Feb 28, 2009 at 3:33 PM, Brill Pappin  wrote:
>>
>>> I'm of the don't widen it camp anyway :)
>>>
>>> So how do I go about gathering support for having the DropDownChoice
>>> work
>>> with the models the way everything else does?
>>>
>>> - Brill
>>>
>>>
>>> On 28-Feb-09, at 1:42 AM, Igor Vaynberg wrote:
>>>
>>> yes, the choice was intentional. personally i do not care if it is
>>> 

 all the way, some users complained so we widened it on the choices
 model, we cannot widen it on the main model.

 -igor

 On Fri, Feb 27, 2009 at 8:51 PM, Brill Pappin 
 wrote:

> I see... but this would i think because Bar "is a" Foo:
>
> class Bar exends Foo {}
> List list = ...
> list.add(new Bar());
>
> Anyway, what your saying is that the generics choice was
> intentional?
>
> - Brill
>
>
>
> On 27-Feb-09, at 3:19 PM, Igor Vaynberg wrote:
>
> list stings=...
>>
>> strings.add("asd"); <== wont compile
>>
>> -igor
>>
>> On Fri, Feb 27, 2009 at 11:13 AM, Adriano dos Santos Fernandes
>>  wrote:
>>
>>>
>>> What do you mean with "read only" here?
>>>
>>>
>>> Adriano
>>>
>>>
>>> Igor Vaynberg escreveu:
>>>

  collections are read only, it would be too
 inconvenient to make the model collection read only :)

 -igor

 On Thu, Feb 26, 2009 at 8:34 PM, Jeremy Thomerson
  wrote:


> This is what I was commenting on last week on the list (or
> earlier
> this
> week).  One expects List while the other expects
> List.
> I'm not fully convinced yet that the "? extends" is the better
> option.
> Either way, I think they should be the same.
>
> --
> Jeremy Thomerson
> http://www.wickettraining.com
>
> On Thu, Feb 26, 2009 at 8:27 PM, Brill Pappin 
> wrote:
>
>
>
>> Roughly what I'm doing is:
>>
>> class TypeA{}
>>
>> class TypeA

Re: VOTE: Remove ? extends from constructor of DropDownChoice

2009-03-03 Thread Brill Pappin
I usually think of them as read only as well, however why would you  
presume read only?


they are pretty much exactly the same semantically and if I thought of  
some cool trick I could do modifying the list, I'd hate to be  
prevented from doing so simply because someone wanted to lock down an  
API that didn't really need locking down.
I think the syntax doesn't really mean read only, and if the wicket  
developers really want it to be read only, wrapping the list would be  
the way to go.


I'm for the plain old > because its simple and explicit...  
> would be my next choice because it widens the scope.


- Brill

On 2-Mar-09, at 3:44 PM, James Carman wrote:


Aren't both the "choices" model in DDC and the actual model of
ListView supposed to be considered read-only (as far as the component
is concerned)?  The DDC and ListView don't need to be able to alter
those models anyway, right?  Perhaps my experience is just too
limited, but I don't think I've ever tried to do either one of your
usecases (I always consider them read-only).


On Mon, Mar 2, 2009 at 3:24 PM, Igor Vaynberg  
 wrote:

see WICKET-2126

-igor

On Mon, Mar 2, 2009 at 12:19 PM, James Carman
 wrote:

I vote -0.99 on this (non-binding of course).  I'd vote +1 to making
ListView accept List rather than making DDC less
flexible.

On Mon, Mar 2, 2009 at 3:11 PM, Brill Pappin   
wrote:

Ok, as suggested, here is the thread, and the first vote.

+1
for making the generic definition the same for all list type  
components.


FYI -  you can also "vote" in the issue I just created at (which  
might

actually be a better place to vote):
https://issues.apache.org/jira/browse/WICKET-2137

- Brill




On 28-Feb-09, at 5:18 PM, Jeremy Thomerson wrote:

Perhaps start a vote thread, with the subject something like:  
"VOTE:

Remove
? extends from constructor of DropDownChoice".

I'd be +1 non-binding


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


On Sat, Feb 28, 2009 at 3:33 PM, Brill Pappin   
wrote:



I'm of the don't widen it camp anyway :)

So how do I go about gathering support for having the  
DropDownChoice work

with the models the way everything else does?

- Brill


On 28-Feb-09, at 1:42 AM, Igor Vaynberg wrote:

yes, the choice was intentional. personally i do not care if it  
is 


all the way, some users complained so we widened it on the  
choices

model, we cannot widen it on the main model.

-igor

On Fri, Feb 27, 2009 at 8:51 PM, Brill Pappin  
 wrote:



I see... but this would i think because Bar "is a" Foo:

class Bar exends Foo {}
List list = ...
list.add(new Bar());

Anyway, what your saying is that the generics choice was  
intentional?


- Brill



On 27-Feb-09, at 3:19 PM, Igor Vaynberg wrote:

list stings=...


strings.add("asd"); <== wont compile

-igor

On Fri, Feb 27, 2009 at 11:13 AM, Adriano dos Santos Fernandes
 wrote:



What do you mean with "read only" here?


Adriano


Igor Vaynberg escreveu:



 collections are read only, it would be too
inconvenient to make the model collection read only :)

-igor

On Thu, Feb 26, 2009 at 8:34 PM, Jeremy Thomerson
 wrote:


This is what I was commenting on last week on the list  
(or earlier

this
week).  One expects List while the other  
expects

List.
I'm not fully convinced yet that the "? extends" is the  
better

option.
Either way, I think they should be the same.

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

On Thu, Feb 26, 2009 at 8:27 PM, Brill Pappin >

wrote:




Roughly what I'm doing is:

class TypeA{}

class TypeAModel extends LoadableDetachableModel<  
List> {

  public List load(){
  ... do the load ...
  return ...
  }
}

TypeAModel model = new TypeAModel();
DropDownChoice< TypeA> ddc = new  
DropDownChoice("id", model

);

which gets complained about... in this case the generic  
def is

DropDownChoice>

I think the problem is that the generic def of the class  
should

actually
be
DropDownChoice> because you are already  
identifying the

type
when
you create a new instance.

Now... my generics are a bit hazy at this level, because  
I can

understand
why it was done that way... does anyone with more generics
experience
know
what it should be? Is this a bug that needs filing?

- Brill



On 26-Feb-09, at 6:03 PM, Kaspar Fischer wrote:

On 26.02.2009, at 22:52, Brill Pappin wrote:


For some reason the DropDownChoice component doesn't  
have the

same



generics as ListView and it will not accept a model that
listview
will,
despite its saying that it will accept an IModel.

Is anyone else having that sort of trouble with  
DropDownChoice?


- Brill



Can you give us more information on what exactly is not  
working

for
you?

DropDownChoice indeed does accept a model, see for  
instance the

example
in
the class description at






http://wicket.apache.org/docs/1.4/org/apache/wicket/markup/html/form/DropDownChoice.html

This works for me.

Kaspar

--



 site 1
 site 2





// Code
List SITES = Arrays.asList(new S

Re: VOTE: Remove ? extends from constructor of DropDownChoice

2009-03-03 Thread Timo Rantalaiho
On Tue, 03 Mar 2009, Brill Pappin wrote:
> Might as well merge the two then... I did do a quick check to see if  
> there was another ticket, but obviously a bit too quick :)

I think that it's more or less a "full-time hobby" just 
trying to keep up with what happens on the lists and Jira 
and source code repository :)


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



Re: VOTE: Remove ? extends from constructor of DropDownChoice

2009-03-03 Thread Brill Pappin
Might as well merge the two then... I did do a quick check to see if  
there was another ticket, but obviously a bit too quick :)


- Brill Pappin

On 2-Mar-09, at 3:15 PM, Igor Vaynberg wrote:


have you seen this thread? looks like someone beat you to it.

[vote] In Wicket 1.4 and onwards, remove widening from the list of
choices model in DropDownChoice, changing it from IModel> to IModel>

-igor

On Mon, Mar 2, 2009 at 12:11 PM, Brill Pappin  wrote:

Ok, as suggested, here is the thread, and the first vote.

+1
for making the generic definition the same for all list type  
components.


FYI -  you can also "vote" in the issue I just created at (which  
might

actually be a better place to vote):
https://issues.apache.org/jira/browse/WICKET-2137

- Brill




On 28-Feb-09, at 5:18 PM, Jeremy Thomerson wrote:


Perhaps start a vote thread, with the subject something like: "VOTE:
Remove
? extends from constructor of DropDownChoice".

I'd be +1 non-binding


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


On Sat, Feb 28, 2009 at 3:33 PM, Brill Pappin   
wrote:



I'm of the don't widen it camp anyway :)

So how do I go about gathering support for having the  
DropDownChoice work

with the models the way everything else does?

- Brill


On 28-Feb-09, at 1:42 AM, Igor Vaynberg wrote:

yes, the choice was intentional. personally i do not care if it  
is 


all the way, some users complained so we widened it on the choices
model, we cannot widen it on the main model.

-igor

On Fri, Feb 27, 2009 at 8:51 PM, Brill Pappin   
wrote:



I see... but this would i think because Bar "is a" Foo:

class Bar exends Foo {}
List list = ...
list.add(new Bar());

Anyway, what your saying is that the generics choice was  
intentional?


- Brill



On 27-Feb-09, at 3:19 PM, Igor Vaynberg wrote:

list stings=...


strings.add("asd"); <== wont compile

-igor

On Fri, Feb 27, 2009 at 11:13 AM, Adriano dos Santos Fernandes
 wrote:



What do you mean with "read only" here?


Adriano


Igor Vaynberg escreveu:



 collections are read only, it would be too
inconvenient to make the model collection read only :)

-igor

On Thu, Feb 26, 2009 at 8:34 PM, Jeremy Thomerson
 wrote:


This is what I was commenting on last week on the list (or  
earlier

this
week).  One expects List while the other  
expects

List.
I'm not fully convinced yet that the "? extends" is the  
better

option.
Either way, I think they should be the same.

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

On Thu, Feb 26, 2009 at 8:27 PM, Brill Pappin >

wrote:




Roughly what I'm doing is:

class TypeA{}

class TypeAModel extends LoadableDetachableModel<  
List> {

  public List load(){
  ... do the load ...
  return ...
  }
}

TypeAModel model = new TypeAModel();
DropDownChoice< TypeA> ddc = new  
DropDownChoice("id", model

);

which gets complained about... in this case the generic  
def is

DropDownChoice>

I think the problem is that the generic def of the class  
should

actually
be
DropDownChoice> because you are already  
identifying the

type
when
you create a new instance.

Now... my generics are a bit hazy at this level, because I  
can

understand
why it was done that way... does anyone with more generics
experience
know
what it should be? Is this a bug that needs filing?

- Brill



On 26-Feb-09, at 6:03 PM, Kaspar Fischer wrote:

On 26.02.2009, at 22:52, Brill Pappin wrote:


For some reason the DropDownChoice component doesn't have  
the

same



generics as ListView and it will not accept a model that
listview
will,
despite its saying that it will accept an IModel.

Is anyone else having that sort of trouble with  
DropDownChoice?


- Brill



Can you give us more information on what exactly is not  
working

for
you?

DropDownChoice indeed does accept a model, see for  
instance the

example
in
the class description at






http://wicket.apache.org/docs/1.4/org/apache/wicket/markup/html/form/DropDownChoice.html

This works for me.

Kaspar

--



 site 1
 site 2





// Code
List SITES = Arrays.asList(new String[] {
 "The Server Side", "Java Lobby", "Java.Net"
});
form.add(new DropDownChoice("site", SITES));
form.add(new ListView("site2", SITES)
{
@Override
protected void populateItem(ListItem item)
{
 item.add(new Label("sitename", item.getModel()));
}
});




-
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






? extends


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





--

Re: VOTE: Remove ? extends from constructor of DropDownChoice

2009-03-03 Thread Timo Rantalaiho
On Tue, 03 Mar 2009, walnutmon wrote:
> It seems that the drop down should at least be able to take a ListModel,
> but that doesn't work either...

I think that there's also a convenience model called 
something like Wildcard*Model for the wildcarded case.

Best wishes,
Timo


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



Re: how to give static pages consistant look with wicket - partial repeat

2009-03-03 Thread Igor Vaynberg
you need to rewrite image paths in the static url to conform to your
server setup.

-igor

On Tue, Mar 3, 2009 at 12:30 PM, matrixguy  wrote:
>
> Hi Igor,
>
> I am having problems with loading images. I have the following directory
> structure:
>
> -web
> --staticpages
> help.html
> image.gif
> --scripts
> and so on...
>
> I would like to refer to image.gif in help.html under staticpages directory.
> Most of the images I want to refer in the HTML files resides in the same
> directory.
>
> I used mount(new IndexedParamUrlCodingStrategy("/static",
> StaticPage.class)); to mount in Application class and  static/help.html HELP
> to access the help.html page. In StaticPage.java, my basePath is
> "/staticpages". So I append my resource, in this case "help.html" to my base
> path to get to it.
>
> In help.html, if I use
> {img src="image.gif" /}
> {img src="staticpages/image.gif" /}
>
> image does not show up, but if I use
>
> {img src="../staticpages/svs_logo_header.gif" /}
> image shows up. It doesn't make sense that I have to go up and down levels
> in the directory just to get to the image in the same directory. I am really
> confused :( Please help.
>
> Thanks.
>
>
>
>
>
>
>
>
> igor.vaynberg wrote:
>>
>> what happens when you paste the url of the image directly into the
>> browser's address bar?
>>
>> this wouldnt be wicket finding or rendering the images, they would be
>> served directly by the servlet container.
>>
>> -igor
>>
>> On Tue, Mar 3, 2009 at 7:46 AM, Vika  wrote:
>>>
>>> I am having the same problem!
>>>
>>>
>>> matrixguy wrote:

 Hi,

 The following code worked very nicely with the text in the HTML file,
 but
 it's not working with the embedded images in the HTML file. I have
 verified that wicket can find the images (so it's not the path issue for
 the images). It's as if wicket can find the images but not able to
 render
 them. :( Any ideas?

 Thanks.




 igor.vaynberg wrote:
>
> all you have to do is this:
>
> mount(new indexedparamcodingstrategy("/static", StaticPage.class));
>
> class staticpage extends MyBasePageWithDecoratingMarkup {
>   private final String resource;
>   public staticpage(PageParameters params) {
>     resource=params.get("0");
>     add(new Label("content", new PropertyModel(this,
> "content")).setEscapeModelStrings(false));
>   }
>
>   public String getContent() {
>      // load the resource content however you want
>      InputStream is=new FileInputStream(basePath+"/"+resource);
>      try {
>         return Streams.readIntoString(is);
>      } finally { is.close(); }
>   }
> }
>
> static.page.html: [wicket:extend][wicket:container
> wicket:id="content"]content will be
> here[/wicket:container][/wicket:extend]
>
> then if you go to /static/myfile.html the contents of myfile.html will
> be shown within your decorated page
>
> -igor
>
>>
>>
>>
>
> --
> View this message in context: 
> http://www.nabble.com/how-to-give-static-pages-consistant-look-with-wicket---partial-repeat-tp21958254p22317120.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: [vote] In Wicket 1.4 and onwards, remove widening from the list of choices model in DropDownChoice, changing it from IModel> to IModel>

2009-03-03 Thread Martijn Dashorst
Though I haven't done much work with 1.4, I think DDC and LV need to
have the same generics semantics. And I prefer the simple version.

So count my +1.

Martijn

On Tue, Mar 3, 2009 at 9:33 PM, Timo Rantalaiho  wrote:
> On Mon, 02 Mar 2009, Johan Compagner wrote:
>> If we loose the wildcard is it then still possible to do everything?
>>
>> We have it to be able to use a  List when we declare it as a
>> 
>> When you have that you have to copy it over i guess by a helper method.
>>
>> I just want to know for sure that i dont miss something that if we remove it
>> that then something is not possible anymore
>
> Right, for example this does not work
>
>  List doesntWork = new ArrayList(Arrays.asList("foo", 
> "bar"));
>
> But this does
>
>  List works = new ArrayList(Arrays.asList("foo", 
> "bar"));
>
> As Igor says, this might not be a very common scenario(?).
>
> The case that has come up a couple of times in the last few
> days is that the same model didn't work for DropDownChoice
> and ListView. This seems like a more likely case so it would
> make sense to align them with each other. So far there have
> only been a couple of -1s, so maybe that will happen.
>
> Best wishes,
> Timo
>
> --
> Timo Rantalaiho
> Reaktor Innovations Oy    http://www.ri.fi/ >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>



-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.3.5 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

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



Re: [vote] In Wicket 1.4 and onwards, remove widening from the list of choices model in DropDownChoice, changing it from IModel> to IModel>

2009-03-03 Thread Timo Rantalaiho
On Mon, 02 Mar 2009, Johan Compagner wrote:
> If we loose the wildcard is it then still possible to do everything?
> 
> We have it to be able to use a  List when we declare it as a
> 
> When you have that you have to copy it over i guess by a helper method.
> 
> I just want to know for sure that i dont miss something that if we remove it
> that then something is not possible anymore

Right, for example this does not work

  List doesntWork = new ArrayList(Arrays.asList("foo", 
"bar"));

But this does

  List works = new ArrayList(Arrays.asList("foo", 
"bar"));

As Igor says, this might not be a very common scenario(?). 

The case that has come up a couple of times in the last few
days is that the same model didn't work for DropDownChoice 
and ListView. This seems like a more likely case so it would 
make sense to align them with each other. So far there have 
only been a couple of -1s, so maybe that will happen.

Best wishes,
Timo

-- 
Timo Rantalaiho   
Reaktor Innovations Oyhttp://www.ri.fi/ >

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



Re: how to give static pages consistant look with wicket - partial repeat

2009-03-03 Thread matrixguy

Hi Igor,

I am having problems with loading images. I have the following directory
structure:

-web
--staticpages
help.html
image.gif
--scripts
and so on...

I would like to refer to image.gif in help.html under staticpages directory.
Most of the images I want to refer in the HTML files resides in the same
directory.

I used mount(new IndexedParamUrlCodingStrategy("/static",
StaticPage.class)); to mount in Application class and  static/help.html HELP 
to access the help.html page. In StaticPage.java, my basePath is
"/staticpages". So I append my resource, in this case "help.html" to my base
path to get to it.

In help.html, if I use 
image.gif 
staticpages/image.gif 

image does not show up, but if I use

../staticpages/svs_logo_header.gif 
image shows up. It doesn't make sense that I have to go up and down levels
in the directory just to get to the image in the same directory. I am really
confused :( Please help.

Thanks.








igor.vaynberg wrote:
> 
> what happens when you paste the url of the image directly into the
> browser's address bar?
> 
> this wouldnt be wicket finding or rendering the images, they would be
> served directly by the servlet container.
> 
> -igor
> 
> On Tue, Mar 3, 2009 at 7:46 AM, Vika  wrote:
>>
>> I am having the same problem!
>>
>>
>> matrixguy wrote:
>>>
>>> Hi,
>>>
>>> The following code worked very nicely with the text in the HTML file,
>>> but
>>> it's not working with the embedded images in the HTML file. I have
>>> verified that wicket can find the images (so it's not the path issue for
>>> the images). It's as if wicket can find the images but not able to
>>> render
>>> them. :( Any ideas?
>>>
>>> Thanks.
>>>
>>>
>>>
>>>
>>> igor.vaynberg wrote:

 all you have to do is this:

 mount(new indexedparamcodingstrategy("/static", StaticPage.class));

 class staticpage extends MyBasePageWithDecoratingMarkup {
   private final String resource;
   public staticpage(PageParameters params) {
     resource=params.get("0");
     add(new Label("content", new PropertyModel(this,
 "content")).setEscapeModelStrings(false));
   }

   public String getContent() {
      // load the resource content however you want
      InputStream is=new FileInputStream(basePath+"/"+resource);
      try {
         return Streams.readIntoString(is);
      } finally { is.close(); }
   }
 }

 static.page.html: [wicket:extend][wicket:container
 wicket:id="content"]content will be
 here[/wicket:container][/wicket:extend]

 then if you go to /static/myfile.html the contents of myfile.html will
 be shown within your decorated page

 -igor

> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/how-to-give-static-pages-consistant-look-with-wicket---partial-repeat-tp21958254p22317120.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



YUI Menu shows incorrect selected item

2009-03-03 Thread jchappelle

I have a YUI menu on my base page and it works fine except for when the user
clicks an item. The item indicates that it has been selected but when the
page refreshes that selection is lost and it appears that another random
item in the menu is selected instead. It indicates selection by blue
highlighting the selected item. When each item is clicked I am calling
setResponsePage(new MyPage()); I wonder is this somehow messing it up.
Should I only be doing ajax calls or something? 

Thanks,

Josh
-- 
View this message in context: 
http://www.nabble.com/YUI-Menu-shows-incorrect-selected-item-tp22316880p22316880.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



MixedParamUrlCodingStrategy and too many path parts

2009-03-03 Thread novotny


Hi,

I'm using MixedParamUrlCodingStrategy which seems to work fine. However I
saw a bunch of errors in the log file:

"Too many path parts, please provide sufficient number of path parameter
names"

If this shows up, how can I direct a user to a PageNotFound? Also how can I
log what HTTp requests users are making to the site to see where this is
coming from?

Thanks, Jason
-- 
View this message in context: 
http://www.nabble.com/MixedParamUrlCodingStrategy-and-too-many-path-parts-tp22316857p22316857.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: Help with SecondLevelCache and Serialization

2009-03-03 Thread Victor Igumnov

Here is the test case and stacktrace

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


On Mar 3, 2009, at 3:55 AM, behrica wrote:



Yes, it might be the same problem I had with the serialization.
Could you maybe paste your stack trace and let me know the JIRA id,  
so I can

track it.

You mentioned you had an other configuration which the  
HttpSessionStore.

What is this and how can it be enabled ?

Thanks,

Carsten



Victor Igumnov-4 wrote:


Igor,

Thanks for the confirmation, this is exactly what I thought. I will
submit a bug report now.

This seems exactly like that other issue that someone had with JBoss
clustered sessions.

On Mar 2, 2009, at 1:35 PM, Igor Vaynberg wrote:


when you construct it using the first example you showed (anonymous
class) the ldm is carrying a reference to the page on which it is
constructed. so your editblogpage is indirectly holding onto the
instance of the previous page, perhaps that is what is causing the
problem. please file a jira issue.

-igor


On Mon, Mar 2, 2009 at 1:30 PM, Victor Igumnov 
wrote:
I have been running on the HttpSessionStore for a good year now.
HttpSessions are clustered and have been working fine for all this
time. As
of recently I have switched to SecondLevelCache and DiskPageStore
to avoid
HttpSession bloat and still have fail over.

I have run into an odd issue with serialization which throws a
stackoverflow
exception. Here is the cause:

Passing an LDM model as-is to a page, it will stackoverflow on the
receiving
page, if that page is refreshed twice or a form has been submitted.

Here is an example...

setResponsePage(new EditBlogPage(new
LoadableDetachableModel() {
  private static final long serialVersionUID = 1L;
  @Override
  protected Blog load() {
  // just an example
  return new Blog();
  }

}));

However, if I subclass the LDM and pass it like so, it will work
just fine.

public class FakeLDM extends LoadableDetachableModel {
  private static final long serialVersionUID = 1L;

  @Override
  protected Blog load() {
  return new Blog();
  }
}

setResponsePage(new EditBlogPage(new FakeLDM()));

One last thing, If I construct the LDM inside the receiving page.
It will
work fine as well.

This seems to only happen with the SecondLevelCache, any ideas?

-
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





--
View this message in context: 
http://www.nabble.com/Help-with-SecondLevelCache-and-Serialization-tp22297221p22307250.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: wicket 1.4

2009-03-03 Thread Peter Thomas
On Tue, Mar 3, 2009 at 11:55 AM, Peter Ertl  wrote:

> *lol*
>
> made my day !


Duke Nukem *cough* I mean Wicket Forever ;)


>
> Am 02.03.2009 um 10:55 schrieb Martijn Dashorst:
>
>
>  when it's done.
>>
>> Martijn
>>
>> On Mon, Mar 2, 2009 at 9:09 AM, SrinivasaRaju Ch
>>  wrote:
>>
>>> Hi,
>>>
>>> When will wicket 1.4 GA Release..
>>>
>>> Regards,
>>> Srinivasa Raju CH.
>>>
>>>
>>> Get your world in your inbox!
>>>
>>> Mail, widgets, documents, spreadsheets, organizer and much more with your
>>> Sifymail WIYI id!
>>> Log on to http://www.sify.com
>>>
>>> ** DISCLAIMER **
>>> Information contained and transmitted by this E-MAIL is proprietary to
>>> Sify
>>> Limited and is intended for use only by the individual or entity to which
>>> it
>>> is addressed, and may contain information that is privileged,
>>> confidential
>>> or exempt from disclosure under applicable law. If this is a forwarded
>>> message, the content of this E-MAIL may not have been sent with the
>>> authority of the Company. If you are not the intended recipient, an agent
>>> of
>>> the intended recipient or a  person responsible for delivering the
>>> information to the named recipient,  you are notified that any use,
>>> distribution, transmission, printing, copying or dissemination of this
>>> information in any way or in any manner is strictly prohibited. If you
>>> have
>>> received this communication in error, please delete this mail & notify us
>>> immediately at ad...@sifycorp.com
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>>
>>>
>>
>>
>> --
>> Become a Wicket expert, learn from the best: http://wicketinaction.com
>> Apache Wicket 1.3.5 is released
>> Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.
>>
>> -
>> 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 1.4

2009-03-03 Thread Peter Ertl

*lol*

made my day !

Am 02.03.2009 um 10:55 schrieb Martijn Dashorst:


when it's done.

Martijn

On Mon, Mar 2, 2009 at 9:09 AM, SrinivasaRaju Ch
 wrote:

Hi,

When will wicket 1.4 GA Release..

Regards,
Srinivasa Raju CH.


Get your world in your inbox!

Mail, widgets, documents, spreadsheets, organizer and much more  
with your

Sifymail WIYI id!
Log on to http://www.sify.com

** DISCLAIMER **
Information contained and transmitted by this E-MAIL is proprietary  
to Sify
Limited and is intended for use only by the individual or entity to  
which it
is addressed, and may contain information that is privileged,  
confidential
or exempt from disclosure under applicable law. If this is a  
forwarded

message, the content of this E-MAIL may not have been sent with the
authority of the Company. If you are not the intended recipient, an  
agent of

the intended recipient or a  person responsible for delivering the
information to the named recipient,  you are notified that any use,
distribution, transmission, printing, copying or dissemination of  
this
information in any way or in any manner is strictly prohibited. If  
you have
received this communication in error, please delete this mail &  
notify us

immediately at ad...@sifycorp.com

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






--
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.3.5 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

-
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 and downloading huge pdf files

2009-03-03 Thread Peter Ertl

You might take a look at

  SharedResourceRequestTargetUrlCodingStrategy

and

  IndexedSharedResourceCodingStrategy

and eventually

  http://issues.apache.org/jira/browse/WICKET-1666

regards
peter


Am 02.03.2009 um 10:17 schrieb Emanuele Gesuato:


Only want to know if an url similar to:

http://www.myweb.com/.../depliant.pdf

with a pdf file (or similar) as suffix is possible to create in  
wicket.



On Fri, 2009-02-27 at 10:13 +0100, Emanuele Gesuato wrote:

Hi there,

We have several huge pdf files with many pages (an hundred or so)  
and we
would like to do a lazy loading of the pdf file when the user click  
to

download it. Right now, when the user click for some pdf we return to
the browser a resource stream with mime type "application/pdf" in  
which

we load the file as a byte array output stream.

But in this way the file is returned entirely to the user. In some  
web

site they use an url with the the pdf file embedded to it (example:
http://.../file.pdf); in this way the pdf client (adobe reader or
similar) could lazy load the pages of the document.

But is it a correct approach ? Is it possibile to implement something
similar using a custom UrlCodingStrategy ?

Thanks,
Emanuele Gesuato



-
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



BuzzStream is looking for a wicket developer

2009-03-03 Thread Jeremy Bencken
We're looking for a full-time Wicket developer in Austin in case anyone is
interested or can refer a friend.

 

http://www.buzzstream.com/blog/buzzstream-seeks-java-web-developer.html

 

Thanks,

Jeremy

 

 

Jeremy Bencken

Co-founder, BuzzStream

http://www.buzzstream.com

http://twitter.com/jeb512

 



Re: how to give static pages consistant look with wicket - partial repeat

2009-03-03 Thread Vika

Actually images work now if i don't put them under /app. That was my mistake.
Thank you for your help!


igor.vaynberg wrote:
> 
> what happens when you paste the url of the image directly into the
> browser's address bar?
> 
> this wouldnt be wicket finding or rendering the images, they would be
> served directly by the servlet container.
> 
> -igor
> 
> On Tue, Mar 3, 2009 at 7:46 AM, Vika  wrote:
>>
>> I am having the same problem!
>>
>>
>> matrixguy wrote:
>>>
>>> Hi,
>>>
>>> The following code worked very nicely with the text in the HTML file,
>>> but
>>> it's not working with the embedded images in the HTML file. I have
>>> verified that wicket can find the images (so it's not the path issue for
>>> the images). It's as if wicket can find the images but not able to
>>> render
>>> them. :( Any ideas?
>>>
>>> Thanks.
>>>
>>>
>>>
>>>
>>> igor.vaynberg wrote:

 all you have to do is this:

 mount(new indexedparamcodingstrategy("/static", StaticPage.class));

 class staticpage extends MyBasePageWithDecoratingMarkup {
   private final String resource;
   public staticpage(PageParameters params) {
     resource=params.get("0");
     add(new Label("content", new PropertyModel(this,
 "content")).setEscapeModelStrings(false));
   }

   public String getContent() {
      // load the resource content however you want
      InputStream is=new FileInputStream(basePath+"/"+resource);
      try {
         return Streams.readIntoString(is);
      } finally { is.close(); }
   }
 }

 static.page.html: [wicket:extend][wicket:container
 wicket:id="content"]content will be
 here[/wicket:container][/wicket:extend]

 then if you go to /static/myfile.html the contents of myfile.html will
 be shown within your decorated page

 -igor

 On Wed, Feb 11, 2009 at 8:45 AM, Vika 
 wrote:
>
> I am looking at wicket trying to decide if i would want to use it for
> my
> project.
> Currently I am struggling trying to give static and dynamic pages
> consistent
> look with wicket without using sitemesh.  I was able to get wicket
> application to direct all static page requests to my wicket StaticPage
> that
> would read the content of a file and add it to the page as
> MultiLineLabel.
> However my problem is that i don't want to add whole html file. I need
> to
> extract the content of ,  and  tags and add these
> separately. Is there anything in api or any examples i should look at
> ?
>
> Please see the code below.
>
> in Aplication.java  init()
>
> mount(new URIRequestTargetUrlCodingStrategy("/docs")
>        {
>           �...@override
>            public IRequestTarget decode(RequestParameters
> requestParameters)
>            {
>                String path = "/app/" + getURI(requestParameters);
>                return new PageRequestTarget(new StaticPage(new
> WebExternalResourceRequestTarget(path)));
>            }
>        });
> 
> in StaicPage.java
> public class StaticPage extends BasePage implements
> AuthenticatedWebPage
> {
>        public StaticPage(WebExternalResourceRequestTarget
> staticResource)
>        {
>                String staticResourceContent = "";
>                try {
>                        staticResourceContent =
>
> convertStreamToString(staticResource.getResourceStream().getInputStream());
>                } catch (ResourceStreamNotFoundException e)
>                {
>                        // TODO Auto-generated catch block
>                        e.printStackTrace();
>                }
>                add(new MultiLineLabel("staticContent",
> staticResourceContent));
>        }
> }
> ---
> Here is what i get in the browser when click on static link:
>
>  "http://www.w3.org/TR/html4/loose.dtd";>
> 
> 
> 
> Insert title here
> 
> 
> this is a test
> 
> 
> This is in the footer
> --
>
> Another variation of StaticPage.java i tried was
> public class StaticPage extends BasePage implements
> AuthenticatedWebPage
> {
>        public StaticPage(WebExternalResourceRequestTarget
> staticResource)
>        {
>                MarkupResourceStream markupStream =
>                        new
> MarkupResourceStream(staticResource.getResourceStream());
>
>
>                MarkupParse

Re: YUI menu and wicker border problem

2009-03-03 Thread jchappelle

I am having a similar problem. I have a MasterPage class that is my common
page. When I hard code the menu as a page that extends Webpage everything is
fine but when I extend my MasterPage class it doesn't work. 

Could someone please help?

Josh


Michal Hybler wrote:
> 
> Hi all!
> I want to combine YUI menu( from yui examples) with wicket border "system"
> to reach that menu will be displayed on each page.
> I have 2 problems:
> - menu lost its functionality (sub menu doesnt work) if i use it in hard
> coded page its all right.
> - in spite of I added menu in table it is outside the table and cell which
> should contain it is empty.
> 
> There is my code:
> 
> layoutPage:
> 
> java:
> 
> public class PageBorder extends Border {
>   BoxBorder box;
> 
>   /**
>* Constructor
>*/
>   /*
>* public Page1() { add(new Menu("navomaticBorder"));
>* 
>* }
>*/
>   public PageBorder(String id) {
>   super(id);
>   initMenu();
>   }
> 
>   private void initMenu() {
>   AbstractYuiMenuItem mi = null;
> 
>   YuiMenu menu = new YuiMenu("menu");
> 
>   menu.addMenuItem(new TestAction("M : L1"));
>   menu.addMenuItem(new TestAction("M : L2"));
>   mi = menu.addMenuItem(new TestAction("M : L3"));
>   menu.addMenuItem(new TestAction("M : L4"));
>   menu.addMenuItem(new TestAction("M : L5"));
> 
>   YuiMenu subMenu = mi.newSubMenu("m_subMenu1");
>   subMenu.addMenuItem(new TestAction("Label 1"));
>   subMenu.addMenuItem(new TestAction("Label 2"));
>   add(menu);
> 
>   }
> 
>   private static class TestAction implements IYuiMenuAction,
>   java.io.Serializable {
>   private final String id;
> 
>   public TestAction(String id) {
>   this.id = id;
>   }
> 
>   public IModel getName() {
>   return new Model(id);
>   }
> 
>   public void onClick() {
>   System.out.println("Link: " + id);
>   }
>   }
> 
> }
> 
> html:
> 
> 
> http://www.w3.org/1999/xhtml"; >
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Menu Here
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> page ancestor:
> 
> 
> package cz.legend.mvcr.kup.lims.application;
> 
> import org.apache.wicket.Component;
> import org.apache.wicket.MarkupContainer;
> import org.apache.wicket.markup.html.WebPage;
> import org.apache.wicket.markup.html.border.Border;
> 
> public abstract class CommonPage extends WebPage {
>   private Border border;
> 
>   public MarkupContainer add(final Component child) {
>   // Add children of the page to the page's border component
>   if (border == null) {
>   // Create border and add it to the page
>   border = new PageBorder("border");
>   super.add(border);
>   }
>   border.add(child);
>   return this;
>   }
> 
> }
> 
> test page:
> 
> java:
> 
> package cz.legend.mvcr.kup.lims.application;
> 
> import org.apache.wicket.markup.html.basic.Label;
> 
> public class Page1 extends CommonPage {
> 
>   /**
>* Constructor
>*/
>   /*
>* public Page1() { add(new Menu("navomaticBorder"));
>* 
>* }
>*/
>   public Page1() {
>   add(new Label("test", "This is a Test"));
>   }
> 
> }
> 
> 
> html:
> 
> http://wicket.apache.org/";>
> 
> Wicket Examples - navomatic
> 
> 
> 
> 
> 
> TEST LABEL
> Welcome to Page 1 of Navomatic.  Notice that the Page1 link is now
> clickable
> (so that you can return to Page1 if you want to) and the Page2
> link is
> italicized text.  Go ahead and click the Page3 link.
> 
> 
> 
> 
> 
> 
> If i use label instead of menu (for test) everything is ok then I thinkn
> problem is in Yui menu. Any ideas about that?
> 
> Thanx for your help (and sorry for my english :blush:)
> Regards Michal Hybler
> 

-- 
View this message in context: 
http://www.nabble.com/YUI-menu-and-wicker-border-problem-tp21683436p22314033.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



Maurice Marrink will be greatly missed.

2009-03-03 Thread Warren Bell
I just recently found out, via this list, that Maurice Marrink had 
passed away. I wanted to let everyone know how much I appreciated 
Maurice. He helped me better understand Wicket and helped me customize 
wicket-security to meet my needs. He was very generous with his time and 
he will be greatly missed.


Thanks,

Warren Bell


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



Re: how to give static pages consistant look with wicket - partial repeat

2009-03-03 Thread Igor Vaynberg
what happens when you paste the url of the image directly into the
browser's address bar?

this wouldnt be wicket finding or rendering the images, they would be
served directly by the servlet container.

-igor

On Tue, Mar 3, 2009 at 7:46 AM, Vika  wrote:
>
> I am having the same problem!
>
>
> matrixguy wrote:
>>
>> Hi,
>>
>> The following code worked very nicely with the text in the HTML file, but
>> it's not working with the embedded images in the HTML file. I have
>> verified that wicket can find the images (so it's not the path issue for
>> the images). It's as if wicket can find the images but not able to render
>> them. :( Any ideas?
>>
>> Thanks.
>>
>>
>>
>>
>> igor.vaynberg wrote:
>>>
>>> all you have to do is this:
>>>
>>> mount(new indexedparamcodingstrategy("/static", StaticPage.class));
>>>
>>> class staticpage extends MyBasePageWithDecoratingMarkup {
>>>   private final String resource;
>>>   public staticpage(PageParameters params) {
>>>     resource=params.get("0");
>>>     add(new Label("content", new PropertyModel(this,
>>> "content")).setEscapeModelStrings(false));
>>>   }
>>>
>>>   public String getContent() {
>>>      // load the resource content however you want
>>>      InputStream is=new FileInputStream(basePath+"/"+resource);
>>>      try {
>>>         return Streams.readIntoString(is);
>>>      } finally { is.close(); }
>>>   }
>>> }
>>>
>>> static.page.html: [wicket:extend][wicket:container
>>> wicket:id="content"]content will be
>>> here[/wicket:container][/wicket:extend]
>>>
>>> then if you go to /static/myfile.html the contents of myfile.html will
>>> be shown within your decorated page
>>>
>>> -igor
>>>
>>> On Wed, Feb 11, 2009 at 8:45 AM, Vika  wrote:

 I am looking at wicket trying to decide if i would want to use it for my
 project.
 Currently I am struggling trying to give static and dynamic pages
 consistent
 look with wicket without using sitemesh.  I was able to get wicket
 application to direct all static page requests to my wicket StaticPage
 that
 would read the content of a file and add it to the page as
 MultiLineLabel.
 However my problem is that i don't want to add whole html file. I need
 to
 extract the content of ,  and  tags and add these
 separately. Is there anything in api or any examples i should look at ?

 Please see the code below.

 in Aplication.java  init()

 mount(new URIRequestTargetUrlCodingStrategy("/docs")
        {
           �...@override
            public IRequestTarget decode(RequestParameters
 requestParameters)
            {
                String path = "/app/" + getURI(requestParameters);
                return new PageRequestTarget(new StaticPage(new
 WebExternalResourceRequestTarget(path)));
            }
        });
 
 in StaicPage.java
 public class StaticPage extends BasePage implements AuthenticatedWebPage
 {
        public StaticPage(WebExternalResourceRequestTarget
 staticResource)
        {
                String staticResourceContent = "";
                try {
                        staticResourceContent =

 convertStreamToString(staticResource.getResourceStream().getInputStream());
                } catch (ResourceStreamNotFoundException e)
                {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                }
                add(new MultiLineLabel("staticContent",
 staticResourceContent));
        }
 }
 ---
 Here is what i get in the browser when click on static link:

 >>> "http://www.w3.org/TR/html4/loose.dtd";>
 
 
 
 Insert title here
 
 
 this is a test
 
 
 This is in the footer
 --

 Another variation of StaticPage.java i tried was
 public class StaticPage extends BasePage implements AuthenticatedWebPage
 {
        public StaticPage(WebExternalResourceRequestTarget
 staticResource)
        {
                MarkupResourceStream markupStream =
                        new
 MarkupResourceStream(staticResource.getResourceStream());


                MarkupParser parser = new MarkupParser(markupStream);

                Markup markup = parser.parse();

 However I got stuck at this point since i still don't see a way of
 getting
 individual html tags from Markup


 thank you in advance,

 Vicky

 --
 View this message 

Re: DatePicker icon change?

2009-03-03 Thread Igor Vaynberg
override getIconUrl()

-igor

On Tue, Mar 3, 2009 at 7:14 AM, Edwin Ansicodd  wrote:
>
> using org.apache.wicket.extensions.yui.calendar.DatePicker.  An icon of a
> calendar day, with a red stripe on top and a 17 in a field of white appears
> for the DatePicker.  Is there an easy way we can change this icon?
>
> It looks like it is
> resources/org.apache.wicket.extensions.yui.calendar.DatePicker/icon1.gif
> --
> View this message in context: 
> http://www.nabble.com/DatePicker-icon-change--tp22310554p22310554.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: Markup inheritance and composition mix

2009-03-03 Thread Igor Vaynberg
its really had to tell whats going on because your markup is being
stripped, why dont you paste it all into a pastebin and send us a link
to that instead.

-igor

On Mon, Mar 2, 2009 at 5:49 PM, Dragut Razvan  wrote:
>
> sorry for posting for the third time but need to make sure everything is
> visible :
>
>
>    [C content]
>
>
>
>
> Dragut Razvan wrote:
>>
>> there where seems that text is missing is 2 spans ... one contains the
>> other one. B contains C
>>
>>
>> Dragut Razvan wrote:
>>>
>>> Hi everyone,
>>>
>>> I am new to wicket and I am encountering a problem when I am trying to
>>> mix some panel inheritance and composition. I don't know whether I'm
>>> doing something wrong or it is not supposed to work like that but hope
>>> you can help with some advice. So here's my hierarchy :
>>>
>>> Panel -> A -> B . This is an inheritance relationship where panel B
>>> extends panel A which extends Panel.
>>> Panel -> C .
>>>
>>> If I add panel B and panel C to a page everything works fine.
>>>
>>> If I am trying to add panel C to panel B ( bPanelInstance.add(C) ) and
>>> add panel B to the page then I am getting into problems (even if C is an
>>> EmptyPanel instance) :
>>>
>>> If I have
>>>
>>>
>>>     [C content]
>>>
>>>
>>> I get an exception saying that the end tag for panel "b" is missing,
>>> though the end tag is there. Here's a sample of my exception where the
>>> name "login" equates to "b" from my exmaple.
>>>
>>> WicketMessage: close tag not found for tag: . Component: [MarkupContainer
>>> [Component id = login]]
>>>
>>> Root cause:
>>>
>>> org.apache.wicket.markup.MarkupException: close tag not found for tag: .
>>> Component: [MarkupContainer [Component id = login]]
>>> at
>>> org.apache.wicket.markup.html.panel.Panel.onComponentTagBody(Panel.java:123)
>>> at org.apache.wicket.Component.renderComponent(Component.java:2596)
>>> at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1521)
>>> at org.apache.wicket.Component.render(Component.java:2421)
>>> at
>>> org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1399)
>>> at org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1537)
>>> at org.apache.wicket.Page.onRender(Page.java:1522)
>>> at org.apache.wicket.Component.render(Component.java:2421)
>>> at org.apache.wicket.Page.renderPage(Page.java:926)
>>>
>>> Adding a panel to another one works fine unless is one of my extended
>>> panels, therefore I guess it's something that I am missing when I am
>>> extending the panels. The way I am extending the panels is standard and
>>> only I only override that required constructor and nothing else.
>>>
>>> To summarize :
>>> I have some markup inheritance with panels which works fine. I get the
>>> above error when I am trying to add a panel using Panel's add method to
>>> my extended panels. The html markup it's correct and it's not missing any
>>> tags. Markup inheritance is done in the simplest way by only providing
>>> the panel id constructor.
>>>
>>> Do you have any idea why this happens ? If you think it should not
>>> happen, you have tried it, you do not get into this and cannot reproduce
>>> the error, can you provide a simple working example of this scenario ?
>>>
>>> I am using Wicket 1.4-rc2.
>>>
>>> Thanks very much,
>>>
>>> Kind Regards,
>>>
>>> Razvan
>>>
>>
>>
>
> --
> View this message in context: 
> http://www.nabble.com/Markup-inheritance-and-composition-mix-tp22300927p22301004.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: Repeater that disposses content after rendering?

2009-03-03 Thread Igor Vaynberg
refreshing view clears its content before render, not after render. if
you have a link in your table cell, or any component that requires a
callback and you clear the items after render than the link wont work
because when it is clicked the component that is supposed to receive
it is no longer there.

if this is not a concern for your particular usecase you can roll your
own repeater quiet easily using a subclassed refreshing view or
something similar.

-igor

On Tue, Mar 3, 2009 at 12:54 AM, Bert  wrote:
> That was my first idea and i checked the javadoc and source (without
> following too deep
> into the stack (DefaultItemReuseStrategy is where this is done?).
>
> Good to know that the RefreshingView is behaving like this, i use it
> rather often.
>
> Thanks for the reply,
> Bert
>
> On Tue, Mar 3, 2009 at 09:43, Martijn Dashorst
>  wrote:
>> RefreshingView?
>>
>> Martijn
>
> -
> 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: Question re: style and variation

2009-03-03 Thread Igor Vaynberg
yeah, not to mention it might get quiet ugly

mypanel_style.html
mypanel_style__variant.html
mypanel_style__variant___locale.html

mypanel__variant.html

mypanel___locale.html

markup(locale)(style)(variant) might work and is simpler

mypanel(en_us).html

mypanel(en_us)()(variant).html

but sure looks ugly... :)

not sure which one is better

-igor


On Mon, Mar 2, 2009 at 11:30 PM, Ned Collyer  wrote:
>
> Yep :).
>
> I at least 1 thought on this matter.
>
> Currently, I have a "webapp" module - which will have my components in it,
> and my components variants.
>
> I have pushed all i18n into properties files - which is working thus far.
>
> I allow the clients to customise their HTML from another folder - ie,
> someplace on the filesystem outside of the war.
>
> The lookup for html files for me .. should be
>
> custom dir - myPanel_myVariant_myStyle.html
> webapp.war - myPanel_myVariant_myStyle.html
> custom dir - myPanel_myVariant.html
> webapp.war - myPanel_myVariant.html
> custom dir - myPanel_myStyle.html
> webapp.war - myPanel_myStyle.html
> custom dir - myPanel.html
> webapp.war - myPanel.html
>
> I have a similar thing in place for properties files - and the result is
> actually a merge of the properties between filesystem and classpath.
>
> So many ways to skin a cat.  If only we could skin this cat with locale,
> style AND variant - each optional.
>
> More static count of delimiters? Folder structure? Different delimiters?
> Different data in filename? Contents of file?
>
> The balancing act is keeping it simple - which its currently nailed, but not
> quite as useful as it could be!!!
>
>
> igor.vaynberg wrote:
>>
>> the problem is, if you have MyPanel_foo.html, is foo the style, the
>> variation, or the locale?
>>
>> perhaps we can identify the parts differently...needs some thinking.
>>
>> -igor
>>
>
> --
> View this message in context: 
> http://www.nabble.com/Question-re%3A-style-and-variation-tp22302526p22303708.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: Creating Detachable Lists

2009-03-03 Thread Jeremy Thomerson
It stays loaded until detach() is called, which is at the end of the
request, unless you explicitly call it sooner.  So, you're safe through the
entire request.

On Tue, Mar 3, 2009 at 9:43 AM, walnutmon  wrote:

>
> That means any time someone tries to access one of the objects, the entire
> list has to be retrieved from the database again, correct?  It seems that
> would be a drawback; is that a fair assessment?
> - Show quoted text -
>
>
> Jeremy Thomerson-5 wrote:
> >
> > Like this?
> >
> > new LoadableDetachableModel>() {
> >   public List load() {
> > return yourApp.howeverYouCreateYourList();
> >   }
> > }
> >
> > On Tue, Mar 3, 2009 at 9:30 AM, walnutmon 
> > wrote:
> >
> >>
> >> All,
> >>
> >> I have a list that I pass to various components, a pageable view, and
> >> dropdowns for example...
> >>
> >> After moving models to be detachable, there is a problem where the
> >> pageable
> >> view is only creating a detachable model on "populateItem()", therefore,
> >> the
> >> models are detachable only for the page (page being a page in a pageable
> >> view) that was last rendered.  I want to actually pass in a list of
> >> detachable models so that all items are detachable, instead of a regular
> >> list of objects that is converted into detachable models on render.
> >>
> >> There is an IteratorModelAdaptor, but that's for iterators, how would
> you
> >> best create a list of detachable models?  Or would I be better off with
> a
> >> DetachableModel() instead?  If so, how could you implement that?
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/Creating-Detachable-Lists-tp22310878p22310878.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
> >>
> >>
> >
> >
> > --
> > Jeremy Thomerson
> > http://www.wickettraining.com
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Creating-Detachable-Lists-tp22310878p22311144.html
> - Show quoted text -
> 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
>
>


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


Re: how to give static pages consistant look with wicket - partial repeat

2009-03-03 Thread Vika

I am having the same problem!


matrixguy wrote:
> 
> Hi,
> 
> The following code worked very nicely with the text in the HTML file, but
> it's not working with the embedded images in the HTML file. I have
> verified that wicket can find the images (so it's not the path issue for
> the images). It's as if wicket can find the images but not able to render
> them. :( Any ideas?
> 
> Thanks.
> 
> 
> 
> 
> igor.vaynberg wrote:
>> 
>> all you have to do is this:
>> 
>> mount(new indexedparamcodingstrategy("/static", StaticPage.class));
>> 
>> class staticpage extends MyBasePageWithDecoratingMarkup {
>>   private final String resource;
>>   public staticpage(PageParameters params) {
>> resource=params.get("0");
>> add(new Label("content", new PropertyModel(this,
>> "content")).setEscapeModelStrings(false));
>>   }
>> 
>>   public String getContent() {
>>  // load the resource content however you want
>>  InputStream is=new FileInputStream(basePath+"/"+resource);
>>  try {
>> return Streams.readIntoString(is);
>>  } finally { is.close(); }
>>   }
>> }
>> 
>> static.page.html: [wicket:extend][wicket:container
>> wicket:id="content"]content will be
>> here[/wicket:container][/wicket:extend]
>> 
>> then if you go to /static/myfile.html the contents of myfile.html will
>> be shown within your decorated page
>> 
>> -igor
>> 
>> On Wed, Feb 11, 2009 at 8:45 AM, Vika  wrote:
>>>
>>> I am looking at wicket trying to decide if i would want to use it for my
>>> project.
>>> Currently I am struggling trying to give static and dynamic pages
>>> consistent
>>> look with wicket without using sitemesh.  I was able to get wicket
>>> application to direct all static page requests to my wicket StaticPage
>>> that
>>> would read the content of a file and add it to the page as
>>> MultiLineLabel.
>>> However my problem is that i don't want to add whole html file. I need
>>> to
>>> extract the content of ,  and  tags and add these
>>> separately. Is there anything in api or any examples i should look at ?
>>>
>>> Please see the code below.
>>>
>>> in Aplication.java  init()
>>>
>>> mount(new URIRequestTargetUrlCodingStrategy("/docs")
>>>{
>>>@Override
>>>public IRequestTarget decode(RequestParameters
>>> requestParameters)
>>>{
>>>String path = "/app/" + getURI(requestParameters);
>>>return new PageRequestTarget(new StaticPage(new
>>> WebExternalResourceRequestTarget(path)));
>>>}
>>>});
>>> 
>>> in StaicPage.java
>>> public class StaticPage extends BasePage implements AuthenticatedWebPage
>>> {
>>>public StaticPage(WebExternalResourceRequestTarget
>>> staticResource)
>>>{
>>>String staticResourceContent = "";
>>>try {
>>>staticResourceContent =
>>>
>>> convertStreamToString(staticResource.getResourceStream().getInputStream());
>>>} catch (ResourceStreamNotFoundException e)
>>>{
>>>// TODO Auto-generated catch block
>>>e.printStackTrace();
>>>}
>>>add(new MultiLineLabel("staticContent",
>>> staticResourceContent));
>>>}
>>> }
>>> ---
>>> Here is what i get in the browser when click on static link:
>>>
>>> >> "http://www.w3.org/TR/html4/loose.dtd";>
>>> 
>>> 
>>> 
>>> Insert title here
>>> 
>>> 
>>> this is a test
>>> 
>>> 
>>> This is in the footer
>>> --
>>>
>>> Another variation of StaticPage.java i tried was
>>> public class StaticPage extends BasePage implements AuthenticatedWebPage
>>> {
>>>public StaticPage(WebExternalResourceRequestTarget
>>> staticResource)
>>>{
>>>MarkupResourceStream markupStream =
>>>new
>>> MarkupResourceStream(staticResource.getResourceStream());
>>>
>>>
>>>MarkupParser parser = new MarkupParser(markupStream);
>>>
>>>Markup markup = parser.parse();
>>>
>>> However I got stuck at this point since i still don't see a way of
>>> getting
>>> individual html tags from Markup
>>>
>>>
>>> thank you in advance,
>>>
>>> Vicky
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/how-to-give-static-pages-consistant-look-with-wicket---partial-repeat-tp21958254p21958254.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.

Please Please Portlet

2009-03-03 Thread Francisco Diaz Trepat - gmail
Hi all, I decided to ask for help, since last night I had nightmares of xml
files extrangulating me.
I read the portlet how-to in the wiki, probably misread it. I have an
application that has no portlet usage (as in no blabla extends blaportlet),
but I was told that all the application could be seen from inside a portle,
simply by configure xmls:

web.xml
portlet.xml
sun-web.xml

(using Netbeans, wicket 1.4rc2, glassfish v3, portlet-container from
open-portal project)


I have this on the web.xml:

   
  WicketFilter

 org.apache.wicket.protocol.http.WicketFilter

  
  
 portletOnlyFilter
 true
  

  
 detectPortletContext
 true
  


  
 configuration
 development
  

 
 filterMappingUrlPattern

/MyApplicationThatDoesNotWorkWithPortlet/*
  

I have this on the portlet.xml:


   
   MyApplicationThatDoesNotWorkWithPortlet
portlet version
   MyApplicationThatDoesNotWorkWithPortlet 
   MyApplicationThatDoesNotWorkWithPortlet -
Portlet

 
org.apache.wicket.protocol.http.portlet.WicketPortlet

  
wicketFilterPath
/MyApplicationThatDoesNotWorkWithPortlet
  

  -1
  
 */*
 VIEW
  
  
 MyApplicationThatDoesNotWorkWithPortlet

Portlet MyApplicationThatDoesNotWorkWithPortlet
  
   


finally I have this on the sun-web.xml:


  /MyApplicationThatDoesNotWorkWithPortlet
  
  

  Keep a copy of the generated servlet class' java
code.

  


Please, could someone help me out. I couldn't find a comprehensive guide to
these 3 xml file and I am sure that I am missing something.

f(t)


Re: Creating Detachable Lists

2009-03-03 Thread walnutmon

That means any time someone tries to access one of the objects, the entire
list has to be retrieved from the database again, correct?  It seems that
would be a drawback; is that a fair assessment?


Jeremy Thomerson-5 wrote:
> 
> Like this?
> 
> new LoadableDetachableModel>() {
>   public List load() {
> return yourApp.howeverYouCreateYourList();
>   }
> }
> 
> On Tue, Mar 3, 2009 at 9:30 AM, walnutmon 
> wrote:
> 
>>
>> All,
>>
>> I have a list that I pass to various components, a pageable view, and
>> dropdowns for example...
>>
>> After moving models to be detachable, there is a problem where the
>> pageable
>> view is only creating a detachable model on "populateItem()", therefore,
>> the
>> models are detachable only for the page (page being a page in a pageable
>> view) that was last rendered.  I want to actually pass in a list of
>> detachable models so that all items are detachable, instead of a regular
>> list of objects that is converted into detachable models on render.
>>
>> There is an IteratorModelAdaptor, but that's for iterators, how would you
>> best create a list of detachable models?  Or would I be better off with a
>> DetachableModel() instead?  If so, how could you implement that?
>> --
>> View this message in context:
>> http://www.nabble.com/Creating-Detachable-Lists-tp22310878p22310878.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
>>
>>
> 
> 
> -- 
> Jeremy Thomerson
> http://www.wickettraining.com
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Creating-Detachable-Lists-tp22310878p22311144.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: VOTE: Remove ? extends from constructor of DropDownChoice

2009-03-03 Thread walnutmon

It seems that the drop down should at least be able to take a ListModel,
but that doesn't work either...

I actually was just writing code to get around this right now.

DropDownChoice dd =
new DropDownChoice("foo",
new IModel>()
{
public List getObject()
{
return getListOfFoos();
}
   //some noops
});

Thoughts?


igor.vaynberg wrote:
> 
> i also dont remember using a compound property model...can we remove that?
> 
> -igor
> 
> On Mon, Mar 2, 2009 at 12:57 PM, James Carman
>  wrote:
>> Can you remember ever having to do either one of those?  I guess I
>> could see someone trying to do such a thing during the processing of
>> an AJAX request to perhaps make more stuff show up in the
>> DDC/ListView.  But, for that case, wouldn't it be easier to just
>> modify the underlying list (I assume they'd use a list because
>> anything else, such as an LDM, would tend to be read-only)?
>>
>> On Mon, Mar 2, 2009 at 3:47 PM, Igor Vaynberg 
>> wrote:
>>> depends on your coding style.
>>>
>>> -igor
>>>
>>> On Mon, Mar 2, 2009 at 12:44 PM, James Carman
>>>  wrote:
 Aren't both the "choices" model in DDC and the actual model of
 ListView supposed to be considered read-only (as far as the component
 is concerned)?  The DDC and ListView don't need to be able to alter
 those models anyway, right?  Perhaps my experience is just too
 limited, but I don't think I've ever tried to do either one of your
 usecases (I always consider them read-only).


 On Mon, Mar 2, 2009 at 3:24 PM, Igor Vaynberg 
 wrote:
> see WICKET-2126
>
> -igor
>
> On Mon, Mar 2, 2009 at 12:19 PM, James Carman
>  wrote:
>> I vote -0.99 on this (non-binding of course).  I'd vote +1 to making
>> ListView accept List rather than making DDC less
>> flexible.
>>
>> On Mon, Mar 2, 2009 at 3:11 PM, Brill Pappin  wrote:
>>> Ok, as suggested, here is the thread, and the first vote.
>>>
>>> +1
>>> for making the generic definition the same for all list type
>>> components.
>>>
>>> FYI -  you can also "vote" in the issue I just created at (which
>>> might
>>> actually be a better place to vote):
>>> https://issues.apache.org/jira/browse/WICKET-2137
>>>
>>> - Brill
>>>
>>>
>>>
>>>
>>> On 28-Feb-09, at 5:18 PM, Jeremy Thomerson wrote:
>>>
 Perhaps start a vote thread, with the subject something like:
 "VOTE:
 Remove
 ? extends from constructor of DropDownChoice".

 I'd be +1 non-binding


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


 On Sat, Feb 28, 2009 at 3:33 PM, Brill Pappin 
 wrote:

> I'm of the don't widen it camp anyway :)
>
> So how do I go about gathering support for having the
> DropDownChoice work
> with the models the way everything else does?
>
> - Brill
>
>
> On 28-Feb-09, at 1:42 AM, Igor Vaynberg wrote:
>
> yes, the choice was intentional. personally i do not care if it is
> 
>>
>> all the way, some users complained so we widened it on the
>> choices
>> model, we cannot widen it on the main model.
>>
>> -igor
>>
>> On Fri, Feb 27, 2009 at 8:51 PM, Brill Pappin 
>> wrote:
>>
>>> I see... but this would i think because Bar "is a" Foo:
>>>
>>> class Bar exends Foo {}
>>> List list = ...
>>> list.add(new Bar());
>>>
>>> Anyway, what your saying is that the generics choice was
>>> intentional?
>>>
>>> - Brill
>>>
>>>
>>>
>>> On 27-Feb-09, at 3:19 PM, Igor Vaynberg wrote:
>>>
>>> list stings=...

 strings.add("asd"); <== wont compile

 -igor

 On Fri, Feb 27, 2009 at 11:13 AM, Adriano dos Santos Fernandes
  wrote:

>
> What do you mean with "read only" here?
>
>
> Adriano
>
>
> Igor Vaynberg escreveu:
>
>>
>>  collections are read only, it would be too
>> inconvenient to make the model collection read only :)
>>
>> -igor
>>
>> On Thu, Feb 26, 2009 at 8:34 PM, Jeremy Thomerson
>>  wrote:
>>
>>
>>> This is what

Re: Creating Detachable Lists

2009-03-03 Thread Jeremy Thomerson
Like this?

new LoadableDetachableModel>() {
  public List load() {
return yourApp.howeverYouCreateYourList();
  }
}

On Tue, Mar 3, 2009 at 9:30 AM, walnutmon  wrote:

>
> All,
>
> I have a list that I pass to various components, a pageable view, and
> dropdowns for example...
>
> After moving models to be detachable, there is a problem where the pageable
> view is only creating a detachable model on "populateItem()", therefore,
> the
> models are detachable only for the page (page being a page in a pageable
> view) that was last rendered.  I want to actually pass in a list of
> detachable models so that all items are detachable, instead of a regular
> list of objects that is converted into detachable models on render.
>
> There is an IteratorModelAdaptor, but that's for iterators, how would you
> best create a list of detachable models?  Or would I be better off with a
> DetachableModel() instead?  If so, how could you implement that?
> --
> View this message in context:
> http://www.nabble.com/Creating-Detachable-Lists-tp22310878p22310878.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
>
>


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


Creating Detachable Lists

2009-03-03 Thread walnutmon

All, 

I have a list that I pass to various components, a pageable view, and
dropdowns for example...

After moving models to be detachable, there is a problem where the pageable
view is only creating a detachable model on "populateItem()", therefore, the
models are detachable only for the page (page being a page in a pageable
view) that was last rendered.  I want to actually pass in a list of
detachable models so that all items are detachable, instead of a regular
list of objects that is converted into detachable models on render.

There is an IteratorModelAdaptor, but that's for iterators, how would you
best create a list of detachable models?  Or would I be better off with a
DetachableModel() instead?  If so, how could you implement that?
-- 
View this message in context: 
http://www.nabble.com/Creating-Detachable-Lists-tp22310878p22310878.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: InstanceAlreadyExistsException when Redeploying in Websphere

2009-03-03 Thread shetc

Ok, no need for a JIRA -- it was operator failure that caused the problem
(that would be me, BTW).

The InstanceAlreadyExistsException was caused by having 2 copies of the
wicket-jmx-1.3.5.jar file
in the app's WEB-INF/lib directory. The 2nd copy was in a subdirectory -- I
had put it there while
experimenting with Wicket version 1.4. Solution: remove the 2nd copy.

Now the issue with the "WicketRuntimeException: signin is already mounted
for BookmarkablePageEncoder"
issue I think may have something to with WebSphere. Once I removed the
wicket.mbean.server.agentid=WebSphere JVM setting from the app server then
the problem
went away.

-- 
View this message in context: 
http://www.nabble.com/InstanceAlreadyExistsException-when-Redeploying-in-Websphere-tp15617038p22310588.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



DatePicker icon change?

2009-03-03 Thread Edwin Ansicodd

using org.apache.wicket.extensions.yui.calendar.DatePicker.  An icon of a
calendar day, with a red stripe on top and a 17 in a field of white appears
for the DatePicker.  Is there an easy way we can change this icon?  

It looks like it is
resources/org.apache.wicket.extensions.yui.calendar.DatePicker/icon1.gif
-- 
View this message in context: 
http://www.nabble.com/DatePicker-icon-change--tp22310554p22310554.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 pages as plugin

2009-03-03 Thread Sébastien Piller

We use iframes for that. It works quite well.

Stefan Lindner wrote:

Dear wicket users and wizzards!

Is ist possible to use wicket to implement "partial" pages that can be
embedded into another page? E.g. to have a normal content management
system like Joomla and use wicket top lug it into exisiting pages for
some dynamic, database driven content? The HTML that is created by
wicket must not contain the usual ... part.

Any Ideas hints?

Stefan

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


  



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



Wicket pages as plugin

2009-03-03 Thread Stefan Lindner
Dear wicket users and wizzards!

Is ist possible to use wicket to implement "partial" pages that can be
embedded into another page? E.g. to have a normal content management
system like Joomla and use wicket top lug it into exisiting pages for
some dynamic, database driven content? The HTML that is created by
wicket must not contain the usual ... part.

Any Ideas hints?

Stefan

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



Portlet 1.0 on Wicket 1.4?

2009-03-03 Thread German Morales
Hi all,

I've been reading in different threads that Wicket 1.4 already supports
Portlet 2.0 API.
We are already trying it with different success, in different portals.

We have an application being developed in Wicket 1.3.5 (last stable release
so far), and we planned to switch to 1.4.
But customers have yet not migrated to portals with Portlet 2.0 support, and
perhaps they won't in some (long) time.
That means that perhaps we get stuck in wicket 1.3.x, or we have to maintain
2 versions (since wicket 1.4 is not compatible with 1.3).

So i was thinking... what are the chances of getting Portlet-1.0-only
support in Wicket 1.4?
Could the portlet support in wicket 1.4 be separated somehow, so we can plug
Portlet 1.0 for some customers, Portlet 2.0 for others?

Thanks in advance,

German


Re: Help with SecondLevelCache and Serialization

2009-03-03 Thread behrica

Yes, it might be the same problem I had with the serialization.
Could you maybe paste your stack trace and let me know the JIRA id, so I can
track it.

You mentioned you had an other configuration which the HttpSessionStore.
What is this and how can it be enabled ? 

Thanks,

Carsten



Victor Igumnov-4 wrote:
> 
> Igor,
> 
> Thanks for the confirmation, this is exactly what I thought. I will  
> submit a bug report now.
> 
> This seems exactly like that other issue that someone had with JBoss  
> clustered sessions.
> 
> On Mar 2, 2009, at 1:35 PM, Igor Vaynberg wrote:
> 
>> when you construct it using the first example you showed (anonymous
>> class) the ldm is carrying a reference to the page on which it is
>> constructed. so your editblogpage is indirectly holding onto the
>> instance of the previous page, perhaps that is what is causing the
>> problem. please file a jira issue.
>>
>> -igor
>>
>>
>> On Mon, Mar 2, 2009 at 1:30 PM, Victor Igumnov > > wrote:
>>> I have been running on the HttpSessionStore for a good year now.
>>> HttpSessions are clustered and have been working fine for all this  
>>> time. As
>>> of recently I have switched to SecondLevelCache and DiskPageStore  
>>> to avoid
>>> HttpSession bloat and still have fail over.
>>>
>>> I have run into an odd issue with serialization which throws a  
>>> stackoverflow
>>> exception. Here is the cause:
>>>
>>> Passing an LDM model as-is to a page, it will stackoverflow on the  
>>> receiving
>>> page, if that page is refreshed twice or a form has been submitted.
>>>
>>> Here is an example...
>>>
>>> setResponsePage(new EditBlogPage(new  
>>> LoadableDetachableModel() {
>>>private static final long serialVersionUID = 1L;
>>>@Override
>>>protected Blog load() {
>>>// just an example
>>>return new Blog();
>>>}
>>>
>>> }));
>>>
>>> However, if I subclass the LDM and pass it like so, it will work  
>>> just fine.
>>>
>>> public class FakeLDM extends LoadableDetachableModel {
>>>private static final long serialVersionUID = 1L;
>>>
>>>@Override
>>>protected Blog load() {
>>>return new Blog();
>>>}
>>> }
>>>
>>> setResponsePage(new EditBlogPage(new FakeLDM()));
>>>
>>> One last thing, If I construct the LDM inside the receiving page.  
>>> It will
>>> work fine as well.
>>>
>>> This seems to only happen with the SecondLevelCache, any ideas?
>>>
>>> -
>>> 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
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Help-with-SecondLevelCache-and-Serialization-tp22297221p22307250.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: Browser opens a dialog box for text/html Resource

2009-03-03 Thread Arie Fishler
Got that figured out. Actually it is in the book. Using
RequestCycle.get().setRequestTarget(target); with a submit button. This also
opens it up with no dialog box.

On Mon, Mar 2, 2009 at 7:43 PM, Arie Fishler  wrote:

>  - Show quoted text -
>
>   Hi,
>>
>> I am integrating some reports using the JasperReports integration classes
>> found in the Wicket stuff.
>>
>> Basically I have a class that extends  DynamicWebResource
>>
>> It is linked using a ResourceLink that triggers its output.
>>
>> Content type is returned as text/html.
>>
>> Why is the browser asking me before opening it? I want it to automatically
>> open in a new window just as it dows when I approve the dialog box.
>>
>> On another level, as I specified the output is triggered using a
>> ResourceLink on the page. How do I trigger the output when I want to put a
>> form and a submit link on the page. This means I want to create the Resource
>> on submit and trigger its output based on the form selections not as a
>> direct link on the pgae.
>>
>> Thanks,
>> Arie
>>
>


RE: Migration from servlet to filter always serves WebApplication.getHomePage() when I click on links

2009-03-03 Thread harri.temonen
Hi,

I struggled with similar problems with OC4J.

Unorthodoxid solution we found was:
Add index.html into context root - no matter what is the content of it.

However, you cannot use this solution with Weblogic (10).

Br Harri
Ps. Check this also: 
http://www.nabble.com/Wicket-cannot-work-on-OC4J-%28ias-10g%29--td16738242.html#a16738242


>-Original Message-
>From: ext mallet [mailto:ryanlahue...@gmail.com] 
>Sent: 03 March, 2009 01:20
>To: users@wicket.apache.org
>Subject: Re: Migration from servlet to filter always serves 
>WebApplication.getHomePage() when I click on links
>
>
>Thanks for the quick response Igor.  I'm running OC4J... I 
>changed the mapping as you suggested but am now getting a 
>"403/Directory browsing not allowed."  Once I find a way to 
>coerce oc4j into allowing directory browsing I will post an 
>update -- having some trouble getting my orion-web.xml changes 
>to take, but this is not a wicket issue.
>
>
>igor.vaynberg wrote:
>> 
>> try with /* mapping and see if it works
>> 
>> you are not running this on websphere are you?
>> 
>> -igor
>> 
>> On Mon, Mar 2, 2009 at 2:12 PM, mallet 
> wrote:
>>>
>>> Hello,
>>>
>>> I am using 1.3 and a servlet for Wicket in my web.xml, which I've 
>>> pasted below.  I am trying to change to using a Filter 
>instead, which 
>>> I also pasted below, but I get a weird behavior -- my 
>>> WebApp.getHomePage() is served every time I click on a link.  The 
>>> links work fine when I use the servlet, and I followed the 
>migration 
>>> guide ( 
>>> 
>http://cwiki.apache.org/WICKET/migrate-13.html#Migrate-1.3-Filterinst
>>> eadofaServlet ), so I am not sure why I am getting this behavior.  
>>> Any ideas?
>>>
>>> ---
>>> 
>>> 
>>>  MyWebApp
>>>
>>> 
>org.apache.wicket.protocol.http.WicketServlet>> -class>
>>>    
>>>      applicationClassName
>>>      my.WebApp
>>>    
>>>  1
>>> 
>>>
>>> 
>>>  MyWebApp
>>>  /app/*
>>> 
>>>
>>> ---
>>> 
>>> 
>>>  MyWebApp
>>>  
>>> 
>org.apache.wicket.protocol.http.WicketFilter>> ass>
>>>    
>>>      applicationClassName
>>>      my.WebApp
>>>    
>>> 
>>>
>>> 
>>>  MyWebApp
>>>  /app/*
>>> 
>>> --
>>> View this message in context:
>>> 
>http://www.nabble.com/Migration-from-servlet-to-filter-always-serves-
>>> 
>WebApplication.getHomePage%28%29-when-I-click-on-links-tp22298026p222
>>> 98026.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
>> 
>> 
>> 
>
>--
>View this message in context: 
>http://www.nabble.com/Migration-from-servlet-to-filter-always-s
>erves-WebApplication.getHomePage%28%29-when-I-click-on-links-tp
22298026p22299235.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: Repeater that disposses content after rendering?

2009-03-03 Thread Bert
That was my first idea and i checked the javadoc and source (without
following too deep
into the stack (DefaultItemReuseStrategy is where this is done?).

Good to know that the RefreshingView is behaving like this, i use it
rather often.

Thanks for the reply,
Bert

On Tue, Mar 3, 2009 at 09:43, Martijn Dashorst
 wrote:
> RefreshingView?
>
> Martijn

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



Re: Repeater that disposses content after rendering?

2009-03-03 Thread Martijn Dashorst
RefreshingView?

Martijn

On Tue, Mar 3, 2009 at 8:13 AM, Bert  wrote:
> Hi,
>
> perhaps this does not make sense, but is there a Component that
> discards all child components after the rendering, before
> the serialization?
>
> Would this make sense for components that render a large amount
> of child's (tables with many cells) where all of them could be
> reconstructed from a LDM in the repeater? Would this save space
> in the page store / session?
>
> Thanks in advance.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>



-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.3.5 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

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



Re: [off topic] was: VOTE: Remove ? extends from constructor of DropDownChoice

2009-03-03 Thread Martijn Dashorst
It would make writing books, giving presentations and tutorials *that*
much simpler ...

Martijn

On Tue, Mar 3, 2009 at 5:42 AM, Jan Kriesten  wrote:
>
>> i also dont remember using a compound property model...can we remove that?
>
> hehe - i haven't used that either.
>
> + 1 on removing cpm! ;-)
>
> Best reagards, --- Jan.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>



-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.3.5 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

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