Why TD can't include background attribute in html template?

2007-08-22 Thread smithfox

I'm a wicket beginner,
Yesterday, I find a problem, but I can't sure it is a wicket1.3beta2 bug

If you write a td with a background attribute, all wicket:id after the td
will can't be recognized.

My html template is a simple form. 
UTF-8
-- 
View this message in context: 
http://www.nabble.com/Why-TD-can%27t-include-background-attribute-in-html-template--tf4309559.html#a12268532
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: DownloadLink hanging

2007-08-22 Thread Igor Vaynberg
you can register a shared resource and build a url for it. inside shared
resource you can simply call Session.get() to get to wicket session.

see application.getsharedresources();

alternatively you can extend WicketSessionFilter which will also allow you
to perform Session.get()


-igor


On 8/21/07, Thomas Singer [EMAIL PROTECTED] wrote:

 Disclaimer: I'm not experienced with filters or wicket resources.

 Is it possible to create a (shared) wicket resource which can be
 filtered,
 so it only is accessible when the right flag is set in OurWebSession?

 Or would you suggest to write an own javax.servlet.Filter which does this
 flag-check and redirects internally to a hidden location which then is
 send
 to the client by Tomcat when the right flag is set?

 Thanks in advance.

 --
 Best regards,
 Thomas Singer
 _
 SyntEvo GmbH
 Brunnfeld 11
 83404 Ainring
 Germany
 www.syntevo.com


 Igor Vaynberg wrote:
  On 8/21/07, Thomas Singer [EMAIL PROTECTED] wrote:
  Hi Igor,
 
  yep, DownloadLinks will block because requests to the same page are
  serialized.
  Sorry, I don't understand, why links to downloadable resources should
 be
  blocking or serialized. Usually downloads are the larger parts of an
  application and hence should never lock the application.
 
 
  because this is how this component is designed to work. if you dont like
 it
  you can build your own that doesnt block.
 
  to work around it register a shared resource or create a servlet that
 can
  stream the file (resoureces in wicket are not serialized), then create
 a
  link component that can build a download url.
  Well, I guess, we can't use a servlet, because wicket is registered to
  /*, so it will get everything.
 
 
  wicket is a filter, so even though it is mapped to /* it will let urls
 that
  are not wicket urls pass through. how do you think it lets you download
  static images...
  so if you map your wicket filter on /* and the servlet on /download and
 yo
  have no download mount in wicket the filter will let /download/*
 requests
  go to the servlet.
 
  -igor
 
 
  Could you please give some more hints
  about shared resources? I've tried to search
  http://cwiki.apache.org/WICKET/ without luck.
 
  Alternatively, is it possible to complete shut off the serialization
  (which seems to cause this and maybe even other blocking problems)?
 
  --
  Best regards
  Thomas Singer
  _
  SyntEvo GmbH
  Brunnfeld 11
  83404 Ainring
  Germany
 
 
  Igor Vaynberg wrote:
  yep, DownloadLinks will block because requests to the same page are
  serialized.
 
  to work around it register a shared resource or create a servlet that
  can
  stream the file (resoureces in wicket are not serialized), then create
 a
  link component that can build a download url.
 
  -igor
 
 
  On 8/20/07, Thomas Singer [EMAIL PROTECTED] wrote:
  Hi,
 
  We are using Wicket 1.3 beta 2 running in Tomcat and have a couple of
  DownloadLinks on a page (created with 'new DownloadPage(parameters)')
  for
  larger files (a couple of MB). I open different tabs of the same page
  in
  Opera and click these download links, so the downloads should happen
 in
  parallel. Unfortunately, the web-application seems to hang until the
  previous files were completely downloaded. Even normal pages do not
  show
  up.
 
  This does not happen for other websites (so our internet connection
  couldn't
  be the reason) and not for the same project with
  old-JSP-/Servlet-technology
  at a different server running in the same version of Tomcat.
 
  Is this a known problem? How to work around?
 
  --
  Best regards,
  Thomas Singer
  _
  SyyntEvo GmbH
  Brunnfeld 11
  83404 Ainring
  Germany
  www.syntevo.com
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

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




Re: How to set wicket's locale?

2007-08-22 Thread Johan Compagner
then you browser tells wicket that it should use English .
But you can set it yourself: Session.setLocale()

johan


On 8/22/07, smithfox [EMAIL PROTECTED] wrote:


 I used RequiredTextField, when the field is empty, the feedback show some
 meesage in English, How to  change it to Chinese.
 --
 View this message in context:
 http://www.nabble.com/How-to-set-wicket%27s-locale--tf4309547.html#a12268483
 Sent from the Wicket - User mailing list archive at Nabble.com.


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




Re: How to set wicket's locale?

2007-08-22 Thread Eelco Hillenius
On 8/21/07, Johan Compagner [EMAIL PROTECTED] wrote:
 then you browser tells wicket that it should use English .
 But you can set it yourself: Session.setLocale()

Or if for instance you want to fix the locale to always use a certain
one, use a custom session and set the locale it's constructor.

Eelco

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



Re: keyboard shortcuts in wicket ?

2007-08-22 Thread Nino Saturnino Martinez Vazquez Wael

Hi

I once started a wicket stuff contrib, called wicket input events. Which 
were gonna be all about input events like mouse events and key events. 
It never got that far because I didnt really needed it. Some of the 
basic infra structure in the project should be ready I think but its not 
in any usable state right now.


Feel free to contine the work, as I currently only will have time to do 
it when I need it, although I'll be happy to assist.



regards Nino

Steen Larsen wrote:

Hi,

I am doing an evaluation of wicket and would like to know if there is any
support for keyboard shortcuts besides the standard html accesskey. Is it
for instance possible to define a key kombination for an AJAX component ?

/Steen

  


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



Re: How to set wicket's locale?

2007-08-22 Thread smithfox

I have solved the problem with your help.:jumping:
Thanks

But I must set locale in every Page java class.
Is there a uniform configuration to set it?



Eelco Hillenius wrote:
 
 On 8/21/07, Johan Compagner [EMAIL PROTECTED] wrote:
 then you browser tells wicket that it should use English .
 But you can set it yourself: Session.setLocale()
 
 Or if for instance you want to fix the locale to always use a certain
 one, use a custom session and set the locale it's constructor.
 
 Eelco
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/How-to-set-wicket%27s-locale--tf4309547.html#a12269046
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: HeaderContributor for conditional comments

2007-08-22 Thread Rüdiger Schulz
2007/8/22, Matej Knopp [EMAIL PROTECTED]:

 Just beware that while conditional comments will work on regular
 request, they will not work during ajax header contribution.


Ok, good to know. Actually I want this just for the regular CSS.

Also I don't understand what you mean by
 I'd like to serve MSIE with
 CompressedResourceReferences


I put all my JS and CSS into head via CompressedResourceReferences, and I
want to use that for conditional-commented CSS, too.


-- 
greetings from Berlin,

Rüdiger Schulz

www.2rue.de


Re: Does anyone develop Wicket app using IRAD and Websphere

2007-08-22 Thread Martijn Dashorst
Or use WicketServlet implementation instead of the WicketFilter.

Martijn

On 8/22/07, Sean Sullivan [EMAIL PROTECTED] wrote:
 I had some problems running Wicket 1.3 in Websphere 6.0

 Websphere 6.x had some servlet filter bugs that affected Wicket.  You should
 try upgrading to a newer version of Websphere 6.1.x

 Sean

 On 8/21/07, juliez [EMAIL PROTECTED] wrote:
 
 
  It's fairly easy to work with Wicket (1.3 beta2) using Jetty as the web
  server. However, when I tried to do the same thing using IRAD and
  Websphere,
  I always got file not found or Error 404. Then I tried to deploy the
  wicket-examples-1.3.0-beta2.war to Websphere (6.1.0.2 Build Number:
  cf20633.22), the example can't work correctly too - got Error 404: Error
  reported: 404.
 
  Is there anything special need to be set for IBM's stuff? Any suggestion?
 
 
 



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

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



unknown Exception how to solve

2007-08-22 Thread fhagen
Hi, 

in my app i have a RefreshingView that gets a label an a TextField 
subclass MyAjaxTextField.

form wicket:id=form
table cellspacing=0 class=dataview
tr
thBeschreibung/th
th2004/th
/tr
tr wicket:id=simple
tdspan wicket:id=description[description]/span/td
tdinput type=text wicket:id=value/input /td
/tr
/table
/form

##
public class MyRefrechingView extends RefreshingView{
[...]
protected void populateItem(Item item) {
 // populate the row of the repeater
MyForm form = (MyForm)this.getParent();
IModel position = item.getModel();
 
final Label description = new Label(description, new 
PropertyModel(position, description));
item.add(description);
 
final MyAjaxTextField valueField = new MyAjaxTextField(value, 
new PropertyModel(position,output));
valueField.add(new MyAjaxFormSubmitBehavior(form,onchange));
valueField.setOutputMarkupId(true);
item.add(valueField);
}

}
 

##

public class MyAjaxTextField extends TextField{

MyOnChangeAjaxBehavior ajaxBehavior = new 
MyOnChangeAjaxBehavior();
 
public MyAjaxTextField(String arg0) {
super(arg0);
 
}
public MyAjaxTextField(String arg0, IModel model) {
super(arg0,model);
//this.add(ajaxBehavior);
PropertyModel pm = (PropertyModel)model;
Position position = (Position)pm.getTarget();

if(position.hasFormula()){
this.add(new MyAjaxOnClickEvent(onclick));
this.add(new MyAjaxOnBlurEvent(onblur));
}
}
}

The Value of the TextField depends on some data stored at Position. It 
could be a normal double value or a formula.
If i run the app, everything seems fine and all calculations and ajax 
updateing seems to work but i got this exception:

58023 [http-8080-Processor25] ERROR org.apache.wicket.RequestCycle - there 
was an error cleaning up target [EMAIL PROTECTED] 
markupIdToComponent [{value6=[MarkupContainer [Component id = value, page 
= No Page, path = 1:value.MyAjaxTextField]], form5=[MarkupContainer 
[Component id = form, page = pages.ConfirmPage, path = 
1:tabs:panel:form.MyForm, isVisible = true, isVersioned = false]]}], 
prependJavascript [[]], appendJavascript [[]].
java.lang.IllegalStateException: No Page found for component 
[MarkupContainer [Component id = value, page = No Page, path = 
1:value.MyAjaxTextField]]
at org.apache.wicket.Component.getPage(Component.java:1343)
at org.apache.wicket.ajax.AjaxRequestTarget.detach(
AjaxRequestTarget.java:436)
at org.apache.wicket.RequestCycle.detach(RequestCycle.java:911)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1194)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:499)
at org.apache.wicket.protocol.http.WicketFilter.doGet(
WicketFilter.java:257)
at org.apache.wicket.protocol.http.WicketServlet.doPost(
WicketServlet.java:144)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(
ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(
StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(
StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(
StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(
ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(
StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(
CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(
Http11Processor.java:868)
at 
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(
Http11BaseProtocol.java:663)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(
PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(
LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
ThreadPool.java:684)
at java.lang.Thread.run(Unknown Source)



What do i have to change to avoid these exception. I don't have a clue 
where it comes from. Even the debugger doesn't help.

Hope one of you could?

Fabian

wicket vs tapestry ?

2007-08-22 Thread Alex Shneyderman
I just started to look for a component based framework. I came across
both tapestry and wicket (and it would be hard not to as you guys
share the same host) but I kind of fail to see what the differences
are?

From my limited experiments with both, wicket and tapestry seem to be
quite similar. So, I wonder if there is anything I am not seeing?
Anyone has a comparisson map of wicket vs tapestry?

Alex.

PS: I like both frameworks for their lightness I just feel that I will
need to stick with one to be pragmatic :-(

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



Re: wicket vs tapestry ?

2007-08-22 Thread Eelco Hillenius
On 8/22/07, Alex Shneyderman [EMAIL PROTECTED] wrote:
 I just started to look for a component based framework. I came across
 both tapestry and wicket (and it would be hard not to as you guys
 share the same host) but I kind of fail to see what the differences
 are?

 From my limited experiments with both, wicket and tapestry seem to be
 quite similar. So, I wonder if there is anything I am not seeing?
 Anyone has a comparisson map of wicket vs tapestry?

The best thing you can do is give them both a spin. They are quite
different really; I'm sure you'll find that out once you code a few
examples with them.

You can download the first chapter of Wicket In Action for free here:
http://manning.com/dashorst/ and some chapters of Tapestry In Action
here: http://manning.com/lewisship/

Eelco

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



Re: Ajax progressbar

2007-08-22 Thread Xavier Hanin
On 8/22/07, Martin Bednář [EMAIL PROTECTED] wrote:

 Hi,

 Are there  some sample how to implement progressbar that react on state
 during long runing request ?


In xooctory we have implemented a progress bar with an estimated time of
achievement and reacting when a job is over using wicket-contrib-push. You
can check the code here:
http://www.xoocode.org/wsvn/xoocode/org.xoocode.xooctory/trunk/xooctory/src/main/java/org/xoocode/xooctory/web/component/ProgressBar.java?op=filerev=0sc=0

I don't know if this is close to what you want to achieve, but it may be a
source of inspiration. The code is Apache licensed, so feel free to pick
some parts of it if you want.

HTH,

Xavier


Tnx Bedy

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




-- 
Xavier Hanin - Independent Java Consultant
http://xhab.blogspot.com/
http://incubator.apache.org/ivy/
http://www.xoocode.org/


Re: wicket vs tapestry ?

2007-08-22 Thread Swaroop Belur
Hi

I have been using wicket for quite some time now. Prior to this I worked
on  tapestry for a short time . (In fact i  implemented the same pages
which i did in tapestry in wicket also)

I may not be able to give you the right answer but i can definitely say this

the learning curve in tapestry is quite high . Wicket is very easy to learn
and especially easy to write ur own components

But there is one important point i want to share. Whenever u choose a
framework, it is
very important to check how good the support is in the forums. That is
biggest difference
for me. Because even if framework is good, u r bound to run into issues.
Just check out the wicket forum. The response time for a question is very
less.
Sometimes u will have  more than one response. Thats makes a very BIG
difference - atleast for me



-swaroop


How to retrieve previous path when page expires through Ajax call

2007-08-22 Thread Alfred Chan

I would like to redirect the user to his/her previous visiting page in case
of the session expiration.

So, I wrote a customized expired error page to do so.

public class ExpireRedirectPreviousPage extends WebPage {

private static final long serialVersionUID = 1L;

public ExpireRedirectPreviousPage() {
// Redirect to original page
getRequestCycle().setRequestTarget(
new RedirectRequestTarget(getRequest().getPath()));
}
}

It works fine with non-ajax requests. But, it doesn't work with ajax
requests, the getRequest().getPath() can only get back an empty path.
Finally, it will redirect to homepage, which is not desirable.

Would someone tell me how to get back the client side URL/path after an ajax
request in the expired error page?

Thanks,
Alfred
-- 
View this message in context: 
http://www.nabble.com/How-to-retrieve-previous-path-when-page-expires-through-Ajax-call-tf4310264.html#a12270504
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: wicket vs tapestry ?

2007-08-22 Thread Johan Compagner
i think igor has some more info...

On 8/22/07, Alex Shneyderman [EMAIL PROTECTED] wrote:

 I just started to look for a component based framework. I came across
 both tapestry and wicket (and it would be hard not to as you guys
 share the same host) but I kind of fail to see what the differences
 are?

 From my limited experiments with both, wicket and tapestry seem to be
 quite similar. So, I wonder if there is anything I am not seeing?
 Anyone has a comparisson map of wicket vs tapestry?

 Alex.

 PS: I like both frameworks for their lightness I just feel that I will
 need to stick with one to be pragmatic :-(

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




Re: wicket vs tapestry ?

2007-08-22 Thread Eelco Hillenius
 Eelco Hillenius wrote:
  You can download the first chapter of Wicket In Action for free here:
  http://manning.com/dashorst/ and some chapters of Tapestry In Action
 
 
 Wow, Wicket In Action, we're all were waiting for it :-)
  Is this early access edition mature enough to buy or it's better to wait?

LOL. I don't know. If you buy early access, you'll get the updates
when they are available, so it doesn't really matter I think. We're
still waiting for Manning to put two more chapters online, and in the
background Martijn and I are working our asses of to get the rest of
the chapters done (which will still be at least a few weeks, but at
least there is stuff to get started, and that will only grow).

Eelco

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



Re: keyboard shortcuts in wicket ?

2007-08-22 Thread Eelco Hillenius
On 8/21/07, Nino Saturnino Martinez Vazquez Wael
[EMAIL PROTECTED] wrote:
 Hi

 I once started a wicket stuff contrib, called wicket input events. Which
 were gonna be all about input events like mouse events and key events.
 It never got that far because I didnt really needed it.

Nothing beats 'eat your own dogfood' when it comes to developing a
component. It's hard to do that when you're not using it yourself :)

Eelco

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



RE: wicket vs tapestry ?

2007-08-22 Thread Chris Colman
Hi Eelco, 

I saw you mention Hibernate in the intro but I've been using JPOX with
great success with Wicket also. You might want to mention that in the
book or new comers might think Wicket is a Hibernate only framework.

I use JPOX through the open source exPOJO (shameless plug!
www.expojo.com) which is a light weight implementation of the Exposed
Domain Model Pattern popularized in another Manning book, POJOs in
Action by Chris Richardson. exPOJO also acts like an ORM agnostic layer
over your chosen transparent persistence technology (currently supports
JPOX and Hibernate) so that you can keep your code fairly independent of
the underlying persistence library, allowing you to easily port from one
to another to do performance comparisons etc.,

 -Original Message-
 From: Eelco Hillenius [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, 22 August 2007 7:00 PM
 To: users@wicket.apache.org
 Subject: Re: wicket vs tapestry ?
 
  Eelco Hillenius wrote:
   You can download the first chapter of Wicket In Action for free
here:
   http://manning.com/dashorst/ and some chapters of Tapestry In
Action
  
  
  Wow, Wicket In Action, we're all were waiting for it :-)
   Is this early access edition mature enough to buy or it's better to
 wait?
 
 LOL. I don't know. If you buy early access, you'll get the updates
 when they are available, so it doesn't really matter I think. We're
 still waiting for Manning to put two more chapters online, and in the
 background Martijn and I are working our asses of to get the rest of
 the chapters done (which will still be at least a few weeks, but at
 least there is stuff to get started, and that will only grow).
 
 Eelco
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


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



Re: Why TD can't include background attribute in html template?

2007-08-22 Thread smithfox

The zip file is my project zip ball

http://www.nabble.com/file/p12271290/wicket_test.zip wicket_test.zip 



Martin Funk-3 wrote:
 
 smithfox schrieb:
 I'm a wicket beginner,
 Yesterday, I find a problem, but I can't sure it is a wicket1.3beta2 bug

 If you write a td with a background attribute, all wicket:id after the td
 will can't be recognized.

 My html template is a simple form. 
 UTF-8
   
 Could you post the the template code of the form and maybe the generated 
 html of that form?
 
 Martin
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Why-TD-can%27t-include-background-attribute-in-html-template--tf4309559.html#a12271290
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Object Container, adding Flash to a Wicket Application

2007-08-22 Thread Jan Kriesten

Hi,

just added this:

http://cwiki.apache.org/confluence/display/WICKET/Object+Container%2C+adding+Flash+to+a+Wicket+Application

It would be great if someone could review this.


Best regards, --- Jan.



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



Component Factory and code against interface

2007-08-22 Thread Sam Hough

Would it make sense in Wicket to have a factory, for at least common
components like Button etc, that use interfaces rather than concrete classes
in their signature?

We have a requirement to have two target browsers. Full bells and whistles
Ajax version and some JavaScript (IE5 and IE5.5) so I thought the factory
pattern might allow me to return different components based on the client
browser.

Also, my tech lead can control what parts of a component a developer should
play with.

Maybe it is just coming from GWT or that pattern text books use Widgets as
their example for Factory pattern but it seems like a reasonable thing to
do? Anbody else tried this? Worked out well? Top tips?


-- 
View this message in context: 
http://www.nabble.com/Component-Factory-and-code-against-interface-tf4311047.html#a12272781
Sent from the Wicket - User mailing list archive at Nabble.com.


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



ModalWindo problem

2007-08-22 Thread Artur W.

Hi,

When I click on link that should open Modal Window nothing happend.
In Debug console I see there is an error:


INFO: focus set on notesLink16
INFO:
INFO: Initiating Ajax GET request on
../?wicket:interface=:1:orders:88490:orderRow:notesLink::IBehaviorListener:0:1random=0.32370293915212345
INFO: Invoking pre-call handler(s)...
INFO: Received ajax response (2000 characters)
INFO:
?xml version=1.0 encoding=UTF-8?ajax-responseheader-contribution
encoding=wicket1 ![CDATA[head
xmlns:wicket=http://wicket.apache.org;script type=text/javascript
src=../resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js/script
script type=text/javascript
src=../resources/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax.js/script
script type=text/javascript
id=wicket-ajax-debug-enable!--/*--![CDATA[/*!--*/
wicketAjaxDebugEnable=true;
/*--]^]^*//script

script type=text/javascript
src=../resources/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-debug.js/script
script type=text/javascript
src=../resources/org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow/res/modal.js/script
link rel=stylesheet type=text/css
href=../resources/org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow/res/modal.css
/
/head]]/header-contributioncomponent id=orderNotes15 ![CDATA[

divTEST/div

]]/componentevaluate![CDATA[var element =
document.getElementById(content111);
var settings = new Object();
settings.minWidth=200;
settings.minHeight=200;
settings.className=w_blue;
settings.width=600;
settings.height=400;
settings.resizable=true;
settings.element = element;
settings.cookieId=modal-2;
settings.title=This is modal window with panel content.;
settings.mask=semi-transparent;
settings.onClose = function() { var
wcall=wicketAjaxGet('../?wicket:interface=:1:orders:88490:orderRow:orderNotes::IBehaviorListener:1:1',
function() { }.bind(this), function() { }.bind(this)); };
settings.onCloseButton = function() { var
wcall=wicketAjaxGet('../?wicket:interface=:1:orders:88490:orderRow:orderNotes::IBehaviorListener:0:1',
function() { }.bind(this), function() { }.bind(this));return !wcall;};
Wicket.Window.create(settings).show();
]]/evaluate/ajax-response
INFO: Response parsed. Now invoking steps...

ERROR: Exception evaluating javascript: Either src or element must be set.
^
INFO: Response processed successfully.
INFO: Invoking post-call handler(s)...
INFO: Calling focus on notesLink16
INFO: focus set on 

I think I did everything like in the examples. I use wicket 1.3beta3.
Artur

-- 
View this message in context: 
http://www.nabble.com/ModalWindo-problem-tf4311370.html#a12273834
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: ModalWindow problem

2007-08-22 Thread Sam Hough

Do you have an element with id content111?

-- 
View this message in context: 
http://www.nabble.com/ModalWindo-problem-tf4311370.html#a12273905
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: ModalWindow problem

2007-08-22 Thread Artur W.



Sam Hough wrote:
 
 Do you have an element with id content111?
 
 
No, I don't have.

I don't know where it comes from. My code looks like this:

ModalWindow modal = new ModalWindow(orderNotes);
add(modal);
modal.setContent(new ModalPanel(modal.getContentId()));
modal.setTitle(This is modal window with panel content.);
modal.setCookieName(modal-2);

AjaxLink link;
add(link = new AjaxLink(notesLink)
{
public void onClick(AjaxRequestTarget target)
{
modal.show(target);
}
});

Artur
-- 
View this message in context: 
http://www.nabble.com/ModalWindo-problem-tf4311370.html#a12274189
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Why TD can't include background attribute in html template?

2007-08-22 Thread smithfox

Thank you for reporting the bug.

But I test following code is OK, Anbody can do more test under my project
codes.

form
table
trtd background=images/abc.png/td/tr
/table
/form

For duplicating the bug:
I think the form should have tow layer nested tables and the better add some
Chinese text :)
Beacuse I don't know the really cause.


Martin Funk-3 wrote:
 
 smithfox schrieb:
 The zip file is my project zip ball

 http://www.nabble.com/file/p12271290/wicket_test.zip wicket_test.zip 



 Martin Funk-3 wrote:
   
 smithfox schrieb:
 
 I'm a wicket beginner,
 Yesterday, I find a problem, but I can't sure it is a wicket1.3beta2
 bug

 If you write a td with a background attribute, all wicket:id after the
 td
 will can't be recognized.

 My html template is a simple form. 
 UTF-8
   
   
 Could you post the the template code of the form and maybe the generated 
 html of that form?

 Martin

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



 

   
 I'd say it is a bug.
 
 Could you please verify if the bug i filed describes you problem poperly?
 https://issues.apache.org/jira/browse/WICKET-871
 
 mf
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Why-TD-can%27t-include-background-attribute-in-html-template--tf4309559.html#a12274236
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: ModalWindow problem

2007-08-22 Thread Sam Hough

Did you copy the:

result.setOutputMarkupId(true);

bit? I think the Ajax callback uses this to find elements. Normally blows up
at render time if not set.

-- 
View this message in context: 
http://www.nabble.com/ModalWindo-problem-tf4311370.html#a12274319
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: ModalWindow problem

2007-08-22 Thread Artur W.


Sam Hough wrote:
 
 Did you copy the:
 
 result.setOutputMarkupId(true);
 
 bit? I think the Ajax callback uses this to find elements. Normally blows
 up at render time if not set.
 
 
I don't have result label. I just want to open modal window. I don't need to
return any results.

Artur

-- 
View this message in context: 
http://www.nabble.com/ModalWindo-problem-tf4311370.html#a12274574
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Archetype - how do I use it?

2007-08-22 Thread Alex Shneyderman
I downloaded the wicket source and compiled it and installed it in the
local m2 repo.
Now I wanted to create a fresh project and doing this:


[EMAIL PROTECTED]:~/wicket$  mvn archetype:create \
  -DgroupId=org.gricket  \
  -DartifactId=sample \
  -Dversion=1.0-SNAPSHOT \
  -DarchetypeGroupId=org.apache.wicket \
  -DarchetypeArtifactId=wicket-archetype-quickstart \
  -DarchetypVersion=1.0.3-SNAPSHOT

[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'archetype'.
[INFO] 

[INFO] Building Maven Default Project
[INFO]task-segment: [archetype:create] (aggregator-style)
[INFO] 

[INFO] Setting property: classpath.resource.loader.class =
'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'.
[INFO] Setting property: velocimacro.messages.on = 'false'.
[INFO] Setting property: resource.loader = 'classpath'.
[INFO] Setting property: resource.manager.logwhenfound = 'false'.
[INFO] **
[INFO] Starting Jakarta Velocity v1.4
[INFO] RuntimeInstance initializing.
[INFO] Default Properties File:
org/apache/velocity/runtime/defaults/velocity.properties
[INFO] Default ResourceManager initializing. (class
org.apache.velocity.runtime.resource.ResourceManagerImpl)
[INFO] Resource Loader Instantiated:
org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader
[INFO] ClasspathResourceLoader : initialization starting.
[INFO] ClasspathResourceLoader : initialization complete.
[INFO] ResourceCache : initialized. (class
org.apache.velocity.runtime.resource.ResourceCacheImpl)
[INFO] Default ResourceManager initialization complete.
[INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Literal
[INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Macro
[INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Parse
[INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Include
[INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Foreach
[INFO] Created: 20 parsers.
[INFO] Velocimacro : initialization starting.
[INFO] Velocimacro : adding VMs from VM library template : VM_global_library.vm
[ERROR] ResourceManager : unable to find resource
'VM_global_library.vm' in any resource loader.
[INFO] Velocimacro : error using  VM library template
VM_global_library.vm :
org.apache.velocity.exception.ResourceNotFoundException: Unable to
find resource 'VM_global_library.vm'
[INFO] Velocimacro :  VM library template macro registration complete.
[INFO] Velocimacro : allowInline = true : VMs can be defined inline in templates
[INFO] Velocimacro : allowInlineToOverride = false : VMs defined
inline may NOT replace previous VM definitions
[INFO] Velocimacro : allowInlineLocal = false : VMs defined inline
will be  global in scope if allowed.
[INFO] Velocimacro : initialization complete.
[INFO] Velocity successfully started.
[INFO] [archetype:create]
[INFO] Defaulting package to group ID: org.gricket
[INFO] 
[ERROR] BUILD ERROR
[INFO] 
[INFO] Error creating from archetype

Embedded error: Archetype does not exist: Unable to determine the
release version

Try downloading the file manually from the project website.

Then, install it using the command:
mvn install:install-file -DgroupId=org.apache.wicket
-DartifactId=wicket-archetype-quickstart \
-Dversion=RELEASE -Dpackaging=jar -Dfile=/path/to/file


  org.apache.wicket:wicket-archetype-quickstart:jar:RELEASE


[INFO] 
[INFO] For more information, run Maven with the -e switch
[INFO] 
[INFO] Total time: 1 second
[INFO] Finished at: Wed Aug 22 15:20:50 CEST 2007
[INFO] Final Memory: 6M/77M
[INFO] 


Why errors? I know this might be a maven question but since you guys
are using it and I am sort of forced to use it (I am fuming here but
I will skip my frustration - does that shit [maven] ever work first
time one uses it?); I thought I might ask here.


-- 
Thanks,
Alex.

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



Re: Archetype - how do I use it?

2007-08-22 Thread Al Maw

Hi,

You stop making so many typos...

- -DarchetypVersion=1.0.3-SNAPSHOT
+ -DarchetypeVersion=1.3.0-SNAPSHOT

Al

Alex Shneyderman wrote:

I downloaded the wicket source and compiled it and installed it in the
local m2 repo.
Now I wanted to create a fresh project and doing this:


[EMAIL PROTECTED]:~/wicket$  mvn archetype:create \
  -DgroupId=org.gricket  \
  -DartifactId=sample \
  -Dversion=1.0-SNAPSHOT \
  -DarchetypeGroupId=org.apache.wicket \
  -DarchetypeArtifactId=wicket-archetype-quickstart \
  -DarchetypVersion=1.0.3-SNAPSHOT

[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'archetype'.
[INFO] 

[INFO] Building Maven Default Project
[INFO]task-segment: [archetype:create] (aggregator-style)
[INFO] 

[INFO] Setting property: classpath.resource.loader.class =
'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'.
[INFO] Setting property: velocimacro.messages.on = 'false'.
[INFO] Setting property: resource.loader = 'classpath'.
[INFO] Setting property: resource.manager.logwhenfound = 'false'.
[INFO] **
[INFO] Starting Jakarta Velocity v1.4
[INFO] RuntimeInstance initializing.
[INFO] Default Properties File:
org/apache/velocity/runtime/defaults/velocity.properties
[INFO] Default ResourceManager initializing. (class
org.apache.velocity.runtime.resource.ResourceManagerImpl)
[INFO] Resource Loader Instantiated:
org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader
[INFO] ClasspathResourceLoader : initialization starting.
[INFO] ClasspathResourceLoader : initialization complete.
[INFO] ResourceCache : initialized. (class
org.apache.velocity.runtime.resource.ResourceCacheImpl)
[INFO] Default ResourceManager initialization complete.
[INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Literal
[INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Macro
[INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Parse
[INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Include
[INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Foreach
[INFO] Created: 20 parsers.
[INFO] Velocimacro : initialization starting.
[INFO] Velocimacro : adding VMs from VM library template : VM_global_library.vm
[ERROR] ResourceManager : unable to find resource
'VM_global_library.vm' in any resource loader.
[INFO] Velocimacro : error using  VM library template
VM_global_library.vm :
org.apache.velocity.exception.ResourceNotFoundException: Unable to
find resource 'VM_global_library.vm'
[INFO] Velocimacro :  VM library template macro registration complete.
[INFO] Velocimacro : allowInline = true : VMs can be defined inline in templates
[INFO] Velocimacro : allowInlineToOverride = false : VMs defined
inline may NOT replace previous VM definitions
[INFO] Velocimacro : allowInlineLocal = false : VMs defined inline
will be  global in scope if allowed.
[INFO] Velocimacro : initialization complete.
[INFO] Velocity successfully started.
[INFO] [archetype:create]
[INFO] Defaulting package to group ID: org.gricket
[INFO] 
[ERROR] BUILD ERROR
[INFO] 
[INFO] Error creating from archetype

Embedded error: Archetype does not exist: Unable to determine the
release version

Try downloading the file manually from the project website.

Then, install it using the command:
mvn install:install-file -DgroupId=org.apache.wicket
-DartifactId=wicket-archetype-quickstart \
-Dversion=RELEASE -Dpackaging=jar -Dfile=/path/to/file


  org.apache.wicket:wicket-archetype-quickstart:jar:RELEASE


[INFO] 
[INFO] For more information, run Maven with the -e switch
[INFO] 
[INFO] Total time: 1 second
[INFO] Finished at: Wed Aug 22 15:20:50 CEST 2007
[INFO] Final Memory: 6M/77M
[INFO] 


Why errors? I know this might be a maven question but since you guys
are using it and I am sort of forced to use it (I am fuming here but
I will skip my frustration - does that shit [maven] ever work first
time one uses it?); I thought I might ask here.





--
Alastair Maw
Wicket-biased blog at http://herebebeasties.com

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



Re: ModalWindow problem

2007-08-22 Thread Sam Hough

maybe try setting setOutputMarkupId(true) on your ModalWindow? In the source
it uses its own content id to give to the getElementById bit...

So if that Id is not in your response that could be the problem. 

Bit dodgy that it resends that element then immediately wants to get the
element. Not sure if it waits for the HTML to settle?
-- 
View this message in context: 
http://www.nabble.com/ModalWindo-problem-tf4311370.html#a12274679
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Expanding a tree node conditionally

2007-08-22 Thread swaroop belur

Hi all

I am using  wicket.markup.html.tree.Tree of wicket version 1.2.4 to build my
tree.
I basically would like to run thru the nodes and if the value of node
statisifes a condition,
I would like to expand that node.

I am not sure which method will work for me. Also i am aware of the children
of those nodes
which need to be conditionally expanded.  

Any suggestions

-swaroop belur
-- 
View this message in context: 
http://www.nabble.com/Expanding-a-tree-node-conditionally-tf4311813.html#a12275348
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Expanding a tree node conditionally

2007-08-22 Thread Al Maw

swaroop belur wrote:

I am using  wicket.markup.html.tree.Tree of wicket version 1.2.4 to
build my tree. I basically would like to run thru the nodes and if
the value of node statisifes a condition, I would like to expand that
node.


Tree#getTreeState().expandNode(foo);

Al
--
Alastair Maw
Wicket-biased blog at http://herebebeasties.com

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



Re: Archetype - how do I use it?

2007-08-22 Thread Alex Shneyderman
Naah, that is not the problem. Maven suck, I keep getting positive
re-inforcement  of this :-) The funny thing is the artifact is three
so even if I follow their stupid instructions I will still get nowhere
:-(

[EMAIL PROTECTED]:~/wicket$  mvn archetype:create \
  -DgroupId=org.gricket \
  -DartifactId=sample \
  -Dversion=1.0-SNAPSHOT \
  -DarchetypeGroupId=org.apache.wicket \
  -DarchetypeArtifactId=wicket-archetype-quickstart \
  -DarchetypeVersion=1.0.3-SNAPSHOT

[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'archetype'.
[INFO] 

[INFO] Building Maven Default Project
[INFO]task-segment: [archetype:create] (aggregator-style)
[INFO] 

[INFO] Setting property: classpath.resource.loader.class =
'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'.
[INFO] Setting property: velocimacro.messages.on = 'false'.
[INFO] Setting property: resource.loader = 'classpath'.
[INFO] Setting property: resource.manager.logwhenfound = 'false'.
[INFO] **
[INFO] Starting Jakarta Velocity v1.4
[INFO] RuntimeInstance initializing.
[INFO] Default Properties File:
org/apache/velocity/runtime/defaults/velocity.properties
[INFO] Default ResourceManager initializing. (class
org.apache.velocity.runtime.resource.ResourceManagerImpl)
[INFO] Resource Loader Instantiated:
org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader
[INFO] ClasspathResourceLoader : initialization starting.
[INFO] ClasspathResourceLoader : initialization complete.
[INFO] ResourceCache : initialized. (class
org.apache.velocity.runtime.resource.ResourceCacheImpl)
[INFO] Default ResourceManager initialization complete.
[INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Literal
[INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Macro
[INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Parse
[INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Include
[INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Foreach
[INFO] Created: 20 parsers.
[INFO] Velocimacro : initialization starting.
[INFO] Velocimacro : adding VMs from VM library template : VM_global_library.vm
[ERROR] ResourceManager : unable to find resource
'VM_global_library.vm' in any resource loader.
[INFO] Velocimacro : error using  VM library template
VM_global_library.vm :
org.apache.velocity.exception.ResourceNotFoundException: Unable to
find resource 'VM_global_library.vm'
[INFO] Velocimacro :  VM library template macro registration complete.
[INFO] Velocimacro : allowInline = true : VMs can be defined inline in templates
[INFO] Velocimacro : allowInlineToOverride = false : VMs defined
inline may NOT replace previous VM definitions
[INFO] Velocimacro : allowInlineLocal = false : VMs defined inline
will be  global in scope if allowed.
[INFO] Velocimacro : initialization complete.
[INFO] Velocity successfully started.
[INFO] [archetype:create]
[INFO] Defaulting package to group ID: org.gricket
[INFO] 
[ERROR] BUILD ERROR
[INFO] 
[INFO] Error creating from archetype

Embedded error: Archetype does not exist: Unable to download the
artifact from any repository

Try downloading the file manually from the project website.

Then, install it using the command:
mvn install:install-file -DgroupId=org.apache.wicket
-DartifactId=wicket-archetype-quickstart \
-Dversion=1.0.3-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file


  org.apache.wicket:wicket-archetype-quickstart:jar:1.0.3-SNAPSHOT

from the specified remote repositories:
  central (http://repo1.maven.org/maven2)

[INFO] 
[INFO] For more information, run Maven with the -e switch
[INFO] 
[INFO] Total time: 1 second
[INFO] Finished at: Wed Aug 22 15:57:24 CEST 2007
[INFO] Final Memory: 6M/77M
[INFO] 



On 8/22/07, Al Maw [EMAIL PROTECTED] wrote:
 Hi,

 You stop making so many typos...

 - -DarchetypVersion=1.0.3-SNAPSHOT
 + -DarchetypeVersion=1.3.0-SNAPSHOT

 Al

 Alex Shneyderman wrote:
  I downloaded the wicket source and compiled it and installed it in the
  local m2 repo.
  Now I wanted to create a fresh project and doing this:
 
 
  [EMAIL PROTECTED]:~/wicket$  mvn archetype:create \
-DgroupId=org.gricket  \
-DartifactId=sample \
-Dversion=1.0-SNAPSHOT \
-DarchetypeGroupId=org.apache.wicket \
-DarchetypeArtifactId=wicket-archetype-quickstart \
-DarchetypVersion=1.0.3-SNAPSHOT
 
  [INFO] Scanning for projects...
  

Re: wicket vs tapestry ?

2007-08-22 Thread Eelco Hillenius
On 8/22/07, Chris Colman [EMAIL PROTECTED] wrote:
 Hi Eelco,

 I saw you mention Hibernate in the intro but I've been using JPOX with
 great success with Wicket also. You might want to mention that in the
 book or new comers might think Wicket is a Hibernate only framework.

 I use JPOX through the open source exPOJO (shameless plug!
 www.expojo.com) which is a light weight implementation of the Exposed
 Domain Model Pattern popularized in another Manning book, POJOs in
 Action by Chris Richardson. exPOJO also acts like an ORM agnostic layer
 over your chosen transparent persistence technology (currently supports
 JPOX and Hibernate) so that you can keep your code fairly independent of
 the underlying persistence library, allowing you to easily port from one
 to another to do performance comparisons etc.,

Hi Chris,

We could definitively mention JPOX. Please help us not forget (we
still have to write the chapter on database driven apps) :)

If you're interested, a contribution for the address book example with
exPOJO/ JPOX would be more than welcome.

Thanks,

Eelco

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



Re: wicket vs tapestry ?

2007-08-22 Thread Martijn Dashorst
You mean the wicket-phonebook?

Martijn

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

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



Re: wicket vs tapestry ?

2007-08-22 Thread Eelco Hillenius
On 8/22/07, Martijn Dashorst [EMAIL PROTECTED] wrote:
 You mean the wicket-phonebook?

Yeah.

Eelco

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



Re: Does anyone develop Wicket app using IRAD and Websphere

2007-08-22 Thread shumbola



juliez wrote:
 
 It's fairly easy to work with Wicket (1.3 beta2) using Jetty as the web
 server. However, when I tried to do the same thing using IRAD and
 Websphere, I always got file not found or Error 404. Then I tried to
 deploy the wicket-examples-1.3.0-beta2.war to Websphere (6.1.0.2 Build
 Number: cf20633.22), the example can't work correctly too - got Error
 404: Error reported: 404. 
 
 Is there anything special need to be set for IBM's stuff? Any suggestion?
 
 Thanks,
 Julie
 
I develop my wicket applications on windows/linux (with winstone servlet
container) and deploy on various application servers, including Tomcat and
Websphere (6.0.2.9 on iSeries). 6.0.x versions have bug that for filters it
uses class loader other then for web application. So the only solution with
6.0.x is to use wicket servlet. As far as I know this bug is fixed for 6.1.x
versions and probably your problem is not related to this bug. I recommend
to go through Websphere logs, if it says 404, then your application can't be
find in particular location.


-- 
View this message in context: 
http://www.nabble.com/Does-anyone-develop-Wicket-app-using-IRAD-and-Websphere-tf4307950.html#a12276655
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Loading global resources in test?

2007-08-22 Thread Erik Underbjerg
I figured it out. Guess I didn't read the documentation properly  
afterall. In the documentation for addStringResourceLoader is says:


Description copied from interface: IResourceSettings
Add a string resource loader to the chain of loaders. If this is  
the first call to this method since the creation of the application  
settings then the existing chain is cleared before the new loader is  
added.


So the solution was to:

1. retrieve and save all the existing resource loaders
2. add them again
3. add the extra resource loader as below.

Then it worked.

Sorry for the trouble, and thanks for your time.

/Erik


On 21/08/2007, at 16.48, Igor Vaynberg wrote:

it looks like you are doing it properly. not sure why it doesnt  
work. you
will have to debug it and see. maybe you have to do it every time  
because it

might be creating new application instances?

-igor


On 8/21/07, Erik Underbjerg [EMAIL PROTECTED] wrote:


Thanks for the reply.

I did figure out that the WicketTester is not a subclass of
MyApplication, and therefore doesn't have access to the
MyApplication.properties file.

That's also why I was trying to do as you suggest, and add my own
StringResourceLoader to the WicketTester subclass, and load the
MyApplication.properties file manually. So as far as I can see, I'm
doing what you said, but I just can't make it work.

For some reason, even though I add a new StringResourceLoader in the
WicketTester, I can't access the resources in  
MyApplication.properties.


Am I adding it in the wrong way?

/Erik

On 21/08/2007, at 15.51, Igor Vaynberg wrote:


wicket tester uses a mock web application - not yours - so it
cannot load
those properties. i think in 1.3 we refactored it to support custom
application subclasses. i think as far as you can make it work in
1.2.6 is
to change resource settings not to throw exceptions on not-found-
resources
while testing. or you can add your own stringresourceloader to the
mock
application and make it load properties from your application's
property
file. im not sure we can properly fix this in 1.2.6 because we
cannot break
api.

-igor


On 8/20/07, Erik Underbjerg [EMAIL PROTECTED] wrote:


Right, sorry for the typo. I do have both:

src/main/java/base/MyApplication.java
src/main/java/base/MyApplication.properties

The application works as intended: When I start MyApplication, I  
can

access all constants in MyApplication.properties from various pages
and components throughout the application. So far so good.

However, when I try to access the same pages from my tests, I get
errors similar to:

wicket.WicketRuntimeException: Error attaching this
container for
rendering: [MarkupContainer [Component id = basket_item, page =
base.BasketPage, path =  
0:basket:basket_form:basket_item.BasketPanel

$BasketEditForm$1, isVisible = true, isVersioned = false]]
at wicket.MarkupContainer.internalAttach
(MarkupContainer.java:361)

[..]

Caused by: java.util.MissingResourceException: Unable to  
find

resource: MODEL_RELEASED for component:

MODEL_RESOURCE is a string constant defined in
MyApplication.properties, and it works fine when I run the app  
in the

normal way.

The tests are run a subclass of WicketTester, in src/test/java/base
with the initialization method:

public void initialize() {
getResourceSettings().addStringResourceLoader(new
ClassStringResourceLoader(this, MyApplication.class));
}

That is what I've tried, in order to load the
MyApplication.properties for my subclass of WicketTester. It just
doesn't work.

So my question is: How can I load the MyApplication.properties  
file,

so the constants in it are accessible in my tests? I'm using wicket
1.2.6.

Thanks in advance.


/Erik


On 20/08/2007, at 22.55, Igor Vaynberg wrote:


it should probably be MyApplication.properties unless you have
myApplication.java

-igor


On 8/20/07, Erik Underbjerg [EMAIL PROTECTED] wrote:


Hello,

I have just moved some localized string resources to a
myApplication.properties file, because they need to accessed by
different panels and pages, and it works fine.

However, when running my unit tests with WicketTester, it can't
find
the resources in myApplication.properties. I have been  
unsuccessful

in finding a way to add the myApplication.properties file to the
resource path of my WicketTester subclass. This is what I've  
tried,

in my subclass of WicketTester:

public void initialize() {
getResourceSettings().addStringResourceLoader(new
ClassStringResourceLoader(this, PolFotoApplication.class));
}

So: How do I add myApplication.properties to the resource path
of my
WicketTester?

Kind regards,

Erik



--- 
--

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





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

Re: Why TD can't include background attribute in html template?

2007-08-22 Thread Martin Funk

smithfox schrieb:

Thank you for reporting the bug.

But I test following code is OK, Anbody can do more test under my project
codes.

form
table
trtd background=images/abc.png/td/tr
/table
/form
  
I think the problem comes up when a wicket markup element is surounded 
by an markup element with an attribute refering to some resource using a 
relative path.

Some thing like

td background=images/abc.png
p wicket:id=foobar/p
/td

mf

For duplicating the bug:
I think the form should have tow layer nested tables and the better add some
Chinese text :)
Beacuse I don't know the really cause.


Martin Funk-3 wrote:
  

smithfox schrieb:


The zip file is my project zip ball

http://www.nabble.com/file/p12271290/wicket_test.zip wicket_test.zip 




Martin Funk-3 wrote:
  
  

smithfox schrieb:



I'm a wicket beginner,
Yesterday, I find a problem, but I can't sure it is a wicket1.3beta2
bug

If you write a td with a background attribute, all wicket:id after the
td
will can't be recognized.

My html template is a simple form. 
UTF-8
  
  
  
Could you post the the template code of the form and maybe the generated 
html of that form?


Martin

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





  
  

I'd say it is a bug.

Could you please verify if the bug i filed describes you problem poperly?
https://issues.apache.org/jira/browse/WICKET-871

mf

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






  



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



Re: Wicket generates invalid HTML/CSS with ListView

2007-08-22 Thread Igor Vaynberg
already fixed in beta3

-igor


On 8/22/07, Edvin Syse [EMAIL PROTECTED] wrote:

 Hi,

 I use Wicket 1.3-beta2. When I construct a ListView and
 setOutputMarkupId(true) on the listItem itself, the constructed id in
 the HTML-code is only a number. This breaks the CSS 2 standard, that
 says that the id cannot contain only numbers.

 Is there a way to prepend the id with a string, for example the
 wicket:id of the component? (That seems to be standard for most other
 elements when I setOutputMarkupId(true) on them).

 Example to reproduce:

 ListView lw = new ListView(lw, someList) {
 protected void populateItem(final ListItem item) {
 item.setOutputMarkupId(true);

 // Add other elements
 }
 }

 The HTML:

 ul
 li wicket:id=lw .. Other elements here ../li
 /ul

 The rendered output:

 ul
 li wicket:id=lw id=30 .. Other elements here ../li
 /ul

 -- Edvin Syse


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




Re: Component Factory and code against interface

2007-08-22 Thread Igor Vaynberg
i dont see why it wouldnt work for you. i know some people who use osgi with
wicket did this a while ago and no problems.

-igor

On 8/22/07, Sam Hough [EMAIL PROTECTED] wrote:


 Would it make sense in Wicket to have a factory, for at least common
 components like Button etc, that use interfaces rather than concrete
 classes
 in their signature?

 We have a requirement to have two target browsers. Full bells and whistles
 Ajax version and some JavaScript (IE5 and IE5.5) so I thought the factory
 pattern might allow me to return different components based on the client
 browser.

 Also, my tech lead can control what parts of a component a developer
 should
 play with.

 Maybe it is just coming from GWT or that pattern text books use Widgets as
 their example for Factory pattern but it seems like a reasonable thing to
 do? Anbody else tried this? Worked out well? Top tips?


 --
 View this message in context:
 http://www.nabble.com/Component-Factory-and-code-against-interface-tf4311047.html#a12272781
 Sent from the Wicket - User mailing list archive at Nabble.com.


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




Re: Wicket Acegi Integration.

2007-08-22 Thread Erik van Oosten

Hi Vincenzo,

Someone mentioned the project Swarm on the mailing list some time ago 
(http://www.nabble.com/forum/ViewPost.jtp?post=10853436framed=y).


Since I do not know Swarm I can not advice on which way to go.

Regards,
   Erik.


Vincenzo Vitale wrote:

Hi,

In my project we are using Wicket  and it definitively rocks!!! J

Now I want to integrate  authentication and authorization… I have red
the wiki page in
http://cwiki.apache.org/WICKET/acegi-and-wicket-auth-roles.html  where
the acegi-wicket integration is explained, but you also mention a new
project currently in works… could you please give me more information
about that  or do you suggest at the moment to use wicket-auth-role
and acegi? I'm using  wicket 1.3.0-beta2 version.

Thanks a  lot,
Vincenzo.

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

  


--
Erik van Oosten
http://2008.rubyenrails.nl/
http://www.day-to-day-stuff.blogspot.com/


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



Custom Error Messages

2007-08-22 Thread Blazeix

Hi, I'm using wicket 1.2.6 and Java 1.5, and I would like to put custom error
messages in my application. I used the following lines in my application's
init() method


this.getApplicationSettings().setInternalErrorPage(ErrorPage.class);

this.getApplicationSettings().setPageExpiredErrorPage(ExpiredPage.class);


The ExpiredPage works fine, however when I induce a bug into my code (trying
to add a label that doesn't exist in the markup) The full stack trace gets
printed out, rather than my ErrorPage. Oddly enough, appending either one of
the following two lines in the init method makes the ErrorPage show:


getExceptionSettings().setUnexpectedExceptionDisplay(IExceptionSettings.SHOW_INTERNAL_ERROR_PAGE);
-OR-

this.getRequestCycleSettings().setUnexpectedExceptionDisplay(Settings.SHOW_INTERNAL_ERROR_PAGE);

The problem is that various parts of both these two lines are deprecated.
The API says that the deprecated parts are replaced by IApplicationSettings,
which is what I was using in the first code block. How can I make my own
custom error pages without having to include deprecated methods/fields?
Thanks for any help
-- 
View this message in context: 
http://www.nabble.com/Custom-Error-Messages-tf4313389.html#a12280665
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Custom Error Messages

2007-08-22 Thread Ayodeji Aladejebi
In development mode, you will get your error messages, but your custom error
pages are loaded in Production mode. so switch to production mode

On 8/22/07, Blazeix [EMAIL PROTECTED] wrote:


 Hi, I'm using wicket 1.2.6 and Java 1.5, and I would like to put custom
 error
 messages in my application. I used the following lines in my application's
 init() method


 this.getApplicationSettings().setInternalErrorPage(ErrorPage.class
 );
 this.getApplicationSettings().setPageExpiredErrorPage(
 ExpiredPage.class);


 The ExpiredPage works fine, however when I induce a bug into my code
 (trying
 to add a label that doesn't exist in the markup) The full stack trace gets
 printed out, rather than my ErrorPage. Oddly enough, appending either one
 of
 the following two lines in the init method makes the ErrorPage show:


 getExceptionSettings().setUnexpectedExceptionDisplay(
 IExceptionSettings.SHOW_INTERNAL_ERROR_PAGE);
 -OR-

 this.getRequestCycleSettings().setUnexpectedExceptionDisplay(
 Settings.SHOW_INTERNAL_ERROR_PAGE);

 The problem is that various parts of both these two lines are deprecated.
 The API says that the deprecated parts are replaced by
 IApplicationSettings,
 which is what I was using in the first code block. How can I make my own
 custom error pages without having to include deprecated methods/fields?
 Thanks for any help
 --
 View this message in context:
 http://www.nabble.com/Custom-Error-Messages-tf4313389.html#a12280665
 Sent from the Wicket - User mailing list archive at Nabble.com.


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




Re: wicket vs tapestry ?

2007-08-22 Thread Matej Knopp
Hi,

 2) I like the back button support.  My thinking is that extending Wicket's
 AJAX integration to also support the back button (somehow) is a must.
 Virtually everyone who uses Wicket will use it's AJAX functionality.  Almost
 all of these will need solve this problem.  Sure would be nice if it was
 included.
There are plans to do this. However, it's a complicate problem that a
simple solution won't cut. We have a server side part in place though.
It's the javascript that needs to be extended, but our resources are
too limited currently to do that.
 3) The design-by-inheritance model (WebPage, AbstractBehavior, etc). has
 produced a somewhat fragmented library.  Reminds me of the days of MFC.
 T5's approach in this respect seems quite attractive.
Would you mind elaborating on this a little? I kind of fail to see
what's wrong with inheritance and why are people avoiding it like a
plague nowadays.
Is it really that much better to have your code annotated and called
by reflection/bytecode generation? How discoverable such API is? How
can you navigate such code? (forget call hierarchy).

As a sidenote, I remember Igor building @OnBeforeRender like
annotations, but he wasn't very happy with it and neither was I.

-Matej

 Thanks for listening,
 Erik

 On 8/22/07, Konstantin Ignatyev [EMAIL PROTECTED] wrote:
 
  My story:
 
  I have been very satisfied Tapestry 3 used and T3 has
  helped tremendously with building applications in the
  past.
 
  Then I was busy doing other things although keeping
  eye on T and recently I needed to build a live
  prototype quickly, naturally my first reaction was to
  pick up Dreamweaver and try Tapestry 5.
 
  T5 is amazingly good BUT I needed Ajax support and at
  this moment Wicket makes leaps and bounds around T5 in
  this area.
 
  So I abandoned T5 and started using Wicket - so far I
  am very satisfied with it although worry if Wicket is
  production grade for high traffic sites because of its
  heavy use of HttpSession as storage.
 
  So for now I will use Wicket for prototyping and small
  apps and keep my eye on T5. T4 is no-go for me - I am
  too lazy
 
  --- Chris Chiappone [EMAIL PROTECTED]  wrote:
 
   A colleague of mine and I had a discussion about
   this because he was
   sorting through new frameworks to use for a new
   project.  I have been
   using Tapestry since v3 and wanted him to give it a
   try.  Unfotunately
   he ended up picking Wicket because of the fear that
   Tapestry has
   issues with backward compatibility.  I am now
   wondering if I made the
   right choice in choosing tapestry for my
   applications.   He built his
   application quickly and it is impressive using
   Wickets built in AJAX
   components.  Upgrading in Tapestry has been a pain
   going from 3 - 4
   and obviously 5 isn't even possible.  I wish I could
   have choose tap 5
   for my latest project but it was too beta and
   doesn't play well with
   other frameworks, ie a large legacy app with a
   Struts like framework.
  
   Anyway its a hard decision, they both have plus' and
   minus'
  
   ~chris
  
   On 8/22/07, John [EMAIL PROTECTED] wrote:
Hi Alex,
   
   
   
I would say Tapestry 5 wins the challenge unless
   you plane to use T4.
   
Tapestry 5 uses annotations, and this is a very
   important advanced feature
in Java. You don't need to extend WOComponent,
   WebPage or what ever.
   
   
   
I think all frameworks will use the annotations in
   the future; the question
is when is available.
   
T5 does and it's ready.
   
   
   
In other words, the real question you should ask
   Do I want to use
annotations or classical framework?
   
   
   
Try T5 a little, and you will fast mention the
   power of annotations.
   
   
   
   
   
Signature IT-Consult Armainak Sarkis
   
   
   
- Original Message -
From: Alex Shneyderman [EMAIL PROTECTED]
To:  [EMAIL PROTECTED];
   users@wicket.apache.org
Sent: Wednesday, August 22, 2007 10:13 AM
Subject: wicket vs tapestry ?
   
   
I just started to look for a component based
   framework. I came across
 both tapestry and wicket (and it would be hard
   not to as you guys
 share the same host) but I kind of fail to see
   what the differences
 are?

 From my limited experiments with both, wicket
   and tapestry seem to be
 quite similar. So, I wonder if there is anything
   I am not seeing?
 Anyone has a comparisson map of wicket vs
   tapestry?

 Alex.

 PS: I like both frameworks for their lightness I
   just feel that I will
 need to stick with one to be pragmatic :-(


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


   
   
   
  
  -
To unsubscribe, e-mail:
   [EMAIL 

Re: wicket vs tapestry ?

2007-08-22 Thread Onno Scheffers



You can download the first chapter of Wicket In Action for free here:
http://manning.com/dashorst/ and some chapters of Tapestry In Action
here: http://manning.com/lewisship/
  
Actually, Tapestry in Action is pretty old and covers only Tapestry 3. I 
would advice downloading chapters 1-4 of 'Enjoying Web Development With 
Tapestry' (http://www.agileskills2.org/EWDT). This covers Tapestry 4. A 
lot of changes have been made from Tapestry 3 to Tapestry 4.


I'm just starting to learn Wicket now and I can confirm that learning 
Wicket is easier that learning Tapestry. I'm sure others on this list 
can tell you a lot more about Wicket than I can.
I personally feel more in control with Tapestry since every part of the 
framework can be tweaked, overridden and enhanced easily once you know 
your way around the framework and you have full control of what objects 
are stored on the session and when and you can let code inject pure html 
into the page wherever you like if you want to.
With Wicket I can quickly start developing pages but it feels like I 
need to think much harder about how to do things without filling up the 
Session with data, since it tries much harder to be smart for you behind 
the scenes. It does this to make the developers more productive, but I 
don't always trust that kind of smartness and I'm always afraid that any 
List I'm showing gets stored on the session without me knowing about it. 
I'm probably just a control-freak and this is just part of the Wicket 
learning curve. I'm sure I'll feel more comfortable once I get to know 
it better.


Some things I didn't like about Tapestry:
Classes are abstract (a lot of stuff like getters/setters etc. are 
injected into the classes at runtime). It saves on boilerplate code, but 
makes testing harder and makes things less obvious. A lot of injections 
are done using either XML or Annotations with Strings of text in them. 
This doesn't give you any type-safety and forces you to continuously 
browse through the documentation. The learning curve is pretty steep 
(mainly because of the notorious rewind-phase that confuses a lot of 
developers) and it seems that every major release is incompatible with 
previous releases, forcing you to re-learn a lot.


That said, once you know Tapestry, it is very productive and really a 
pleasure to use. As is Wicket from what I've seen so far.



Regards,

Onno

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



Page and compoenent level feedback are mixing together

2007-08-22 Thread Watter

I've searched for and read a number of threads on using multiple feedback
panels on one page. I'm struggling with the same thing, but I haven't seen a
response that is directly on point to my problem. We want to have a feedback
component on our main page that most of the other pages in the application
extend. This would be present to display any truly unexpected errors and the
occasional feedback message related to things that happen in our menus or in
our global search box (an invalid search query message for example). We
also need to have a specific feedback panel for the forms that we use in our
app. It's very easy to restrict what gets shown in that second feedback
panel. We either add a ComponentFeedbackMessageFilter or use the convenience
class, ComponentFeedbackPanel. The problem is that the page level feedback
panel is catching the messages for the form level component as well. 

I'm not sure how to go about solving this. I'm reluctant to put some
arbitrary filters on the page level feedback as it's intended to be a
catch-all for things we don't expect (there's some AOP advice around our
service tier calls that wrap exceptions and deliver them to this component).

Any ideas? 

Matt
-- 
View this message in context: 
http://www.nabble.com/Page-and-compoenent-level-feedback-are-mixing-together-tf4314782.html#a12285394
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Page and compoenent level feedback are mixing together

2007-08-22 Thread Igor Vaynberg
you have to create your own custom feedback filter. this is simply how
wicket feedback works. it is stored per page, and if you want to filter it
you have to do it inside the panel.

-igor


On 8/22/07, Watter [EMAIL PROTECTED] wrote:


 I've searched for and read a number of threads on using multiple feedback
 panels on one page. I'm struggling with the same thing, but I haven't seen
 a
 response that is directly on point to my problem. We want to have a
 feedback
 component on our main page that most of the other pages in the application
 extend. This would be present to display any truly unexpected errors and
 the
 occasional feedback message related to things that happen in our menus or
 in
 our global search box (an invalid search query message for example). We
 also need to have a specific feedback panel for the forms that we use in
 our
 app. It's very easy to restrict what gets shown in that second feedback
 panel. We either add a ComponentFeedbackMessageFilter or use the
 convenience
 class, ComponentFeedbackPanel. The problem is that the page level feedback
 panel is catching the messages for the form level component as well.

 I'm not sure how to go about solving this. I'm reluctant to put some
 arbitrary filters on the page level feedback as it's intended to be a
 catch-all for things we don't expect (there's some AOP advice around our
 service tier calls that wrap exceptions and deliver them to this
 component).

 Any ideas?

 Matt
 --
 View this message in context:
 http://www.nabble.com/Page-and-compoenent-level-feedback-are-mixing-together-tf4314782.html#a12285394
 Sent from the Wicket - User mailing list archive at Nabble.com.


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




Question regarding old post (ResultSet and DataTable)

2007-08-22 Thread dtoffe

Hi !!

I've found this old thread:

   
http://www.nabble.com/RE%3A-DataView-%28extensions%29-tf1287013.html#a3423281

I hope this link works OK, just in case I quote here the relevant part:

 I have come up with my own subclass of DataTable and implementation of
 IDataProvider to display any arbitrary database java.sql.ResultSet.
-
 The code is actually quite compact; when I'm finished I'll post it to the
 list if there is any interest.

I'm trying to fill a DataTable with the ResultSet obtained from
executing a query:

cs = con.prepareCall({ call Region_SelectAll });
rs = cs.executeQuery();

After I while I discovered that there is no easy or evident way of
filling the DataTable from a ResultSet, I have to provide custom
DataProviders which implement IDataProvider. In case there is some work done
on a generic approach, even if incomplete or undocumented, I'm interested in
taking a look at it.
If there are new or better ways to do this that came up after this
thread, I'm also interested in knowing. Having a way of easily handling the
database resultset and a list of the resultset headers (column titles) would
be great, the more generic, the better.

Thanks !!

Daniel

-- 
View this message in context: 
http://www.nabble.com/Question-regarding-old-post-%28ResultSet-and-DataTable%29-tf4314874.html#a12285785
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Question regarding old post (ResultSet and DataTable)

2007-08-22 Thread Igor Vaynberg
actually idataprovider is more generic then resultset :)

-igor


On 8/22/07, dtoffe [EMAIL PROTECTED] wrote:


 Hi !!

 I've found this old thread:



 http://www.nabble.com/RE%3A-DataView-%28extensions%29-tf1287013.html#a3423281

 I hope this link works OK, just in case I quote here the relevant
 part:

  I have come up with my own subclass of DataTable and implementation of
  IDataProvider to display any arbitrary database java.sql.ResultSet.
 -
  The code is actually quite compact; when I'm finished I'll post it to
 the
  list if there is any interest.

 I'm trying to fill a DataTable with the ResultSet obtained from
 executing a query:

 cs = con.prepareCall({ call Region_SelectAll });
 rs = cs.executeQuery();

 After I while I discovered that there is no easy or evident way of
 filling the DataTable from a ResultSet, I have to provide custom
 DataProviders which implement IDataProvider. In case there is some work
 done
 on a generic approach, even if incomplete or undocumented, I'm interested
 in
 taking a look at it.
 If there are new or better ways to do this that came up after this
 thread, I'm also interested in knowing. Having a way of easily handling
 the
 database resultset and a list of the resultset headers (column titles)
 would
 be great, the more generic, the better.

 Thanks !!

 Daniel

 --
 View this message in context:
 http://www.nabble.com/Question-regarding-old-post-%28ResultSet-and-DataTable%29-tf4314874.html#a12285785
 Sent from the Wicket - User mailing list archive at Nabble.com.


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




Re: Can we do straight print in a java web application?

2007-08-22 Thread Eko S.W.
Thank you very much for the great pointer!

Close (or maybe exactly) to what I want is from Joel.
The idea is to let the web application act as an ordinary Desktop
Application
So, seamless working with the printer is a must.


I'll report my research on js for pdf as soon as I can.


-- 
Best wishes,
Eko SW
http://swdev.blogs.friendster.com/my_blog/


Re: Page and compoenent level feedback are mixing together

2007-08-22 Thread Eelco Hillenius
On 8/22/07, Igor Vaynberg [EMAIL PROTECTED] wrote:
 you have to create your own custom feedback filter. this is simply how
 wicket feedback works. it is stored per page, and if you want to filter it
 you have to do it inside the panel.

Still, using these filters is a bit clumsy imo. I can see Matt's case
where you want to couple feedback panels to forms and let that print
out the messages for only these forms, and whatever is left after that
can be rendered by other feedback panels. In fact that would be a lot
better than what we have now; how helpful is it anyway to have
multiple feedbackpanels rendering out the same messages?. Only
rendering messages for a form is possible using
ContainerFeedbackMessageFilter, but the rest of the case... is not
really possible in a simple fashion unless I'm overlooking something.
Note that this case was actually what I tried to achieve 1.5 years ago
or such with feedback boundries (though that had it's own problems, so
I'm not arguing to get that back).

Improving upon the current situation could work roughly like this:
updateFeedback is done post order, and the implementations should mark
feedbackmessages as accepted or something (IFeedbackMessageFilter
would best be converted to an abstract class then so that we can
guarantee marking the messages). When messages are marked, other
components may choose to ignore them. If FeedbackPanel would work that
way, we'd have Matt's behavior out-of-the-box, which imho is a lot
better than the current way that feedbackmessages just print out any
messages regarless whether they already were consumed by another
feedback panel.

WDYT?

Eelco

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



Re: Question regarding old post (ResultSet and DataTable)

2007-08-22 Thread dtoffe

Uhh, well... yes, you are right.

Excuse me but I fail to see how that could help to solve the problem I
presented, please keep in mind that I'm not native english speaker and
perhaps I'm not using the proper words, I'll try to explain that more
precisely.

As I said in my previous post, I do my database queries in this way:

ResultSet rs = cs.executeQuery();

In fact, later I'll use a code generator to ease the task, but let's
assume for simplicity that I get the result in a java.sql.ResultSet. But, as
stated in the Wicket Extension Javadoc, I must create the DataTable
instances in this way:

DataTable table = new DataTable(datatable, columns, new
UserProvider(), 10);

Specifically, the third parameter must implement
wicket.markup.repeater.data.IDataProvider; which ResultSet doesn't
implement, so I must provide for a means to overcome this.

I didn't intended to mean that ResultSets are more generic that
DataProviders. When I talked about a general way of handling ResultSet I
tried to mean independently of whether I'm querying a Database Table, Stored
Porcedure, with read-only or read-write cursors, uni or bi-directional, and
so. I'm concerned about how well this will go in regard of sortable and
pageable tables.

Perhaps there is a mean to do all that already in the Wicket library,
but I havent found it yet. In the examples I've seen so far the database
is represented by some kind of static list, like in the ContactsDatabase and
ContactGenerator classes in the DataTable example, but I'm looking for a way
of using data from queries to a database engine.

The way I see it, I'll have to develop a class which could perhaps
extends ResultSet, or one of the RowSet implementations, and implements the
IDataProvider interface, am I right on this one ??

Thanks for your help !!

Daniel



igor.vaynberg wrote:
 
 actually idataprovider is more generic then resultset :)
 
 -igor
 
 
 On 8/22/07, dtoffe [EMAIL PROTECTED] wrote:

 Hi !!

 I've found this old thread:

 http://www.nabble.com/RE%3A-DataView-%28extensions%29-tf1287013.html#a3423281

 If there are new or better ways to do this that came up after this
 thread, I'm also interested in knowing. Having a way of easily handling
 the database resultset and a list of the resultset headers (column
 titles) would be great, the more generic, the better.

 Thanks !!

 Daniel

 

-- 
View this message in context: 
http://www.nabble.com/Question-regarding-old-post-%28ResultSet-and-DataTable%29-tf4314874.html#a12287761
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: wicket vs tapestry ?

2007-08-22 Thread Onno Scheffers



Unfortunately, that's an assumption that many people make. But say
that you're not worried about optimizing and one session means about
100kb (on the high side, as with optimizing in my experience you
should be able to bring that to 15-30kb)... That means you can support
10,000 concurrent sessions with one gig of RAM.
  


If the application and VM don't use any memory themselves that is :o)
I'm not that bothered about memory usage by the way. When a webapp is 
distributed over multiple servers, the session data needs to be 
serialized between the different servers. That's the main reason I try 
to keep as little data on the session as possible.




It's ok to be a control freak about it. But you should measure, not go
by your hunch. :)
  


You're right of course.
But since I'm currently learning, I can't help wondering at each step 
where the data gets stored magically. Likely that will go away once I 
know my way around Wicket. It's also not a complaint, just part of 
getting to know the best way of doing things.




Best thing about both is that they are component oriented frameworks.
Big improvement over model 2 frameworks imho.
  


I fully agree :o)

regards,

Onno

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



Re: Page and compoenent level feedback are mixing together

2007-08-22 Thread Igor Vaynberg
On 8/22/07, Eelco Hillenius [EMAIL PROTECTED] wrote:


 Improving upon the current situation could work roughly like this:
 updateFeedback is done post order, and the implementations should mark
 feedbackmessages as accepted or something (IFeedbackMessageFilter
 would best be converted to an abstract class then so that we can
 guarantee marking the messages). When messages are marked, other
 components may choose to ignore them. If FeedbackPanel would work that
 way, we'd have Matt's behavior out-of-the-box, which imho is a lot
 better than the current way that feedbackmessages just print out any
 messages regarless whether they already were consumed by another
 feedback panel.

 WDYT?


what we need to do is collect usecases from our users. what you propose
sounds great if you are doing component-hierarchy based filtering - but is
this common. for example what about a usecase where there are two panels -
one on top and one on bottom of a form showing the same messages - will we
still support that? with your proposal sounds not, because panels would grab
messages out of the set so a message can be shown at most one time by one
panel.

i would say ask our users for all these usecases, pick the most common ones
but leave enough wiggle room to implement the uncommon ones. maybe really
what we should do is not provide a feedbackpanel at all, but rather some
callback that users can implement and build their own panels.

-igor




Eelco

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