Open source Wicket blog

2009-10-14 Thread Daniel Frisk

Hi,

we have developed a blog tool in Wicket for our website. I just wanted  
to see if there is any interest in having that as an open source  
project?
The code would have to be adopted for general use and be untangled  
from some dependencies that we don't want to open source, so I just  
want to check if there is any interest before doing the initial work.  
Not promising anything so don't start haunting me, but let me know if  
you are interested.


Check it out at:
http://jalbum.net/blog

// Daniel
jalbum.net

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



Re: Open source Wicket blog

2009-10-14 Thread Martin Makundi
It would be nice to bundle a wicket app with a blog site yes! The
challenge is how to make it open such that it is easy (=lightweight)
to attach to any particular conventions (authentication, memberships,
etc.) of the main site.

**
Martin

2009/10/14 Daniel Frisk dan...@jalbum.net:
 Hi,

 we have developed a blog tool in Wicket for our website. I just wanted to
 see if there is any interest in having that as an open source project?
 The code would have to be adopted for general use and be untangled from some
 dependencies that we don't want to open source, so I just want to check if
 there is any interest before doing the initial work. Not promising anything
 so don't start haunting me, but let me know if you are interested.

 Check it out at:
 http://jalbum.net/blog

 // Daniel
 jalbum.net

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



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



Re: Open source Wicket blog

2009-10-14 Thread Thomas Singer
Hi Daniel,

We are currently using Pebble which has the advantage of storing the blog
content in plain text files. But its development seems to have stalled, so
I'm searching an alternative. Using a blog tool which uses Wicket would be
of much interest to me, because we use Wicket for our website and hence are
quiet accustomed to it(*).

Tom

(*) If there is no mysterious black-box like dependency injection used.


Daniel Frisk wrote:
 Hi,
 
 we have developed a blog tool in Wicket for our website. I just wanted
 to see if there is any interest in having that as an open source project?
 The code would have to be adopted for general use and be untangled from
 some dependencies that we don't want to open source, so I just want to
 check if there is any interest before doing the initial work. Not
 promising anything so don't start haunting me, but let me know if you
 are interested.
 
 Check it out at:
 http://jalbum.net/blog
 
 // Daniel
 jalbum.net
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 

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



Re: Italian Bank (was Re: Wicket 1.4.2 Released!)

2009-10-14 Thread Giovanni
The bank is Intesa San Paolo: http://www.group.intesasanpaolo.com

This is the english link: 
http://group.intesasanpaolo.com/scriptIsir0/isInvestor/eng/home/eng_index.jsp

Our wicket webapps are still in development. They will be released at the end 
of this year.

The system is made of two webapps:
  - one on intranet
  - one on internet

We use Wicket (with Wicket Security), Spring (with Spring Security), iBATIS, 
JMS (to connect to the mainframe host), Weblogic, Oracle, Java 6.

If someone is interested in having more details, let me know.

Best regards,
giovanni



 
Resources are limited, Imagination is unlimited.







From: Randy S. randypo...@gmail.com
To: users@wicket.apache.org
Sent: Tue, October 13, 2009 10:41:14 PM
Subject: Italian Bank (was Re: Wicket 1.4.2 Released!)

Giovanni,
What bank is this?  What is the URL and is there anything of particular
interest that we can see without accounts?

On Sat, Oct 10, 2009 at 7:05 AM, Giovanni pino_o...@yahoo.com wrote:

 Wow!!!

 I will upgrade my project for a major italian bank on coming monday.

 Thanks a lot for all your efforts in developing this great web framework!

 Best regards,
 giovanni





  

Re: Open source Wicket blog

2009-10-14 Thread sfussenegger

I'd really love to bundle a blog with some webapps (mainly to get same
look-and-feel, authentication and reduce maintenance). However, it really
should be feature-complete in order to be usable (feeds, comment moderation,
spam protection, pings and trackbacks, nice admin interface, nice editor,
maybe syntax highlighting, ...). 

So yes, I'd be interested. But mostly to use it, not to build it (due to a
current major lack of time). But as soon as it is production ready, I'd be
happy to (at least) contribute patches. 

Cheers


Daniel Frisk wrote:
 
 Hi,
 
 we have developed a blog tool in Wicket for our website. I just wanted  
 to see if there is any interest in having that as an open source  
 project?
 The code would have to be adopted for general use and be untangled  
 from some dependencies that we don't want to open source, so I just  
 want to check if there is any interest before doing the initial work.  
 Not promising anything so don't start haunting me, but let me know if  
 you are interested.
 
 Check it out at:
 http://jalbum.net/blog
 
 // Daniel
 jalbum.net
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Open-source-Wicket-blog-tp25886040p25886616.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Website 2.0

2009-10-14 Thread Daniel Frisk
This isn't offical or anything but I know how interesting technical  
details are. So here it goes, just for you (and the list of course :-)


Hits are ~10 MPages / day with thousands of new users each day so it's  
steadily increasing.


We run our own hosting and try to keep it cost efficent. Separate  
clusters for community, widgets and Camelot. The community is based  
on Wicket, clustered with Terracotta and runs on Jetty. Database is  
MySql - Percona editon. That's about it.


We also do a free downloadable desktop application for album  
generation, that I personally think is one of the best Java apps out  
there.


// Daniel
jalbum.net


On 2009-10-13, at 17:04, Jeremy Thomerson wrote:

Very nice work.  Do you know about how many hits your site gets  
regularly?


--
Jeremy Thomerson
http://www.wickettraining.com



On Tue, Oct 13, 2009 at 6:08 AM, Daniel Frisk dan...@jalbum.net  
wrote:



Thanks guys!

We are really happy with the site, it's getting there!

I have no idea how many human-hours we have spent. It have gone  
thru a
first incarnation and then some incremental refinements and finally  
this

overhaul that we recently did. ~1000 perhaps, maybe? :-)

// Daniel
jalbum.net



On 2009-10-13, at 10:23, Pieter Degraeuwe wrote:

Indeed: nice piece of work !


On Tue, Oct 13, 2009 at 10:01 AM, Juri Prokofiev proj...@gmail.com
wrote:

This is a really nice work. Amazing! How many human-hours have you

spent for development?




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





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



Announcement: Annotation-based Mounting of Resources

2009-10-14 Thread Stefan Fussenegger
Today, I’m happy to announce the availability of annotation-based 
mounting and merging of resources in wicketstuff-merged-resources 
(version 3.0-SNAPSHOT for Wicket 1.4, version 2.1-SNAPSHOT for Wicket 
1.3). In order to mount resources, all that’s needed is adding 
annotations to component classes:


@JsContribution
@CssContribution(media = print)
@ResourceContribution(value = accept.png, path = /img/accept.png)
public class PanelOne extends Panel {

public PanelOne(String id) {
super(id);
// ...
}
}

As an added benefit, you’ll get all the other features of 
wicketstuff-merged-resources:


merging of multiple files into one for less HTTP requests
adding of versions to resource paths for aggressive caching
pre-processing of resources (e.g. replacing colors in CSS files)
optionally uploading them to Amazon Cloudfront (well, at least you can 
expect this feature soon – we are using it already)
So you will speed up rendering of your pages while simplifying and 
reducing your code (there’s no need to merge, mount or add 
HeaderContributors manually anymore)!


More on our blog ...
http://techblog.molindo.at/2009/10/wicket-annotation-based-mounting-of-resources.html

... and Wicket Stuff Wiki:
http://wicketstuff.org/confluence/display/STUFFWIKI/wicketstuff-merged-resources

Cheers

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



Re: Right justify in DataTable

2009-10-14 Thread Swanthe Lindgren

Try this (cut and pasted from the inmethod-grid-examples app)

new PropertyColumn(new ResourceModel(NumberCol), NumberCol, 
NumberCol) {

   private static final long serialVersionUID = 1L;
   @Override
   public String getCellCssClass(IModel rowModel, int rowNum) {
   return myCssClassThatRightJustifies;
   }
   };

//Swanthe

Swarnim Ranjitkar wrote:
If I user DefaultDataTable to display table. Is there a way justify the numberic column. eg.  I want NumberCol to be right justified then left


IColumn[] columns = new IColumn[2];
columns[0] = new PropertyColumn(new Model(NumberCol), NumberCol, 
NumberCol)
columns[1] = new PropertyColumn(new Model(Last Name), name.last, 
name.last);

DefaultDataTable table = new DefaultDataTable(datatable, columns, userProvider, 10);
 		 	   		  
  




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



Re: Italian Bank (was Re: Wicket 1.4.2 Released!)

2009-10-14 Thread david
JSP?


Giovanni pino_o...@yahoo.com wrote ..
 The bank is Intesa San Paolo: http://www.group.intesasanpaolo.com
 
 This is the english link: 
 http://group.intesasanpaolo.com/scriptIsir0/isInvestor/eng/home/eng_index.jsp
 
 Our wicket webapps are still in development. They will be released at the end 
 of
 this year.
 
 The system is made of two webapps:
   - one on intranet
   - one on internet
 
 We use Wicket (with Wicket Security), Spring (with Spring Security), iBATIS, 
 JMS
 (to connect to the mainframe host), Weblogic, Oracle, Java 6.
 
 If someone is interested in having more details, let me know.
 
 Best regards,
 giovanni
 
 
 
  
 Resources are limited, Imagination is unlimited.
 
 
 
 
 
 
 
 From: Randy S. randypo...@gmail.com
 To: users@wicket.apache.org
 Sent: Tue, October 13, 2009 10:41:14 PM
 Subject: Italian Bank (was Re: Wicket 1.4.2 Released!)
 
 Giovanni,
 What bank is this?  What is the URL and is there anything of particular
 interest that we can see without accounts?
 
 On Sat, Oct 10, 2009 at 7:05 AM, Giovanni pino_o...@yahoo.com wrote:
 
  Wow!!!
 
  I will upgrade my project for a major italian bank on coming monday.
 
  Thanks a lot for all your efforts in developing this great web framework!
 
  Best regards,
  giovanni
 
 
 
 
 
   


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

Re: Open source Wicket blog

2009-10-14 Thread david
How are the blogs stored?

Daniel Frisk dan...@jalbum.net wrote ..
 Hi,
 
 we have developed a blog tool in Wicket for our website. I just wanted  
 to see if there is any interest in having that as an open source  
 project?
 The code would have to be adopted for general use and be untangled  
 from some dependencies that we don't want to open source, so I just  
 want to check if there is any interest before doing the initial work.  
 Not promising anything so don't start haunting me, but let me know if  
 you are interested.
 
 Check it out at:
 http://jalbum.net/blog
 
 // Daniel
 jalbum.net
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org


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

Re: Italian Bank (was Re: Wicket 1.4.2 Released!)

2009-10-14 Thread Ernesto Reinaldo Barreiro
He mentioned new site is not yet finished;-). Otherwise what stops you from
mounting a Wicket page on an URL ending on .jsp?:)

Ernesto

On Wed, Oct 14, 2009 at 10:17 AM, da...@davidwbrown.name wrote:

 JSP?


 Giovanni pino_o...@yahoo.com wrote ..
  The bank is Intesa San Paolo: http://www.group.intesasanpaolo.com
 
  This is the english link:
 
 http://group.intesasanpaolo.com/scriptIsir0/isInvestor/eng/home/eng_index.jsp
 
  Our wicket webapps are still in development. They will be released at the
 end of
  this year.
 
  The system is made of two webapps:
- one on intranet
- one on internet
 
  We use Wicket (with Wicket Security), Spring (with Spring Security),
 iBATIS, JMS
  (to connect to the mainframe host), Weblogic, Oracle, Java 6.
 
  If someone is interested in having more details, let me know.
 
  Best regards,
  giovanni
 
 
 
   
  Resources are limited, Imagination is unlimited.
 
 
 
 
 
 
  
  From: Randy S. randypo...@gmail.com
  To: users@wicket.apache.org
  Sent: Tue, October 13, 2009 10:41:14 PM
  Subject: Italian Bank (was Re: Wicket 1.4.2 Released!)
 
  Giovanni,
  What bank is this?  What is the URL and is there anything of particular
  interest that we can see without accounts?
 
  On Sat, Oct 10, 2009 at 7:05 AM, Giovanni pino_o...@yahoo.com wrote:
 
   Wow!!!
  
   I will upgrade my project for a major italian bank on coming monday.
  
   Thanks a lot for all your efforts in developing this great web
 framework!
  
   Best regards,
   giovanni
  
  
 
 
 
 



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



Re: Open source Wicket blog

2009-10-14 Thread Daniel Frisk
We store the blog posts in a database. If we decide to open source it  
I will of course add some interface for generic storage so you can use  
whatever you see fit. Might include a file storage facility as default  
so you can get it up and running easily.


// Daniel
jalbum.net


On 2009-10-14, at 10:23, da...@davidwbrown.name wrote:


How are the blogs stored?

Daniel Frisk dan...@jalbum.net wrote ..

Hi,

we have developed a blog tool in Wicket for our website. I just  
wanted

to see if there is any interest in having that as an open source
project?
The code would have to be adopted for general use and be untangled
from some dependencies that we don't want to open source, so I just
want to check if there is any interest before doing the initial work.
Not promising anything so don't start haunting me, but let me know if
you are interested.

Check it out at:
http://jalbum.net/blog

// Daniel
jalbum.net




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



Re: Open source Wicket blog

2009-10-14 Thread Anton Veretennikov
I'm interested. This will be definitely something desirable for many
website builders.
I want to assist in developing because I need such functionality in
several sites.

-- Tony

On Wed, Oct 14, 2009 at 2:30 PM, Daniel Frisk dan...@jalbum.net wrote:
 Hi,

 we have developed a blog tool in Wicket for our website. I just wanted to
 see if there is any interest in having that as an open source project?
 The code would have to be adopted for general use and be untangled from some
 dependencies that we don't want to open source, so I just want to check if
 there is any interest before doing the initial work. Not promising anything
 so don't start haunting me, but let me know if you are interested.

 Check it out at:
 http://jalbum.net/blog

 // Daniel
 jalbum.net

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



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



Re: FileUpload and events

2009-10-14 Thread Thorsten Scherler
On Tue, 2009-10-13 at 08:14 -0700, Ian Marshall wrote:
 I am coding for just this event, to try and work around my own
 FileUploadField problem. My AJAX works using code very similar to yours
 (thanks for the example)!

You are welcome. Need to catch up on your posts around this issue (this
list is quite busy). You say yours is working? What are you doing
different?

 
 Have you added the line
 
   fileUploadFieldSello.setOutputMarkupId(true); ?
 
 You might need to add the line
 
   target.addComponent(fileUploadFieldSello);
 
 too.

Good catch. Thanks for the heads up.

salu2
-- 
Thorsten Scherler thorsten.at.apache.org
Open Source Java consulting, training and solutions

Sociedad Andaluza para el Desarrollo de la Sociedad 
de la Información, S.A.U. (SADESI)





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



Re: FileUpload and events

2009-10-14 Thread Thorsten Scherler
On Tue, 2009-10-13 at 06:23 -0700, Ian Marshall wrote:
 
 Thorsten Scherler-3 wrote:
  
  Nobody any tips or infos?
  
  salu2
  
 In the source code for the
 org.apache.wicket.markup.html.form.upload.FileUploadField class there is the
 class-level comment FILE UPLOADS ARE NOT SUPPORTED BY AJAX. USE GOOGLE TO
 LEARN MORE ABOUT THIS.
 

Doh! So I need to do some research. 

 I am no expert on the FileUploadField class (you can see my post earlier
 today about that!), but this might have a bearing on your lack of AJAX
 on-change behaviour.

Yeah reading above comment seems like it. Will investigate.

salu2

 
 Ian Marshall
-- 
Thorsten Scherler thorsten.at.apache.org
Open Source Java consulting, training and solutions

Sociedad Andaluza para el Desarrollo de la Sociedad 
de la Información, S.A.U. (SADESI)





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



inmethod grid acts strange on reorder

2009-10-14 Thread Swanthe Lindgren

Hi all
My IDataSource delivers LDM models that uses the 
ReuseIfModelsEqualStrategy to my data grid and does it well when I enter 
the page containing the grid or when switching between pages in my grid. 
It also does a good job if I edit one of the rows in the grid, by only 
updating that specific row.


But when I resort the grid by clicking one of the column headers, 
something strange happens. First all items on the current grid page 
(1-13 out of 25) are retrieved through the data source as LDMs. Then the 
last item is loaded again through its own LDM.load() method.


This behavior starts when I display 13 rows/page.
With 13 rows, the last item are loaded an extra time.
With 14 rows, the last 3.
With 15 rows, the last 5.
With 30 rows, all of the displayed rows, as all entities fit on the same 
page.


Someone with a clue to whats going on?

//Swanthe




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



Re: Transaction filters and redirection problem

2009-10-14 Thread Iain Reddick
For anyone in this situation (having to use a transaction filter), here 
is a solution that uses a response wrapper to delay the redirect until 
after the transaction has completed:


private class DelayedRedirectWrapper extends HttpServletResponseWrapper {

   private String redirectLocation;
  
   public DelayedRedirectWrapper(HttpServletResponse response) {

   super(response);
   }
  
   @Override

   public void sendRedirect(String location) throws IOException {
   redirectLocation = location;
   }
  
   public void doCachedRedirect() throws IOException {

   if ( redirectLocation != null ) {
   super.sendRedirect( redirectLocation );
   }
   }
}

This is then used in the filter's doFilter method like this:

...
DelayedRedirectWrapper responseWrapper = new DelayedRedirectWrapper( 
response );

beginTransaction();
filterChain.doFilter( request, wrappedResponse );
doCommit();
endTransaction();
responseWrapper.doCachedRedirect();
...

You could easily put the redirect-delaying code in it's own filter, for 
re-usabilty.



iainr

Iain Reddick wrote:

Hi,

I'm working on a Wicket / Hibernate / Spring app, with a configuration 
that uses spring's OSIV filter and my own transaction filter 
(basically a transaction per-request pattern).


I've run into a problem involving the order of transaction commits and 
redirect reponses (triggered by setResponsePage()).


The problem state is shown below:

1. User submits a form to create a new entity
2. Submit handler calls service to save new entity
3. Submit handler calls setResponsePage for page showing overview of 
new entity
4. Wicket request cycle completes (I'm assuming this is where wicket 
does the response.redirect())

5. Redirect is sent to browser
6. Browser requests new page, which fails as backing entity hasn't 
been persisted yet

7. Transaction is commited, and new entity is persisted

This is obviously a race condition between 6 and 7 (i.e. if 6 and 7 
are reversed, everything is OK).


Now, I'm aware that this isn't a wicket-specific issue, but the way 
wicket works as a framework means that this situation is much more 
likely than in a model 2 style framework.


Is transaction per-request using filters a reasonable configuration to 
use with wicket and, if so, how can I ensure that any redirects occur 
after my transaction has been committed?


(My guess is to use onBeginRequest and onEndRequest, but that assumes 
that onEndRequest happens before redirection)



iainr



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




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



Nullable resource link

2009-10-14 Thread Iain Reddick

Hi,

I need to display a resource link conditionally, based on whether a 
resource exists, or is null. The resource itself is bytes in a database 
and should not be anchored to a component.


How should I handle this, with regard to the resource being nullable?

Thanks.

iainr

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



Re: FileUpload and events

2009-10-14 Thread Ian Marshall


Thorsten Scherler-3 wrote:
 
 You say yours is working? What are you doing
 different?
 
 ...
 
 Good catch. Thanks for the heads up.
 
Please let me know if your problem persists (my code should be essentially
the same as yours now).

Ian
-- 
View this message in context: 
http://www.nabble.com/FileUpload-and-events-tp25816532p25888304.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: FileUploadField blocks component submission when an empty file is selected

2009-10-14 Thread Ian Marshall


igor.vaynberg wrote:
 
 sure, you can create a quickstart that reproduces this and attach it
 to a jira issue.
 
Thanks. I have not done a quickstart. (Is this a Maven thing? I am still an
Ant person!) I have created the JIRA issue, which can be found at

  https://issues.apache.org/jira/browse/WICKET-2523

Please let me know if there is anything more I can do to specift the problem
better.

Ian Marshall

-- 
View this message in context: 
http://www.nabble.com/FileUploadField-blocks-component-submission-when-an-empty-file-is-selected-tp25855504p25888396.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Nullable resource link

2009-10-14 Thread Luca Provenzani
i don't understand the problem

can't you check the resource before link is rendered?
You can create a new resource object empty in the case of null bytesand
setVisible(false) or extend link to do this automatically on empty
resource...

Luca

2009/10/14 Iain Reddick iain.redd...@beatsystems.com

 Hi,

 I need to display a resource link conditionally, based on whether a
 resource exists, or is null. The resource itself is bytes in a database and
 should not be anchored to a component.

 How should I handle this, with regard to the resource being nullable?

 Thanks.

 iainr

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




Re: Nullable resource link

2009-10-14 Thread Iain Reddick
I'm fishing for best practice in this type of situation - do I use the 
solution you outlined, or do I add a simple invisible dummy link instead 
of the the resource link, or is there a better solution that I'm missing?


Luca Provenzani wrote:

i don't understand the problem

can't you check the resource before link is rendered?
You can create a new resource object empty in the case of null bytesand
setVisible(false) or extend link to do this automatically on empty
resource...

Luca

2009/10/14 Iain Reddick iain.redd...@beatsystems.com

  

Hi,

I need to display a resource link conditionally, based on whether a
resource exists, or is null. The resource itself is bytes in a database and
should not be anchored to a component.

How should I handle this, with regard to the resource being nullable?

Thanks.

iainr

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





  




Re: Open source Wicket blog

2009-10-14 Thread danisevsky
It would be nice, I am very interested.

BTW there is another great open-source blogging system -
http://code.google.com/p/elephas/

2009/10/14 Anton Veretennikov anton.veretenni...@gmail.com

 I'm interested. This will be definitely something desirable for many
 website builders.
 I want to assist in developing because I need such functionality in
 several sites.

 -- Tony

 On Wed, Oct 14, 2009 at 2:30 PM, Daniel Frisk dan...@jalbum.net wrote:
  Hi,
 
  we have developed a blog tool in Wicket for our website. I just wanted to
  see if there is any interest in having that as an open source project?
  The code would have to be adopted for general use and be untangled from
 some
  dependencies that we don't want to open source, so I just want to check
 if
  there is any interest before doing the initial work. Not promising
 anything
  so don't start haunting me, but let me know if you are interested.
 
  Check it out at:
  http://jalbum.net/blog
 
  // Daniel
  jalbum.net
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 

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




Re: Open source Wicket blog

2009-10-14 Thread ralf . eichinger
added elephas blogging system to Wiki:  
http://cwiki.apache.org/confluence/display/WICKET/Products+based+on+Wicket


Quoting danisevsky danisev...@gmail.com:


It would be nice, I am very interested.

BTW there is another great open-source blogging system -
http://code.google.com/p/elephas/

2009/10/14 Anton Veretennikov anton.veretenni...@gmail.com


I'm interested. This will be definitely something desirable for many
website builders.
I want to assist in developing because I need such functionality in
several sites.

-- Tony

On Wed, Oct 14, 2009 at 2:30 PM, Daniel Frisk dan...@jalbum.net wrote:
 Hi,

 we have developed a blog tool in Wicket for our website. I just wanted to
 see if there is any interest in having that as an open source project?
 The code would have to be adopted for general use and be untangled from
some
 dependencies that we don't want to open source, so I just want to check
if
 there is any interest before doing the initial work. Not promising
anything
 so don't start haunting me, but let me know if you are interested.

 Check it out at:
 http://jalbum.net/blog

 // Daniel
 jalbum.net

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



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









This message was sent using IMP, the Internet Messaging Program.

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



Re: [WIKI] Websites based on Wicket page presentation

2009-10-14 Thread Erik Post
I think it's great the wiki is being given some love; I'm going to
look at what's going on and contribute where I can, because I think
it's really really (really) important, especially for prospective/new
users. Thanks Ralf!

Cheers,
Erik

On Tue, Oct 13, 2009 at 10:29 PM, jWeekend jweekend_for...@cabouge.com wrote:
 I've been having some very brief communication with Ralf Eichinger who
 has been making a valuable contribution over the last few weeks by
 starting to improve documentation on the Wiki, especially with a view
 to help people evaluating Wicket get a fairer appreciation of it,
 who's using it and what they are doing with it.

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



Re: [WIKI] Websites based on Wicket page presentation

2009-10-14 Thread ralf . eichinger

Hi guys,

this is Ralf (being the reason for starting this discussion) ;-).
Yes, I started to work on the Wiki, not only on the products page, but also
adding how to start setting up a development environment.

As Cemal said, there is a discussion about sort order in the list.
I am ok with providing something sortable, but is it possible in the
Confluence Wiki to add jQery and use it for a table?
If so, would be very interested how to do this.


Quoting Jeremy Thomerson jer...@wickettraining.com:


I was thinking the same - just make it a table and use jQuery sortable
plugin.

--
Jeremy Thomerson
http://www.wickettraining.com



On Tue, Oct 13, 2009 at 9:42 PM, Jonathan Locke  
jonathan.lo...@gmail.comwrote:





shouldn't it be one of igor's famous tables with the sort headers?
then we wouldn't need to argue over how to order it.


jWeekend wrote:

 I've been having some very brief communication with Ralf Eichinger who
 has been making a valuable contribution over the last few weeks by
 starting to improve documentation on the Wiki, especially with a view
 to help people evaluating Wicket get a fairer appreciation of it,
 who's using it and what they are doing with it.

 Now obviously it is extremely valuable for newcomers to have a page
 like our Websites based on Wicket [1] to get a feel for who's
 doing what with Wicket already. And, for apps built on Wicket, like
 Leg Up and all those other Wicket sites, it is nice to have a
 central place to put a link on  that others may come across and
 therefore be aware it's out there, and enjoy visiting/using it.
 It's also encouraging to see this list of apps and sites grows,
 albeit steadily (I recommend anyone with a public Wicket app to
 mention it there, it can only do good for all concerned, AFAICS).
 All the same, there are increasingly more sophisticated and
 impressive sites highlighting the strength and depth of the
 community/developers and what magic can be weaved using Wicket
 (whilst developers amongst us also know that in Wicket such magic
 is possible at the same time as keeping your application design
 and code neat, tidy, maintainable and extensible and even rather
 pleasant to work with).

 One question that came up is whether the pages listed by URL there
 should be ordered alphabetically or chronologically.

 For me, chronological (newest at top, as had been the case originally)
 makes much more sense because when I look at the site, I can see how
 things have evolved, quickly identify what's new since I last looked
 and also answer questions like what were the first public Wicket
 sites listed here?. This is also a much more robust sorting scheme
 (people _like_ to add their shiny new apps/sites to the top of the
 list!) and with no arbitrary rules there's not such a likelihood of
 breaking the sort order every time anyone adds their site (eg should
 http://www.eropuit.nl go before or after fabulously40.com), as it was
 when I went in to add LegUp.

 Chronological ordering is a scheme that was always quite naturally
 maintained and therefore required no further maintenance to keep
 right. What's more, I don't see what the benefit of an artificial
 sort ordering like alphabetically ordered by URL would be in this
 context as I doubt anyone looking at the page is not familiar with
 Ctrl+F if they come looking for some specific page/site/URL.

 I doubt anyone else has ever been worried about this, but if
 anyone else has a view on it I'd be pleased to know about
 it and if there are some good reasons for alphabetically
 ordering too the list that I have missed I can stop messing up
 Ralf's order!

 Regards - Cemal
 jWeekend
 OO  Java Technologies, Wicket Training and Development
 http://jWeekend.com

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




--
View this message in context:
http://www.nabble.com/-WIKI--%22Websites-based-on-Wicket%22-page-presentation-tp25880274p25884516.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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









This message was sent using IMP, the Internet Messaging Program.

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



Re: Transaction filters and redirection problem

2009-10-14 Thread James Carman
That's the problem with transaction-per-request.  Why not put your
transaction around your service/domain methods rather than around the
entire request cycle?

On Wed, Oct 14, 2009 at 5:19 AM, Iain Reddick
iain.redd...@beatsystems.com wrote:
 For anyone in this situation (having to use a transaction filter), here is a
 solution that uses a response wrapper to delay the redirect until after the
 transaction has completed:

 private class DelayedRedirectWrapper extends HttpServletResponseWrapper {

       private String redirectLocation;
             public DelayedRedirectWrapper(HttpServletResponse response) {
           super(response);
       }
             @Override
       public void sendRedirect(String location) throws IOException {
           redirectLocation = location;
       }
             public void doCachedRedirect() throws IOException {
           if ( redirectLocation != null ) {
               super.sendRedirect( redirectLocation );
       }
   }
 }

 This is then used in the filter's doFilter method like this:

 ...
 DelayedRedirectWrapper responseWrapper = new DelayedRedirectWrapper(
 response );
 beginTransaction();
 filterChain.doFilter( request, wrappedResponse );
 doCommit();
 endTransaction();
 responseWrapper.doCachedRedirect();
 ...

 You could easily put the redirect-delaying code in it's own filter, for
 re-usabilty.


 iainr

 Iain Reddick wrote:

 Hi,

 I'm working on a Wicket / Hibernate / Spring app, with a configuration
 that uses spring's OSIV filter and my own transaction filter (basically a
 transaction per-request pattern).

 I've run into a problem involving the order of transaction commits and
 redirect reponses (triggered by setResponsePage()).

 The problem state is shown below:

 1. User submits a form to create a new entity
 2. Submit handler calls service to save new entity
 3. Submit handler calls setResponsePage for page showing overview of new
 entity
 4. Wicket request cycle completes (I'm assuming this is where wicket does
 the response.redirect())
 5. Redirect is sent to browser
 6. Browser requests new page, which fails as backing entity hasn't been
 persisted yet
 7. Transaction is commited, and new entity is persisted

 This is obviously a race condition between 6 and 7 (i.e. if 6 and 7 are
 reversed, everything is OK).

 Now, I'm aware that this isn't a wicket-specific issue, but the way wicket
 works as a framework means that this situation is much more likely than in a
 model 2 style framework.

 Is transaction per-request using filters a reasonable configuration to use
 with wicket and, if so, how can I ensure that any redirects occur after my
 transaction has been committed?

 (My guess is to use onBeginRequest and onEndRequest, but that assumes that
 onEndRequest happens before redirection)


 iainr



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



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



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



Re: Open source Wicket blog

2009-10-14 Thread Maarten Bosteels
I got some really cool ideas from the elephas code, but it seems the project
has stalled a bit ?
The last commit was 18 dec 2008

Maarten

On Wed, Oct 14, 2009 at 2:30 PM, ralf.eichin...@pixotec.de wrote:

 added elephas blogging system to Wiki:
 http://cwiki.apache.org/confluence/display/WICKET/Products+based+on+Wicket


 Quoting danisevsky danisev...@gmail.com:

  It would be nice, I am very interested.

 BTW there is another great open-source blogging system -
 http://code.google.com/p/elephas/

 2009/10/14 Anton Veretennikov anton.veretenni...@gmail.com

  I'm interested. This will be definitely something desirable for many
 website builders.
 I want to assist in developing because I need such functionality in
 several sites.

 -- Tony

 On Wed, Oct 14, 2009 at 2:30 PM, Daniel Frisk dan...@jalbum.net wrote:
  Hi,
 
  we have developed a blog tool in Wicket for our website. I just wanted
 to
  see if there is any interest in having that as an open source project?
  The code would have to be adopted for general use and be untangled from
 some
  dependencies that we don't want to open source, so I just want to check
 if
  there is any interest before doing the initial work. Not promising
 anything
  so don't start haunting me, but let me know if you are interested.
 
  Check it out at:
  http://jalbum.net/blog
 
  // Daniel
  jalbum.net
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 

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






 
 This message was sent using IMP, the Internet Messaging Program.


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




Integrating Separate Different Wicket Applications Into One

2009-10-14 Thread Carlo Camerino
Hi,

I was wondering what are the most efficient ways to separate different
applications into one application?
We have this use case in which we need to integrate two different
wicket applications and make them appear as  if they are running in
one platform only.
I tried using portlets but it introduced a lot of coding
complications. I tried running it using Jetspeed 2 and found out that
several components are having problems.
Most of the problem seems to come from the fact that we are using the
indicatingajaxbutton. I have this issue in which I cannot easily
transfer page from one page to another. I don't really know if
portlets are the way to go because the applications by themselves are
rich in functionality. I just need to be able to access them all in
one page.
I know that it seems to be some sort of portal but i think 'd have to
take portlets out for the mean time due to the strict timeline and
it's actually the first time we tried using portlets in our company.

I'm thinking of using iframes for each application instead which will
lead me to a grand total of three different applications running with
only one entry point...
Is this the proper way of doing it? My issue will be with regards to
the httpsessions i'd have to have a total of three unlike in the
portlets...

My idea is I have a main application which serves as my entry point.
In that application I lay out the available functionalities via menu
links. When I click on a menu link,
I will place redirect my iframe to point to that page enabling me to
do that transaction? My main issue would be I think the httpsession
expiry. If the user spends a lot of time using the application, the
outside session could expire if the links outside are not clicked.

What are other possible solutions that I could use for this one? As of
now I could think of two ways using portlets and the other one using
iframes.. As of now we are  considering one application  and just
provide remoting for accessing business objects.

Is there anyway of getting html coming from another application and
showing it into my application?
For example, i have three applications 1 ,2 and 3,
3 is my main application but I get the html coming from 1 and 2,
without using iframes. Somewhat like WSRP (Web Service for Remote
Porlets). Or i just need to get the servlet response from the third
aplication/

I'm not sure if it's possible. Would appreciate your insights on this one..

Thanks
Carlo

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



Re: Nullable resource link

2009-10-14 Thread Iain Reddick

I think my best solution is to use a lightweight container like this:

public class NullableContainer extends WebMarkupContainer {

   public NullableContainer(String id) {
   super(id);
   }
  
   public NullableContainer(String id, IModel model) {

   super(id, model);
   }

   @Override
   protected void onBeforeRender() {
   super.onBeforeRender();
   onPopulate();   
   }
  
   /**

* Convenience method for lazy-adding of children
*/
   protected void onPopulate() {
   }

   @Override
   public boolean isVisible() {
   return getModelObject() != null;
   }
  
}


I then can override onPopulate() and add my children that depend on the 
nullable for construction.

It's basically the logic equivalent of if model is not null, add children.

Iain Reddick wrote:
I'm fishing for best practice in this type of situation - do I use the 
solution you outlined, or do I add a simple invisible dummy link 
instead of the the resource link, or is there a better solution that 
I'm missing?


Luca Provenzani wrote:

i don't understand the problem

can't you check the resource before link is rendered?
You can create a new resource object empty in the case of null 
bytesand

setVisible(false) or extend link to do this automatically on empty
resource...

Luca

2009/10/14 Iain Reddick iain.redd...@beatsystems.com

 

Hi,

I need to display a resource link conditionally, based on whether a
resource exists, or is null. The resource itself is bytes in a 
database and

should not be anchored to a component.

How should I handle this, with regard to the resource being nullable?

Thanks.

iainr

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





  






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



Re: Nullable resource link

2009-10-14 Thread Luca Provenzani
why not something more directly like:

*public class ProvaLink extends ResourceLink {
ResourceReference resourceReference;


@Override
public boolean isVisible() {
if(resourceReference==null)return false;
else return true;
}

}

*hope to help...

Luca

2009/10/14 Iain Reddick iain.redd...@beatsystems.com

 I think my best solution is to use a lightweight container like this:

 public class NullableContainer extends WebMarkupContainer {

   public NullableContainer(String id) {
   super(id);
   }
 public NullableContainer(String id, IModel model) {
   super(id, model);
   }

   @Override
   protected void onBeforeRender() {
   super.onBeforeRender();
   onPopulate(); }
 /**
* Convenience method for lazy-adding of children
*/
   protected void onPopulate() {
   }

   @Override
   public boolean isVisible() {
   return getModelObject() != null;
   }
  }

 I then can override onPopulate() and add my children that depend on the
 nullable for construction.
 It's basically the logic equivalent of if model is not null, add
 children.


 Iain Reddick wrote:

 I'm fishing for best practice in this type of situation - do I use the
 solution you outlined, or do I add a simple invisible dummy link instead of
 the the resource link, or is there a better solution that I'm missing?

 Luca Provenzani wrote:

 i don't understand the problem

 can't you check the resource before link is rendered?
 You can create a new resource object empty in the case of null
 bytesand
 setVisible(false) or extend link to do this automatically on empty
 resource...

 Luca

 2009/10/14 Iain Reddick iain.redd...@beatsystems.com



 Hi,

 I need to display a resource link conditionally, based on whether a
 resource exists, or is null. The resource itself is bytes in a database
 and
 should not be anchored to a component.

 How should I handle this, with regard to the resource being nullable?

 Thanks.

 iainr

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











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




Re: Announcement: Annotation-based Mounting of Resources

2009-10-14 Thread Robin Sander


Hi Stefan.

this sounds really interesting!
As I see that you don't use Spring to parse your annoations, are there  
any plans to combine parts of your work with wicketstuff-annotation?
Because I would like to use @MountPath from wicketstuff-annotation as  
well but not for the price of adding Spring as a dependency.


And another question: is it possible to use the versioning/replacement  
features without actually merging those files?


Robin.


On 14.10.2009, at 09:42, Stefan Fussenegger wrote:

Today, I’m happy to announce the availability of annotation-based  
mounting and merging of resources in wicketstuff-merged-resources  
(version 3.0-SNAPSHOT for Wicket 1.4, version 2.1-SNAPSHOT for  
Wicket 1.3). In order to mount resources, all that’s needed is  
adding annotations to component classes:


@JsContribution
@CssContribution(media = print)
@ResourceContribution(value = accept.png, path = /img/accept.png)
public class PanelOne extends Panel {

   public PanelOne(String id) {
   super(id);
   // ...
   }
}

As an added benefit, you’ll get all the other features of  
wicketstuff-merged-resources:


merging of multiple files into one for less HTTP requests
adding of versions to resource paths for aggressive caching
pre-processing of resources (e.g. replacing colors in CSS files)
optionally uploading them to Amazon Cloudfront (well, at least you  
can expect this feature soon – we are using it already)
So you will speed up rendering of your pages while simplifying and  
reducing your code (there’s no need to merge, mount or add  
HeaderContributors manually anymore)!


More on our blog ...
http://techblog.molindo.at/2009/10/wicket-annotation-based-mounting-of-resources.html

... and Wicket Stuff Wiki:
http://wicketstuff.org/confluence/display/STUFFWIKI/wicketstuff-merged-resources

Cheers

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



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



Re: Integrating Separate Different Wicket Applications Into One

2009-10-14 Thread ralf . eichinger

perhaps have a look on www.devproof.org.
it is a portal like wicket application, which hosts different modules (JARs).

Quoting Carlo Camerino carlo.camer...@gmail.com:


Hi,

I was wondering what are the most efficient ways to separate different
applications into one application?
We have this use case in which we need to integrate two different
wicket applications and make them appear as  if they are running in
one platform only.
I tried using portlets but it introduced a lot of coding
complications. I tried running it using Jetspeed 2 and found out that
several components are having problems.
Most of the problem seems to come from the fact that we are using the
indicatingajaxbutton. I have this issue in which I cannot easily
transfer page from one page to another. I don't really know if
portlets are the way to go because the applications by themselves are
rich in functionality. I just need to be able to access them all in
one page.
I know that it seems to be some sort of portal but i think 'd have to
take portlets out for the mean time due to the strict timeline and
it's actually the first time we tried using portlets in our company.

I'm thinking of using iframes for each application instead which will
lead me to a grand total of three different applications running with
only one entry point...
Is this the proper way of doing it? My issue will be with regards to
the httpsessions i'd have to have a total of three unlike in the
portlets...

My idea is I have a main application which serves as my entry point.
In that application I lay out the available functionalities via menu
links. When I click on a menu link,
I will place redirect my iframe to point to that page enabling me to
do that transaction? My main issue would be I think the httpsession
expiry. If the user spends a lot of time using the application, the
outside session could expire if the links outside are not clicked.

What are other possible solutions that I could use for this one? As of
now I could think of two ways using portlets and the other one using
iframes.. As of now we are  considering one application  and just
provide remoting for accessing business objects.

Is there anyway of getting html coming from another application and
showing it into my application?
For example, i have three applications 1 ,2 and 3,
3 is my main application but I get the html coming from 1 and 2,
without using iframes. Somewhat like WSRP (Web Service for Remote
Porlets). Or i just need to get the servlet response from the third
aplication/

I'm not sure if it's possible. Would appreciate your insights on this one..

Thanks
Carlo

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







This message was sent using IMP, the Internet Messaging Program.

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



Re: Announcement: Annotation-based Mounting of Resources

2009-10-14 Thread sfussenegger

Actually, wicketstuff-annotation (and spring-core) is a dependency of
wicketstuff-merged-resources. I know, it doesn't feel quite right to include
spring-core if you don't need it. As an idea, you could just package the
required classes into a small jar file and exclude spring-core.

You may disable merging of resources completely by doing this:

ResourceMount m = new ResourceMount() {
protected boolean doMerge() {
return false;
}
}

ResourceMount.mountAnnotatedPackageResources(/files,
com.example.components, this, mount);

There are quite a few such methods you may use to customize behavior. 

Cheers



Robin Sander wrote:
 
 
 Hi Stefan.
 
 this sounds really interesting!
 As I see that you don't use Spring to parse your annoations, are there  
 any plans to combine parts of your work with wicketstuff-annotation?
 Because I would like to use @MountPath from wicketstuff-annotation as  
 well but not for the price of adding Spring as a dependency.
 
 And another question: is it possible to use the versioning/replacement  
 features without actually merging those files?
 
 Robin.
 
 
 On 14.10.2009, at 09:42, Stefan Fussenegger wrote:
 
 Today, I’m happy to announce the availability of annotation-based  
 mounting and merging of resources in wicketstuff-merged-resources  
 (version 3.0-SNAPSHOT for Wicket 1.4, version 2.1-SNAPSHOT for  
 Wicket 1.3). In order to mount resources, all that’s needed is  
 adding annotations to component classes:

 @JsContribution
 @CssContribution(media = print)
 @ResourceContribution(value = accept.png, path = /img/accept.png)
 public class PanelOne extends Panel {

public PanelOne(String id) {
super(id);
// ...
}
 }

 As an added benefit, you’ll get all the other features of  
 wicketstuff-merged-resources:

 merging of multiple files into one for less HTTP requests
 adding of versions to resource paths for aggressive caching
 pre-processing of resources (e.g. replacing colors in CSS files)
 optionally uploading them to Amazon Cloudfront (well, at least you  
 can expect this feature soon – we are using it already)
 So you will speed up rendering of your pages while simplifying and  
 reducing your code (there’s no need to merge, mount or add  
 HeaderContributors manually anymore)!

 More on our blog ...
 http://techblog.molindo.at/2009/10/wicket-annotation-based-mounting-of-resources.html

 ... and Wicket Stuff Wiki:
 http://wicketstuff.org/confluence/display/STUFFWIKI/wicketstuff-merged-resources

 Cheers

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


-
Stefan Fussenegger

Wicket:
http://wicketstuff.org/confluence/display/STUFFWIKI/wicketstuff-merged-resources
wicketstuff-merged-resources 
http://techblog.molindo.at/ Wicket on techblog.molindo.at 
-- 
View this message in context: 
http://www.nabble.com/Announcement%3A-Annotation-based-Mounting-of-Resources-tp25886703p25892503.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Announcement: Annotation-based Mounting of Resources

2009-10-14 Thread sfussenegger

Actually, it's even easier, just do

ResourceMount m = new ResourceMount().setMerged(false);
ResourceMount.mountAnnotatedPackageResources(/files,
com.example.components, this, mount);


sfussenegger wrote:
 
 Actually, wicketstuff-annotation (and spring-core) is a dependency of
 wicketstuff-merged-resources. I know, it doesn't feel quite right to
 include spring-core if you don't need it. As an idea, you could just
 package the required classes into a small jar file and exclude
 spring-core.
 
 You may disable merging of resources completely by doing this:
 
 ResourceMount m = new ResourceMount() {
 protected boolean doMerge() {
 return false;
 }
 }
 
 ResourceMount.mountAnnotatedPackageResources(/files,
 com.example.components, this, mount);
 
 There are quite a few such methods you may use to customize behavior. 
 
 Cheers
 
 
 
 Robin Sander wrote:
 
 
 Hi Stefan.
 
 this sounds really interesting!
 As I see that you don't use Spring to parse your annoations, are there  
 any plans to combine parts of your work with wicketstuff-annotation?
 Because I would like to use @MountPath from wicketstuff-annotation as  
 well but not for the price of adding Spring as a dependency.
 
 And another question: is it possible to use the versioning/replacement  
 features without actually merging those files?
 
 Robin.
 
 
 On 14.10.2009, at 09:42, Stefan Fussenegger wrote:
 
 Today, I’m happy to announce the availability of annotation-based  
 mounting and merging of resources in wicketstuff-merged-resources  
 (version 3.0-SNAPSHOT for Wicket 1.4, version 2.1-SNAPSHOT for  
 Wicket 1.3). In order to mount resources, all that’s needed is  
 adding annotations to component classes:

 @JsContribution
 @CssContribution(media = print)
 @ResourceContribution(value = accept.png, path = /img/accept.png)
 public class PanelOne extends Panel {

public PanelOne(String id) {
super(id);
// ...
}
 }

 As an added benefit, you’ll get all the other features of  
 wicketstuff-merged-resources:

 merging of multiple files into one for less HTTP requests
 adding of versions to resource paths for aggressive caching
 pre-processing of resources (e.g. replacing colors in CSS files)
 optionally uploading them to Amazon Cloudfront (well, at least you  
 can expect this feature soon – we are using it already)
 So you will speed up rendering of your pages while simplifying and  
 reducing your code (there’s no need to merge, mount or add  
 HeaderContributors manually anymore)!

 More on our blog ...
 http://techblog.molindo.at/2009/10/wicket-annotation-based-mounting-of-resources.html

 ... and Wicket Stuff Wiki:
 http://wicketstuff.org/confluence/display/STUFFWIKI/wicketstuff-merged-resources

 Cheers

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


-
Stefan Fussenegger

Wicket:
http://wicketstuff.org/confluence/display/STUFFWIKI/wicketstuff-merged-resources
wicketstuff-merged-resources 
http://techblog.molindo.at/ Wicket on techblog.molindo.at 
-- 
View this message in context: 
http://www.nabble.com/Announcement%3A-Annotation-based-Mounting-of-Resources-tp25886703p25892536.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Open source Wicket blog

2009-10-14 Thread Fernando Wermus
+1 very interested. I ve done a simple log for an app, which could be
enhanced with your work

On Wed, Oct 14, 2009 at 9:37 AM, Maarten Bosteels
mbosteels@gmail.comwrote:

 I got some really cool ideas from the elephas code, but it seems the
 project
 has stalled a bit ?
 The last commit was 18 dec 2008

 Maarten

 On Wed, Oct 14, 2009 at 2:30 PM, ralf.eichin...@pixotec.de wrote:

  added elephas blogging system to Wiki:
 
 http://cwiki.apache.org/confluence/display/WICKET/Products+based+on+Wicket
 
 
  Quoting danisevsky danisev...@gmail.com:
 
   It would be nice, I am very interested.
 
  BTW there is another great open-source blogging system -
  http://code.google.com/p/elephas/
 
  2009/10/14 Anton Veretennikov anton.veretenni...@gmail.com
 
   I'm interested. This will be definitely something desirable for many
  website builders.
  I want to assist in developing because I need such functionality in
  several sites.
 
  -- Tony
 
  On Wed, Oct 14, 2009 at 2:30 PM, Daniel Frisk dan...@jalbum.net
 wrote:
   Hi,
  
   we have developed a blog tool in Wicket for our website. I just
 wanted
  to
   see if there is any interest in having that as an open source
 project?
   The code would have to be adopted for general use and be untangled
 from
  some
   dependencies that we don't want to open source, so I just want to
 check
  if
   there is any interest before doing the initial work. Not promising
  anything
   so don't start haunting me, but let me know if you are interested.
  
   Check it out at:
   http://jalbum.net/blog
  
   // Daniel
   jalbum.net
  
   -
   To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
   For additional commands, e-mail: users-h...@wicket.apache.org
  
  
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
 
 
  
  This message was sent using IMP, the Internet Messaging Program.
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 




-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: Open source Wicket blog

2009-10-14 Thread Fernando Wermus
Very interesting. How about integrating pebble with a wicket front end?

On Wed, Oct 14, 2009 at 4:01 AM, Thomas Singer wic...@regnis.de wrote:

 Hi Daniel,

 We are currently using Pebble which has the advantage of storing the blog
 content in plain text files. But its development seems to have stalled, so
 I'm searching an alternative. Using a blog tool which uses Wicket would be
 of much interest to me, because we use Wicket for our website and hence are
 quiet accustomed to it(*).

 Tom

 (*) If there is no mysterious black-box like dependency injection used.


 Daniel Frisk wrote:
  Hi,
 
  we have developed a blog tool in Wicket for our website. I just wanted
  to see if there is any interest in having that as an open source project?
  The code would have to be adopted for general use and be untangled from
  some dependencies that we don't want to open source, so I just want to
  check if there is any interest before doing the initial work. Not
  promising anything so don't start haunting me, but let me know if you
  are interested.
 
  Check it out at:
  http://jalbum.net/blog
 
  // Daniel
  jalbum.net
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 

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




-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: Open source Wicket blog - Open Source CMS with Wicket

2009-10-14 Thread Bernhard Grünewaldt

Hello,

It is very interesting to have a wicket blog,
but for me even more interesting would be a cms based on wicket
that integrates very smoothly into an existing wicket webapp.

At the moment we use typo3 together with our java webapp.

Would be nice to have a solution where everything is java
and the same framework :)

Is there such a thing?


Bernhard

Maarten Bosteels schrieb:

I got some really cool ideas from the elephas code, but it seems the project
has stalled a bit ?
The last commit was 18 dec 2008

Maarten

On Wed, Oct 14, 2009 at 2:30 PM, ralf.eichin...@pixotec.de wrote:


added elephas blogging system to Wiki:
http://cwiki.apache.org/confluence/display/WICKET/Products+based+on+Wicket


Quoting danisevsky danisev...@gmail.com:

 It would be nice, I am very interested.

BTW there is another great open-source blogging system -
http://code.google.com/p/elephas/

2009/10/14 Anton Veretennikov anton.veretenni...@gmail.com

 I'm interested. This will be definitely something desirable for many

website builders.
I want to assist in developing because I need such functionality in
several sites.

-- Tony

On Wed, Oct 14, 2009 at 2:30 PM, Daniel Frisk dan...@jalbum.net wrote:

Hi,

we have developed a blog tool in Wicket for our website. I just wanted

to

see if there is any interest in having that as an open source project?
The code would have to be adopted for general use and be untangled from

some

dependencies that we don't want to open source, so I just want to check

if

there is any interest before doing the initial work. Not promising

anything

so don't start haunting me, but let me know if you are interested.

Check it out at:
http://jalbum.net/blog

// Daniel
jalbum.net

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



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






This message was sent using IMP, the Internet Messaging Program.


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






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



Re: Open source Wicket blog - Open Source CMS with Wicket

2009-10-14 Thread Jeremy Thomerson
http://code.google.com/p/brix-cms/

--
Jeremy Thomerson
http://www.wickettraining.com



On Wed, Oct 14, 2009 at 9:54 AM, Bernhard Grünewaldt 
bernh...@gruenewaldt.net wrote:

 Hello,

 It is very interesting to have a wicket blog,
 but for me even more interesting would be a cms based on wicket
 that integrates very smoothly into an existing wicket webapp.

 At the moment we use typo3 together with our java webapp.

 Would be nice to have a solution where everything is java
 and the same framework :)

 Is there such a thing?


 Bernhard

 Maarten Bosteels schrieb:

 I got some really cool ideas from the elephas code, but it seems the
 project
 has stalled a bit ?
 The last commit was 18 dec 2008

 Maarten

 On Wed, Oct 14, 2009 at 2:30 PM, ralf.eichin...@pixotec.de wrote:

  added elephas blogging system to Wiki:

 http://cwiki.apache.org/confluence/display/WICKET/Products+based+on+Wicket


 Quoting danisevsky danisev...@gmail.com:

  It would be nice, I am very interested.

 BTW there is another great open-source blogging system -
 http://code.google.com/p/elephas/

 2009/10/14 Anton Veretennikov anton.veretenni...@gmail.com

  I'm interested. This will be definitely something desirable for many

 website builders.
 I want to assist in developing because I need such functionality in
 several sites.

 -- Tony

 On Wed, Oct 14, 2009 at 2:30 PM, Daniel Frisk dan...@jalbum.net
 wrote:

 Hi,

 we have developed a blog tool in Wicket for our website. I just wanted

 to

 see if there is any interest in having that as an open source project?
 The code would have to be adopted for general use and be untangled
 from

 some

 dependencies that we don't want to open source, so I just want to
 check

 if

 there is any interest before doing the initial work. Not promising

 anything

 so don't start haunting me, but let me know if you are interested.

 Check it out at:
 http://jalbum.net/blog

 // Daniel
 jalbum.net

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


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




 
 This message was sent using IMP, the Internet Messaging Program.


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




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




Re: Nullable resource link

2009-10-14 Thread Iain Reddick
I don't want to keep a reference to to the resources byte array in the 
link - I'd rather it was retrieved dynamically when requested. I also 
don't really like constructing a bunch of stuff that's never going to be 
used (and to be null - which is often a headache).


If I use the container component I outlined earlier, I can make the 
model object be the object that holds the resource data (a hibernate 
entity in my case). This means I can use getModelObject().getBytes(), 
etc. in the wrapped link construction. An additional plus point with 
this solution is that it is properly dynamic.


I think this works pretty well for this type of situation - there is no 
extra null checking required (as it's all in the wrapper) and the logic 
of it seems quite clear.


iainr

Luca Provenzani wrote:

why not something more directly like:

*public class ProvaLink extends ResourceLink {
ResourceReference resourceReference;


@Override
public boolean isVisible() {
if(resourceReference==null)return false;
else return true;
}

}

*hope to help...

Luca

2009/10/14 Iain Reddick iain.redd...@beatsystems.com

  

I think my best solution is to use a lightweight container like this:

public class NullableContainer extends WebMarkupContainer {

  public NullableContainer(String id) {
  super(id);
  }
public NullableContainer(String id, IModel model) {
  super(id, model);
  }

  @Override
  protected void onBeforeRender() {
  super.onBeforeRender();
  onPopulate(); }
/**
   * Convenience method for lazy-adding of children
   */
  protected void onPopulate() {
  }

  @Override
  public boolean isVisible() {
  return getModelObject() != null;
  }
 }

I then can override onPopulate() and add my children that depend on the
nullable for construction.
It's basically the logic equivalent of if model is not null, add
children.


Iain Reddick wrote:



I'm fishing for best practice in this type of situation - do I use the
solution you outlined, or do I add a simple invisible dummy link instead of
the the resource link, or is there a better solution that I'm missing?

Luca Provenzani wrote:

  

i don't understand the problem

can't you check the resource before link is rendered?
You can create a new resource object empty in the case of null
bytesand
setVisible(false) or extend link to do this automatically on empty
resource...

Luca

2009/10/14 Iain Reddick iain.redd...@beatsystems.com





Hi,

I need to display a resource link conditionally, based on whether a
resource exists, or is null. The resource itself is bytes in a database
and
should not be anchored to a component.

How should I handle this, with regard to the resource being nullable?

Thanks.

iainr

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




  





  

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





  




Re: Open source Wicket blog - Open Source CMS with Wicket

2009-10-14 Thread Bernhard Grünewaldt

Found it myself.

Anyone have experience with brix?

http://code.google.com/p/brix-cms/


Bernhard Grünewaldt schrieb:

Hello,

It is very interesting to have a wicket blog,
but for me even more interesting would be a cms based on wicket
that integrates very smoothly into an existing wicket webapp.

At the moment we use typo3 together with our java webapp.

Would be nice to have a solution where everything is java
and the same framework :)

Is there such a thing?


Bernhard

Maarten Bosteels schrieb:
I got some really cool ideas from the elephas code, but it seems the 
project

has stalled a bit ?
The last commit was 18 dec 2008

Maarten

On Wed, Oct 14, 2009 at 2:30 PM, ralf.eichin...@pixotec.de wrote:


added elephas blogging system to Wiki:
http://cwiki.apache.org/confluence/display/WICKET/Products+based+on+Wicket 




Quoting danisevsky danisev...@gmail.com:

 It would be nice, I am very interested.

BTW there is another great open-source blogging system -
http://code.google.com/p/elephas/

2009/10/14 Anton Veretennikov anton.veretenni...@gmail.com

 I'm interested. This will be definitely something desirable for many

website builders.
I want to assist in developing because I need such functionality in
several sites.

-- Tony

On Wed, Oct 14, 2009 at 2:30 PM, Daniel Frisk dan...@jalbum.net 
wrote:

Hi,

we have developed a blog tool in Wicket for our website. I just 
wanted

to
see if there is any interest in having that as an open source 
project?
The code would have to be adopted for general use and be untangled 
from

some
dependencies that we don't want to open source, so I just want to 
check

if

there is any interest before doing the initial work. Not promising

anything

so don't start haunting me, but let me know if you are interested.

Check it out at:
http://jalbum.net/blog

// Daniel
jalbum.net

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



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






This message was sent using IMP, the Internet Messaging Program.


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






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




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



Re: Open source Wicket blog - Open Source CMS with Wicket

2009-10-14 Thread dtoffe

Have you seen Brix ??   http://code.google.com/p/brix-cms/

Daniel


Bernhard Grünewaldt wrote:
 
 Hello,
 
 It is very interesting to have a wicket blog,
 but for me even more interesting would be a cms based on wicket
 that integrates very smoothly into an existing wicket webapp.
 
 At the moment we use typo3 together with our java webapp.
 
 Would be nice to have a solution where everything is java
 and the same framework :)
 
 Is there such a thing?
 
 
 Bernhard
 
 Maarten Bosteels schrieb:
 I got some really cool ideas from the elephas code, but it seems the
 project
 has stalled a bit ?
 The last commit was 18 dec 2008
 
 Maarten
 
 

-- 
View this message in context: 
http://www.nabble.com/Open-source-Wicket-blog-tp25886040p25893055.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Open source Wicket blog - Open Source CMS with Wicket

2009-10-14 Thread Erik Post
I added this and a couple of other projects to the wiki, since it
seems to come up all the time...

http://cwiki.apache.org/confluence/display/WICKET/Related+Projects+and+Tools

On Wed, Oct 14, 2009 at 5:01 PM, Jeremy Thomerson
jer...@wickettraining.com wrote:
 http://code.google.com/p/brix-cms/

 --
 Jeremy Thomerson
 http://www.wickettraining.com



 On Wed, Oct 14, 2009 at 9:54 AM, Bernhard Grünewaldt 
 bernh...@gruenewaldt.net wrote:

 Hello,

 It is very interesting to have a wicket blog,
 but for me even more interesting would be a cms based on wicket
 that integrates very smoothly into an existing wicket webapp.

 At the moment we use typo3 together with our java webapp.

 Would be nice to have a solution where everything is java
 and the same framework :)

 Is there such a thing?


 Bernhard

 Maarten Bosteels schrieb:

 I got some really cool ideas from the elephas code, but it seems the
 project
 has stalled a bit ?
 The last commit was 18 dec 2008

 Maarten

 On Wed, Oct 14, 2009 at 2:30 PM, ralf.eichin...@pixotec.de wrote:

  added elephas blogging system to Wiki:

 http://cwiki.apache.org/confluence/display/WICKET/Products+based+on+Wicket


 Quoting danisevsky danisev...@gmail.com:

  It would be nice, I am very interested.

 BTW there is another great open-source blogging system -
 http://code.google.com/p/elephas/

 2009/10/14 Anton Veretennikov anton.veretenni...@gmail.com

  I'm interested. This will be definitely something desirable for many

 website builders.
 I want to assist in developing because I need such functionality in
 several sites.

 -- Tony

 On Wed, Oct 14, 2009 at 2:30 PM, Daniel Frisk dan...@jalbum.net
 wrote:

 Hi,

 we have developed a blog tool in Wicket for our website. I just wanted

 to

 see if there is any interest in having that as an open source project?
 The code would have to be adopted for general use and be untangled
 from

 some

 dependencies that we don't want to open source, so I just want to
 check

 if

 there is any interest before doing the initial work. Not promising

 anything

 so don't start haunting me, but let me know if you are interested.

 Check it out at:
 http://jalbum.net/blog

 // Daniel
 jalbum.net

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


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




 
 This message was sent using IMP, the Internet Messaging Program.


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




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




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



Reporting Framework Wicket

2009-10-14 Thread Douglas Ferguson
Hey,

I'm starting to look into reporting frameworks and was curious if  
anybody had successfully integrated with wicket?

Are there any off the shelf integrations or will I have to roll my  
own?

D/

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



Re: Transaction filters and redirection problem

2009-10-14 Thread Iain Reddick

I'm considering it :)

There are a lot of benefits to doing transactions at service call level 
(truthful user feedback for one, not having to deal with requests for 
resources hitting the transaction filter being another). Spring's AOP 
support actually makes doing this as simple and maintainable as it's 
ever likely to be (@Transactional annotations, or marking a whole class 
as transactional), so if we decide it's necessary it is reasonably 
trivial to implement.


The main pro for per-request transactions is the complete seperation of 
transaction concerns.


In the meantime I have a Filter-based solution, or I can hook into the 
wicket request cycle.


iainr

For now,
James Carman wrote:

That's the problem with transaction-per-request.  Why not put your
transaction around your service/domain methods rather than around the
entire request cycle?

On Wed, Oct 14, 2009 at 5:19 AM, Iain Reddick
iain.redd...@beatsystems.com wrote:
  

For anyone in this situation (having to use a transaction filter), here is a
solution that uses a response wrapper to delay the redirect until after the
transaction has completed:

private class DelayedRedirectWrapper extends HttpServletResponseWrapper {

  private String redirectLocation;
public DelayedRedirectWrapper(HttpServletResponse response) {
  super(response);
  }
@Override
  public void sendRedirect(String location) throws IOException {
  redirectLocation = location;
  }
public void doCachedRedirect() throws IOException {
  if ( redirectLocation != null ) {
  super.sendRedirect( redirectLocation );
  }
  }
}

This is then used in the filter's doFilter method like this:

...
DelayedRedirectWrapper responseWrapper = new DelayedRedirectWrapper(
response );
beginTransaction();
filterChain.doFilter( request, wrappedResponse );
doCommit();
endTransaction();
responseWrapper.doCachedRedirect();
...

You could easily put the redirect-delaying code in it's own filter, for
re-usabilty.


iainr

Iain Reddick wrote:


Hi,

I'm working on a Wicket / Hibernate / Spring app, with a configuration
that uses spring's OSIV filter and my own transaction filter (basically a
transaction per-request pattern).

I've run into a problem involving the order of transaction commits and
redirect reponses (triggered by setResponsePage()).

The problem state is shown below:

1. User submits a form to create a new entity
2. Submit handler calls service to save new entity
3. Submit handler calls setResponsePage for page showing overview of new
entity
4. Wicket request cycle completes (I'm assuming this is where wicket does
the response.redirect())
5. Redirect is sent to browser
6. Browser requests new page, which fails as backing entity hasn't been
persisted yet
7. Transaction is commited, and new entity is persisted

This is obviously a race condition between 6 and 7 (i.e. if 6 and 7 are
reversed, everything is OK).

Now, I'm aware that this isn't a wicket-specific issue, but the way wicket
works as a framework means that this situation is much more likely than in a
model 2 style framework.

Is transaction per-request using filters a reasonable configuration to use
with wicket and, if so, how can I ensure that any redirects occur after my
transaction has been committed?

(My guess is to use onBeginRequest and onEndRequest, but that assumes that
onEndRequest happens before redirection)


iainr



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

  

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





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

  




Re: Transaction filters and redirection problem

2009-10-14 Thread James Carman
I think you'd be happier if you went with @Transactional annotations
on your services.  It works out much better, IMHO.

On Wed, Oct 14, 2009 at 12:23 PM, Iain Reddick
iain.redd...@beatsystems.com wrote:
 I'm considering it :)

 There are a lot of benefits to doing transactions at service call level
 (truthful user feedback for one, not having to deal with requests for
 resources hitting the transaction filter being another). Spring's AOP
 support actually makes doing this as simple and maintainable as it's ever
 likely to be (@Transactional annotations, or marking a whole class as
 transactional), so if we decide it's necessary it is reasonably trivial to
 implement.

 The main pro for per-request transactions is the complete seperation of
 transaction concerns.

 In the meantime I have a Filter-based solution, or I can hook into the
 wicket request cycle.

 iainr

 For now,
 James Carman wrote:

 That's the problem with transaction-per-request.  Why not put your
 transaction around your service/domain methods rather than around the
 entire request cycle?

 On Wed, Oct 14, 2009 at 5:19 AM, Iain Reddick
 iain.redd...@beatsystems.com wrote:


 For anyone in this situation (having to use a transaction filter), here
 is a
 solution that uses a response wrapper to delay the redirect until after
 the
 transaction has completed:

 private class DelayedRedirectWrapper extends HttpServletResponseWrapper {

      private String redirectLocation;
            public DelayedRedirectWrapper(HttpServletResponse response) {
          super(response);
      }
           �...@override
      public void sendRedirect(String location) throws IOException {
          redirectLocation = location;
      }
            public void doCachedRedirect() throws IOException {
          if ( redirectLocation != null ) {
              super.sendRedirect( redirectLocation );
      }
  }
 }

 This is then used in the filter's doFilter method like this:

 ...
 DelayedRedirectWrapper responseWrapper = new DelayedRedirectWrapper(
 response );
 beginTransaction();
 filterChain.doFilter( request, wrappedResponse );
 doCommit();
 endTransaction();
 responseWrapper.doCachedRedirect();
 ...

 You could easily put the redirect-delaying code in it's own filter, for
 re-usabilty.


 iainr

 Iain Reddick wrote:


 Hi,

 I'm working on a Wicket / Hibernate / Spring app, with a configuration
 that uses spring's OSIV filter and my own transaction filter (basically
 a
 transaction per-request pattern).

 I've run into a problem involving the order of transaction commits and
 redirect reponses (triggered by setResponsePage()).

 The problem state is shown below:

 1. User submits a form to create a new entity
 2. Submit handler calls service to save new entity
 3. Submit handler calls setResponsePage for page showing overview of new
 entity
 4. Wicket request cycle completes (I'm assuming this is where wicket
 does
 the response.redirect())
 5. Redirect is sent to browser
 6. Browser requests new page, which fails as backing entity hasn't been
 persisted yet
 7. Transaction is commited, and new entity is persisted

 This is obviously a race condition between 6 and 7 (i.e. if 6 and 7 are
 reversed, everything is OK).

 Now, I'm aware that this isn't a wicket-specific issue, but the way
 wicket
 works as a framework means that this situation is much more likely than
 in a
 model 2 style framework.

 Is transaction per-request using filters a reasonable configuration to
 use
 with wicket and, if so, how can I ensure that any redirects occur after
 my
 transaction has been committed?

 (My guess is to use onBeginRequest and onEndRequest, but that assumes
 that
 onEndRequest happens before redirection)


 iainr



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



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




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





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



Re: Italian Bank (was Re: Wicket 1.4.2 Released!)

2009-10-14 Thread Randy S.
Thanks for the info, Giovanni. Please let us know of any Wicket apps
released, especially if there is something we can check out without having
accounts. (I don't live in Italy.)

On Wed, Oct 14, 2009 at 2:32 AM, Giovanni pino_o...@yahoo.com wrote:

 The bank is Intesa San Paolo: http://www.group.intesasanpaolo.com



Ongoing Erractic Form Submit Issue

2009-10-14 Thread Dane Laverty
I've built several Wicket apps for the college where I work. 95% of the time
they work great, but I get frequent complaints about form submits not
functioning correctly. In those cases the form processing code in onSubmit
doesn't appear to be running.

I can't reproduce the error, but the reports are consistent enough that I
believe something isn't right. I've combed through the code up and down, but
can't find any issues. Has anyone else experienced this, and if so, how have
you solved it?

thanks,

Dane


onComponentTagBody Behavior

2009-10-14 Thread Steve Lowery
We have a component that extends Label we've written to replace the body of
the component with N/A, unknown, or whatever resource we give it when its
model object is null (by overriding onComponentTagBody).  I'd like to pull
this out into a behavior, but can't seem to do it by overriding
beforeRender(), onRendered(), or onComponentTag() in the behavior.

I can write to the response in the behavior before and after the components
tag, but not in its body.

Anybody know of a way to do this?


Re: Ongoing Erractic Form Submit Issue

2009-10-14 Thread Pedro Santos
Did you implement the onError method too? Maybe you has an form without an
feedback panel, and some form component don't pass by validations. On that
case the onSubmit method don't get called, for example.

On Wed, Oct 14, 2009 at 3:34 PM, Dane Laverty danelave...@gmail.com wrote:

 I've built several Wicket apps for the college where I work. 95% of the
 time
 they work great, but I get frequent complaints about form submits not
 functioning correctly. In those cases the form processing code in onSubmit
 doesn't appear to be running.

 I can't reproduce the error, but the reports are consistent enough that I
 believe something isn't right. I've combed through the code up and down,
 but
 can't find any issues. Has anyone else experienced this, and if so, how
 have
 you solved it?

 thanks,

 Dane




-- 
Pedro Henrique Oliveira dos Santos


Re: Integrating Separate Different Wicket Applications Into One

2009-10-14 Thread Carlo Camerino
thanks,

will take a look...

however, have you encountered instances in which you want to have
distributed web applications and still be able to shared httpsession?
The distributed web application however are different applications and
are not of the same kind unlike that of clustering

one function will go to this application server, another function will
go to this application server.

On Wed, Oct 14, 2009 at 11:28 PM,  ralf.eichin...@pixotec.de wrote:
 perhaps have a look on www.devproof.org.
 it is a portal like wicket application, which hosts different modules
 (JARs).

 Quoting Carlo Camerino carlo.camer...@gmail.com:

 Hi,

 I was wondering what are the most efficient ways to separate different
 applications into one application?
 We have this use case in which we need to integrate two different
 wicket applications and make them appear as  if they are running in
 one platform only.
 I tried using portlets but it introduced a lot of coding
 complications. I tried running it using Jetspeed 2 and found out that
 several components are having problems.
 Most of the problem seems to come from the fact that we are using the
 indicatingajaxbutton. I have this issue in which I cannot easily
 transfer page from one page to another. I don't really know if
 portlets are the way to go because the applications by themselves are
 rich in functionality. I just need to be able to access them all in
 one page.
 I know that it seems to be some sort of portal but i think 'd have to
 take portlets out for the mean time due to the strict timeline and
 it's actually the first time we tried using portlets in our company.

 I'm thinking of using iframes for each application instead which will
 lead me to a grand total of three different applications running with
 only one entry point...
 Is this the proper way of doing it? My issue will be with regards to
 the httpsessions i'd have to have a total of three unlike in the
 portlets...

 My idea is I have a main application which serves as my entry point.
 In that application I lay out the available functionalities via menu
 links. When I click on a menu link,
 I will place redirect my iframe to point to that page enabling me to
 do that transaction? My main issue would be I think the httpsession
 expiry. If the user spends a lot of time using the application, the
 outside session could expire if the links outside are not clicked.

 What are other possible solutions that I could use for this one? As of
 now I could think of two ways using portlets and the other one using
 iframes.. As of now we are  considering one application  and just
 provide remoting for accessing business objects.

 Is there anyway of getting html coming from another application and
 showing it into my application?
 For example, i have three applications 1 ,2 and 3,
 3 is my main application but I get the html coming from 1 and 2,
 without using iframes. Somewhat like WSRP (Web Service for Remote
 Porlets). Or i just need to get the servlet response from the third
 aplication/

 I'm not sure if it's possible. Would appreciate your insights on this
 one..

 Thanks
 Carlo

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





 
 This message was sent using IMP, the Internet Messaging Program.

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



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



Wicket Bench Selenium Tests

2009-10-14 Thread Douglas Ferguson
I'm getting the following error when I try to run a wicket bench  
selenium test.


Exception in thread main java.lang.NoClassDefFoundError: org/mortbay/ 
http/HttpHandler
  at wicketbench.runner.Main.main(Main.java:14)
Caused by: java.lang.ClassNotFoundException:  
org.mortbay.http.HttpHandler

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



Re: Open source Wicket blog - Open Source CMS with Wicket

2009-10-14 Thread ralf . eichinger

Hi Erik,

this was already on this list:
http://cwiki.apache.org/confluence/display/WICKET/Products+based+on+Wicket

As it is a product and not a tool...
it is a project, but not one that is a extension to wicket...

ok, I understand that everyone thinks different about the lists

Quoting Erik Post eriksen...@gmail.com:


I added this and a couple of other projects to the wiki, since it
seems to come up all the time...

http://cwiki.apache.org/confluence/display/WICKET/Related+Projects+and+Tools

On Wed, Oct 14, 2009 at 5:01 PM, Jeremy Thomerson
jer...@wickettraining.com wrote:

http://code.google.com/p/brix-cms/

--
Jeremy Thomerson
http://www.wickettraining.com



On Wed, Oct 14, 2009 at 9:54 AM, Bernhard Grünewaldt 
bernh...@gruenewaldt.net wrote:


Hello,

It is very interesting to have a wicket blog,
but for me even more interesting would be a cms based on wicket
that integrates very smoothly into an existing wicket webapp.

At the moment we use typo3 together with our java webapp.

Would be nice to have a solution where everything is java
and the same framework :)

Is there such a thing?


Bernhard

Maarten Bosteels schrieb:


I got some really cool ideas from the elephas code, but it seems the
project
has stalled a bit ?
The last commit was 18 dec 2008

Maarten

On Wed, Oct 14, 2009 at 2:30 PM, ralf.eichin...@pixotec.de wrote:

 added elephas blogging system to Wiki:


http://cwiki.apache.org/confluence/display/WICKET/Products+based+on+Wicket


Quoting danisevsky danisev...@gmail.com:

 It would be nice, I am very interested.


BTW there is another great open-source blogging system -
http://code.google.com/p/elephas/

2009/10/14 Anton Veretennikov anton.veretenni...@gmail.com

 I'm interested. This will be definitely something desirable for many


website builders.
I want to assist in developing because I need such functionality in
several sites.

-- Tony

On Wed, Oct 14, 2009 at 2:30 PM, Daniel Frisk dan...@jalbum.net
wrote:


Hi,

we have developed a blog tool in Wicket for our website. I just wanted


to


see if there is any interest in having that as an open source project?
The code would have to be adopted for general use and be untangled
from


some


dependencies that we don't want to open source, so I just want to
check


if


there is any interest before doing the initial work. Not promising


anything


so don't start haunting me, but let me know if you are interested.

Check it out at:
http://jalbum.net/blog

// Daniel
jalbum.net

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


 -

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






This message was sent using IMP, the Internet Messaging Program.


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






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






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







This message was sent using IMP, the Internet Messaging Program.

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



Re: Wicket Bench Selenium Tests

2009-10-14 Thread Douglas Ferguson
For that matter, I'm not totally married to WicketBench, is anybody  
else successfully doing functional testing with wicket?

D/

On Oct 14, 2009, at 2:54 PM, Douglas Ferguson wrote:

 I'm getting the following error when I try to run a wicket bench
 selenium test.


 Exception in thread main java.lang.NoClassDefFoundError: org/ 
 mortbay/
 http/HttpHandler
  at wicketbench.runner.Main.main(Main.java:14)
 Caused by: java.lang.ClassNotFoundException:
 org.mortbay.http.HttpHandler

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



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



Re: Integrating Separate Different Wicket Applications Into One

2009-10-14 Thread ralf . eichinger
in my former company I implemented a framework that integrates  
different webapplications into one.
I made a integration-application which takes a template with  
placeholders for the foreign parts, gets the contents from the  
different servers, parses all content (within 100 ms), changes every  
link, css, everything to target everything to the  
integration-application-framework, which handles every action/link, etc.


It worked like a charme...


Quoting Carlo Camerino carlo.camer...@gmail.com:


thanks,

will take a look...

however, have you encountered instances in which you want to have
distributed web applications and still be able to shared httpsession?
The distributed web application however are different applications and
are not of the same kind unlike that of clustering

one function will go to this application server, another function will
go to this application server.

On Wed, Oct 14, 2009 at 11:28 PM,  ralf.eichin...@pixotec.de wrote:

perhaps have a look on www.devproof.org.
it is a portal like wicket application, which hosts different modules
(JARs).

Quoting Carlo Camerino carlo.camer...@gmail.com:


Hi,

I was wondering what are the most efficient ways to separate different
applications into one application?
We have this use case in which we need to integrate two different
wicket applications and make them appear as  if they are running in
one platform only.
I tried using portlets but it introduced a lot of coding
complications. I tried running it using Jetspeed 2 and found out that
several components are having problems.
Most of the problem seems to come from the fact that we are using the
indicatingajaxbutton. I have this issue in which I cannot easily
transfer page from one page to another. I don't really know if
portlets are the way to go because the applications by themselves are
rich in functionality. I just need to be able to access them all in
one page.
I know that it seems to be some sort of portal but i think 'd have to
take portlets out for the mean time due to the strict timeline and
it's actually the first time we tried using portlets in our company.

I'm thinking of using iframes for each application instead which will
lead me to a grand total of three different applications running with
only one entry point...
Is this the proper way of doing it? My issue will be with regards to
the httpsessions i'd have to have a total of three unlike in the
portlets...

My idea is I have a main application which serves as my entry point.
In that application I lay out the available functionalities via menu
links. When I click on a menu link,
I will place redirect my iframe to point to that page enabling me to
do that transaction? My main issue would be I think the httpsession
expiry. If the user spends a lot of time using the application, the
outside session could expire if the links outside are not clicked.

What are other possible solutions that I could use for this one? As of
now I could think of two ways using portlets and the other one using
iframes.. As of now we are  considering one application  and just
provide remoting for accessing business objects.

Is there anyway of getting html coming from another application and
showing it into my application?
For example, i have three applications 1 ,2 and 3,
3 is my main application but I get the html coming from 1 and 2,
without using iframes. Somewhat like WSRP (Web Service for Remote
Porlets). Or i just need to get the servlet response from the third
aplication/

I'm not sure if it's possible. Would appreciate your insights on this
one..

Thanks
Carlo

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







This message was sent using IMP, the Internet Messaging Program.

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




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







This message was sent using IMP, the Internet Messaging Program.

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



Re: onComponentTagBody Behavior

2009-10-14 Thread James Carman
Use a wrapping model?

On Wed, Oct 14, 2009 at 2:38 PM, Steve Lowery
slow...@gatessolutions.com wrote:
 We have a component that extends Label we've written to replace the body of
 the component with N/A, unknown, or whatever resource we give it when its
 model object is null (by overriding onComponentTagBody).  I'd like to pull
 this out into a behavior, but can't seem to do it by overriding
 beforeRender(), onRendered(), or onComponentTag() in the behavior.

 I can write to the response in the behavior before and after the components
 tag, but not in its body.

 Anybody know of a way to do this?


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



Re: Open source Wicket blog - Open Source CMS with Wicket

2009-10-14 Thread Erik Post
Hi Ralph,

Right, I'd glossed over that. I have to say though that the
disctinction between the two lists seems a bit arbitrary to me. For
instance,  the 'Vocus student information system' and 'Finan' (which
are not available to the public) are on the 'products' list along with
Brix CMS, even though the former have little no value to developers
because they have no access to it. The latter on the other hand could
be considered to be a final product _or_ a springboard for custom
development or customization.The distinction between
components/tools/frameworks/end user products/sites is perhaps not
immediately evident, but I would peronally prefer a list of sites/apps
that showcase what you could do with Wicket, vs. a separate list of
stuff that developers can actually use in development. In that sense
Brix and, say, Wicketopia are more closely related, wouldn't you
agree?

Cheers,
Erik


On Wed, Oct 14, 2009 at 10:46 PM,  ralf.eichin...@pixotec.de wrote:
 Hi Erik,

 this was already on this list:
 http://cwiki.apache.org/confluence/display/WICKET/Products+based+on+Wicket

 As it is a product and not a tool...
 it is a project, but not one that is a extension to wicket...

 ok, I understand that everyone thinks different about the lists

 Quoting Erik Post eriksen...@gmail.com:

 I added this and a couple of other projects to the wiki, since it
 seems to come up all the time...


 http://cwiki.apache.org/confluence/display/WICKET/Related+Projects+and+Tools

 On Wed, Oct 14, 2009 at 5:01 PM, Jeremy Thomerson
 jer...@wickettraining.com wrote:

 http://code.google.com/p/brix-cms/

 --
 Jeremy Thomerson
 http://www.wickettraining.com



 On Wed, Oct 14, 2009 at 9:54 AM, Bernhard Grünewaldt 
 bernh...@gruenewaldt.net wrote:

 Hello,

 It is very interesting to have a wicket blog,
 but for me even more interesting would be a cms based on wicket
 that integrates very smoothly into an existing wicket webapp.

 At the moment we use typo3 together with our java webapp.

 Would be nice to have a solution where everything is java
 and the same framework :)

 Is there such a thing?


 Bernhard

 Maarten Bosteels schrieb:

 I got some really cool ideas from the elephas code, but it seems the
 project
 has stalled a bit ?
 The last commit was 18 dec 2008

 Maarten

 On Wed, Oct 14, 2009 at 2:30 PM, ralf.eichin...@pixotec.de wrote:

  added elephas blogging system to Wiki:


 http://cwiki.apache.org/confluence/display/WICKET/Products+based+on+Wicket


 Quoting danisevsky danisev...@gmail.com:

  It would be nice, I am very interested.

 BTW there is another great open-source blogging system -
 http://code.google.com/p/elephas/

 2009/10/14 Anton Veretennikov anton.veretenni...@gmail.com

  I'm interested. This will be definitely something desirable for many

 website builders.
 I want to assist in developing because I need such functionality in
 several sites.

 -- Tony

 On Wed, Oct 14, 2009 at 2:30 PM, Daniel Frisk dan...@jalbum.net
 wrote:

 Hi,

 we have developed a blog tool in Wicket for our website. I just
 wanted

 to

 see if there is any interest in having that as an open source
 project?
 The code would have to be adopted for general use and be untangled
 from

 some

 dependencies that we don't want to open source, so I just want to
 check

 if

 there is any interest before doing the initial work. Not promising

 anything

 so don't start haunting me, but let me know if you are interested.

 Check it out at:
 http://jalbum.net/blog

 // Daniel
 jalbum.net


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



  -

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




 
 This message was sent using IMP, the Internet Messaging Program.


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




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




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





 
 This message was sent using IMP, the Internet Messaging Program.

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




Re: Transaction filters and redirection problem

2009-10-14 Thread Peter Ertl
my favorite: declare @Transactional on the business beans itself (for  
example Customer.findOrders()) and let salve inject the dependencies  
and the transaction management logic.


  http://code.google.com/p/salve

:-)

Am 14.10.2009 um 20:10 schrieb James Carman:


I think you'd be happier if you went with @Transactional annotations
on your services.  It works out much better, IMHO.

On Wed, Oct 14, 2009 at 12:23 PM, Iain Reddick
iain.redd...@beatsystems.com wrote:

I'm considering it :)

There are a lot of benefits to doing transactions at service call  
level
(truthful user feedback for one, not having to deal with requests  
for

resources hitting the transaction filter being another). Spring's AOP
support actually makes doing this as simple and maintainable as  
it's ever

likely to be (@Transactional annotations, or marking a whole class as
transactional), so if we decide it's necessary it is reasonably  
trivial to

implement.

The main pro for per-request transactions is the complete  
seperation of

transaction concerns.

In the meantime I have a Filter-based solution, or I can hook into  
the

wicket request cycle.

iainr

For now,
James Carman wrote:


That's the problem with transaction-per-request.  Why not put your
transaction around your service/domain methods rather than around  
the

entire request cycle?

On Wed, Oct 14, 2009 at 5:19 AM, Iain Reddick
iain.redd...@beatsystems.com wrote:



For anyone in this situation (having to use a transaction  
filter), here

is a
solution that uses a response wrapper to delay the redirect until  
after

the
transaction has completed:

private class DelayedRedirectWrapper extends  
HttpServletResponseWrapper {


 private String redirectLocation;
   public DelayedRedirectWrapper(HttpServletResponse  
response) {

 super(response);
 }
   @Override
 public void sendRedirect(String location) throws IOException {
 redirectLocation = location;
 }
   public void doCachedRedirect() throws IOException {
 if ( redirectLocation != null ) {
 super.sendRedirect( redirectLocation );
 }
 }
}

This is then used in the filter's doFilter method like this:

...
DelayedRedirectWrapper responseWrapper = new  
DelayedRedirectWrapper(

response );
beginTransaction();
filterChain.doFilter( request, wrappedResponse );
doCommit();
endTransaction();
responseWrapper.doCachedRedirect();
...

You could easily put the redirect-delaying code in it's own  
filter, for

re-usabilty.


iainr

Iain Reddick wrote:



Hi,

I'm working on a Wicket / Hibernate / Spring app, with a  
configuration
that uses spring's OSIV filter and my own transaction filter  
(basically

a
transaction per-request pattern).

I've run into a problem involving the order of transaction  
commits and

redirect reponses (triggered by setResponsePage()).

The problem state is shown below:

1. User submits a form to create a new entity
2. Submit handler calls service to save new entity
3. Submit handler calls setResponsePage for page showing  
overview of new

entity
4. Wicket request cycle completes (I'm assuming this is where  
wicket

does
the response.redirect())
5. Redirect is sent to browser
6. Browser requests new page, which fails as backing entity  
hasn't been

persisted yet
7. Transaction is commited, and new entity is persisted

This is obviously a race condition between 6 and 7 (i.e. if 6  
and 7 are

reversed, everything is OK).

Now, I'm aware that this isn't a wicket-specific issue, but the  
way

wicket
works as a framework means that this situation is much more  
likely than

in a
model 2 style framework.

Is transaction per-request using filters a reasonable  
configuration to

use
with wicket and, if so, how can I ensure that any redirects  
occur after

my
transaction has been committed?

(My guess is to use onBeginRequest and onEndRequest, but that  
assumes

that
onEndRequest happens before redirection)


iainr



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




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





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







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



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



Re: Open source Wicket blog - Open Source CMS with Wicket

2009-10-14 Thread dtoffe

I fully agree with you.

Daniel


Erik Post-5 wrote:
 
 Hi Ralph,
 
 Right, I'd glossed over that. I have to say though that the
 disctinction between the two lists seems a bit arbitrary to me. For
 .
 immediately evident, but I would peronally prefer a list of sites/apps
 that showcase what you could do with Wicket, vs. a separate list of
 stuff that developers can actually use in development. In that sense
 Brix and, say, Wicketopia are more closely related, wouldn't you
 agree?
 
 

-- 
View this message in context: 
http://www.nabble.com/Open-source-Wicket-blog-tp25886040p25900041.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: FileUploadField blocks component submission when an empty file is selected

2009-10-14 Thread Igor Vaynberg
1.4-RC1???

you know that 1.4.2 is out...

-igor

On Wed, Oct 14, 2009 at 3:08 AM, Ian Marshall
general.ianmarshall...@gmail.com wrote:


 igor.vaynberg wrote:

 sure, you can create a quickstart that reproduces this and attach it
 to a jira issue.

 Thanks. I have not done a quickstart. (Is this a Maven thing? I am still an
 Ant person!) I have created the JIRA issue, which can be found at

  https://issues.apache.org/jira/browse/WICKET-2523

 Please let me know if there is anything more I can do to specift the problem
 better.

 Ian Marshall

 --
 View this message in context: 
 http://www.nabble.com/FileUploadField-blocks-component-submission-when-an-empty-file-is-selected-tp25855504p25888396.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Hippo's patch for wicket ids

2009-10-14 Thread Douglas Ferguson
Has anybody seen this:

http://www.onehippo.org/cms7/integration_testing.html

Seems like a nice alternative vs. having to set markupIds on all  
components.

Thoughts?



They have a patch for wicket:

 Index: jdk-1.4/wicket/src/main/java/org/apache/wicket/Session.java
 ===
 *** jdk-1.4/wicket/src/main/java/org/apache/wicket/Session.java
 (revision 724306)
 --- jdk-1.4/wicket/src/main/java/org/apache/wicket/Session.java
 (working copy)
 ***
 *** 1475,1478 
 --- 1475,1489 
   {
   return sequence++;
   }
 +
 + /**
 +  * Retrieves the next available session-unique value for the  
 supplied Component
 +  *
 +  * @param component
 +  *the component which requests the generation of a  
 markup identifier
 +  * @return session-unique value
 +  */
 + public Object getMarkupId(Component component) {
 + return new Integer(nextSequenceValue());
 + }
   }
 Index: jdk-1.4/wicket/src/main/java/org/apache/wicket/Component.java
 ===
 *** jdk-1.4/wicket/src/main/java/org/apache/wicket/Component.java  
 (revision 724306)
 --- jdk-1.4/wicket/src/main/java/org/apache/wicket/Component.java  
 (working copy)
 ***
 *** 1426,1437 
   return null;
   }

 ! final int generatedMarkupId = storedMarkupId instanceof Integer
 ! ? ((Integer)storedMarkupId).intValue() : Session.get 
 ().nextSequenceValue();
 !
 ! if (storedMarkupId == null)
 ! {
 ! setMarkupIdImpl(new Integer(generatedMarkupId));
   }

   // try to read from markup
 --- 1426,1445 
   return null;
   }

 ! String markupIdPostfix;
 ! if (!(storedMarkupId instanceof Integer)) {
 ! Object markupIdFromSession = 
 Session.get().getMarkupId(this);
 ! if (storedMarkupId == null  markupIdFromSession != 
 null) {
 ! setMarkupIdImpl(markupIdFromSession);
 ! }
 ! storedMarkupId = markupIdFromSession;
 ! }
 ! if (storedMarkupId instanceof Integer) {
 ! markupIdPostfix = Integer.toHexString(((Integer)  
 storedMarkupId).intValue()).toLowerCase();
 ! } else if (storedMarkupId instanceof String) {
 ! return (String) storedMarkupId;
 ! } else {
 ! markupIdPostfix = storedMarkupId.toString();
   }

   // try to read from markup
 ***
 *** 1449,1455 
   markupIdPrefix = getId();
   }

 - String markupIdPostfix = Integer.toHexString 
 (generatedMarkupId).toLowerCase();
   markupIdPostfix = RequestContext.get().encodeMarkupId 
 (markupIdPostfix);

   String markupId = markupIdPrefix + markupIdPostfix;
 --- 1457,1462 


Then in their session, they return stable ids

 private MapString,Integer pluginComponentCounters = new  
 HashMapString,Integer();

 // Do not add the @Override annotation on this
 public Object getMarkupId(Component component) {
 String markupId = null;
 for (Component ancestor=component.getParent(); ancestor! 
 =null  markupId==null; ancestor=ancestor.getParent()) {
 if (ancestor instanceof IPlugin || ancestor instanceof  
 Home) {
 markupId = ancestor.getMarkupId(true);
 break;
 }
 }
 if (markupId == null) {
 return root;
 }
 int componentNum = 0;
 if (pluginComponentCounters.containsKey(markupId)) {
 componentNum = pluginComponentCounters.get 
 (markupId).intValue();
 }
 ++componentNum;
 pluginComponentCounters.put(markupId, new Integer 
 (componentNum));
 return markupId + _ + componentNum;
 }
 }


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



Re: Ongoing Erractic Form Submit Issue

2009-10-14 Thread Dane Laverty
I hadn't implemented onError. Thanks for pointing that out. Now that I added
onError, I discovered that ModalWindow doesn't automatically scroll to the
top to display messages on an error. I also discovered that placing a
FeedbackPanel into the ModalWindow directly won't display messages --
instead I had to wrap the FeedbackPanel in a WebMarkupContainer.

In case anyone else needs to get their Modal Window to scroll up, here is
the solution I used:

  IndicatingAjaxButton submitLink = new
IndicatingAjaxButton(submitLink, MyForm.this) {
@Override
protected void onSubmit(AjaxRequestTarget target, Form?
form) {
...
}

@Override
protected void onError(AjaxRequestTarget target, Form?
form) {
...
}

@Override
protected IAjaxCallDecorator getAjaxCallDecorator() {
return new AjaxCallDecorator() {
@Override
public CharSequence
decorateOnSuccessScript(CharSequence script) {
return  $('# +
MyModalWindowPanel.this.getMarkupId() + ').parent().attr('scrollTop', '0');
 + script;
}
};
}
};
add(submitLink);


On Wed, Oct 14, 2009 at 11:40 AM, Pedro Santos pedros...@gmail.com wrote:

 Did you implement the onError method too? Maybe you has an form without an
 feedback panel, and some form component don't pass by validations. On that
 case the onSubmit method don't get called, for example.

 On Wed, Oct 14, 2009 at 3:34 PM, Dane Laverty danelave...@gmail.com
 wrote:

  I've built several Wicket apps for the college where I work. 95% of the
  time
  they work great, but I get frequent complaints about form submits not
  functioning correctly. In those cases the form processing code in
 onSubmit
  doesn't appear to be running.
 
  I can't reproduce the error, but the reports are consistent enough that I
  believe something isn't right. I've combed through the code up and down,
  but
  can't find any issues. Has anyone else experienced this, and if so, how
  have
  you solved it?
 
  thanks,
 
  Dane
 



 --
 Pedro Henrique Oliveira dos Santos



test

2009-10-14 Thread wicketmonkey



Re: test

2009-10-14 Thread Jeremy Thomerson
Test test?

--
Jeremy Thomerson
http://www.wickettraining.com



On Wed, Oct 14, 2009 at 11:03 PM, wicketmon...@comcast.net wrote: