Re: [Wicket-user] Fw: Modal Window and Page Expired.

2007-07-18 Thread Laurent Brucher
Yeah, that's what was done.
As you may known, Tomcat's default behavior is to rewrite urls (adding the
jsessionid in the url) when cookies are not supported on the client browser.
As said, it unfortunately does not change anything and the problem remains.
Thanks for the tip though.

Laurent.
 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of ??
Sent: mercredi 18 juillet 2007 6:15
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user] Fw: Modal Window and Page Expired.

What i mean is not turn the cookie off in the browser.
Just change the server session mode.
You can refer
http://tomcat.apache.org/tomcat-5.5-doc/config/context.html 


- Original Message -
From: Laurent Brucher [EMAIL PROTECTED]
To: wicket-user@lists.sourceforge.net
Sent: Wednesday, July 18, 2007 1:16 AM
Subject: Re: [Wicket-user] Fw: Modal Window and Page Expired.


I turned off cookies in FFox but that doesn't change anything :(
 
 As I previously said, the Ajax/ModalWindow sample in the wicket-examples
 works fine for me (deployed in the same Tomcat instance as my app).
 One difference I found with my environement is that all the URLs in the
 examples are bookmarkable. Mine are not.
 I don't really know whether this matters at all or not.
 
 What I can see by tracing the code is that the page that the app is trying
 to go back to after the modal window is closed does not exist in the
pagemap
 anymore. Hence the page expired. I have not figured out why yet but any
clue
 would be helpful.
 
 Laurent.
 
 
  _  
 
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of ??
 Sent: mardi 17 juillet 2007 7:27
 To: wicket-user@lists.sourceforge.net
 Subject: [Wicket-user] Fw: Modal Window and Page Expired.
 
 
 
 
 Maybe,you can try the server running on url-rewrite mode instead of
cookie.
 I encoutered the same problem on IE,but the same problem won't happen on
FF.
 After i change the session mode from cookie to url-rewrite,it works fine.
 You also can reverse what i did.
 
 - Original Message - 
 From: Laurent Brucher mailto:[EMAIL PROTECTED]  
 To: wicket-user@lists.sourceforge.net 
 Sent: Saturday, July 14, 2007 4:41 AM
 Subject: [Wicket-user] Modal Window and Page Expired.
 
 Hi all,
 
 There was a post last December about the same problem that I'm facing
right
 now, which is getting a page expired error page after I close a modal
 window.
 The post was called Firefox and ModalWindow and seemed to talk about the
 issue for FF only.
 I've encountered the problem first with FF (2.0.0.4). After reading the
 post, I tried with IE7 and it worked ok (that was this afternoon).
 This evening, neither IE7 or FF work anymore. Darn! Clearing cookies and
 stuff don't change a thing.
 Oh, and of course, the Ajax ModalWindow example works just fine (my code
is
 heavily inspired from that example)...
 I'm using Wicket 1.2.6, Tomcat 5.5.20, Jdk1.6u2.
 
 Have you guys shed any light on this issue at all?
 I've tried to trace the code, but as I'm rather new to Wicket, I couldn't
 really figure out what's going on...
 
 Anything I can do to help address this?
 Below is the code I use, just in case.
 
 Reagrds,
 Laurent.
 
 
 // Page containing the modal window
 public class MainPage extends WebPage {
public MainPage()
{
...
add( new PreferredStationsDialog(prefStationsDialog) );
...
}
 }
 
 // The modal window impl.
 public class PreferredStationsDialog extends ModalWindow {
public PreferredStationsDialog(String id)
{
super(id);
 
setTitle(xyz);
setCookieName(prefStationsDialog);
setPageMapName(prefStationsDialogPageMap);
setPageCreator( new ModalWindow.PageCreator() {
@Override
public Page createPage() {
return new
 PreferredStationsDialogPage(PreferredStationsDialog.this);
}
});
 
setCloseButtonCallback(new ModalWindow.CloseButtonCallback() {
public boolean onCloseButtonClicked(AjaxRequestTarget target) {
return true;
}
});
}
 }
 
 // The content of the modal window, as a Page
 public class PreferredStationsDialogPage extends WebPage
 {
public PreferredStationsDialogPage( final PreferredStationsDialog
dialog
 )
{
super();
 
add( new AjaxLink(button.save) {
@Override
public void onClick(AjaxRequestTarget target) {
dialog.close(target);
}
}.add( new Label(text, Save)) );
 
add( new AjaxLink(button.cancel) {
@Override
public void onClick(AjaxRequestTarget target) {
dialog.close(target);
}
}.add( new Label(text, Cancel)) );
}
 }
 
 
 
 
  _  
 
 
 
 
 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version 

[Wicket-user] java.util.ConcurrentModificationException with RefreshingView (AGAIN!?!?!!)

2007-07-18 Thread Ballist1c

Yep, I made some adjustments to code, to allow for any number of users to
join a chatSession, rather then just 2.

What I am doing is , the vector that I am using is within a particular class
and the Iterators for that vector are actually stored within another
subclass which is stored within a hashmap within this class.

I got this working before with Iterators directly declared within the class, 
but now that I have moved the iterators to a hashMap so I can store multiple
iterators to the same Vector, it has gone nuts... with the same error:(

Anyway, let me know what you think

--
chatRefreshingView = new RefreshingView(chatView, new
PropertyModel(new PropertyModel(ChatView.this.getJumbuckSession(),
currentChatSession), chatEntries))
{
protected Iterator getItemModels()
{
//i like cereal
chatViewItemsIterator = new
ModelIteratorAdapter(ChatView.this.getJumbuckSession().getCurrentChatSessionIterator())
{

protected IModel model(Object object) {
return new Model((Serializable) object); 
}
};
return chatViewItemsIterator;
}
protected void populateItem(Item item)
{
ChatViewItem chatViewItem = getItem(chatViewItem);
item.add(chatViewItem);
chatViewItem.setMyModels();
}
};
 
add(chatRefreshingView);
chatRefreshingView.setOutputMarkupId(true);

---
public void setMyModels() //for chatViewItem.setMyModels() above
{
 
IModel chatViewItemModel = getParent().getModel();
PropertyModel contentsModel = new PropertyModel(chatViewItemModel,
contents);

getAuthorChatImage().setModel(new ImagePathFromIdModel(new
PropertyModel(chatViewItemModel, authorProfileId)));
getContents().setModel(contentsModel);
}

--

WicketMessage: Error attaching this container for rendering:
[MarkupContainer [Component id = chatDisplay, page =
jumbuck.ffweb.wicket.page.FFWeb, path =
0:main_tabbed_panel:target_panel:tabbed_panel:target_panel:chatDisplay.HotListTargetPanel$1,
isVisible = true, isVersioned = false]]

Root cause:

java.util.ConcurrentModificationException
at java.util.AbstractList$Itr.checkForComodification(AbstractList.java:372)
at java.util.AbstractList$Itr.next(AbstractList.java:343)
at
org.apache.wicket.markup.repeater.util.ModelIteratorAdapter.next(ModelIteratorAdapter.java:60)
at
org.apache.wicket.markup.repeater.DefaultItemReuseStrategy$1.next(DefaultItemReuseStrategy.java:71)
at
org.apache.wicket.markup.repeater.RefreshingView.addItems(RefreshingView.java:189)
at
org.apache.wicket.markup.repeater.RefreshingView.onBeforeRender(RefreshingView.java:115)
at org.apache.wicket.Component.beforeRender(Component.java:846)
at
org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1449)
at org.apache.wicket.Component.beforeRender(Component.java:856)
at
org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1449)
at org.apache.wicket.Component.beforeRender(Component.java:856)
at
org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1449)
at org.apache.wicket.Component.beforeRender(Component.java:856)
at
org.apache.wicket.ajax.AjaxRequestTarget.respondComponent(AjaxRequestTarget.java:757)
at
org.apache.wicket.ajax.AjaxRequestTarget.respondComponents(AjaxRequestTarget.java:662)
at
org.apache.wicket.ajax.AjaxRequestTarget.respond(AjaxRequestTarget.java:520)
at
org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:103)
at
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1037)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1107)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1176)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:499)
at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:257)
at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:127)
-- 
View this message in context: 
http://www.nabble.com/java.util.ConcurrentModificationException-with-RefreshingView-%28AGAIN%21-%21-%21%21%29-tf4101508.html#a11663707
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

Re: [Wicket-user] AjaxRequestTarget.addComponent for a child of ListItem

2007-07-18 Thread Mike03



igor.vaynberg wrote:
 
 any errors in wicket ajax console? also try repeatingview - it is more
 stable then listview in the sense it doesnt try to recreate its
 hierarchy
 on every request.
 
 -igor
 
 

Good suggestion on checking the console.  The ajax part is working fine,
sending the appropriate html fragment.  My problem is that I've got a
SimpleAttributeModifier for the image src attribute so state changes are not
being reflected; looks like I need an AttributeModifier with an IModel
instead.  When the container of the ListView was the ajax target, all of the
ListItems were being re-instantiated and the SimpleAttributeModifier was OK.

Thanks!
Mike
-- 
View this message in context: 
http://www.nabble.com/AjaxRequestTarget.addComponent-for-a-child-of-ListItem-tf4100732.html#a11663769
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Retrieve selected value from DropDown

2007-07-18 Thread Toscano

Hello again,

I found the solution. Everything was fine, I just had two different Language
objects and I was using the wrong one.

So my understanding of CPM was good at the end...

Thanks anyway,
Oskar




igor.vaynberg wrote:
 
 On 7/17/07, Toscano [EMAIL PROTECTED] wrote:


 Thank you again.

 But I'm not very sure of what you are talking about... I declared the
 DropDowns that way so they are able to change the content for every
 language
 with every localization change. But as part of a Form with assigned
 CompoundPropertyModel, I supposed it should be easy to just map the
 selected
 value in the property with the same name.

 The strange is that I have exactly the same code for a different
 Dropdown,
 and I can retrieve the value correctly:

 Page class:
   membershipLevels = new DropDownChoice (membershipLevel,
 new LoadableDetachableModel() {protected Object load()
 {return
 getMembershipLevels();}},
 new ChoiceRenderer (membershipLevelName,
 membershipLevelID));

 Compound Property:
 private MembershipLevel membershipLevel;

 Submit:
System.out.println (MEMBERSHIPLEVEL: +
 userInformation.getMembershipLevel().getMembershipLevelID());

 So yes, you are right, I think I don't understand how it works...
 
 
 i guess if you can paste thecode to where you createte the model and its
 object it might be easier.
 
 there is a good wiki page which goes over how models and compound models
 work you might want to read.
 
 -igor
 
 
 
 
 Really... thank you!
 Oskar







 igor.vaynberg wrote:
 
  On 7/17/07, Toscano [EMAIL PROTECTED] wrote:
 
 
  Thank you for your fast answer!
 
  It makes sense. I made the following changes:
 
  CompoundPropertyModel:
  private Language defaultSystemLanguage; (with the correct gets/sets)
 
  Submit:
  System.out.println (LANGUAGE BY DEFAULT: +
  userInformation.getDefaultSystemLanguage().getLanguageID());
 
  And now the error changes to:
  wicket.util.convert.ConversionException: Can't convert value:
  languageID:14
  - languageName:Japanese to class: class
  iJoinApplication.Entity.Registration.Language for setting it on
  [EMAIL PROTECTED]
 
  UserInformation is the CompoundPropertyModel whose
 defaultSystemLanguage
  property I changed to Language object.
 
 
  i dont think you understand completely how CPM works
 
  if you do new CompoundPropertyModel(new Registration());
  then that registration has to have the Language defaultSystemLanguage
  property. is that the case?
 
  -igor
 
 
 
  Again, thank you so much for all your help.
  Oskar
 
 
 
 
 
  igor.vaynberg wrote:
  
   On 7/17/07, Toscano [EMAIL PROTECTED] wrote:
  
  
   Hello,
  
   I have a huge form with a lot of dropdowns, and I'm using a
   CompoundPropertyModel. The form can also be changed between more
 than
  six
   languages, so everytime the user changes one value in one Dropdown,
  all
   the
   form is refreshed showing the DropDowns in the selected language.
   The problem is for getting the selected values of the DropDowns
 when
   submit...
  
   Here is the code:
   Declaration of one of the combos in the page class:
  
defaultSystemLanguage = new
   DropDownChoice(defaultSystemLanguage,
new LoadableDetachableModel() {protected Object load()
  {return
   getImplementedLanguages();}},
new ChoiceRenderer (languageName, languageID));
   defaultSystemLanguage.setNullValid(true);
  
   CompoundPropertyModel:
   private String defaultSystemLanguage; (with gets/sets)
  
   onSubmit:
   public void onSubmit() {
  System.out.println (LANGUAGE BY DEFAULT: +
   userInformation.getDefaultSystemLanguage());
  
   This causes the following error:
  
   wicket.WicketRuntimeException: No get method defined for class:
 class
   java.lang.String expression: languageID
  
   What I'm doing wrong? If I specify a CompoundPropertyModel with one
   property
   with the same name as the DropDown, isn't supposed to be mapped
  directly
   there?
  
  
   your model object is of type String as it maps to the String
   defaultSystemLanguage. your renderer however expects an object it
 can
  call
   getLanguageName() and getLanaguageId() on - as you have defined. so
  make
   defaultSystemLanguage your Language object instead of just a string.
  
   -igor
  
  
  
  
   Thanks in advance,
   Oskar
  
   --
   View this message in context:
  
 
 http://www.nabble.com/Retrieve-selected-value-from-DropDown-tf4100672.html#a11661363
   Sent from the Wicket - User mailing list archive at Nabble.com.
  
  
  
 
 -
   This SF.net email is sponsored by DB2 Express
   Download DB2 Express C - the FREE version of DB2 express and take
   control of your XML. No limits. Just data. Click to get it now.
   http://sourceforge.net/powerbar/db2/
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
   

[Wicket-user] feature suggestion component instantiation

2007-07-18 Thread Maurice Marrink
Hi,
In my project we often have the case where a user initially is allowed
to construct a certain component (pages mostly) but whether he really
can depends on the model of the page.
So my request / suggestion is to enhance IAuthorizationStrategy with
the following method isInstantiationAuthorized(Class, IModel). whether
this methods is made available next to
isInstantiationAuthorized(Class) or replaces it is not important.

As far as i can see the following changes need to be made
-Application.notifyComponentInstantiationListeners needs to be
upgraded to receive the model to, or the component should not call
notify untill the model has been set on the component (which happens
on the next line)
-the default listener needs to pass the model to the strategy.

For regular models this should not be a problem but IWrapModels might
have a problem when accessing anything else from the component but the
id. Not passing the wrappedmodel but the original model is imo not an
option because the main point of passing the model is to be able to
use the getObject method.

What do you think?

Maurice

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] feature suggestion component instantiation

2007-07-18 Thread Johan Compagner
i can see the value of having the model in the authorizationstrategy
this is pretty handy. But the problem is with wrapmodels  because we
just can't give those to the outside world withing a constructor of a
component
because we have a big warning in the wrapOnAssigment(Component) call
that in that method you shouldn't really touch the component because it is
not
fully constructed yet. But we can't have it that the component is still not
fully constructed
in the getObject() call of the wrapped model.

So i am +1 for such a change except that the model param will be null of not
given and
null if it is wrapped model.

johan


On 7/18/07, Maurice Marrink [EMAIL PROTECTED] wrote:

 Hi,
 In my project we often have the case where a user initially is allowed
 to construct a certain component (pages mostly) but whether he really
 can depends on the model of the page.
 So my request / suggestion is to enhance IAuthorizationStrategy with
 the following method isInstantiationAuthorized(Class, IModel). whether
 this methods is made available next to
 isInstantiationAuthorized(Class) or replaces it is not important.

 As far as i can see the following changes need to be made
 -Application.notifyComponentInstantiationListeners needs to be
 upgraded to receive the model to, or the component should not call
 notify untill the model has been set on the component (which happens
 on the next line)
 -the default listener needs to pass the model to the strategy.

 For regular models this should not be a problem but IWrapModels might
 have a problem when accessing anything else from the component but the
 id. Not passing the wrappedmodel but the original model is imo not an
 option because the main point of passing the model is to be able to
 use the getObject method.

 What do you think?

 Maurice

 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Setting up project - images and stylesheets

2007-07-18 Thread Andrew Klochkov
jonaqua wrote:
 Is there a good way to set up the project besides keeping duplicate images
 and stylesheets both in the source code dir and the web dir?

   
User ContextImage instead of Image for images in the web dir. BTW
ContextImage could be stateless while making Image instance stateless is
not so easy.

-- 
Andrew Klochkov


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] feature suggestion component instantiation

2007-07-18 Thread Maurice Marrink
After having Johan explain to me that It is only the
IComponentAssignedModel that will cause serious problems and models
like CompoundPropertyModel will work just fine. And since we do not
use those.
I have no objection to this restriction.

Maurice

On 7/18/07, Johan Compagner [EMAIL PROTECTED] wrote:
 i can see the value of having the model in the authorizationstrategy
 this is pretty handy. But the problem is with wrapmodels  because we
 just can't give those to the outside world withing a constructor of a
 component
 because we have a big warning in the wrapOnAssigment(Component) call
 that in that method you shouldn't really touch the component because it is
 not
 fully constructed yet. But we can't have it that the component is still not
 fully constructed
 in the getObject() call of the wrapped model.

 So i am +1 for such a change except that the model param will be null of not
 given and
 null if it is wrapped model.

 johan


 On 7/18/07, Maurice Marrink [EMAIL PROTECTED] wrote:
 
  Hi,
  In my project we often have the case where a user initially is allowed
  to construct a certain component (pages mostly) but whether he really
  can depends on the model of the page.
  So my request / suggestion is to enhance IAuthorizationStrategy with
  the following method isInstantiationAuthorized(Class, IModel). whether
  this methods is made available next to
  isInstantiationAuthorized(Class) or replaces it is not important.
 
  As far as i can see the following changes need to be made
  -Application.notifyComponentInstantiationListeners needs to be
  upgraded to receive the model to, or the component should not call
  notify untill the model has been set on the component (which happens
  on the next line)
  -the default listener needs to pass the model to the strategy.
 
  For regular models this should not be a problem but IWrapModels might
  have a problem when accessing anything else from the component but the
  id. Not passing the wrappedmodel but the original model is imo not an
  option because the main point of passing the model is to be able to
  use the getObject method.
 
  What do you think?
 
  Maurice
 
  -
  This SF.net email is sponsored by DB2 Express
  Download DB2 Express C - the FREE version of DB2 express and take
  control of your XML. No limits. Just data. Click to get it now.
  http://sourceforge.net/powerbar/db2/
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Row index in datatable

2007-07-18 Thread Eelco Hillenius
-- Forwarded message --
From: Pierre Coquentin [EMAIL PROTECTED]
Date: Jul 18, 2007 1:48 AM
Subject: Problem to send mail to user list Wicket
To: [EMAIL PROTECTED]



 Hi,
 this is not a spam :P
 Sorry to disturb you, i tried twice to send a question to user list
wicket but it appears that my mails have been lost and i don't know
why.
 Is there something i'm doing wrong ?
 Furthermore i have now another question about how to close a modal
window automatically without AJAX...  please help :)
 Thanks in advance,

 Pierre

 PS : i forward my first mail as attachment

-- Forwarded message --
From: Pierre Coquentin [EMAIL PROTECTED]
To: wicket-user@lists.sourceforge.net
Date: Wed, 18 Jul 2007 09:36:44 +0200
Subject: Row index in datatable

 hello all,

 I need to obtain row index in datatable when populating cell item.
 column = new AbstractColumn(...)
 {
 public void populateItem(Item cellItem, String componentId, IModel model)
 {
cellItem.getIndex() // Index of column
??? // Index  of row
cellItem.add(...);
 }
 };


 After some deep research, i found same question posted
http://www.mail-archive.com/wicket-user@lists.sourceforge.net/msg21743.html
but no answer except an hack which don't work with wicket 1.3b2 (and
didn't find the feature in JIRA).
 If someone can help me :P
 Thanks in advance.

 Pierre

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] feature suggestion component instantiation

2007-07-18 Thread Eelco Hillenius
I don't think I agree with that.

MyComponent c = new MyComponent(); c.setModel(foo) wouldn't work for
starters, and you can even set models mutliple times. Not to mention
the other problems you mentioned in this thread. And finally, it would
just invite people to go crazy with this functionality.

But give us a good example of where using the model to determine an
access restriction would actually be useful?

Eelco

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Ajax component replacement with updated Model issue

2007-07-18 Thread Timo Rantalaiho
On Sun, 15 Jul 2007, Erik Dreyer wrote:
 Everything is working great except the 'display' component is not reflecting
 the saved changes.  Before replacing the edit component
 with the display component, I'm calling setModel() on the original display
 component with the updated data.  This has no effect visible effect.

I saw that you already solved this by calling onModelChanged().
I think that if you use setModelObject() it does that call so
you don't need to call it explicitly. You could also see if
just using the same model instance for both edit and display 
component would do the trick. The equals() implementation of
the model object might also affect the behavior, because as far
as I remember the onModelChange-things get triggered only when
!newModelObject.equals(oldModelObject).

 The 'display' component is itself a tree of components.  Is there a
 prescribed way to propogate the fact that I updated the model down
 to all the affected child components?  Is that something I have to handle
 myself or does the framework do that?

I think that sharing the model is a common trick. Note that 
you can also nest models, if you e.g. need CompoundPropertyModel
handling the same data that is in another kind of IModel
elsewhere.

- Timo

-- 
Timo Rantalaiho   
Reaktor Innovations OyURL: http://www.ri.fi/ 

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] feature suggestion component instantiation

2007-07-18 Thread Maurice Marrink
True you can't do setModel(foo) and expect your instantiation check to
work. Which imho is perfectly logical if you want to use your model in
the instantiation check you need to pass it in the constructor.

As for the example
We have a search page for students, uppon clicking on one of those
students, you go to a detail page for that student. that page also
contains several tabs to go to other relevant pages for the student
(like it's school grades). on these pages we made a quicksearch
function with contains amongst other things 2 buttons to navigate
forth and back between the searchresults of the search page, while
keeping the same view. Suppose i have sufficient rights to see the
detail pages of all students but only enough rights to see the grades
of my own students.

So if i make the search wide enough to get all students and then
select one of my own, going to the grades. That's fine. But if i then
navigate to another student i am not allowed to see the grades
(creating a new instance of the grades page in the process) i need to
know if the page in combination with the student is allowed, because
the page itself is basically allowed.

Maurice

On 7/18/07, Eelco Hillenius [EMAIL PROTECTED] wrote:
 I don't think I agree with that.

 MyComponent c = new MyComponent(); c.setModel(foo) wouldn't work for
 starters, and you can even set models mutliple times. Not to mention
 the other problems you mentioned in this thread. And finally, it would
 just invite people to go crazy with this functionality.

 But give us a good example of where using the model to determine an
 access restriction would actually be useful?

 Eelco

 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Modal Window and Page Expired.

2007-07-18 Thread 王磊
I want to descript the context.
Some one write a web application based on wicket.Many pages uses ajax.
I encoutered a strange problem.
After 5 ajax modal windows are poped up.The brower will give me a warming 
dialog to tell me that the current browse page will be closed.Then the page is 
redirected to a login page.Sure ,this means the session is out.

I tries someway:
1 Clear the IE cookies.
2 Clear the tomcat workdir
3 force the tomcat use url-rewrite mode.
4 close the IE cookies.

Then the application works fine.
Maybe you need close the browse cookie and use tomcat url-rewrite both.
Try it.



 - Original Message - 
 From: Igor Vaynberg [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]; wicket-user@lists.sourceforge.net
 Sent: Wednesday, July 18, 2007 2:49 PM
 Subject: Re: [Wicket-user] Modal Window and Page Expired.
 
 
 On 7/13/07, Laurent Brucher [EMAIL PROTECTED] wrote:

  Hi all,

 There was a post last December about the same problem that I'm facing
 right now, which is getting a page expired error page after I close a modal
 window.
 The post was called Firefox and ModalWindow and seemed to talk about the
 issue for FF only.
 I've encountered the problem first with FF (2.0.0.4). After reading the
 post, I tried with IE7 and it worked ok (that was this afternoon).
 This evening, neither IE7 or FF work anymore. Darn! Clearing cookies and
 stuff don't change a thing.
 Oh, and of course, the Ajax ModalWindow example works just fine (my code
 is heavily inspired from that example)...
 I'm using Wicket 1.2.6, Tomcat 5.5.20, Jdk1.6u2.

 Have you guys shed any light on this issue at all?
 I've tried to trace the code, but as I'm rather new to Wicket, I couldn't
 really figure out what's going on...

 Anything I can do to help address this?

 
 i wonder, clear cookies in firefox and try again. i know there was a similar
 problem if you didnt set the cookie name in the modal window using
 setcookiename(), but looks like you did that. still, try clearing the
 cookies.
 
 -igor
 
 
 
 
 Below is the code I use, just in case.

 Reagrds,
 Laurent.


 // Page containing the modal window
 public class MainPage extends WebPage {
 public MainPage()
 {
 ...
 add( *new* PreferredStationsDialog(prefStationsDialog) );
 ...
 }
 }

 // The modal window impl.
 public class PreferredStationsDialog extends ModalWindow {
 *public* PreferredStationsDialog(String id)
 {
 *super*(id);

 setTitle(xyz);
 setCookieName(prefStationsDialog);
 setPageMapName(prefStationsDialogPageMap);
 setPageCreator( *new* ModalWindow.PageCreator() {
 @Override
 *public* Page createPage() {
 *return* 
 *new*PreferredStationsDialogPage(PreferredStationsDialog.
 *this*);
 }
 });

 setCloseButtonCallback(*new* ModalWindow.CloseButtonCallback() {
 *public* *boolean* onCloseButtonClicked(AjaxRequestTarget
 target) {
 *return* *true*;
 }
 });
 }
 }

 // The content of the modal window, as a Page
 public class PreferredStationsDialogPage extends WebPage
 {
 *public* PreferredStationsDialogPage( *final* PreferredStationsDialog
 dialog )
 {
 *super*();

 add( *new* AjaxLink(button.save) {
 @Override
 *public* *void* onClick(AjaxRequestTarget target) {
 dialog.*close*(target);
 }
 }.add( *new* Label(text, Save)) );

 add( *new* AjaxLink(button.cancel) {
 @Override
 *public* *void* onClick(AjaxRequestTarget target) {
 dialog.*close*(target);
 }
 }.add( *new* Label(text, Cancel)) );
 }
 }


 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user


 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

[Wicket-user] Random ModalWindow exception

2007-07-18 Thread Alex Objelean

I have a strange issue when using ModalWindow in my application. Sometimes
(randomly), I got the following error in ajax-debug window:

[MESSAGE]

INFO: Response parsed. Now invoking steps...
ERROR: Exception evaluating javascript: TypeError: Wicket.Window has no
properties

[/MESSAGE]

The reason, seems to be the fact that the modal.js is not always included. I
didn't manage to find out why this is happening. Can anybody help me?

Thank you!
-- 
View this message in context: 
http://www.nabble.com/Random-ModalWindow-exception-tf4102507.html#a11666379
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Random ModalWindow exception

2007-07-18 Thread Matej Knopp
What wicket version are you using?

-Matej

On 7/18/07, Alex Objelean [EMAIL PROTECTED] wrote:

 I have a strange issue when using ModalWindow in my application. Sometimes
 (randomly), I got the following error in ajax-debug window:

 [MESSAGE]

 INFO: Response parsed. Now invoking steps...
 ERROR: Exception evaluating javascript: TypeError: Wicket.Window has no
 properties

 [/MESSAGE]

 The reason, seems to be the fact that the modal.js is not always included. I
 didn't manage to find out why this is happening. Can anybody help me?

 Thank you!
 --
 View this message in context: 
 http://www.nabble.com/Random-ModalWindow-exception-tf4102507.html#a11666379
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Random ModalWindow exception

2007-07-18 Thread Alex Objelean

I am using wicket-1.2.6.

Here is a short background description of the problem:

I have a page, which contains an AjaxTabbedPanel. The panel contains div
wicket:id=modalWindow/div markup to hold the ModalWindow component. 

I think that the modal.js is included (at least for its first call), but
have problems when the ajaxTabbedPanel is updated via ajax.

Any thoughts?

Thank you,
Alex.


Matej Knopp-2 wrote:
 
 What wicket version are you using?
 
 -Matej
 
 On 7/18/07, Alex Objelean [EMAIL PROTECTED] wrote:

 I have a strange issue when using ModalWindow in my application.
 Sometimes
 (randomly), I got the following error in ajax-debug window:

 [MESSAGE]

 INFO: Response parsed. Now invoking steps...
 ERROR: Exception evaluating javascript: TypeError: Wicket.Window has no
 properties

 [/MESSAGE]

 The reason, seems to be the fact that the modal.js is not always
 included. I
 didn't manage to find out why this is happening. Can anybody help me?

 Thank you!
 --
 View this message in context:
 http://www.nabble.com/Random-ModalWindow-exception-tf4102507.html#a11666379
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user

 
 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 

-- 
View this message in context: 
http://www.nabble.com/Random-ModalWindow-exception-tf4102507.html#a11666954
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] feature suggestion component instantiation

2007-07-18 Thread Johan Compagner
cant you test this with the render action check?
that is always done also if the model is changed

johan


On 7/18/07, Maurice Marrink [EMAIL PROTECTED] wrote:

 True you can't do setModel(foo) and expect your instantiation check to
 work. Which imho is perfectly logical if you want to use your model in
 the instantiation check you need to pass it in the constructor.

 As for the example
 We have a search page for students, uppon clicking on one of those
 students, you go to a detail page for that student. that page also
 contains several tabs to go to other relevant pages for the student
 (like it's school grades). on these pages we made a quicksearch
 function with contains amongst other things 2 buttons to navigate
 forth and back between the searchresults of the search page, while
 keeping the same view. Suppose i have sufficient rights to see the
 detail pages of all students but only enough rights to see the grades
 of my own students.

 So if i make the search wide enough to get all students and then
 select one of my own, going to the grades. That's fine. But if i then
 navigate to another student i am not allowed to see the grades
 (creating a new instance of the grades page in the process) i need to
 know if the page in combination with the student is allowed, because
 the page itself is basically allowed.

 Maurice

 On 7/18/07, Eelco Hillenius [EMAIL PROTECTED] wrote:
  I don't think I agree with that.
 
  MyComponent c = new MyComponent(); c.setModel(foo) wouldn't work for
  starters, and you can even set models mutliple times. Not to mention
  the other problems you mentioned in this thread. And finally, it would
  just invite people to go crazy with this functionality.
 
  But give us a good example of where using the model to determine an
  access restriction would actually be useful?
 
  Eelco
 
 
 -
  This SF.net email is sponsored by DB2 Express
  Download DB2 Express C - the FREE version of DB2 express and take
  control of your XML. No limits. Just data. Click to get it now.
  http://sourceforge.net/powerbar/db2/
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 

 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] feature suggestion component instantiation

2007-07-18 Thread Maurice Marrink
Right now i manually need to trigger
isActionAuthorized(Component.RENDER); after the component has been
fully initialized. I would like to abort as soon as possible.

Maurice

On 7/18/07, Johan Compagner [EMAIL PROTECTED] wrote:
 cant you test this with the render action check?
 that is always done also if the model is changed

 johan


 On 7/18/07, Maurice Marrink [EMAIL PROTECTED] wrote:
 
  True you can't do setModel(foo) and expect your instantiation check to
  work. Which imho is perfectly logical if you want to use your model in
  the instantiation check you need to pass it in the constructor.
 
  As for the example
  We have a search page for students, uppon clicking on one of those
  students, you go to a detail page for that student. that page also
  contains several tabs to go to other relevant pages for the student
  (like it's school grades). on these pages we made a quicksearch
  function with contains amongst other things 2 buttons to navigate
  forth and back between the searchresults of the search page, while
  keeping the same view. Suppose i have sufficient rights to see the
  detail pages of all students but only enough rights to see the grades
  of my own students.
 
  So if i make the search wide enough to get all students and then
  select one of my own, going to the grades. That's fine. But if i then
  navigate to another student i am not allowed to see the grades
  (creating a new instance of the grades page in the process) i need to
  know if the page in combination with the student is allowed, because
  the page itself is basically allowed.
 
  Maurice
 
  On 7/18/07, Eelco Hillenius [EMAIL PROTECTED] wrote:
   I don't think I agree with that.
  
   MyComponent c = new MyComponent(); c.setModel(foo) wouldn't work for
   starters, and you can even set models mutliple times. Not to mention
   the other problems you mentioned in this thread. And finally, it would
   just invite people to go crazy with this functionality.
  
   But give us a good example of where using the model to determine an
   access restriction would actually be useful?
  
   Eelco
  
  
  -
   This SF.net email is sponsored by DB2 Express
   Download DB2 Express C - the FREE version of DB2 express and take
   control of your XML. No limits. Just data. Click to get it now.
   http://sourceforge.net/powerbar/db2/
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
   https://lists.sourceforge.net/lists/listinfo/wicket-user
  
 
  -
  This SF.net email is sponsored by DB2 Express
  Download DB2 Express C - the FREE version of DB2 express and take
  control of your XML. No limits. Just data. Click to get it now.
  http://sourceforge.net/powerbar/db2/
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] feature suggestion component instantiation

2007-07-18 Thread Maurice Marrink
However besides the benefit of being more efficient it also prevents a
lot of nasty stuff like throwing custom exceptions / NPE in the page
constructor or redirecting, which i now have to take into account
because the page is fully constructed. When the strategy can tell me
for certain if the page is allowed i would not have to do that.

Maurice

On 7/18/07, Maurice Marrink [EMAIL PROTECTED] wrote:
 Right now i manually need to trigger
 isActionAuthorized(Component.RENDER); after the component has been
 fully initialized. I would like to abort as soon as possible.

 Maurice

 On 7/18/07, Johan Compagner [EMAIL PROTECTED] wrote:
  cant you test this with the render action check?
  that is always done also if the model is changed
 
  johan
 
 
  On 7/18/07, Maurice Marrink [EMAIL PROTECTED] wrote:
  
   True you can't do setModel(foo) and expect your instantiation check to
   work. Which imho is perfectly logical if you want to use your model in
   the instantiation check you need to pass it in the constructor.
  
   As for the example
   We have a search page for students, uppon clicking on one of those
   students, you go to a detail page for that student. that page also
   contains several tabs to go to other relevant pages for the student
   (like it's school grades). on these pages we made a quicksearch
   function with contains amongst other things 2 buttons to navigate
   forth and back between the searchresults of the search page, while
   keeping the same view. Suppose i have sufficient rights to see the
   detail pages of all students but only enough rights to see the grades
   of my own students.
  
   So if i make the search wide enough to get all students and then
   select one of my own, going to the grades. That's fine. But if i then
   navigate to another student i am not allowed to see the grades
   (creating a new instance of the grades page in the process) i need to
   know if the page in combination with the student is allowed, because
   the page itself is basically allowed.
  
   Maurice
  
   On 7/18/07, Eelco Hillenius [EMAIL PROTECTED] wrote:
I don't think I agree with that.
   
MyComponent c = new MyComponent(); c.setModel(foo) wouldn't work for
starters, and you can even set models mutliple times. Not to mention
the other problems you mentioned in this thread. And finally, it would
just invite people to go crazy with this functionality.
   
But give us a good example of where using the model to determine an
access restriction would actually be useful?
   
Eelco
   
   
   -
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
   
  
   -
   This SF.net email is sponsored by DB2 Express
   Download DB2 Express C - the FREE version of DB2 express and take
   control of your XML. No limits. Just data. Click to get it now.
   http://sourceforge.net/powerbar/db2/
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
   https://lists.sourceforge.net/lists/listinfo/wicket-user
  
  -
  This SF.net email is sponsored by DB2 Express
  Download DB2 Express C - the FREE version of DB2 express and take
  control of your XML. No limits. Just data. Click to get it now.
  http://sourceforge.net/powerbar/db2/
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Nesting AjaxTabbedPanels when using AjaxLink

2007-07-18 Thread Jeff Pierce
I am new to Wicket and just getting my feet wet and looking for some
advice.  I have an app I am building that contains a main row of Ajax tabs
across the top.   Each tab's panel will have the following layout.  A set of
menu's on the left and a set of tabs on the right for part of its content
area.  I want the menu's to be Ajax links and the tabs to be Ajax tabs.
When the user clicks on a menu choice, the content area should reload with a
different set of ajax tabs.

My question is what is the best way to hookup the ajax links to change the
portion of the page that contains content area which includes a different
set of tabs depending on the menu choice (stuff in red below)?  I have the
tabs and subtabs loading OK, but not sure how to go about hooking up the
ajax menu choices to change the subtab panel.

Here's the basic layout:

-
Page header area
-
| *MainTab1* | MainTab2 |
-
|*Menu1* |
| Menu2  || *Menu1Subtab1* |Menu1Subtab2|
| Menu3  ||
| Menu4  ||
|||  Menu1Subtab1 Tab panel Content Area
||
-
Page footer area
-

Thanks
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] java.util.ConcurrentModificationException with RefreshingView (AGAIN!?!?!!)

2007-07-18 Thread Igor Vaynberg
On 7/18/07, Ballist1c [EMAIL PROTECTED] wrote:


 Yep, I made some adjustments to code, to allow for any number of users to
 join a chatSession, rather then just 2.

 What I am doing is , the vector that I am using is within a particular
 class
 and the Iterators for that vector are actually stored within another
 subclass which is stored within a hashmap within this class.


w o w

I got this working before with Iterators directly declared within the class,
 but now that I have moved the iterators to a hashMap so I can store
 multiple
 iterators to the same Vector, it has gone nuts... with the same error:(

 Anyway, let me know what you think


 obviously whatever this thing is, another thread is modifying it, or you
are doing something elsewhere to modify it.

what you should do is instead of returning an iterator directly first copy
the values into an array list and return an iterator to that. java 101.

-igor



--
 chatRefreshingView = new RefreshingView(chatView, new
 PropertyModel(new PropertyModel(ChatView.this.getJumbuckSession(),
 currentChatSession), chatEntries))
 {
 protected Iterator getItemModels()
 {
 //i like cereal
 chatViewItemsIterator = new
 ModelIteratorAdapter(ChatView.this.getJumbuckSession
 ().getCurrentChatSessionIterator())
 {

 protected IModel model(Object object) {
 return new Model((Serializable) object);
 }
 };
 return chatViewItemsIterator;
 }
 protected void populateItem(Item item)
 {
 ChatViewItem chatViewItem = getItem(chatViewItem);
 item.add(chatViewItem);
 chatViewItem.setMyModels();
 }
 };

 add(chatRefreshingView);
 chatRefreshingView.setOutputMarkupId(true);


 ---
 public void setMyModels() //for chatViewItem.setMyModels() above
 {

 IModel chatViewItemModel = getParent().getModel();
 PropertyModel contentsModel = new PropertyModel(chatViewItemModel,
 contents);

 getAuthorChatImage().setModel(new ImagePathFromIdModel(new
 PropertyModel(chatViewItemModel, authorProfileId)));
 getContents().setModel(contentsModel);
 }


 --

 WicketMessage: Error attaching this container for rendering:
 [MarkupContainer [Component id = chatDisplay, page =
 jumbuck.ffweb.wicket.page.FFWeb, path =
 0:main_tabbed_panel:target_panel:tabbed_panel:target_panel:
 chatDisplay.HotListTargetPanel$1,
 isVisible = true, isVersioned = false]]

 Root cause:

 java.util.ConcurrentModificationException
 at java.util.AbstractList$Itr.checkForComodification(AbstractList.java
 :372)
 at java.util.AbstractList$Itr.next(AbstractList.java:343)
 at
 org.apache.wicket.markup.repeater.util.ModelIteratorAdapter.next(
 ModelIteratorAdapter.java:60)
 at
 org.apache.wicket.markup.repeater.DefaultItemReuseStrategy$1.next(
 DefaultItemReuseStrategy.java:71)
 at
 org.apache.wicket.markup.repeater.RefreshingView.addItems(
 RefreshingView.java:189)
 at
 org.apache.wicket.markup.repeater.RefreshingView.onBeforeRender(
 RefreshingView.java:115)
 at org.apache.wicket.Component.beforeRender(Component.java:846)
 at
 org.apache.wicket.MarkupContainer.onBeforeRenderChildren(
 MarkupContainer.java:1449)
 at org.apache.wicket.Component.beforeRender(Component.java:856)
 at
 org.apache.wicket.MarkupContainer.onBeforeRenderChildren(
 MarkupContainer.java:1449)
 at org.apache.wicket.Component.beforeRender(Component.java:856)
 at
 org.apache.wicket.MarkupContainer.onBeforeRenderChildren(
 MarkupContainer.java:1449)
 at org.apache.wicket.Component.beforeRender(Component.java:856)
 at
 org.apache.wicket.ajax.AjaxRequestTarget.respondComponent(
 AjaxRequestTarget.java:757)
 at
 org.apache.wicket.ajax.AjaxRequestTarget.respondComponents(
 AjaxRequestTarget.java:662)
 at
 org.apache.wicket.ajax.AjaxRequestTarget.respond(AjaxRequestTarget.java
 :520)
 at
 org.apache.wicket.request.AbstractRequestCycleProcessor.respond(
 AbstractRequestCycleProcessor.java:103)
 at
 org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java
 :1037)
 at org.apache.wicket.RequestCycle.step(RequestCycle.java:1107)
 at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1176)
 at org.apache.wicket.RequestCycle.request(RequestCycle.java:499)
 at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java
 :257)
 at
 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java
 :127)
 --
 View this message in context:
 

[Wicket-user] navigating up from a frame

2007-07-18 Thread salmas


I am within the right frame of a frameset. The frameset has a tree in the
left frame. When the user clicks most of the links in the tree I want to
refresh the right frame. However, sometimes I want to navigate to a
frameless page (tree gone and show another frame in the app). I don't know
that I need to do this until I am inside the right frame and check a
setting. I should do this automatically and not have a user click a link or
something. When I do setResponsePage(MyPage.class);  from within the right
frame only the right frame refreshes. How can I replace the entire frameset
with MyPage.class?

Thanks
-- 
View this message in context: 
http://www.nabble.com/navigating-up-from-a-frame-tf4104180.html#a11671602
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Row index in datatable

2007-07-18 Thread Igor Vaynberg

 -- Forwarded message --
 From: Pierre Coquentin [EMAIL PROTECTED]
 To: wicket-user@lists.sourceforge.net
 Date: Wed, 18 Jul 2007 09:36:44 +0200
 Subject: Row index in datatable

 hello all,

 I need to obtain row index in datatable when populating cell item.
 column = new AbstractColumn(...)
 {
  public void populateItem(Item cellItem, String componentId, IModel
 model)
  {
 cellItem.getIndex() // Index of column
 ??? // Index  of row
 cellItem.add(...);
  }
 };


 After some deep research, i found same question posted

 http://www.mail-archive.com/wicket-user@lists.sourceforge.net/msg21743.html
 but no answer except an hack which don't work with wicket 1.3b2 (and
 didn't find the feature in JIRA).
 If someone can help me :P


i guess ingram never filed that jira request :( maybe you should

if this doesnt work:
((Item)cellItem.getParent()).getIndex()
then this will
((Item)cellItem.findParent(Item.class)).getIndex()

-igor






Thanks in advance.

 Pierre

 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Random ModalWindow exception

2007-07-18 Thread Igor Vaynberg
On 7/18/07, Alex Objelean [EMAIL PROTECTED] wrote:


 I am using wicket-1.2.6.

 Here is a short background description of the problem:

 I have a page, which contains an AjaxTabbedPanel. The panel contains div
 wicket:id=modalWindow/div markup to hold the ModalWindow component.

 I think that the modal.js is included (at least for its first call), but
 have problems when the ajaxTabbedPanel is updated via ajax.

 Any thoughts?


first try 1.2.6 branch. i know this is a problem that happens somewhat
rarely, but so far no one affected by it has been able to produce a
quickstart that replicates it. so we cant fix it. maybe you are that someone
:)

-igor




Thank you,
 Alex.


 Matej Knopp-2 wrote:
 
  What wicket version are you using?
 
  -Matej
 
  On 7/18/07, Alex Objelean [EMAIL PROTECTED] wrote:
 
  I have a strange issue when using ModalWindow in my application.
  Sometimes
  (randomly), I got the following error in ajax-debug window:
 
  [MESSAGE]
 
  INFO: Response parsed. Now invoking steps...
  ERROR: Exception evaluating javascript: TypeError: Wicket.Window has no
  properties
 
  [/MESSAGE]
 
  The reason, seems to be the fact that the modal.js is not always
  included. I
  didn't manage to find out why this is happening. Can anybody help me?
 
  Thank you!
  --
  View this message in context:
 
 http://www.nabble.com/Random-ModalWindow-exception-tf4102507.html#a11666379
  Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
 
 -
  This SF.net email is sponsored by DB2 Express
  Download DB2 Express C - the FREE version of DB2 express and take
  control of your XML. No limits. Just data. Click to get it now.
  http://sourceforge.net/powerbar/db2/
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
 
 -
  This SF.net email is sponsored by DB2 Express
  Download DB2 Express C - the FREE version of DB2 express and take
  control of your XML. No limits. Just data. Click to get it now.
  http://sourceforge.net/powerbar/db2/
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 

 --
 View this message in context:
 http://www.nabble.com/Random-ModalWindow-exception-tf4102507.html#a11666954
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] feature suggestion component instantiation

2007-07-18 Thread Igor Vaynberg
what does your strategy do? it redirects right? you do that with throw new
RestartResponseException - you can do the same from your constructor once
you check your model. it isnt that much later that you would fail - only
the init of super hierarchy.

-igor


On 7/18/07, Maurice Marrink [EMAIL PROTECTED] wrote:

 However besides the benefit of being more efficient it also prevents a
 lot of nasty stuff like throwing custom exceptions / NPE in the page
 constructor or redirecting, which i now have to take into account
 because the page is fully constructed. When the strategy can tell me
 for certain if the page is allowed i would not have to do that.

 Maurice

 On 7/18/07, Maurice Marrink [EMAIL PROTECTED] wrote:
  Right now i manually need to trigger
  isActionAuthorized(Component.RENDER); after the component has been
  fully initialized. I would like to abort as soon as possible.
 
  Maurice
 
  On 7/18/07, Johan Compagner [EMAIL PROTECTED] wrote:
   cant you test this with the render action check?
   that is always done also if the model is changed
  
   johan
  
  
   On 7/18/07, Maurice Marrink [EMAIL PROTECTED] wrote:
   
True you can't do setModel(foo) and expect your instantiation check
 to
work. Which imho is perfectly logical if you want to use your model
 in
the instantiation check you need to pass it in the constructor.
   
As for the example
We have a search page for students, uppon clicking on one of those
students, you go to a detail page for that student. that page also
contains several tabs to go to other relevant pages for the student
(like it's school grades). on these pages we made a quicksearch
function with contains amongst other things 2 buttons to navigate
forth and back between the searchresults of the search page, while
keeping the same view. Suppose i have sufficient rights to see the
detail pages of all students but only enough rights to see the
 grades
of my own students.
   
So if i make the search wide enough to get all students and then
select one of my own, going to the grades. That's fine. But if i
 then
navigate to another student i am not allowed to see the grades
(creating a new instance of the grades page in the process) i need
 to
know if the page in combination with the student is allowed, because
the page itself is basically allowed.
   
Maurice
   
On 7/18/07, Eelco Hillenius [EMAIL PROTECTED] wrote:
 I don't think I agree with that.

 MyComponent c = new MyComponent(); c.setModel(foo) wouldn't work
 for
 starters, and you can even set models mutliple times. Not to
 mention
 the other problems you mentioned in this thread. And finally, it
 would
 just invite people to go crazy with this functionality.

 But give us a good example of where using the model to determine
 an
 access restriction would actually be useful?

 Eelco


   
 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user

   
   
 -
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
   
  
 -
   This SF.net email is sponsored by DB2 Express
   Download DB2 Express C - the FREE version of DB2 express and take
   control of your XML. No limits. Just data. Click to get it now.
   http://sourceforge.net/powerbar/db2/
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
   https://lists.sourceforge.net/lists/listinfo/wicket-user
  
 

 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user

-
This SF.net email is 

Re: [Wicket-user] feature suggestion component instantiation

2007-07-18 Thread Eelco Hillenius
On 7/18/07, Maurice Marrink [EMAIL PROTECTED] wrote:
 True you can't do setModel(foo) and expect your instantiation check to
 work. Which imho is perfectly logical if you want to use your model in
 the instantiation check you need to pass it in the constructor.

 As for the example
 We have a search page for students, uppon clicking on one of those
 students, you go to a detail page for that student. that page also
 contains several tabs to go to other relevant pages for the student
 (like it's school grades). on these pages we made a quicksearch
 function with contains amongst other things 2 buttons to navigate
 forth and back between the searchresults of the search page, while
 keeping the same view. Suppose i have sufficient rights to see the
 detail pages of all students but only enough rights to see the grades
 of my own students.

 So if i make the search wide enough to get all students and then
 select one of my own, going to the grades. That's fine. But if i then
 navigate to another student i am not allowed to see the grades
 (creating a new instance of the grades page in the process) i need to
 know if the page in combination with the student is allowed, because
 the page itself is basically allowed.

Sounds to me like you have alternative ways to implement this, for
instance, construct what's on your page according to what can be
displayed, throw an auth exception in the page itself (doesn't sound
like you were doing this generically to start with?) or use an
intermediate page that functions like a switch. Also, if you really
want to follow your approach and IComponentInstantiationListener is
not rich enough, consider using AOP, which should give you all the
freedom you wish for.

Eelco

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] feature suggestion component instantiation

2007-07-18 Thread Igor Vaynberg
i am -1 on this

first of all there are already too many exception to this: it wont work if
its a wrap model, it wont work if its icomponentassignedmodel, blah blah
blah.

if i construct my component with new Component(id, foo) and foo is not
null then it is very clumsy that sometimes in the auth strategy it is all of
a sudden null and other times is not even though the exact same line is
executing. i bet a lot of people will be filing bug reports.

also i really wish we would limit passing around instances of not fully
constructed objects to users. we already do it in some places where it is
very strictly necessary, but we should not do this lightly.

i do not wish something like this introduced just to make maurice's life a
little easier, sorry maurice nothing personal.

-igor



On 7/18/07, Eelco Hillenius [EMAIL PROTECTED] wrote:

 I don't think I agree with that.

 MyComponent c = new MyComponent(); c.setModel(foo) wouldn't work for
 starters, and you can even set models mutliple times. Not to mention
 the other problems you mentioned in this thread. And finally, it would
 just invite people to go crazy with this functionality.

 But give us a good example of where using the model to determine an
 access restriction would actually be useful?

 Eelco

 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Nesting AjaxTabbedPanels when using AjaxLink

2007-07-18 Thread Igor Vaynberg
On 7/18/07, Jeff Pierce [EMAIL PROTECTED] wrote:

 I am new to Wicket and just getting my feet wet and looking for some
 advice.  I have an app I am building that contains a main row of Ajax tabs
 across the top.   Each tab's panel will have the following layout.  A set
 of
 menu's on the left and a set of tabs on the right for part of its content
 area.  I want the menu's to be Ajax links and the tabs to be Ajax tabs.
 When the user clicks on a menu choice, the content area should reload with
 a
 different set of ajax tabs.

 My question is what is the best way to hookup the ajax links to change the
 portion of the page that contains content area which includes a different
 set of tabs depending on the menu choice (stuff in red below)?  I have the
 tabs and subtabs loading OK, but not sure how to go about hooking up the
 ajax menu choices to change the subtab panel.

 Here's the basic layout:

 -
 Page header area
 -
 | *MainTab1* | MainTab2 |
 -
 |*Menu1* |
 | Menu2  || *Menu1Subtab1* |Menu1Subtab2|
 | Menu3  ||
 | Menu4  ||
 |||  Menu1Subtab1 Tab panel Content Area
 ||
 -
 Page footer area
 -


you have to replace the entire tabbedpanel that holds the menu1subtab links.

so menu1link.onclick(target) {
ajaxtabbedpanel newone=new menu1tabbedpanel(...);
menutabbedpanel.replacewith(newone);
menutabbedpanel=newone;
target.addcomponent(newone);
}

-igor




Thanks
 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] feature suggestion component instantiation

2007-07-18 Thread Igor Vaynberg
On 7/18/07, Eelco Hillenius [EMAIL PROTECTED] wrote:


 Sounds to me like you have alternative ways to implement this, for
 instance, construct what's on your page according to what can be
 displayed, throw an auth exception in the page itself (doesn't sound
 like you were doing this generically to start with?) or use an
 intermediate page that functions like a switch. Also, if you really
 want to follow your approach and IComponentInstantiationListener is
 not rich enough, consider using AOP, which should give you all the
 freedom you wish for.


i think its time for you to build something that uses aop and get it out of
your system :)

-igor
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] feature suggestion component instantiation

2007-07-18 Thread Eelco Hillenius
 i think its time for you to build something that uses aop and get it out of
 your system :)

Get it out of my system? I'm not exactly recommending AOP as I think
other solutions would be better.

after(Component c) returning: this(c)  execution(Component.new(..)) {
System.out.println(constructed component with model  + 
c.getModel());
}

Something like that works. I'm sure there's lots of ifs and buts, but
the point is that it is a possible way out.

Eelco

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] navigating up from a frame

2007-07-18 Thread salmas

The following works, thanks Igor!

  class TopPageRequestTarget implements IRequestTarget  { 
  private Class pageClass; 
  
  public TopPageRequestTarget(Class toPageClass) {
  super();
  pageClass=toPageClass;
  }
  
  public  void respond(RequestCycle requestCycle) {
  
requestCycle.getResponse().write(htmlheadscriptparent=' +
requestCycle.urlFor(PageMap.forName(pageClass.getName()),
  pageClass, null) + 
';/script/head/html); 
  } 
  
  public java.lang.Object getLock(RequestCycle requestCycle) {
  System.out.println(getLock called);
  return null;
  }
  
  public void detach(RequestCycle requestCycle) {
  System.out.println(detach called);
  }
  }

igor.vaynberg wrote:
 
 On 7/18/07, salmas [EMAIL PROTECTED] wrote:



 I am within the right frame of a frameset. The frameset has a tree in the
 left frame. When the user clicks most of the links in the tree I want to
 refresh the right frame. However, sometimes I want to navigate to a
 frameless page (tree gone and show another frame in the app). I don't
 know
 that I need to do this until I am inside the right frame and check a
 setting. I should do this automatically and not have a user click a link
 or
 something. When I do setResponsePage(MyPage.class);  from within the
 right
 frame only the right frame refreshes. How can I replace the entire
 frameset
 with MyPage.class?
 
 
 so you dont want to append target=top to the link but decide this after
 link has been clicked?
 
 toppagerequesttarget implements requesttarget {
   private final Class? extends Page pageClass;
   respond(requestcycle rc) {
 rc.getresponse().write(htmlheadwindow.top.location='
 +rc.urlfor(pageClass);+';/head/html);
   }
 }
 
 then instead of setResponsePage(MyPage.class) do
 getRequestCycle().setRequestTarget(new toppagerequesttarget(MyPage.class);
 
 -igor
 
 
 
 
 
 
 Thanks
 --
 View this message in context:
 http://www.nabble.com/navigating-up-from-a-frame-tf4104180.html#a11671602
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user

 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 

-- 
View this message in context: 
http://www.nabble.com/navigating-up-from-a-frame-tf4104180.html#a11674485
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Download / View Attacment (like gmail)

2007-07-18 Thread Francisco Diaz Trepat - gmail
Hi guys is there an easy way to have, say two buttons or links, one
downloads a txt file and the other one opens it up on a new window?

mus be ajax.

f(t)
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Overriding ID attributes

2007-07-18 Thread mperham

We are migrating our existing application from UI framework XXX to Wicket and
we have a boatload of UI automated tests which depend on the ID attribute of
our form inputs to drive the tests.  I'm trying to figure out how to get
Wicket to use the exact same IDs when it generates the HTML as with our old
system.  Here's an example of the generated HTML where I have a DropDown
within a Form:

td class=label
divlabel for=form_selBusinessServiceBusiness Service/label/div
/td
td class=input
  select name=selBusinessService id=form_selBusinessService
option selected=selected value=Choose One/option
option value=http://www.test-sdk/sdkl#Fetch_COB;Fetch COB/option
option value=http://www.test-sdk/sdkl#Status_Visibility;Status
Visibility/option
option value=http://www.test-sdk/sdkl#Claims_Submission;Claims
Submission/option
  /select
/td

Now the actual ID of the select should be selBusinessService and that's
the wicket:id of the component in Java but Wicket prepends the component
hierarchy, I guess, when auto-generating the id attribute in HTML.  Now I
can use an AttributeModifier to adjust the value of the ID but the
SimpleFormComponentLabel does NOT reflect that change in the for attribute.

Is it possible to do this?  Can I completely override Wicket's ID handling
and just have it use my specified ID?

mike
-- 
View this message in context: 
http://www.nabble.com/Overriding-ID-attributes-tf4105343.html#a11675275
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Overriding ID attributes

2007-07-18 Thread Igor Vaynberg
On 7/18/07, mperham [EMAIL PROTECTED] wrote:


 We are migrating our existing application from UI framework XXX to Wicket
 and
 we have a boatload of UI automated tests which depend on the ID attribute
 of
 our form inputs to drive the tests.  I'm trying to figure out how to get
 Wicket to use the exact same IDs when it generates the HTML as with our
 old
 system.  Here's an example of the generated HTML where I have a DropDown
 within a Form:

 td class=label
 divlabel for=form_selBusinessServiceBusiness
 Service/label/div
 /td
 td class=input
   select name=selBusinessService id=form_selBusinessService
 option selected=selected value=Choose One/option
 option value=http://www.test-sdk/sdkl#Fetch_COB;Fetch COB/option
 option value=http://www.test-sdk/sdkl#Status_Visibility;Status
 Visibility/option
 option value=http://www.test-sdk/sdkl#Claims_Submission;Claims
 Submission/option
   /select
 /td

 Now the actual ID of the select should be selBusinessService and that's
 the wicket:id of the component in Java but Wicket prepends the component
 hierarchy, I guess, when auto-generating the id attribute in HTML.  Now I
 can use an AttributeModifier to adjust the value of the ID but the
 SimpleFormComponentLabel does NOT reflect that change in the for
 attribute.

 Is it possible to do this?  Can I completely override Wicket's ID handling
 and just have it use my specified ID?


not right now, but creating setMarkupId() wont be very difficult. please add
a jira request.

-igor


mike
 --
 View this message in context:
 http://www.nabble.com/Overriding-ID-attributes-tf4105343.html#a11675275
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Overriding ID attributes

2007-07-18 Thread mperham

Igor, could you please attach a diff of your impl to WICKET-766?  I'm going
to need to backport it to our private fork of 1.2.6.

mike


igor.vaynberg wrote:
 

 Now the actual ID of the select should be selBusinessService and that's
 the wicket:id of the component in Java but Wicket prepends the component
 hierarchy, I guess, when auto-generating the id attribute in HTML.  Now I
 can use an AttributeModifier to adjust the value of the ID but the
 SimpleFormComponentLabel does NOT reflect that change in the for
 attribute.

 Is it possible to do this?  Can I completely override Wicket's ID
 handling
 and just have it use my specified ID?
 
 
 not right now, but creating setMarkupId() wont be very difficult. please
 add
 a jira request.
 
 

-- 
View this message in context: 
http://www.nabble.com/Overriding-ID-attributes-tf4105343.html#a11675528
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Overriding ID attributes

2007-07-18 Thread Igor Vaynberg
i dont remember how similar the markup id handling code is between the two
versions, but all i did was add this:

/**
 * Sets this component's markup id to a user defined value. It is up to
the
 * user to ensure this value is unique.
 * p
 * The recommended way is to let wicket generate the value
automatically,
 * this method is here to serve as an override for that value in cases
where
 * a specific id must be used.
 * p
 * If null is passed in the user defined value is cleared and markup id
 * value will fall back on automatically generated value
 *
 * @see #getMarkupId()
 *
 * @param markupId
 *markup id value or null to clear any previous user defined
 *value
 */
public void setMarkupId(String markupId)
{
if (markupId != null  Strings.isEmpty(markupId))
{
throw new IllegalArgumentException(Markup id cannot be an empty
string);
}
setMetaData(MARKUP_ID_KEY, markupId);

}


-igor


On 7/18/07, mperham [EMAIL PROTECTED] wrote:


 Igor, could you please attach a diff of your impl to WICKET-766?  I'm
 going
 to need to backport it to our private fork of 1.2.6.

 mike


 igor.vaynberg wrote:
 
 
  Now the actual ID of the select should be selBusinessService and
 that's
  the wicket:id of the component in Java but Wicket prepends the
 component
  hierarchy, I guess, when auto-generating the id attribute in HTML.  Now
 I
  can use an AttributeModifier to adjust the value of the ID but the
  SimpleFormComponentLabel does NOT reflect that change in the for
  attribute.
 
  Is it possible to do this?  Can I completely override Wicket's ID
  handling
  and just have it use my specified ID?
 
 
  not right now, but creating setMarkupId() wont be very difficult. please
  add
  a jira request.
 
 

 --
 View this message in context:
 http://www.nabble.com/Overriding-ID-attributes-tf4105343.html#a11675528
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] feature suggestion component instantiation

2007-07-18 Thread Maurice Marrink
Ok, thanks for your input guys, no hard feelings :)
There are indeed workarounds, i just thought it would be an elegant
solution if wicket supported it. But i guess you are right, there are
too many caveats.

Maurice

On 7/18/07, Eelco Hillenius [EMAIL PROTECTED] wrote:
  i think its time for you to build something that uses aop and get it out of
  your system :)

 Get it out of my system? I'm not exactly recommending AOP as I think
 other solutions would be better.

 after(Component c) returning: this(c)  execution(Component.new(..)) 
 {
 System.out.println(constructed component with model  + 
 c.getModel());
 }

 Something like that works. I'm sure there's lots of ifs and buts, but
 the point is that it is a possible way out.

 Eelco

 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Modal Window and Page Expired.

2007-07-18 Thread Laurent Brucher
Cookies have been cleared many times, without any success ;-)
 
But I found out what is causing (directly or indirectly) the problem:
In the page that includes the ajax button that is used to bring up the modal
window, there is a wicket:head section at the top of the page.
If I remove this wicket:head section, there is no problem with the modal
window anymore.
 
The page globally looks like:
html
head
...
/head
body
wicket:head.../wicket:head
wicket:extend

/wicket:extend
/body
/html
 
Somehow, I've noticed that including the wicket:head triggers an
additional HTTP request to the same URL (that is, the URL to display the
above page).
Dunno why this is happening but the end result is that the pagemap then
contains 2 versions for the same page ID.
Then, when I hit the button that brings up the modal window, the framework
is trying to access the above page, version 0. This has the effect of
putting that page's version at the top of the pagemap's access stack
(PageMap.access() method). By doing this, the version 1 of the page is
removed from the access stack, but also the page itself (call to
PageMap.remove(Page)).
Thus, once the modal window gets closed and the original page needs to be
rendered, we get a page expired since it was removed from the cache.
 
That's as far as I can describe what I've seen  understood tracing the
code.
I'm not sure where the problem lies: second request because of the
wicket:head or incorrectly evicting the page.
 
Maybe there is something funky in my own code but I don't see what. Or maybe
there is an issue here.
Any input would be helpful at this point.
 
Thanks!
Laurent.
 


  _  

From: Igor Vaynberg [mailto:[EMAIL PROTECTED] 
Sent: mercredi 18 juillet 2007 8:50
To: [EMAIL PROTECTED]; wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user] Modal Window and Page Expired.


On 7/13/07, Laurent Brucher [EMAIL PROTECTED] wrote: 

Hi all,
 
There was a post last December about the same problem that I'm facing right
now, which is getting a page expired error page after I close a modal
window.
The post was called Firefox and ModalWindow and seemed to talk about the
issue for FF only.
I've encountered the problem first with FF (2.0.0.4). After reading the
post, I tried with IE7 and it worked ok (that was this afternoon).
This evening, neither IE7 or FF work anymore. Darn! Clearing cookies and
stuff don't change a thing.
Oh, and of course, the Ajax ModalWindow example works just fine (my code is
heavily inspired from that example)...
I'm using Wicket 1.2.6, Tomcat 5.5.20, Jdk1.6u2.
 
Have you guys shed any light on this issue at all?
I've tried to trace the code, but as I'm rather new to Wicket, I couldn't
really figure out what's going on...
 
Anything I can do to help address this?


i wonder, clear cookies in firefox and try again. i know there was a similar
problem if you didnt set the cookie name in the modal window using
setcookiename(), but looks like you did that. still, try clearing the
cookies. 

-igor


 


Below is the code I use, just in case.
 
Reagrds,
Laurent.
 
 
// Page containing the modal window
public class MainPage extends WebPage {
public MainPage()
{
...
add( new PreferredStationsDialog(prefStationsDialog) ); 
...
}
}
 
// The modal window impl.
public class PreferredStationsDialog extends ModalWindow {
public PreferredStationsDialog(String id)
{
super(id);
 
setTitle(xyz);
setCookieName(prefStationsDialog);
setPageMapName(prefStationsDialogPageMap);
setPageCreator( new ModalWindow.PageCreator() {
@Override
public Page createPage() {
return new
PreferredStationsDialogPage(PreferredStationsDialog.this);
}
});
 
setCloseButtonCallback(new ModalWindow.CloseButtonCallback() {
public boolean onCloseButtonClicked(AjaxRequestTarget target) {
return true;
}
});
}
}
 
// The content of the modal window, as a Page
public class PreferredStationsDialogPage extends WebPage
{
public PreferredStationsDialogPage( final PreferredStationsDialog dialog
)
{
super();
 
add( new AjaxLink(button.save) {
@Override
public void onClick(AjaxRequestTarget target) {
dialog.close(target);
}
}.add( new Label(text, Save)) );
 
add( new AjaxLink(button.cancel ) {
@Override
public void onClick(AjaxRequestTarget target) {
dialog.close(target);
}
}.add( new Label(text, Cancel)) );
}
}
 

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now. 
http://sourceforge.net/powerbar/db2/

[Wicket-user] wicket-picocontainer?

2007-07-18 Thread David Rosenstrauch
I saw that the 1.3 distribution contains wicket-ioc*.jar, along with 
wicket-guice*.jar, and wicket-spring*.jar.

Just wondering:  has anybody put together a wicket-picocontainer package 
too, perchance?

TIA,

DR

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] wicket-picocontainer?

2007-07-18 Thread Eelco Hillenius
On 7/18/07, David Rosenstrauch [EMAIL PROTECTED] wrote:
 I saw that the 1.3 distribution contains wicket-ioc*.jar, along with
 wicket-guice*.jar, and wicket-spring*.jar.

 Just wondering:  has anybody put together a wicket-picocontainer package
 too, perchance?

That that I know of, but a contribution would be welcome :)

Eelco

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] wicket-picocontainer?

2007-07-18 Thread Jonathan Locke


I have not yet had a real need for IOC, but when I last looked some
years ago, picocontainer looked pretty nice.  We do have guice now,
but I think it would be great to integrate Wicket with picocontainer.
Unfortunately, I'm not aware of anyone doing this work.


David Rosenstrauch wrote:
 
 I saw that the 1.3 distribution contains wicket-ioc*.jar, along with 
 wicket-guice*.jar, and wicket-spring*.jar.
 
 Just wondering:  has anybody put together a wicket-picocontainer package 
 too, perchance?
 
 TIA,
 
 DR
 
 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 

-- 
View this message in context: 
http://www.nabble.com/wicket-picocontainer--tf4106610.html#a11679239
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Setting up project - images and stylesheets

2007-07-18 Thread jonaqua

I'd just use a wicket.markup.html.image.Image for each of the images, and
let wicket rewrite the src part of the img tag.  Then you can put whatever
you want in the src attribute.

Thanks.  Is that common practice?  It seems like it tightly couples the java
code with the design of the web page.  I thought the Image class was for
creating dynamic images - as that's all I've needed to use it for.  
-- 
View this message in context: 
http://www.nabble.com/Setting-up-project---images-and-stylesheets-tf4094209.html#a11679842
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Setting up project - images and stylesheets

2007-07-18 Thread Martijn Dashorst
I wonder what happened to the wicket:preview tag...

Another option is to use:

html
head
wicket:remove
link src=../../../../../src/main/webapp/style.css /
/wicket:remove
/head
body
etc.

But basically I've become quite proficient in reading HTML and classes
so I don't need the preview of the stylesheets anymore (it is not like
netbeans preview renders the same as, IE6 or IE5.5, which are browsers
from the 9th level of hell).

The best process I've come up with is:
 - make preview/dummy mockup of your site
 - ensure it is all CSS enabled, making development a blast
 - copy dummy site to your packages
 - split pages into panels, apply markup inheritance
 - move stuff around to fit a nice package model
 - sprinkle wicket:id's in each page/component
 - run the application in the debugger, dev mode and fill in the behavior.

Stylesheet and general javascript go into the context root. If
something special needs to be developed (geeky JS or such), I usually
do a spike/prototype and then incorporate back into the app.

Martijn

On 7/17/07, jonaqua [EMAIL PROTECTED] wrote:

 I'm just getting started with Wicket.

 I'm not sure how I should best link to stylesheets and images in my NetBeans
 project.

 For example, if I have the following code in my MyPage.html page:

 lt;img src=images/logo.pnggt;

 ...and I run the application, the image will reference web/images/logo.png.
 However, if I just quickly view that HTML file, it will reference
 src/java/package/images/logo.png and the image link will be broken.

 Is there a good way to set up the project besides keeping duplicate images
 and stylesheets both in the source code dir and the web dir?

 I realize if I move the HTML files to the web directory the problem will be
 solved but I'm trying to stick with the Wicket way of doing things for now
 (.HTML right next to .java in the source)

 Thanks
 --
 View this message in context: 
 http://www.nabble.com/Setting-up-project---images-and-stylesheets-tf4094209.html#a11641865
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



-- 
Wicket joins the Apache Software Foundation as Apache Wicket
Apache Wicket 1.3.0-beta2 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta2/

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Setting up project - images and stylesheets

2007-07-18 Thread jonaqua


Andrew Klochkov wrote:
 
 User ContextImage instead of Image for images in the web dir. BTW
 ContextImage could be stateless while making Image instance stateless is
 not so easy.
 

Thanks I'll have to take a look at it.  I'm still using 1.2.6 and I believe
ContextImage is only in 1.3.  (I thought it would be hard to learn 1.3 if
any of the examples are broken).

This seems to be closer to the solution be it still forces me tightly couple
the java and html code.  Shouldn't web designers be able to modify the HTML
'template' without touching any Java code?

I was hoping for something like a single application setting:

@Override
protected void init() {
this.getMarkupSettings().setImagesRelativeToRoot(true);
}



-- 
View this message in context: 
http://www.nabble.com/Setting-up-project---images-and-stylesheets-tf4094209.html#a11680016
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Setting up project - images and stylesheets

2007-07-18 Thread landtuna


 Thanks.  Is that common practice?  It seems like it tightly 
 couples the java code with the design of the web page.  
 I thought the Image class was for creating dynamic images - 
 as that's all I've needed to use it for.  

To be honest, I don't know.  If you don't want to put wicket:id attributes
in your images, maybe you could instead put some Javascript in a
HeaderContributor that rewrites the src attributes of all your images (or
all the ones of a particular css class) when the page loads.  This could fix
their paths while still letting their paths remain original in the raw HTML. 
(They wouldn't get changed because the script wouldn't get loaded.)
-- 
View this message in context: 
http://www.nabble.com/Setting-up-project---images-and-stylesheets-tf4094209.html#a11680081
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] java.util.ConcurrentModificationException with RefreshingView (AGAIN!?!?!!)

2007-07-18 Thread Ballist1c

It IS very possible I am going about this from the completely wrong angle... 

The gist of it is, that a whole bunch of users will be reading all the
entries from the same vector in an asynchronised manner. So what I thought
that each user would require their own Iterator to keep track of their
progress through the Vector ... 

The only actions I performed on the vector is adding to it.  I am thinking,
once the iterator is retrieved from getItemModels() does RefreshingView
store the iterator within itself for the duration that its being displayed?
cause if that is the case, i am thinking i dont even NEED to be storing the
iterator with each user!




igor.vaynberg wrote:
 
 On 7/18/07, Ballist1c [EMAIL PROTECTED] wrote:


 Yep, I made some adjustments to code, to allow for any number of users to
 join a chatSession, rather then just 2.

 What I am doing is , the vector that I am using is within a particular
 class
 and the Iterators for that vector are actually stored within another
 subclass which is stored within a hashmap within this class.
 
 
 w o w
 
 I got this working before with Iterators directly declared within the
 class,
 but now that I have moved the iterators to a hashMap so I can store
 multiple
 iterators to the same Vector, it has gone nuts... with the same error:(

 Anyway, let me know what you think
 
 
  obviously whatever this thing is, another thread is modifying it, or you
 are doing something elsewhere to modify it.
 
 what you should do is instead of returning an iterator directly first copy
 the values into an array list and return an iterator to that. java 101.
 
 -igor
 
 
 
 --
 chatRefreshingView = new RefreshingView(chatView, new
 PropertyModel(new PropertyModel(ChatView.this.getJumbuckSession(),
 currentChatSession), chatEntries))
 {
 protected Iterator getItemModels()
 {
 //i like cereal
 chatViewItemsIterator = new
 ModelIteratorAdapter(ChatView.this.getJumbuckSession
 ().getCurrentChatSessionIterator())
 {

 protected IModel model(Object object) {
 return new Model((Serializable) object);
 }
 };
 return chatViewItemsIterator;
 }
 protected void populateItem(Item item)
 {
 ChatViewItem chatViewItem = getItem(chatViewItem);
 item.add(chatViewItem);
 chatViewItem.setMyModels();
 }
 };

 add(chatRefreshingView);
 chatRefreshingView.setOutputMarkupId(true);


 ---
 public void setMyModels() //for chatViewItem.setMyModels() above
 {

 IModel chatViewItemModel = getParent().getModel();
 PropertyModel contentsModel = new
 PropertyModel(chatViewItemModel,
 contents);

 getAuthorChatImage().setModel(new ImagePathFromIdModel(new
 PropertyModel(chatViewItemModel, authorProfileId)));
 getContents().setModel(contentsModel);
 }


 --

 WicketMessage: Error attaching this container for rendering:
 [MarkupContainer [Component id = chatDisplay, page =
 jumbuck.ffweb.wicket.page.FFWeb, path =
 0:main_tabbed_panel:target_panel:tabbed_panel:target_panel:
 chatDisplay.HotListTargetPanel$1,
 isVisible = true, isVersioned = false]]

 Root cause:

 java.util.ConcurrentModificationException
 at java.util.AbstractList$Itr.checkForComodification(AbstractList.java
 :372)
 at java.util.AbstractList$Itr.next(AbstractList.java:343)
 at
 org.apache.wicket.markup.repeater.util.ModelIteratorAdapter.next(
 ModelIteratorAdapter.java:60)
 at
 org.apache.wicket.markup.repeater.DefaultItemReuseStrategy$1.next(
 DefaultItemReuseStrategy.java:71)
 at
 org.apache.wicket.markup.repeater.RefreshingView.addItems(
 RefreshingView.java:189)
 at
 org.apache.wicket.markup.repeater.RefreshingView.onBeforeRender(
 RefreshingView.java:115)
 at org.apache.wicket.Component.beforeRender(Component.java:846)
 at
 org.apache.wicket.MarkupContainer.onBeforeRenderChildren(
 MarkupContainer.java:1449)
 at org.apache.wicket.Component.beforeRender(Component.java:856)
 at
 org.apache.wicket.MarkupContainer.onBeforeRenderChildren(
 MarkupContainer.java:1449)
 at org.apache.wicket.Component.beforeRender(Component.java:856)
 at
 org.apache.wicket.MarkupContainer.onBeforeRenderChildren(
 MarkupContainer.java:1449)
 at org.apache.wicket.Component.beforeRender(Component.java:856)
 at
 org.apache.wicket.ajax.AjaxRequestTarget.respondComponent(
 AjaxRequestTarget.java:757)
 at
 org.apache.wicket.ajax.AjaxRequestTarget.respondComponents(
 AjaxRequestTarget.java:662)
 at
 

Re: [Wicket-user] Setting up project - images and stylesheets

2007-07-18 Thread jonaqua

Thanks, using wicket:remove sounds like a good idea.  Unfortunately, my CSS
skills are really lacking - so maybe this will motivate me to learn how to
use CSS to layout pages instead of tables.

Either that or all my image references will look like this :)

wicket:remove ../../../../../src/main/webapp/images/logo.png
/wicket:remove images/logo.png 
-- 
View this message in context: 
http://www.nabble.com/Setting-up-project---images-and-stylesheets-tf4094209.html#a11680168
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] java.util.ConcurrentModificationException with RefreshingView (AGAIN!?!?!!)

2007-07-18 Thread Igor Vaynberg
the view doesnt keep the iterator, it just iterates over it once when it
renders. iterators arent meant to be kept, they are throwaway objects.

-igor


On 7/18/07, Ballist1c [EMAIL PROTECTED] wrote:


 It IS very possible I am going about this from the completely wrong
 angle...

 The gist of it is, that a whole bunch of users will be reading all the
 entries from the same vector in an asynchronised manner. So what I thought
 that each user would require their own Iterator to keep track of their
 progress through the Vector ...

 The only actions I performed on the vector is adding to it.  I am
 thinking,
 once the iterator is retrieved from getItemModels() does RefreshingView
 store the iterator within itself for the duration that its being
 displayed?
 cause if that is the case, i am thinking i dont even NEED to be storing
 the
 iterator with each user!




 igor.vaynberg wrote:
 
  On 7/18/07, Ballist1c [EMAIL PROTECTED] wrote:
 
 
  Yep, I made some adjustments to code, to allow for any number of users
 to
  join a chatSession, rather then just 2.
 
  What I am doing is , the vector that I am using is within a particular
  class
  and the Iterators for that vector are actually stored within another
  subclass which is stored within a hashmap within this class.
 
 
  w o w
 
  I got this working before with Iterators directly declared within the
  class,
  but now that I have moved the iterators to a hashMap so I can store
  multiple
  iterators to the same Vector, it has gone nuts... with the same error:(
 
  Anyway, let me know what you think
 
 
   obviously whatever this thing is, another thread is modifying it, or
 you
  are doing something elsewhere to modify it.
 
  what you should do is instead of returning an iterator directly first
 copy
  the values into an array list and return an iterator to that. java 101.
 
  -igor
 
 
 
 
 --
  chatRefreshingView = new RefreshingView(chatView, new
  PropertyModel(new PropertyModel(ChatView.this.getJumbuckSession(),
  currentChatSession), chatEntries))
  {
  protected Iterator getItemModels()
  {
  //i like cereal
  chatViewItemsIterator = new
  ModelIteratorAdapter(ChatView.this.getJumbuckSession
  ().getCurrentChatSessionIterator())
  {
 
  protected IModel model(Object object) {
  return new Model((Serializable) object);
  }
  };
  return chatViewItemsIterator;
  }
  protected void populateItem(Item item)
  {
  ChatViewItem chatViewItem =
 getItem(chatViewItem);
  item.add(chatViewItem);
  chatViewItem.setMyModels();
  }
  };
 
  add(chatRefreshingView);
  chatRefreshingView.setOutputMarkupId(true);
 
 
 
 ---
  public void setMyModels() //for chatViewItem.setMyModels() above
  {
 
  IModel chatViewItemModel = getParent().getModel();
  PropertyModel contentsModel = new
  PropertyModel(chatViewItemModel,
  contents);
 
  getAuthorChatImage().setModel(new ImagePathFromIdModel(new
  PropertyModel(chatViewItemModel, authorProfileId)));
  getContents().setModel(contentsModel);
  }
 
 
 
 --
 
  WicketMessage: Error attaching this container for rendering:
  [MarkupContainer [Component id = chatDisplay, page =
  jumbuck.ffweb.wicket.page.FFWeb, path =
  0:main_tabbed_panel:target_panel:tabbed_panel:target_panel:
  chatDisplay.HotListTargetPanel$1,
  isVisible = true, isVersioned = false]]
 
  Root cause:
 
  java.util.ConcurrentModificationException
  at java.util.AbstractList$Itr.checkForComodification(AbstractList.java
  :372)
  at java.util.AbstractList$Itr.next(AbstractList.java:343)
  at
  org.apache.wicket.markup.repeater.util.ModelIteratorAdapter.next(
  ModelIteratorAdapter.java:60)
  at
  org.apache.wicket.markup.repeater.DefaultItemReuseStrategy$1.next(
  DefaultItemReuseStrategy.java:71)
  at
  org.apache.wicket.markup.repeater.RefreshingView.addItems(
  RefreshingView.java:189)
  at
  org.apache.wicket.markup.repeater.RefreshingView.onBeforeRender(
  RefreshingView.java:115)
  at org.apache.wicket.Component.beforeRender(Component.java:846)
  at
  org.apache.wicket.MarkupContainer.onBeforeRenderChildren(
  MarkupContainer.java:1449)
  at org.apache.wicket.Component.beforeRender(Component.java:856)
  at
  org.apache.wicket.MarkupContainer.onBeforeRenderChildren(
  MarkupContainer.java:1449)
  at org.apache.wicket.Component.beforeRender(Component.java:856)
  at
  org.apache.wicket.MarkupContainer.onBeforeRenderChildren(
  

Re: [Wicket-user] Setting up project - images and stylesheets

2007-07-18 Thread Igor Vaynberg
simply do this

have your images be relative

img src=images/logo.png/

in runtime wicket will rewrite them to be relative to context root

in devel time put this into head

wicket:remove
base href=../../../path/to/your/webapp/folder/
/wicket:remove

so at devel time your images will also be relative to context root.

-igor


On 7/16/07, jonaqua [EMAIL PROTECTED] wrote:


 I'm just getting started with Wicket.

 I'm not sure how I should best link to stylesheets and images in my
 NetBeans
 project.

 For example, if I have the following code in my MyPage.html page:

 lt;img src=images/logo.pnggt;

 ...and I run the application, the image will reference
 web/images/logo.png.
 However, if I just quickly view that HTML file, it will reference
 src/java/package/images/logo.png and the image link will be broken.

 Is there a good way to set up the project besides keeping duplicate images
 and stylesheets both in the source code dir and the web dir?

 I realize if I move the HTML files to the web directory the problem will
 be
 solved but I'm trying to stick with the Wicket way of doing things for now
 (.HTML right next to .java in the source)

 Thanks
 --
 View this message in context:
 http://www.nabble.com/Setting-up-project---images-and-stylesheets-tf4094209.html#a11641865
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Will the component be serialized twice ?

2007-07-18 Thread rc.china

This is my code:
[code]
public class MyPage extends WebPage {
private Panel panel = null;
public MyPage()
{
this.panel = new MyPanel(...);
add(this.panel)
//...
}
[/code]

Will the panel be serialized twice ? Thx!
-- 
View this message in context: 
http://www.nabble.com/Will-the-component-be-serialized-twice---tf4107511.html#a11680572
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Will the component be serialized twice ?

2007-07-18 Thread Eelco Hillenius
 This is my code:
 [code]
 public class MyPage extends WebPage {
 private Panel panel = null;
 public MyPage()
 {
 this.panel = new MyPanel(...);
 add(this.panel)
 //...
 }
 [/code]

 Will the panel be serialized twice ? Thx!

Nope. You just have multiple references to the same object. Java's
serialization is smart enough to make that distinction.

Eelco

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] wicket-picocontainer?

2007-07-18 Thread David Rosenstrauch
Eelco Hillenius wrote:
 On 7/18/07, David Rosenstrauch [EMAIL PROTECTED] wrote:
 I saw that the 1.3 distribution contains wicket-ioc*.jar, along with
 wicket-guice*.jar, and wicket-spring*.jar.

 Just wondering:  has anybody put together a wicket-picocontainer package
 too, perchance?
 
 That that I know of, but a contribution would be welcome :)
 
 Eelco

Understood.  Let me dig into my project a bit more and see how much I 
need it - and how much work it would be.  If the cost/benefit looks good 
then I'll try to put one together.

Thanks,

DR

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Setting up project - images and stylesheets

2007-07-18 Thread landtuna

I added Igor's response to this question to the FAQ in the wiki since it
seemed so useful and I hadn't seen it explained elsewhere.
-- 
View this message in context: 
http://www.nabble.com/Setting-up-project---images-and-stylesheets-tf4094209.html#a11680815
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] java.util.ConcurrentModificationException with RefreshingView (AGAIN!?!?!!)

2007-07-18 Thread Ballist1c

got it I definately was trying to extend there scope for something they can't
be used for :), 

my goal is to get the users to only render what they have to in the vector. 
I do not want them to have to re-render the entire Vector each time. The
vector will be constantly added too, there are no modifications to existing
data however. having the user re-render the entire vector becomes
impractical.  

I have done some reading on nabble and I require the page to display the
current items without having to re-render them, and rendering new Vector
items as they become available.  From what I can see, the solution to this
lies in javascript DOMs... *sigh*... im allergic to javascript :)  

Thanks for your assistance again igor.



igor.vaynberg wrote:
 
 the view doesnt keep the iterator, it just iterates over it once when it
 renders. iterators arent meant to be kept, they are throwaway objects.
 
 -igor
 
 
 On 7/18/07, Ballist1c [EMAIL PROTECTED] wrote:


 It IS very possible I am going about this from the completely wrong
 angle...

 The gist of it is, that a whole bunch of users will be reading all the
 entries from the same vector in an asynchronised manner. So what I
 thought
 that each user would require their own Iterator to keep track of their
 progress through the Vector ...

 The only actions I performed on the vector is adding to it.  I am
 thinking,
 once the iterator is retrieved from getItemModels() does RefreshingView
 store the iterator within itself for the duration that its being
 displayed?
 cause if that is the case, i am thinking i dont even NEED to be storing
 the
 iterator with each user!




 igor.vaynberg wrote:
 
  On 7/18/07, Ballist1c [EMAIL PROTECTED] wrote:
 
 
  Yep, I made some adjustments to code, to allow for any number of users
 to
  join a chatSession, rather then just 2.
 
  What I am doing is , the vector that I am using is within a particular
  class
  and the Iterators for that vector are actually stored within another
  subclass which is stored within a hashmap within this class.
 
 
  w o w
 
  I got this working before with Iterators directly declared within the
  class,
  but now that I have moved the iterators to a hashMap so I can store
  multiple
  iterators to the same Vector, it has gone nuts... with the same
 error:(
 
  Anyway, let me know what you think
 
 
   obviously whatever this thing is, another thread is modifying it, or
 you
  are doing something elsewhere to modify it.
 
  what you should do is instead of returning an iterator directly first
 copy
  the values into an array list and return an iterator to that. java 101.
 
  -igor
 
 
 
 
 --
  chatRefreshingView = new RefreshingView(chatView, new
  PropertyModel(new PropertyModel(ChatView.this.getJumbuckSession(),
  currentChatSession), chatEntries))
  {
  protected Iterator getItemModels()
  {
  //i like cereal
  chatViewItemsIterator = new
  ModelIteratorAdapter(ChatView.this.getJumbuckSession
  ().getCurrentChatSessionIterator())
  {
 
  protected IModel model(Object object) {
  return new Model((Serializable) object);
  }
  };
  return chatViewItemsIterator;
  }
  protected void populateItem(Item item)
  {
  ChatViewItem chatViewItem =
 getItem(chatViewItem);
  item.add(chatViewItem);
  chatViewItem.setMyModels();
  }
  };
 
  add(chatRefreshingView);
  chatRefreshingView.setOutputMarkupId(true);
 
 
 
 ---
  public void setMyModels() //for chatViewItem.setMyModels() above
  {
 
  IModel chatViewItemModel = getParent().getModel();
  PropertyModel contentsModel = new
  PropertyModel(chatViewItemModel,
  contents);
 
  getAuthorChatImage().setModel(new ImagePathFromIdModel(new
  PropertyModel(chatViewItemModel, authorProfileId)));
  getContents().setModel(contentsModel);
  }
 
 
 
 --
 
  WicketMessage: Error attaching this container for rendering:
  [MarkupContainer [Component id = chatDisplay, page =
  jumbuck.ffweb.wicket.page.FFWeb, path =
  0:main_tabbed_panel:target_panel:tabbed_panel:target_panel:
  chatDisplay.HotListTargetPanel$1,
  isVisible = true, isVersioned = false]]
 
  Root cause:
 
  java.util.ConcurrentModificationException
  at java.util.AbstractList$Itr.checkForComodification(AbstractList.java
  :372)
  at java.util.AbstractList$Itr.next(AbstractList.java:343)
  at
  org.apache.wicket.markup.repeater.util.ModelIteratorAdapter.next(
  

Re: [Wicket-user] Setting up project - images and stylesheets

2007-07-18 Thread jonaqua

Thanks Igor.

I don't believe this works offline (atleast under firefox in ubuntu).  It
works fine if I put a real web URL (i.e. http://www.google.com).

I've tried all sorts of combinations (relative and absolute).  I may be
specifying the absolute path incorrectly.  I tried 3 and 4 forward slashes
(since on linux root is '/')

href=file:///home/blah/blah, href=file:home/blah/blah,
href=../blah/blah.  Each time, I tried using /images/logo.png and
images/logo.png.  It seemed to ignore the base tag unless it specified an
http address.

head
titleMyTest/title
base href=file:///home/user/projects/mytest/web/
/head
body
lt;img src=images/logo.png/gt;
/body



igor.vaynberg wrote:
 
 simply do this
 
 have your images be relative
 
  images/logo.png 
 
 in runtime wicket will rewrite them to be relative to context root
 
 in devel time put this into head
 
 wicket:remove
 base href=../../../path/to/your/webapp/folder/
 /wicket:remove
 
 so at devel time your images will also be relative to context root.
 
 -igor
 
 
 On 7/16/07, jonaqua [EMAIL PROTECTED] wrote:


 I'm just getting started with Wicket.

 I'm not sure how I should best link to stylesheets and images in my
 NetBeans
 project.

 For example, if I have the following code in my MyPage.html page:

 lt;img src=images/logo.pnggt;

 ...and I run the application, the image will reference
 web/images/logo.png.
 However, if I just quickly view that HTML file, it will reference
 src/java/package/images/logo.png and the image link will be broken.

 Is there a good way to set up the project besides keeping duplicate
 images
 and stylesheets both in the source code dir and the web dir?

 I realize if I move the HTML files to the web directory the problem will
 be
 solved but I'm trying to stick with the Wicket way of doing things for
 now
 (.HTML right next to .java in the source)

 Thanks
 --
 View this message in context:
 http://www.nabble.com/Setting-up-project---images-and-stylesheets-tf4094209.html#a11641865
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user

 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 

-- 
View this message in context: 
http://www.nabble.com/Setting-up-project---images-and-stylesheets-tf4094209.html#a11681135
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Setting up project - images and stylesheets

2007-07-18 Thread jonaqua

While I could not get it to work completely offline.  As long as I have my
local webserver running, this works perfectly fine..  thanks so much! :)

head
titleMyTest/title
wicket:remove
base href=http://localhost:8080/MyProject/;
/wicket:remove
/head
body
lt;img src=images/logo.png/gt;
/body
-- 
View this message in context: 
http://www.nabble.com/Setting-up-project---images-and-stylesheets-tf4094209.html#a11681306
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] wicket-picocontainer?

2007-07-18 Thread Igor Vaynberg
putting one together should be trivial. you can pretty much copy
wicket-spring and replace all the spring bits (of which there are only few)
with pico's

-igor


On 7/18/07, David Rosenstrauch [EMAIL PROTECTED] wrote:

 Eelco Hillenius wrote:
  On 7/18/07, David Rosenstrauch [EMAIL PROTECTED] wrote:
  I saw that the 1.3 distribution contains wicket-ioc*.jar, along with
  wicket-guice*.jar, and wicket-spring*.jar.
 
  Just wondering:  has anybody put together a wicket-picocontainer
 package
  too, perchance?
 
  That that I know of, but a contribution would be welcome :)
 
  Eelco

 Understood.  Let me dig into my project a bit more and see how much I
 need it - and how much work it would be.  If the cost/benefit looks good
 then I'll try to put one together.

 Thanks,

 DR

 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] closing ServletResponse stream/writer

2007-07-18 Thread jan_bar
Thans for the answer, but I never said that BufferedHttpServletResponse is
handled by container. In my opinion, BufferedHttpServletResponse should not
call servletResponse.getOutputStream().close(), as pointed in my first
quesion. There can be other filters up the chain who want to write to the
response. Besides that, wicket is incosistent. For instance WebResponse uses
httpServletResponse.getWriter(), but never calls close() on it.

Regards, Jan

-- 
Jan Bares
http://jan.vegetband.cz


Jean-Baptiste Quenot [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 * jan_bar:
 
  the ServletResponse javadoc doesn't state if and when one should call
  getWriter().close() or getOutputStream().close(). I have a filter that
  writes comments after the request was processed. Wicket sometimes closes
the
  response and sometimes not. For instance
  BufferedHttpServletResponse.writeTo(HttpServletResponse servletResponse)
  calls:
 
  final OutputStream out = servletResponse.getOutputStream();
  out.write(this.byteBuffer);
  out.close();

 FYI BufferedHttpServletResponse is not directly handled by the
 servlet container, it is a wrapper around the real response for
 the REDIRECT_TO_BUFFER RenderStrategy.
 -- 
  Jean-Baptiste Quenot
 aka  John Banana   Qwerty
 http://caraldi.com/jbq/

 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/




-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user