Re: Possible to retrieve previous page from PageMap

2009-03-13 Thread pixologe

Just a thought which I did not think about when implementing this (thus I had
to change this stuff all over afterwards), perhaps it helps someone avoiding
the same mistake:

The latest rendered page is not neccessarily the page that lead the user to
the current page.
I.e. retrieving the last page this way might result in strange behavior if
the user uses two browser windows or tabs simulaneously. Same applies for
clicking the browser's back button.

Thus I had to go back to a rather old-fashioned solution, where every link
hands over a page param :-/ like in the good old days ;-)





rolandpeng wrote:
> 
> great! after delare a ineer class below:
>   class PageIdVersion {
>   public int id;
>   public int version;
>   public PageIdVersion last;
>   }
> then the track function works.
> 
> 
> John Patterson wrote:
>> 
>> 
>>  // must declare hash map because meta data must be serializable
>>  private MetaDataKey> lastPageIdVersionKey
>> = new MetaDataKey>() {};
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Possible-to-retrieve-previous-page-from-PageMap-tp20861106p22492628.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: Large Scale Applications using Wicket

2009-03-13 Thread pixologe

Serialization is not that bad.

Just take care not to serialize all your domain model objects (use
LoadableDetachableModel/DataView/DataProvider)

Perhaps you might want to have a look at DiskPageStore, too.



subbu_tce wrote:
> 
> Do we have any Clustering Solutions other than Terracotta that can
> integrate with Wicket to avoid serialization of pages to support
> development of applications in a large scale?
> 
> Thanks,
> Subbu.
> 

-- 
View this message in context: 
http://www.nabble.com/Large-Scale-Applications-using-Wicket-tp22489752p22491990.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: DropDownChoice without preselection and without 'Please choose one'

2009-02-23 Thread pixologe

Hi Johan, hi Martin,

Just for the sake of completeness:
Having
select.null=
select.nullValid=
as string resources, an empty option is displayed as first item if nullValid
is true.
If it is false, there is still the 'Please choose one' option.

Anyway, I'll stick to the ListMultipleChoice solution I have described
before, it might not be the most elegant one, but I think the code is more
comprehensive this way.

Thanks again for your input on this.


Martin Makundi wrote:
> 
> DId you try setting the .null <- property value? If null
> is valid then try .nullValid , see
> 

-- 
View this message in context: 
http://www.nabble.com/DropDownChoice-without-preselection-and-without-%27Please-choose-one%27-tp22120191p22159080.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: DropDownChoice without preselection and without 'Please choose one'

2009-02-20 Thread pixologe

just had a deeper look at AbstractSingleChoice.
looks as if it did exactly this when the ###.null string resource is empty.

I will check that out tomorrow.

Thank you guys :)



jcompagner-2 wrote:
> 
> override the getDefaultChoice() and generate a  (yes
> empty)
> and the if selected is also empty generate 
> 

-- 
View this message in context: 
http://www.nabble.com/DropDownChoice-without-preselection-and-without-%27Please-choose-one%27-tp22120191p22125833.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: DropDownChoice without preselection and without 'Please choose one'

2009-02-20 Thread pixologe

Sorry, just saw your message.

Didn't know about the .null thing... quite confusing.

I will try this tomorrow.

Thanks a lot



Martin Makundi wrote:
> 
> DId you try setting the .null <- property value? If null
> is valid then try .nullValid , see
> http://wicket.sourceforge.net/apidocs/wicket/markup/html/form/DropDownChoice.html
> 
> **
> Martin
> 
> 2009/2/20 pixologe :
>>
>> I tried overriding getDefaultChoice already, returning an empty string,
>> this
>> did not work, unfortunately.
>>
>> The 'Please choose one' option is not rendered, however the first
>> 'normal'
>> option gets selected instead.
>> Also, inside AbstractSingleSelectChoice, there remains an empty string in
>> the options list, letting my ChoiceRenderer stumble when it tries to
>> interpret my idExpression :(
>>
>> If there are any more ideas regarding to this, please let me know.
>>
>> Thanks so far!
>>
>> btw.: nullValid is the correct 'Please choose one' string resource key
>>
>>
>>
>> Sergio García wrote:
>>>
>>> I guess that if you simply override the dropdownchoice i18n property
>>> value
>>> for that component/page with a plain "" it may work.
>>>
>>> DropDownChoice property key for "Please choose one" is "null", or at
>>> least
>>> i remember that.
>>>
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/DropDownChoice-without-preselection-and-without-%27Please-choose-one%27-tp22120191p22120404.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/DropDownChoice-without-preselection-and-without-%27Please-choose-one%27-tp22120191p22125830.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



Solved: DropDownChoice without preselection and without 'Please choose one'

2009-02-20 Thread pixologe

I have found a solution for this after all, not quite elegant, but works like
charm :)


new ListMultipleChoice("select",new Model(new ArrayList(0)), new
PropertyModel(this, "choices"), renderer) {
@Override
protected void onComponentTag(ComponentTag tag) {
super.onComponentTag(tag);
tag.getAttributes().remove("multiple");
}
};


The trick is to use the multiselect component (because this one neither
requires preselection nor nullValid option.
Having an empty list in the model means nothing is preselected.
Since I do not want it to be multi-selectable, I removed the attribute by
overwriting onComponentTag. 

Thats it :)


-- 
View this message in context: 
http://www.nabble.com/DropDownChoice-without-preselection-and-without-%27Please-choose-one%27-tp22120191p22120439.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: DropDownChoice without preselection and without 'Please choose one'

2009-02-20 Thread pixologe

I tried overriding getDefaultChoice already, returning an empty string, this
did not work, unfortunately.

The 'Please choose one' option is not rendered, however the first 'normal'
option gets selected instead.
Also, inside AbstractSingleSelectChoice, there remains an empty string in
the options list, letting my ChoiceRenderer stumble when it tries to
interpret my idExpression :(

If there are any more ideas regarding to this, please let me know.

Thanks so far!

btw.: nullValid is the correct 'Please choose one' string resource key



Sergio García wrote:
> 
> I guess that if you simply override the dropdownchoice i18n property value
> for that component/page with a plain "" it may work.
> 
> DropDownChoice property key for "Please choose one" is "null", or at least
> i remember that.
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/DropDownChoice-without-preselection-and-without-%27Please-choose-one%27-tp22120191p22120404.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



DropDownChoice without preselection and without 'Please choose one'

2009-02-20 Thread pixologe

Hi everybody,

I might just be out of it or missing a clue - I'd just like to have a
DropDownChoice without preselection and without 'Please choose one' option.
Is this possible? How can I achieve this?

Thanks in advance + regards
-- 
View this message in context: 
http://www.nabble.com/DropDownChoice-without-preselection-and-without-%27Please-choose-one%27-tp22120191p22120191.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: Modify textfield input before validation

2008-12-12 Thread pixologe

That's right - but if the devs regard this as abuse, there's no guarantee
that this still works in the next version. That's why I wondered what is the
intended way of doing stuff like this.
Obviously there is none :-/



Peter Ertl wrote:
> 
> Just because converter can convert 'from' and 'to' doesn't mean you  
> can't use it for one direction only
> 
> Am 12.12.2008 um 13:01 schrieb pixologe:
> 
>>
>> seems to be igor's point of view, at least:
>> http://www.nabble.com/append-a-converter-or-coversion-function-td15921777.html#a15964449
>>
>>
>> Peter Ertl wrote:
>>>
>>> I really wonder why converters are not the right thing to do?
>>>
>>
>> -- 
>> View this message in context:
>> http://www.nabble.com/Modify-textfield-input-before-validation-tp20952903p20974347.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/Modify-textfield-input-before-validation-tp20952903p20979572.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: Modify textfield input before validation

2008-12-12 Thread pixologe

seems to be igor's point of view, at least:
http://www.nabble.com/append-a-converter-or-coversion-function-td15921777.html#a15964449


Peter Ertl wrote:
> 
> I really wonder why converters are not the right thing to do?
> 

-- 
View this message in context: 
http://www.nabble.com/Modify-textfield-input-before-validation-tp20952903p20974347.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: Modify textfield input before validation

2008-12-11 Thread pixologe

Please note that these were just examples, not actual use cases of mine
(apart from the URL stuff).

Anyway, I think there are quite some use cases where fixing/optimizing user
input makes sense. I've always thought converters would be the way to go,
but just recently read that they aren't.

Having stuff like this done in the domain object's setter is far to backend
for my taste. As this feature addresses user interaction, I think it is
rather a matter of presentation, and I would not think that my domain object
should have to care. Worse, using this scenario it would not be possible to
use wicket's validation behavior _after_ doing the modification. One could
use a model as well, then.



kan-4 wrote:
> 
> As I remember, wicket trims spaces already, so you don't need do
> anything special about it.
> 
> For DB, if you use hibernate (or if not, anyway you should have data
> objects for your business entities), you can have something like that:
> public class MyEntity
> {
> // This is mapped to database, but not for public, only database will use
> it.
>   private String siteUrlStr;
> // this is your public interface:
>   public SiteUrl getSiteUrl(){return new SiteUrl(getSiteUrlStr());}
>   public void setSiteUrl(SiteUrl url){siteUrlStr = url.getStr();}
> }
> 
> And in code the lists should be treated as List, Collection or so, not
> as comma-separated strings (only in some particular places like
> persisting in database or in user interface).
> 
> 2008/12/11 pixologe :
>>
>> Thanks for your ideas...
>>
>> But huh... is there really no "wicket way" to achieve this?
>>
>> After all I would not think that it is uncommon to fix simple things in
>> user
>> input before validation, e.g. trim strings, discard empty items in comma
>> separated lists etc.
>>
>> Your solutions would work both I think, I just do not like the idea of
>> doing
>> things like these with javascript.
>> Also, retrieving a String value from DB and wrapping it into an object
>> just
>> in order to be able to convert it back does not seem right to me...
>>
>> I'll probably stick to the js solution (reluctantly ;-), but if there is
>> really no elegant way, I would love to see one in future wicket versions.
>>
>> Thanks for inspiration!
>> best regards
>> --
>> View this message in context:
>> http://www.nabble.com/Modify-textfield-input-before-validation-tp20952903p20956050.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
> 
> 
> 
> -- 
> WBR, kan.
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Modify-textfield-input-before-validation-tp20952903p20963023.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: Modify textfield input before validation

2008-12-11 Thread pixologe

Thanks for your ideas...

But huh... is there really no "wicket way" to achieve this?

After all I would not think that it is uncommon to fix simple things in user
input before validation, e.g. trim strings, discard empty items in comma
separated lists etc.

Your solutions would work both I think, I just do not like the idea of doing
things like these with javascript.
Also, retrieving a String value from DB and wrapping it into an object just
in order to be able to convert it back does not seem right to me...

I'll probably stick to the js solution (reluctantly ;-), but if there is
really no elegant way, I would love to see one in future wicket versions.

Thanks for inspiration!
best regards
-- 
View this message in context: 
http://www.nabble.com/Modify-textfield-input-before-validation-tp20952903p20956050.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Modify textfield input before validation

2008-12-11 Thread pixologe

Hi all,

How can/should modification of (textual) user input be implemented, so that
it runs before validation?
(e.g. prepend a URL with "http://"; if the user did not do so)

My thoughts were:

IConverter - but other threads on the list point out that it is only to be
used for type conversion, not for String->String conversion.

IModel - but setObject is called after validation.

IValidator - but IValidatable has not setValue, thus modification is not
possible here.

Thanks for any hints and regards
-- 
View this message in context: 
http://www.nabble.com/Modify-textfield-input-before-validation-tp20952903p20952903.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Possible to retrieve previous page from PageMap

2008-12-05 Thread pixologe

Ah - I see, SLCPM is private :(
Thanks for the link, this solution works fine :)


Jeremy Thomerson-5 wrote:
> 
> Here's a post from Jon Locke about this:
> http://web.mac.com/jonathan.locke/iWeb/JonathanLocke/Blog/C68818AE-E983-4D7A-B6BF-E95CD886BFF2.html
> 
> On Fri, Dec 5, 2008 at 1:40 PM, pixologe <[EMAIL PROTECTED]> wrote:
> 
>>
>> Hi there,
>>
>> is there a way to retrieve the previous page from the PageMap? Or at
>> least
>> its class?
>>
>> I can see that it is in there (private), but as I see it the API does not
>> seem to let me access it... or did I miss something?
>>
>> In our current case we would need to display a specific info only if the
>> user came from a specific page.
>> We are using BookmarkablePageLink with mounts and are keen on keeping our
>> URLs as clean as possible, thus we would like to avoid passing a page
>> classname around with every request or similar.
>>
>> Thanks a lot for any hints.
>>
>> Best regards.
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Possible-to-retrieve-previous-page-from-PageMap-tp20861106p20861106.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 
> -- 
> Jeremy Thomerson
> http://www.wickettraining.com
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Possible-to-retrieve-previous-page-from-PageMap-tp20861106p20863091.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Possible to retrieve previous page from PageMap

2008-12-05 Thread pixologe

For once, I can answer my own question.

I just realized that I can cast the PageMap to SecondLevelCachePageMap,
which lets me access lastPage.

Don't know if this is the best solution, but it should work as long as I do
not provide another PageMap myself.

If there is a more elegant solution, I'd still like to hear it though.
Cheers.
-- 
View this message in context: 
http://www.nabble.com/Possible-to-retrieve-previous-page-from-PageMap-tp20861106p20861258.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Possible to retrieve previous page from PageMap

2008-12-05 Thread pixologe

Hi there,

is there a way to retrieve the previous page from the PageMap? Or at least
its class?

I can see that it is in there (private), but as I see it the API does not
seem to let me access it... or did I miss something?

In our current case we would need to display a specific info only if the
user came from a specific page.
We are using BookmarkablePageLink with mounts and are keen on keeping our
URLs as clean as possible, thus we would like to avoid passing a page
classname around with every request or similar. 

Thanks a lot for any hints.

Best regards.

-- 
View this message in context: 
http://www.nabble.com/Possible-to-retrieve-previous-page-from-PageMap-tp20861106p20861106.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: How to feed ListMultipleChoice with comma separated String via PropertyModel)

2008-12-04 Thread pixologe

Thanks for the reply...
that's exactly what I just tried, until I realized that this will not work
for writing the selected options back to the my domain object... at least I
think so:
I can teach the model to accept either String and List in setObject, however
there's no way of letting it return different types in getObject, depending
on the requestor...
Or am I just completely on the wrong track and missing something quite
obvious? Probably ;-)


jwcarman wrote:
> 
> I would just create a model that wraps the property model and does the
> conversion.
> 
> On Thu, Dec 4, 2008 at 9:12 AM, pixologe <[EMAIL PROTECTED]> wrote:
> 
>>
>> Hi everybody,
>>
>> I wonder if there is an elegant way to feed a ListMultipleChoice
>> component
>> with a comma separated string (using a PropertyModel)
>>
>> e.g. with the following property to be accessed by PropertyModel:
>>
>> public String getMySelectedOptions() {
>> return "optionA,optionC";
>> }
>>
>>
>> ...something like this:
>>
>> List allOptions = Arrays.asList(new
>> String[]{"optionA","optionB","optionC","optionD"});
>> new CheckBoxMultipleChoice("genreChoice", new PropertyModel(getModel(),
>> "mySelectedOptions")), allOptions);
>>
>> Of course this does not work. But is there a elegant solution to make it
>> work? I am thinking of something acting similar to a converter for text
>> input fields, just the other way round :)
>>
>> Thanks for any inspiration
>> --
>> View this message in context:
>> http://www.nabble.com/How-to-feed-ListMultipleChoice-with-comma-separated-String-via-PropertyModel%29-tp20834160p20834160.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-feed-ListMultipleChoice-with-comma-separated-String-via-PropertyModel%29-tp20834160p20835144.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



How to feed ListMultipleChoice with comma separated String via PropertyModel)

2008-12-04 Thread pixologe

Hi everybody,

I wonder if there is an elegant way to feed a ListMultipleChoice component
with a comma separated string (using a PropertyModel)

e.g. with the following property to be accessed by PropertyModel:

public String getMySelectedOptions() {
return "optionA,optionC";
}


...something like this:

List allOptions = Arrays.asList(new
String[]{"optionA","optionB","optionC","optionD"});
new CheckBoxMultipleChoice("genreChoice", new PropertyModel(getModel(),
"mySelectedOptions")), allOptions);

Of course this does not work. But is there a elegant solution to make it
work? I am thinking of something acting similar to a converter for text
input fields, just the other way round :)

Thanks for any inspiration
-- 
View this message in context: 
http://www.nabble.com/How-to-feed-ListMultipleChoice-with-comma-separated-String-via-PropertyModel%29-tp20834160p20834160.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Pretty url for tabs

2008-11-13 Thread pixologe

ahhh sorry my fault.

of course i meant TabbedPanel and AbstractTab.

Stateless* are the names of the classes I created...

Sorry!


rmoskal wrote:
> 
> Thanks, that seems super straight forward as I've come to expect from
> wicket.  Only one thing, there doesn't seem to be a StatelessTabbedPanel
> or a StatelessTab in the distribution.
> 
> Regards,
> 
> Robert
> 
> 
> 
> pixologe wrote:
>> 
>> Well, when I think of it the word "exactly" is not right - of course,
>> there's no page versioning and no colons here, since
>> bookmarkablepagelinks are used... this thing works the stateless way when
>> switching tabs. But this way you can have nice urls like
>> [...]/yourPage/yourTabname/
>> 
>> 
>> pixologe wrote:
>>> 
>>> I had exactly the same use case 
>>> 
>> 
>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Pretty-url-for-tabs-tp20451052p20486094.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Pretty url for tabs

2008-11-13 Thread pixologe

Well, when I think of it the word "exactly" is not right - of course, there's
no page versioning and no colons here, since bookmarkablepagelinks are
used... this thing works the stateless way when switching tabs. But this way
you can have nice urls like [...]/yourPage/yourTabname/


pixologe wrote:
> 
> I had exactly the same use case 
> 



-- 
View this message in context: 
http://www.nabble.com/Pretty-url-for-tabs-tp20451052p20477547.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Pretty url for tabs

2008-11-13 Thread pixologe

Hi,

I had exactly the same use case and solved it as follows - works like charm
(unfortunately I cannot share the code):

extend StatelessTab (each instance to be constructed with its pageparameter
value

extend StatelessTabbedPanel,
constructor with the pageparameter key
override newLink to return a bookmarkablepagelink for each tab
override onbeforerender to set the selected tab dependent on the page's
pageparameter

perhaps you'd also want to adopt pageparameters of the previous request when
switching tabs when generating the links.

hope this helps, cheers :)


rmoskal wrote:
> 
> I'm familiar with the a lot of the strategies that make for nicer urls in
> Wicket, but am at a loss for how to make the urls for a tabpanel
> friendlier.
> 
> Instead of /Home:1:1, /Home:2:1, etc.
> 
> I'd like to have  /Home:Account:1, /Home:Alerts:1, etc.
> 
> It would be nice to lose the last bit on the right, but I could live with
> it if it messes with wickets state maintaining ability.
> 
> Has anyone had a client pester them for this?
> 
> Thanks and regards,
> 
> Robert Moskal
> Brooklyn, USA
> 

-- 
View this message in context: 
http://www.nabble.com/Pretty-url-for-tabs-tp20451052p20477380.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Is there a way to get stateless DDC with onchange notification?

2008-10-16 Thread pixologe

You could simply extend DropDownChoice, overriding
wantOnSelectionChangedNotifications to return true.
Override onSelectionChanged also, and in there you can call
setResponsePage(...) to redirect to your other pages.

Works fine for me.

Hope this helps...



Ritesh Trivedi wrote:
> 
> Well if I understand it correctly, a component embedded inside (otherwise
> stateless) bookmarkable page checks if the page instance exists if not the
> page is to be newly created from the params or default constructor. So the
> page and the DDC doesnt necessarily have to be statefull.
> 
> As about what I want to do - I just have a plain list of drop down items
> and depending on the one selected, I need to redirect to the bookmarkable
> page for the item. DDC values can just be ids which will be passed as
> bookmarkable param and will be used to look up the details of that entity.
> 
> 
> Johan Compagner wrote:
>> 
>> It is statefull then because it has a callback to that page instance
>> and component. What do you want do do in the onchange method?
>> 
>> On 10/15/08, Ritesh Trivedi <[EMAIL PROTECTED]> wrote:
>>>
>>> Hi,
>>>
>>> Is there a way to get stateless DDC with onchange notifications? Also
>>> would
>>> be helpful if someone could explain why the wantOnChangeNotification
>>> makes
>>> DDC stateful even if its enclosed within stateless form and in the
>>> stateless
>>> bookmarkable page?
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Is-there-a-way-to-get-stateless-DDC-with-onchange-notification--tp19985764p19985764.html
>>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>>
>>>
>>> -
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>> 
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Is-there-a-way-to-get-stateless-DDC-with-onchange-notification--tp19985764p20016189.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Pure client side validation

2008-09-30 Thread pixologe

Hi Harry, 

Well, it should be possible to create a Behavior taking care of stuff
this...

e.g. like 
textField.add(new ClientSideRequiredValidationBehavior(myErrorLabel));

ClientSideRequiredValidationBehavior should override onComponentTag then to
add onchange/onblur javascript code to your input field which updates
myErrorLabel in case of error (or does something else).

You would merely be adding javascript behavior to your input tag then, which
would of course not act like normal wicket validators. And you would have to
implement validation in javascript manually again, which would cause some
redundancy, because there should definitely be server side validation on
form submission as you cannot trust the data coming in from a client.

Hope this helps...
Cheers :)


harrypitt wrote:
> 
> Hi,
> 
> The company I'm working for is evaluating different java-web-frameworks
> and it seems that Wicket or JSF will be the winner (To be honest, my
> personal opinion is that Wicket is the far better choice). In this
> evaluation i have to make sure if the framework supports pure (java
> script) client side validation.
> 
> As far as i know Wicket "only" supports client side validation with ajax
> requests. This solution is not satisfying for us, because we want to use
> the framework to create huge forms which are used by many people. And we
> think it would be a hard job for our servers to process all that requests.  
> 
> My question: Is it possible to create light weight validators (like
> required validator) that are working with java script and act like normal
> wicket validators:  
> 
> textField.add(new ClientSideRequiredValidator());
>   
> I know that this topic was discussed in the mailing list many times, but i
> haven't found a real solution for this.  
> 
> Harry
> 
>  
> 

-- 
View this message in context: 
http://www.nabble.com/Pure-client-side-validation-tp19737383p19740821.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: RepeatingView: add new component at specified index

2008-09-30 Thread pixologe

Hi there,

insert using AJAX? 

Couldn't you just alter the underlying List as you like it, and have the
whole RepatingView redrawn by adding it to the AjaxRequestTarget...?

Or are you thinking of something more special?

Cheers



Edgar Merino wrote:
> 
> Hello,
> 
> is there any way to control the underlaying Collection a 
> WebMarkupContainer holds? So I can control where to insert the new 
> components to be added (with an index, for example). Thanks in advance.
> 
> Edgar Merino
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/RepeatingView%3A-add-new-component-at-specified-index-tp19739732p19740339.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Markup for disabled Link - Proposal (add behavior instead of markup)

2008-09-19 Thread pixologe

Thanks for inspiration, igor. :)
Well, it would not help the mentioned problem of not being able to change
the style of an element depending on its child elements. However, as I
thought about this, I realized that I could do some global changes in the
weird templates and stylesheets I got, so CSS could differentiate by
a.myClass and span.myClass. As these changes would cause a lot of
side-effects in the files, I think I'll better stick with the
AttributeAppender I've currently got in there.

Still I think that having markup in Java strings as well as using [em] to
mark disabledness are not the best ideas - but let's not discuss this any
longer :)

Cheers.



> Example: a Link with an arrow image (CSS background) - quite common. It is
> not (at least as easy as it should be) possible to have another image for
> a disabled link with this behavior, since there is nothing like an
> if-element-has-child-element-selector in CSS. 
> 


igor.vaynberg wrote:
> 
> setdefaultbeforedisabledlink(" ") will do what you want
> 
> -igor
> 
> On Fri, Sep 19, 2008 at 11:27 AM, pixologe <[EMAIL PROTECTED]>
> wrote:
>>
>> setDefault*DisabledLink?
>> I know them and I am using them, as I already wrote.
>>
>> Just considered it would be nice to have setDefaultDisabledLinkBehavior,
>> too. And that I think it would be more obvious to have this applied by
>> default.
>>
>> Was just a proposal, never mind.
>>
>>
>>
>> igor.vaynberg wrote:
>>>
>>> application.getmarkupsettings()
>>>
>>> -igor
>>>
>>> On Fri, Sep 19, 2008 at 11:15 AM, pixologe <[EMAIL PROTECTED]>
>>> wrote:
>>>>
>>>> would you mind giving a hint?
>>>>
>>>>
>>>> igor.vaynberg wrote:
>>>>>
>>>>> On Fri, Sep 19, 2008 at 9:24 AM, pixologe <[EMAIL PROTECTED]>
>>>>> wrote:
>>>>>>
>>>>>> Of course, you are right. Sorry, what I wrote was not completely
>>>>>> clear.
>>>>>> It can make sense to change the markup in order to disable a link.
>>>>>> It definitely makes sense to exchange [a] with [span], yes.
>>>>>>
>>>>>> I was merely targeting at the appearance part: I think that adding
>>>>>> markup
>>>>>> between this [span] element and its content is not very useful in
>>>>>> most
>>>>>> cases. Of course, the functionality may come in handy if there is
>>>>>> need,
>>>>>> I
>>>>>> just think it should not necessarily be done by default.
>>>>>> And if there is a global setting for this, a global setting for a
>>>>>> defaultDisabledLinkBehavior would definitely be a good idea, too.
>>>>>
>>>>> there is a global setting
>>>>>
>>>>> -igor
>>>>>
>>>>>
>>>>>>
>>>>>> I would guess that most people are calling
>>>>>> setDefaultAfterDisabledLink("")
>>>>>> and setDefaultBeforeDisabledLink("") to turn this behavior off, or
>>>>>> use
>>>>>> CSS
>>>>>> in order to have their text non-italic again, and add an
>>>>>> AttributeModifier
>>>>>> instead. IMO it is just more obvious and more logical from the HTML
>>>>>> template
>>>>>> and semantic point of view, even more when we are talking about [em].
>>>>>>
>>>>>> However, if you do not share my opinion, I can stick to overriding
>>>>>> the
>>>>>> default behavior, of course :)
>>>>>>
>>>>>>
>>>>>>
>>>>>> igor.vaynberg wrote:
>>>>>>>
>>>>>>> disabled is more then just about the appearance, if something is
>>>>>>> disabled the user should not be able to interact with it. for
>>>>>>> example,
>>>>>>> security strategy can disable links the user does not have access
>>>>>>> to.
>>>>>>> just adding class="disabled" leaves the link clickable.
>>>>>>>
>>>>>>> -igor
>>>>>>>
>>>>>>> On Fri, Sep 19, 2008 at 4:21 AM, pixologe <[EMAIL PROTECTED]>
>>>>>>> wrote:
>>>>>>>>
>>>>>>>> Dear Wicket d

Re: Markup for disabled Link - Proposal (add behavior instead of markup)

2008-09-19 Thread pixologe

setDefault*DisabledLink?
I know them and I am using them, as I already wrote.

Just considered it would be nice to have setDefaultDisabledLinkBehavior,
too. And that I think it would be more obvious to have this applied by
default.

Was just a proposal, never mind.



igor.vaynberg wrote:
> 
> application.getmarkupsettings()
> 
> -igor
> 
> On Fri, Sep 19, 2008 at 11:15 AM, pixologe <[EMAIL PROTECTED]>
> wrote:
>>
>> would you mind giving a hint?
>>
>>
>> igor.vaynberg wrote:
>>>
>>> On Fri, Sep 19, 2008 at 9:24 AM, pixologe <[EMAIL PROTECTED]>
>>> wrote:
>>>>
>>>> Of course, you are right. Sorry, what I wrote was not completely clear.
>>>> It can make sense to change the markup in order to disable a link.
>>>> It definitely makes sense to exchange [a] with [span], yes.
>>>>
>>>> I was merely targeting at the appearance part: I think that adding
>>>> markup
>>>> between this [span] element and its content is not very useful in most
>>>> cases. Of course, the functionality may come in handy if there is need,
>>>> I
>>>> just think it should not necessarily be done by default.
>>>> And if there is a global setting for this, a global setting for a
>>>> defaultDisabledLinkBehavior would definitely be a good idea, too.
>>>
>>> there is a global setting
>>>
>>> -igor
>>>
>>>
>>>>
>>>> I would guess that most people are calling
>>>> setDefaultAfterDisabledLink("")
>>>> and setDefaultBeforeDisabledLink("") to turn this behavior off, or use
>>>> CSS
>>>> in order to have their text non-italic again, and add an
>>>> AttributeModifier
>>>> instead. IMO it is just more obvious and more logical from the HTML
>>>> template
>>>> and semantic point of view, even more when we are talking about [em].
>>>>
>>>> However, if you do not share my opinion, I can stick to overriding the
>>>> default behavior, of course :)
>>>>
>>>>
>>>>
>>>> igor.vaynberg wrote:
>>>>>
>>>>> disabled is more then just about the appearance, if something is
>>>>> disabled the user should not be able to interact with it. for example,
>>>>> security strategy can disable links the user does not have access to.
>>>>> just adding class="disabled" leaves the link clickable.
>>>>>
>>>>> -igor
>>>>>
>>>>> On Fri, Sep 19, 2008 at 4:21 AM, pixologe <[EMAIL PROTECTED]>
>>>>> wrote:
>>>>>>
>>>>>> Dear Wicket devs,
>>>>>>
>>>>>> I propose that by default a disabled link should rather (or also) be
>>>>>> marked
>>>>>> using a behavior, instead of adding markup before and after.
>>>>>>
>>>>>> A word in advance: I know that I can implement my own version of Link
>>>>>> which
>>>>>> adds behavior in case of being disabled, and I know how to do it -
>>>>>> this
>>>>>> is
>>>>>> not a cry for help, just a proposal, how I think the Link component
>>>>>> should
>>>>>> behave to fit most common use cases. The current way simple does not
>>>>>> feel
>>>>>> right.
>>>>>>
>>>>>> Why do I think so? When creating a template, most people tend to
>>>>>> display
>>>>>> a
>>>>>> disabled status of an element by appending a css class to its tag,
>>>>>> you
>>>>>> can
>>>>>> see class="disabled" very often, making colors gray or applying
>>>>>> transparency.
>>>>>> IMHO something like this should not be done by changing the DOM
>>>>>> hierarchy
>>>>>> of
>>>>>> the element.
>>>>>>
>>>>>> Example: a Link with an arrow image (CSS background) - quite common.
>>>>>> It
>>>>>> is
>>>>>> not (at least as easy as it should be) possible to have another image
>>>>>> for
>>>>>> a
>>>>>> disabled link with this behavior, since there is nothing like an
>>>>>> if-element-has-child-element-selector in CSS.
>>&g

Re: Markup for disabled Link - Proposal (add behavior instead of markup)

2008-09-19 Thread pixologe

would you mind giving a hint?


igor.vaynberg wrote:
> 
> On Fri, Sep 19, 2008 at 9:24 AM, pixologe <[EMAIL PROTECTED]> wrote:
>>
>> Of course, you are right. Sorry, what I wrote was not completely clear.
>> It can make sense to change the markup in order to disable a link.
>> It definitely makes sense to exchange [a] with [span], yes.
>>
>> I was merely targeting at the appearance part: I think that adding markup
>> between this [span] element and its content is not very useful in most
>> cases. Of course, the functionality may come in handy if there is need, I
>> just think it should not necessarily be done by default.
>> And if there is a global setting for this, a global setting for a
>> defaultDisabledLinkBehavior would definitely be a good idea, too.
> 
> there is a global setting
> 
> -igor
> 
> 
>>
>> I would guess that most people are calling
>> setDefaultAfterDisabledLink("")
>> and setDefaultBeforeDisabledLink("") to turn this behavior off, or use
>> CSS
>> in order to have their text non-italic again, and add an
>> AttributeModifier
>> instead. IMO it is just more obvious and more logical from the HTML
>> template
>> and semantic point of view, even more when we are talking about [em].
>>
>> However, if you do not share my opinion, I can stick to overriding the
>> default behavior, of course :)
>>
>>
>>
>> igor.vaynberg wrote:
>>>
>>> disabled is more then just about the appearance, if something is
>>> disabled the user should not be able to interact with it. for example,
>>> security strategy can disable links the user does not have access to.
>>> just adding class="disabled" leaves the link clickable.
>>>
>>> -igor
>>>
>>> On Fri, Sep 19, 2008 at 4:21 AM, pixologe <[EMAIL PROTECTED]>
>>> wrote:
>>>>
>>>> Dear Wicket devs,
>>>>
>>>> I propose that by default a disabled link should rather (or also) be
>>>> marked
>>>> using a behavior, instead of adding markup before and after.
>>>>
>>>> A word in advance: I know that I can implement my own version of Link
>>>> which
>>>> adds behavior in case of being disabled, and I know how to do it - this
>>>> is
>>>> not a cry for help, just a proposal, how I think the Link component
>>>> should
>>>> behave to fit most common use cases. The current way simple does not
>>>> feel
>>>> right.
>>>>
>>>> Why do I think so? When creating a template, most people tend to
>>>> display
>>>> a
>>>> disabled status of an element by appending a css class to its tag, you
>>>> can
>>>> see class="disabled" very often, making colors gray or applying
>>>> transparency.
>>>> IMHO something like this should not be done by changing the DOM
>>>> hierarchy
>>>> of
>>>> the element.
>>>>
>>>> Example: a Link with an arrow image (CSS background) - quite common. It
>>>> is
>>>> not (at least as easy as it should be) possible to have another image
>>>> for
>>>> a
>>>> disabled link with this behavior, since there is nothing like an
>>>> if-element-has-child-element-selector in CSS.
>>>>
>>>> Besides (I know it is configurable, but...) : I am not sure why one
>>>> would
>>>> want to [em]phasize something that's disabled ;-)
>>>>
>>>> I would love to see a defaultDisabledLinkBehavior property in future
>>>> versions, this would make it a lot easier to style disabled links...
>>>>
>>>> Cheers + best regards :)
>>>>
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/Markup-for-disabled-Link---Proposal-%28add-behavior-instead-of-markup%29-tp19570584p19570584.html
>>>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>>>
>>>>
>>>> -
>>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>>
>>>>
>>>
>>> -
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Markup-for-disabled-Link---Proposal-%28add-behavior-instead-of-markup%29-tp19570584p19575441.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Markup-for-disabled-Link---Proposal-%28add-behavior-instead-of-markup%29-tp19570584p19577220.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Markup for disabled Link - Proposal (add behavior instead of markup)

2008-09-19 Thread pixologe

Of course, you are right. Sorry, what I wrote was not completely clear.
It can make sense to change the markup in order to disable a link.
It definitely makes sense to exchange [a] with [span], yes.

I was merely targeting at the appearance part: I think that adding markup
between this [span] element and its content is not very useful in most
cases. Of course, the functionality may come in handy if there is need, I
just think it should not necessarily be done by default.
And if there is a global setting for this, a global setting for a
defaultDisabledLinkBehavior would definitely be a good idea, too.

I would guess that most people are calling setDefaultAfterDisabledLink("")
and setDefaultBeforeDisabledLink("") to turn this behavior off, or use CSS
in order to have their text non-italic again, and add an AttributeModifier
instead. IMO it is just more obvious and more logical from the HTML template
and semantic point of view, even more when we are talking about [em].

However, if you do not share my opinion, I can stick to overriding the
default behavior, of course :)



igor.vaynberg wrote:
> 
> disabled is more then just about the appearance, if something is
> disabled the user should not be able to interact with it. for example,
> security strategy can disable links the user does not have access to.
> just adding class="disabled" leaves the link clickable.
> 
> -igor
> 
> On Fri, Sep 19, 2008 at 4:21 AM, pixologe <[EMAIL PROTECTED]> wrote:
>>
>> Dear Wicket devs,
>>
>> I propose that by default a disabled link should rather (or also) be
>> marked
>> using a behavior, instead of adding markup before and after.
>>
>> A word in advance: I know that I can implement my own version of Link
>> which
>> adds behavior in case of being disabled, and I know how to do it - this
>> is
>> not a cry for help, just a proposal, how I think the Link component
>> should
>> behave to fit most common use cases. The current way simple does not feel
>> right.
>>
>> Why do I think so? When creating a template, most people tend to display
>> a
>> disabled status of an element by appending a css class to its tag, you
>> can
>> see class="disabled" very often, making colors gray or applying
>> transparency.
>> IMHO something like this should not be done by changing the DOM hierarchy
>> of
>> the element.
>>
>> Example: a Link with an arrow image (CSS background) - quite common. It
>> is
>> not (at least as easy as it should be) possible to have another image for
>> a
>> disabled link with this behavior, since there is nothing like an
>> if-element-has-child-element-selector in CSS.
>>
>> Besides (I know it is configurable, but...) : I am not sure why one would
>> want to [em]phasize something that's disabled ;-)
>>
>> I would love to see a defaultDisabledLinkBehavior property in future
>> versions, this would make it a lot easier to style disabled links...
>>
>> Cheers + best regards :)
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Markup-for-disabled-Link---Proposal-%28add-behavior-instead-of-markup%29-tp19570584p19570584.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Markup-for-disabled-Link---Proposal-%28add-behavior-instead-of-markup%29-tp19570584p19575441.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Markup for disabled Link - Proposal (add behavior instead of markup)

2008-09-19 Thread pixologe

Actually that is what I do. That's what I meant when I said "implement own
version"... Basically it extends AjaxFallbackLink overriding onBeforeRender
to add a Modifier dependent on the enabled property.

Just wanted to point out that this is the behavior I would have expected by
default, instead of having the page hierarchy modified and the link
displayed in italics...



Nino.Martinez wrote:
> 
> Why not just use an attribute modifier?
> 
> pixologe wrote:
>> Dear Wicket devs,
>>
>> I propose that by default a disabled link should rather (or also) be
>> marked
>> using a behavior, instead of adding markup before and after.
>>
>> A word in advance: I know that I can implement my own version of Link
>> which
>> adds behavior in case of being disabled, and I know how to do it - this
>> is
>> not a cry for help, just a proposal, how I think the Link component
>> should
>> behave to fit most common use cases. The current way simple does not feel
>> right.
>>
>> Why do I think so? When creating a template, most people tend to display
>> a
>> disabled status of an element by appending a css class to its tag, you
>> can
>> see class="disabled" very often, making colors gray or applying
>> transparency. 
>> IMHO something like this should not be done by changing the DOM hierarchy
>> of
>> the element.
>>
>> Example: a Link with an arrow image (CSS background) - quite common. It
>> is
>> not (at least as easy as it should be) possible to have another image for
>> a
>> disabled link with this behavior, since there is nothing like an
>> if-element-has-child-element-selector in CSS.
>>
>> Besides (I know it is configurable, but...) : I am not sure why one would
>> want to [em]phasize something that's disabled ;-)
>>
>> I would love to see a defaultDisabledLinkBehavior property in future
>> versions, this would make it a lot easier to style disabled links...
>>
>> Cheers + best regards :)
>>
>>   
> 
> -- 
> -Wicket for love
> 
> Nino Martinez Wael
> Java Specialist @ Jayway DK
> http://www.jayway.dk
> +45 2936 7684
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Markup-for-disabled-Link---Proposal-%28add-behavior-instead-of-markup%29-tp19570584p19571503.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Markup for disabled Link - Proposal (add behavior instead of markup)

2008-09-19 Thread pixologe

Dear Wicket devs,

I propose that by default a disabled link should rather (or also) be marked
using a behavior, instead of adding markup before and after.

A word in advance: I know that I can implement my own version of Link which
adds behavior in case of being disabled, and I know how to do it - this is
not a cry for help, just a proposal, how I think the Link component should
behave to fit most common use cases. The current way simple does not feel
right.

Why do I think so? When creating a template, most people tend to display a
disabled status of an element by appending a css class to its tag, you can
see class="disabled" very often, making colors gray or applying
transparency. 
IMHO something like this should not be done by changing the DOM hierarchy of
the element.

Example: a Link with an arrow image (CSS background) - quite common. It is
not (at least as easy as it should be) possible to have another image for a
disabled link with this behavior, since there is nothing like an
if-element-has-child-element-selector in CSS.

Besides (I know it is configurable, but...) : I am not sure why one would
want to [em]phasize something that's disabled ;-)

I would love to see a defaultDisabledLinkBehavior property in future
versions, this would make it a lot easier to style disabled links...

Cheers + best regards :)

-- 
View this message in context: 
http://www.nabble.com/Markup-for-disabled-Link---Proposal-%28add-behavior-instead-of-markup%29-tp19570584p19570584.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Open wicket component collection anywhere?

2008-09-16 Thread pixologe

Cool... just let me know where to find it, when you're done :) 
I'll try to add some momentum then...


jwcarman wrote:
> 
> I'll post my AbstractVelocityPanel code and see if that helps build
> any momentum.
> 
> On Mon, Sep 15, 2008 at 2:52 AM, pixologe <[EMAIL PROTECTED]> wrote:
>>
>> Hehe right, that is a good thing :)
>>
>> However, there doesn't seem to be too much resonance here :( let's see
>> whether this will be anticipated
>>
>>
>> jwcarman wrote:
>>>
>>> Being able to see the code and edit it inline might be a nice thing,
>>> though.  Folks could fix all of my mistakes! :)
>>>
>>> On Fri, Sep 12, 2008 at 9:35 AM, pixologe <[EMAIL PROTECTED]>
>>> wrote:
>>>>
>>>>
>>>>
>>>> jwcarman wrote:
>>>>>
>>>>> We could start a wiki section for "snippets" of code
>>>>>
>>>>
>>>> Sounds like a good start to me - just sad that there's no file upload
>>>> in
>>>> confluence (or is there?), this will make it hard if it is a very long
>>>> piece
>>>> of code or if there are several files involved...
>>>>
>>>> Nevertheless, I think it would be a good thing...
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/Open-wicket-component-collection-anywhere--tp19450431p19455941.html
>>>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>>>
>>>>
>>>> -
>>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>>
>>>>
>>>
>>> -
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Open-wicket-component-collection-anywhere--tp19450431p19487954.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Open-wicket-component-collection-anywhere--tp19450431p19511809.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Hot deployment / code swapping

2008-09-11 Thread pixologe


Martijn Dashorst wrote:
> 
> Wicket can't magically detect changes that are not on the classpath.
> 

Well, you never what what Frameworks might be able to do below the hood.
And with all the magical things wicket can do, I wouldn't have been too
surprised to find a config param pointing to my sources folder so that it
could be scanned at runtime...

Even more when there is something like
IResourceSettings#setResourcePollFrequency which def helped lead me into the
wrong direction here - but I guess this is just for polling the files within
the target location then...

Thanks.




-- 
View this message in context: 
http://www.nabble.com/Hot-deployment---code-swapping-tp19410295p19432378.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Hot deployment / code swapping

2008-09-10 Thread pixologe

Cool... thanks a lot.
I will check this out tomorrow!

Thanks for sharing this piece & have a nice evening.


Roman Zechner | Liland wrote:
> 
> don't worry, we had our own problems in the beginning to get this stuff 
> working.
> here we go - hope I haven't forgotten anything. you need to modify
> pom.xml
> jetty-env.xml
> set MAVEN_OPTS
> 
> 
> pom.xml:
> 
>  
> 6.1.4
>  
> 
> 
>   org.mortbay.jetty
>   jetty
>   ${jetty.version}
>   provided
> 
> 
>   org.mortbay.jetty
>   jetty-util
>   ${jetty.version}
>   provided
> 
> 
>   org.mortbay.jetty
>   jetty-management
>   ${jetty.version}
>   provided
> 
> 
> 
>   mysql
>   mysql-connector-java
>   5.0.8
>   runtime
> 
>   
> 
> 
>   
> org.mortbay.jetty
> maven-jetty-plugin
> 
>   7
>   ${basedir}/etc/jetty-env.xml
> 
>   
> 
> 
> jetty-env.xml:
> 
> 
>  "http://jetty.mortbay.org/configure.dtd";>
> 
> 
>class="org.mortbay.jetty.plus.naming.Resource">
> jdbc/myDB
> 
>   
> com.mysql.jdbc.Driver
> 
>   jdbc:mysql://localhost:3306/myDB?autoReconnect=true
> 
> myusr
> mypwd
>   
> 
>   
>   
> 
> 
> set env variable MAVEN_OPTS to get debugging port
> -Xdebug -Xnoagent 
> -Xrunjdwp:transport=dt_socket,address=4000,server=y,suspend=n
> 
> 
> 
> Hope that helps!
> 
> Cheers, Roman
> 
> pixologe wrote:
>> Hi Roman,
>>
>> even though my current main project is not under maven control, i'd be
>> happy
>> to have a look at your config, if you are willing to share it.
>> Obviously there are quite some things not 100% clear to me yet... both
>> with
>> and without maven and maven jetty plugin :-/
>>
>> Cheers+thanks
>>
>>
>>
>> Roman Zechner | Liland wrote:
>>   
>>> I am using the maven jetty plugin in development and it works fine for 
>>> me. I don't see why you shouldn't use it as Martijn pointed out?
>>> If there's a need, I can post the required configuration here. I am 
>>> working under WinXP, all my stuff is redeployed after changes have been 
>>> made when working with `cmd`, only if I am working with cygwin, it 
>>> doesn't recognize changes made to files other than .java
>>>  
>>> Roman
>>>
>>> Eyal Golan wrote:
>>> 
>>>> Regarding the embedded jetty, do you know if it is possible to point it
>>>> to
>>>> an external WAR so it will be as if deployed as well?
>>>> I looked into Jetty's document but didn't find.
>>>>
>>>> On Wed, Sep 10, 2008 at 4:17 PM, Martijn Dashorst <
>>>> [EMAIL PROTECTED]> wrote:
>>>>
>>>>   
>>>>   
>>>>> The maven jetty plugin is not meant for development, but for quick
>>>>> demos. Stop trying to use the jetty plugin for something it is not
>>>>> intended for. The Wicket quickstart project provides a very well
>>>>> functioning embedded jetty server, which runs like a charm in the
>>>>> Eclipse debugger (and IDEA and Netbeans debugger) providing everything
>>>>> Java offers without *any* additional configuration.
>>>>>
>>>>> Setting up your Wicket project is described in detail in Wicket in
>>>>> Action's bonus chapter, available from the Manning website
>>>>> (http://manning.com/dashorst)
>>>>>
>>>>> Martijn
>>>>>
>>>>> On Wed, Sep 10, 2008 at 3:05 PM, pixologe <[EMAIL PROTECTED]>
>>>>> wrote:
>>>>> 
>>>>> 
>>>>>> Hi Martijn,
>>>>>>
>>>>>> So this means that the wicket quickstart project does NOT do it out
>>>>>> of
>>>>>>   
>>>>>>   
>>>>> the
>>>>> 
>>>>> 
>>>>>> box? Which obviously goes for non-maven-projects too then? That's
>>>>>> good
>>>>>> to
>>>>>> know, I obviously have been terribly misinformed then...
>>>>>>
>>>>>> Even though it will obviously take me some more time to figu

Re: Calling a javascript function on render

2008-09-10 Thread pixologe

Hi there,

have a look at IHeaderContributor.
There's an easy example in the API docs.

http://wicket.apache.org/docs/wicket-1.3.2/wicket/apidocs/org/apache/wicket/markup/html/IHeaderContributor.html

Cheers



tleveque wrote:
> 
> Hi
> 
> I am kind of new to the wicket framework...
> 
> But here is what I am trying to do:
> I am implementing a part of an already existing application.
> In this new section, I have a form, when it is submitted, if some
> conditions are respected, I need to call an already existing javascript
> function (that will modify something in another frame).
> It is not and cannot be a ajax call.
> It need to be conditional to something on the server side.
> 
> In our pre-wicket version of this section, a "" markup was just
> added a the end of the page by a condition in the jsp.
> 
> What is the best way to do that kind of thing?
> I found a solution by overrinding the "onBeforeRender" method on my page
> and use "getResponse().write( "