Re: How to LDM refreshed after submit?

2009-07-20 Thread Stefan Simik

I had  similar problem last time:
By debugging, I found some solution, that really works, but I am not sure,
if it is elegant and the right wicket-way solution:

1. override onValidate method in form
2. call clearInput() method on all form components, that should refresh
their model








Mauro Ciancio wrote:
 
 Hi wicketers!
 
   The question is the subject of this mail. I have a form with some fields
 and
 I want to those fields being updated after the form submit. All fields
 share
 the same Loadable Detachable Model.
 
   The issue is that the LDM is loaded before onSubmit() and i have no
 chance
 to update the model.
 
 Any ideas?
 Thanks in advance,
 -- 
 Mauro Ciancio
 
 

-- 
View this message in context: 
http://www.nabble.com/How-to-LDM-refreshed-after-submit--tp24561354p24578183.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 1.4m3 ModalWindow close problem in Opera

2009-05-20 Thread Stefan Simik

I have the same problem with the latest Opera 9.64.



FakeBoy wrote:
 
 Hi,
 I would like to ask you about my problem with modal modal window in Opera.
 When i close modal window everything works good in java (all listeners ale
 correctly called). But in browser window i still see some parts of modal
 window in background of my page. It dispappears only when i refresh page
 or invoke show modal window again. I try open modal window example
 (http://www.wicket-library.com/wicket-examples/ajax/modal-window.1) in
 opera and result is in attachment.
 Can somebody help me to fix this problem?
 Thanks Dave
  http://www.nabble.com/file/p19002461/operaModalWindow.PNG
 operaModalWindow.PNG 
 

-- 
View this message in context: 
http://www.nabble.com/Wicket-1.4m3-ModalWindow-close-problem-in-Opera-tp19002461p23643595.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: New site developed in wicket - WWW.FITCOMPLEX.SK

2009-04-21 Thread Stefan Simik

Thanks to all for your response ;)

About stateless ajax in jquery + wicket:

JQUERY PART:
---
$(#loadElementId).load( /ajax-call/most-read-articles-panel );   

 -- Jquery function load(url) takes markup returned from the
/ajax-call/most-read-articles-panel a and loads it into the element
 with id loadElementId


WICKET PART

Wicket has to return MARKUP on specified url, here: 
/ajax-call/most-read-articles-panel.
Processing url is simple and all about url-coding-strategies, the important
part here, is that this url return markup of rendered panel - panel with
most read articles in X days

How to render only one panel in wicket:
The simplest solution is to create web-page only for this purpose - it
renders and returns only one panel markup - response will be loaded by the
jquery load(..) function and replaced in HTML.

Problem here is that you can load rendered markup only - dynamic CSS and JS
contribution don't work,
so you have to put all the needed CSS / JS into the main page.

We have a little more automated wicket code - so it's possible to render any
panel under specified url on a few line of codes . The point of stateless
ajax is very simple - as described above ;)


PS: thanks for the notice of broken tabs - i checked it, and it should be
ok, because the site was running only the first day (20.4.2009), so the most
read articles in the tabs are really the same in the last 2 / 7 30 days -
because it was running only first day.

Wth regard
Stefan






Martin Grotzke wrote:
 
 Congrats! A nice site and really fast!
 
 You're mentioning stateless ajax with jquery: can you give some pointers
 how you did this?
 
 Cheers,
 Martin
 
 
 On Mon, 2009-04-20 at 18:22 +0200, Stefan Simik wrote:
 New site about health, nutrition, exercise and life
 stylehttp://www.fitcomplex.sk/start
 
 We are using stateless pages for public interface, and stateful ajaxified
 pages for admin interface.
 Stateless ajax in public is developed using jquery + wicket.
 
 The site is running on:
 
- *Wicket *1.4rc2
- *Web server*: Jetty 6.1.14  (with Apache front-end)
- *Db*: mysql (ehcache + hibernate)
- *OS*: Ubuntu 8.04 (Hardy Heron)
 
 
 *Wicket performance* is very good - the slowest element is mysql
 database.
 It's able to serve up to ~130 pages /sec on modern notebook (2Ghz
 Montevina,
 5400 rpm, 3GB RAM).
 On server we haven't tested, but it should be much more.
 
 *Thanks to the community for patiently answering many questions and for
 all
 the support.*
 
 Štefan Šimík
 www.fitcomplex.sk
 
  
 

-- 
View this message in context: 
http://www.nabble.com/New-site-developed-in-wicket---WWW.FITCOMPLEX.SK-tp2313p23153945.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



New site developed in wicket - WWW.FITCOMPLEX.SK

2009-04-20 Thread Stefan Simik
New site about health, nutrition, exercise and life
stylehttp://www.fitcomplex.sk/start

We are using stateless pages for public interface, and stateful ajaxified
pages for admin interface.
Stateless ajax in public is developed using jquery + wicket.

The site is running on:

   - *Wicket *1.4rc2
   - *Web server*: Jetty 6.1.14  (with Apache front-end)
   - *Db*: mysql (ehcache + hibernate)
   - *OS*: Ubuntu 8.04 (Hardy Heron)


*Wicket performance* is very good - the slowest element is mysql database.
It's able to serve up to ~130 pages /sec on modern notebook (2Ghz Montevina,
5400 rpm, 3GB RAM).
On server we haven't tested, but it should be much more.

*Thanks to the community for patiently answering many questions and for all
the support.*

Štefan Šimík
www.fitcomplex.sk


Re: Which version is stable

2009-03-15 Thread Stefan Simik

We are using wicket 1.4rc2 without any problems...


taha siddiqi wrote:
 
 Hi,
 
 Which version 1.3.x or 1.4.x should I use in production. Which one is
 stable ? ( stupid question I know :) but I am confused )
 I use 1.3.5, should I be using 1.4.x.
 
 taha
 
 -
 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/Which-version-is-stable-tp22511969p22526624.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: Have a feature, want to contribute

2009-03-13 Thread Stefan Simik

Sounds very useful ! -especially in development model.
We've spent much time debugging and searching for the one stateful
component/behavior - in our large page hierarchies !



Marat Radchenko-2 wrote:
 
 Wicket pages/components can be either stateful or stateless. Wicket
 manages hem transparently and it is very easy to write any complex
 page you want. Stateful pages are much more powerful than stateless.
 However that comes at  a cost of using page store for their state. On
 highload sites it is usually desired to minimize session-scope data,
 and move it to request-scope. That's when Wicket users approach a task
 of making stateful pages stateless. However stateless state (sic!) is
 very fragile, if you add a single stateful component to a page, it
 instantly becomes stateful (and you even might not notice that if your
 other page content can work in both modes. And here comes my lovely
 feature - @StatelessComponent. It is an annotation that you should put
 on components which you want to be stateless. It doesn't do any magic,
 it simply uses postComponentOnBeforeRender to assert that annotated
 component (and all its children) are stateless. If it doesn't, an
 exception is thrown, indicating what component tries to be stateful.
 
 This feature isn't large enough to be put in a separate project (just
 one annotation and one listener) but wee find it extremely useful on
 our project.
 
 I'd be happy to give it to Wicket project (or wicketstuff?) at
 absolutely no cost (tests included) under same license as wicket
 itself, if Wicket developers are interested in it.
 
 I'll file a feature request with a patch, if Wicket team finds this
 useful in Wicket core.
 
 -
 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/Have-a-feature%2C-want-to-contribute-tp21079751p22496841.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



StatelessForm - problem with parameters after validation fails

2009-03-10 Thread Stefan Simik

Many wicket users are reporting the same and common problem - page parameters
are doubling in ACTION of the stateless form after first validation error.
Is there any solution please ? I think, this is very common use case and
some solution must exist.

See the same reports here:
1. 
http://www.nabble.com/StatelessForm-in-Bookmarkable-Page-problem-td19430608.html#a19430608
http://www.nabble.com/StatelessForm-in-Bookmarkable-Page-problem-td19430608.html#a19430608
 
2. 
http://www.nabble.com/StatelessForm-and-field-parameters-in-url-after-post-td21828632.html#a21828632
http://www.nabble.com/StatelessForm-and-field-parameters-in-url-after-post-td21828632.html#a21828632
 
3. 
http://www.nabble.com/StatelessForm-data-becomes-PageParameters-and-as-result-is-doubling-td19521093.html#a19521093
http://www.nabble.com/StatelessForm-data-becomes-PageParameters-and-as-result-is-doubling-td19521093.html#a19521093
 

-- 
View this message in context: 
http://www.nabble.com/StatelessForm---problem-with-parameters-after-validation-fails-tp22438953p22438953.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: [OT] wicket users around the world

2008-12-12 Thread Stefan Simik

Slovakia, working in Bratislava



francisco treacy-2 wrote:
 
 to know a little bit more of our great (and vast) community, i was
 just wondering if you're keen on sharing where you come from and/or
 where you work with wicket...
 
 for instance, here argentinian/belgian working with wicket in antibes,
 france
 
 francisco
 
 -
 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/-OT--wicket-users-around-the-world-tp20962108p20976534.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



Odd number of page parameters - why IllegalStateException ?

2008-11-24 Thread Stefan Simik

Hi all,

I would like to ask,
why the default URL strategy throws IllegalStateException, when there is odd
number of parameters ?

We have a problem with this way handling, because our users rewrite URLs
manually 
(we cannot prevent users from doing this).

Our pages are stateless and they don't use any parameters - BUT there are
throwing exceptions
and showing InternalErrorPage-s. It is presented like a serious problem like
DB, or like service failed
but there is no problem actually - only parameters, that are not used.

I think, that page parameters should not result in INTERNAL ERROR, 
because there are many cases, where this is not relevant.
There should be an alternative way - some custom handling or ignoring
parameters in such a situation.

What do you think about this problem ?

Thanks




-- 
View this message in context: 
http://www.nabble.com/Odd-number-of-page-parameters---why-IllegalStateException---tp20671254p20671254.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]



ImageButton - always stateful ?

2008-11-24 Thread Stefan Simik

Hi all,

I would like to ask, why ImageButton is stateful ?


THE CODE IN ImageButton
---

protected boolean getStatelessHint()
{
  return getImageResource() == null 
localizedImageResource.isStateless();
}

The method #getImageResource() return never null, so the whole method
returns always false and the
component is marked as stateful.

I use the component this way:

ImageButton submitButton = new ImageButton(submitButton, new
ResourceReference(VyhladatDomenuPanel.class, images/Search.png));
form.add(submitButton);

I know, that ImageButton uses Locale/Style to find the right image, but what
should be done, if I don't want ImageButton to be stateful ?
(problem is, that that this ImageButton binds new session, what is unwanted
behavior)

Thanx.





-- 
View this message in context: 
http://www.nabble.com/ImageButton---always-stateful---tp20674146p20674146.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: Odd number of page parameters - why IllegalStateException ?

2008-11-24 Thread Stefan Simik

oki, thx
https://issues.apache.org/jira/browse/WICKET-1957



igor.vaynberg wrote:
 
 we can return a 404 instead i suppose. create a jira issue.
 
 -igor
 
 On Mon, Nov 24, 2008 at 2:25 PM, Stefan Simik [EMAIL PROTECTED]
 wrote:

 Hi all,

 I would like to ask,
 why the default URL strategy throws IllegalStateException, when there is
 odd
 number of parameters ?

 We have a problem with this way handling, because our users rewrite URLs
 manually
 (we cannot prevent users from doing this).

 Our pages are stateless and they don't use any parameters - BUT there are
 throwing exceptions
 and showing InternalErrorPage-s. It is presented like a serious problem
 like
 DB, or like service failed
 but there is no problem actually - only parameters, that are not used.

 I think, that page parameters should not result in INTERNAL ERROR,
 because there are many cases, where this is not relevant.
 There should be an alternative way - some custom handling or ignoring
 parameters in such a situation.

 What do you think about this problem ?

 Thanks




 --
 View this message in context:
 http://www.nabble.com/Odd-number-of-page-parameters---why-IllegalStateException---tp20671254p20671254.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/Odd-number-of-page-parameters---why-IllegalStateException---tp20671254p20674964.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: Upload exceeds maxsize error comes AFTER upload has finished

2008-11-05 Thread Stefan Simik

This is how things work in HTTP.
One possible solution, that provides more control from client is flash
upload - see http://swfupload.org/
-- 
View this message in context: 
http://www.nabble.com/Upload-exceeds-maxsize-error-comes-AFTER-upload-has-finished-tp20228506p20347340.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: Presentation web with some stateful components - removing jsessionid+ all PageExpired exceptions

2008-10-13 Thread Stefan Simik

Http session is created, because there are stateful components on that page.
URL of that page is bookmarkable, but the page itself is not stateless
(there is ajax Gmap2 component).


why is session created on the first request? If that page was
stateless there would be no session created...

-Igor
-- 
View this message in context: 
http://www.nabble.com/Presentation-web%3A-jsessionid---page-expired-exceptions-tp19943729p19953896.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: Presentation web with some stateful components - removing jsessionid+ all PageExpired exceptions

2008-10-13 Thread Stefan Simik

jj, you are right. My mistake. I tested this, and jsessionid in bookmarkable
URL never causes page-expired exception.
.



Johan Compagner wrote:
 
 A bookmarkabke url with a jsession id will not give you an page expired.
 
 

-- 
View this message in context: 
http://www.nabble.com/Presentation-web%3A-jsessionid---page-expired-exceptions-tp19943729p19958061.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]



Presentation web with some stateful components - removing jsessionid+ all PageExpired exceptions

2008-10-12 Thread Stefan Simik

We are creating website. One part is standard presentation web, second part
is administration site, where we take all advantages of wicket's state
management.

The important part here, is first presentation part.
Here, all the URLs must be bookmarkable. On some special pages, we use
stateful components (Gmap2). but URL of these pages are also bookmarkable.
Usage of these stateful components forces http-session creation on these
pages. 

AT THE VERY FIRST REQUEST - this makes all our bookmarkable pages
not-bookmarkable,
because of jsessionid added by servlet container.

This is serious problem because of:
  - At the very first page - all links have jsessionid, so if the 
user bookmarks any of the links, he gets Session-Expired error.
  
  - Bots as Google bot, Yahoo remember pages with jsessionid, ... - but
solution for this is very easy: 
  - a) Use special filter, 
  - b) or use special Response
  which cuts out the existing jsessionid string. No problem so far.


  
  
After reading this article:
http://www.nabble.com/Removing-the-jsessionid-for-SEO-td16464534i20.html#a16646137
we thought about all possible solutions and we found this way as the best
for our web site.
Remember please, that it is for standard presentation web, where 
  - no jsessionid should appear
  - no session-expired errors are acceptable
  
I think, this will be common use case for many others.


1. use filter/response, that cuts off the jsessionid if bot is detected in
User-Agent header
This solves problem for all search result URLs.

2. use our custom SessionExpiredPage, which has its own logic:
a) if it detects bookmarkable page - cuts off jsessionid and redirects
to the standard bookmarkable URL
b) if it detects, that it is stateful page (by introspecting URL - for
example contains ILinkListener and path
   to pagemap - then redirect to the home page.

   We think that it is quite acceptable solution for presentation web-
see example:
   You have a homepage. This page has bookmarkable URL, but has some
stateful components - for example Gmap2 map,
   which is ajax component. This stateful components forces http-session
creation and makes all links with jsessionid
   at the very first request. When user bookmarks some URL, he saves
stateful bookmark (with jsessionid). When user
   clicks on the bookmark later, he gets Session expired error - which
causes calling of our custom Page-Expired page. 
   This page introspects original Request, and detects, that it is
standard bookmarkable page, so cuts off the jsessionid, 
   and redirect to the normal URL, without problematic jsessionid.
   
  
   In case 2 - where the session actually expired on some stateful page
with non-bookmarkable URL - user will be redirected to the home page.
   In case 3 - where presentation web works with user accounts and user
must be logged on some secure pages - here, session really expired - then
special UserNotLoggedException can be thrown, and
handled by redirecting to the login page.



   What do you think about this solution (for eliminating PageExpired
and jsessionid on presentation web sites) ? 
   Are there any further pros and cons of this solution ?
  
-- 
View this message in context: 
http://www.nabble.com/Presentation-web-with-some-stateful-components---removing-jsessionid%2B-all-PageExpired-exceptions-tp19943729p19943729.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: onmouseover image

2008-10-09 Thread Stefan Simik

Implementation of roll-over image.

Takes 2 image resource-references: one for initial image, second for
mouseover image.
Automatically adds javascript for preloading these images.
Takes wicket locale and style into consideration.

USAGE:
RollOverImage image = new RollOverImage(wicketId, imageAltText,
imageOut, imageOver, null);
add(image);

Enjoy ;)
SS


//  CODE
//==

package sk.serviceintegra.wisa.component.image.rolloverimage;

import java.util.Locale;

import org.apache.wicket.AttributeModifier;
import org.apache.wicket.RequestCycle;
import org.apache.wicket.ResourceReference;
import org.apache.wicket.Session;
import org.apache.wicket.behavior.StringHeaderContributor;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.Model;

import sk.serviceintegra.random.RandomStringGenerator;
import sk.serviceintegra.wisa.component.image.extended.ExtendedImage;

/**
 * Roll-over image.
 * Takes 2 image resource-references: one for initial image, second for
mouseover image.
 * Takes wicket locale and style into consideration. 
 * 
 * pre
 * USAGE:
 *  RollOverImage image = new RollOverImage(wicketId, imageAltText,
imageOut, imageOver, null);
 *  add(image);
 * /pre
 * 
 * @author simik
 */
public class RollOverImage extends ExtendedImage {
private static final long serialVersionUID = -4686703857711636280L;

/**
 * Roll-over image.
 * 
 * @param wicketId
 * @param altAttributeModel model, that contains value for ALT 
attribute in
lt;imagegt; tag
 * @param imageOut mouseout image 
 * @param imageOver mouseover image 
 * @param style wicket style. Can be null, if not used.
 */
public RollOverImage(String wicketId, 
 IModelString 
altAttributeModel, 
 ResourceReference imageOut, 
 ResourceReference imageOver,
 String style) {
super(wicketId, imageOut, altAttributeModel);

//set locale for ResourceReference
Locale locale = Session.get().getLocale();
if (locale != null) {
imageOut.setLocale(locale);
imageOver.setLocale(locale);
}

//set style for ResourceReference
if (style != null) {
imageOut.setStyle(style);
imageOver.setStyle(style);
}

//generate random string for unique image name
String uniqueImageName = Image_ + 
RandomStringGenerator.generate(10);


//HEAD CONTRIBUTION FOR PRELOADING IMAGES
/*
   script language=JavaScript
  ${IMAGE_IDENTIFIER}_out = new Image();
  ${IMAGE_IDENTIFIER}_out.src = ${IMAGE_OUT_URL};

  ${IMAGE_IDENTIFIER}_over = new Image();
  ${IMAGE_IDENTIFIER}_over.src = ${IMAGE_OVER_URL};
   /script 
 */
String imageOutUrl = 
RequestCycle.get().urlFor(imageOut).toString();
String imageOverUrl = 
RequestCycle.get().urlFor(imageOver).toString();

String javascript = 
script  type=\text/javascript\\n +
uniqueImageName + _out = new Image();\n +
uniqueImageName + _out.src = \ + imageOutUrl 
+ \;\n +
uniqueImageName + _over = new Image();\n +
uniqueImageName + _over.src = \ + 
imageOverUrl + \;\n +
/script\n;

add(new StringHeaderContributor(javascript));




// HEAD CONTRIBUTION FOR display() function.
/*
script language=JavaScript
  function display(imgName, imgUrl) {
if (document.images  typeof imgUrl != 'undefined')
  document[imgName].src = imgUrl.src;
  }
/script
 */
String javascript2 = 
script  type=\text/javascript\ +
!--/*--![CDATA[/*!--*/\n +
  function display(imgName, imgUrl) {\n +
if (document.images  typeof imgUrl != 'undefined')\n +
  document[imgName].src = imgUrl.src;\n +
  }\n +
  /*--]]*/+
/script\n;


Re: generics

2008-07-16 Thread Stefan Simik

I ported all our projects to 1.4-m3  (from 1.4-m2).
It was quite large - about 500 source files. Everything
worked out nicely.

I can say, that I am very happy with actual generics style.
I think, that this is how generics should be applied in Wicket.

Good work!
Thanks to the Wicket team yet again!
Stefan Simik
-- 
View this message in context: 
http://www.nabble.com/generics-tp18083910p18498620.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: HTTP Session creating at home page

2008-06-15 Thread Stefan Simik

Great, it works :)
Maurice, thank you very much for your help!
Stefan


Mr Mean wrote:
 
 It seems that you homepage is stateless, wicket does not create a
 session for stateless pages to preserve server resources. You can
 force wicket to create a session for you by calling
 Session.get().bind() in your constructor (or any other place that is
 executed during a requestcycle).
 
 Maurice
 
 On Sat, Jun 14, 2008 at 9:48 PM, Stefan Simik [EMAIL PROTECTED]
 wrote:

 Hi boys,

 I would like to ask, how can I force creation of HTTP session
 when first request comes to server.

 I have this problem:
 1. user requests home page (wicket session is created) for example:
 www.server.com/app
 2. I set some data into the wicket session
 3. server responds with redirect to some random bookmarkable page:
 www.server.com/app/pc

 4. At the next request - HERE IS THE PROBLEM - there are no previously
 stored data in the session.

 At the second and next requests, there is no problem with session. What I
 save into the session,
 I can find in later requests. The problem is in the first roundtrip, so
 it
 seems, that
 the real HTTP session is not created in the first request.

 Where should I look for some solution please?
 --
 View this message in context:
 http://www.nabble.com/HTTP-Session-creating-at-home-page-tp17843162p17843162.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/HTTP-Session-creating-at-home-page-tp17843162p17849458.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]



HTTP Session creating at home page

2008-06-14 Thread Stefan Simik

Hi boys, 

I would like to ask, how can I force creation of HTTP session 
when first request comes to server.

I have this problem:
1. user requests home page (wicket session is created) for example:
www.server.com/app
2. I set some data into the wicket session
3. server responds with redirect to some random bookmarkable page:  
www.server.com/app/pc
   
4. At the next request - HERE IS THE PROBLEM - there are no previously
stored data in the session.

At the second and next requests, there is no problem with session. What I
save into the session,
I can find in later requests. The problem is in the first roundtrip, so it
seems, that
the real HTTP session is not created in the first request.

Where should I look for some solution please?
-- 
View this message in context: 
http://www.nabble.com/HTTP-Session-creating-at-home-page-tp17843162p17843162.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: PackageResource - why does'nt get Locale directly from Session ?

2008-06-09 Thread Stefan Simik

Oh yes :-) 
I think, that taking Locale from session could be the most used = the most
suitable default strategy.
Session is the most used place for storing Locale.
I think, that preferred way should be getting Locale from Session as
default.
Passing Locale parameter to the PackageResource constructor does'nt seem to
me like a better way.
Who wants, can subclass PackageResource and override in you own specific
way.
What do you think about it ? 

Stefan




That's just by design to not make the assumption where the locale
comes from. But you can override the class and pass
Session.get().getLocale() and you're done :-)

Eelco

-- 
View this message in context: 
http://www.nabble.com/PackageResource---why-does%27nt-get-Locale-directly-from-Session---tp17696134p17730001.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: PackageResource - why does'nt get Locale directly from Session ?

2008-06-09 Thread Stefan Simik

yes, sure :)
It's OK, it is really my preference only ;)



Eelco Hillenius wrote:
 
 We'd have to have a good reason the break the API. And it's just
 something you'd prefer to be different, but it doesn't give you
 troubles you can't get around, right? :-)
 
 Eelco
 
 On Mon, Jun 9, 2008 at 3:21 AM, Stefan Simik [EMAIL PROTECTED]
 wrote:

 Oh yes :-)
 I think, that taking Locale from session could be the most used = the
 most
 suitable default strategy.
 Session is the most used place for storing Locale.
 I think, that preferred way should be getting Locale from Session as
 default.
 Passing Locale parameter to the PackageResource constructor does'nt seem
 to
 me like a better way.
 Who wants, can subclass PackageResource and override in you own specific
 way.
 What do you think about it ?

 Stefan




 That's just by design to not make the assumption where the locale
 comes from. But you can override the class and pass
 Session.get().getLocale() and you're done :-)

 Eelco

 --
 View this message in context:
 http://www.nabble.com/PackageResource---why-does%27nt-get-Locale-directly-from-Session---tp17696134p17730001.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/PackageResource---why-does%27nt-get-Locale-directly-from-Session---tp17696134p17737813.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]



PackageResource - why does'nt get Locale directly from Session ?

2008-06-06 Thread Stefan Simik

Hi boys,

I would like to ask, why PackageResource doesn't take the Locale 
from the session, but in constructor ?
It could be comfortable, if no Locale specified in constructor, 
then it could be taken directly from the session.

Thanx for the answer.
Stefan Simik
-- 
View this message in context: 
http://www.nabble.com/PackageResource---why-does%27nt-get-Locale-directly-from-Session---tp17696134p17696134.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: users, please give us your opinion: what is your take on generics with Wicket

2008-06-03 Thread Stefan Simik

I am one of adopters laterst release and I invested much time 
for upgrading all our projects to 1.4M2 .

I think, that generification of Wicket has many positive impacts, but
also some negative impact on simplicity and ease of use.
I don't see too many advantages of fully typed components - the biggest win
for me, is that I directly see, what I have or what should be in the model. 
I think, this is not worth the other problems.

Living with generics is a little bit harder, than living with no generics.
But I personally have no problem to live with it.

If I should say decision, based on my experience:
---
I think, that generification of Wicket involves a little bit more negative, 
than positive effects, so - give it away. We loose som benefits, but 
many other things, will be simpler.

Stefan Simik
-- 
View this message in context: 
http://www.nabble.com/users%2C-please-give-us-your-opinion%3A-what-is-your-take-on-generics-with-Wicket-tp17589984p17625678.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]



Templating + performance question

2008-05-31 Thread Stefan Simik

Hi boys, 

I would like to ask about Templating (ass CssTemplate, ...) and performance.
I think about the best solution for customizing design of our components.

I see templating as a very powerful feature, but I worry about degraded
performance,
because of much processing when interpolating variables in every request.
I saw some caching mechanism (TextTemplateCache) in sources, which could
solve
my problem. 
Could someone knowledgeable more elaborate on this problem/question please ?
The 
Thanks very much.

Stefan Simik

-- 
View this message in context: 
http://www.nabble.com/Templating-%2B-performance-question-tp17575292p17575292.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: Templating + performance question

2008-05-31 Thread Stefan Simik

Ok, I'll take it into consideration and solve this type of performance issues
later.
Thanx for your advice.


Jonathan Locke wrote:
 
 
 I would wait on this one if I were you. Use the powerful feature as simply
 as possible, then determine if you need to optimize anything by using a
 profiler.
 
 I know it is a bit of an old saw, but premature optimization really is the
 root of all evil.
 
 
 Stefan Simik wrote:
 
 Hi boys, 
 
 I would like to ask about Templating  ( CssTemplate, ...) versus
 performance.
 
 I see templating as a very powerful feature, but I worry about degraded
 performance,
 because of much processing when interpolating variables in every request.
 I saw some caching mechanism (TextTemplateCache) in sources, which could
 solve
 my problem. 
 Could someone knowledgeable more elaborate on this problem/question
 please ?
 Thanks very much.
 
 Stefan Simik
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Templating-%2B-performance-question-tp17575292p17578240.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: Using generics with some non-generic classes in Wicket

2008-05-14 Thread Stefan Simik

Great, it work without warnings now ;)

Joham, could you please change the following class too ?

file: Loop.java
line:53
from:   LoopItem extends WebMarkupContainer
to:  LoopItem extends WebMarkupContainerInteger

thx ;)
Stefan




Johan Compagner wrote:
 
 i already did the commit just yet..
 
 i did make them all   because i think people generally dont want to
 generify them anyway (use the model object)
 
 
 
 On Tue, May 13, 2008 at 9:48 PM, Stefan Simik [EMAIL PROTECTED]
 wrote:
 

 please, and will be these classes later generified ?
 Or should I make a RFE, or can I help anyway-for example attach a patch ?

 I love your work and Wicket, so I do my best, to make it better ;)

 Stefan Simik






 Johan Compagner wrote:
 
  yes thats the reason
 
  you are calling the method add with a generified component but that
  container itself is not generified
 
  i dont like this about generics expecially the onces like this:
 
  add(MarkupContainer? container)
 
  then suddenly a none generified component cant be added...
  thats really stupid ? should mean anything.. including none generics
 
  johan
 
 
  On Tue, May 13, 2008 at 5:55 PM, Stefan Simik [EMAIL PROTECTED]
  wrote:
 
 
  I have one idea,
 
  the reason of the warnigs is, that parent of AjaxPagingNavigator is
  PagingNavigator,
  which has parent Panel --- that is not parameterized.
 
  The same problem is with LoopItem, which extends the
  WebMarkupContainer --- that is not parameterized.
 
  ? could this be the reason ?
 
 
 
 
 
 
  Stefan Simik wrote:
  
   Mhmm, it is meaningful ;) I will know in future, thx
  
   One of the last occuring warning is, when working with
   MarkupContainer#add(...)  or  #addOrReplace(...)  method.
  
   Example:  I have a simple AjaxPagingNavigator, to which I add a
 simple
   ListView
  
 ---
   ListViewInteger menu = new ListViewInteger(id, numbers){
   //populate metods
   }
   add(menu);//warning here
  
   The warning says:
   Type safety: The method add(Component...) belongs to the raw type
   MarkupContainer.
   References to generic type MarkupContainerT should be
 parameterized
  
   I cannot find out, what's the warning reason, because ListView self
 is
   parameterized.
  
  
 
  --
  View this message in context:
 
 http://www.nabble.com/Using-generics-with-some-non-generic-classes-in-Wicket-tp17208928p17212015.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/Using-generics-with-some-non-generic-classes-in-Wicket-1.4M1-tp17208928p17216869.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/Using-generics-with-some-non-generic-classes-in-Wicket-1.4M1-tp17208928p17233011.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]



Using generics with some non-generic classes in Wicket

2008-05-13 Thread Stefan Simik

Hi boys, 

I would like to ask something about wicket generics. I have a warning, that
I don't know, how to solve.

For example in such a line:  

IModelString model = new StringResourceModel( ... ); 

I have a warning, which I cannot remove: 
---
Type safety: The expression of type StringResourceModel needs unchecked
conversion to conform to IModelString


Why is the StringResourceModel (and some other classes) not generified ?
Will they be later,
or is there any problem with generifying of these classes ?

Thx,
Stefan Simik




-- 
View this message in context: 
http://www.nabble.com/Using-generics-with-some-non-generic-classes-in-Wicket-tp17208928p17208928.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: Using generics with some non-generic classes in Wicket

2008-05-13 Thread Stefan Simik

Uuf, great :)  It works !  Thx. 

But, is not String something Serializable ? 
I cannot understand where was the problem,
but I know, this is more about Java Generics, not about Wicket.




Johan Compagner wrote:
 
 the only thing i can quickly come up with is this
 
 public ExtendLabel(String id, T string)
 {
 super(id, new ModelT(string));
 }
 

-- 
View this message in context: 
http://www.nabble.com/Using-generics-with-some-non-generic-classes-in-Wicket-tp17208928p17211220.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: Using generics with some non-generic classes in Wicket

2008-05-13 Thread Stefan Simik

Thx Maurice, your are right. I was using Wicket 1.4M1.
I checked out latest from trunk, and it OK. ;)

So another problematic compiler warning. 
For example  simple  - subtype of Label, which has model type of anything
Serializable.



public class ExtendedLabellt;T extends Serializablegt; extends
Labellt;Tgt{

   private IStringProvider stringProvider = null;


   public ExtendedLabel(String id, IModel model, IStringProvider
stringProvider) {
super(id, model);
this.stringProvider = stringProvider;
   }

   public ExtendedLabel(String id, String text) {
this(id, new Model(text), new BasicStringProvider());
//this(id, new Modellt;Tgt;(text), new BasicStringProvider());
//error
   }

}




The problematic part, is the second constructor, which calls this. Its
second parameter - new Model(text), 

which I cannot generify. If I write new Model(text), I get an error: The
constructor Model(String) is undefined.   


I can't find out, what I am doing wrong.


Thx

Stefan Simik





-- 
View this message in context: 
http://www.nabble.com/Using-generics-with-some-non-generic-classes-in-Wicket-tp17208928p17210525.html
Sent from the Wicket - User mailing list archive at Nabble.com.


Re: Using generics with some non-generic classes in Wicket

2008-05-13 Thread Stefan Simik

Mhmm, it is meaningful ;) I will know in future, thx

One of the last occuring warning is, when working with
MarkupContainer#add(...)  or  #addOrReplace(...)  method.

Example:  I have a simple AjaxPagingNavigator, to which I add a simple
ListView
---
ListViewInteger menu = new ListViewInteger(id, numbers){
//populate metods
}
add(menu);//warning here

The warning says: 
Type safety: The method add(Component...) belongs to the raw type
MarkupContainer. 
References to generic type MarkupContainerT should be parameterized

I cannot find out, what's the warning reason, because ListView self is
parameterized. 

-- 
View this message in context: 
http://www.nabble.com/Using-generics-with-some-non-generic-classes-in-Wicket-tp17208928p17211948.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: Using generics with some non-generic classes in Wicket

2008-05-13 Thread Stefan Simik

I have one idea,

the reason of the warnigs is, that parent of AjaxPagingNavigator is
PagingNavigator,
which has parent Panel --- that is not parameterized.

The same problem is with LoopItem, which extends the
WebMarkupContainer --- that is not parameterized.

? could this be the reason ?






Stefan Simik wrote:
 
 Mhmm, it is meaningful ;) I will know in future, thx
 
 One of the last occuring warning is, when working with
 MarkupContainer#add(...)  or  #addOrReplace(...)  method.
 
 Example:  I have a simple AjaxPagingNavigator, to which I add a simple
 ListView
 ---
 ListViewInteger menu = new ListViewInteger(id, numbers){
 //populate metods
 }
 add(menu);//warning here
 
 The warning says: 
 Type safety: The method add(Component...) belongs to the raw type
 MarkupContainer. 
 References to generic type MarkupContainerT should be parameterized
 
 I cannot find out, what's the warning reason, because ListView self is
 parameterized. 
 
 

-- 
View this message in context: 
http://www.nabble.com/Using-generics-with-some-non-generic-classes-in-Wicket-tp17208928p17212015.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: Using generics with some non-generic classes in Wicket

2008-05-13 Thread Stefan Simik

please, and will be these classes later generified ? 
Or should I make a RFE, or can I help anyway-for example attach a patch ?

I love your work and Wicket, so I do my best, to make it better ;)

Stefan Simik






Johan Compagner wrote:
 
 yes thats the reason
 
 you are calling the method add with a generified component but that
 container itself is not generified
 
 i dont like this about generics expecially the onces like this:
 
 add(MarkupContainer? container)
 
 then suddenly a none generified component cant be added...
 thats really stupid ? should mean anything.. including none generics
 
 johan
 
 
 On Tue, May 13, 2008 at 5:55 PM, Stefan Simik [EMAIL PROTECTED]
 wrote:
 

 I have one idea,

 the reason of the warnigs is, that parent of AjaxPagingNavigator is
 PagingNavigator,
 which has parent Panel --- that is not parameterized.

 The same problem is with LoopItem, which extends the
 WebMarkupContainer --- that is not parameterized.

 ? could this be the reason ?






 Stefan Simik wrote:
 
  Mhmm, it is meaningful ;) I will know in future, thx
 
  One of the last occuring warning is, when working with
  MarkupContainer#add(...)  or  #addOrReplace(...)  method.
 
  Example:  I have a simple AjaxPagingNavigator, to which I add a simple
  ListView
  ---
  ListViewInteger menu = new ListViewInteger(id, numbers){
  //populate metods
  }
  add(menu);//warning here
 
  The warning says:
  Type safety: The method add(Component...) belongs to the raw type
  MarkupContainer.
  References to generic type MarkupContainerT should be parameterized
 
  I cannot find out, what's the warning reason, because ListView self is
  parameterized.
 
 

 --
 View this message in context:
 http://www.nabble.com/Using-generics-with-some-non-generic-classes-in-Wicket-tp17208928p17212015.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/Using-generics-with-some-non-generic-classes-in-Wicket-1.4M1-tp17208928p17216869.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: Wicket javascripts - reloading every one hour

2008-05-08 Thread Stefan Simik

I looked at it in detail, and it works as following:

1. You are right, when caching is too low - then browser makes request, with
header
   If-Modified-Since. Response is 304 - that it was not modified. So the
whole resource 
   is not really downloaded, it is requested only, with short 304 response.

2. When caching time is longer, then:
 if resource is in caching time interval, then it is immediately taken
from browser cache,
 without sending a request with If-Modified-Since. So the request is not
performed, until
 caching time expires.

So the overhead is not so big. Some complex applications
may use many css and javascript files, and it is wasting of time for
requesting these never 
changing files every hour again and again. 

Also, solution is very simple, elegant and breaks no API. And the resulting
performance will 
be slightly better.
It would be good, to have a possibility to cache these never changing static
resources for 
a specified time, to prevent these needless requests.

The only thing, that is needed to do for it, is to change
WebResource#setHeaders() to take
the caching time from some settings, so it is not hardcoded and can be
configured by developer.

What do you think about it - should I create a RFE, or it is ok ?

Stefan Simik










Johan Compagner wrote:
 
 But is it then really downloaded?
 Because the brower makes first a head request to it and that will say
 not changed
 
 On 5/8/08, Stefan Simik [EMAIL PROTECTED] wrote:

 Hi boys,

 I think, there is one problem with wicket ajax javascripts - there are
 reloading by browser every
 hour, because the Expire header is hardcoded to 3600 seconds in
 WebResource#setHeaders() method.

 It is really needed to repeatedly once an hour download these wicket
 javascripts ?
 These are static wicket javascripts, they are not subject of changes, so
 why could they not be cached for longer time, for example - 1 week, or
 longer.

 It would be better, if caching time should be configurable from some
 application settings.
 Could I create requet for improvement, or it is all ok ?

 thx
 Stefan Simik

 //
 I have consulted this before, but without result. So now, I am trying to
 show
 the problem in a simpler situation.


 --
 View this message in context:
 http://www.nabble.com/Wicket-javascripts---reloading-every-one-hour-tp17117009p17117009.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/Wicket-javascripts---reloading-every-one-hour-tp17117009p17125087.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: Wicket javascripts - reloading every one hour

2008-05-08 Thread Stefan Simik

OK, thx
https://issues.apache.org/jira/browse/WICKET-1602

Stefan Simik


Johan Compagner wrote:
 
 file RFE
 

-- 
View this message in context: 
http://www.nabble.com/Wicket-javascripts---reloading-every-one-hour-tp17117009p17137997.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]



Wicket javascripts - reloading every one hour

2008-05-07 Thread Stefan Simik

Hi boys, 

I think, there is one problem with wicket ajax javascripts - there are
reloading by browser every
hour, because the Expire header is hardcoded to 3600 seconds in
WebResource#setHeaders() method.

It is really needed to repeatedly once an hour download these wicket
javascripts ?
These are static wicket javascripts, they are not subject of changes, so
why could they not be cached for longer time, for example - 1 week, or
longer.

It would be better, if caching time should be configurable from some
application settings.
Could I create requet for improvement, or it is all ok ?

thx
Stefan Simik

//
I have consulted this before, but without result. So now, I am trying to
show 
the problem in a simpler situation.


-- 
View this message in context: 
http://www.nabble.com/Wicket-javascripts---reloading-every-one-hour-tp17117009p17117009.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: Gzipping of pages (HTML output, not only resources)

2008-05-06 Thread Stefan Simik

Sure, here it is :)   
https://issues.apache.org/jira/browse/WICKET-1589

It will be great, if wicket can gzip html output from its pages. 
It could be one of the wicket settings, where it could turned on/off from.

thx,
Stefan SImik


Johan Compagner wrote:
 
 can you make a jira issue?
 

-- 
View this message in context: 
http://www.nabble.com/Gzipping-of-pages-%28HTML-output%2C-not-only-resources%29-tp16849900p17078702.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: Gzipping of pages (HTML output, not only resources)

2008-05-05 Thread Stefan Simik

Hi Johan, 

I looked at it, and I found 2 similarly named classes...
Which one did you mean -  BufferedWebResponse class, or
BufferedHttpServletResponse class ?







Johan Compagner wrote:
 
 Use a custom BufferdResponse. Thats in my eyes the way to go. If we
 need to fix some api for that please let me know
 
 On 4/30/08, Stefan Simik [EMAIL PROTECTED] wrote:

 Hi Igor,

 thanx for response. I looked at the IResponseFilter class and thoght
 about ,
 how could I implement
 the gzipping of  the text/html  responses.


 But I have found potential 2 problems, which I am not sure, how to solve
 from the context of
 IResponseFilter#filter(...) method only:

 1. Only text/html responses should be filtered. How to filter only these
 types of responses ?
 Or how to detect the mime-type of response from the context of
 IResponseFilter#filter(...)  method ?

 2. When the response-content will be gzipped, new header
 Content-Encoding:
 gzip should be set.
 How it is possible to add new header to existing response from
 context
 of IResponseFilter#filter(...)  method ?


 At first look, it seems for me, that the IResponseFilter#filter(..) 
 method
 was intended for changing
 text content of the response only, and it is not very suitable for
 complex
 modifying of Response.

 I am very interested in this and I would like to create the bullet-proof
 solution, how to gzip
 HTML responses from wicket.

 Thx
 Stefan






 igor.vaynberg wrote:
 
  there is also IResponseFilter
 
  -igor
 
 
  On Thu, Apr 24, 2008 at 6:08 AM, Stefan Simik [EMAIL PROTECTED]
  wrote:
 
 
 
   Stefan Simik wrote:
   
1. IDEA

  a) totally disable gzip in wicket --
getResourceSettings().setDisableGZipCompression(true);
  b) use Gzip filter BEFORE wicket-filter. This Gzip filter will
  compress
all the communication -
  HTML, resources  . Images and some mime-types should be
  omitted.
   
 
   Probably, there is one drawback in IDEA 1.
   Wicket already caches the processed(gzipped) result, what is very
  useful.
   This functionality should be moved to the Gzip filter, which can be a
  lot of
   effort.
 
   --
   View this message in context:
 
 http://www.nabble.com/Gzipping-of-pages-%28HTML-output%2C-not-only-resources%29-tp16849900p16850433.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/Gzipping-of-pages-%28HTML-output%2C-not-only-resources%29-tp16849900p16991360.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/Gzipping-of-pages-%28HTML-output%2C-not-only-resources%29-tp16849900p17067735.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: Gzipping of pages (HTML output, not only resources)

2008-05-04 Thread Stefan Simik

One simple idea.
It's possible, that we use different versions of Jetty. I am using version
6.1.8.


I could'nt find either the same closing code in Gzip filter, 
nor finishResponse() method,
nor such a string - This output stream has already been closed   in my
jetty source code.

public void close() throws IOException {
if (closed) {
throw new IOException(This output stream has already been
closed);
}
[...]
}


I think, we must work with different versions of Jetty :)


-- 
View this message in context: 
http://www.nabble.com/Gzipping-of-pages-%28HTML-output%2C-not-only-resources%29-tp16849900p17048230.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: Gzipping of pages (HTML output, not only resources)

2008-04-30 Thread Stefan Simik

Hi Artur, 

I looked at the uploads, but cannot find out, what exactly is the
problematic part with closing streams.

I find one stream-closing code in FileUpload - #closeStreams()  method.
This method closes all possibly opened InputStream-s for uploaded file.
Here, I don't see
any problem in gzipping HTML responses.
Could you please more elaborate on this - where the problem occurs ? I would
like to make
the HTML gzipping a bullet-proof solution ;)

I tried to work with basic upload form and it worked fine for me.

Stefan



Artur W. wrote:
 
 This filter works most of the time for me. The only problem is when I want
 to upload a file.
 I use UploadWebRequest and UploadProgressBar. AFAIK FileUpload closes the
 stream and because of it the filter throws exception.
 
 Artur
 

-- 
View this message in context: 
http://www.nabble.com/Gzipping-of-pages-%28HTML-output%2C-not-only-resources%29-tp16849900p16991091.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: Gzipping of pages (HTML output, not only resources)

2008-04-30 Thread Stefan Simik

Hi Igor,

thanx for response. I looked at the IResponseFilter class and thoght about ,
how could I implement
the gzipping of  the text/html  responses.


But I have found potential 2 problems, which I am not sure, how to solve
from the context of
IResponseFilter#filter(...) method only:

1. Only text/html responses should be filtered. How to filter only these
types of responses ? 
Or how to detect the mime-type of response from the context of
IResponseFilter#filter(...)  method ?

2. When the response-content will be gzipped, new header Content-Encoding:
gzip should be set.
How it is possible to add new header to existing response from context
of IResponseFilter#filter(...)  method ?


At first look, it seems for me, that the IResponseFilter#filter(..)  method
was intended for changing
text content of the response only, and it is not very suitable for complex
modifying of Response.

I am very interested in this and I would like to create the bullet-proof
solution, how to gzip
HTML responses from wicket.

Thx
Stefan






igor.vaynberg wrote:
 
 there is also IResponseFilter
 
 -igor
 
 
 On Thu, Apr 24, 2008 at 6:08 AM, Stefan Simik [EMAIL PROTECTED]
 wrote:



  Stefan Simik wrote:
  
   1. IDEA
   
 a) totally disable gzip in wicket --
   getResourceSettings().setDisableGZipCompression(true);
 b) use Gzip filter BEFORE wicket-filter. This Gzip filter will
 compress
   all the communication -
 HTML, resources  . Images and some mime-types should be
 omitted.
  

  Probably, there is one drawback in IDEA 1.
  Wicket already caches the processed(gzipped) result, what is very
 useful.
  This functionality should be moved to the Gzip filter, which can be a
 lot of
  effort.

  --
  View this message in context:
 http://www.nabble.com/Gzipping-of-pages-%28HTML-output%2C-not-only-resources%29-tp16849900p16850433.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/Gzipping-of-pages-%28HTML-output%2C-not-only-resources%29-tp16849900p16991360.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]



Caching time of resources - could it be as general setting ?

2008-04-30 Thread Stefan Simik

Hi Wicketeers,

Is it possible to take CACHING TIME for resources from some settings ?

Now, this time is hardcoded in WebResource#setHeaders(...) method to 1 hour
value.
I know, wicket is great for creating complex dynamic applications, but I
there is often
no need to reload the CSS and javascript files so often.

It is not problem to override this method in subclasses and use own value,
but when I have
done it, I can tell, that it is a too much effort of subclassing, because
many important wicket 
components are subclasses of the WebResource class and even more components
work with these subclasses which must be changed too, so there is whole
dependency tree, which has to be changed, because of caching only one
generic setting value.


For example - if somebody want to have all javascripts and css files cached
for a time of 1 week,
because they are not changed and there is no need to download them more
often, it is needed 
to create custom subclasses for:
RESOURCES
  - custom PackageResource (which extends WebResource)
  - then dependent JavascriptPackageResource, 
  - dependent CompressedPackageResource
RESOURCE REFERENCES
  - then custom ResourceReference (which will work new custom
PackageResource)
  - then dependent JavascriptResourceReference
  - dependent CompressedResourceReference

...
I think, it would be very good to separate this as general setting for
caching resources
in some wicket settings, where it can be overriden without so much
subclassing effort, which
bubble up the hierarchy now.

Stefan

-- 
View this message in context: 
http://www.nabble.com/Caching-time-of-resources---could-it-be-as-general-setting---tp16992127p16992127.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: Alternative method to initialise page

2008-04-27 Thread Stefan Simik



John Patterson wrote:
 
 Hi,
 
 I am extending the PagingNavigatation and need to access some member
 variables to create my page links.  Because these links are created in
 PagingNavigatation's constructor me subclasses newPagingNavigationLink()
 method is called before my subclasses member variables are initialised.  I
 realised that this situation must occur quite often when extending any
 class that allows subclasses to provide or override any components.
 
 Does anyone have a nice workaround?
 
 It seems to me that creating the pages component tree in some kind of
 initialisation step would make classes easier to extend.  Or is there
 already a method that should be used to do this?
 
 Thanks,
 
 John
 

I had similar problems, when I worked with DefaultDataTable and needed to
have custom PagingNavigation.
For example, DefaultDataTable has no factory methods for creating custom
PagingNavigation
so I had to copy-paste it and change some minor parts of the class. But it
was very easy and I take
the default implementations as an example how to work with them.

SS

-- 
View this message in context: 
http://www.nabble.com/Alternative-method-to-initialise-page-tp16742636p16922848.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: Gzipping of pages (HTML output, not only resources)

2008-04-26 Thread Stefan Simik

Thxnbsp;fornbsp;advicenbsp;-nbsp;Inbsp;triednbsp;tonbsp;usenbsp;thenbsp;mentionednbsp;gzipnbsp;filternbsp;andnbsp;itnbsp;seemsnbsp;tonbsp;worknbsp;:)
Inbsp;havenbsp;notnbsp;detectednbsp;anynbsp;problemnbsp;innbsp;mynbsp;application.

Inbsp;havenbsp;usednbsp;jetty\'snbsp;nbsp;nbsp;nbsp;nbsp;org.mortbay.servlet.GzipFilternbsp;nbsp;nbsp;nbsp;,nbsp;whichnbsp;Inbsp;mappednbsp;tonbsp;\quot;text/html\quot;nbsp;responsenbsp;typesnbsp;only.
Thisnbsp;filternbsp;isnbsp;placednbsp;BEFOREnbsp;wicket-filter

Inbsp;addednbsp;thisnbsp;partnbsp;ofnbsp;codenbsp;intonbsp;web.xml,nbsp;andnbsp;itnbsp;worksnbsp;greatnbsp;fornbsp;now.



lt;!--nbsp;==
nbsp;nbsp;nbsp;1.nbsp;filter:nbsp;Gzipnbsp;Jettynbsp;filter

nbsp;nbsp;=nbsp;--gt;

lt;filtergt;
lt;filter-namegt;GzipFilterlt;/filter-namegt;

lt;filter-classgt;org.mortbay.servlet.GzipFilterlt;/filter-classgt;

lt;init-paramgt;
lt;param-namegt;mimeTypeslt;/param-namegt;
lt;param-valuegt;text/htmllt;/param-valuegt;
lt;/init-paramgt;

lt;!--init-paramgt;
lt;param-namegt;bufferSizelt;/param-namegt;
lt;param-valuegt;8192lt;/param-valuegt;
lt;/init-param--gt;

lt;!--init-paramgt;
lt;param-namegt;minGzipSizelt;/param-namegt;
lt;param-valuegt;somenbsp;numberlt;/param-valuegt;
lt;/init-param--gt;

lt;!--init-paramgt;
lt;param-namegt;excludedAgentslt;/param-namegt;
lt;param-valuegt;somenbsp;patternlt;/param-valuegt;
lt;/init-param--gt;
lt;/filtergt;


nbsp;andnbsp;laternbsp;url-mappingnbsp;


lt;filter-mappinggt;
nbsp;nbsp;lt;filter-namegt;GzipFilterlt;/filter-namegt;
lt;url-patterngt;/*lt;/url-patterngt;
nbsp;  lt;/filter-mappinggt;

Maybenbsp;itnbsp;cannbsp;worknbsp;fornbsp;yournbsp;applicationsnbsp;withoutnbsp;anynbsp;problemsnbsp;too.
Asnbsp;anothernbsp;solution,nbsp;Inbsp;willnbsp;trynbsp;tonbsp;looknbsp;atnbsp;IResponseFilternbsp;next.
Fornbsp;now,nbsp;thanxnbsp;fornbsp;advicenbsp;;)







Artur W. wrote:
 
 
 Nino.Martinez wrote:
 
 At our wug CPH yesterday we talked about something similar (ajax), I 
 think theres no direct way currently. However you can setup a filter 
 which does that.
 
 http://www.onjava.com/pub/a/onjava/2003/11/19/filters.html
 
 
 This filter doesn't work with Wicket because wicket very often close the
 stream and you get the:
  if (closed) {
   throw new IOException(
   Cannot write to a closed output stream);
 }
 
 I asked about the same here:
 https://issues.apache.org/jira/browse/WICKET-1240
 
 Artur
 
 

-- 
View this message in context: 
http://www.nabble.com/Gzipping-of-pages-%28HTML-output%2C-not-only-resources%29-tp16849900p16915538.html
Sent from the Wicket - User mailing list archive at Nabble.com.


Re: DatePicker - CSS errors

2008-04-24 Thread Stefan Simik

Ok, I think, I can live with it ;)
Thx, for the answer .

Stefan Simik
-- 
View this message in context: 
http://www.nabble.com/DatePicker---CSS-errors-tp16834841p16849765.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]



Gzipping of pages (HTML output, not only resources)

2008-04-24 Thread Stefan Simik

Hi boys, 

I would like to ask, how it is possible to  gzip output of wicket pages
(html). 
I like gzipping of resources in wicket and I would like to add gzipping all
pages (i.e. html output) too.

Please, where in wicket can I add such a functionality or what/where should
I something wrap
to make it work ?

Stefan Simik

-- 
View this message in context: 
http://www.nabble.com/Gzipping-of-pages-%28HTML-output%2C-not-only-resources%29-tp16849900p16849900.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: Gzipping of pages (HTML output, not only resources)

2008-04-24 Thread Stefan Simik



Stefan Simik wrote:
 
 1. IDEA
 
   a) totally disable gzip in wicket --  
 getResourceSettings().setDisableGZipCompression(true);
   b) use Gzip filter BEFORE wicket-filter. This Gzip filter will compress
 all the communication -
   HTML, resources  . Images and some mime-types should be omitted.
 

Probably, there is one drawback in IDEA 1.
Wicket already caches the processed(gzipped) result, what is very useful. 
This functionality should be moved to the Gzip filter, which can be a lot of
effort.

-- 
View this message in context: 
http://www.nabble.com/Gzipping-of-pages-%28HTML-output%2C-not-only-resources%29-tp16849900p16850433.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]



DatePicker - CSS errors

2008-04-23 Thread Stefan Simik

Hi boys,

Firefox reports some CSS error (in Error console) when using YUI date
picker.

The problematic file is:
-
http://server/resources/org.apache.wicket.extensions.yui.YuiLib/calendar/assets/skins/sam/calendar.css

Version of the CSS file is 2.4.1. (taken from license header in source file)


There many types of error - 
---
 - Warning: Unknown property '_width'.  Declaration dropped.
 - Warning: Unknown property '_height'.  Declaration dropped.
 - Warning: Unknown property '_overflow'.  Declaration dropped.
 - Warning: Expected declaration but found '*'.  Skipped to next
declaration.


When I checked the errors - the reported errors really existed.
Here are some of buggy parts, I found in CSS:


Example 1 - here is really unknown CSS property _overflow
-
.yui-calcontainer{position:relative;float:left;_overflow:hidden;}.yui-calcontainer


Example 2 - here is really * without space between the selector and its
rules

button{display:block;*display:inline-block;*overflow:visible;border:none;background-color:transparent;cursor:pointer;}


Do you find, this is a real problem, or it is probably some sort of local
problem in my application only ?





-- 
View this message in context: 
http://www.nabble.com/DatePicker---CSS-errors-tp16834841p16834841.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: onBeforeRender vs. prepareForRender

2008-04-13 Thread Stefan Simik

Thank you both guys, 

all works fine now :)

The problem was, that I was using method prepareForRender(),
instead of the onBeforeRender().

Thanx boys
-- 
View this message in context: 
http://www.nabble.com/onBeforeRender-vs.-prepareForRender-tp16653398p16657001.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]



onBeforeRender vs. prepareForRender

2008-04-12 Thread Stefan Simik

Hi guys,

I would like to ask, 
what's the difference between these 2 methods:
  onBeforeRender vs. prepareForRender
and when it is appropriate to use the first or second.

Thanks a lot 
-- 
View this message in context: 
http://www.nabble.com/onBeforeRender-vs.-prepareForRender-tp16653398p16653398.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: onBeforeRender vs. prepareForRender

2008-04-12 Thread Stefan Simik

One additional question,

is it valid to change to component hierarchy in these methods ?

I tried it, but it didnt work:



SHORT EXAMPLE:
-

AjaxFallbackLink updateLink = new AjaxFallbackLink(updateLink) {

  @Override
  public void prepareForRender() {
super.prepareForRender();

// if some condition true - render additional attribute
if (isUpdateProcessRunning()) {
add(new 
StyleAttributeAppender(text-decoration: none;));
}
  }
};


 and result was, that no STYLE attribute was rendered.

But when I write:
updateLink.add(new StyleAttributeAppender(text-decoration: none;));
then, the STYLE attribute is rendered.


I cannot find out, what I am doing wrong here..

Thanks a lot.
-- 
View this message in context: 
http://www.nabble.com/onBeforeRender-vs.-prepareForRender-tp16653398p16653658.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]



Rendering strategies question

2007-11-22 Thread Stefan Simik

Hello Wicketeers, 

I prepare report about rendering strategies (for studying community in our
company) and conceptually I understand all the things, but I have one
question, that I cannot answer.

The default rendering strategy is RENDER_TO_BUFFER, because it solves both
problems of
two previous strategies: 
  1. no double submit problem
  2. no potential problems with double attaching/detaching models

But in my mind, I have problem:
When some aplication has 90% of pages, that are only for viewing, and 10% of
pages, that submit form,
then I see, that for 90% of the view pages is the redirect not useful. For
these 90% pages would be sufficient only ONE_PASS_RENDER strategy, because
there is no need for redirect from my point of view.
Only 10% of pages takes advantage from redirecting. Does'nt  it make 90% of
needless redirects ?

Is it not possible tu use REDIRECT_TO_BUFFER strategy only for POST request,
and for all GET request
respond with ONE_PASS_RENDER ? But in WicketFilter all POST's call GET, so I
think it's not possible.

Is there anything I forgot to think about ?

Thank you for you answer 

Stefan Simik




-- 
View this message in context: 
http://www.nabble.com/Rendering-strategies-question-tf4857740.html#a13900891
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: Rendering strategies question

2007-11-22 Thread Stefan Simik

mhmm, now I got it...
In other frameworks and also in Wicket it's common to use GET request for 
doing some action on the server ( for example Link#onClick(...) ), so it's
generally useful concept. I didn't see it from this point of view before.

Thank you both boys :)

Stefan Simik
-- 
View this message in context: 
http://www.nabble.com/Rendering-strategies-question-tf4857740.html#a13904939
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Border component - naming

2007-11-16 Thread Stefan Simik

Hello all, 

I have one question about the right naming of the Border component.

I think, that Border is a little confusing name, in context of swing-like
border. 
In my opinion, border should be used as a decorator, that is transparent for
component,
which has it added  ---  it's like the new IComponentBorder interface
(and MarkupComponentBorder) works. 

But the old component - Border behaves quite different. It's not border in
swing-context,
but it's like Panel. It has childs, it has own hierarchy ..The only
difference I see, is that Border works with markup inheritance
(with wicket:body) and Panel cannot use it.

So it seems to me, that Border name is a little confusing. It's not Border
- it behaves quite 
like normal CONTAINER, which has own childs, own hierarchy - quite like
Panel. The only 
difference I see, is that Border uses markup inheritance through
wicket:body, but panel does not.

I don't know, if I understand this concept correctly...  thanks in advance.
-- 
View this message in context: 
http://www.nabble.com/Border-component---naming-tf4822088.html#a13795650
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: Border component - naming

2007-11-16 Thread Stefan Simik

thanks for your response igor, 
yes, you are right, i understand, that in the output html border wraps
its content - so it's looks like border for nested components.

What we both mean, is the same, difference is only from point of view.
My point of view is, that generally (in desktop GUI like Swing - that was my
swing context)
borders are used for decorating some component (that's the same for wicket)
but hierarchy
is reversed towards wicket - for example:
 component.add( new LineBorder() );//like in
desktop GUI
Here: border knows nothing about component, that decorates


In Wicket, it's reversed:
  border.add(component); //in
Wicket
So it's my point of view, that this border is container component, because
other
components are added to it. I know, that it results in decorating added
component, but in the sense
of hierarchy, other components are added to the border, so the border is
container for added components.

In this context I see Border quite like Panel, that can use markup
inheritance through wicket:body/

I hope, you understand what I mean..
thx


-- 
View this message in context: 
http://www.nabble.com/Border-component---naming-tf4822088.html#a13802790
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: JavaRebel experience

2007-11-07 Thread Stefan Simik

Java Rebel worked for me too.
I had no such problem.
-- 
View this message in context: 
http://www.nabble.com/JavaRebel-experience-tf4695671.html#a13632511
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: TabbedPanel with image tabs - how to contribute ?

2007-10-12 Thread Stefan Simik

Thank you, 
I added new article:
http://cwiki.apache.org/confluence/display/WICKET/Tabs+with+image

but the last problem is, that I copied the article from one place to another
(better location), but now
I want to delete the the first article, because both are the same now.
(ARTICLE I WANT TO DELETE IS 
http://cwiki.apache.org/confluence/display/WICKET/TabbedPanel+with+image+tabs)

.. and there is a problem with message: You do not have permission

Who can I contact to delete the unwanted doubled article ?
-- 
View this message in context: 
http://www.nabble.com/TabbedPanel-with-image-tabs-tf4580281.html#a13173414
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: TabbedPanel with image tabs

2007-10-10 Thread Stefan Simik

Example for AjaxTabbedPanel: 


1. create new Link with image - different for selected and different for
unselected tab

MyAjaxFallbackLink.java




public class MyAjaxFallbackLink extends AjaxFallbackLink {

public MyAjaxFallbackLink(String id, boolean isSelectedTab) {
super(id);

Image image;

if (isSelectedTab){
image = new Image(image, new
ResourceReference(MyAjaxFallbackLink.class, inner-image_selected.gif));
}else{
image = new Image(image, new
ResourceReference(MyAjaxFallbackLink.class, inner-image_unselected.gif));
}

add(image);

}

public void onClick(AjaxRequestTarget target) {
//really nothing here - to override
}
}



2. override newLink() in AjaxTabbedPanel to return your link

MyAjaxTabbedPanel.java




public class MyAjaxTabbedPanel extends AjaxTabbedPanel {

public MyAjaxTabbedPanel(String id, List tabs) {
super(id, tabs);
setSelectedTab(0); //make sure, the first selected tab has 
index=0.
Important for image in first selected tab!
}

protected WebMarkupContainer newLink(String linkId, final int index) {
int selectedTab = getSelectedTab();
boolean selected = (index == selectedTab);

return new MyAjaxFallbackLink(linkId, selected)
{
private static final long serialVersionUID = 1L;

public void onClick(AjaxRequestTarget target)
{
setSelectedTab(index);
if (target != null)
{

target.addComponent(MyAjaxTabbedPanel.this);
}
onAjaxUpdate(target);
}
}; 
}

}




3. copy html code from TabbedPanel.html and extend with image to pass
hierarchy

 MyAjaxTabbedPanel.html 




lt;wicket:panelgt;

lt;div wicket:id=tabs-container class=tab-rowgt;
lt;ulgt;
lt;li wicket:id=tabsgt;
lt;a href=# wicket:id=linkgt;lt;img wicket:id=image
class=left-image/gt;lt;span wicket:id=titlegt;[[tab
title]]lt;/spanlt;/agt;
lt;/ligt;
lt;/ulgt;
lt;/divgt;
lt;div wicket:id=panel class=tab-panelgt;[panel]lt;/divgt;




-- 
View this message in context: 
http://www.nabble.com/TabbedPanel-with-image-tabs-tf4580281.html#a13132005
Sent from the Wicket - User mailing list archive at Nabble.com.


Re: TabbedPanel with image tabs - how to contribute ?

2007-10-10 Thread Stefan Simik

very good idea :)
How can I contribute ? ..or where can I send example with full sources ?
-- 
View this message in context: 
http://www.nabble.com/TabbedPanel-with-image-tabs-tf4580281.html#a13142733
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: Can't seem to include anchor tag in span with wicket:id - Help

2007-09-15 Thread Stefan Simik

try to unselect checkbox Message is in HTML Format (lying under Subject
field), it works for me

see:
div
xx
/div
-- 
View this message in context: 
http://www.nabble.com/Can%27t-seem-to-include-anchor-tag-in-span-with-wicket%3Aid---Help-tf4447230.html#a12691874
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: Can't seem to include anchor tag in span with wicket:id - Help

2007-09-15 Thread Stefan Simik

try to replace all your '' with amp;lt; and '' with amp;gt;
I know, it's not  very comfortable :)
-- 
View this message in context: 
http://www.nabble.com/Can%27t-seem-to-include-anchor-tag-in-span-with-wicket%3Aid---Help-tf4447230.html#a12691943
Sent from the Wicket - User mailing list archive at Nabble.com.


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