Re: Invoulentary session sharing/leakage in Wicket 1.3.x

2008-04-16 Thread Johan Compagner
What where those issues again? There isnt that many things changed as
far a i know so it would be nice to see whats wrong for you with the
snapshot so that we can look at this before a release

On 4/16/08, Edvin Syse <[EMAIL PROTECTED]> wrote:
> No, it has not. Johan said he fixed a bug that might have been this problem,
> but I haven't been able to confirm it yet, as the fix is in
> 1.3-SNAPSHOT, and I ran into some issues when deploying with the
> snapshot-version.
>
> I see this problem 10-20 times every day still..
>
> -- Edvin
>
> StephenP skrev:
> > Has a JIRA issue been created to track this fix?
> >
> > Thanks,
> > Stephen
> >
> >
> >
> >
> > Yes, it seems to be an error in Wicket.
> > Johan says it should be fixed it in the latest shapshot version, but I
> have
> > not tried it yet.
> >
> > But I will probably keep the workaround code as an extra protection.
> >
> > Niels
> >
> > Anything new on this issue?
> >
> > /Gwyn
> >
> >
>
> -
> 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]



Re: Invoulentary session sharing/leakage in Wicket 1.3.x

2008-04-16 Thread Johan Compagner
1 of our finally blocks calls first a response.close() without
try/catch around that and then unset the threadlocals, i think the
response.close does somehow in some situations throws an exception, i
dont know which one but i build a try catch around it.

On 4/17/08, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> we dont even know if it is something in wicket that is causing this
> yet...johan what exactly did you find out?
>
> -igor
>
>
> On Wed, Apr 16, 2008 at 4:34 PM, Ned Collyer <[EMAIL PROTECTED]> wrote:
> >
> >
> >  Edvin Syse wrote:
> >  >
> >  > No, it has not. Johan said he fixed a bug that might have been this
> >  > problem, but I haven't been able to confirm it yet, as the fix is in
> >  > 1.3-SNAPSHOT, and I ran into some issues when deploying with the
> >  > snapshot-version.
> >  >
> >  > I see this problem 10-20 times every day still..
> >  >
> >  > -- Edvin
> >  >
> >
> >  I hope we see a non snapshot release soon.  This sounds like a doozy of a
> >  bug - show stopper for everyone!
> >  --
> >  View this message in context:
> http://www.nabble.com/Invoulentary-session-sharing-leakage-in-Wicket-1.3.x-tp16550360p16735844.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]
>
>

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



Re: Exception starting filter WicketFilter on Glassfish

2008-04-16 Thread Igor Vaynberg
i dont see how any web application can work without a servlet
jar...are the other apps providing their own? that doesnt make any
sense...

to find one look in our pom, you should be able to snag it from
jetty's maven repo, or download jetty/tomcat distro. this jar is
usually provided by the container.

-igor


On Wed, Apr 16, 2008 at 11:13 PM, PJ Pillai <[EMAIL PROTECTED]> wrote:
> I searched the glassfish directory and it does not exist. Glassfish came
>  with netbean 6. Other webapplications are working fine. Where can I get the
>  servlet.jar?
>
>
>
>
>
>  On 4/16/08, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
>  >
>  > heh, your glassfish install is missing servlet.jar...weird. you sure
>  > your install is kosher, doesnt really make sense. unless in glassfish
>  > every module is supposed to provide its own servlet jar and glasshfish
>  > can run multiple concurrent versions?
>  >
>  > -igor
>  >
>  >
>  > On Wed, Apr 16, 2008 at 11:05 PM, PJ Pillai <[EMAIL PROTECTED]> wrote:
>  > > Hello,
>  > >
>  > >  I deployed my first hello world application on Glass Fish server. I am
>  > using
>  > >  Netbeans 6. I am getting following error:
>  > >
>  > >  WebModule[/MyApp]PWC1270: Exception starting filter WicketFilter
>  > >  java.lang.NoClassDefFoundError: javax/servlet/Filter
>  > >at java.lang.ClassLoader.defineClass1(Native Method)
>  > >at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
>  > >  
>  > >
>  > >  Please help
>  > >
>  > >  Thanks,
>  > >  Pravin
>  > >
>  >
>  > -
>  > 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]



Re: Exception starting filter WicketFilter on Glassfish

2008-04-16 Thread PJ Pillai
I searched the glassfish directory and it does not exist. Glassfish came
with netbean 6. Other webapplications are working fine. Where can I get the
servlet.jar?



On 4/16/08, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
>
> heh, your glassfish install is missing servlet.jar...weird. you sure
> your install is kosher, doesnt really make sense. unless in glassfish
> every module is supposed to provide its own servlet jar and glasshfish
> can run multiple concurrent versions?
>
> -igor
>
>
> On Wed, Apr 16, 2008 at 11:05 PM, PJ Pillai <[EMAIL PROTECTED]> wrote:
> > Hello,
> >
> >  I deployed my first hello world application on Glass Fish server. I am
> using
> >  Netbeans 6. I am getting following error:
> >
> >  WebModule[/MyApp]PWC1270: Exception starting filter WicketFilter
> >  java.lang.NoClassDefFoundError: javax/servlet/Filter
> >at java.lang.ClassLoader.defineClass1(Native Method)
> >at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
> >  
> >
> >  Please help
> >
> >  Thanks,
> >  Pravin
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Exception starting filter WicketFilter on Glassfish

2008-04-16 Thread Igor Vaynberg
heh, your glassfish install is missing servlet.jar...weird. you sure
your install is kosher, doesnt really make sense. unless in glassfish
every module is supposed to provide its own servlet jar and glasshfish
can run multiple concurrent versions?

-igor


On Wed, Apr 16, 2008 at 11:05 PM, PJ Pillai <[EMAIL PROTECTED]> wrote:
> Hello,
>
>  I deployed my first hello world application on Glass Fish server. I am using
>  Netbeans 6. I am getting following error:
>
>  WebModule[/MyApp]PWC1270: Exception starting filter WicketFilter
>  java.lang.NoClassDefFoundError: javax/servlet/Filter
>at java.lang.ClassLoader.defineClass1(Native Method)
>at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
>  
>
>  Please help
>
>  Thanks,
>  Pravin
>

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



Exception starting filter WicketFilter on Glassfish

2008-04-16 Thread PJ Pillai
Hello,

I deployed my first hello world application on Glass Fish server. I am using
Netbeans 6. I am getting following error:

WebModule[/MyApp]PWC1270: Exception starting filter WicketFilter
java.lang.NoClassDefFoundError: javax/servlet/Filter
   at java.lang.ClassLoader.defineClass1(Native Method)
   at java.lang.ClassLoader.defineClass(ClassLoader.java:620)


Please help

Thanks,
Pravin


Re: Wicket cannot work on OC4J (ias 10g)?

2008-04-16 Thread Igor Vaynberg
from what i remember, filter support is broken in oracle app server.
dont quote me on that though, but do search this list...

-igor


On Wed, Apr 16, 2008 at 10:15 PM, xdirewolfx <[EMAIL PROTECTED]> wrote:
>
>  Thank you for your prompt reply. It s working well now
>
>
>
>  igor.vaynberg wrote:
>  >
>  > try using wicketservlet instead of wicketfilter
>  >
>  > -igor
>  >
>  > On Wed, Apr 16, 2008 at 8:46 PM, xdirewolfx <[EMAIL PROTECTED]> wrote:
>  >>
>  >>  I can deploy the application can kick up and the first page can be shown
>  >> but
>  >>  the rest of the stuff do not work as normal:
>  >>   - forms lost validations
>  >>   - buttons do not work
>  >>  etc..
>  >>
>  >>  wicket 1.3.1
>  >>  --
>  >>  View this message in context:
>  >> 
> http://www.nabble.com/Wicket-cannot-work-on-OC4J-%28ias-10g%29--tp16738242p16738242.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-cannot-work-on-OC4J-%28ias-10g%29--tp16738242p16739041.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]



Re: 1.3, resource locator and properties

2008-04-16 Thread Nino Saturnino Martinez Vazquez Wael
No problem, thank me after the issue are solved:) But you would send the 
thing to me? I haven't received anything yet FYI...


Scott Swank wrote:

Thank you Nino.  I'll send the quickstart directly to you since the
list doesn't allow attachments.  I'm extracting everything from our
sandbox app that you're not interested in.  I do have the behavior
reproduced there.

- Scott

On Wed, Apr 16, 2008 at 1:02 PM, Nino Saturnino Martinez Vazquez Wael
<[EMAIL PROTECTED]> wrote:
  

Hi Scott

 Could you provide a quickstart? I have some time tomorrow...

 Scott Swank wrote:




I have subclassed ComponentStringResourceLoader so that I can drive it
from a custom ResourceNameIterator (in particular to look in the right
directories).  In particular, I just overrode

  public String loadStringResource(Class clazz, final String key,
final Locale locale, final String style)

and only changed the line

  ResourceNameIterator iter = new ResourceNameIterator(path, style,
locale, "properties,xml");

to use our iterator.  Now it cannot find myApplication.properties and
I am at a bit of a loss as how this class ever got to
myApplication.properties.  When it is constructing its list of
components it clearly stops at the Page and I don't see how it would
ever get to the Application.

   private List getComponentStack(final Component component)
   {
   // Build the search stack
   final List searchStack = new ArrayList();
   searchStack.add(component.getClass());

   if (!(component instanceof Page))
   {
   // Add all the component on the way to the Page
   MarkupContainer container = component.getParent();
   while (container != null)
   {
   searchStack.add(container.getClass());
   if (container instanceof Page)
   {
   break;
   }

   container = container.getParent();
   }
   }
   return searchStack;
   }

What am I missing?

Thank you,
Scott

On Tue, Apr 15, 2008 at 12:30 PM, Scott Swank <[EMAIL PROTECTED]>
  

wrote:

  

Previously we retrieved the CompoundResourceStreamLocator and added
 our ResourceStreamLocator to it.  In 1.2 did this take care of
 StringResourceLoader too?

  WebApplicationPath resourceFinder = (WebApplicationPath)
 getResourceSettings().getResourceFinder();
  resourceFinder.add(Env.getInstance().getAthenaDocRoot());

  CompoundResourceStreamLocator locator =
 (CompoundResourceStreamLocator)
 getResourceSettings().getResourceStreamLocator();
  locator.add(0, new WebPageResourceStreamLocator(resourceFinder));

 Thank you,
 Scott




 On Tue, Apr 15, 2008 at 10:55 AM, Scott Swank <[EMAIL PROTECTED]>


wrote:


 > We are finally upgrading to Wicket 1.3 (in particular to 1.3.3 from
 >  1.2.6) and our StringResourceModels can no longer find their


property


 >  files, which leaves our web pages containing the following:
 >
 > [Warning: String resource for 'tickets' not found]
 >
 >  Our application init method contains:
 >
 >IResourceFinder finder =


getResourceSettings().getResourceFinder();


 >IResourceStreamLocator streamLocator = new
 >  WebPageResourceStreamLocator(finder);
 >getResourceSettings().setResourceStreamLocator(streamLocator);
 >
 >  and in our ResourceStreamLocator I added the following with a break
 >  point on the System.out line:
 >
 >public IResourceStream locate(final Class clazz, String path,


final


 >  String variationAndStyle, final Locale locale, String extension)
 >{
 >   if (!"html".equals(extension) && !path.endsWith(".js") &&
 >  !path.endsWith(".css"))
 >   {
 >  System.out.println("break");
 >   }
 >...
 >
 >  I never see the locate() method called in an attempt to find the
 >  properties.  Where should I be looking?
 >
 >  Thank you,
 >  Scott
 >





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




  

 --
 -Wicket for love

 Nino Martinez Wael
 Java Specialist @ Jayway DK
 http://www.jayway.dk
 +45 2936 7684


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





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


  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]

Re: Wicket cannot work on OC4J (ias 10g)?

2008-04-16 Thread xdirewolfx

Thank you for your prompt reply. It s working well now

igor.vaynberg wrote:
> 
> try using wicketservlet instead of wicketfilter
> 
> -igor
> 
> On Wed, Apr 16, 2008 at 8:46 PM, xdirewolfx <[EMAIL PROTECTED]> wrote:
>>
>>  I can deploy the application can kick up and the first page can be shown
>> but
>>  the rest of the stuff do not work as normal:
>>   - forms lost validations
>>   - buttons do not work
>>  etc..
>>
>>  wicket 1.3.1
>>  --
>>  View this message in context:
>> http://www.nabble.com/Wicket-cannot-work-on-OC4J-%28ias-10g%29--tp16738242p16738242.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-cannot-work-on-OC4J-%28ias-10g%29--tp16738242p16739041.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 a static image map

2008-04-16 Thread Cristina


Martijn C. Vos wrote:
> 
> [...]
> Ofcourse if the ImageMap's areas are completely static, you may
> want to keep the shape and coordinates of the links outside the
> Wicket code and only in the html, so I'm kinda wondering if it
> would be possible to keep the map outside Wicket, and simply
> give each area a wicket:id corresponding to a Link in your
> Wicket code.
> 
> No idea if that would work (the ImageMap is kinda old and rarely
> used), but that's what I'd try.
> [...]
> 

Well, Martijn, I've tried and it actually works... :-) It's a very clean
solution so I'll left a code snippet here just in case someone else needs to
solve the same problem:

In the HTML file:








Basic Business Process (BPMN)


In the Java class:

// Links to the  elements of the image map...
add(new PageLink("module-01", Module01.class));
add(new PageLink("module-02", Module02.class));

Thanks for your help,

Cristina
 
-- 
View this message in context: 
http://www.nabble.com/Using-a-static-image-map-tp16656656p16738785.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 cannot work on OC4J (ias 10g)?

2008-04-16 Thread Igor Vaynberg
try using wicketservlet instead of wicketfilter

-igor

On Wed, Apr 16, 2008 at 8:46 PM, xdirewolfx <[EMAIL PROTECTED]> wrote:
>
>  I can deploy the application can kick up and the first page can be shown but
>  the rest of the stuff do not work as normal:
>   - forms lost validations
>   - buttons do not work
>  etc..
>
>  wicket 1.3.1
>  --
>  View this message in context: 
> http://www.nabble.com/Wicket-cannot-work-on-OC4J-%28ias-10g%29--tp16738242p16738242.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]



Wicket cannot work on OC4J (ias 10g)?

2008-04-16 Thread xdirewolfx

I can deploy the application can kick up and the first page can be shown but
the rest of the stuff do not work as normal:
 - forms lost validations
 - buttons do not work
etc..

wicket 1.3.1
-- 
View this message in context: 
http://www.nabble.com/Wicket-cannot-work-on-OC4J-%28ias-10g%29--tp16738242p16738242.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 design tables that support 50-100K rows?

2008-04-16 Thread Igor Vaynberg
see dataview, idataprovider, and pagingnavigator

-igor


On Wed, Apr 16, 2008 at 8:00 PM, Philip Johnson <[EMAIL PROTECTED]> wrote:
> Greetings, wicket experts,
>
>  I am a newly infatuated wicket developer, and would like to solicit your
> advice on the best way to design a table that can support up to 100,000
> rows. Here are my initial thoughts:
>
>  * Clearly, I don't want to display all of them at once.  I am assuming that
> I will want to use a class like PageableListView so that I can show only 500
> or so at a time. Is that reasonable, or is there a better approach?
>
>  * Clearly, I don't want to have to keep all of the rows in memory.  I am
> assuming I need to use a LoadableDetachable model as a result.  Is that
> correct?
>
>  * Finally, when I am displaying Page 1 containing 500 rows (using something
> like PageableListView), I'd like to only populate my model with rows 1-500
> from my backing store.  Let's say the user then clicks on Page 3: at that
> point, I'd like to go retrieve rows 1001-1500 from my backing store and
> populate my model for rows 1001-1500.  How would one go about doing this?
> Would it be possible to kind of sketch out the approach for me?
>
>  If I am totally going down the wrong path, please let me know about that.
>
>  Thanks for your help!
>
>  Cheers,
>  Philip Johnson
>
>
>
>  -
>  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]



How to design tables that support 50-100K rows?

2008-04-16 Thread Philip Johnson

Greetings, wicket experts,

I am a newly infatuated wicket developer, and would like to solicit your advice on the 
best way to design a table that can support up to 100,000 rows. Here are my initial 
thoughts:


* Clearly, I don't want to display all of them at once.  I am assuming that I will want 
to use a class like PageableListView so that I can show only 500 or so at a time. Is that 
reasonable, or is there a better approach?


* Clearly, I don't want to have to keep all of the rows in memory.  I am assuming I need 
to use a LoadableDetachable model as a result.  Is that correct?


* Finally, when I am displaying Page 1 containing 500 rows (using something like 
PageableListView), I'd like to only populate my model with rows 1-500 from my backing 
store.  Let's say the user then clicks on Page 3: at that point, I'd like to go retrieve 
rows 1001-1500 from my backing store and populate my model for rows 1001-1500.  How would 
one go about doing this?  Would it be possible to kind of sketch out the approach for me?


If I am totally going down the wrong path, please let me know about that.

Thanks for your help!

Cheers,
Philip Johnson



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



Re: DataTable and Panel issue

2008-04-16 Thread Ritz123

I have a LOG statement right at the begining of the DataProvider.iterator()
method
LOG.info("*** iterator first " + first + " count " + count);  

No matter what page number I pass in - Note its bookmarkable page links for
the page navigation - the first is always 0.




Nick Heudecker wrote:
> 
> Having the DT in the Panel shouldn't impact your paging.  It's possible
> that
> your service object isn't doing what you think it is.
> 
> 
> 
> On Wed, Apr 16, 2008 at 8:34 PM, Ritz123 <[EMAIL PROTECTED]> wrote:
> 
>>
>> Thanks Nick for the response...
>>
>> Posted the code
>>
>> http://www.papernapkin.org/pastebin/view/511/
>>
>> Let me know if more explanation is needed.
>>
>>
>>
>> Nick Heudecker wrote:
>> >
>> > Can you post any code?  Use a (Wicket powered!) pastebin if possible.
>> >
>> > http://www.papernapkin.org/pastebin/home
>> >
>> >
>> >
>> > On Wed, Apr 16, 2008 at 7:41 PM, Ritz123 <[EMAIL PROTECTED]>
>> wrote:
>> >
>> >>
>> >> Will appreciate a response or any pointers.
>> >>
>> >>
>> >> Ritz123 wrote:
>> >> >
>> >> > Hi,
>> >> >
>> >> > I have put DataTable in a panel instead of putting it on the pages
>> >> > directly as shown in the examples.
>> >> >
>> >> > As a result of this iterator() method of the DataProvider is not
>> >> getting
>> >> > called with first and count updated. I have created
>> >> bookmarkablepagelinks
>> >> > for the table navigation so its SEO friendly. Since DataTable is
>> >> actually
>> >> > added in the panel, panel is added in the page constructor and panel
>> >> > constructor updates rowsperpage and current page based on what is
>> >> passed
>> >> > in the bookmarkablelink pageparameters.
>> >> >
>> >> > This seems to suggest the model somewhere is NOT dynamic - not sure
>> >> what
>> >> > am I missing.
>> >> >
>> >>
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/DataTable-and-Panel-issue-tp16734720p16736521.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]
>> >>
>> >>
>> >
>> >
>> > --
>> > Nick Heudecker
>> > Professional Wicket Training & Consulting
>> > http://www.systemmobile.com
>> >
>> > Eventful - Intelligent Event Management
>> > http://www.eventfulhq.com
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/DataTable-and-Panel-issue-tp16734720p16737084.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]
>>
>>
> 
> 
> -- 
> Nick Heudecker
> Professional Wicket Training & Consulting
> http://www.systemmobile.com
> 
> Eventful - Intelligent Event Management
> http://www.eventfulhq.com
> 
> 

-- 
View this message in context: 
http://www.nabble.com/DataTable-and-Panel-issue-tp16734720p16737575.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: AbstractDefaultAjaxBehavior ....shows the ajax indicator even if precondition script returns false.

2008-04-16 Thread Igor Vaynberg
file a bug in jira please

-igor

On Wed, Apr 16, 2008 at 6:52 PM, atul singh <[EMAIL PROTECTED]> wrote:
> AbstractDefaultAjaxBehavior shows the ajax indicator even if precondition
>  script returns false. That means no call will be made actually to the server
>  right(And hence no indicator should be shown). I know i can have my own
>  implementation to get this, but i wanted to use IAjaxIndicatorAware
>  Should i file a bug about this?? (In my particular scenario it keeps showing
>  all the time, though i go to the server only when a javascript variable
>  returns true)
>  Thanks
>

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



Re: Selecting a radio programmatically?

2008-04-16 Thread Nick Heudecker
Radio objects can have values other than boolean.

On Wed, Apr 16, 2008 at 8:53 PM, Michael Mehrle <[EMAIL PROTECTED]>
wrote:

> Simple actually - I need to select a radio in a group programmatically
> (without user interaction). Is this done via setting the model of the
> radio to a true Boolean?
>
>
>
> Michael
>
>


-- 
Nick Heudecker
Professional Wicket Training & Consulting
http://www.systemmobile.com

Eventful - Intelligent Event Management
http://www.eventfulhq.com


Re: Wicket + iText ?

2008-04-16 Thread Ricky
that is sweet, thanks, i'll try it out. Appreciate it. :)

Rick

On Wed, Apr 16, 2008 at 9:50 PM, John Krasnay <[EMAIL PROTECTED]> wrote:

> It goes something like this. I've left out a bunch of stuff to do with
> setting column headings, widths, and styles.
>
> public interface ReportColumn extends Serializable {
>public Object getCellValue(IModel rowModel);
> }
>
> public class ExcelReportGenerator implements ReportGenerator {
>public void generate(
>OutputStream outputStream,
>ReportColumn[] columns,
>IDataProvider dataProvider) throws IOException {
>
>HSSFWorkbook workbook = new HSSFWorkbook();
>HSSFSheet sheet = workbook.createSheet();
>
>Iterator iter = dataProvider.iterator(0, dataProvider.size());
>while (iter.hasNext()) {
>Object o = iter.next();
>IModel rowModel = dataProvider.model(o);
>row = sheet.createRow(rownum++);
>for (short i = 0; i < columns.length; i++) {
>HSSFCell cell = row.createCell(columnNumber,
>HSSFCell.CELL_TYPE_STRING);
>Object value = column.getCellValue(rowModel);
>cell.setCellValue(new
> HSSFRichTextString(value.toString()));
>}
>}
>
>workbook.write(outputStream);
>}
> }
>
>
> We then use a Link with code like this in its onClick method:
>
>public void onClick() {
>final ReportGenerator generator = getReportGenerator();
>
>IResourceStream resourceStream =
>  new AbstractResourceStreamWriter() {
>public void write(OutputStream output) {
>try {
>generator.generate(output, columns, dataProvider);
>} catch (IOException e) {
>throw new RuntimeException(e);
>}
>}
>public String getContentType() {
>return generator.getContentType();
>}
>
>};
>
>getRequestCycle().setRequestTarget(
>new ResourceStreamRequestTarget(resourceStream)
>.setFileName(getFileName()));
>}
>
>
> jk
>
> On Wed, Apr 16, 2008 at 09:25:41PM -0400, Ricky wrote:
> > Can someone post some code on this ? (only rough sketch ... nothing
> > elaborate really.
> >
> > Thanks in advance.
> > Rick
> >
> > On Wed, Apr 16, 2008 at 8:54 PM, John Krasnay <[EMAIL PROTECTED]> wrote:
> >
> > > Hi RG,
> > >
> > > You probably want to look at how DataTable in wicket-extensions works.
> > > The idea is you set up an array of column objects, each of which knows
> > > how to display the data in a particular column, and a data provider,
> > > which provides an iterator over the objects represent your rows. The
> > > DataTable puts these two together and renders an HTML table.
> > >
> > > You can tackle your PDF problem in a similar way. Create a different
> > > column abstraction that writes to the iText API, then create a
> component
> > > analagous to DataTable but that writes the PDF out to a stream.
> > > Internally, this DataTable-equivalent would create the iText document,
> > > iterate over the rows returned by the data provider, and for each row
> > > iterate over the columns, asking each column to render its particular
> > > cell.
> > >
> > > We use this approach for generating spreadsheets (using POI instead of
> > > iText, of course) and it works like a charm.
> > >
> > > jk
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 

Regards
Vyas, Anirudh
||  ॐ  ||


Re: DataTable and Panel issue

2008-04-16 Thread Nick Heudecker
Having the DT in the Panel shouldn't impact your paging.  It's possible that
your service object isn't doing what you think it is.



On Wed, Apr 16, 2008 at 8:34 PM, Ritz123 <[EMAIL PROTECTED]> wrote:

>
> Thanks Nick for the response...
>
> Posted the code
>
> http://www.papernapkin.org/pastebin/view/511/
>
> Let me know if more explanation is needed.
>
>
>
> Nick Heudecker wrote:
> >
> > Can you post any code?  Use a (Wicket powered!) pastebin if possible.
> >
> > http://www.papernapkin.org/pastebin/home
> >
> >
> >
> > On Wed, Apr 16, 2008 at 7:41 PM, Ritz123 <[EMAIL PROTECTED]>
> wrote:
> >
> >>
> >> Will appreciate a response or any pointers.
> >>
> >>
> >> Ritz123 wrote:
> >> >
> >> > Hi,
> >> >
> >> > I have put DataTable in a panel instead of putting it on the pages
> >> > directly as shown in the examples.
> >> >
> >> > As a result of this iterator() method of the DataProvider is not
> >> getting
> >> > called with first and count updated. I have created
> >> bookmarkablepagelinks
> >> > for the table navigation so its SEO friendly. Since DataTable is
> >> actually
> >> > added in the panel, panel is added in the page constructor and panel
> >> > constructor updates rowsperpage and current page based on what is
> >> passed
> >> > in the bookmarkablelink pageparameters.
> >> >
> >> > This seems to suggest the model somewhere is NOT dynamic - not sure
> >> what
> >> > am I missing.
> >> >
> >>
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/DataTable-and-Panel-issue-tp16734720p16736521.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]
> >>
> >>
> >
> >
> > --
> > Nick Heudecker
> > Professional Wicket Training & Consulting
> > http://www.systemmobile.com
> >
> > Eventful - Intelligent Event Management
> > http://www.eventfulhq.com
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/DataTable-and-Panel-issue-tp16734720p16737084.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]
>
>


-- 
Nick Heudecker
Professional Wicket Training & Consulting
http://www.systemmobile.com

Eventful - Intelligent Event Management
http://www.eventfulhq.com


Selecting a radio programmatically?

2008-04-16 Thread Michael Mehrle
Simple actually - I need to select a radio in a group programmatically
(without user interaction). Is this done via setting the model of the
radio to a true Boolean?

 

Michael



AbstractDefaultAjaxBehavior ....shows the ajax indicator even if precondition script returns false.

2008-04-16 Thread atul singh
AbstractDefaultAjaxBehavior shows the ajax indicator even if precondition
script returns false. That means no call will be made actually to the server
right(And hence no indicator should be shown). I know i can have my own
implementation to get this, but i wanted to use IAjaxIndicatorAware
Should i file a bug about this?? (In my particular scenario it keeps showing
all the time, though i go to the server only when a javascript variable
returns true)
Thanks


Re: Wicket + iText ?

2008-04-16 Thread John Krasnay
It goes something like this. I've left out a bunch of stuff to do with
setting column headings, widths, and styles.

public interface ReportColumn extends Serializable {
public Object getCellValue(IModel rowModel);
}

public class ExcelReportGenerator implements ReportGenerator {
public void generate(
OutputStream outputStream, 
ReportColumn[] columns, 
IDataProvider dataProvider) throws IOException {

HSSFWorkbook workbook = new HSSFWorkbook();
HSSFSheet sheet = workbook.createSheet();

Iterator iter = dataProvider.iterator(0, dataProvider.size());
while (iter.hasNext()) {
Object o = iter.next();
IModel rowModel = dataProvider.model(o);
row = sheet.createRow(rownum++);
for (short i = 0; i < columns.length; i++) {
HSSFCell cell = row.createCell(columnNumber,
HSSFCell.CELL_TYPE_STRING);
Object value = column.getCellValue(rowModel);
cell.setCellValue(new HSSFRichTextString(value.toString()));
}
}

workbook.write(outputStream);
}
}


We then use a Link with code like this in its onClick method:

public void onClick() {
final ReportGenerator generator = getReportGenerator();

IResourceStream resourceStream = 
  new AbstractResourceStreamWriter() {
public void write(OutputStream output) {
try {
generator.generate(output, columns, dataProvider);
} catch (IOException e) {
throw new RuntimeException(e);
}
}
public String getContentType() {
return generator.getContentType();
}

};

getRequestCycle().setRequestTarget(
new ResourceStreamRequestTarget(resourceStream)
.setFileName(getFileName()));
}


jk

On Wed, Apr 16, 2008 at 09:25:41PM -0400, Ricky wrote:
> Can someone post some code on this ? (only rough sketch ... nothing
> elaborate really.
> 
> Thanks in advance.
> Rick
> 
> On Wed, Apr 16, 2008 at 8:54 PM, John Krasnay <[EMAIL PROTECTED]> wrote:
> 
> > Hi RG,
> >
> > You probably want to look at how DataTable in wicket-extensions works.
> > The idea is you set up an array of column objects, each of which knows
> > how to display the data in a particular column, and a data provider,
> > which provides an iterator over the objects represent your rows. The
> > DataTable puts these two together and renders an HTML table.
> >
> > You can tackle your PDF problem in a similar way. Create a different
> > column abstraction that writes to the iText API, then create a component
> > analagous to DataTable but that writes the PDF out to a stream.
> > Internally, this DataTable-equivalent would create the iText document,
> > iterate over the rows returned by the data provider, and for each row
> > iterate over the columns, asking each column to render its particular
> > cell.
> >
> > We use this approach for generating spreadsheets (using POI instead of
> > iText, of course) and it works like a charm.
> >
> > jk

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



Re: Wicket component?

2008-04-16 Thread Ricky
Hi,
question : you said : (I'm inside a form, so I don't want to use a panel).
(it may sound stupid, but had to ask)

Why is that ?

Rick

On Wed, Apr 16, 2008 at 6:09 PM, Michael Mehrle <[EMAIL PROTECTED]>
wrote:

> Good idea and it worked! :-)
>
> Thanks, I feel silly for not thinking of this myself... note to myself -
> get more sleep.
>
> Michael
>
> -Original Message-
> From: Vit Rozkovec [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, April 16, 2008 2:36 PM
> To: users@wicket.apache.org
> Subject: Re: Wicket  component?
>
> You can attach WebMarkupContainer to it.
>
> Vitek
>
> Michael Mehrle wrote:
> > I need to create a  in my template that is being set to a
> different
> > css class before it gets drawn. So, a regular non-wicket  HTML
> tag
> > is out. How can I create a simple  tag without using a wicket
> > panel? (I'm inside a form, so I don't want to use a panel).
> >
> >
> >
> > Thanks,
> >
> >
> >
> > Michael
> >
> >
> >
> >
> >
> >
> >
>
>
> -
> 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]
>
>


-- 

Regards
Vyas, Anirudh
||  ॐ  ||


Re: good WicketTester info page?

2008-04-16 Thread Ricky
Hey Mike,

http://cwiki.apache.org/WICKET/newuserguide.html#Newuserguide-UnitTest

^^ try that. I tried adding whatever i know (bear in mind, i am new to
wicket so my knowledge is  limited to whatever i have experienced so far, i
hope this helps ).

Thanks,
Rick

On Wed, Apr 16, 2008 at 10:51 AM, Michael Perkonigg <
[EMAIL PROTECTED]> wrote:

> lars vonk wrote:
>
> > I would advice you to just try it out... that's how I did it. You could
> > use
> > the mvn quickstart archetype tocreate a skeleton project and start
> > testing:
> >
> > mvn archetype:create -DarchetypeGroupId=org.apache.wicket
> > -DarchetypeArtifactId=wicket-archetype-quickstart
> > -DarchetypeVersion=1.3.3
> > -DgroupId=com.mycompany -DartifactId=myproject
> >
> > Hopes this helps,
> >
> >
>
> Unfortunately not. I have a project and I am ordered to write some tests.
> I can influence some of the contructs used in this project but most are here
> and I have to live with them. So I try to find out how to test them or if I
> can test them with the WicketTester.
> It seems to me that there are a lot of possible contructs which cannot be
> tested.
> The info about the WicketTester API is also quite sparse, there seems to
> be no documentation except the examples in the javadoc and one page in the
> wiki. Even the one who created the one wiki page mentioned that he had to
> try it out himself.
>
> Thanks,
> Mike
>
>  Lars
> >
> > On Wed, Apr 16, 2008 at 2:40 PM, Michael Perkonigg <
> > [EMAIL PROTECTED]> wrote:
> >
> >
> >
> > > Hello,
> > >
> > > is there a page explaining what one can do with the WicketTester and
> > > how?
> > > And yes, I already read
> > > http://cwiki.apache.org/WICKET/testing-pages.htmlit'sjust
> > >  not very clear what can be done and, more important, cannot be
> > > done.
> > >
> > > Thanks,
> > > Mike
> > >
> > >
> > > -
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> > >
> > >
> >
> >
> >
>
>
> --
> Liland ...does IT better
>
> Liland IT GmbH
> Software Entwickler
> email: [EMAIL PROTECTED]
>
> office: +43 (0)463 220-111  | fax: +43 (0)463 220-288 http://www.Liland.at
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


How to load applet in wicket while using embedded jetty?

2008-04-16 Thread jianfei

I am trying to load an applet to make it display inside my wicket page. I am
using the embedded jetty and I bring up the server by calling this main
method:


  public static void main(String[] args) throws Exception {
Server server = new Server();
SocketConnector connector = new SocketConnector();
connector.setPort(8080);
server.setConnectors(new Connector[] { connector });

WebAppContext bb = new WebAppContext();
bb.setServer(server);
bb.setContextPath("/projectoverviewer");
bb.setWar("webapp");
server.addHandler(bb);

try {
  System.out.println(">>> STARTING EMBEDDED JETTY SERVER, PRESS ANY KEY
TO STOP");
  server.start();
  while (System.in.available() == 0) {
Thread.sleep(5000);
  }
  server.stop();
  server.join();
}
catch (Exception e) {
  e.printStackTrace();
  System.exit(100);
}
  }


And my applet tag is as following:

< applet code="mypackage.myapplet.class" codebase="."
archive="dependent.jar" />


The problem I have with the embedded jetty is that when it gets to the
applet page, it's looking for the applet class in
http://localhost:8080/mywebapp/mypackage/myapplet.class (according to the
Java console). It doesn't find the class file there. I want to know what is
the underneath file structure after the http://localhost:8080/ URL? Also I
want to know how does wicket loads the the classes files in that URL format,
so I can specify the correct value for the "codebase" attribute.


I have read some threads about the similar problems, but all of them seem to
deploy a war file with a certain file structure inside. The embedded jetty
doesn't even create a war file, and I want to stick to the embedded jetty,
so how do I solve this problem? Thanks!
-- 
View this message in context: 
http://www.nabble.com/How-to-load-applet-in-wicket-while-using-embedded-jetty--tp16737094p16737094.html
Sent from the Wicket - User mailing list archive at Nabble.com.


Re: DataTable and Panel issue

2008-04-16 Thread Ritz123

Thanks Nick for the response...

Posted the code

http://www.papernapkin.org/pastebin/view/511/

Let me know if more explanation is needed.



Nick Heudecker wrote:
> 
> Can you post any code?  Use a (Wicket powered!) pastebin if possible.
> 
> http://www.papernapkin.org/pastebin/home
> 
> 
> 
> On Wed, Apr 16, 2008 at 7:41 PM, Ritz123 <[EMAIL PROTECTED]> wrote:
> 
>>
>> Will appreciate a response or any pointers.
>>
>>
>> Ritz123 wrote:
>> >
>> > Hi,
>> >
>> > I have put DataTable in a panel instead of putting it on the pages
>> > directly as shown in the examples.
>> >
>> > As a result of this iterator() method of the DataProvider is not
>> getting
>> > called with first and count updated. I have created
>> bookmarkablepagelinks
>> > for the table navigation so its SEO friendly. Since DataTable is
>> actually
>> > added in the panel, panel is added in the page constructor and panel
>> > constructor updates rowsperpage and current page based on what is
>> passed
>> > in the bookmarkablelink pageparameters.
>> >
>> > This seems to suggest the model somewhere is NOT dynamic - not sure
>> what
>> > am I missing.
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/DataTable-and-Panel-issue-tp16734720p16736521.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]
>>
>>
> 
> 
> -- 
> Nick Heudecker
> Professional Wicket Training & Consulting
> http://www.systemmobile.com
> 
> Eventful - Intelligent Event Management
> http://www.eventfulhq.com
> 
> 

-- 
View this message in context: 
http://www.nabble.com/DataTable-and-Panel-issue-tp16734720p16737084.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 + iText ?

2008-04-16 Thread Ricky
Can someone post some code on this ? (only rough sketch ... nothing
elaborate really.

Thanks in advance.
Rick

On Wed, Apr 16, 2008 at 8:54 PM, John Krasnay <[EMAIL PROTECTED]> wrote:

> Hi RG,
>
> You probably want to look at how DataTable in wicket-extensions works.
> The idea is you set up an array of column objects, each of which knows
> how to display the data in a particular column, and a data provider,
> which provides an iterator over the objects represent your rows. The
> DataTable puts these two together and renders an HTML table.
>
> You can tackle your PDF problem in a similar way. Create a different
> column abstraction that writes to the iText API, then create a component
> analagous to DataTable but that writes the PDF out to a stream.
> Internally, this DataTable-equivalent would create the iText document,
> iterate over the rows returned by the data provider, and for each row
> iterate over the columns, asking each column to render its particular
> cell.
>
> We use this approach for generating spreadsheets (using POI instead of
> iText, of course) and it works like a charm.
>
> jk
>
>
> On Wed, Apr 16, 2008 at 01:56:43PM -0700, nanotech wrote:
> >
> > Hi,
> >
> > I have a table displayed in ListView element of wicket and would like to
> > generate a PDF using iText API.
> > Can someone suggest how to get started with this?
> >
> > Thanks,
> > RG
> > --
> > View this message in context:
> http://www.nabble.com/Wicket-%2B-iText---tp16733269p16733269.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]
>
>


Re: Wicket + iText ?

2008-04-16 Thread John Krasnay
Hi RG,

You probably want to look at how DataTable in wicket-extensions works.
The idea is you set up an array of column objects, each of which knows
how to display the data in a particular column, and a data provider,
which provides an iterator over the objects represent your rows. The
DataTable puts these two together and renders an HTML table.

You can tackle your PDF problem in a similar way. Create a different
column abstraction that writes to the iText API, then create a component
analagous to DataTable but that writes the PDF out to a stream.
Internally, this DataTable-equivalent would create the iText document,
iterate over the rows returned by the data provider, and for each row
iterate over the columns, asking each column to render its particular
cell.

We use this approach for generating spreadsheets (using POI instead of
iText, of course) and it works like a charm.

jk


On Wed, Apr 16, 2008 at 01:56:43PM -0700, nanotech wrote:
> 
> Hi,
> 
> I have a table displayed in ListView element of wicket and would like to
> generate a PDF using iText API.
> Can someone suggest how to get started with this?
> 
> Thanks,
> RG 
> -- 
> View this message in context: 
> http://www.nabble.com/Wicket-%2B-iText---tp16733269p16733269.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]



Re: 1.3, resource locator and properties

2008-04-16 Thread Scott Swank
Thank you Nino.  I'll send the quickstart directly to you since the
list doesn't allow attachments.  I'm extracting everything from our
sandbox app that you're not interested in.  I do have the behavior
reproduced there.

- Scott

On Wed, Apr 16, 2008 at 1:02 PM, Nino Saturnino Martinez Vazquez Wael
<[EMAIL PROTECTED]> wrote:
> Hi Scott
>
>  Could you provide a quickstart? I have some time tomorrow...
>
>  Scott Swank wrote:
>
> >
> >
> >
> > I have subclassed ComponentStringResourceLoader so that I can drive it
> > from a custom ResourceNameIterator (in particular to look in the right
> > directories).  In particular, I just overrode
> >
> >   public String loadStringResource(Class clazz, final String key,
> > final Locale locale, final String style)
> >
> > and only changed the line
> >
> >   ResourceNameIterator iter = new ResourceNameIterator(path, style,
> > locale, "properties,xml");
> >
> > to use our iterator.  Now it cannot find myApplication.properties and
> > I am at a bit of a loss as how this class ever got to
> > myApplication.properties.  When it is constructing its list of
> > components it clearly stops at the Page and I don't see how it would
> > ever get to the Application.
> >
> >private List getComponentStack(final Component component)
> >{
> >// Build the search stack
> >final List searchStack = new ArrayList();
> >searchStack.add(component.getClass());
> >
> >if (!(component instanceof Page))
> >{
> >// Add all the component on the way to the Page
> >MarkupContainer container = component.getParent();
> >while (container != null)
> >{
> >searchStack.add(container.getClass());
> >if (container instanceof Page)
> >{
> >break;
> >}
> >
> >container = container.getParent();
> >}
> >}
> >return searchStack;
> >}
> >
> > What am I missing?
> >
> > Thank you,
> > Scott
> >
> > On Tue, Apr 15, 2008 at 12:30 PM, Scott Swank <[EMAIL PROTECTED]>
> wrote:
> >
> >
> > > Previously we retrieved the CompoundResourceStreamLocator and added
> > >  our ResourceStreamLocator to it.  In 1.2 did this take care of
> > >  StringResourceLoader too?
> > >
> > >   WebApplicationPath resourceFinder = (WebApplicationPath)
> > >  getResourceSettings().getResourceFinder();
> > >   resourceFinder.add(Env.getInstance().getAthenaDocRoot());
> > >
> > >   CompoundResourceStreamLocator locator =
> > >  (CompoundResourceStreamLocator)
> > >  getResourceSettings().getResourceStreamLocator();
> > >   locator.add(0, new WebPageResourceStreamLocator(resourceFinder));
> > >
> > >  Thank you,
> > >  Scott
> > >
> > >
> > >
> > >
> > >  On Tue, Apr 15, 2008 at 10:55 AM, Scott Swank <[EMAIL PROTECTED]>
> wrote:
> > >  > We are finally upgrading to Wicket 1.3 (in particular to 1.3.3 from
> > >  >  1.2.6) and our StringResourceModels can no longer find their
> property
> > >  >  files, which leaves our web pages containing the following:
> > >  >
> > >  > [Warning: String resource for 'tickets' not found]
> > >  >
> > >  >  Our application init method contains:
> > >  >
> > >  >IResourceFinder finder =
> getResourceSettings().getResourceFinder();
> > >  >IResourceStreamLocator streamLocator = new
> > >  >  WebPageResourceStreamLocator(finder);
> > >  >getResourceSettings().setResourceStreamLocator(streamLocator);
> > >  >
> > >  >  and in our ResourceStreamLocator I added the following with a break
> > >  >  point on the System.out line:
> > >  >
> > >  >public IResourceStream locate(final Class clazz, String path,
> final
> > >  >  String variationAndStyle, final Locale locale, String extension)
> > >  >{
> > >  >   if (!"html".equals(extension) && !path.endsWith(".js") &&
> > >  >  !path.endsWith(".css"))
> > >  >   {
> > >  >  System.out.println("break");
> > >  >   }
> > >  >...
> > >  >
> > >  >  I never see the locate() method called in an attempt to find the
> > >  >  properties.  Where should I be looking?
> > >  >
> > >  >  Thank you,
> > >  >  Scott
> > >  >
> > >
> > >
> > >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> >
>
>  --
>  -Wicket for love
>
>  Nino Martinez Wael
>  Java Specialist @ Jayway DK
>  http://www.jayway.dk
>  +45 2936 7684
>
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: DataTable and Panel issue

2008-04-16 Thread Nick Heudecker
Can you post any code?  Use a (Wicket powered!) pastebin if possible.

http://www.papernapkin.org/pastebin/home



On Wed, Apr 16, 2008 at 7:41 PM, Ritz123 <[EMAIL PROTECTED]> wrote:

>
> Will appreciate a response or any pointers.
>
>
> Ritz123 wrote:
> >
> > Hi,
> >
> > I have put DataTable in a panel instead of putting it on the pages
> > directly as shown in the examples.
> >
> > As a result of this iterator() method of the DataProvider is not getting
> > called with first and count updated. I have created
> bookmarkablepagelinks
> > for the table navigation so its SEO friendly. Since DataTable is
> actually
> > added in the panel, panel is added in the page constructor and panel
> > constructor updates rowsperpage and current page based on what is passed
> > in the bookmarkablelink pageparameters.
> >
> > This seems to suggest the model somewhere is NOT dynamic - not sure what
> > am I missing.
> >
>
> --
> View this message in context:
> http://www.nabble.com/DataTable-and-Panel-issue-tp16734720p16736521.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]
>
>


-- 
Nick Heudecker
Professional Wicket Training & Consulting
http://www.systemmobile.com

Eventful - Intelligent Event Management
http://www.eventfulhq.com


Re: DataTable and Panel issue

2008-04-16 Thread Ritz123

Will appreciate a response or any pointers.


Ritz123 wrote:
> 
> Hi,
> 
> I have put DataTable in a panel instead of putting it on the pages
> directly as shown in the examples.
> 
> As a result of this iterator() method of the DataProvider is not getting
> called with first and count updated. I have created bookmarkablepagelinks
> for the table navigation so its SEO friendly. Since DataTable is actually
> added in the panel, panel is added in the page constructor and panel
> constructor updates rowsperpage and current page based on what is passed
> in the bookmarkablelink pageparameters.
> 
> This seems to suggest the model somewhere is NOT dynamic - not sure what
> am I missing.
> 

-- 
View this message in context: 
http://www.nabble.com/DataTable-and-Panel-issue-tp16734720p16736521.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 html parsing bug?

2008-04-16 Thread dvd
There is inconsistency here. If both parent.html and child.html
have public class WicketApplication extends WebApplication
>{
>@Override public void init() {
>this.getMarkupSettings().setStripXmlDeclarationFromOutput(true);
>}
>}
>
>On Wed, Apr 16, 2008 at 3:06 AM, <[EMAIL PROTECTED]> wrote:
>
>> Hi:
>> It took me a while to find out why my iframe was not displaying properly.
>> I have a parent/container page like
>>
>> 
>> >  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
>> http://www.w3.org/1999/xhtml"; xmlns:wicket="
>> http://wicket.apache.org/";>
>> ...
>> iframe child
>>
>> and the child page is like
>>
>> 
>> >  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
>> http://www.w3.org/1999/xhtml"; xmlns:wicket="
>> http://wicket.apache.org/";>
>> ...
>> 
>>
>> The final rendering the html page would contain  declaration ,
>> which results in improper display in browser.  Once I remove the > line from the child html file,  the final rendering of html
>> does not show > somehow make the browser happy and display the page correctly.
>> My understanding is that for child page, wicket would discard anything
>> outside , but apparently, the presence of > first line in child html somehow forced the parser to add the > final html output as the first line, which also surprises as I thought
>> wicket would stream out content as it goes instead of waiting to parse the
>> entire tree.
>>
>> Thanks
>>

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



Re: Invoulentary session sharing/leakage in Wicket 1.3.x

2008-04-16 Thread Igor Vaynberg
we dont even know if it is something in wicket that is causing this
yet...johan what exactly did you find out?

-igor


On Wed, Apr 16, 2008 at 4:34 PM, Ned Collyer <[EMAIL PROTECTED]> wrote:
>
>
>  Edvin Syse wrote:
>  >
>  > No, it has not. Johan said he fixed a bug that might have been this
>  > problem, but I haven't been able to confirm it yet, as the fix is in
>  > 1.3-SNAPSHOT, and I ran into some issues when deploying with the
>  > snapshot-version.
>  >
>  > I see this problem 10-20 times every day still..
>  >
>  > -- Edvin
>  >
>
>  I hope we see a non snapshot release soon.  This sounds like a doozy of a
>  bug - show stopper for everyone!
>  --
>  View this message in context: 
> http://www.nabble.com/Invoulentary-session-sharing-leakage-in-Wicket-1.3.x-tp16550360p16735844.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]



Re: Invoulentary session sharing/leakage in Wicket 1.3.x

2008-04-16 Thread Ned Collyer


Edvin Syse wrote:
> 
> No, it has not. Johan said he fixed a bug that might have been this
> problem, but I haven't been able to confirm it yet, as the fix is in 
> 1.3-SNAPSHOT, and I ran into some issues when deploying with the
> snapshot-version.
> 
> I see this problem 10-20 times every day still..
> 
> -- Edvin
> 

I hope we see a non snapshot release soon.  This sounds like a doozy of a
bug - show stopper for everyone!
-- 
View this message in context: 
http://www.nabble.com/Invoulentary-session-sharing-leakage-in-Wicket-1.3.x-tp16550360p16735844.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: Can only locate or create session in the context of a request cycle.

2008-04-16 Thread mfs



Alex Jacoby-2 wrote:
> 
> Farhan, I figure we should take this back on-list.  Messages in  
> chronological order, with my last response at the bottom.
> 
>  > > On Apr 16, 2008, at 5:06 PM, [EMAIL PROTECTED] wrote:
>  > > Alex,
>  > >
>  > > Wasn't sure how frequent are u in the forum, so thought to mail you
>  > directly the reply...As below..
>  > >
>  > > Subclassing RequestCycle would give me control on begin/end of the
>  > request, i wouldnt still have access to the Wicket Session (as the  
> Wicket
>  > Session isnt created at that time)
>  > >
>  > > A plain servlet filter also gives me control in the beginning of  
> the
>  > request (if not at the end), except for the fact that i have am  
> playing with
>  > HttpRequest,HttpResponse, where as wicket RequestCycle gives me an
>  > abstracted view of these classes, other than that i am just  
> wondering what
>  > is the real benefit of extending WebRequestCycle..I can still do  
> all the
>  > authentication stuff (check for authtoken/cookie etc) in a normal  
> filter
>  > too..isnt it?..unless am missing some benefits which extending  
> RequestCycle
>  > would provide
>  > >
>  > > Farhan.
> 
>> On Wed, Apr 16, 2008 at 2:20 PM, Alex Jacoby <[EMAIL PROTECTED]>  
>> wrote:
>> > Farhan,
>> >
>> >  Good call emailing me - I only check the forum when I get to work  
>> in the
>> > morning.
>> >
>> >  Why use the (wicket) session for auth info at all?  You can use a  
>> custom
>> > request cycle just like you use a custom session.  That way the  
>> fact that
>> > the session doesn't exist at request time is irrelevant.
>> >
>> >  Then in your pages you can use RequestCycle.get() instead of  
>> Session.get()
>> > to extract auth info.
>> >
>> >  My custom AuthenticatedWebSession's auth methods all delegate to  
>> my custom
>> > request cycle methods.
>> >
>> >  Does that make sense?
>> >
>> >  I'm not sure if this will help in your case, but it sounds like  
>> it might.
>> >
>> >  Alex
> 
> On Apr 16, 2008, at 5:42 PM, Farhan Sarwar wrote:
>> I kind of get you but to be sure, so u suggesting to store the auth  
>> data within the request cycle itself and access it using  
>> ((MyCustomRequestCycle)RequestCycle.get()).getAuthToken (offcourse  
>> once i have set the same attributes onBeginRequest) as below..
>>
>> public class MyCustomRequestCycle extends WebRequestCycle
>> {
>>  String authToken;
>>  String cookieName;
>>
>>  public String getAuthToken()
>>  {
>>return authToken;
>>  }
>>
>>  public void setAuthToken(String authToken)
>>  {
>>this.authToken = authToken;
>>  }
>>
>>  public String getCookieName()
>>  {
>>return cookieName;
>>  }
>>
>>  public void setCookieName(String cookieName)
>>  {
>>this.cookieName = cookieName;
>>  }
>>
>>  public VCertRetailRequestCycle(WebApplication application, Request  
>> request,
>>  Response response)
>>  {
>>super(application, (WebRequest) request, response);
>>  }
>>
>>  protected void onBeginRequest()
>>  {
>>// getToken from the url passed as a query string
>>setAuthToken(request.getParameter("authToken"));
>>  }
>>
>>  protected void onEndRequest()
>>  {
>>authToken = null;
>>cookieName = null;
>>  }
>> }
>>
>> Please comment if i am correctly understanding the approach u are  
>> suggesting
>>
>> Now if that is the correct understanding, its just helping me  
>> maintain the values submitted with each request, available to all  
>> the pages in that particular request cycle...but i would want to  
>> maintain that information across the whole session, so that i dont  
>> have to append the authToken (passed to me in the url at the first  
>> place by the authentication framework) in every url i have in my  
>> wicket app (in the form links, forms etcs)...
>>
>> I understand that WebRequestCycle.onBeginRequest is acting like a  
>> filter for me in a "wicket way" where before i allow the  request  
>> cycle to further continue i can redirect the un-authentication users  
>> onBeginRequest to LoginPage or something...
>>
>> Thanks in advance and Regards,
>>
>> Farhan.
> 
> That is what I meant, but I wasn't sure if the token you were  
> referring to was in a cookie or in the URL.  Since it's in the URL, it  
> does complicate stuff.
> 
> Here's my proposal: use the custom request cycle to grab the initial  
> token and store that auth info in the request cycle.  Then when you  
> create a new wicket session, check if the request cycle has a valid  
> auth token -- if so, you validate the session, save the auth token  
> there if necessary, and never worry about the request cycle (or URL  
> token) again.
> 
> Do i need to retain this in the RequestCycle at the first place ? I mean i
> can just fetch the token from the request object itself..in my
> CustomSession constructor as follows :
> 
>   public MyCustomSession(Request request)
>   {
>   super(request);
>   String authToken = request.getParameter("authToken");
>   if (authenticate(

Re: No get method defined for class

2008-04-16 Thread Ritz123

It seems like its related to the choice list box, the values of the options
are getting rendered using that class.

Do you not have a  choice list on the page? 

if mwh.entity.PoolRole is your class, check if it has name property - if not
you probably will have to change the choicerenderer model to use different
property


Bruce McGuire-2 wrote:
> 
> Hello.
> 
>  
> 
> I am getting an error that I can't figure out how to track down.  The
> entity
> in the exception doesn't have, nor has it ever had, a piece of data called
> 'name'. Nor does there seem to be a place where this is getting
> instantiated, at least as far as I can tell from the exception trace.
> 
>  
> 
> Would anyone have a thought on how to figure out where the error
> originates?
> 
>  
> 
> org.apache.wicket.WicketRuntimeException: No get method defined for class:
> class mwh.entity.PoolRole expression: name
> 
> 
>  at
> org.apache.wicket.util.lang.PropertyResolver.getGetAndSetter(PropertyResolve
> r.java:419)
> 
> 
>  at
> org.apache.wicket.util.lang.PropertyResolver.getObjectAndGetSetter(PropertyR
> esolver.java:283)
> 
> 
>  at
> org.apache.wicket.util.lang.PropertyResolver.getValue(PropertyResolver.java:
> 89)
> 
> 
>  at
> org.apache.wicket.markup.html.form.ChoiceRenderer.getDisplayValue(ChoiceRend
> erer.java:119)
> 
> 
>  at
> org.apache.wicket.markup.html.form.AbstractChoice.appendOptionHtml(AbstractC
> hoice.java:373)
> 
> 
>  at
> org.apache.wicket.markup.html.form.AbstractChoice.onComponentTagBody(Abstrac
> tChoice.java:350)
> 
> 
>  at org.apache.wicket.Component.renderComponent(Component.java:2189)
> 
> 
>  at
> org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1315)
> 
> 
>  at org.apache.wicket.Component.render(Component.java:2013)
> 
> 
>  at
> org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1200)
> 
> 
>  at
> org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.jav
> a:1370)
> 
> 
>  at
> org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:13
> 05)
> 
> 
>  at org.apache.wicket.Component.renderComponent(Component.java:2189)
> 
> 
>  at
> org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1315)
> 
> 
>  at org.apache.wicket.Component.render(Component.java:2013)
> 
> 
>  at
> org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1200)
> 
> 
>  at
> org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.jav
> a:1370)
> 
> 
>  at
> org.apache.wicket.MarkupContainer.renderAssociatedMarkup(MarkupContainer.jav
> a:642)
> 
> 
>  at
> org.apache.wicket.markup.html.panel.Panel.onComponentTagBody(Panel.java:112)
> 
> 
>  at org.apache.wicket.Component.renderComponent(Component.java:2189)
> 
> 
>  at
> org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1315)
> 
> 
>  at org.apache.wicket.Component.render(Component.java:2013)
> 
> 
>  at
> org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1200)
> 
> 
>  at
> org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1332)
> 
> 
>  at org.apache.wicket.Page.onRender(Page.java:1433)
> 
> 
>  at org.apache.wicket.Component.render(Component.java:2013)
> 
> 
>  at org.apache.wicket.Page.renderPage(Page.java:922)
> 
> 
>  at
> org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.res
> pond(BookmarkablePageRequestTarget.java:225)
> 
> 
>  at
> org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequ
> estCycleProcessor.java:103)
> 
> 
>  at
> org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:103
> 8)
> 
> 
>  at org.apache.wicket.RequestCycle.step(RequestCycle.java:1108)
> 
> 
>  at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1177)
> 
> 
>  at org.apache.wicket.RequestCycle.request(RequestCycle.java:500)
> 
> 
>  at
> org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:261)
> 
> 
>  at
> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:127)
> 
> 
>  at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
> FilterChain.java:202)
> 
> 
>  at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
> ain.java:173)
> 
> 
>  at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
> va:213)
> 
> 
>  at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
> va:178)
> 
> 
>  at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126
> )
> 
> 
>  at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105
> )
> 
> 
>  at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
> :107)
> 
> 
>  at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
> 
> 
>  at
> org.apache.co

No get method defined for class

2008-04-16 Thread Bruce McGuire
Hello.

 

I am getting an error that I can't figure out how to track down.  The entity
in the exception doesn't have, nor has it ever had, a piece of data called
'name'. Nor does there seem to be a place where this is getting
instantiated, at least as far as I can tell from the exception trace.

 

Would anyone have a thought on how to figure out where the error originates?

 

org.apache.wicket.WicketRuntimeException: No get method defined for class:
class mwh.entity.PoolRole expression: name


 at
org.apache.wicket.util.lang.PropertyResolver.getGetAndSetter(PropertyResolve
r.java:419)


 at
org.apache.wicket.util.lang.PropertyResolver.getObjectAndGetSetter(PropertyR
esolver.java:283)


 at
org.apache.wicket.util.lang.PropertyResolver.getValue(PropertyResolver.java:
89)


 at
org.apache.wicket.markup.html.form.ChoiceRenderer.getDisplayValue(ChoiceRend
erer.java:119)


 at
org.apache.wicket.markup.html.form.AbstractChoice.appendOptionHtml(AbstractC
hoice.java:373)


 at
org.apache.wicket.markup.html.form.AbstractChoice.onComponentTagBody(Abstrac
tChoice.java:350)


 at org.apache.wicket.Component.renderComponent(Component.java:2189)


 at
org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1315)


 at org.apache.wicket.Component.render(Component.java:2013)


 at
org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1200)


 at
org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.jav
a:1370)


 at
org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:13
05)


 at org.apache.wicket.Component.renderComponent(Component.java:2189)


 at
org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1315)


 at org.apache.wicket.Component.render(Component.java:2013)


 at
org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1200)


 at
org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.jav
a:1370)


 at
org.apache.wicket.MarkupContainer.renderAssociatedMarkup(MarkupContainer.jav
a:642)


 at
org.apache.wicket.markup.html.panel.Panel.onComponentTagBody(Panel.java:112)


 at org.apache.wicket.Component.renderComponent(Component.java:2189)


 at
org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1315)


 at org.apache.wicket.Component.render(Component.java:2013)


 at
org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1200)


 at
org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1332)


 at org.apache.wicket.Page.onRender(Page.java:1433)


 at org.apache.wicket.Component.render(Component.java:2013)


 at org.apache.wicket.Page.renderPage(Page.java:922)


 at
org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.res
pond(BookmarkablePageRequestTarget.java:225)


 at
org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequ
estCycleProcessor.java:103)


 at
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:103
8)


 at org.apache.wicket.RequestCycle.step(RequestCycle.java:1108)


 at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1177)


 at org.apache.wicket.RequestCycle.request(RequestCycle.java:500)


 at
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:261)


 at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:127)


 at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:202)


 at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:173)


 at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:213)


 at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:178)


 at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126
)


 at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105
)


 at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:107)


 at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)


 at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)


 at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processC
onnection(Http11BaseProtocol.java:664)


 at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.jav
a:527)


 at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWo
rkerThread.java:80)


 at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:684)


 at java.lang.Thread.run(Unknown Source)

 

Thanks,

 

Bruce.



DataTable and Panel issue

2008-04-16 Thread Ritz123

Hi,

I have put DataTable in a panel instead of putting it on the pages directly
as shown in the examples.

As a result of this iterator() method of the DataProvider is not getting
called with first and count updated. I have created bookmarkablepagelinks
for the table navigation so its SEO friendly. Since DataTable is actually
added in the panel, panel is added in the page constructor and panel
constructor updates rowsperpage and current page based on what is passed in
the bookmarkablelink pageparameters.

This seems to suggest the model somewhere is NOT dynamic - not sure what I
am missing.
-- 
View this message in context: 
http://www.nabble.com/DataTable-and-Panel-issue-tp16734720p16734720.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 component?

2008-04-16 Thread Michael Mehrle
Good idea and it worked! :-)

Thanks, I feel silly for not thinking of this myself... note to myself -
get more sleep.

Michael

-Original Message-
From: Vit Rozkovec [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 16, 2008 2:36 PM
To: users@wicket.apache.org
Subject: Re: Wicket  component?

You can attach WebMarkupContainer to it.

Vitek

Michael Mehrle wrote:
> I need to create a  in my template that is being set to a
different
> css class before it gets drawn. So, a regular non-wicket  HTML
tag
> is out. How can I create a simple  tag without using a wicket
> panel? (I'm inside a form, so I don't want to use a panel).
>
>  
>
> Thanks,
>
>  
>
> Michael
>
>  
>
>  
>
>
>   


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



Re: Can only locate or create session in the context of a request cycle.

2008-04-16 Thread Alex Jacoby
Farhan, I figure we should take this back on-list.  Messages in  
chronological order, with my last response at the bottom.


> > On Apr 16, 2008, at 5:06 PM, [EMAIL PROTECTED] wrote:
> > Alex,
> >
> > Wasn't sure how frequent are u in the forum, so thought to mail you
> directly the reply...As below..
> >
> > Subclassing RequestCycle would give me control on begin/end of the
> request, i wouldnt still have access to the Wicket Session (as the  
Wicket

> Session isnt created at that time)
> >
> > A plain servlet filter also gives me control in the beginning of  
the
> request (if not at the end), except for the fact that i have am  
playing with

> HttpRequest,HttpResponse, where as wicket RequestCycle gives me an
> abstracted view of these classes, other than that i am just  
wondering what
> is the real benefit of extending WebRequestCycle..I can still do  
all the
> authentication stuff (check for authtoken/cookie etc) in a normal  
filter
> too..isnt it?..unless am missing some benefits which extending  
RequestCycle

> would provide
> >
> > Farhan.

On Wed, Apr 16, 2008 at 2:20 PM, Alex Jacoby <[EMAIL PROTECTED]>  
wrote:

> Farhan,
>
>  Good call emailing me - I only check the forum when I get to work  
in the

> morning.
>
>  Why use the (wicket) session for auth info at all?  You can use a  
custom
> request cycle just like you use a custom session.  That way the  
fact that

> the session doesn't exist at request time is irrelevant.
>
>  Then in your pages you can use RequestCycle.get() instead of  
Session.get()

> to extract auth info.
>
>  My custom AuthenticatedWebSession's auth methods all delegate to  
my custom

> request cycle methods.
>
>  Does that make sense?
>
>  I'm not sure if this will help in your case, but it sounds like  
it might.

>
>  Alex


On Apr 16, 2008, at 5:42 PM, Farhan Sarwar wrote:
I kind of get you but to be sure, so u suggesting to store the auth  
data within the request cycle itself and access it using  
((MyCustomRequestCycle)RequestCycle.get()).getAuthToken (offcourse  
once i have set the same attributes onBeginRequest) as below..


public class MyCustomRequestCycle extends WebRequestCycle
{
 String authToken;
 String cookieName;

 public String getAuthToken()
 {
   return authToken;
 }

 public void setAuthToken(String authToken)
 {
   this.authToken = authToken;
 }

 public String getCookieName()
 {
   return cookieName;
 }

 public void setCookieName(String cookieName)
 {
   this.cookieName = cookieName;
 }

 public VCertRetailRequestCycle(WebApplication application, Request  
request,

 Response response)
 {
   super(application, (WebRequest) request, response);
 }

 protected void onBeginRequest()
 {
   // getToken from the url passed as a query string
   setAuthToken(request.getParameter("authToken"));
 }

 protected void onEndRequest()
 {
   authToken = null;
   cookieName = null;
 }
}

Please comment if i am correctly understanding the approach u are  
suggesting


Now if that is the correct understanding, its just helping me  
maintain the values submitted with each request, available to all  
the pages in that particular request cycle...but i would want to  
maintain that information across the whole session, so that i dont  
have to append the authToken (passed to me in the url at the first  
place by the authentication framework) in every url i have in my  
wicket app (in the form links, forms etcs)...


I understand that WebRequestCycle.onBeginRequest is acting like a  
filter for me in a "wicket way" where before i allow the  request  
cycle to further continue i can redirect the un-authentication users  
onBeginRequest to LoginPage or something...


Thanks in advance and Regards,

Farhan.


That is what I meant, but I wasn't sure if the token you were  
referring to was in a cookie or in the URL.  Since it's in the URL, it  
does complicate stuff.


Here's my proposal: use the custom request cycle to grab the initial  
token and store that auth info in the request cycle.  Then when you  
create a new wicket session, check if the request cycle has a valid  
auth token -- if so, you validate the session, save the auth token  
there if necessary, and never worry about the request cycle (or URL  
token) again.


You don't need to worry about people logging out from outside your  
app, right?


Alex

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



Re: Wicket + iText ?

2008-04-16 Thread Igor Vaynberg
we do that at my company. we have a column subclass that has
populatepdf(document, model) as opposed to populateitem(item, model);
so we pass the data provider and the set of columns to an export list
and it builds the grid.

-igor


On Wed, Apr 16, 2008 at 1:56 PM, nanotech <[EMAIL PROTECTED]> wrote:
>
>  Hi,
>
>  I have a table displayed in ListView element of wicket and would like to
>  generate a PDF using iText API.
>  Can someone suggest how to get started with this?
>
>  Thanks,
>  RG
>  --
>  View this message in context: 
> http://www.nabble.com/Wicket-%2B-iText---tp16733269p16733269.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]



Re: Wicket component?

2008-04-16 Thread Vit Rozkovec

You can attach WebMarkupContainer to it.

Vitek

Michael Mehrle wrote:

I need to create a  in my template that is being set to a different
css class before it gets drawn. So, a regular non-wicket  HTML tag
is out. How can I create a simple  tag without using a wicket
panel? (I'm inside a form, so I don't want to use a panel).

 


Thanks,

 


Michael

 

 



  



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



Wicket component?

2008-04-16 Thread Michael Mehrle
I need to create a  in my template that is being set to a different
css class before it gets drawn. So, a regular non-wicket  HTML tag
is out. How can I create a simple  tag without using a wicket
panel? (I'm inside a form, so I don't want to use a panel).

 

Thanks,

 

Michael

 

 



Re: Override IE AutoComplete with wicket's AutoCompleteTextField

2008-04-16 Thread Gerolf Seitz
On Wed, Apr 16, 2008 at 11:12 PM, Ryan Sonnek <[EMAIL PROTECTED]> wrote:

> the wicketstuff-scriptaculous project adds an attribute
> "autocomplete='off'"
> to prevent browsers from adding their specific autocomplete suggestions.
>

and so does the AutoCompleteTextField

  Gerolf


>
> On Wed, Apr 16, 2008 at 4:10 PM, ak <[EMAIL PROTECTED]> wrote:
>
> >
> > Hello,
> >
> > I have implemented wicket AutoCompleteBehavior on TextField. All seems
> to
> > work fine until I stumbled upon this issue. Example when I type 'A', I
> see
> > IE's auto complete overlapping my wicket implementation of autocomplete
> > behaviour with previously recorded value(example 'Apple'). However, I
> > expect
> > the user to enter couple of words to kickin behind the scene's logic.
> But
> > right now say if a user selects from IE's autocomplete then my code
> fails.
> > Do you know if I can override IE's autocomplete from my code or any
> better
> > way to solve this issue. I want the user to select only from the values
> > shown using wicket's autocomplete.
> >
> > Your thoughts are much appreciated!
> > Andy
> > --
> > View this message in context:
> >
> http://www.nabble.com/Override-IE-AutoComplete-with-wicket%27s-AutoCompleteTextField-tp16733561p16733561.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: Override IE AutoComplete with wicket's AutoCompleteTextField

2008-04-16 Thread Ryan Sonnek
the wicketstuff-scriptaculous project adds an attribute "autocomplete='off'"
to prevent browsers from adding their specific autocomplete suggestions.

On Wed, Apr 16, 2008 at 4:10 PM, ak <[EMAIL PROTECTED]> wrote:

>
> Hello,
>
> I have implemented wicket AutoCompleteBehavior on TextField. All seems to
> work fine until I stumbled upon this issue. Example when I type 'A', I see
> IE's auto complete overlapping my wicket implementation of autocomplete
> behaviour with previously recorded value(example 'Apple'). However, I
> expect
> the user to enter couple of words to kickin behind the scene's logic. But
> right now say if a user selects from IE's autocomplete then my code fails.
> Do you know if I can override IE's autocomplete from my code or any better
> way to solve this issue. I want the user to select only from the values
> shown using wicket's autocomplete.
>
> Your thoughts are much appreciated!
> Andy
> --
> View this message in context:
> http://www.nabble.com/Override-IE-AutoComplete-with-wicket%27s-AutoCompleteTextField-tp16733561p16733561.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]
>
>


Override IE AutoComplete with wicket's AutoCompleteTextField

2008-04-16 Thread ak

Hello,

I have implemented wicket AutoCompleteBehavior on TextField. All seems to
work fine until I stumbled upon this issue. Example when I type 'A', I see
IE's auto complete overlapping my wicket implementation of autocomplete
behaviour with previously recorded value(example 'Apple'). However, I expect
the user to enter couple of words to kickin behind the scene's logic. But
right now say if a user selects from IE's autocomplete then my code fails.
Do you know if I can override IE's autocomplete from my code or any better
way to solve this issue. I want the user to select only from the values
shown using wicket's autocomplete.

Your thoughts are much appreciated!
Andy
-- 
View this message in context: 
http://www.nabble.com/Override-IE-AutoComplete-with-wicket%27s-AutoCompleteTextField-tp16733561p16733561.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: help wanted for wicket autocomplete component

2008-04-16 Thread Patel, Sanjay
Thanks. It helped me.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Ryan
Gravener
Sent: Tuesday, April 15, 2008 2:53 PM
To: users@wicket.apache.org
Subject: Re: help wanted for wicket autocomplete component


Set the model object in getTextValue(java.lang.Object object)

but in your renderChoice(*) do not call getTextValue!!!  make another
method called getStringValue() and return the actor name, then in
getTextValue set the modelobject and return getStringValue().

I am not positive this will work.

On Tue, Apr 15, 2008 at 2:23 PM, Patel, Sanjay <[EMAIL PROTECTED]> wrote:
> Hi,
>
>
>
>  I am trying to implement a simple auto complete AJAX text box which gives me 
> the names of actors as I type in (by searching and getting the list of actors 
> from database),  and set the Model Object (which is Actor selected from the 
> auto complete drop down) for the Panel (in which this Auto complete Text 
> Field lies); In adding a Behavior to the field, I am trying to do a setModel( 
> ) for the panel (which contains the AutoCompleteTextField), but when I get 
> the object (autoCompleteTextField.getModelObject( )) inside the behavior 
> anonymous class, It returns a string, even though outside I seem to be 
> getting model Object fine (outside as in outside the anonymous class 
> declaration). Here's the full code as I know it.
>
>
>
>  final AutoCompleteTextField actorInformationAutoCompleteTextField = new 
> AutoCompleteTextField("input-auto-complete-actorForPanel-search", new 
> Model((Actor) getModel().getObject()),
>
> new AbstractAutoCompleteRenderer() {
>
>   private static final long serialVersionUID = 1L;
>
>
>
>   /**
>
>* [EMAIL PROTECTED]
>
>*/
>
>   @Override
>
>   protected String getTextValue(Object object) {
>
>  return ((Actor) object).getLastName() + COMMA_SEPARATOR + (((Actor) 
> object).getFirstName());
>
>   }
>
>
>
>   /**
>
>* [EMAIL PROTECTED]
>
>*/
>
>   @Override
>
>   protected void renderChoice(Object object, 
> Response response, String criteria) {
>
> response.write(getTextValue(object));
>
>
>
>   }
>
> }) {
>
>
>
>   private static final long serialVersionUID = 1L;
>
>
>
>   /**
>
>* [EMAIL PROTECTED]
>
>*/
>
>   @Override
>
>   @SuppressWarnings("unchecked")
>
>   protected final Iterator getChoices(final String 
> input) {
>
> System.out.println(" getChoices called 
> ---> ");
>
> if (Strings.isEmpty(input)) {
>
>   return Collections.EMPTY_LIST.iterator();
>
> }
>
>
>
> // our list of choices (this is displayed with when 
> user starts typing something)
>
> final List choices = new ArrayList(10);
>
>
>
> // set the search key for data provider ...
>
> List actors = new ActorDataProvider(input, 
> 10).search(0, 10).getCollection();
>
>
>
> for (int i = 0; i < actors.size(); i++) {
>
>   System.out.println(" Inside actors loop 
> ");
>
>   System.out.println(" Actor[i] > " + 
> actors.get(i).getFirstName());
>
>   final Actor actorTemp = actors.get(i);
>
>
>
>  if (actorTemp.getFirstName().trim().contains(input) || 
> actorTemp.getLastName().contains(input)) {
>
> choices.add(actorTemp);
>
>
>
>   }
>
>
>
>   if (choices.size() == 10) {
>
> break;
>
>   }
>
> }
>
>
>
> return choices.iterator();
>
>   }
>
>
>
> };
>
>
>
>
>
>  Here is where I add Behavior:
>
> actorInformationAutoCompleteTextField.add(new 
> AjaxFormSubmitBehavior("onchange") {
>
>   private static final long serialVersionUID = 1L;
>
>
>
>   /**
>
>* [EMAIL PROTECTED]
>
>*/
>
>   @Override
>
>   protected final void onSubmit(final AjaxRequestTarget 
> target) {
>
> System.out.println(" onSubmit( ) for 
> AjaxFormSubmitBehavior called ");
>
> // set the Model for the panel 

Re: Shared tab component across pages

2008-04-16 Thread Igor Vaynberg
you can replace any panel with any other panel. so maybe instead of
modeling your app as pages you can model it as panels

-igor


On Wed, Apr 16, 2008 at 11:57 AM, byhisdeeds <[EMAIL PROTECTED]> wrote:
>
>
>
>  igor.vaynberg wrote:
>  >
>  > tabbed panel is meant to be used with panels not with pages. so
>  > instead of having each tab be its own page, simply make it each own
>  > panel.
>  >
>  > -igor
>  >
>  yeah, I get that. But I need to be able to replace the common panel area
>  being set by any of the tabs with content from a page not linked to the tab
>  component. I also need to be able to save the selected tab state across
>  these occurances. I don't seem to be able to do that.
>
>  John
>  --
>  View this message in context: 
> http://www.nabble.com/Shared-tab-component-across-pages-tp16722526p16730793.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]



Wicket + iText ?

2008-04-16 Thread nanotech

Hi,

I have a table displayed in ListView element of wicket and would like to
generate a PDF using iText API.
Can someone suggest how to get started with this?

Thanks,
RG 
-- 
View this message in context: 
http://www.nabble.com/Wicket-%2B-iText---tp16733269p16733269.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: Invoulentary session sharing/leakage in Wicket 1.3.x

2008-04-16 Thread Edvin Syse
No, it has not. Johan said he fixed a bug that might have been this problem, but I haven't been able to confirm it yet, as the fix is in 
1.3-SNAPSHOT, and I ran into some issues when deploying with the snapshot-version.


I see this problem 10-20 times every day still..

-- Edvin

StephenP skrev:

Has a JIRA issue been created to track this fix?

Thanks,
Stephen




Yes, it seems to be an error in Wicket.
Johan says it should be fixed it in the latest shapshot version, but I have
not tried it yet.

But I will probably keep the workaround code as an extra protection.

Niels 


Anything new on this issue?

/Gwyn




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



javascript error in internet explorer

2008-04-16 Thread atul singh
Hi,
I wanted to know about preCallHandlers in wicket-ajax.js .What are they and
How are they related in java code.
Actually I am facing a problem in internet explorer. The ajax get call give
error after "Invoking pre-call handler(s).."
It gives an error in the highlighted portion and then all ajax stops
working, because this get call did not return.
The error says--"invalid argument"
I will really appreciate any help. Also if anyone know a javascript
debugger/debugging technique for internet explorer, please let me know, so i
will be able to do something about this :(..

Thanks


doGet: function() {
if (this.precondition()) {

this.transport = Wicket.Ajax.getTransport();

var url = this.createUrl();
this.log("GET", url);

Wicket.Ajax.invokePreCallHandlers();

  *  var t = this.transport;**
if (t != null) {
if (Wicket.Browser.isGecko()) {
var href = document.location.href;
var lastIndexOf = href.lastIndexOf('/');
if (lastIndexOf > 0)
{
url = href.substring(0,lastIndexOf+1) + url;
}
}
t.open("GET", url, this.async);
t.onreadystatechange = this.stateChangeCallback.bind(this);
// set a special flag to allow server distinguish between
ajax and non-ajax requests
t.setRequestHeader("Wicket-Ajax", "true");
t.setRequestHeader("Wicket-FocusedElementId",
Wicket.Focus.lastFocusId || "");
t.setRequestHeader("Accept", "text/xml");
t.send(null);
return true;*
} else {
this.failure();
   return false;
}
} else {
Wicket.Log.info("Ajax GET stopped because of precondition check,
url:" + this.url);
this.done();
return true;
}
}


Re: 1.3, resource locator and properties

2008-04-16 Thread Nino Saturnino Martinez Vazquez Wael

Hi Scott

Could you provide a quickstart? I have some time tomorrow...

Scott Swank wrote:

I have subclassed ComponentStringResourceLoader so that I can drive it
from a custom ResourceNameIterator (in particular to look in the right
directories).  In particular, I just overrode

   public String loadStringResource(Class clazz, final String key,
final Locale locale, final String style)

and only changed the line

   ResourceNameIterator iter = new ResourceNameIterator(path, style,
locale, "properties,xml");

to use our iterator.  Now it cannot find myApplication.properties and
I am at a bit of a loss as how this class ever got to
myApplication.properties.  When it is constructing its list of
components it clearly stops at the Page and I don't see how it would
ever get to the Application.

private List getComponentStack(final Component component)
{
// Build the search stack
final List searchStack = new ArrayList();
searchStack.add(component.getClass());

if (!(component instanceof Page))
{
// Add all the component on the way to the Page
MarkupContainer container = component.getParent();
while (container != null)
{
searchStack.add(container.getClass());
if (container instanceof Page)
{
break;
}

container = container.getParent();
}
}
return searchStack;
}

What am I missing?

Thank you,
Scott

On Tue, Apr 15, 2008 at 12:30 PM, Scott Swank <[EMAIL PROTECTED]> wrote:
  

Previously we retrieved the CompoundResourceStreamLocator and added
 our ResourceStreamLocator to it.  In 1.2 did this take care of
 StringResourceLoader too?

   WebApplicationPath resourceFinder = (WebApplicationPath)
 getResourceSettings().getResourceFinder();
   resourceFinder.add(Env.getInstance().getAthenaDocRoot());

   CompoundResourceStreamLocator locator =
 (CompoundResourceStreamLocator)
 getResourceSettings().getResourceStreamLocator();
   locator.add(0, new WebPageResourceStreamLocator(resourceFinder));

 Thank you,
 Scott




 On Tue, Apr 15, 2008 at 10:55 AM, Scott Swank <[EMAIL PROTECTED]> wrote:
 > We are finally upgrading to Wicket 1.3 (in particular to 1.3.3 from
 >  1.2.6) and our StringResourceModels can no longer find their property
 >  files, which leaves our web pages containing the following:
 >
 > [Warning: String resource for 'tickets' not found]
 >
 >  Our application init method contains:
 >
 >IResourceFinder finder = getResourceSettings().getResourceFinder();
 >IResourceStreamLocator streamLocator = new
 >  WebPageResourceStreamLocator(finder);
 >getResourceSettings().setResourceStreamLocator(streamLocator);
 >
 >  and in our ResourceStreamLocator I added the following with a break
 >  point on the System.out line:
 >
 >public IResourceStream locate(final Class clazz, String path, final
 >  String variationAndStyle, final Locale locale, String extension)
 >{
 >   if (!"html".equals(extension) && !path.endsWith(".js") &&
 >  !path.endsWith(".css"))
 >   {
 >  System.out.println("break");
 >   }
 >...
 >
 >  I never see the locate() method called in an attempt to find the
 >  properties.  Where should I be looking?
 >
 >  Thank you,
 >  Scott
 >




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


  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: 1.3, resource locator and properties

2008-04-16 Thread Scott Swank
Can someone at least verify that my e-mail is getting through to the
Wicket list?  :)

On Wed, Apr 16, 2008 at 11:34 AM, Scott Swank <[EMAIL PROTECTED]> wrote:
> I have subclassed ComponentStringResourceLoader so that I can drive it
>  from a custom ResourceNameIterator (in particular to look in the right
>  directories).  In particular, I just overrode
>
>public String loadStringResource(Class clazz, final String key,
>  final Locale locale, final String style)
>
>  and only changed the line
>
>ResourceNameIterator iter = new ResourceNameIterator(path, style,
>  locale, "properties,xml");
>
>  to use our iterator.  Now it cannot find myApplication.properties and
>  I am at a bit of a loss as how this class ever got to
>  myApplication.properties.  When it is constructing its list of
>  components it clearly stops at the Page and I don't see how it would
>  ever get to the Application.
>
> private List getComponentStack(final Component component)
> {
> // Build the search stack
> final List searchStack = new ArrayList();
> searchStack.add(component.getClass());
>
> if (!(component instanceof Page))
> {
> // Add all the component on the way to the Page
> MarkupContainer container = component.getParent();
> while (container != null)
> {
> searchStack.add(container.getClass());
> if (container instanceof Page)
> {
> break;
> }
>
> container = container.getParent();
> }
> }
> return searchStack;
> }
>
>  What am I missing?
>
>  Thank you,
>  Scott
>
>
>
>  On Tue, Apr 15, 2008 at 12:30 PM, Scott Swank <[EMAIL PROTECTED]> wrote:
>  > Previously we retrieved the CompoundResourceStreamLocator and added
>  >  our ResourceStreamLocator to it.  In 1.2 did this take care of
>  >  StringResourceLoader too?
>  >
>  >WebApplicationPath resourceFinder = (WebApplicationPath)
>  >  getResourceSettings().getResourceFinder();
>  >resourceFinder.add(Env.getInstance().getAthenaDocRoot());
>  >
>  >CompoundResourceStreamLocator locator =
>  >  (CompoundResourceStreamLocator)
>  >  getResourceSettings().getResourceStreamLocator();
>  >locator.add(0, new WebPageResourceStreamLocator(resourceFinder));
>  >
>  >  Thank you,
>  >  Scott
>  >
>  >
>  >
>  >
>  >  On Tue, Apr 15, 2008 at 10:55 AM, Scott Swank <[EMAIL PROTECTED]> wrote:
>  >  > We are finally upgrading to Wicket 1.3 (in particular to 1.3.3 from
>  >  >  1.2.6) and our StringResourceModels can no longer find their property
>  >  >  files, which leaves our web pages containing the following:
>  >  >
>  >  > [Warning: String resource for 'tickets' not found]
>  >  >
>  >  >  Our application init method contains:
>  >  >
>  >  >IResourceFinder finder = getResourceSettings().getResourceFinder();
>  >  >IResourceStreamLocator streamLocator = new
>  >  >  WebPageResourceStreamLocator(finder);
>  >  >getResourceSettings().setResourceStreamLocator(streamLocator);
>  >  >
>  >  >  and in our ResourceStreamLocator I added the following with a break
>  >  >  point on the System.out line:
>  >  >
>  >  >public IResourceStream locate(final Class clazz, String path, final
>  >  >  String variationAndStyle, final Locale locale, String extension)
>  >  >{
>  >  >   if (!"html".equals(extension) && !path.endsWith(".js") &&
>  >  >  !path.endsWith(".css"))
>  >  >   {
>  >  >  System.out.println("break");
>  >  >   }
>  >  >...
>  >  >
>  >  >  I never see the locate() method called in an attempt to find the
>  >  >  properties.  Where should I be looking?
>  >  >
>  >  >  Thank you,
>  >  >  Scott
>  >  >
>  >
>

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



Re: warning: [deprecation] AuthenticatedWebSession(AuthenticatedWebApplication,Request)

2008-04-16 Thread Maurice Marrink
Is by any chance this the full exception you are getting?
ERROR - RequestCycle   - Unable to instantiate web session
class org.apache.wicket.examples.authentication.MyAuthenticatedWebSession
org.apache.wicket.WicketRuntimeException: Unable to instantiate web
session class 
org.apache.wicket.examples.authentication.MyAuthenticatedWebSession
at 
org.apache.wicket.authentication.AuthenticatedWebApplication.newSession(AuthenticatedWebApplication.java:119)
at org.apache.wicket.Session.findOrCreate(Session.java:228)
at org.apache.wicket.Session.findOrCreate(Session.java:211)
at org.apache.wicket.Session.get(Session.java:250)
at org.apache.wicket.RequestCycle.getSession(RequestCycle.java:433)
at 
org.apache.wicket.request.AbstractRequestCycleProcessor.resolveHomePageTarget(AbstractRequestCycleProcessor.java:315)
at 
org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:159)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1227)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1347)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:496)
at 
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:375)
at 
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:199)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:228)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216)
at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:634)
at 
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NoSuchMethodException:
org.apache.wicket.examples.authentication.MyAuthenticatedWebSession.(org.apache.wicket.Request)
at java.lang.Class.getConstructor0(Class.java:2706)
at java.lang.Class.getDeclaredConstructor(Class.java:1985)
at 
org.apache.wicket.authentication.AuthenticatedWebApplication.newSession(AuthenticatedWebApplication.java:114)
... 23 more
ERROR - RequestCycle   - unexpected exception when
handling another exception: Can't instantiate page using constructor
public org.apache.wicket.markup.html.pages.InternalErrorPage()
org.apache.wicket.WicketRuntimeException: Can't instantiate page using
constructor public
org.apache.wicket.markup.html.pages.InternalErrorPage()
at 
org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:168)
at 
org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:58)
at 
org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.newPage(BookmarkablePageRequestTarget.java:262)
at 
org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.getPage(BookmarkablePageRequestTarget.java:283)
at 
org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:231)
at 
org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:104)
at org.apache.wicket.RequestCycle.respond(RequestCycle.java:1184)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1251)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1347)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:496)
at 
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:375)
at 
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:199)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:228)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
at 
org.apache.

Re: possible html parsing bug?

2008-04-16 Thread Matthew Young
public class WicketApplication extends WebApplication
{
@Override public void init() {
this.getMarkupSettings().setStripXmlDeclarationFromOutput(true);
}
}

On Wed, Apr 16, 2008 at 3:06 AM, <[EMAIL PROTECTED]> wrote:

> Hi:
> It took me a while to find out why my iframe was not displaying properly.
> I have a parent/container page like
>
> 
>   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
> http://www.w3.org/1999/xhtml"; xmlns:wicket="
> http://wicket.apache.org/";>
> ...
> iframe child
>
> and the child page is like
>
> 
>   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
> http://www.w3.org/1999/xhtml"; xmlns:wicket="
> http://wicket.apache.org/";>
> ...
> 
>
> The final rendering the html page would contain  declaration ,
> which results in improper display in browser.  Once I remove the  line from the child html file,  the final rendering of html
> does not show  somehow make the browser happy and display the page correctly.
> My understanding is that for child page, wicket would discard anything
> outside , but apparently, the presence of  first line in child html somehow forced the parser to add the  final html output as the first line, which also surprises as I thought
> wicket would stream out content as it goes instead of waiting to parse the
> entire tree.
>
> Thanks
>


Re: Shared tab component across pages

2008-04-16 Thread byhisdeeds



igor.vaynberg wrote:
> 
> tabbed panel is meant to be used with panels not with pages. so
> instead of having each tab be its own page, simply make it each own
> panel.
> 
> -igor
> 
yeah, I get that. But I need to be able to replace the common panel area
being set by any of the tabs with content from a page not linked to the tab
component. I also need to be able to save the selected tab state across
these occurances. I don't seem to be able to do that.

John
-- 
View this message in context: 
http://www.nabble.com/Shared-tab-component-across-pages-tp16722526p16730793.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: Notification on session destroyed?

2008-04-16 Thread Johan Compagner
be aware that keeping references to http session attributes is not always a
good thing
especially in clustering or restarts of a server  (with a nice shutdown, so
sessions are saved to disk, then you loose your map)

johan

On Wed, Apr 16, 2008 at 8:45 PM, Nino Saturnino Martinez Vazquez Wael <
[EMAIL PROTECTED]> wrote:

> heres what I ended up with, in application:
>
>   private HashMap sessionMap = new HashMap Session>();
>
>   @Override
>   protected ISessionStore newSessionStore() {
>   return new SecondLevelCacheSessionStore(this, new DiskPageStore()) {
>   @Override
>   protected void onBind(Request request, Session newSession) {
>
>   sessionMap.put(newSession.getId(), newSession);
>   super.onBind(request, newSession);
>   }
>
>   @Override
>   protected void onUnbind(String sessionId) {
>   ZeuzSession session = (ZeuzSession)
> sessionMap.get(sessionId);
>   session.onBeforeDestroy();
>   sessionMap.remove(sessionId);
>   super.onUnbind(sessionId);
>
>   }
>
>   };
>   }
>
>
>
> Nino Saturnino Martinez Vazquez Wael wrote:
>
> > Thanks for giving the pointer.:)
> >
> > Warren wrote:
> >
> > > What is wrong with extending HttpSessionStore and overiding
> > > AbstractHttpSessionStore#onBind(Request request, Session newSession)
> > > and
> > > AbstractHttpSessionStore#onUnbind(java.lang.String sessionId)? These
> > > two
> > > methods look like they are there to do exactly what you are talking
> > > about.
> > > Docs on onUnbind says:
> > >
> > > "Template method that is called when the session is being detached
> > > from the
> > > store, which typically happens when the httpsession was invalidated."
> > >
> > > It is also called when the session becomes expired. Add your sessions
> > > to a
> > > map in onBind and in onUnbind update your pojo and remove the session
> > > from
> > > the map. onUnbind gives you a sessionId. It looks like it was meant to
> > > be
> > > used to look up a session and do something with it.
> > >
> > >
> > >
> > > > -Original Message-
> > > > From: Nino Saturnino Martinez Vazquez Wael
> > > > [mailto:[EMAIL PROTECTED]
> > > > Sent: Wednesday, April 16, 2008 2:20 AM
> > > > To: users@wicket.apache.org
> > > > Subject: Re: Notification on session destroyed?
> > > >
> > > >
> > > > But I guess there are no easy way todo this one..:/
> > > >
> > > > Nino Saturnino Martinez Vazquez Wael wrote:
> > > >
> > > >
> > > > > I know(hopefully session object should be GC'ed at some time), it
> > > > > really bothers me that it's such an hard thing todo, being aware
> > > > > of
> > > > > session state... So I just wanted an easy way.
> > > > >
> > > > > jweekend wrote:
> > > > >
> > > > >
> > > > > > Using Object#finalize() for this type of thing is generally NOT
> > > > > > a
> > > > > > good idea;
> > > > > > it may get called much later than you would "expect", if at all.
> > > > > >
> > > > > > Regards - Cemal
> > > > > > http://jWeekend.co.uk
> > > > > >
> > > > > >
> > > > > > Nino.Martinez wrote:
> > > > > >
> > > > > >
> > > > > >
> > > > > > > Thanks for the example..
> > > > > > >
> > > > > > > I just think it feels very weird to go around wicket in order
> > > > > > > to
> > > > > > > achieve this, because the pojo I have are already attached to
> > > > > > > the
> > > > > > > wicket session(so I would have double overhead for this).
> > > > > > > However it
> > > > > > > could be the case that it's not simply possible from withing
> > > > > > > wicket.
> > > > > > > If not, it would be practical to have a method that you could
> > > > > > > override on wicket session called onBeforeCreate and
> > > > > > > onBeforeDestroy
> > > > > > > or something along those lines. Could I use finalize for this?
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > sander v F wrote:
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > > You could also use a HttpSessionListener for knowing when a
> > > > > > > >
> > > > > > > >
> > > > > > > session is
> > > >
> > > >
> > > > > destroyed. The problem is indeed that you can't get the attributes
> > > > > > > > when
> > > > > > > > the
> > > > > > > > session is invalidated, but you can get the sessionId. So
> > > > > > > > you could
> > > > > > > > use a
> > > > > > > > Map to register the session id with the Pojo you would like
> > > > > > > > to
> > > > > > > > update. So
> > > > > > > > when the session get's destroyed you can update the Pojo.
> > > > > > > >
> > > > > > > > See
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > http://www.stardeveloper.com/articles/display.html?article=2001112
> > > > 001&page=1for
> > > >
> > > >
> > > > > an example with the HttpSessionListener.
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > 2008/4/16, Nino Saturnino Martinez Vazquez Wael
> > > > > > > > <[EMAIL PROTECTED]>:
> > > > > > > >
> > > > > > > >
> > >

Re: Notification on session destroyed?

2008-04-16 Thread Nino Saturnino Martinez Vazquez Wael

heres what I ended up with, in application:

   private HashMap sessionMap = new HashMapSession>();


   @Override
   protected ISessionStore newSessionStore() {
   return new SecondLevelCacheSessionStore(this, new DiskPageStore()) {
   @Override
   protected void onBind(Request request, Session newSession) {

   sessionMap.put(newSession.getId(), newSession);
   super.onBind(request, newSession);
   }

   @Override
   protected void onUnbind(String sessionId) {
   ZeuzSession session = (ZeuzSession) 
sessionMap.get(sessionId);

   session.onBeforeDestroy();
   sessionMap.remove(sessionId);
   super.onUnbind(sessionId);
   }

   };
   }



Nino Saturnino Martinez Vazquez Wael wrote:

Thanks for giving the pointer.:)

Warren wrote:

What is wrong with extending HttpSessionStore and overiding
AbstractHttpSessionStore#onBind(Request request, Session newSession) and
AbstractHttpSessionStore#onUnbind(java.lang.String sessionId)? These two
methods look like they are there to do exactly what you are talking 
about.

Docs on onUnbind says:

"Template method that is called when the session is being detached 
from the

store, which typically happens when the httpsession was invalidated."

It is also called when the session becomes expired. Add your sessions 
to a
map in onBind and in onUnbind update your pojo and remove the session 
from
the map. onUnbind gives you a sessionId. It looks like it was meant 
to be

used to look up a session and do something with it.

 

-Original Message-
From: Nino Saturnino Martinez Vazquez Wael
[mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 16, 2008 2:20 AM
To: users@wicket.apache.org
Subject: Re: Notification on session destroyed?


But I guess there are no easy way todo this one..:/

Nino Saturnino Martinez Vazquez Wael wrote:
   

I know(hopefully session object should be GC'ed at some time), it
really bothers me that it's such an hard thing todo, being aware of
session state... So I just wanted an easy way.

jweekend wrote:
 

Using Object#finalize() for this type of thing is generally NOT a
good idea;
it may get called much later than you would "expect", if at all.

Regards - Cemal
http://jWeekend.co.uk


Nino.Martinez wrote:

   

Thanks for the example..

I just think it feels very weird to go around wicket in order to
achieve this, because the pojo I have are already attached to the
wicket session(so I would have double overhead for this). However it
could be the case that it's not simply possible from withing wicket.
If not, it would be practical to have a method that you could
override on wicket session called onBeforeCreate and onBeforeDestroy
or something along those lines. Could I use finalize for this?



sander v F wrote:

 

You could also use a HttpSessionListener for knowing when a


session is
   

destroyed. The problem is indeed that you can't get the attributes
when
the
session is invalidated, but you can get the sessionId. So you could
use a
Map to register the session id with the Pojo you would like to
update. So
when the session get's destroyed you can update the Pojo.

See



http://www.stardeveloper.com/articles/display.html?article=2001112
001&page=1for
   

an example with the HttpSessionListener.




2008/4/16, Nino Saturnino Martinez Vazquez Wael
<[EMAIL PROTECTED]>:

   

So what do you think?

Im not sure how common a case this is ?


regards Nino

Nino Saturnino Martinez Vazquez Wael wrote:


 
Hmm, that feels a bit hacky.. Then I'll need to implement a 
way of
tracking sessions, and I saw something about keeping 
references to

destroyed
sessions arent that great.

It might be me that's just way of context(not knowing all of the
internals), but should something like this be easy todo in 
wicket?


Like maybe have a onDestroy or onExpire(or both?) in session 
class?

However I have no idea on how much overhead this would bring to
applications
that does not use the feature.


regards Nino

Johan Compagner wrote:


   

attached to a session of the session that is just
invalided/expired?
That wont work. You cant get to a http sessions attributes when
it is
invalidated.

To know which session id's are destroyed:

public void sessionDestroyed(String sessionId) of WebApplication

johan


On Tue, Apr 15, 2008 at 9:07 AM, Nino Saturnino Martinez Vazquez
Wael
<
[EMAIL PROTECTED]> wrote:




 

Hi

I've checked a little around, but could not find anything
directly.
This
is what I want todo:

When a user either logs out or expire I want to update a pojo
attached to
session.

So does anyone have an example on how todo this(if possible)?

--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684






-
   

Re: 1.3, resource locator and properties

2008-04-16 Thread Scott Swank
I have subclassed ComponentStringResourceLoader so that I can drive it
from a custom ResourceNameIterator (in particular to look in the right
directories).  In particular, I just overrode

   public String loadStringResource(Class clazz, final String key,
final Locale locale, final String style)

and only changed the line

   ResourceNameIterator iter = new ResourceNameIterator(path, style,
locale, "properties,xml");

to use our iterator.  Now it cannot find myApplication.properties and
I am at a bit of a loss as how this class ever got to
myApplication.properties.  When it is constructing its list of
components it clearly stops at the Page and I don't see how it would
ever get to the Application.

private List getComponentStack(final Component component)
{
// Build the search stack
final List searchStack = new ArrayList();
searchStack.add(component.getClass());

if (!(component instanceof Page))
{
// Add all the component on the way to the Page
MarkupContainer container = component.getParent();
while (container != null)
{
searchStack.add(container.getClass());
if (container instanceof Page)
{
break;
}

container = container.getParent();
}
}
return searchStack;
}

What am I missing?

Thank you,
Scott

On Tue, Apr 15, 2008 at 12:30 PM, Scott Swank <[EMAIL PROTECTED]> wrote:
> Previously we retrieved the CompoundResourceStreamLocator and added
>  our ResourceStreamLocator to it.  In 1.2 did this take care of
>  StringResourceLoader too?
>
>WebApplicationPath resourceFinder = (WebApplicationPath)
>  getResourceSettings().getResourceFinder();
>resourceFinder.add(Env.getInstance().getAthenaDocRoot());
>
>CompoundResourceStreamLocator locator =
>  (CompoundResourceStreamLocator)
>  getResourceSettings().getResourceStreamLocator();
>locator.add(0, new WebPageResourceStreamLocator(resourceFinder));
>
>  Thank you,
>  Scott
>
>
>
>
>  On Tue, Apr 15, 2008 at 10:55 AM, Scott Swank <[EMAIL PROTECTED]> wrote:
>  > We are finally upgrading to Wicket 1.3 (in particular to 1.3.3 from
>  >  1.2.6) and our StringResourceModels can no longer find their property
>  >  files, which leaves our web pages containing the following:
>  >
>  > [Warning: String resource for 'tickets' not found]
>  >
>  >  Our application init method contains:
>  >
>  >IResourceFinder finder = getResourceSettings().getResourceFinder();
>  >IResourceStreamLocator streamLocator = new
>  >  WebPageResourceStreamLocator(finder);
>  >getResourceSettings().setResourceStreamLocator(streamLocator);
>  >
>  >  and in our ResourceStreamLocator I added the following with a break
>  >  point on the System.out line:
>  >
>  >public IResourceStream locate(final Class clazz, String path, final
>  >  String variationAndStyle, final Locale locale, String extension)
>  >{
>  >   if (!"html".equals(extension) && !path.endsWith(".js") &&
>  >  !path.endsWith(".css"))
>  >   {
>  >  System.out.println("break");
>  >   }
>  >...
>  >
>  >  I never see the locate() method called in an attempt to find the
>  >  properties.  Where should I be looking?
>  >
>  >  Thank you,
>  >  Scott
>  >
>

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



Re: Package resource not found in YUI package

2008-04-16 Thread Per Newgro
Am Dienstag, 15. April 2008 09:27:48 schrieb Fynn:
> Now I use wicket 1.3.3 and this warnings are still in my log file...
> in the jar package i can´t find this files
>
> Nobody an idea?
I added a wish / rfe for this
https://issues.apache.org/jira/browse/WICKET-1546

Cheers
Per



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



Re: Wicket + CMS

2008-04-16 Thread Igor Vaynberg
our requirements changed to the point where jcr became a better fit.
remember this is driven by my company's requirements, not my own. we
are opening it to give back to the community.

-igor


On Wed, Apr 16, 2008 at 4:50 AM, Martin Funk <[EMAIL PROTECTED]> wrote:
> Is that the same one you were talking about here:
>  http://www.nabble.com/wicket-%2B-CMS-to14895305.html#a14913697
>
>  If so, what happened to the the versioning/tagging for free?
>
>  mf
>
>  2008/4/15, Igor Vaynberg <[EMAIL PROTECTED]>:
>
>
> >
>  > the cms matej and i are working on will be opened shortly after may
>  > 1st. it is based on wicket and jcr. mind you it is not meant to be a
>  > full-blown cms system yet, but rather a framework/library that makes
>  > it easy to integrate a cms system into a wicket app. the small example
>  > app we will provide will demonstrate a stand-alone cms. also note that
>  > just because we are putting the source out there on may 1st it is far
>  > from complete/pretty, we are doing it so early because a lot of people
>  > want to take a peek.
>  >
>  > -igor
>  >
>  >
>  > 2008/4/15 Uwe Schäfer <[EMAIL PROTECTED]>:
>  >
>  > > Jan Kriesten schrieb:
>  > >
>  > >
>  > >
>  > > > I just did something like this to have a certain panel use FreeMarker
>  > > templates which dynamically creates wicket:components (actually, this
>  > will
>  > > be a new CMS based on Wicket... 8 Weeks to go I suppose)!
>  > > >
>  > >
>  > >  go go go! people are waiting for smth like that ;)
>  > >
>  > >  i´ve 'heard' there is another CMS-like app currently being built with
>  > > wicket in the front-end?
>  > >  any details on that approach?
>  > >
>  > >  igor? :)
>  > >
>  > >
>  > >  cu uwe
>  > >  --
>  > >
>  > >  THOMAS DAILY GmbH
>  > >  Adlerstraße 19
>  > >  79098 Freiburg
>  > >  Deutschland
>  > >  T  + 49 761 3 85 59 0
>  > >  F  + 49 761 3 85 59 550
>  > >  E  [EMAIL PROTECTED]
>  > >  www.thomas-daily.de
>  > >
>  > >  Geschäftsführer/Managing Directors:
>  > >  Wendy Thomas, Susanne Larbig
>  > >  Handelsregister Freiburg i.Br., HRB 3947
>  > >
>  > >  Registrieren Sie sich unter http://morningnews.thomas-daily.de für die
>  > > kostenfreien TD Morning News, eine Auswahl aktueller Themen des Tages
>  > > morgens um 9:00 in Ihrer Mailbox.
>  > >
>  > >  Hinweis: Der Redaktionsschluss für unsere TD Morning News ist täglich
>  > um
>  > > 8:30 Uhr. Es werden vorrangig Informationen berücksichtigt, die nach
>  > 16:00
>  > > Uhr des Vortages eingegangen sind. Die Email-Adresse unserer Redaktion
>  > > lautet [EMAIL PROTECTED]
>  > >
>  > >
>  > >  -
>  > >
>  > >  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]
>  >
>  >
>

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



Re: Notification on session destroyed?

2008-04-16 Thread Nino Saturnino Martinez Vazquez Wael

Thanks for giving the pointer.:)

Warren wrote:

What is wrong with extending HttpSessionStore and overiding
AbstractHttpSessionStore#onBind(Request request, Session newSession) and
AbstractHttpSessionStore#onUnbind(java.lang.String sessionId)? These two
methods look like they are there to do exactly what you are talking about.
Docs on onUnbind says:

"Template method that is called when the session is being detached from the
store, which typically happens when the httpsession was invalidated."

It is also called when the session becomes expired. Add your sessions to a
map in onBind and in onUnbind update your pojo and remove the session from
the map. onUnbind gives you a sessionId. It looks like it was meant to be
used to look up a session and do something with it.

  

-Original Message-
From: Nino Saturnino Martinez Vazquez Wael
[mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 16, 2008 2:20 AM
To: users@wicket.apache.org
Subject: Re: Notification on session destroyed?


But I guess there are no easy way todo this one..:/

Nino Saturnino Martinez Vazquez Wael wrote:


I know(hopefully session object should be GC'ed at some time), it
really bothers me that it's such an hard thing todo, being aware of
session state... So I just wanted an easy way.

jweekend wrote:
  

Using Object#finalize() for this type of thing is generally NOT a
good idea;
it may get called much later than you would "expect", if at all.

Regards - Cemal
http://jWeekend.co.uk


Nino.Martinez wrote:



Thanks for the example..

I just think it feels very weird to go around wicket in order to
achieve this, because the pojo I have are already attached to the
wicket session(so I would have double overhead for this). However it
could be the case that it's not simply possible from withing wicket.
If not, it would be practical to have a method that you could
override on wicket session called onBeforeCreate and onBeforeDestroy
or something along those lines. Could I use finalize for this?



sander v F wrote:

  

You could also use a HttpSessionListener for knowing when a


session is


destroyed. The problem is indeed that you can't get the attributes
when
the
session is invalidated, but you can get the sessionId. So you could
use a
Map to register the session id with the Pojo you would like to
update. So
when the session get's destroyed you can update the Pojo.

See



http://www.stardeveloper.com/articles/display.html?article=2001112
001&page=1for


an example with the HttpSessionListener.




2008/4/16, Nino Saturnino Martinez Vazquez Wael
<[EMAIL PROTECTED]>:



So what do you think?

Im not sure how common a case this is ?


regards Nino

Nino Saturnino Martinez Vazquez Wael wrote:


  

Hmm, that feels a bit hacky.. Then I'll need to implement a way of
tracking sessions, and I saw something about keeping references to
destroyed
sessions arent that great.

It might be me that's just way of context(not knowing all of the
internals), but should something like this be easy todo in wicket?

Like maybe have a onDestroy or onExpire(or both?) in session class?
However I have no idea on how much overhead this would bring to
applications
that does not use the feature.


regards Nino

Johan Compagner wrote:




attached to a session of the session that is just
invalided/expired?
That wont work. You cant get to a http sessions attributes when
it is
invalidated.

To know which session id's are destroyed:

public void sessionDestroyed(String sessionId) of WebApplication

johan


On Tue, Apr 15, 2008 at 9:07 AM, Nino Saturnino Martinez Vazquez
Wael
<
[EMAIL PROTECTED]> wrote:




  

Hi

I've checked a little around, but could not find anything
directly.
This
is what I want todo:

When a user either logs out or expire I want to update a pojo
attached to
session.

So does anyone have an example on how todo this(if possible)?

--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684






-


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







--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684



  

-


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



  

--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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




  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7

Re: Shared tab component across pages

2008-04-16 Thread Igor Vaynberg
tabbed panel is meant to be used with panels not with pages. so
instead of having each tab be its own page, simply make it each own
panel.

-igor


On Wed, Apr 16, 2008 at 7:53 AM, byhisdeeds <[EMAIL PROTECTED]> wrote:
>
>  I'm new to wicket and would greatly appreciate for someone to point me in the
>  right direction. I have an existing web application implemented using jsp's
>  that I'm trying to convert to wicket, where each page has a header section,
>  body section and footer section. The header section has a main tab and sub
>  tabs that must be shown for all pages in their exisiting state, that is,
>  indicating the existing selected state of the tab and subtab.
>
>  I have started with the example using the TabbedPanel, but I'm having some
>  problems with the following.
>
>  1)The state of the tabs does not seem to be saved when I switch to other
>  pages which are not called from the tab.
>  2)I cannot seem to embed the tab from these pages in other pages that will
>  be called from links of other abitrary pages.
>
>  I'm not sure I've explained it but can someone point me towards a solution.
>  --
>  View this message in context: 
> http://www.nabble.com/Shared-tab-component-across-pages-tp16722526p16722526.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]



Re: Can only locate or create session in the context of a request cycle.

2008-04-16 Thread mfs

Subclassing RequestCycle would give me control on begin/end of the request, i
wouldnt still have access to the Wicket Session...right..i am not sure if a
wicket session is initiated at that time?

If not, a plain servlet filter also gives me control in the beginning of the
request, except for the fact that i have am playing with
HttpRequest,response, where as wicket requestcycle gives me an abstracted
view of these classes, other than i am just wondering as to what i would be
able to achieve...

I can still do all the authentication stuff (check for authtoken/cookie) in
a normal filter too..isnt it?..unless am missing something..

Farhan.


Alex Jacoby-2 wrote:
> 
> Would subclassing your wicket RequestCycle work?  That's where I'm  
> doing similar authentication stuff right now and it seems to be  
> working well.  It seems like Session is harder to integrate with  
> external apps since actions can happen that it's unaware of.  If you  
> use RequestCycle you can check cookies, tokens, etc, on each request,  
> which is really where you want to do it since you have no idea if the  
> user did something (like logout) in the external app.
> 
> Alex
> 
> On Apr 15, 2008, at 1:22 PM, mfs wrote:
>>
>> Yeah i need to..i.e. the very authentication token so that for  
>> subsequent
>> request i cant avoid the authentication call..
>>
>> Well i can opt for HttpSession but then i will be using the same  
>> wherever in
>> my pages i need it (there are a couple of scenarios where i need to  
>> pass the
>> info back), and hence compromising the abstraction wicket provides..
>>
>>
>> Johan Compagner wrote:
>>>
>>> if there is no session
>>> do you already want to store something?
>>>
>>> On Tue, Apr 15, 2008 at 3:10 AM, mfs <[EMAIL PROTECTED]> wrote:
>>>

 Guys,

 Please comment..

 I have a non-wicket AuthenticationFilter which is intercepting all
 request
 to my wicket-app and checking if the request is coming in from a  
 valid
 user.
 Basically in the url am passed over an authenticationToken (by  
 another
 application where the user has signed in already). Now in my
 AuthenticationFilter i check if that is a valid token and if yes i  
 want
 to
 set some attribute (isAuthenticated etc) in wicket-session, .

 The problem is that the wicket session has yet not been created  
 (because
 this is the first request to the wicket app, intercepted by the  
 filter),
 and
 hence i get this error "you can only locate or create sessions in  
 the
 context of a request cycle", when i try do a Session.get().

 I am already using WicketSessionFilter which would expose my wicket
 session
 to my non-wicket filter. The problem is just for the first  
 request, where
 a
 wicket session yet doesnt exist.

 I am thinking of using HttpSession directly in my filter and store  
 all
 the
 session data there, but before i do so, i thought to check if  
 anyone has
 a
 better work around, ideally i would want to avoid using it.

 Thanks in advance

 Farhan
 --
 View this message in context:
 http://www.nabble.com/Can-only-locate-or-create-session-in-the-context-of-a-request-cycle.-tp16693084p16693084.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/Re%3A-Can-only-locate-or-create-session-in-the-context-of-a-request-cycle.-tp16696797p16703394.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/Re%3A-Can-only-locate-or-create-session-in-the-context-of-a-request-cycle.-tp16696797p16727266.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]



BookmarkablePageLink linksTo() bug?

2008-04-16 Thread Ritz123

Hi,

Just wondering if linksTo(Page) method of BookmarkablePageLink has a bug
since it doesnt take into account the Page parameters to check whether the
page being linked in the context of parameters, if PageParameters are
specified. In theory since Bookmarkable page being a dynamic page will be
"different" based on what params are getting passed even though the page
class name is still the same. Currently this causes page links for the
DataTable based page to not work since autoenable will always show the links
disabled.

Just a thought...
-- 
View this message in context: 
http://www.nabble.com/BookmarkablePageLink-linksTo%28%29-bug--tp16726486p16726486.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: Can I use LazyLoad or something like it with a modal?

2008-04-16 Thread taygolf


That is what I looked at which brought about this question. I guess you are
saying that I can use it with a modal?

Should I be trying to use it where the modal is created or should I be using
it on the page the the modal shows?

I am just confused by it. Also is there a way to set the sleep time to
something other than a static time. In other words can i set it to sleep
until the query is done?

Thanks

T


Gerolf Seitz wrote:
> 
> take a look at AjaxLazyLoadPanel. this might do the trick.
> 
> 
> 
>   Gerolf
> 
> On Wed, Apr 16, 2008 at 4:52 PM, taygolf <[EMAIL PROTECTED]> wrote:
> 
>>
>> Ok here is my issue. I have a modal that has a lot of information in it
>> and
>> it has to get back a large amount of data from the database and it is
>> taking
>> about 4 seconds to load because of all the data. I wish I was allowed to
>> fliter the data more so there was not so much information but I do not
>> get
>> to make that decision.
>>
>> Anyway when you click on the button to open the modal it takes about 4 or
>> 5
>> seconds for the modal window to open. I would like to have something like
>> lazyload has come up and show that the application is working and loading
>> the modal instead of the screen just sitting there. If it just sits there
>> while it is trying to load the user will click the button multiple times
>> thinking the application is broken.
>>
>> So can I Lazy load a modal window? Or is there a better approach to
>> tellign
>> the user to wait for 5 seconds for the modal window to open?
>>
>> Thanks
>>
>> T
>> --
>> View this message in context:
>> http://www.nabble.com/Can-I-use-LazyLoad-or-something-like-it-with-a-modal--tp16722524p16722524.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/Can-I-use-LazyLoad-or-something-like-it-with-a-modal--tp16722524p16726065.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: Page Expire

2008-04-16 Thread Igor Vaynberg
have an ajax behavior on the script that makes a callback every x
minutes to keep the session alive

-igor


On Wed, Apr 16, 2008 at 7:13 AM, xdirewolfx <[EMAIL PROTECTED]> wrote:
>
>  Hi,
>
>  I'm using wicket and ext-js in a "portlet" style loading different wicket
>  pages in. However, I face an issue when user did not touch a particular page
>  for a while, it will get expired. What is the best way to work around this
>  in ajax based web app in wicket?
>  --
>  View this message in context: 
> http://www.nabble.com/Page-Expire-tp16722304p16722304.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]



Re: problems with stateless forms and radiogroups/checkgroups

2008-04-16 Thread Alexei Sokolov
Done.
https://issues.apache.org/jira/browse/WICKET-1545

Alex

On Tue, Apr 15, 2008 at 11:19 PM, Johan Compagner <[EMAIL PROTECTED]>
wrote:

> Make a  jira issue for this
>
> On 4/16/08, Alexei Sokolov <[EMAIL PROTECTED]> wrote:
> > Hello,
> > I'm trying to use radiogroup/checkgroup with stateless form, and it is
> not
> > possible at the moment. I get the following exception:
> >
> > submitted http post value [radio4] for RadioGroup component
> > [0:form:whatever] is illegal because it does not contain relative path
> to a
> > Radio componnet. Due to this the RadioGroup component cannot resolve the
> > selected Radio component pointed to by the illegal value. A possible
> reason
> > is that component hierarchy changed between rendering and form
> submission.
> >
> > I think the problem lies inside Check & Radio components, which use
> > Page.getAutoIndex()  and that value is different before and after page
> > submission for Check/Radio components.
> >
> > Now, it is not possible to override getValue() on Check/Radio
> components, so
> > I'm kind of stuck now...
> >
> > Please tell me how to fix this issue,
> >
> > Thanks,
> > Alex
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Notification on session destroyed?

2008-04-16 Thread Johan Compagner
Let your own wicket session object implement session bind listener
(dont know the excact name) then you have those lifecycle events on
your wicket session object itself.

By the way only in newer servlet specs that you can call getID() on
the httpsession that was also not allowed for quite a while, thats why
we keep the session id in wicket session itself

On 4/16/08, sander v F <[EMAIL PROTECTED]> wrote:
> Example:
>
>
> public class PojoUpdater implements HttpSessionListener
> {
> private static Map pojos = new HashMap Object>();
>
> public void sessionCreated(HttpSessionEvent se)
> {
> //do nothing
> }
>
> public void sessionDestroyed(HttpSessionEvent se)
> {
> Object object=pojos.get(se.getSession().getId());
> if(object != null)
> {
> // Do what you want here with the object
> }
> }
>
> public static void registerPojo(String sessionId,Object object)
> {
> pojos.put(sessionId,object);
> }
> }
>
> 2008/4/16, sander v F <[EMAIL PROTECTED]>:
> >
> > You could also use a HttpSessionListener for knowing when a session is
> > destroyed. The problem is indeed that you can't get the attributes when
> the
> > session is invalidated, but you can get the sessionId. So you could use a
> > Map to register the session id with the Pojo you would like to update. So
> > when the session get's destroyed you can update the Pojo.
> >
> > See
> >
> http://www.stardeveloper.com/articles/display.html?article=2001112001&page=1for
> an example with the HttpSessionListener.
> >
> >
> >
> >
> > 2008/4/16, Nino Saturnino Martinez Vazquez Wael <[EMAIL PROTECTED]>:
> > >
> > > So what do you think?
> > >
> > > Im not sure how common a case this is ?
> > >
> > >
> > > regards Nino
> > >
> > > Nino Saturnino Martinez Vazquez Wael wrote:
> > >
> > > > Hmm, that feels a bit hacky.. Then I'll need to implement a way of
> > > > tracking sessions, and I saw something about keeping references to
> destroyed
> > > > sessions arent that great.
> > > >
> > > > It might be me that's just way of context(not knowing all of the
> > > > internals), but should something like this be easy todo in wicket?
> > > >
> > > > Like maybe have a onDestroy or onExpire(or both?) in session class?
> > > > However I have no idea on how much overhead this would bring to
> applications
> > > > that does not use the feature.
> > > >
> > > >
> > > > regards Nino
> > > >
> > > > Johan Compagner wrote:
> > > >
> > > > > attached to a session of the session that is just invalided/expired?
> > > > > That wont work. You cant get to a http sessions attributes when it
> > > > > is
> > > > > invalidated.
> > > > >
> > > > > To know which session id's are destroyed:
> > > > >
> > > > > public void sessionDestroyed(String sessionId) of WebApplication
> > > > >
> > > > > johan
> > > > >
> > > > >
> > > > > On Tue, Apr 15, 2008 at 9:07 AM, Nino Saturnino Martinez Vazquez
> > > > > Wael <
> > > > > [EMAIL PROTECTED]> wrote:
> > > > >
> > > > >
> > > > >
> > > > > > Hi
> > > > > >
> > > > > > I've checked a little around, but could not find anything
> > > > > > directly. This
> > > > > > is what I want todo:
> > > > > >
> > > > > > When a user either logs out or expire I want to update a pojo
> > > > > > attached to
> > > > > > session.
> > > > > >
> > > > > > So does anyone have an example on how todo this(if possible)?
> > > > > >
> > > > > > --
> > > > > > -Wicket for love
> > > > > >
> > > > > > Nino Martinez Wael
> > > > > > Java Specialist @ Jayway DK
> > > > > > http://www.jayway.dk
> > > > > > +45 2936 7684
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> -
> > > > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > --
> > > -Wicket for love
> > >
> > > Nino Martinez Wael
> > > Java Specialist @ Jayway DK
> > > http://www.jayway.dk
> > > +45 2936 7684
> > >
> > >
> > > -
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
>

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



RE: Notification on session destroyed?

2008-04-16 Thread Warren
What is wrong with extending HttpSessionStore and overiding
AbstractHttpSessionStore#onBind(Request request, Session newSession) and
AbstractHttpSessionStore#onUnbind(java.lang.String sessionId)? These two
methods look like they are there to do exactly what you are talking about.
Docs on onUnbind says:

"Template method that is called when the session is being detached from the
store, which typically happens when the httpsession was invalidated."

It is also called when the session becomes expired. Add your sessions to a
map in onBind and in onUnbind update your pojo and remove the session from
the map. onUnbind gives you a sessionId. It looks like it was meant to be
used to look up a session and do something with it.

> -Original Message-
> From: Nino Saturnino Martinez Vazquez Wael
> [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, April 16, 2008 2:20 AM
> To: users@wicket.apache.org
> Subject: Re: Notification on session destroyed?
>
>
> But I guess there are no easy way todo this one..:/
>
> Nino Saturnino Martinez Vazquez Wael wrote:
> > I know(hopefully session object should be GC'ed at some time), it
> > really bothers me that it's such an hard thing todo, being aware of
> > session state... So I just wanted an easy way.
> >
> > jweekend wrote:
> >> Using Object#finalize() for this type of thing is generally NOT a
> >> good idea;
> >> it may get called much later than you would "expect", if at all.
> >>
> >> Regards - Cemal
> >> http://jWeekend.co.uk
> >>
> >>
> >> Nino.Martinez wrote:
> >>
> >>> Thanks for the example..
> >>>
> >>> I just think it feels very weird to go around wicket in order to
> >>> achieve this, because the pojo I have are already attached to the
> >>> wicket session(so I would have double overhead for this). However it
> >>> could be the case that it's not simply possible from withing wicket.
> >>> If not, it would be practical to have a method that you could
> >>> override on wicket session called onBeforeCreate and onBeforeDestroy
> >>> or something along those lines. Could I use finalize for this?
> >>>
> >>>
> >>>
> >>> sander v F wrote:
> >>>
>  You could also use a HttpSessionListener for knowing when a
> session is
>  destroyed. The problem is indeed that you can't get the attributes
>  when
>  the
>  session is invalidated, but you can get the sessionId. So you could
>  use a
>  Map to register the session id with the Pojo you would like to
>  update. So
>  when the session get's destroyed you can update the Pojo.
> 
>  See
> 
> http://www.stardeveloper.com/articles/display.html?article=2001112
> 001&page=1for
> 
>  an example with the HttpSessionListener.
> 
> 
> 
> 
>  2008/4/16, Nino Saturnino Martinez Vazquez Wael
>  <[EMAIL PROTECTED]>:
> 
> > So what do you think?
> >
> > Im not sure how common a case this is ?
> >
> >
> > regards Nino
> >
> > Nino Saturnino Martinez Vazquez Wael wrote:
> >
> >
> >> Hmm, that feels a bit hacky.. Then I'll need to implement a way of
> >> tracking sessions, and I saw something about keeping references to
> >> destroyed
> >> sessions arent that great.
> >>
> >> It might be me that's just way of context(not knowing all of the
> >> internals), but should something like this be easy todo in wicket?
> >>
> >> Like maybe have a onDestroy or onExpire(or both?) in session class?
> >> However I have no idea on how much overhead this would bring to
> >> applications
> >> that does not use the feature.
> >>
> >>
> >> regards Nino
> >>
> >> Johan Compagner wrote:
> >>
> >>
> >>> attached to a session of the session that is just
> >>> invalided/expired?
> >>> That wont work. You cant get to a http sessions attributes when
> >>> it is
> >>> invalidated.
> >>>
> >>> To know which session id's are destroyed:
> >>>
> >>> public void sessionDestroyed(String sessionId) of WebApplication
> >>>
> >>> johan
> >>>
> >>>
> >>> On Tue, Apr 15, 2008 at 9:07 AM, Nino Saturnino Martinez Vazquez
> >>> Wael
> >>> <
> >>> [EMAIL PROTECTED]> wrote:
> >>>
> >>>
> >>>
> >>>
>  Hi
> 
>  I've checked a little around, but could not find anything
>  directly.
>  This
>  is what I want todo:
> 
>  When a user either logs out or expire I want to update a pojo
>  attached to
>  session.
> 
>  So does anyone have an example on how todo this(if possible)?
> 
>  --
>  -Wicket for love
> 
>  Nino Martinez Wael
>  Java Specialist @ Jayway DK
>  http://www.jayway.dk
>  +45 2936 7684
> 
> 
> 
> 
> -
> 
>  To unsubscribe, e-mai

Re: Can I use LazyLoad or something like it with a modal?

2008-04-16 Thread Gerolf Seitz
take a look at AjaxLazyLoadPanel. this might do the trick.

  Gerolf

On Wed, Apr 16, 2008 at 4:52 PM, taygolf <[EMAIL PROTECTED]> wrote:

>
> Ok here is my issue. I have a modal that has a lot of information in it
> and
> it has to get back a large amount of data from the database and it is
> taking
> about 4 seconds to load because of all the data. I wish I was allowed to
> fliter the data more so there was not so much information but I do not get
> to make that decision.
>
> Anyway when you click on the button to open the modal it takes about 4 or
> 5
> seconds for the modal window to open. I would like to have something like
> lazyload has come up and show that the application is working and loading
> the modal instead of the screen just sitting there. If it just sits there
> while it is trying to load the user will click the button multiple times
> thinking the application is broken.
>
> So can I Lazy load a modal window? Or is there a better approach to
> tellign
> the user to wait for 5 seconds for the modal window to open?
>
> Thanks
>
> T
> --
> View this message in context:
> http://www.nabble.com/Can-I-use-LazyLoad-or-something-like-it-with-a-modal--tp16722524p16722524.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]
>
>


Shared tab component across pages

2008-04-16 Thread byhisdeeds

I'm new to wicket and would greatly appreciate for someone to point me in the
right direction. I have an existing web application implemented using jsp's
that I'm trying to convert to wicket, where each page has a header section,
body section and footer section. The header section has a main tab and sub
tabs that must be shown for all pages in their exisiting state, that is,
indicating the existing selected state of the tab and subtab.

I have started with the example using the TabbedPanel, but I'm having some
problems with the following.

1)The state of the tabs does not seem to be saved when I switch to other
pages which are not called from the tab.
2)I cannot seem to embed the tab from these pages in other pages that will
be called from links of other abitrary pages.

I'm not sure I've explained it but can someone point me towards a solution.
-- 
View this message in context: 
http://www.nabble.com/Shared-tab-component-across-pages-tp16722526p16722526.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]



Can I use LazyLoad or something like it with a modal?

2008-04-16 Thread taygolf

Ok here is my issue. I have a modal that has a lot of information in it and
it has to get back a large amount of data from the database and it is taking
about 4 seconds to load because of all the data. I wish I was allowed to
fliter the data more so there was not so much information but I do not get
to make that decision.

Anyway when you click on the button to open the modal it takes about 4 or 5
seconds for the modal window to open. I would like to have something like
lazyload has come up and show that the application is working and loading
the modal instead of the screen just sitting there. If it just sits there
while it is trying to load the user will click the button multiple times
thinking the application is broken.

So can I Lazy load a modal window? Or is there a better approach to tellign
the user to wait for 5 seconds for the modal window to open?

Thanks

T
-- 
View this message in context: 
http://www.nabble.com/Can-I-use-LazyLoad-or-something-like-it-with-a-modal--tp16722524p16722524.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: good WicketTester info page?

2008-04-16 Thread Michael Perkonigg

lars vonk wrote:

I would advice you to just try it out... that's how I did it. You could use
the mvn quickstart archetype tocreate a skeleton project and start testing:

mvn archetype:create -DarchetypeGroupId=org.apache.wicket
-DarchetypeArtifactId=wicket-archetype-quickstart -DarchetypeVersion=1.3.3
-DgroupId=com.mycompany -DartifactId=myproject

Hopes this helps,
  


Unfortunately not. I have a project and I am ordered to write some 
tests. I can influence some of the contructs used in this project but 
most are here and I have to live with them. So I try to find out how to 
test them or if I can test them with the WicketTester.
It seems to me that there are a lot of possible contructs which cannot 
be tested.
The info about the WicketTester API is also quite sparse, there seems to 
be no documentation except the examples in the javadoc and one page in 
the wiki. Even the one who created the one wiki page mentioned that he 
had to try it out himself.


Thanks,
Mike


Lars

On Wed, Apr 16, 2008 at 2:40 PM, Michael Perkonigg <
[EMAIL PROTECTED]> wrote:

  

Hello,

is there a page explaining what one can do with the WicketTester and how?
And yes, I already read http://cwiki.apache.org/WICKET/testing-pages.htmlit's 
just not very clear what can be done and, more important, cannot be
done.

Thanks,
Mike


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





  



--
Liland ...does IT better

Liland IT GmbH
Software Entwickler
email: [EMAIL PROTECTED]

office: +43 (0)463 220-111  | fax: +43 (0)463 220-288 
http://www.Liland.at



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



Re: good WicketTester info page?

2008-04-16 Thread Steve Thompson
Check out Kent Tong's book, in which he has an excellent chapter on testing
Wicket pages/forms/components.

On Wed, Apr 16, 2008 at 6:40 AM, Michael Perkonigg <
[EMAIL PROTECTED]> wrote:

> Hello,
>
> is there a page explaining what one can do with the WicketTester and how?
> And yes, I already read http://cwiki.apache.org/WICKET/testing-pages.htmlit's 
> just not very clear what can be done and, more important, cannot be
> done.
>
> Thanks,
> Mike
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Problems with Palette

2008-04-16 Thread Fabien D.

Hi everybody,

I have two problems with the Palette.

The first one is when the user submits the form and there are problems with
the other textfield (Validator), the left field for the selection is
reseted!! 

The second problem is when all fields are good and when a try de getBack the
list of selected objects, It returns the first object of my list as many as
there are selcted objects : 

exemple : 

Available -> reset when there is a probleme with validator
Toto
Tata

Selected
Titi
Tutu

The return is :
Titi
Titi

The code  for my palette:

ChoiceRenderer renderer = new ChoiceRenderer();
List licences = CDataFromBDD.getListNameLicence();
Mode model_licence = new Model((Serializable)licences);
Mode model_licence_selection = new Model(new ArrayList());
//parameter of the licence
Palette licence = new Palette("licence", model_licence_selection,
model_licence, renderer, 6, false);
this.form_ajoutinfgeneral.add(licence);

The code  for my form:
form_ajoutinfgeneral = new Form("form_ajoutinfgeneral", new
CompoundPropertyModel(this.model_sous_domaine)) {
private static final long serialVersionUID = 1L;
protected void onSubmit() {
  
  List selected =
(List)model_licence_selection.getObject();
   ...
}
}

Sorry for my english, I'm french, and thank you in advance :)

-- 
View this message in context: 
http://www.nabble.com/Problems-with-Palette-tp16722516p16722516.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: WicketTester.startPage(page) throws "No requestCycle is currently set"

2008-04-16 Thread Frank Bille
tester.createRequestCycle() (or something). Though I thought it was
called for you in startPage. It's good that we will take a look at it
for WNG.

Frank

On Wed, Apr 16, 2008 at 3:28 PM, Federico Fanton <[EMAIL PROTECTED]> wrote:
> Hi to all,
>  I'm receiving a strange message with WicketTester in 1.3.3.. Whenever I use 
> startPage(Page) I get a "No requestcycle is currently set!" logged..
>  To reproduce, just use a QuickStart with a completely static Homepage.html 
> (no wicket:id's) and an empty Homepage.class (just a "Homepage extends 
> WebPage"), while the test itself is
>
>  new WicketTester().startPage(new HomePage());
>
>  with
>
>  log4j.logger.org.apache.wicket=DEBUG
>
>  inside log4j.properties, to enable logging.
>
>  Am I missing something?
>  Many thanks for your time!
>
>
>  -
>  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]



Page Expire

2008-04-16 Thread xdirewolfx

Hi,

I'm using wicket and ext-js in a "portlet" style loading different wicket
pages in. However, I face an issue when user did not touch a particular page
for a while, it will get expired. What is the best way to work around this
in ajax based web app in wicket?
-- 
View this message in context: 
http://www.nabble.com/Page-Expire-tp16722304p16722304.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: good WicketTester info page?

2008-04-16 Thread lars vonk
I would advice you to just try it out... that's how I did it. You could use
the mvn quickstart archetype tocreate a skeleton project and start testing:

mvn archetype:create -DarchetypeGroupId=org.apache.wicket
-DarchetypeArtifactId=wicket-archetype-quickstart -DarchetypeVersion=1.3.3
-DgroupId=com.mycompany -DartifactId=myproject

Hopes this helps,
Lars

On Wed, Apr 16, 2008 at 2:40 PM, Michael Perkonigg <
[EMAIL PROTECTED]> wrote:

> Hello,
>
> is there a page explaining what one can do with the WicketTester and how?
> And yes, I already read http://cwiki.apache.org/WICKET/testing-pages.htmlit's 
> just not very clear what can be done and, more important, cannot be
> done.
>
> Thanks,
> Mike
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


WicketTester.startPage(page) throws "No requestCycle is currently set"

2008-04-16 Thread Federico Fanton
Hi to all,
I'm receiving a strange message with WicketTester in 1.3.3.. Whenever I use 
startPage(Page) I get a "No requestcycle is currently set!" logged..
To reproduce, just use a QuickStart with a completely static Homepage.html (no 
wicket:id's) and an empty Homepage.class (just a "Homepage extends WebPage"), 
while the test itself is

new WicketTester().startPage(new HomePage());

with

log4j.logger.org.apache.wicket=DEBUG

inside log4j.properties, to enable logging.

Am I missing something?
Many thanks for your time!


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



WicketTester clickLink question

2008-04-16 Thread Michael Perkonigg

Hello,

I read 
http://cwiki.apache.org/WICKET/adding-links-in-a-defaultdatatable.html 
and I wonder if it is possible to WicketTester.clickLink one of these 
links described in the wiki.
I need a path to the component but it seems to me that some parts of the 
table surrounding the link don't have a wicket id so I think it is not 
possible to clickLink one of them, is it?


I have an almost nonexistent understanding of what is a 'path' for 
clickLink. It isn't the plain wicket:id or it would be possible to 
clickLink one of the links with the path 'link' but that isn't working 
for me.
And there are several of the links with the same wicket id so how can I 
reach the other links?


Thanks,
Mike


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



Re: Can only locate or create session in the context of a request cycle.

2008-04-16 Thread Alex Jacoby
Would subclassing your wicket RequestCycle work?  That's where I'm  
doing similar authentication stuff right now and it seems to be  
working well.  It seems like Session is harder to integrate with  
external apps since actions can happen that it's unaware of.  If you  
use RequestCycle you can check cookies, tokens, etc, on each request,  
which is really where you want to do it since you have no idea if the  
user did something (like logout) in the external app.


Alex

On Apr 15, 2008, at 1:22 PM, mfs wrote:


Yeah i need to..i.e. the very authentication token so that for  
subsequent

request i cant avoid the authentication call..

Well i can opt for HttpSession but then i will be using the same  
wherever in
my pages i need it (there are a couple of scenarios where i need to  
pass the

info back), and hence compromising the abstraction wicket provides..


Johan Compagner wrote:


if there is no session
do you already want to store something?

On Tue, Apr 15, 2008 at 3:10 AM, mfs <[EMAIL PROTECTED]> wrote:



Guys,

Please comment..

I have a non-wicket AuthenticationFilter which is intercepting all
request
to my wicket-app and checking if the request is coming in from a  
valid

user.
Basically in the url am passed over an authenticationToken (by  
another

application where the user has signed in already). Now in my
AuthenticationFilter i check if that is a valid token and if yes i  
want

to
set some attribute (isAuthenticated etc) in wicket-session, .

The problem is that the wicket session has yet not been created  
(because
this is the first request to the wicket app, intercepted by the  
filter),

and
hence i get this error "you can only locate or create sessions in  
the

context of a request cycle", when i try do a Session.get().

I am already using WicketSessionFilter which would expose my wicket
session
to my non-wicket filter. The problem is just for the first  
request, where

a
wicket session yet doesnt exist.

I am thinking of using HttpSession directly in my filter and store  
all

the
session data there, but before i do so, i thought to check if  
anyone has

a
better work around, ideally i would want to avoid using it.

Thanks in advance

Farhan
--
View this message in context:
http://www.nabble.com/Can-only-locate-or-create-session-in-the-context-of-a-request-cycle.-tp16693084p16693084.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/Re%3A-Can-only-locate-or-create-session-in-the-context-of-a-request-cycle.-tp16696797p16703394.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]



Re: WicketTester table testing question

2008-04-16 Thread Frank Bille
try tester.debugComponentTrees to see the components on your page.
This can help you to get the components out you want to test.

Frank

On Wed, Apr 16, 2008 at 2:33 PM, Michael Perkonigg
<[EMAIL PROTECTED]> wrote:
> Hello,
>
>  I am filling a table (it's a list of links) with some data with help of a
> Panel but all of the rows have the same wicket:id.
>  Is there a way to test if there is my value in one of the rows?
>
>  Thanks,
>  Mike
>
>
>  -
>  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]



good WicketTester info page?

2008-04-16 Thread Michael Perkonigg

Hello,

is there a page explaining what one can do with the WicketTester and how?
And yes, I already read 
http://cwiki.apache.org/WICKET/testing-pages.html it's just not very 
clear what can be done and, more important, cannot be done.


Thanks,
Mike


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



WicketTester table testing question

2008-04-16 Thread Michael Perkonigg

Hello,

I am filling a table (it's a list of links) with some data with help of 
a Panel but all of the rows have the same wicket:id.

Is there a way to test if there is my value in one of the rows?

Thanks,
Mike


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



Re: problem with menu

2008-04-16 Thread Nino Saturnino Martinez Vazquez Wael



Mathias P.W Nilsson wrote:

Thanks alot. It worked now. inspired by suckerFishPanel this is what I came
up with

  

No problem..:)

class NavigationMenuItem{


public static final String LINK_ID = "link";
private final AbstractLink link;
private final Label label;
public static final String LINK_TEXT_ID = "linktext";


public NavigationMenuItem(final AbstractLink link, final String 
strLabel,
boolean active)
{
if (link != null && !link.getId().equals(LINK_ID))
{
throw new IllegalArgumentException(
"The id must be 
NavigationMenuItem.LINK_ID");
}
this.link = link;
this.label = new Label(LINK_TEXT_ID, strLabel);
if( active )
this.link.add(new AttributeModifier("class", true, new 
Model(
"navigationLinkSelected" )));
this.link.add(this.label);
}

public NavigationMenuItem(final AbstractLink link, final String 
strLabel)
{
this( link , strLabel, false );
}

public Label getLabel(){
return this.label;
}

public AbstractLink getLink(){
return this.link;
}
}


My problem here is the active flag. If a link is active I want to set
background etc. But I really against setting a hard coded attribute in code.
Is this really the way of doing this.
  
Yeah I feel you, I thought of that aswell but didnt come up with 
anything... I think it is the only way, how else should wicket know 
about which kind of class etc you are using for active?


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



Re: Wicket + CMS

2008-04-16 Thread Martin Funk
Is that the same one you were talking about here:
http://www.nabble.com/wicket-%2B-CMS-to14895305.html#a14913697

If so, what happened to the the versioning/tagging for free?

mf

2008/4/15, Igor Vaynberg <[EMAIL PROTECTED]>:
>
> the cms matej and i are working on will be opened shortly after may
> 1st. it is based on wicket and jcr. mind you it is not meant to be a
> full-blown cms system yet, but rather a framework/library that makes
> it easy to integrate a cms system into a wicket app. the small example
> app we will provide will demonstrate a stand-alone cms. also note that
> just because we are putting the source out there on may 1st it is far
> from complete/pretty, we are doing it so early because a lot of people
> want to take a peek.
>
> -igor
>
>
> 2008/4/15 Uwe Schäfer <[EMAIL PROTECTED]>:
>
> > Jan Kriesten schrieb:
> >
> >
> >
> > > I just did something like this to have a certain panel use FreeMarker
> > templates which dynamically creates wicket:components (actually, this
> will
> > be a new CMS based on Wicket... 8 Weeks to go I suppose)!
> > >
> >
> >  go go go! people are waiting for smth like that ;)
> >
> >  i´ve 'heard' there is another CMS-like app currently being built with
> > wicket in the front-end?
> >  any details on that approach?
> >
> >  igor? :)
> >
> >
> >  cu uwe
> >  --
> >
> >  THOMAS DAILY GmbH
> >  Adlerstraße 19
> >  79098 Freiburg
> >  Deutschland
> >  T  + 49 761 3 85 59 0
> >  F  + 49 761 3 85 59 550
> >  E  [EMAIL PROTECTED]
> >  www.thomas-daily.de
> >
> >  Geschäftsführer/Managing Directors:
> >  Wendy Thomas, Susanne Larbig
> >  Handelsregister Freiburg i.Br., HRB 3947
> >
> >  Registrieren Sie sich unter http://morningnews.thomas-daily.de für die
> > kostenfreien TD Morning News, eine Auswahl aktueller Themen des Tages
> > morgens um 9:00 in Ihrer Mailbox.
> >
> >  Hinweis: Der Redaktionsschluss für unsere TD Morning News ist täglich
> um
> > 8:30 Uhr. Es werden vorrangig Informationen berücksichtigt, die nach
> 16:00
> > Uhr des Vortages eingegangen sind. Die Email-Adresse unserer Redaktion
> > lautet [EMAIL PROTECTED]
> >
> >
> >  -
> >
> >  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]
>
>


Re: problem with menu

2008-04-16 Thread Mathias P.W Nilsson

Thanks alot. It worked now. inspired by suckerFishPanel this is what I came
up with

class NavigationMenuItem{


public static final String LINK_ID = "link";
private final AbstractLink link;
private final Label label;
public static final String LINK_TEXT_ID = "linktext";


public NavigationMenuItem(final AbstractLink link, final String 
strLabel,
boolean active)
{
if (link != null && !link.getId().equals(LINK_ID))
{
throw new IllegalArgumentException(
"The id must be 
NavigationMenuItem.LINK_ID");
}
this.link = link;
this.label = new Label(LINK_TEXT_ID, strLabel);
if( active )
this.link.add(new AttributeModifier("class", true, new 
Model(
"navigationLinkSelected" )));
this.link.add(this.label);
}

public NavigationMenuItem(final AbstractLink link, final String 
strLabel)
{
this( link , strLabel, false );
}

public Label getLabel(){
return this.label;
}

public AbstractLink getLink(){
return this.link;
}
}


My problem here is the active flag. If a link is active I want to set
background etc. But I really against setting a hard coded attribute in code.
Is this really the way of doing this.
-- 
View this message in context: 
http://www.nabble.com/problem-with-menu-tp16700154p16720986.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]



SV: Wicket portles in Sun Portal

2008-04-16 Thread Wilhelmsen Tor Iver
> For b) I hope to get started on that ASAP.

Excellent news! :) 

(Since this is so significant for us I might have a go at adding the
support later this week if I can wrap my head around the source and API
docs... testing for the presence of the Portlet 2.0 API as you mentioned
is probably the best approach.)

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



Re: Updating the wicket stuff wicket-contrib-tinymce with the latest version of tinyMCE

2008-04-16 Thread wicket user
i am more than willing to do it if i have the permission to do it.

regards
-dipu



2008/4/16 Uwe Schäfer <[EMAIL PROTECTED]>:

> wicket user schrieb:
>
>
>  Can we please update the wicket-contrib-tinymce project to use the latest
> > version of tinyMCE.
> >
>
> +1
>
>  I grabbed the wicket-contrib-tinymce from the svn and updated the tinyMCE
> > files and made the changes as mentioned in the thread and it worked for
> > me
> > like a charm
> >
>
> i´m very interested in that.
> why double the effort? could you just get commit permission on that
> project or send a patch over to the maintainers?
>
> cu uwe
> --
>
> THOMAS DAILY GmbH
> Adlerstraße 19
> 79098 Freiburg
> Deutschland
> T  + 49 761 3 85 59 0
> F  + 49 761 3 85 59 550
> E  [EMAIL PROTECTED]
> www.thomas-daily.de
>
> Geschäftsführer/Managing Directors:
> Wendy Thomas, Susanne Larbig
> Handelsregister Freiburg i.Br., HRB 3947
>
> Registrieren Sie sich unter http://morningnews.thomas-daily.de für die
> kostenfreien TD Morning News, eine Auswahl aktueller Themen des Tages
> morgens um 9:00 in Ihrer Mailbox.
>
> Hinweis: Der Redaktionsschluss für unsere TD Morning News ist täglich um
> 8:30 Uhr. Es werden vorrangig Informationen berücksichtigt, die nach 16:00
> Uhr des Vortages eingegangen sind. Die Email-Adresse unserer Redaktion
> lautet [EMAIL PROTECTED]
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Updating the wicket stuff wicket-contrib-tinymce with the latest version of tinyMCE

2008-04-16 Thread Uwe Schäfer

wicket user schrieb:



Can we please update the wicket-contrib-tinymce project to use the latest
version of tinyMCE.


+1


I grabbed the wicket-contrib-tinymce from the svn and updated the tinyMCE
files and made the changes as mentioned in the thread and it worked for me
like a charm 


i´m very interested in that.
why double the effort? could you just get commit permission on that 
project or send a patch over to the maintainers?


cu uwe
--

THOMAS DAILY GmbH
Adlerstraße 19
79098 Freiburg
Deutschland
T  + 49 761 3 85 59 0
F  + 49 761 3 85 59 550
E  [EMAIL PROTECTED]
www.thomas-daily.de

Geschäftsführer/Managing Directors:
Wendy Thomas, Susanne Larbig
Handelsregister Freiburg i.Br., HRB 3947

Registrieren Sie sich unter http://morningnews.thomas-daily.de für die 
kostenfreien TD Morning News, eine Auswahl aktueller Themen des Tages 
morgens um 9:00 in Ihrer Mailbox.


Hinweis: Der Redaktionsschluss für unsere TD Morning News ist täglich um 
8:30 Uhr. Es werden vorrangig Informationen berücksichtigt, die nach 
16:00 Uhr des Vortages eingegangen sind. Die Email-Adresse unserer 
Redaktion lautet [EMAIL PROTECTED]



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



Updating the wicket stuff wicket-contrib-tinymce with the latest version of tinyMCE

2008-04-16 Thread wicket user
Hi,

Can we please update the wicket-contrib-tinymce project to use the latest
version of tinyMCE.

I would like to use the HTML Source Editor Syntax Highlighting & Word Wrap
using CodeMirror mentioned in this thread
http://tinymce.moxiecode.com/punbb/viewtopic.php?pid=31049#p31049


I grabbed the wicket-contrib-tinymce from the svn and updated the tinyMCE
files and made the changes as mentioned in the thread and it worked for me
like a charm ( doesn't work with the old version of tinyMCE ) . Can anyone
update rights please update the svn with the latest version of tinyMCE and
probably with the HTML Source Editor Syntax Highlighting using CodeMirror if
its acceptable for the maintainers of the project.


regards
-dipu


possible html parsing bug?

2008-04-16 Thread dvd
Hi:
It took me a while to find out why my iframe was not displaying properly.
I have a parent/container page like


http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
http://www.w3.org/1999/xhtml"; 
xmlns:wicket="http://wicket.apache.org/";>
...
iframe child

and the child page is like


http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
http://www.w3.org/1999/xhtml"; 
xmlns:wicket="http://wicket.apache.org/";>
...


The final rendering the html page would contain  declaration , which 
results in improper display in browser.  Once I remove the , but apparently, the presence of 

Re: Wicket + CMS

2008-04-16 Thread StephenP

Our project has tied in HippoCMS for pulling a portion of content into wicket
pages. 
I don't have many details to hand but it wasn't too hard. 
Hippo has a xml over http interface that we use to cache content, before
putting the xml elements into wicket models.

We are using hippo version 6, but I think hippo version 7 (the next version)
will be using wicket internally. I don't know if this will allow any
stronger integration with a wicket app.





Noz, Felix wrote:
> 
> Hello everybody,
>  
> I'm currently evaluating different Frontend Frameworks to use them with a
> Java-Based CMS (OpenCms) and I'm very interested in trying wicket. The CMS
> has got its own Template mechanism which is based on JSP. Because it would
> be a problem for us to throw away all existing Templates and JSP Tags my
> idea was to implement a ResourceStreamLocator that connects to the CMS via
> http and delivers the resources directly from the CMS so that the CMS is
> rather a pure persistence and template system.
> My questions are:
> 
> - Is this a passible way to connect wicket to a jsp based system?
> - Are there any better solutions?
> - Does anybody else has experience in connecting OpenCms + wicket?
> 
> Regards
> 
> i.A. Felix Noz
>  
> 
>  
> Felix Noz
> Junior IT-Berater
> Dipl. Informatiker (FH)
>  
> comundus GmbH
> Schüttelgrabenring 3, 71332 Waiblingen
>  
> Telefon +49 (0) 71 51-5 00 28-22
> Internet www.comundus.com
>  
> Geschäftsführer: Klaus Hillemeier
> Amtsgericht Stuttgart, HRB 264290
>  
> comundus ist ein Unternehmen der IT EXCELLENCE Group.
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Wicket-%2B-CMS-tp16696564p16720234.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: best strategy to add toolbar

2008-04-16 Thread Eyal Golan
hhhmmm ..
as simple as that :)

On Wed, Apr 16, 2008 at 10:13 AM, Igor Vaynberg <[EMAIL PROTECTED]>
wrote:

> afaik toolbars are panels, so just override isvisible() on the toolbar
>
> -igor
>
>
> On Tue, Apr 15, 2008 at 10:52 PM, Eyal Golan <[EMAIL PROTECTED]> wrote:
> > Hi,
> >  I have a toolbar that I want to add to my table as bottom-toolbar ONLY
> IF
> >  there are records (data-provider size >0).
> >  Here's where I put it:
> >
> > ...
> > NumRecordsToolbar numRecordsToolbar = new NumRecordsToolbar(this);
> > ...
> >
> > @Override
> > protected void onBeforeRender() {
> > if (dataProvider.size() > 0) {
> > addBottomToolbar(numRecordsToolbar);
> > }
> > super.onBeforeRender();
> > }
> >
> >  I know this is wrong as when the second time I render the page / table,
> I
> >  get an exception.
> >  I can use a boolean to mark that I already put this toolbar but it
> smells
> >  wrong to me...
> >
> >  Is there a "best practice" for that? Another method I should try?
> >  (BTW, I tried it in onComponenetTag and of course it didn't work).
> >
> >
> >  Thanks
> >
> >  --
> >  Eyal Golan
> >  [EMAIL PROTECTED]
> >
> >  Visit: http://jvdrums.sourceforge.net/
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Eyal Golan
[EMAIL PROTECTED]

Visit: http://jvdrums.sourceforge.net/


Re: Notification on session destroyed?

2008-04-16 Thread Nino Saturnino Martinez Vazquez Wael

But I guess there are no easy way todo this one..:/

Nino Saturnino Martinez Vazquez Wael wrote:
I know(hopefully session object should be GC'ed at some time), it 
really bothers me that it's such an hard thing todo, being aware of 
session state... So I just wanted an easy way.


jweekend wrote:
Using Object#finalize() for this type of thing is generally NOT a 
good idea;

it may get called much later than you would "expect", if at all.

Regards - Cemal
http://jWeekend.co.uk


Nino.Martinez wrote:
 

Thanks for the example..

I just think it feels very weird to go around wicket in order to 
achieve this, because the pojo I have are already attached to the 
wicket session(so I would have double overhead for this). However it 
could be the case that it's not simply possible from withing wicket. 
If not, it would be practical to have a method that you could 
override on wicket session called onBeforeCreate and onBeforeDestroy 
or something along those lines. Could I use finalize for this?




sander v F wrote:
   

You could also use a HttpSessionListener for knowing when a session is
destroyed. The problem is indeed that you can't get the attributes 
when

the
session is invalidated, but you can get the sessionId. So you could 
use a
Map to register the session id with the Pojo you would like to 
update. So

when the session get's destroyed you can update the Pojo.

See
http://www.stardeveloper.com/articles/display.html?article=2001112001&page=1for 


an example with the HttpSessionListener.




2008/4/16, Nino Saturnino Martinez Vazquez Wael
<[EMAIL PROTECTED]>:
   

So what do you think?

Im not sure how common a case this is ?


regards Nino

Nino Saturnino Martinez Vazquez Wael wrote:

   

Hmm, that feels a bit hacky.. Then I'll need to implement a way of
tracking sessions, and I saw something about keeping references to
destroyed
sessions arent that great.

It might be me that's just way of context(not knowing all of the
internals), but should something like this be easy todo in wicket?

Like maybe have a onDestroy or onExpire(or both?) in session class?
However I have no idea on how much overhead this would bring to
applications
that does not use the feature.


regards Nino

Johan Compagner wrote:

   
attached to a session of the session that is just 
invalided/expired?
That wont work. You cant get to a http sessions attributes when 
it is

invalidated.

To know which session id's are destroyed:

public void sessionDestroyed(String sessionId) of WebApplication

johan


On Tue, Apr 15, 2008 at 9:07 AM, Nino Saturnino Martinez Vazquez 
Wael

<
[EMAIL PROTECTED]> wrote:



   

Hi

I've checked a little around, but could not find anything 
directly.

This
is what I want todo:

When a user either logs out or expire I want to update a pojo
attached to
session.

So does anyone have an example on how todo this(if possible)?

--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684



- 


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








--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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





--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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






  




--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: Notification on session destroyed?

2008-04-16 Thread Nino Saturnino Martinez Vazquez Wael
I know(hopefully session object should be GC'ed at some time), it really 
bothers me that it's such an hard thing todo, being aware of session 
state... So I just wanted an easy way.


jweekend wrote:

Using Object#finalize() for this type of thing is generally NOT a good idea;
it may get called much later than you would "expect", if at all.

Regards - Cemal
http://jWeekend.co.uk


Nino.Martinez wrote:
  

Thanks for the example..

I just think it feels very weird to go around wicket in order to achieve 
this, because the pojo I have are already attached to the wicket 
session(so I would have double overhead for this). However it could be 
the case that it's not simply possible from withing wicket. If not, it 
would be practical to have a method that you could override on wicket 
session called onBeforeCreate and onBeforeDestroy or something along 
those lines. Could I use finalize for this?




sander v F wrote:


You could also use a HttpSessionListener for knowing when a session is
destroyed. The problem is indeed that you can't get the attributes when
the
session is invalidated, but you can get the sessionId. So you could use a
Map to register the session id with the Pojo you would like to update. So
when the session get's destroyed you can update the Pojo.

See
http://www.stardeveloper.com/articles/display.html?article=2001112001&page=1for
an example with the HttpSessionListener.




2008/4/16, Nino Saturnino Martinez Vazquez Wael
<[EMAIL PROTECTED]>:
  
  

So what do you think?

Im not sure how common a case this is ?


regards Nino

Nino Saturnino Martinez Vazquez Wael wrote:




Hmm, that feels a bit hacky.. Then I'll need to implement a way of
tracking sessions, and I saw something about keeping references to
destroyed
sessions arent that great.

It might be me that's just way of context(not knowing all of the
internals), but should something like this be easy todo in wicket?

Like maybe have a onDestroy or onExpire(or both?) in session class?
However I have no idea on how much overhead this would bring to
applications
that does not use the feature.


regards Nino

Johan Compagner wrote:

  
  

attached to a session of the session that is just invalided/expired?
That wont work. You cant get to a http sessions attributes when it is
invalidated.

To know which session id's are destroyed:

public void sessionDestroyed(String sessionId) of WebApplication

johan


On Tue, Apr 15, 2008 at 9:07 AM, Nino Saturnino Martinez Vazquez Wael
<
[EMAIL PROTECTED]> wrote:






Hi

I've checked a little around, but could not find anything directly.
This
is what I want todo:

When a user either logs out or expire I want to update a pojo
attached to
session.

So does anyone have an example on how todo this(if possible)?

--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684



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




  
  


  
  

--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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




  
  

--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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






  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: Notification on session destroyed?

2008-04-16 Thread jweekend

Using Object#finalize() for this type of thing is generally NOT a good idea;
it may get called much later than you would "expect", if at all.

Regards - Cemal
http://jWeekend.co.uk


Nino.Martinez wrote:
> 
> Thanks for the example..
> 
> I just think it feels very weird to go around wicket in order to achieve 
> this, because the pojo I have are already attached to the wicket 
> session(so I would have double overhead for this). However it could be 
> the case that it's not simply possible from withing wicket. If not, it 
> would be practical to have a method that you could override on wicket 
> session called onBeforeCreate and onBeforeDestroy or something along 
> those lines. Could I use finalize for this?
> 
> 
> 
> sander v F wrote:
>> You could also use a HttpSessionListener for knowing when a session is
>> destroyed. The problem is indeed that you can't get the attributes when
>> the
>> session is invalidated, but you can get the sessionId. So you could use a
>> Map to register the session id with the Pojo you would like to update. So
>> when the session get's destroyed you can update the Pojo.
>>
>> See
>> http://www.stardeveloper.com/articles/display.html?article=2001112001&page=1for
>> an example with the HttpSessionListener.
>>
>>
>>
>>
>> 2008/4/16, Nino Saturnino Martinez Vazquez Wael
>> <[EMAIL PROTECTED]>:
>>   
>>> So what do you think?
>>>
>>> Im not sure how common a case this is ?
>>>
>>>
>>> regards Nino
>>>
>>> Nino Saturnino Martinez Vazquez Wael wrote:
>>>
>>> 
 Hmm, that feels a bit hacky.. Then I'll need to implement a way of
 tracking sessions, and I saw something about keeping references to
 destroyed
 sessions arent that great.

 It might be me that's just way of context(not knowing all of the
 internals), but should something like this be easy todo in wicket?

 Like maybe have a onDestroy or onExpire(or both?) in session class?
 However I have no idea on how much overhead this would bring to
 applications
 that does not use the feature.


 regards Nino

 Johan Compagner wrote:

   
> attached to a session of the session that is just invalided/expired?
> That wont work. You cant get to a http sessions attributes when it is
> invalidated.
>
> To know which session id's are destroyed:
>
> public void sessionDestroyed(String sessionId) of WebApplication
>
> johan
>
>
> On Tue, Apr 15, 2008 at 9:07 AM, Nino Saturnino Martinez Vazquez Wael
> <
> [EMAIL PROTECTED]> wrote:
>
>
>
> 
>> Hi
>>
>> I've checked a little around, but could not find anything directly.
>> This
>> is what I want todo:
>>
>> When a user either logs out or expire I want to update a pojo
>> attached to
>> session.
>>
>> So does anyone have an example on how todo this(if possible)?
>>
>> --
>> -Wicket for love
>>
>> Nino Martinez Wael
>> Java Specialist @ Jayway DK
>> http://www.jayway.dk
>> +45 2936 7684
>>
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>>
>>   
>
> 
   
>>> --
>>> -Wicket for love
>>>
>>> Nino Martinez Wael
>>> Java Specialist @ Jayway DK
>>> http://www.jayway.dk
>>> +45 2936 7684
>>>
>>>
>>> -
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>> 
>>
>>   
> 
> -- 
> -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/Notification-on-session-destroyed--tp16696441p16719102.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: Notification on session destroyed?

2008-04-16 Thread Nino Saturnino Martinez Vazquez Wael

Thanks for the example..

I just think it feels very weird to go around wicket in order to achieve 
this, because the pojo I have are already attached to the wicket 
session(so I would have double overhead for this). However it could be 
the case that it's not simply possible from withing wicket. If not, it 
would be practical to have a method that you could override on wicket 
session called onBeforeCreate and onBeforeDestroy or something along 
those lines. Could I use finalize for this?




sander v F wrote:

You could also use a HttpSessionListener for knowing when a session is
destroyed. The problem is indeed that you can't get the attributes when the
session is invalidated, but you can get the sessionId. So you could use a
Map to register the session id with the Pojo you would like to update. So
when the session get's destroyed you can update the Pojo.

See
http://www.stardeveloper.com/articles/display.html?article=2001112001&page=1for
an example with the HttpSessionListener.




2008/4/16, Nino Saturnino Martinez Vazquez Wael <[EMAIL PROTECTED]>:
  

So what do you think?

Im not sure how common a case this is ?


regards Nino

Nino Saturnino Martinez Vazquez Wael wrote:



Hmm, that feels a bit hacky.. Then I'll need to implement a way of
tracking sessions, and I saw something about keeping references to destroyed
sessions arent that great.

It might be me that's just way of context(not knowing all of the
internals), but should something like this be easy todo in wicket?

Like maybe have a onDestroy or onExpire(or both?) in session class?
However I have no idea on how much overhead this would bring to applications
that does not use the feature.


regards Nino

Johan Compagner wrote:

  

attached to a session of the session that is just invalided/expired?
That wont work. You cant get to a http sessions attributes when it is
invalidated.

To know which session id's are destroyed:

public void sessionDestroyed(String sessionId) of WebApplication

johan


On Tue, Apr 15, 2008 at 9:07 AM, Nino Saturnino Martinez Vazquez Wael
<
[EMAIL PROTECTED]> wrote:





Hi

I've checked a little around, but could not find anything directly.
This
is what I want todo:

When a user either logs out or expire I want to update a pojo
attached to
session.

So does anyone have an example on how todo this(if possible)?

--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684



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




  



  

--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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





  


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



Re: Notification on session destroyed?

2008-04-16 Thread sander v F
Example:


public class PojoUpdater implements HttpSessionListener
{
private static Map pojos = new HashMap();

public void sessionCreated(HttpSessionEvent se)
{
//do nothing
}

public void sessionDestroyed(HttpSessionEvent se)
{
Object object=pojos.get(se.getSession().getId());
if(object != null)
{
// Do what you want here with the object
}
}

public static void registerPojo(String sessionId,Object object)
{
pojos.put(sessionId,object);
}
}

2008/4/16, sander v F <[EMAIL PROTECTED]>:
>
> You could also use a HttpSessionListener for knowing when a session is
> destroyed. The problem is indeed that you can't get the attributes when the
> session is invalidated, but you can get the sessionId. So you could use a
> Map to register the session id with the Pojo you would like to update. So
> when the session get's destroyed you can update the Pojo.
>
> See
> http://www.stardeveloper.com/articles/display.html?article=2001112001&page=1for
>  an example with the HttpSessionListener.
>
>
>
>
> 2008/4/16, Nino Saturnino Martinez Vazquez Wael <[EMAIL PROTECTED]>:
> >
> > So what do you think?
> >
> > Im not sure how common a case this is ?
> >
> >
> > regards Nino
> >
> > Nino Saturnino Martinez Vazquez Wael wrote:
> >
> > > Hmm, that feels a bit hacky.. Then I'll need to implement a way of
> > > tracking sessions, and I saw something about keeping references to 
> > > destroyed
> > > sessions arent that great.
> > >
> > > It might be me that's just way of context(not knowing all of the
> > > internals), but should something like this be easy todo in wicket?
> > >
> > > Like maybe have a onDestroy or onExpire(or both?) in session class?
> > > However I have no idea on how much overhead this would bring to 
> > > applications
> > > that does not use the feature.
> > >
> > >
> > > regards Nino
> > >
> > > Johan Compagner wrote:
> > >
> > > > attached to a session of the session that is just invalided/expired?
> > > > That wont work. You cant get to a http sessions attributes when it
> > > > is
> > > > invalidated.
> > > >
> > > > To know which session id's are destroyed:
> > > >
> > > > public void sessionDestroyed(String sessionId) of WebApplication
> > > >
> > > > johan
> > > >
> > > >
> > > > On Tue, Apr 15, 2008 at 9:07 AM, Nino Saturnino Martinez Vazquez
> > > > Wael <
> > > > [EMAIL PROTECTED]> wrote:
> > > >
> > > >
> > > >
> > > > > Hi
> > > > >
> > > > > I've checked a little around, but could not find anything
> > > > > directly. This
> > > > > is what I want todo:
> > > > >
> > > > > When a user either logs out or expire I want to update a pojo
> > > > > attached to
> > > > > session.
> > > > >
> > > > > So does anyone have an example on how todo this(if possible)?
> > > > >
> > > > > --
> > > > > -Wicket for love
> > > > >
> > > > > Nino Martinez Wael
> > > > > Java Specialist @ Jayway DK
> > > > > http://www.jayway.dk
> > > > > +45 2936 7684
> > > > >
> > > > >
> > > > >
> > > > > -
> > > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > >
> > >
> > --
> > -Wicket for love
> >
> > Nino Martinez Wael
> > Java Specialist @ Jayway DK
> > http://www.jayway.dk
> > +45 2936 7684
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>


  1   2   >