Re: Multiple wicket:child / tags on a single base page?

2007-11-07 Thread Mats Norén
On Nov 7, 2007 11:31 AM, Mats Norén [EMAIL PROTECTED] wrote:
 Hmm...I'm interested in seeing the difference as well. I would love to
 get it but right now I don't.

 Chris Colman wrote:
 This new feature, or extension of the exiting feature, allows more than
 one section of markup to be specialized by derived (extended) markups
 whereas currently wicket only supports the deferred
 definition/implementation of a single markup section in any page. In
 other words we want to make a powerful feature even more powerful.

 Is the above statement really true considering that by adding abstract
 methods to your page you defer the creation of the markup in just the
 same way as the new proposed solution?

 BasePage.java

 public BasePage() {
 addAbstract1(abstractId1);
 addAbstract2(abstractId2);
 }

 public abstract addAbstract1(String abstractId1);
 public abstract addAbstract2(String abstractId2);

A little typo here..I meant:

public BasePage() {
add(addAbstract1(abstractId1));
add(addAbstract2(abstractId2));
 }

public abstract Component addAbstract1(String abstractId1);
public abstract Component addAbstract2(String abstractId2);

/Mats

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



Re: facebook support

2007-11-09 Thread Mats Norén
What kind of support are we talking about?
Being able to build applications or retrieving information from FB or MySpace?
Or both?

/Mats

On Nov 9, 2007 9:16 AM, Stefan Fußenegger [EMAIL PROTECTED] wrote:

 I'd be interested in Facebook and Open Social support. However, I don't have
 any experience with either of them.

 It would be extremely cool to have a common interface for both of them -
 write once run everywhere.

 I would also help implementing it. I don't have much time to spend tough.
 For my project, facebook and open social support won't be required within
 the next 6 month. (But it would be cool to have.)

 -- Stefan




 Jonathan Locke wrote:
 
  I'd like to get facebook support into Wicket.  If anyone out there has
  interest and would like to cooperate(particularly anyone with Facebook
  experience), please get in touch with me.  Thanks.
 


 -
 ---
 Stefan Fußenegger
 http://talk-on-tech.blogspot.com // looking for a nicer domain ;)
 --
 View this message in context: 
 http://www.nabble.com/facebook-support-tf4773546.html#a13662919

 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Problems in beta3

2007-11-26 Thread Mats Norén
Hi,
We've got a problem in our application when using the back button.
The click trail goes something like this:
- User clicks on search documents, which is a BookmarkablePageLink
- User enters a couple of criteria and hits the search button =
setResponsePage(SearchDocument.class, params = encoded
searchcriteria)
Application displays a paginated list of documents with
bookmarkablepagelinks to display detailed content about each document.
User clicks on page two of n pages and then decides to look closer at
a document by following the link to the detailed view.
Application displays an overview of the document

Now if the user presses the back button in the application to go back
to the search page, the page displays correctly but any following
click result in this error message:

Root cause:

java.lang.IllegalArgumentException: object is not an instance of declaring class
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at java.lang.reflect.Method.invoke(Method.java:585)
at 
org.apache.wicket.proxy.LazyInitProxyFactory$JdkHandler.invoke(LazyInitProxyFactory.java:402)
at org.apache.wicket.proxy.$Proxy76.searchDocuments(Unknown Source)
at 
x.document.page.document.search.AdvancedSearchDocument.search(AdvancedSearchDocument.java:156)
at 
x.document.page.document.search.AbstractSearchDocument$1.load(AbstractSearchDocument.java:77)
at 
org.apache.wicket.model.LoadableDetachableModel.getObject(LoadableDetachableModel.java:111)
at x.document.component.ListDocumentPanel$2.isVisible(ListDocumentPanel.java:84)
at org.apache.wicket.Component.isVisibleInHierarchy(Component.java:1794)
at org.apache.wicket.markup.html.form.Form$3.onFormComponent(Form.java:726)
at 
org.apache.wicket.markup.html.form.FormComponent$AbstractVisitor.formComponent(FormComponent.java:94)
at 
org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:403)
at 
org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:390)
at 
org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:390)
at 
org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrder(FormComponent.java:368)
at 
org.apache.wicket.markup.html.form.Form.visitFormComponentsPostOrder(Form.java:1004)
at 
org.apache.wicket.markup.html.form.Form.loadPersistentFormComponentValues(Form.java:716)
at org.apache.wicket.Page$9.component(Page.java:1502)
at org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java:833)
at org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java:848)
at org.apache.wicket.Page.setFormComponentValuesFromCookies(Page.java:1497)
at org.apache.wicket.Page.renderPage(Page.java:859)
at 
org.apache.wicket.request.target.component.PageRequestTarget.respond(PageRequestTarget.java:64)
at 
org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:103)
at 
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1038)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1108)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1177)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:500)
at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:261)
at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:127)
at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
at 
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:174)
at 
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)
at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
at 
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:265)
at 
org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107)
at 
org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)
at 
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at 
org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110)
at 
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at 
org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:175)
at 
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at org.acegisecurity.ui.logout.LogoutFilter.doFilter(LogoutFilter.java:106)
at 
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at 
org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:286)
at 

Re: Checkbox tree component

2007-12-07 Thread Mats Norén
Doug, great work!
Can I just ask you a question, what does your implementation of the
CategoryTreeModel look like?
I've been trying all sorts of approaches for doing a similar category
tree but I've never liked / got the model approach to work in a nice
fashion. :)

/Regards Mats

On Oct 27, 2007 6:04 AM, Doug Leeper [EMAIL PROTECTED] wrote:

 Ok here it is.  I have also included my use of it.  While it won't compile
 for you...you will at least see how I have used it.

 http://www.nabble.com/file/p13439520/CheckBoxIconPanel.html
 CheckBoxIconPanel.html
 http://www.nabble.com/file/p13439520/CheckBoxIconPanel.java
 CheckBoxIconPanel.java
 http://www.nabble.com/file/p13439520/CheckBoxTree.java CheckBoxTree.java

 My use of CheckBoxTree...

 http://www.nabble.com/file/p13439520/ProductCategoriesPanel.html
 ProductCategoriesPanel.html
 http://www.nabble.com/file/p13439520/ProductCategoriesPanel.java
 ProductCategoriesPanel.java

 --
 View this message in context: 
 http://www.nabble.com/Checkbox-tree-component-tf4699092.html#a13439520

 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Re: Disabling Modal Unload Confirmation

2008-02-14 Thread Mats Norén

UPBrandon wrote:

I have a page that uses ModalWindows and I would like to disable the
JavaScript confirmation that is displayed when you try to leave the page
while a modal window is open.  As recommended by developers here, I added
Wicket.Window.unloadConfirmation = false; in my page header to disable
those confirmations.  However, when the page loads, the browser gives me an
error say that Wicket.Window doesn't have any properties.  As you might
expect, the confirmation dialog is not not disabled.

Looking at the source for my page, it looks like my code, which was declared
inside of a wicket:head tag, is called before Wicket's modal.js.  I assume
that including modal.js before Wicket.Window.unloadConfirmation = false
would fix the problem but I'm not sure how to do that. Does anyone know of a
way to fix this?


You could try to add the Wicket.Window.unloadConfirmation = false in 
the a IHeaderContributor and use response.addOnDomReadyJavaScript(...).


That way the script is executed when everything is ready.

/Mats



-Brandon



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



Re: export excel file via an OutputStream

2008-04-01 Thread Mats Norén
What's the problem with that?

You want an OutputStream to send to your excelGen and Igor showed you
how to obtain one...what else do you need?

/M

On Tue, Apr 1, 2008 at 12:06 PM,  [EMAIL PROTECTED] wrote:
 FY.  Once you reach getResponse.getOutputStream, you are back to
  square one with servlet programming.



  wtf
  
  -igor
  
  
  On Tue, Apr 1, 2008 at 1:12 AM,  [EMAIL PROTECTED] wrote:
   In a raw servlet programming, it is trivial,
just get response outputstream, set headers and pass it
to the excelGen (as a poorman's way, close the connection after done)
Wicket got to have a more structured api for this common task.
  
  
  
This one (even with model args) falls to the same category of
getting the inputstream actively. I do not see how I can
define the model to get data since the controlling side is
excelGen(outputstream). it keeps writing data to outputstream.
and I am trying to get it directly send back to browser.
It has to directly write to the response stream in a single thread
or it would block.

see DownloadLink

-igor


On Tue, Apr 1, 2008 at 12:45 AM,  [EMAIL PROTECTED] wrote:
 This does not apply as it copies input to output.
  My issue is that in OnClick()  I  call

  excelGen(OutputStream)

  to produce the bytes on the fly.  but the ResourceStream
  needs InputStream that wicket would read data to send as response.
  My take is that I need to get a handle of the reponse
  outputstream to pass it to excelGen. But How to do it at wicket api
  level

instead
  of bypass it to directly get servlet reponse stream.



  see Streams.copy() in wicket utils package
  
  -igor
  
  On Tue, Apr 1, 2008 at 12:31 AM,  [EMAIL PROTECTED] wrote:
   Hello:
I am trying to export dynamically generated excel file.
The generator would send the file.xls to an OutputStream.
  
In wicket, I am trying to use example as below but
 how can I connect the OutputStream to the inputstream
ins.  Pipedoutputstream would block. Using a separate thread
is not desirable.
  
public void onClick() {
  
  IResourceStream stream = new AbstractResourceStream() {
  
public InputStream getInputStream()
  throws
  ResourceStreamNotFoundException {
  
  
return ins;
}
  
public void close() throws IOException {
ins.close();
}
};
  
getRequestCycle().setRequestTarget(
new
  ResourceStreamRequestTarget(stream).setFileName(file.xls));
  

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

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



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


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

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

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



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