Re: Wicket and OSGi

2011-06-23 Thread Harald Wellmann

Am 22.06.2011 22:00, schrieb Igor Vaynberg:

If the page class in bundle A directly references the component class C from
bundle B (and not just an interface or base class of B from another bundle
X), then the bundle class loader of A can load class C by delegation.



not sure if that is true.

given Wicket lives in bundle W
we have a component bundle C which provides component CommentPanel and imports W
we have an application bundle P which provides page PostPage and imports W and C

someone does

class PostPage extends page { PostPage() { add(new CommentPanel(c)); }}

so PostPage has a reference to class CommentPanel from C
wicket serializes PostPage.
now wicket deserializes PostPage from disk. W classloader now needs to
load PostPage and CommentPanel, but it sees neither of those because
it doesnt import them.



You're right, W's classloader cannot see the class from P or C. But the 
thing is, when Wicket deserializes the page, it could use a derived 
ObjectInputStream and override resolveClass() to use the class resolver 
registered by the application.


This resolver wraps the bundle class loader P of the application, which 
is able to load both PostPage and CommentPanel.


Regards,
Harald

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



How can I enable and track tab support?

2011-06-23 Thread César Alberto Barrera
Hello!

How can I enable and track browser windows tabs support?
I need to know what page have tab1 with the app, and tab2, and so on, and
how many tabs opens has my user in session :)

Wicket 1.5 rc4

Thank you in advance.

From http://wicket.apache.org/meet/features.html
Multi-tab and multi-window support

Wicket provides an easy way to write application that supports multi-window
and multi-tab usage allowing developer to react properly when users open new
browser window or tab

-- 
César Alberto Barrera  abarrera at gmail dot com


need some advice

2011-06-23 Thread Decebal Suiu
Hello

I have some trouble with my next wicket application. I want to create a new
ecommerce application. I have the store and the admin parts. Initial, the
store and admin parts are two distinct (maven) modules and two distinct
application (war files) but I realize that it's hard to develop new
extensions with this approach.
Now, I want to merge the store and admin applications in one big application
but I have some problems. First my big problem is Authentication section
(with wicket-auth-role) because I have in store section the Customer objects
with the pair emaiAddress/password and in admin section I use User objects
with the pair username/password. My Session extends AuthenticatedWebSession
with an AuthenticationManager injected by spring. For page protection I use
@AuthorizeInstantiation. I use this annotation to protect both store and
admin pages. The problem is that
AuthenticatedWebApplication.getSignInPageClass returns one Login page and I
have two Login pages (one for store pages and one for admin pages). 
What it's the best approach for this kind of wicket application with
frontend and backend require some authentication (security) but user
entities are not the same (complete distinct tables in database)?

Any advice is welcome,
Thanks Decebal


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/need-some-advice-tp3619252p3619252.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Xforms Controls within Wicket Application

2011-06-23 Thread sramay
Hi,

Is there any means available for calling Xforms controls
within wicket application for accepting and displaying
the same.   For displaying the same there is a means.
I am finding it difficult to embed a xml input form inside a wicket
application.   If the question is childish please clarify
how it can be done.

Ramachandran S

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Xforms-Controls-within-Wicket-Application-tp3619253p3619253.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: wicket-auth-role LoggedIn cookie

2011-06-23 Thread kkee
Here is what I end up doing:

getSecuritySettings().setAuthenticationStrategy(new
DefaultAuthenticationStrategy(myLoggedIn) {
private CookieUtils cookieUtils;
@Override
protected CookieUtils getCookieUtils() {
if (cookieUtils == null) {
CookieDefaults cookie = new 
CookieDefaults();
cookie.setMaxAge(30*60); // 30 mins
cookieUtils = new CookieUtils(cookie);
}
return cookieUtils;
}
});



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/wicket-auth-role-LoggedIn-cookie-tp3617827p3619033.html
Sent from the Users forum mailing list archive at Nabble.com.

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



wicket-auth-role LoggedIn cookie

2011-06-23 Thread kkee
In 1.5-RC4.2, wicket-auth-role sign in procedure sets a cookie called
LoggedIn that expires in a month. This seems to allow the user to be
signed in to the application for a month even though the session has
expired. How can i change this cookie's timeout or prevent it from being
set?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/wicket-auth-role-LoggedIn-cookie-tp3617827p3617827.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: CSS Change not being picked up when using TextTemplateResourceReference

2011-06-23 Thread Andrea Del Bene
Maybe is easier than this.try to override method newResource in 
TextTemplateResourceReference like this:


@Override
protected Resource newResource()
{
return new Resource()
{
private static final long serialVersionUID = 1L;

@Override
public IResourceStream getResourceStream()
{
textTemplate = new PackagedTextTemplate(getScope(), 
getName());


final String stringValue = 
textTemplate.asString(variablesModel.getObject());
variablesModel.detach(); // We're done with the model 
so detach it!
return new StringResourceStream(stringValue, 
textTemplate.getContentType());

}
};
}

Essentially this code create a new PackagedTextTemplate each time the 
resource is needed and should reload css file.



It's too bad it's not as simple as
   if
(Application.get().getConfigurationType().equalsIgnoreCase(development))
   {
 invalidate();
   }
It isn't clear to me how I might go about that but It would need to run in
something like onAfterRender()?


Andrea Del Bene wrote:

Well...is a little bit complicated but you  should call
ResourceReference's invalidate() after your pages have been rendered.
But I don't know how you should put this method call.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/CSS-Change-not-being-picked-up-when-using-TextTemplateResourceReference-tp3613064p3617675.html
Sent from the Users forum mailing list archive at Nabble.com.

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






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



Re: need some advice

2011-06-23 Thread Andrea Del Bene

HI Decebal,

you should merge User and Customer classes into a single class, or you 
can create a common super class, for example an AbstractUser. Once you 
have a single class for user's authentication, you could do a single 
login page with a checkbox to tell apart Customer users from 
administrator ones.

Hello

I have some trouble with my next wicket application. I want to create a new
ecommerce application. I have the store and the admin parts. Initial, the
store and admin parts are two distinct (maven) modules and two distinct
application (war files) but I realize that it's hard to develop new
extensions with this approach.
Now, I want to merge the store and admin applications in one big application
but I have some problems. First my big problem is Authentication section
(with wicket-auth-role) because I have in store section the Customer objects
with the pair emaiAddress/password and in admin section I use User objects
with the pair username/password. My Session extends AuthenticatedWebSession
with an AuthenticationManager injected by spring. For page protection I use
@AuthorizeInstantiation. I use this annotation to protect both store and
admin pages. The problem is that
AuthenticatedWebApplication.getSignInPageClass returns one Login page and I
have two Login pages (one for store pages and one for admin pages).
What it's the best approach for this kind of wicket application with
frontend and backend require some authentication (security) but user
entities are not the same (complete distinct tables in database)?

Any advice is welcome,
Thanks Decebal




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



Re: Wicket and OSGi

2011-06-23 Thread Igor Vaynberg
there is a jira issue with a patch. unfortunately someone has to build
the classloader that can see all bundles.

what is really needed here is someone taking the time to build a
generic serialization mechanism for osgi. wicket's serialization is
pluggable so it can be hooked into that.

-igor


On Wed, Jun 22, 2011 at 11:59 PM, Harald Wellmann
harald.wellm...@gmx.de wrote:
 Am 22.06.2011 22:00, schrieb Igor Vaynberg:

 If the page class in bundle A directly references the component class C
 from
 bundle B (and not just an interface or base class of B from another
 bundle
 X), then the bundle class loader of A can load class C by delegation.


 not sure if that is true.

 given Wicket lives in bundle W
 we have a component bundle C which provides component CommentPanel and
 imports W
 we have an application bundle P which provides page PostPage and imports W
 and C

 someone does

 class PostPage extends page { PostPage() { add(new CommentPanel(c)); }}

 so PostPage has a reference to class CommentPanel from C
 wicket serializes PostPage.
 now wicket deserializes PostPage from disk. W classloader now needs to
 load PostPage and CommentPanel, but it sees neither of those because
 it doesnt import them.


 You're right, W's classloader cannot see the class from P or C. But the
 thing is, when Wicket deserializes the page, it could use a derived
 ObjectInputStream and override resolveClass() to use the class resolver
 registered by the application.

 This resolver wraps the bundle class loader P of the application, which is
 able to load both PostPage and CommentPanel.

 Regards,
 Harald

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



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



Re: Xforms Controls within Wicket Application

2011-06-23 Thread Igor Vaynberg
a concrete example would help here. i have no idea what you are talking about.

-igor

On Thu, Jun 23, 2011 at 1:26 AM, sramay nic.sr...@gmail.com wrote:
 Hi,

 Is there any means available for calling Xforms controls
 within wicket application for accepting and displaying
 the same.   For displaying the same there is a means.
 I am finding it difficult to embed a xml input form inside a wicket
 application.   If the question is childish please clarify
 how it can be done.

 Ramachandran S

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Xforms-Controls-within-Wicket-Application-tp3619253p3619253.html
 Sent from the Users forum mailing list archive at Nabble.com.

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



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



Re: How can I enable and track tab support?

2011-06-23 Thread Igor Vaynberg
the page versioning changes in 1.5 allows this to Just Work without
the developer having to know anything about it.

if you want to track this you can create a simple ajax callback
behavior that checks for window.tabid variable and if its not set sets
it to something and callsback to the page using ajax.

this way, you will get callbacks on every new tab and can track it.

-igor


On Thu, Jun 23, 2011 at 1:14 AM, César Alberto Barrera
abarr...@gmail.com wrote:
 Hello!

 How can I enable and track browser windows tabs support?
 I need to know what page have tab1 with the app, and tab2, and so on, and
 how many tabs opens has my user in session :)

 Wicket 1.5 rc4

 Thank you in advance.

 From http://wicket.apache.org/meet/features.html
 Multi-tab and multi-window support

 Wicket provides an easy way to write application that supports multi-window
 and multi-tab usage allowing developer to react properly when users open new
 browser window or tab

 --
 César Alberto Barrera  abarrera at gmail dot com


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



Re: Wicket and OSGi

2011-06-23 Thread Harald Wellmann

Am 23.06.2011 18:48, schrieb Igor Vaynberg:

there is a jira issue with a patch.


That's probably the one that Martin mentioned:
https://issues.apache.org/jira/browse/WICKET-3737



unfortunately someone has to build
the classloader that can see all bundles.




what is really needed here is someone taking the time to build a
generic serialization mechanism for osgi. wicket's serialization is
pluggable so it can be hooked into that.



I'll take a look at the patches, play around with the code and find out 
if I'm one the wrong track or not... If I end up with anything 
interesting enough, I'll get back or attach another patch.


Thanks,
Harald


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



Re: Wicket and OSGi

2011-06-23 Thread Martin Grigorov
Thank you, Harald!

Not sure which version of Wicket you use but I'd be happy to support
you for 1.5.

On Thu, Jun 23, 2011 at 8:11 PM, Harald Wellmann harald.wellm...@gmx.de wrote:
 Am 23.06.2011 18:48, schrieb Igor Vaynberg:

 there is a jira issue with a patch.

 That's probably the one that Martin mentioned:
 https://issues.apache.org/jira/browse/WICKET-3737


 unfortunately someone has to build
 the classloader that can see all bundles.


 what is really needed here is someone taking the time to build a
 generic serialization mechanism for osgi. wicket's serialization is
 pluggable so it can be hooked into that.


 I'll take a look at the patches, play around with the code and find out if
 I'm one the wrong track or not... If I end up with anything interesting
 enough, I'll get back or attach another patch.

 Thanks,
 Harald


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





-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



regarding wicketstuff push

2011-06-23 Thread vineet semwal
hellos !

i was just looking at wicketstuff push and i saw a lot of changes in
api and other improvements are done ,thanks for all that ! :)
as very new to the new push, could not understand the below channel
creation call..

 public EventType IPushChannelEventType createChannel(final
EventType event,final String label)

why does a new channel creation needs event ?

i have also looked at the code i noticed event is just not used in
the channel creation method in AbstractPushService :|

i think method declaration can be improved or may be i am missing something ??



-- 
thank you,

regards,
Vineet Semwal

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



Re: Wicket and OSGi

2011-06-23 Thread Brian Topping

On Jun 23, 2011, at 10:11 AM, Harald Wellmann wrote:

 what is really needed here is someone taking the time to build a
 generic serialization mechanism for osgi. wicket's serialization is
 pluggable so it can be hooked into that.
 
 
 I'll take a look at the patches, play around with the code and find out if 
 I'm one the wrong track or not... If I end up with anything interesting 
 enough, I'll get back or attach another patch.

I'm also taking a look at it.
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: regarding wicketstuff push

2011-06-23 Thread Sebastian

hi vineet,

you are right. this is probably a left over from the refactoring we did. 
I just fixed it on github.


regards,

seb

On 23.06.2011 22:58, vineet semwal wrote:

hellos !

i was just looking at wicketstuff push and i saw a lot of changes in
api and other improvements are done ,thanks for all that ! :)
as very new to the new push, could not understand the below channel
creation call..

  publicEventType  IPushChannelEventType  createChannel(final
EventType event,final String label)

why does a new channel creation needs event ?

i have also looked at the code i noticed event is just not used in
the channel creation method in AbstractPushService :|

i think method declaration can be improved or may be i am missing something ??







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



Re: Wicket and OSGi

2011-06-23 Thread Igor Vaynberg
something else to consider - where this gets even hairier :)

user accesses a page that has a component from bundle A, the page is serialized.
admin upgrades bundle A which has a new version of the component -
that is not compatible serialization-wise
user click back and the page needs to be serialized - error

what is needed here i some way to veto a bundle/version removal until
all web sessions that access components in those bundles have timed
out. this is not really wicket-specific, more web specific as web apps
can stick objects into http session...

-igor


On Thu, Jun 23, 2011 at 4:30 PM, Brian Topping topp...@codehaus.org wrote:

 On Jun 23, 2011, at 10:11 AM, Harald Wellmann wrote:

 what is really needed here is someone taking the time to build a
 generic serialization mechanism for osgi. wicket's serialization is
 pluggable so it can be hooked into that.


 I'll take a look at the patches, play around with the code and find out if 
 I'm one the wrong track or not... If I end up with anything interesting 
 enough, I'll get back or attach another patch.

 I'm also taking a look at it.
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org



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



Re: Wicket and OSGi

2011-06-23 Thread Brian Topping
Good point.  This could be handled by the serializer maintaining a WeakHashMap 
of the sessions that use a particular bundle and blocking in the bundle 
activator's stop method until the list is empty.  

But if a user was busy for an extended period, like some kind of automated 
scraper or monitor that ended up having the session open for days, the check 
would have to be more granular than the session.  Which seems like it's going 
to be different between 1.4 and 1.5 because of the migration from pagemaps.  
 
On Jun 23, 2011, at 4:41 PM, Igor Vaynberg wrote:

 something else to consider - where this gets even hairier :)
 
 user accesses a page that has a component from bundle A, the page is 
 serialized.
 admin upgrades bundle A which has a new version of the component -
 that is not compatible serialization-wise
 user click back and the page needs to be serialized - error
 
 what is needed here i some way to veto a bundle/version removal until
 all web sessions that access components in those bundles have timed
 out. this is not really wicket-specific, more web specific as web apps
 can stick objects into http session...
 
 -igor
 
 
 On Thu, Jun 23, 2011 at 4:30 PM, Brian Topping topp...@codehaus.org wrote:
 
 On Jun 23, 2011, at 10:11 AM, Harald Wellmann wrote:
 
 what is really needed here is someone taking the time to build a
 generic serialization mechanism for osgi. wicket's serialization is
 pluggable so it can be hooked into that.
 
 
 I'll take a look at the patches, play around with the code and find out if 
 I'm one the wrong track or not... If I end up with anything interesting 
 enough, I'll get back or attach another patch.
 
 I'm also taking a look at it.
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 


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



Re: Wicket and OSGi

2011-06-23 Thread Igor Vaynberg
i think the frameworks should track this. this way wicket can track
what it is serializing and when it is letting it go. jetty can keep
track of what it has in its http session.

the serialization bundle should provide a way for bundles to tell it
i am holding on to class A from bundle B and i no longer care about
class C from bundle D

-igor

On Thu, Jun 23, 2011 at 6:48 PM, Brian Topping topp...@codehaus.org wrote:
 Good point.  This could be handled by the serializer maintaining a 
 WeakHashMap of the sessions that use a particular bundle and blocking in the 
 bundle activator's stop method until the list is empty.

 But if a user was busy for an extended period, like some kind of automated 
 scraper or monitor that ended up having the session open for days, the check 
 would have to be more granular than the session.  Which seems like it's going 
 to be different between 1.4 and 1.5 because of the migration from pagemaps.

 On Jun 23, 2011, at 4:41 PM, Igor Vaynberg wrote:

 something else to consider - where this gets even hairier :)

 user accesses a page that has a component from bundle A, the page is 
 serialized.
 admin upgrades bundle A which has a new version of the component -
 that is not compatible serialization-wise
 user click back and the page needs to be serialized - error

 what is needed here i some way to veto a bundle/version removal until
 all web sessions that access components in those bundles have timed
 out. this is not really wicket-specific, more web specific as web apps
 can stick objects into http session...

 -igor


 On Thu, Jun 23, 2011 at 4:30 PM, Brian Topping topp...@codehaus.org wrote:

 On Jun 23, 2011, at 10:11 AM, Harald Wellmann wrote:

 what is really needed here is someone taking the time to build a
 generic serialization mechanism for osgi. wicket's serialization is
 pluggable so it can be hooked into that.


 I'll take a look at the patches, play around with the code and find out if 
 I'm one the wrong track or not... If I end up with anything interesting 
 enough, I'll get back or attach another patch.

 I'm also taking a look at it.
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org



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




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



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