Authentication and sessions - the right way?

2011-10-03 Thread Zeldor
Hi,

I have a problem with designing authentication and session properly. I asked
for help some time ago, but I was not able to fix the problem.

I have a standard situation - I have an app that has bunch of pages and only
main page with login form should be accessible for everyone. Everything else
should be available after you log in. And some technical pages that should
be accessible for admins only.

So I want AuthenticatedApplication and AuthenticatedWebSession. I set main
page with login form in Application as the page that does not need
authentication. Then someone enters proper credentials and I set in Session
username [key] and whole User entity (transient) with proper role.

It all works fine on my computer, but when I deploy it, it stops working.
Session gets detached on the way and I cannot fetche the data to my models.
Yes, I keep user data in my session, I could do it with datastore queries,
but session is better solution on AppEngine. And problem would still be the
same pretty much.
There are 2 problems, which I don't really understand:

1. Session gets detached - where is it explained when and why it happens?
How should I properly initialise it? I thought that making
MySession.get().(...) would be enough... When user logs in, I do
MySession.get().setUser(...). Then user gets redirected to main app page,
where there are labels to display data
(MySession.get().getUser().getValueX(). Where is my mistake?

2. How to fetch data from Guice in Session? I have a RepositoryUser
Inject, but when it is used in Session it throws nullpointer exception.
Should I have it in session at all? I guess repopulating user data like that
is not the best idea, I should probably just redirect him to login page
again, if session somehow losses data.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Authentication-and-sessions-the-right-way-tp3866840p3866840.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: Authentication and sessions - the right way?

2011-10-03 Thread Carl-Eric Menzel
On Mon, 3 Oct 2011 00:54:31 -0700 (PDT)
Zeldor pgronkiew...@gmail.com wrote:

 It all works fine on my computer, but when I deploy it, it stops
 working. Session gets detached on the way and I cannot fetche the
 data to my models. Yes, I keep user data in my session, I could do it
 with datastore queries, but session is better solution on AppEngine.
 And problem would still be the same pretty much.
 There are 2 problems, which I don't really understand:

Can you show the relevant code?

Carl-Eric
www.wicketbuch.de

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



Re: Authentication and sessions - the right way?

2011-10-03 Thread Carl-Eric Menzel
On Mon, 3 Oct 2011 00:54:31 -0700 (PDT)
Zeldor pgronkiew...@gmail.com wrote:

 2. How to fetch data from Guice in Session? I have a RepositoryUser
 Inject, but when it is used in Session it throws nullpointer
 exception. Should I have it in session at all? I guess repopulating
 user data like that is not the best idea, I should probably just
 redirect him to login page again, if session somehow losses data.

Only components get automatic injection - to have the injection work in
session, put this in your Session constructor:

InjectorHolder.getInjector().inject(this);

Or for 1.5:

Injector.get().inject(this);

Carl-Eric
www.wicketbuch.de

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



Re: Authentication and sessions - the right way?

2011-10-03 Thread Zeldor
But would it be possible to store User data in the session without having to
fetch it from datastore on every request? My users don't interact with each
other and they operate only on their own data. So it'd be most efficient to
store User data in the session and interact with db only when some data is
changed. 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Authentication-and-sessions-the-right-way-tp3866840p3866866.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: Authentication and sessions - the right way?

2011-10-03 Thread Martin Grigorov
On Mon, Oct 3, 2011 at 10:10 AM, Zeldor pgronkiew...@gmail.com wrote:
 But would it be possible to store User data in the session without having to
 fetch it from datastore on every request? My users don't interact with each
 other and they operate only on their own data. So it'd be most efficient to
 store User data in the session and interact with db only when some data is
 changed.
Only the first get for a request will fetch it from the DB, all
following gets will re-use the fetched User instance.

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Authentication-and-sessions-the-right-way-tp3866840p3866866.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





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



Re: Authentication and sessions - the right way?

2011-10-03 Thread Zeldor
So it's normal that I lose User data when I move from login to main page and
I will have to fetch it from db quite often.

When will it happen? I have users browsing around my app, doing most often
nothing. Plenty of labels with gets. Will browsing like that trigger
fetching user data from db? Or will that data be served from cache? 

Whenever anything changes data will be stored in db and page will reload.
Will it fetch data from db again or serve them from cache?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Authentication-and-sessions-the-right-way-tp3866840p3866875.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: Authentication and sessions - the right way?

2011-10-03 Thread Carl-Eric Menzel
On Mon, 3 Oct 2011 01:10:58 -0700 (PDT)
Zeldor pgronkiew...@gmail.com wrote:

 But would it be possible to store User data in the session without
 having to fetch it from datastore on every request? My users don't
 interact with each other and they operate only on their own data. So
 it'd be most efficient to store User data in the session and interact
 with db only when some data is changed. 

Yes, just put a field in your Session and add getter/setter.

Carl-Eric
www.wicketbuch.de

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



Re: Authentication and sessions - the right way?

2011-10-03 Thread Marco Springer

I sort of use the same thing, storing the user in the Session.

Only I store a LoadableDetachableModel in the Session, representing the  
user.
In my scenario, the LDM is a custom Model and the key identifier is a Long  
number, but that shouldn't be a difference.

And the injection happens in the LDM as well.

This works fine in both development  deployment mode.

And if any data is updated in the database, Hibernate is smart enough to  
detect the changes and serves the latest data from the database. If no  
changes occurred, a cache call is made.



On Mon, 03 Oct 2011 10:19:28 +0200, Zeldor pgronkiew...@gmail.com wrote:

So it's normal that I lose User data when I move from login to main page  
and

I will have to fetch it from db quite often.

When will it happen? I have users browsing around my app, doing most  
often

nothing. Plenty of labels with gets. Will browsing like that trigger
fetching user data from db? Or will that data be served from cache?

Whenever anything changes data will be stored in db and page will reload.
Will it fetch data from db again or serve them from cache?

--
View this message in context:  
http://apache-wicket.1842946.n4.nabble.com/Authentication-and-sessions-the-right-way-tp3866840p3866875.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




--
Using Opera's revolutionary email client: http://www.opera.com/mail/

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



Re: Authentication and sessions - the right way?

2011-10-03 Thread Martin Grigorov
On Mon, Oct 3, 2011 at 10:24 AM, Carl-Eric Menzel cmen...@wicketbuch.de wrote:
 On Mon, 3 Oct 2011 01:10:58 -0700 (PDT)
 Zeldor pgronkiew...@gmail.com wrote:

 But would it be possible to store User data in the session without
 having to fetch it from datastore on every request? My users don't
 interact with each other and they operate only on their own data. So
 it'd be most efficient to store User data in the session and interact
 with db only when some data is changed.

 Yes, just put a field in your Session and add getter/setter.
This is not good.
This is error prone. This way you'll have to keep the instance in the
Session in sync with the data DB. Additionally the memory size will
increase for no reason. Select by primary key (user id) is fast
operation.

 Carl-Eric
 www.wicketbuch.de

 -
 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



Re: Authentication and sessions - the right way?

2011-10-03 Thread Zeldor
Marco:

And it works without problems? There is no issue with user trying to log
from 2 browser on same time, trying to cheat the system? I am just wondering
if there is any risk of that. 
How does your code look then in session and how do you fetch your data? 

Martin:

I was trying to save on costs, where on AppEngine you are billed for every
DB query, while memcache is pretty much free. Is it really hard to keep
session data in sync? Only that user can modify his data.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Authentication-and-sessions-the-right-way-tp3866840p3866906.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: Authentication and sessions - the right way?

2011-10-03 Thread Carl-Eric Menzel
On Mon, 3 Oct 2011 10:31:38 +0200
Martin Grigorov mgrigo...@apache.org wrote:


  Yes, just put a field in your Session and add getter/setter.
 This is not good.
 This is error prone. This way you'll have to keep the instance in the
 Session in sync with the data DB. Additionally the memory size will
 increase for no reason. Select by primary key (user id) is fast
 operation.

That depends on what you're doing. One possibility is that it's mostly
read-only data, then it can be a speed boost to just keep that stuff in
the session.

Of course, if you have writes all over the place, then that could
become messy. An alternative could be a model implementation that reads
from the session and updates both session and DB on a write. That would
basically be a cache then.

Selecting by user id is *probably* fast, but it depends on what other
data needs to be joined to it. It might also be a more costly operation.

Carl-Eric
www.wicketbuch.de

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



Re: Authentication and sessions - the right way?

2011-10-03 Thread Martin Grigorov
On Mon, Oct 3, 2011 at 10:41 AM, Zeldor pgronkiew...@gmail.com wrote:
 Marco:

 And it works without problems? There is no issue with user trying to log
 from 2 browser on same time, trying to cheat the system? I am just wondering
 if there is any risk of that.
 How does your code look then in session and how do you fetch your data?

 Martin:

 I was trying to save on costs, where on AppEngine you are billed for every
 DB query, while memcache is pretty much free. Is it really hard to keep
 session data in sync? Only that user can modify his data.
Then just tell your Repository to ask first Memcache and if there is a
miss then the actual DB.

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Authentication-and-sessions-the-right-way-tp3866840p3866906.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





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



Re: Authentication and sessions - the right way?

2011-10-03 Thread Marco Springer

Each browser opens up a new session, that's no actual problem.
Sessions are pretty thread safe (correct me if I'm wrong) when they're  
accessed from request threads (normal Wicket application flow).
If Browser #1 changes something to user data or some other db data, and  
Browser #2 fires a new request, the data is instantly reloaded for that  
Browser #2.
Though a problem would be if both instances submit the same type of data,  
the last request performed is the one that's stored.
Although there are techniques to overcome this problem as well. Something  
like:  
http://docs.jboss.org/hibernate/core/3.5/reference/en/html/transactions.html#transactions-optimistic-manual


Some sample code (don't mind the fake names and I simplified the code to  
just show the necessary):

public class CustomSessionT extends ModelObject extends WebSession {
  private GenericDetachableModelT credentialLDM; // T as the user can be  
of 2 object types in our situation

  public static CustomSession get() {
return (CustomSession) Session.get();
  }

  public void setUser(GenericDetachableModelT credentialLDM) {
this.credentialLDM = credentialLDM;
  }

  public synchronized GenericDetachableModelT getUser() {
return credentialLDM;
  }
}

And in the code where I need the user object I just make a call to:  
CustomSession.get().getUser().getObject();
This will always retrieve the latest user instance in the database and is  
valid during a complete Request.
And just as Martin said, put a memcache in between and the database  
requests are minimized, if not already loaded from the Hibernate cache.


The LDM would be like:
public class GenericDetachableModelT extends ModelObject extends  
LoadableDetachableModelT {


  @SpringBean(name = service)
  private Service service;

  public GenericDetachableModel(T entity) {
this.entityId = entity.getId();

if (entity instanceof HibernateProxy) {
  this.entityClass =
  (Class) ((HibernateProxy)  
entity).getHibernateLazyInitializer().getImplementation().getClass();

} else {
  this.entityClass = (Class) entity.getClass();
}

InjectorHolder.getInjector().inject(this);
  }

  @Override
  protected T load() {
return service.getObject(entityClass, entityId);
  }
}

I do have some more session functionality to mingle with the user object,  
but they are not important in this matter.



On Mon, 03 Oct 2011 10:41:15 +0200, Zeldor pgronkiew...@gmail.com wrote:


Marco:

And it works without problems? There is no issue with user trying to log
from 2 browser on same time, trying to cheat the system? I am just  
wondering

if there is any risk of that.
How does your code look then in session and how do you fetch your data?

Martin:

I was trying to save on costs, where on AppEngine you are billed for  
every

DB query, while memcache is pretty much free. Is it really hard to keep
session data in sync? Only that user can modify his data.

--
View this message in context:  
http://apache-wicket.1842946.n4.nabble.com/Authentication-and-sessions-the-right-way-tp3866840p3866906.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




--
Using Opera's revolutionary email client: http://www.opera.com/mail/

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



Re: Ajax : Modifying CallBackUrl in OnEvent()

2011-10-03 Thread Andrea Del Bene

Hi,

when onEvent is triggered the callback script has been already executed, 
so it's too late to re-generate it. Maybe I didn't understand right your 
problem.

Hi,
I have an overridden the
AbstractDefaultAjaxBehavior.getCallbackScript(boolean onlyTargetActivePage)
method.

I have also overridden the AjaxEventBehavior.onEvent().
In the onEvent(AjaxRequestTarget) I want to re-generate the Callback Script
(replace original one with new one), how can I do that. Once generated am
unable to change it using the target object.

thanks.



-
Software documentation is like sex: when it is good, it is very, very good; and 
when it is bad, it is still better than nothing!
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Ajax-Modifying-CallBackUrl-in-OnEvent-tp3863397p3863397.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: Redering to to file in wicket1.5

2011-10-03 Thread Marco
public String renderTemplate(WebPage webPage) {
BufferedWebResponse bufferedWebResponse = new BufferedWebResponse(null);
webPage.getRequestCycle().setResponse(bufferedWebResponse);
webPage.render();

return bufferedWebResponse.getText().toString();
}

Martin, it's the solution we discussed earlier at
http://apache-wicket.1842946.n4.nabble.com/Render-WebPage-to-String-in-Wicket-1-5-td3622130.html

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Redering-to-to-file-in-wicket1-5-tp3854891p3867079.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: Redering to to file in wicket1.5

2011-10-03 Thread Martin Grigorov
On Mon, Oct 3, 2011 at 12:39 PM, Marco ma...@mkconsultancy.nl wrote:
 public String renderTemplate(WebPage webPage) {
        BufferedWebResponse bufferedWebResponse = new 
 BufferedWebResponse(null);
        webPage.getRequestCycle().setResponse(bufferedWebResponse);
        webPage.render();

        return bufferedWebResponse.getText().toString();
 }

 Martin, it's the solution we discussed earlier at
 http://apache-wicket.1842946.n4.nabble.com/Render-WebPage-to-String-in-Wicket-1-5-td3622130.html\
Yes, I'm going to create an example in wicket-examples like the one
for 1.4 at http://wicketstuff.org/wicket14/staticpages/ and another
one with TextTemplate because most of the time this email template is
actually static markup with dynamically generated urls inside.

Will be part of https://issues.apache.org/jira/browse/WICKET-4095

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Redering-to-to-file-in-wicket1-5-tp3854891p3867079.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





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



Re: What is the right way to identify the second login for the same user?

2011-10-03 Thread vineet semwal
you can store sessionid corresponding to a particular user ,
if he tries to login from different browser,you can retrieve the
previous session by session id
 kill the old session when the user logs in from different browser...

1) sessionid=findsessionbyuserid()
2)application.sessionUnbound(sessionid)

On Mon, Oct 3, 2011 at 7:30 PM, donx...@yahoo.com donx...@yahoo.com wrote:
 Please provide your advice about what is the easiest way to identify the
 second time user login for same user.

 User login in one machine and one session is created.
 User go to another machine and login again. The system create a another
 session for the same user and there are two sessions associated with the
 user.

 What is the best way to identify the second time login for this user and
 kill the first session?  The application has Wicket Page and Ajax page or
 link also.


 Thanks in advance.



 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/What-is-the-right-way-to-identify-the-second-login-for-the-same-user-tp3867590p3867590.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





-- 
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: What is the right way to identify the second login for the same user?

2011-10-03 Thread Christian Huber

I might be wrong, but this does not seem like a Wicket related problem.

Here a spontaneous idea what I would try:

To track sessions of a user I would try to use a database table that 
associates sessions with users and a boolean flag isvalid.
A new session would have to create an entry in that table with isvalid 
set to true and in the same transaction find all existing entries for 
the same entries to set isvalid in those records to false.
For every request a session would have to check in that table if it is 
still valid and if not invalidate itself and delete the record (probably 
best done in onBeginRequest of IRequestCycleHandler). Also when a 
session times out the corresponding record has to be deleted (probably 
best done in sessionUnbound in WebApplication).


Not sure if that is the best way, but at the moment that is the only way 
that comes to my mind. Hopefully this gives you an idea where to start.


Cheers, Chris


The Sanity Resort http://sanityresort.blogspot.com/

Am 03.10.2011 16:00, schrieb donx...@yahoo.com:

Please provide your advice about what is the easiest way to identify the
second time user login for same user.

User login in one machine and one session is created.
User go to another machine and login again. The system create a another
session for the same user and there are two sessions associated with the
user.

What is the best way to identify the second time login for this user and
kill the first session?  The application has Wicket Page and Ajax page or
link also.


Thanks in advance.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/What-is-the-right-way-to-identify-the-second-login-for-the-same-user-tp3867590p3867590.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: Does PagingNavigation render the entire page and would AjaxPagingNavigation render only its assigned pageableView?

2011-10-03 Thread Bruno Borges
Could you provide some snippet of your code?

Have you setOutputMarkupId on your PageableListView?

*Bruno Borges*
(21) 7672-7099
*www.brunoborges.com*



On Wed, Sep 28, 2011 at 9:27 AM, Martin A wml...@gmail.com wrote:

 Thanks, but strangely, clicking on a AjaxNavigationLink returns empty
 response. Do you have any ideas why this happens?

 Thanks!

 On Wed, Sep 28, 2011 at 3:01 PM, Martin Grigorov mgrigo...@apache.org
 wrote:

  yes. this is how it works
 
  On Wed, Sep 28, 2011 at 1:54 PM, Martin A wml...@gmail.com wrote:
   Hello,
   I've got a PagingNavigation on a PageableListView, contained in a
 parent
   Page. To me it looks like it renders the whole page when paging its
  assigned
   pageableView. I would like to know if AjaxPagingNavigation would
 refresh
   only its assigned pageableView, because there are other components on
 the
   page that I wouldn't like to get rendered?
  
   Thank you,
   Martin
  
 
 
 
  --
  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
 
 



Re: Show feedback message from modal window in parent page

2011-10-03 Thread heapifyman
In the ModalWindow I have an AjaxButton in whose onSubmit method I
call ModalWindow.closeCurrent(target);

Is that not the right way to go?


2011/9/30 Dan Retzlaff dretzl...@gmail.com

 Each FeedbackPanel rendered in a response includes all messages generated
 during that request. The messages are then cleared from the session and
 won't be included in subsequent responses. Are you closing the modal in a
 way that immediately generates a second request?

 Dan

 On Fri, Sep 30, 2011 at 9:02 AM, heapifyman heapify...@gmail.com wrote:

  Hello,
 
  I have a page that contains a list of entries and a modal window opened
  from
  that page. The modal window contains a form to add new entries to the
 list
  on the parent page.
  Submitting the form in the modal window adds the new entry, closes the
  modal
  window and updates the list of entries in the parent page.
  This works fine.
  However, I would like to show a success message on the parent page
 after
  I
  submit the form in the modal window and close it.
  This does not seem to work because I have another FeedbackPanel in the
  modal
  window for showing error messages when required fields are not filled.
  This FeedbackPanel in the modal window seems to receive the success
 message
  instead of the FeedbackPanel on the parent page.
 
  I tried google and I also tried using an IFeedbackMessageFilter on the
  modal
  window's FeedbackPanel, but to no avail.
  Any hints would be appreciated. Thanks
 



Re: Show feedback message from modal window in parent page

2011-10-03 Thread Dan Retzlaff
We use our own modal window class so I'm not sure what the best way to go
is. But I can probably explain what's happening. The onSubmit request
renders the feedback into the modal, then clears the messages from the
session. Then in a separate close button callback request you're
re-rendering the page-level FeedbackPanel but at that point the feedback
messages are gone.

On Mon, Oct 3, 2011 at 8:44 AM, heapifyman heapify...@gmail.com wrote:

 In the ModalWindow I have an AjaxButton in whose onSubmit method I
 call ModalWindow.closeCurrent(target);

 Is that not the right way to go?


 2011/9/30 Dan Retzlaff dretzl...@gmail.com

  Each FeedbackPanel rendered in a response includes all messages generated
  during that request. The messages are then cleared from the session and
  won't be included in subsequent responses. Are you closing the modal in a
  way that immediately generates a second request?
 
  Dan
 
  On Fri, Sep 30, 2011 at 9:02 AM, heapifyman heapify...@gmail.com
 wrote:
 
   Hello,
  
   I have a page that contains a list of entries and a modal window opened
   from
   that page. The modal window contains a form to add new entries to the
  list
   on the parent page.
   Submitting the form in the modal window adds the new entry, closes the
   modal
   window and updates the list of entries in the parent page.
   This works fine.
   However, I would like to show a success message on the parent page
  after
   I
   submit the form in the modal window and close it.
   This does not seem to work because I have another FeedbackPanel in the
   modal
   window for showing error messages when required fields are not filled.
   This FeedbackPanel in the modal window seems to receive the success
  message
   instead of the FeedbackPanel on the parent page.
  
   I tried google and I also tried using an IFeedbackMessageFilter on the
   modal
   window's FeedbackPanel, but to no avail.
   Any hints would be appreciated. Thanks
  
 



Wicket Wizard -- how to force a wizardstep to redraw or refresh

2011-10-03 Thread bad boy
Hi

I have a wicket wizard with 5 steps and in the confirmation  step, I have a 
panel which contains 3 Fragments.

This panel will render one of these fragments based on the  state of the Model. 
The problem is the that this panel is getting cached wen the wizard model is 
initialized .

Is it possible to force the wizard step which contains this panel to reload or 
refresh.


// this is the wizard step
  */
    public AlertQryConfirmationStep(final IModelAlertBean abModel) {
        setDefaultModel(abModel);
        
        
        setTitleModel(new ResourceModel(confirmation.title));
       add(new QryDisplayPanel(qryDisplayPanel, abModel));
        
       


    }



// this is the pane code
   public QryDisplayPanel(String idm, IModelAlertBean abModel) {

        super(idm);
        logger.info(QryDisplayPanel -- -- QryType :  + 
abModel.getObject().getQryType());
        setDefaultModel(abModel);

        if (abModel.getObject().getQryType() == 1) {
            add(new EasyQueryFragment(querySpan, easyQueryFragment, 
abModel));
        } else if (abModel.getObject().getQryType() == 2) {
            add(new AdvancedQueryFragment(querySpan, advancedQueryFragment, 
abModel));
        } else if (abModel.getObject().getQryType() == 3) {
            add(new LuQueryFragment(querySpan, luQueryFragment, abModel));
        } else {
            add(new EmptyPanel(querySpan));
        }
    }


Thanks for your hep

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



Re: What is the right way to identify the second login for the same user?

2011-10-03 Thread vineet semwal
in a non wicket request ,you will have a non wicket session ..
is your this question related to previous question?

for a wicketsession there is a httpsession ,cant exist without it,when
you will invalidate the session like in previous case
both will get invalidated ..



On Mon, Oct 3, 2011 at 9:19 PM, donx...@yahoo.com donx...@yahoo.com wrote:
 Vineet,

 Thanks for the help.

 I also need to handle non Wicket Request.  Is the session is Wicket Session
 or HttpSession?


 Thanks

 Don


 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/What-is-the-right-way-to-identify-the-second-login-for-the-same-user-tp3867590p3867889.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





-- 
thank you,

regards,
Vineet Semwal

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



Incorrect resource urls when 404 occurs

2011-10-03 Thread Russell Pitre
Hi-

Just upgraded to 1.5.1 from 1.4.18 and was not seeing this behavior
described below.

In our application, the Wicket filter and error page is setup in the web.xml
like so:

filter-mapping
filter-namewicket.filter/filter-name
url-pattern/app/*/url-pattern
dispatcherREQUEST/dispatcher
dispatcherERROR/dispatcher
/filter-mapping
 error-page
error-code404/error-code
location/app/404/location
/error-page


In my WicketApplication class I am mounting the 404 [ *mountPage(404,
Error404Page.class);* ] so that I can use the Wicket page as my 404 page.
When I visit a non-existent page to invoke a 404, it looks like the CSS
resource URLs are not being built by Wicket correctly. Using fiddler, here's
what I see on a normal page:

Good:

http://localhost:8080/app/wicket/resource/org.eer.web.component.menu.MenuPanel/css/menu-ver-1317665980363.css
http://localhost:8080/app/wicket/resource/org.eer.web.component.menu.MenuPanel/css/menu-skin-ver-1317665980360.css
http://localhost:8080/app/wicket/resource/org.eer.web.component.menu.MenuPanel/js/superfish-ver-1317665980369.js
http://localhost:8080/app/wicket/resource/org.eer.web.component.menu.MenuPanel/js/menu-ver-1317665980367.js
http://localhost:8080/app/wicket/resource/org.eer.web.component.menu.MenuPanel/js/supersubs-ver-1317665980375.js
http://localhost:8080/app/wicket/resource/org.apache.wicket.devutils.debugbar.DebugBar/wicket-debugbar-ver-1317647931210.css
http://localhost:8080/app/wicket/resource/org.apache.wicket.devutils.debugbar.DebugBar/wicket-debugbar-ver-1317647931210.js

Not Good, when hitting a non-existent page:

http://localhost:8080/wicket/resource/org.eer.web.component.menu.MenuPanel/css/menu-skin-ver-1317665980360.css
http://localhost:8080/wicket/resource/org.eer.web.component.menu.MenuPanel/js/superfish-ver-1317665980369.js
http://localhost:8080/wicket/resource/org.eer.web.component.menu.MenuPanel/js/supersubs-ver-1317665980375.js
http://localhost:8080/wicket/resource/org.eer.web.component.menu.MenuPanel/js/menu-ver-1317665980367.js
http://localhost:8080/wicket/resource/org.eer.web.component.menu.MenuPanel/css/menu-ver-1317665980363.css

You will notice the /app is missing from the URLs.

Any advice on how to correct this behavior?


Thank you


Migration to 1.5.1 -- unable to render page because of head tag

2011-10-03 Thread Jeffrey Schneller
Been migrating an app to 1.5.1 and wanted to test a simple first page.
I continue to run into problems rendering the page.  I continue to get
the following exception:

 

Caused by: java.text.ParseException: No matching close bracket at (line
196, column 27)

at
org.apache.wicket.markup.parser.XmlPullParser.next(XmlPullParser.java:21
6)

 

Below is the simplified html and the java code.  Any ideas on what is
going on?

 

BasePage.html

--

!DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
http://www.w3.org/TR/html4/loose.dtd;

html xmlns=http://www.w3.org/1999/xhtml;
xmlns:wicket=http://wicket.apache.org;

head

title wicket:id=title[page title]/title

meta wicket:id=keywords name=keywords content=/

meta wicket:id=description name=description content=/

/head

body

div id=main

wicket:child/

/div

/body

/html

 

 

BasePage.java

--

public class BasePage extends WebPage {



// title of the current page

private String pageTitle = ;



// page meta-data

private String pageDescription = ;

private String pageKeyword = ;

 

public BasePage() {

super();

init();

}

private init() {

// Page Title

add(new Label(title, new
PropertyModelString(this, pageTitle)));

 

// Meta Tags

WebMarkupContainer metaKeywords = new
WebMarkupContainer(keywords);

metaKeywords.add(AttributeModifier.replace(content,
new PropertyModelString(this, pageKeyword)));

add(metaKeywords);



WebMarkupContainer metaDescription = new
WebMarkupContainer(description);

metaDescription.add(AttributeModifier.replace(content,
new PropertyModelString(this, pageDescription)));

add(metaDescription);

}

protected void setPageTitle(String title) {

this.pageTitle = title;

}

protected void setMetaKeywords(String keywords) {

this.pageKeyword = keywords;

}

protected void setMetaDescription(String description) {

this.pageDescription = description;

}

public String getPageDescription() {

return pageDescription;

}

public String getPageKeyword() {

return pageKeyword;

}

public String getPageTitle() {

return pageTitle;

}

}

 

HomePage.html

---

!DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
http://www.w3.org/TR/html4/loose.dtd;

html xmlns=http://www.w3.org/1999/xhtml;
xmlns:wicket=http://wicket.apache.org;

wicket:head/wicket:head

body

wicket:extend

[bunch of html]

/wicket:extend

/body

 

HomePage.java

-

public class HomePage extends BasePage {

public HomePage() {  

   this.setPageTitle(My homepage);

   this.setMetaKeywords();

   this.setMetaDescription();

}

}



Re: Wicket Wizard -- how to force a wizardstep to redraw or refresh

2011-10-03 Thread Sven Meier
Hi,

you could move you fragment setup into onBeforeRender():

  if (abModel.getObject().getQryType() == 1 
!(EasyQueryFragment.class.isInstance(get(querySpan))) {
 addOrReplace(new EasyQueryFragment(querySpan,
easyQueryFragment, abModel));
  } else ...

Sven

On 10/03/2011 06:54 PM, bad boy wrote:
 if (abModel.getObject().getQryType() == 1) {
 add(new EasyQueryFragment(querySpan, easyQueryFragment, 
 abModel));
 } else if (abModel.getObject().getQryType() == 2) {
 add(new AdvancedQueryFragment(querySpan, 
 advancedQueryFragment, abModel));
 } else if (abModel.getObject().getQryType() == 3) {
 add(new LuQueryFragment(querySpan, luQueryFragment, abModel));
 } else {
 add(new EmptyPanel(querySpan));
 }

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



RE: Migration to 1.5.1 -- unable to render page because of head tag

2011-10-03 Thread Jeffrey Schneller
I solved my problem.  I had a double quote in the title tag.  Removing
that resolved the problem.

-Original Message-
From: Jeffrey Schneller [mailto:jeffrey.schnel...@envisa.com] 
Sent: Monday, October 03, 2011 3:18 PM
To: users@wicket.apache.org
Subject: Migration to 1.5.1 -- unable to render page because of head
tag

Been migrating an app to 1.5.1 and wanted to test a simple first page.
I continue to run into problems rendering the page.  I continue to get
the following exception:

 

Caused by: java.text.ParseException: No matching close bracket at (line
196, column 27)

at
org.apache.wicket.markup.parser.XmlPullParser.next(XmlPullParser.java:21
6)

 

Below is the simplified html and the java code.  Any ideas on what is
going on?

 

BasePage.html

--

!DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
http://www.w3.org/TR/html4/loose.dtd;

html xmlns=http://www.w3.org/1999/xhtml;
xmlns:wicket=http://wicket.apache.org;

head

title wicket:id=title[page title]/title

meta wicket:id=keywords name=keywords content=/

meta wicket:id=description name=description content=/

/head

body

div id=main

wicket:child/

/div

/body

/html

 

 

BasePage.java

--

public class BasePage extends WebPage {



// title of the current page

private String pageTitle = ;



// page meta-data

private String pageDescription = ;

private String pageKeyword = ;

 

public BasePage() {

super();

init();

}

private init() {

// Page Title

add(new Label(title, new
PropertyModelString(this, pageTitle)));

 

// Meta Tags

WebMarkupContainer metaKeywords = new
WebMarkupContainer(keywords);

metaKeywords.add(AttributeModifier.replace(content,
new PropertyModelString(this, pageKeyword)));

add(metaKeywords);



WebMarkupContainer metaDescription = new
WebMarkupContainer(description);

metaDescription.add(AttributeModifier.replace(content,
new PropertyModelString(this, pageDescription)));

add(metaDescription);

}

protected void setPageTitle(String title) {

this.pageTitle = title;

}

protected void setMetaKeywords(String keywords) {

this.pageKeyword = keywords;

}

protected void setMetaDescription(String description) {

this.pageDescription = description;

}

public String getPageDescription() {

return pageDescription;

}

public String getPageKeyword() {

return pageKeyword;

}

public String getPageTitle() {

return pageTitle;

}

}

 

HomePage.html

---

!DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
http://www.w3.org/TR/html4/loose.dtd;

html xmlns=http://www.w3.org/1999/xhtml;
xmlns:wicket=http://wicket.apache.org;

wicket:head/wicket:head

body

wicket:extend

[bunch of html]

/wicket:extend

/body

 

HomePage.java

-

public class HomePage extends BasePage {

public HomePage() {  

   this.setPageTitle(My homepage);

   this.setMetaKeywords();

   this.setMetaDescription();

}

}


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



Re: Migration to 1.5.1 -- unable to render page because of head tag

2011-10-03 Thread Sven Meier
You're probably missing a close tag somewhere here: [bunch of html]

What's at line 196, column 27 ?

Sven


On 10/03/2011 09:17 PM, Jeffrey Schneller wrote:
 Been migrating an app to 1.5.1 and wanted to test a simple first page.
 I continue to run into problems rendering the page.  I continue to get
 the following exception:
 
  
 
 Caused by: java.text.ParseException: No matching close bracket at (line
 196, column 27)
 
 at
 org.apache.wicket.markup.parser.XmlPullParser.next(XmlPullParser.java:21
 6)
 
  
 
 Below is the simplified html and the java code.  Any ideas on what is
 going on?
 
  
 
 BasePage.html
 
 --
 
 !DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
 http://www.w3.org/TR/html4/loose.dtd;
 
 html xmlns=http://www.w3.org/1999/xhtml;
 xmlns:wicket=http://wicket.apache.org;
 
 head
 
 title wicket:id=title[page title]/title
 
 meta wicket:id=keywords name=keywords content=/
 
 meta wicket:id=description name=description content=/
 
 /head
 
 body
 
 div id=main
 
 wicket:child/
 
 /div
 
 /body
 
 /html
 
  
 
  
 
 BasePage.java
 
 --
 
 public class BasePage extends WebPage {
 
 
 
 // title of the current page
 
 private String pageTitle = ;
 
 
 
 // page meta-data
 
 private String pageDescription = ;
 
 private String pageKeyword = ;
 
  
 
 public BasePage() {
 
 super();
 
 init();
 
 }
 
 private init() {
 
 // Page Title
 
 add(new Label(title, new
 PropertyModelString(this, pageTitle)));
 
  
 
 // Meta Tags
 
 WebMarkupContainer metaKeywords = new
 WebMarkupContainer(keywords);
 
 metaKeywords.add(AttributeModifier.replace(content,
 new PropertyModelString(this, pageKeyword)));
 
 add(metaKeywords);
 
 
 
 WebMarkupContainer metaDescription = new
 WebMarkupContainer(description);
 
 metaDescription.add(AttributeModifier.replace(content,
 new PropertyModelString(this, pageDescription)));
 
 add(metaDescription);
 
 }
 
 protected void setPageTitle(String title) {
 
 this.pageTitle = title;
 
 }
 
 protected void setMetaKeywords(String keywords) {
 
 this.pageKeyword = keywords;
 
 }
 
 protected void setMetaDescription(String description) {
 
 this.pageDescription = description;
 
 }
 
 public String getPageDescription() {
 
 return pageDescription;
 
 }
 
 public String getPageKeyword() {
 
 return pageKeyword;
 
 }
 
 public String getPageTitle() {
 
 return pageTitle;
 
 }
 
 }
 
  
 
 HomePage.html
 
 ---
 
 !DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
 http://www.w3.org/TR/html4/loose.dtd;
 
 html xmlns=http://www.w3.org/1999/xhtml;
 xmlns:wicket=http://wicket.apache.org;
 
 wicket:head/wicket:head
 
 body
 
 wicket:extend
 
 [bunch of html]
 
 /wicket:extend
 
 /body
 
  
 
 HomePage.java
 
 -
 
 public class HomePage extends BasePage {
 
 public HomePage() {  
 
this.setPageTitle(My homepage);
 
this.setMetaKeywords();
 
this.setMetaDescription();
 
 }
 
 }
 
 


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



Re: Migration to 1.5.1 -- unable to render page because of head tag

2011-10-03 Thread Sven Meier
Ah, just read that you solved it: title wicket:id=title

Have fun
Sven

On 10/03/2011 09:22 PM, Sven Meier wrote:
 You're probably missing a close tag somewhere here: [bunch of html]
 
 What's at line 196, column 27 ?
 
 Sven
 
 
 On 10/03/2011 09:17 PM, Jeffrey Schneller wrote:
 Been migrating an app to 1.5.1 and wanted to test a simple first page.
 I continue to run into problems rendering the page.  I continue to get
 the following exception:

  

 Caused by: java.text.ParseException: No matching close bracket at (line
 196, column 27)

 at
 org.apache.wicket.markup.parser.XmlPullParser.next(XmlPullParser.java:21
 6)

  

 Below is the simplified html and the java code.  Any ideas on what is
 going on?

  

 BasePage.html

 --

 !DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
 http://www.w3.org/TR/html4/loose.dtd;

 html xmlns=http://www.w3.org/1999/xhtml;
 xmlns:wicket=http://wicket.apache.org;

 head

 title wicket:id=title[page title]/title

 meta wicket:id=keywords name=keywords content=/

 meta wicket:id=description name=description content=/

 /head

 body

 div id=main

 wicket:child/

 /div

 /body

 /html

  

  

 BasePage.java

 --

 public class BasePage extends WebPage {

 

 // title of the current page

 private String pageTitle = ;

 

 // page meta-data

 private String pageDescription = ;

 private String pageKeyword = ;

  

 public BasePage() {

 super();

 init();

 }

 private init() {

 // Page Title

 add(new Label(title, new
 PropertyModelString(this, pageTitle)));

  

 // Meta Tags

 WebMarkupContainer metaKeywords = new
 WebMarkupContainer(keywords);

 metaKeywords.add(AttributeModifier.replace(content,
 new PropertyModelString(this, pageKeyword)));

 add(metaKeywords);

 

 WebMarkupContainer metaDescription = new
 WebMarkupContainer(description);

 metaDescription.add(AttributeModifier.replace(content,
 new PropertyModelString(this, pageDescription)));

 add(metaDescription);

 }

 protected void setPageTitle(String title) {

 this.pageTitle = title;

 }

 protected void setMetaKeywords(String keywords) {

 this.pageKeyword = keywords;

 }

 protected void setMetaDescription(String description) {

 this.pageDescription = description;

 }

 public String getPageDescription() {

 return pageDescription;

 }

 public String getPageKeyword() {

 return pageKeyword;

 }

 public String getPageTitle() {

 return pageTitle;

 }

 }

  

 HomePage.html

 ---

 !DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
 http://www.w3.org/TR/html4/loose.dtd;

 html xmlns=http://www.w3.org/1999/xhtml;
 xmlns:wicket=http://wicket.apache.org;

 wicket:head/wicket:head

 body

 wicket:extend

 [bunch of html]

 /wicket:extend

 /body

  

 HomePage.java

 -

 public class HomePage extends BasePage {

 public HomePage() {  

this.setPageTitle(My homepage);

this.setMetaKeywords();

this.setMetaDescription();

 }

 }


 
 
 -
 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



[SOLVED] Re: Incorrect resource urls when 404 occurs

2011-10-03 Thread Russell Pitre
SOLVED:

I had to remove the following method in my Error404Page class:

@Override
protected void configureResponse(WebResponse response) {
super.configureResponse(response);
 ((HttpServletResponse)response.getContainerResponse())
.setStatus(HttpServletResponse.SC_NOT_FOUND);
 }


After removing the above method, all is well.

-Russ



On Mon, Oct 3, 2011 at 2:46 PM, Russell Pitre rpi...@gmail.com wrote:

 Hi-

 Just upgraded to 1.5.1 from 1.4.18 and was not seeing this behavior
 described below.

 In our application, the Wicket filter and error page is setup in the
 web.xml like so:

 filter-mapping
 filter-namewicket.filter/filter-name
  url-pattern/app/*/url-pattern
 dispatcherREQUEST/dispatcher
  dispatcherERROR/dispatcher
 /filter-mapping
  error-page
 error-code404/error-code
  location/app/404/location
 /error-page


 In my WicketApplication class I am mounting the 404 [ *mountPage(404,
 Error404Page.class);* ] so that I can use the Wicket page as my 404 page.
 When I visit a non-existent page to invoke a 404, it looks like the CSS
 resource URLs are not being built by Wicket correctly. Using fiddler, here's
 what I see on a normal page:

 Good:


 http://localhost:8080/app/wicket/resource/org.eer.web.component.menu.MenuPanel/css/menu-ver-1317665980363.css

 http://localhost:8080/app/wicket/resource/org.eer.web.component.menu.MenuPanel/css/menu-skin-ver-1317665980360.css

 http://localhost:8080/app/wicket/resource/org.eer.web.component.menu.MenuPanel/js/superfish-ver-1317665980369.js

 http://localhost:8080/app/wicket/resource/org.eer.web.component.menu.MenuPanel/js/menu-ver-1317665980367.js

 http://localhost:8080/app/wicket/resource/org.eer.web.component.menu.MenuPanel/js/supersubs-ver-1317665980375.js

 http://localhost:8080/app/wicket/resource/org.apache.wicket.devutils.debugbar.DebugBar/wicket-debugbar-ver-1317647931210.css

 http://localhost:8080/app/wicket/resource/org.apache.wicket.devutils.debugbar.DebugBar/wicket-debugbar-ver-1317647931210.js

 Not Good, when hitting a non-existent page:


 http://localhost:8080/wicket/resource/org.eer.web.component.menu.MenuPanel/css/menu-skin-ver-1317665980360.css

 http://localhost:8080/wicket/resource/org.eer.web.component.menu.MenuPanel/js/superfish-ver-1317665980369.js

 http://localhost:8080/wicket/resource/org.eer.web.component.menu.MenuPanel/js/supersubs-ver-1317665980375.js

 http://localhost:8080/wicket/resource/org.eer.web.component.menu.MenuPanel/js/menu-ver-1317665980367.js

 http://localhost:8080/wicket/resource/org.eer.web.component.menu.MenuPanel/css/menu-ver-1317665980363.css

 You will notice the /app is missing from the URLs.

 Any advice on how to correct this behavior?


 Thank you







Version 1.5 event model

2011-10-03 Thread Jeffrey Schneller
I am currently converting an app to version 1.5.1 and am starting to
look into/work with the event model.  What is the suggested approach for
using the event model?  Should all Ajax be moved to the event model
(anywhere where in 1.4 the code had target.addComponent or
target.addJavascript calls)?   

 

Are there some areas of code that should not be using the event model?
Should/can feedback panels use the event model?

 

Thanks for any advice.

 

 



RE: Wicket Dynamic Navigation

2011-10-03 Thread leaosou
Hi Kai Mütz,

Why don't you show some code? Don't you think this is better than
advertising a book?
The site your link point to does not show any code but only talk about the
book.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-Dynamic-Navigation-tp2228587p3869216.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 Dynamic Navigation

2011-10-03 Thread Nelson Segura
To be fair, there is code in the web site he pointed at. Look under
Beispielcode link. I don't speak a lick of german, but it is not
hard to figure out that is the code, and under the web apps directory
there is some code that can be useful

wicket-praxis-code\de.wicketpraxis--webapp\src\main\java\de\wicketpraxis\web\components\paging\OffsetPagePanel.java

There is a lot more code there too.

-Nelson

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



Re: Wicket Wizard -- how to force a wizardstep to redraw or refresh

2011-10-03 Thread bad boy
Hi Sven
Thanks a lot for your help. That worked !!

Regards



- Original Message -
From: Sven Meier lt;s...@meiers.netgt;
To: users@wicket.apache.org
Cc: 
Sent: Monday, October 3, 2011 3:18 PM
Subject: Re: Wicket Wizard -- how to force a wizardstep to redraw or refresh

Hi,

you could move you fragment setup into onBeforeRender():

  if (abModel.getObject().getQryType() == 1 amp;amp;
!(EasyQueryFragment.class.isInstance(get(quot;querySpanquot;))) {
     addOrReplace(new EasyQueryFragment(quot;querySpanquot;,
quot;easyQueryFragmentquot;, abModel));
  } else ...

Sven

On 10/03/2011 06:54 PM, bad boy wrote:
gt;         if (abModel.getObject().getQryType() == 1) {
gt;             add(new EasyQueryFragment(quot;querySpanquot;, 
quot;easyQueryFragmentquot;, abModel));
gt;         } else if (abModel.getObject().getQryType() == 2) {
gt;             add(new AdvancedQueryFragment(quot;querySpanquot;, 
quot;advancedQueryFragmentquot;, abModel));
gt;         } else if (abModel.getObject().getQryType() == 3) {
gt;             add(new LuQueryFragment(quot;querySpanquot;, 
quot;luQueryFragmentquot;, abModel));
gt;         } else {
gt;             add(new EmptyPanel(quot;querySpanquot;));
gt;         }

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

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



Wicket 1.5.1 image resource not available if parent component is disabled

2011-10-03 Thread cellis
Got an odd issue since upgrading to 1.5.1.
An image in a form is somehow unable to determine it's resource when the
form is disabled (eg read-only view of a detail form). When the form is
enabled (ie into edit mode), the image becomes visible just fine.

Something to do with the anticache value perhaps?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-1-5-1-image-resource-not-available-if-parent-component-is-disabled-tp3869742p3869742.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 1.5.1 image resource not available if parent component is disabled

2011-10-03 Thread cellis
ok, so its the parent.isEnabledInHierarchy that's forcing the
RequestListenerInterface   - component not enabled or visible; ignoring
call.
Any chance I could override that somehow, or should I/we refactor our design
to not have view/edit forms (groan)

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-1-5-1-image-resource-not-available-if-parent-component-is-disabled-tp3869742p3869819.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