Extending the ModalWindow

2009-03-26 Thread rodrigo benenson
Hi there !
I'm polishing the first prototype of my web application before
release. When I wanted to modify the look and feel of Wicket's modal
windows I was surprised to notice that the HTML is hardcoded
Javascript code !
I was expecting to extend the ModalWindow class, for instance,
changing the associated HTML template. But I discovered that this
seems not possible.

Can someone explain me why this component uses hardcoded Javascript
for the HTML parts ?
Is there somewhere a more reusable implementation of a ModalWindow ?

I could try to hack my way with tricky CSS but even that seems
unlikely to give me what I want (for instance the close cross is
inside the title div, I want it in a separate place). Playing to much
with CSS magic  risk to break the cross browser compatibility. The
final result I'm searching for is something much like
http://famspam.com/facebox

I was also considering using Wickext to do the trick
http://www.wickext.org/

(which I'm already using for some forms magic) but I fail to see how
to implement the onClose server side Java call method...

Could someone help me with this ? How to get a full featured
ModalWindow that looks like the facebox example ?

Regards,
rodrigob.

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



Re: Need Wicket Examples

2009-03-26 Thread FaRHaN
I have Wicket in Action book but those examples are being explained in 
Ant/Maven and not in netbeans IDE. Are there any examples which are also 
executable in netbeans IDE ?




  

Re: Repeater component with dynamic column list

2009-03-26 Thread Martijn Dashorst
You might want to spell wicket correctly in your markup. wikcet is not
the valid xmlns prefix :)

Martijn

On Wed, Mar 25, 2009 at 9:00 PM, rora tempma...@go2.pl wrote:

 Hi Janos,
 I did what you advised me to do but got the following exception (in this
 case I used a list of 3 entries with 3 fields):
 Unexpected RuntimeException

 WicketMessage: The component(s) below failed to render. A common problem is
 that you have added a component in code but forgot to reference it in the
 markup (thus the component will never be rendered).

 1. [MarkupContainer [Component id = cell]]
 2. [Component id = 1]
 3. [Component id = 2]
 4. [Component id = 3]
 5. [Component id = 4]
 6. [MarkupContainer [Component id = cell]]
 7. [Component id = 1]
 8. [Component id = 2]
 9. [Component id = 3]
 10. [Component id = 4]

 Root cause:

 org.apache.wicket.WicketRuntimeException: The component(s) below failed to
 render. A common problem is that you have added a component in code but
 forgot to reference it in the markup (thus the component will never be
 rendered).

 1. [MarkupContainer [Component id = cell]]
 2. [Component id = 1]
 3. [Component id = 2]
 4. [Component id = 3]
 5. [Component id = 4]
 6. [MarkupContainer [Component id = cell]]
 7. [Component id = 1]
 8. [Component id = 2]
 9. [Component id = 3]
 10. [Component id = 4]

 at org.apache.wicket.Page.checkRendering(Page.java:1121)
 at org.apache.wicket.Page.renderPage(Page.java:914)
 at
 org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:249)
 at
 org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:104)
 at
 org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1194)
 at org.apache.wicket.RequestCycle.step(RequestCycle.java:1265)
 at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1366)
 at org.apache.wicket.RequestCycle.request(RequestCycle.java:498)
 at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:444)
 at
 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:282)
 at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at
 org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
 at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
 at
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
 at
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
 at
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
 at
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
 at
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
 at
 org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
 at
 org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
 at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
 at java.lang.Thread.run(Thread.java:619)

 //* File listings
 //*
 //EntryListPage.html

 html xmlns:wicket
    head
        meta http-equiv=Content-Type content=text/html; charset=UTF-8/
        titleEntryListPage/title
        link rel=stylesheet type=text/css href=style.css/
    /head
    body

    /body
 /html
 //**
 // EntryListPage.java

 public final class EntryListPage extends WebPage {
    public EntryListPage() {
        super ();

        ArrayListEntryData entries = createSampleEntries();
        EntryDataPanel entryDataPanel = new EntryDataPanel(entryDataPanel,
 entries);
        add(entryDataPanel);
        [...]
    }
 }
 //**
 // EntryDataPanel.html
 html xmlns:wicket
    head
        meta http-equiv=Content-Type content=text/html; charset=UTF-8/
        titleEntryDataPanel/title
    /head
    body
        wicket:panel
            table border=1
            tr
              thEntry Id/th
              th wicket:id=heading
              /th
            /tr
            tr wicket:id=row
              td wikcet:id=cell
              /td
            /tr
            /table
        /wicket:panel
    /body
 /html

 //**
 // EntryDataPanel.java
 public final class EntryDataPanel extends Panel
 {
    public EntryDataPanel(String id, ArrayListEntryData entries)
    {
        super (id);

        RepeatingView heading = new 

Re: Repeater component with dynamic column list

2009-03-26 Thread rora

 
%-O
I've spent a lot of time trying to figure out what's wrong with code and
markup but didn't notice this typo.

Thanks Martijn



You might want to spell wicket correctly in your markup. wikcet is not
the valid xmlns prefix :)

Martijn

-- 
View this message in context: 
http://www.nabble.com/Repeater-component-with-dynamic-column-list-tp22700806p22717153.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: Need Wicket Examples

2009-03-26 Thread Philippe Marzouk
On Thu, Mar 26, 2009 at 12:06:23AM -0700, FaRHaN wrote:
 I have Wicket in Action book but those examples are being explained in
 Ant/Maven and not in netbeans IDE. Are there any examples which are
 also executable in netbeans IDE ?
 

In Netbeans, install the Maven plugin and create a new Maven project
using an existing pom.xml.

Philippe

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



Re: Need Wicket Examples

2009-03-26 Thread Zenberg Ding

Check out svn's code, copy examples to your nb project folder, run it :)


On Thu, Mar 26, 2009 at 12:06:23AM -0700, FaRHaN wrote:

I have Wicket in Action book but those examples are being explained in
Ant/Maven and not in netbeans IDE. Are there any examples which are
also executable in netbeans IDE ?



In Netbeans, install the Maven plugin and create a new Maven project
using an existing pom.xml.

Philippe

-
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: Need Wicket Examples

2009-03-26 Thread Ajayi Yinka
Download the wicket plugin for netbeans(Go to tools- Plugins, and select
available plugins) and create a new wicket project after this.

Yinka

On Thu, Mar 26, 2009 at 7:43 AM, Philippe Marzouk p...@ozigo.org wrote:

 On Thu, Mar 26, 2009 at 12:06:23AM -0700, FaRHaN wrote:
  I have Wicket in Action book but those examples are being explained in
  Ant/Maven and not in netbeans IDE. Are there any examples which are
  also executable in netbeans IDE ?
 

 In Netbeans, install the Maven plugin and create a new Maven project
 using an existing pom.xml.

 Philippe

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




-- 
Ajayi Yinka,

Itex Integrated Services, Nig.

+2348022684477


Re: freelance gig

2009-03-26 Thread nino martinez wael
I think what are mentioned in the article are the Grand redesign, I
do not think this is the case here, also since the dead line are in a
month or two..

2009/3/25 Phillip Rhodes spamsu...@rhoderunner.com:
 It's just rewriting the UI.  Most of the code is behind spring services, so 
 this is hardly a 100% rewrite, it's just a rewrite of the UI layer.

 Please bear in mind that we are not rewriting the application just to get 
 from webframework a into webframework b.  Even if I kept it in webframe a, 
 everything needs to be changed.  The entire security paradigm has changed, 
 every screen has changed.  Not much reuse will be achieved by trying to 
 enhance the old application.


 -Original Message-
 From: Martin Makundi martin.maku...@koodaripalvelut.com
 Sent: Wednesday, March 25, 2009 2:58pm
 To: users@wicket.apache.org
 Subject: Re: freelance gig

 Don't do it: http://www.joelonsoftware.com/articles/fog69.html

 **
 Martin

 2009/3/25 Phillip Rhodes spamsu...@rhoderunner.com:
 I apologize for this posting, but being a fellow wicket enthusiast who needs 
 some help, I wouldn't have minded seeing such a posting.  For our project, 
 we are implementing a new user interface.  The existing UI is written using 
 another java-based web framework, and many of the elements of the new 
 interface requires components (i.e. Modal popups, trees) that either do not 
 exist in this framework or are buggy.
 Most of the application code is in the service layer and not the UI layer, 
 so given the vastly different UI, a total UI rewrite is necessary.

 The project is to implement a newly redesigned UI using wicket.  The wicket 
 UI will interface with an already written suite of spring services that work 
 with hibernate to persist data to the database.  In addition to hibernate, 
 the spring services layer will integrate with Lucene.  Ideally, the person 
 to do this work is already familiar with wicket, spring, hibernate and 
 Lucene.  Of most importance is familiarity with wicket.

 The work can be done remotely, and we will be working together (splitting 
 out the components, pages, etc) to deliver a new UI.  Delivery is slated for 
 mid-may.  Please email me (off the mailing list of course) if you are 
 interested, how your experience matches what i need and what your rate 
 requirements are.

 Thanks, and I apologize for the non-development question.
 Phillip



 -
 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: number of active users

2009-03-26 Thread nino martinez wael
it's this one:

http://www.nabble.com/Session-end-method-td18020171.html#a18024174

was pretty good hidden

2009/3/26 Jeremy Thomerson jer...@wickettraining.com:
 the list = this mailing list

 search it on nabble

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



 On Wed, Mar 25, 2009 at 7:10 PM, Andreas Kaluza kal...@rhrk.uni-kl.dewrote:

 Thx for the reply!

 1) In which class do I find the list?
 2) Has someone another idea, for my problem?

 Greetz


  -Ursprüngliche Nachricht-
  Von: nino martinez wael [mailto:nino.martinez.w...@gmail.com]
  Gesendet: Mittwoch, 25. März 2009 20:18
  An: users@wicket.apache.org
  Betreff: Re: number of active users
 
  yeah search the list i did something once but its not a great solution
  and it does not work when clustering
 
  2009/3/25 Andreas Kaluza kal...@rhrk.uni-kl.de:
   Hi @ all,
  
  
  
   I'm using Wicket 1.35 with a jetty server. My question is if I can
  get the
   number of the active users, who are logged in the system. Perhaps
  getting
   the number of active sessions or something like that. Is there a
  solution
   for my problem?
  
  
  
   Greetings
  
  
  
  
  
  
 
  -
  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: best way to add tooltips in wicket

2009-03-26 Thread RoyBatty

OK, OK, i get it, everyone loves MooTip :)

The reason i started out with prototip was actually that the mootip
example link on the wicketstuff-minis page was broken.
(http://wicketstuff.org/confluence/display/STUFFWIKI/wicketstuff-minis).

But if it's easier to change the CSS setting for MooTip i guess i'll try it
out...


nino martinez wael wrote:
 
 ohh and yeah mootip supports ajax tips, tool tips loaded via ajax...
 very usefull if you have lots of tips with images / animations...
 

-- 
View this message in context: 
http://www.nabble.com/best-way-to-add-tooltips-in-wicket-tp22697930p22717577.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: best way to add tooltips in wicket

2009-03-26 Thread Stefan Lindner
Did you already have a look at http://www.walterzorn.com/tooltip/tooltip_e.htm ?

-Ursprüngliche Nachricht-
Von: RoyBatty [mailto:math...@afjochnick.net] 
Gesendet: Donnerstag, 26. März 2009 09:21
An: users@wicket.apache.org
Betreff: Re: best way to add tooltips in wicket


OK, OK, i get it, everyone loves MooTip :)

The reason i started out with prototip was actually that the mootip
example link on the wicketstuff-minis page was broken.
(http://wicketstuff.org/confluence/display/STUFFWIKI/wicketstuff-minis).

But if it's easier to change the CSS setting for MooTip i guess i'll try it
out...


nino martinez wael wrote:
 
 ohh and yeah mootip supports ajax tips, tool tips loaded via ajax...
 very usefull if you have lots of tips with images / animations...
 

-- 
View this message in context: 
http://www.nabble.com/best-way-to-add-tooltips-in-wicket-tp22697930p22717577.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



Re: best way to add tooltips in wicket

2009-03-26 Thread nino martinez wael
Ok thanks about the pointer, I correct the url.. I forgot todo it
after minis was adopted into wicketstuff core

2009/3/26 RoyBatty math...@afjochnick.net:

 OK, OK, i get it, everyone loves MooTip :)

 The reason i started out with prototip was actually that the mootip
 example link on the wicketstuff-minis page was broken.
 (http://wicketstuff.org/confluence/display/STUFFWIKI/wicketstuff-minis).

 But if it's easier to change the CSS setting for MooTip i guess i'll try it
 out...


 nino martinez wael wrote:

 ohh and yeah mootip supports ajax tips, tool tips loaded via ajax...
 very usefull if you have lots of tips with images / animations...


 --
 View this message in context: 
 http://www.nabble.com/best-way-to-add-tooltips-in-wicket-tp22697930p22717577.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



Re: Wicket architecture diagram?

2009-03-26 Thread subbu_tce

Based on my understanding, i just prepared a diagram. 
Wicket Contributors.. Please review and let me know your valuable feedback.
http://www.nabble.com/file/p22717793/wicket%2Barchitecture.jpg 


Thanks,
Subbu.


jWeekend wrote:
 
 Jeremy,
 
 It's one of the first things I looked for when I first stumbled upon
 Wicket 2 years ago, and it is a common request from many architects and
 even some project managers evaluating Wicket.
 
 If the core devs come up with some rough (but correct) sketch they're all
 agreed on, even if it's just a first iteration, I'll get someone here to
 create a professional (maybe even glossy) version from that.
 
 Regards - Cemal 
  http://jWeekend.com jWeekend 
 
 
 Jeremy Thomerson-5 wrote:
 
 Has anyone done a nice Wicket architecture diagram?  I know about the
 architecture chapter in WiA, but someone I know is looking for something
 more along the lines of:
 
 http://www.icesoft.com/developer_guides/icefaces/htmlguide/devguide/sys_architecture.html
 http://www.ociweb.com/jnb/jsfArchitecture.jpg
 
 Unfortunately, I'm no artist - so I can't help him much.  I was hoping
 someone had already done something similar as part of a presentation
 somewhere.
 
 --
 Jeremy Thomerson
 http://www.wickettraining.com
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Wicket-architecture-diagram--tp22683704p22717793.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: Form validation without a form component

2009-03-26 Thread triswork

Thanks igor,

I had a go at implementing the form level validator, but it still requires a
FormComponent to attach its error message to.

For example:
form.add(new IFormValidator() {
  @Override
  public void validate(Form f) {
if (myList.size() == 0)  {
  f.error(new ValidationError().addMessageKey(error.myErrorMessage));
}
  }

  @Override
  public FormComponent[] getDependentFormComponents() {
return null;
  }
});

If I don't return a FormComponent in getDependentFormComponents(), I get the
following message in my Feedback Panel:
[ValidationError message=[null], keys=[error.myErrorMessage],
variables=[null]]

Is there a way around this that you are aware of?

T


igor.vaynberg wrote:
 
 see IFormValidator
 
 -igor
 

-- 
View this message in context: 
http://www.nabble.com/Form-validation-without-a-form-component-tp22682572p22717797.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: best way to add tooltips in wicket

2009-03-26 Thread nino martinez wael
Yeah there are dozens of ways doing it easy with static tooltips.. But
if you want easy ajax tooltips, mootip are the only way with wicket
right now I believe. Especially because they are truly dynamic.

And im not saying mootip are the best, it was just the only one (at
the time and which I found) which fitted good with wicket ajax.

2009/3/26 Stefan Lindner lind...@visionet.de:
 Did you already have a look at 
 http://www.walterzorn.com/tooltip/tooltip_e.htm ?

 -Ursprüngliche Nachricht-
 Von: RoyBatty [mailto:math...@afjochnick.net]
 Gesendet: Donnerstag, 26. März 2009 09:21
 An: users@wicket.apache.org
 Betreff: Re: best way to add tooltips in wicket


 OK, OK, i get it, everyone loves MooTip :)

 The reason i started out with prototip was actually that the mootip
 example link on the wicketstuff-minis page was broken.
 (http://wicketstuff.org/confluence/display/STUFFWIKI/wicketstuff-minis).

 But if it's easier to change the CSS setting for MooTip i guess i'll try it
 out...


 nino martinez wael wrote:

 ohh and yeah mootip supports ajax tips, tool tips loaded via ajax...
 very usefull if you have lots of tips with images / animations...


 --
 View this message in context: 
 http://www.nabble.com/best-way-to-add-tooltips-in-wicket-tp22697930p22717577.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



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



Re: best way to add tooltips in wicket

2009-03-26 Thread Stephen Swinsburg
I made my own IconWithToolTip component that renders an icon with a  
jQuery cluetip on hover. Takes advantage of all the neat jQuery  
extensions like hoverIntent (did they really meant to hover or did  
they just wave the mouse around).


Welcome to the source if you'd like it.

cheers,
Steve


On 26/03/2009, at 8:21 AM, RoyBatty wrote:



OK, OK, i get it, everyone loves MooTip :)

The reason i started out with prototip was actually that the mootip
example link on the wicketstuff-minis page was broken.
(http://wicketstuff.org/confluence/display/STUFFWIKI/wicketstuff- 
minis).


But if it's easier to change the CSS setting for MooTip i guess i'll  
try it

out...


nino martinez wael wrote:


ohh and yeah mootip supports ajax tips, tool tips loaded via ajax...
very usefull if you have lots of tips with images / animations...



--
View this message in context: 
http://www.nabble.com/best-way-to-add-tooltips-in-wicket-tp22697930p22717577.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





smime.p7s
Description: S/MIME cryptographic signature


Fwd: Question on LinkTree implementation

2009-03-26 Thread Ajayi Yinka
I found out that if no node is added to the node1, The onclick method works
as supposed.

But if I try to add one sub-node to it, I begin to have the same type of
error as below.

I am sure there is a problem somewhere that I have not been able to trace (I
am a new to wicket framework). Could anyoen help me out.

Thanks


-- Forwarded message --
From: Ajayi Yinka iamstyaj...@googlemail.com
Date: Thu, Mar 26, 2009 at 8:34 AM
Subject: Question on LinkTree implementation
To: users@wicket.apache.org




hi all,

I am having problems in implementing LinkTree in my page.

I use to get the component not found exception (

WicketMessage: close tag not found for tag: ul id=node11
wicket:id=node1. Component: [MarkupContainer [Component id = node1]]

Root cause:

org.apache.wicket.markup.MarkupException: close tag not found for tag: ul
id=node11 wicket:id=node1. Component: [MarkupContainer [Component id =
node1]]
at
org.apache.wicket.markup.html.panel.Panel.onComponentTagBody(Panel.java:121)
at org.apache.wicket.Component.renderComponent(Component.java:2480)
at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1411)
at org.apache.wicket.Component.render(Component.java:2317)
at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1297)
at
org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1476)
at
org.apache.wicket.MarkupContainer.renderAssociatedMarkup(MarkupContainer.java:639)
at
org.apache.wicket.markup.html.panel.Panel.onComponentTagBody(Panel.java:112)
at org.apache.wicket.Component.renderComponent(Component.java:2480)
at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1411)
at org.apache.wicket.Component.render(Component.java:2317)
at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1297)
at org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1427)
at org.apache.wicket.Page.onRender(Page.java:1470)
at org.apache.wicket.Component.render(Component.java:2317)
at org.apache.wicket.Page.renderPage(Page.java:904)
at
org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:231)
at
org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:104)
at
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1181)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1252)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1353)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:355)
at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:200)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:250)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:218)
at
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:250)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:218)
at
org.apache.catalina.core.StandardWrapperValve.preInvoke(StandardWrapperValve.java:460)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:139)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:186)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:719)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:657)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:96)
at
com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:98)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:187)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:719)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:657)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:651)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1030)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:142)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:719)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:657)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:651)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1030)
at
org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:325)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:242)
at
com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:180)
at

Re: best way to add tooltips in wicket

2009-03-26 Thread RoyBatty

Right, thanks for all the input. 

I did try mootips now, and they both work fine. One thing i noticed, though,
was that mootips seemed to glich more than prototips, i.e. i seems more
performance-heavy? Am i imagining this? :) (i'm setting the mootip up as in
the example)

Currently we have no need for ajax-fetched tooltips, but i guess it's good
to use the one that has the functionality.



nino martinez wael wrote:
 
 Yeah there are dozens of ways doing it easy with static tooltips.. But
 if you want easy ajax tooltips, mootip are the only way with wicket
 right now I believe. Especially because they are truly dynamic.
 
 And im not saying mootip are the best, it was just the only one (at
 the time and which I found) which fitted good with wicket ajax.
 

-- 
View this message in context: 
http://www.nabble.com/best-way-to-add-tooltips-in-wicket-tp22697930p22718604.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: best way to add tooltips in wicket

2009-03-26 Thread nino martinez wael
There's some settings in regard to the glitch thing I think a timer or
something I think, but this is only in regard when using ajax..

regards

2009/3/26 RoyBatty math...@afjochnick.net:

 Right, thanks for all the input.

 I did try mootips now, and they both work fine. One thing i noticed, though,
 was that mootips seemed to glich more than prototips, i.e. i seems more
 performance-heavy? Am i imagining this? :) (i'm setting the mootip up as in
 the example)

 Currently we have no need for ajax-fetched tooltips, but i guess it's good
 to use the one that has the functionality.



 nino martinez wael wrote:

 Yeah there are dozens of ways doing it easy with static tooltips.. But
 if you want easy ajax tooltips, mootip are the only way with wicket
 right now I believe. Especially because they are truly dynamic.

 And im not saying mootip are the best, it was just the only one (at
 the time and which I found) which fitted good with wicket ajax.


 --
 View this message in context: 
 http://www.nabble.com/best-way-to-add-tooltips-in-wicket-tp22697930p22718604.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



Re: Wicket architecture diagram?

2009-03-26 Thread Erik van Oosten

Subbu,

Very good that somebody picks this up!

At this very high level pages and components are basically just parts of 
a component tree. A page is just the root of such a component tree. I 
would therefore recommend replacing the 'page' and 'component' icons by 
a single stack of 'component tree' icons.


The session store is not related to the loadable detachable models. 
Loading data is entirely the responsibility of the model implementation.


What is not clear from this image is that the responsibility to put/get 
the current page (component tree) in/from the session store lies with 
the RequestCycleProcessor, not the component tree itself.


Regards,
   Erik.


subbu_tce wrote:
Based on my understanding, i just prepared a diagram. 
Wicket Contributors.. Please review and let me know your valuable feedback.
http://www.nabble.com/file/p22717793/wicket%2Barchitecture.jpg 



Thanks,
Subbu.


jWeekend wrote:
  

Jeremy,

It's one of the first things I looked for when I first stumbled upon
Wicket 2 years ago, and it is a common request from many architects and
even some project managers evaluating Wicket.

If the core devs come up with some rough (but correct) sketch they're all
agreed on, even if it's just a first iteration, I'll get someone here to
create a professional (maybe even glossy) version from that.

Regards - Cemal 
 http://jWeekend.com jWeekend 



Jeremy Thomerson-5 wrote:


Has anyone done a nice Wicket architecture diagram?  I know about the
architecture chapter in WiA, but someone I know is looking for something
more along the lines of:

http://www.icesoft.com/developer_guides/icefaces/htmlguide/devguide/sys_architecture.html
http://www.ociweb.com/jnb/jsfArchitecture.jpg

Unfortunately, I'm no artist - so I can't help him much.  I was hoping
someone had already done something similar as part of a presentation
somewhere.

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


  



  


--

Erik van Oosten
http://day-to-day-stuff.blogspot.com/



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



RadioGroup lost value after onError form

2009-03-26 Thread Marieke Vandamme

Hello, 

consider example underneath. 
Form with DateTextField and RadioGroup. When an incorrect date is entered in
the TextField, the value choosen in radiogroup is lost. When correct date is
entered, the value is shown correct in radiogroup.
Is this an error in my code? Or a bug?
I'm using wicket 1.4-rc2. 
Thanks for any help !!

==TestPage.java==
public class TestPage extends WebPage {
private String color;
private Date date;
public TestPage(){
Form myform = new Form(myform);
myform.add(new FeedbackPanel(feedback));
myform.add(new DateTextField(date, new PropertyModel(this,
date)));
ListString colors = Arrays.asList(new String[]{green, red,
yellow});
myform.add(new RadioGroup(colors, new PropertyModel(this,
color))
.add(new ListViewString(color, colors) {
@Override
protected void populateItem(ListItemString item) {
item.add(new Radio(radio, item.getModel()))
.add(new Label(value, item.getModelObject()));
}
}));
add(myform);
}

public String getColor() {
return color;
}
public void setColor(String color) {
this.color = color;
}
public Date getDate() {
return date;
}
public void setDate(Date date) {
this.date = date;
}
}

==TestPage.html==
html
head
title/title
/head
body
form wicket:id=myform
input type=submit/
wicket:container wicket:id=feedback/
input type=text wicket:id=date/br/
wicket:container wicket:id=colors
table
tr wicket:id=color
tdinput type=radio wicket:id=radio//td
td wicket:id=value/td
/tr
/table
/wicket:container
/form
/body
/html

-- 
View this message in context: 
http://www.nabble.com/RadioGroup-lost-value-after-onError-form-tp22718553p22718553.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: best way to add tooltips in wicket

2009-03-26 Thread James Carman
If you're interested in using static tooltips that are styled, we've
had good luck with overlib.

On Thu, Mar 26, 2009 at 5:34 AM, RoyBatty math...@afjochnick.net wrote:

 Right, thanks for all the input.

 I did try mootips now, and they both work fine. One thing i noticed, though,
 was that mootips seemed to glich more than prototips, i.e. i seems more
 performance-heavy? Am i imagining this? :) (i'm setting the mootip up as in
 the example)

 Currently we have no need for ajax-fetched tooltips, but i guess it's good
 to use the one that has the functionality.



 nino martinez wael wrote:

 Yeah there are dozens of ways doing it easy with static tooltips.. But
 if you want easy ajax tooltips, mootip are the only way with wicket
 right now I believe. Especially because they are truly dynamic.

 And im not saying mootip are the best, it was just the only one (at
 the time and which I found) which fitted good with wicket ajax.


 --
 View this message in context: 
 http://www.nabble.com/best-way-to-add-tooltips-in-wicket-tp22697930p22718604.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



Re: Extensible wicket application

2009-03-26 Thread Daniel Dominik Holúbek
Hi,
I'm still trying to solve the database problem...
I think it could be useful to mention, that I get an exception at these
lines:

HibernateTemplate ht = new HibernateTemplate(sessionFactory);
ht.save(msg); -- HERE!

and if I change the code to this:

Session session = sessionFactory.openSession();
 session.getTransaction().begin();
 session.save(msg);
 session.getTransaction().commit(); -- HERE!

I have read something regarding OSGi having problems with Session - isn't
this exactly that problem?

Thanks! :)

On Sun, Mar 22, 2009 at 2:10 AM, Brill Pappin br...@pappin.ca wrote:

 I'm assuming your using the 1.4 snapshot...

 I think that images will be relative to the component (or at least one if
 them up the tree).

 The image component uses a resource that will use the arc attribute to look
 for the images, so if the arc attribute is bogus, then one of the other
 methods of locating it better be correct.

 - Brill Pappin
  Sent from my mobile.


 On 21-Mar-09, at 5:29 PM, Daniel Dominik Holúbek dankodo...@gmail.com
 wrote:

  Ernesto, thank you very much :)
 If my application ever goes to the production, it will be thanks to you :)

 Regarding the images problem: I think I did not explain it well. I'm not
 asking where to place them. I placed them almost everywhere, but I still
 can't access them - in the bundle. You see, I have an images directory,
 and in HTML files, I am accessing them as img src=images/blah.jpg, but
 I
 still can't get this working. I am expecting only a hint - how are you
 doing
 this?

 And the database problem - I have the same application deployed as
 standard
 webapp, and there it works. I only wanted to know if it isn't some
 specific
 Wicket-Hibernate-OSGi problem you might have solved before :)

 But thank you all again!

 On Sat, Mar 21, 2009 at 6:06 PM, Brill Pappin br...@pappin.ca wrote:

  Yah, the whole argument about where the resources should go or the one
 before that about top posting or bottom posting.
 You'd think we didn't have any actual work to do :)

 - Brill


 On 21-Mar-09, at 12:39 PM, Ernesto Reinaldo Barreiro wrote:

 useless thread?


 On Sat, Mar 21, 2009 at 4:17 PM, Brill Pappin br...@pappin.ca wrote:

 At the risk of starting another useless thread, this is what I do for

 images and other non HTML resources that are shared:
 - if the project is small, they can just sit with the HTML.
 - if the project is larger then it might be useful to keep them more
 separate, under an images directory and use the base page to ref them
 or
 even create a loader to manage them.

 Ether way, you use them the same way, only prefix the resource name
 with
 the subdir if you have separated them out.

 As for your db error, that looks like something out side the scope of
 wicket.

 - Brill Pappin
 Sent from my mobile.



 On 21-Mar-09, at 9:38 AM, Daniel Dominik Holúbek dankodo...@gmail.co
 m
 wrote:

 Thanks a lot, it works now.

  However, two more questions. Where should I place images folder and
 how
 should I access it in my html files (or style.css as well)?
 And the second one: when i try to insert a record with hibernate into
 my
 database, i get this exception:

 Batch entry 0 insert into forum.anim_forum (autor, email, title, text,
 datum, ip, id) values (...) was aborted.

 and

 org.hibernate.exception.DataException: Could not execute JDBC batch
 update

 Could you (or possibly anyone else) help me with this? :)
 Thanks!

 On Fri, Mar 20, 2009 at 10:27 PM, Ernesto Reinaldo Barreiro 
 reier...@gmail.com wrote:

 One more thing. As far as I remember the servlet bridge makes a 'work

  copy'
 of the plugins folder if you see you make changes, export the
 plugins,
 and
 changes do not 'propagate' to the application, try deleting
 works/Catalina
 folder.

 On Fri, Mar 20, 2009 at 9:58 PM, Ernesto Reinaldo Barreiro 
 reier...@gmail.com wrote:

 Hi Daniel,


 I found some time to get it working! The key to the problem was






 http://dev.eclipse.org/newslists/news.eclipse.technology.equinox/msg04838.html


  So, if you synchronize the projects

 com.antilia.wstarter
 com.antilia.wstarter.demo

 exports them to you bridge it should work. I  attach copy of
 bridge.zip,
 containing a bridge folder, which is working for me. If you unzip it
 to

 your


 tomcat webapps, restart tomcat and go to


 http://localhost:8080/bridge/demo-app/

 Then you should see the example working.

 Best,

 Ernesto


 On Fri, Mar 20, 2009 at 6:34 AM, Daniel Dominik Holúbek 
 dankodo...@gmail.com wrote:

 Right click - Export - Plugin development - Deployable plug-ins
 and

  fragments
 Have a nice day :)

 On Thu, Mar 19, 2009 at 9:32 PM, Ernesto Reinaldo Barreiro 
 reier...@gmail.com wrote:

 Did you exported them how? As equinox jar files or as simple jar


 files?



  Let



 me see if tomorrow I find some time for trying this out myself...


 Best,

 Ernesto

 On Thu, Mar 19, 2009 at 9:14 PM, Daniel Dominik Holúbek 
 dankodo...@gmail.com wrote:

 

Re: number of active users

2009-03-26 Thread Johan Compagner
RequestLogger

On Wed, Mar 25, 2009 at 20:02, Andreas Kaluza kal...@rhrk.uni-kl.de wrote:

 Hi @ all,



 I'm using Wicket 1.35 with a jetty server. My question is if I can get the
 number of the active users, who are logged in the system. Perhaps getting
 the number of active sessions or something like that. Is there a solution
 for my problem?



 Greetings








Re: Extensible wicket application

2009-03-26 Thread reiern70

Can you provide an stack trace or some more info? Is this happening when you
run your application in eclipse or just on the bridge setting? Right now I'm
using hibernate+OSGi on some project and it works just fine... provided
Hibernate can load you entity classes by name.
 
Best,

Ernesto


Daniel Dominik Holúbek wrote:
 
 Hi,
 I'm still trying to solve the database problem...
 I think it could be useful to mention, that I get an exception at these
 lines:
 
 HibernateTemplate ht = new HibernateTemplate(sessionFactory);
 ht.save(msg); -- HERE!
 
 and if I change the code to this:
 
 Session session = sessionFactory.openSession();
  session.getTransaction().begin();
  session.save(msg);
  session.getTransaction().commit(); -- HERE!
 
 I have read something regarding OSGi having problems with Session - isn't
 this exactly that problem?
 
 Thanks! :)
 
 On Sun, Mar 22, 2009 at 2:10 AM, Brill Pappin br...@pappin.ca wrote:
 
 I'm assuming your using the 1.4 snapshot...

 I think that images will be relative to the component (or at least one if
 them up the tree).

 The image component uses a resource that will use the arc attribute to
 look
 for the images, so if the arc attribute is bogus, then one of the other
 methods of locating it better be correct.

 - Brill Pappin
  Sent from my mobile.


 On 21-Mar-09, at 5:29 PM, Daniel Dominik Holúbek dankodo...@gmail.com
 wrote:

  Ernesto, thank you very much :)
 If my application ever goes to the production, it will be thanks to you
 :)

 Regarding the images problem: I think I did not explain it well. I'm not
 asking where to place them. I placed them almost everywhere, but I still
 can't access them - in the bundle. You see, I have an images
 directory,
 and in HTML files, I am accessing them as img src=images/blah.jpg,
 but
 I
 still can't get this working. I am expecting only a hint - how are you
 doing
 this?

 And the database problem - I have the same application deployed as
 standard
 webapp, and there it works. I only wanted to know if it isn't some
 specific
 Wicket-Hibernate-OSGi problem you might have solved before :)

 But thank you all again!

 On Sat, Mar 21, 2009 at 6:06 PM, Brill Pappin br...@pappin.ca wrote:

  Yah, the whole argument about where the resources should go or the one
 before that about top posting or bottom posting.
 You'd think we didn't have any actual work to do :)

 - Brill


 On 21-Mar-09, at 12:39 PM, Ernesto Reinaldo Barreiro wrote:

 useless thread?


 On Sat, Mar 21, 2009 at 4:17 PM, Brill Pappin br...@pappin.ca wrote:

 At the risk of starting another useless thread, this is what I do for

 images and other non HTML resources that are shared:
 - if the project is small, they can just sit with the HTML.
 - if the project is larger then it might be useful to keep them more
 separate, under an images directory and use the base page to ref them
 or
 even create a loader to manage them.

 Ether way, you use them the same way, only prefix the resource name
 with
 the subdir if you have separated them out.

 As for your db error, that looks like something out side the scope of
 wicket.

 - Brill Pappin
 Sent from my mobile.



 On 21-Mar-09, at 9:38 AM, Daniel Dominik Holúbek dankodo...@gmail.co
 m
 wrote:

 Thanks a lot, it works now.

  However, two more questions. Where should I place images folder and
 how
 should I access it in my html files (or style.css as well)?
 And the second one: when i try to insert a record with hibernate
 into
 my
 database, i get this exception:

 Batch entry 0 insert into forum.anim_forum (autor, email, title,
 text,
 datum, ip, id) values (...) was aborted.

 and

 org.hibernate.exception.DataException: Could not execute JDBC batch
 update

 Could you (or possibly anyone else) help me with this? :)
 Thanks!

 On Fri, Mar 20, 2009 at 10:27 PM, Ernesto Reinaldo Barreiro 
 reier...@gmail.com wrote:

 One more thing. As far as I remember the servlet bridge makes a
 'work

  copy'
 of the plugins folder if you see you make changes, export the
 plugins,
 and
 changes do not 'propagate' to the application, try deleting
 works/Catalina
 folder.

 On Fri, Mar 20, 2009 at 9:58 PM, Ernesto Reinaldo Barreiro 
 reier...@gmail.com wrote:

 Hi Daniel,


 I found some time to get it working! The key to the problem was






 http://dev.eclipse.org/newslists/news.eclipse.technology.equinox/msg04838.html


  So, if you synchronize the projects

 com.antilia.wstarter
 com.antilia.wstarter.demo

 exports them to you bridge it should work. I  attach copy of
 bridge.zip,
 containing a bridge folder, which is working for me. If you unzip
 it
 to

 your


 tomcat webapps, restart tomcat and go to


 http://localhost:8080/bridge/demo-app/

 Then you should see the example working.

 Best,

 Ernesto


 On Fri, Mar 20, 2009 at 6:34 AM, Daniel Dominik Holúbek 
 dankodo...@gmail.com wrote:

 Right click - Export - Plugin development - Deployable plug-ins
 and

  fragments
 Have a nice day :)


Re: Wicket architecture diagram?

2009-03-26 Thread jWeekend

Subbu,

Thank you!
I have a quick minute now, so I thought you'd appreciate a few crumbs of
feedback before I can take a better look, hopefully late this evening.

0 - this is a great start!
1 - take out the LDM - this stretches the scope of the diagram beyond what
it needs to show.
2 - if the level of abstraction is at a level which includes
validators/converters etc (possibly form processing is better elaborated in
a child diagram) ... I think we need to mention FormComponent explicitly.

More soon, and I hope this will draw some comments from core devs and
application developers.

Regards - Cemal
http://jWeekend.com jWeekend 



subbu_tce wrote:
 
 Based on my understanding, i just prepared a diagram. 
 Wicket Contributors.. Please review and let me know your valuable
 feedback.
  http://www.nabble.com/file/p22717793/wicket%2Barchitecture.jpg 
 
 
 Thanks,
 Subbu.
 
 
 jWeekend wrote:
 
 Jeremy,
 
 It's one of the first things I looked for when I first stumbled upon
 Wicket 2 years ago, and it is a common request from many architects and
 even some project managers evaluating Wicket.
 
 If the core devs come up with some rough (but correct) sketch they're all
 agreed on, even if it's just a first iteration, I'll get someone here to
 create a professional (maybe even glossy) version from that.
 
 Regards - Cemal 
  http://jWeekend.com jWeekend 
 
 
 Jeremy Thomerson-5 wrote:
 
 Has anyone done a nice Wicket architecture diagram?  I know about the
 architecture chapter in WiA, but someone I know is looking for something
 more along the lines of:
 
 http://www.icesoft.com/developer_guides/icefaces/htmlguide/devguide/sys_architecture.html
 http://www.ociweb.com/jnb/jsfArchitecture.jpg
 
 Unfortunately, I'm no artist - so I can't help him much.  I was hoping
 someone had already done something similar as part of a presentation
 somewhere.
 
 --
 Jeremy Thomerson
 http://www.wickettraining.com
 
 
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Wicket-architecture-diagram--tp22683704p22720354.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



FormComponentPanel woes

2009-03-26 Thread triswork

Hi

I am getting really frustrated here because I can't figure out what I am
doing wrong. I am creating a new TextArea form component that is limited to
a particular number of characters. The trouble is, that my text area is
always rendered containing its own HTML.

Basically, I have:

public class LimitedTextArea extends FormComponentPanel implements
IHeaderContributor {
public LimitedTextArea(String id, IModel model, int limit) {
super(id, model);
TextArea textField = new TextArea(content, model);
add(textField);
...
}
}

And it is being called like this:
form.add(new LimitedTextArea(content, new PropertyModel(message,
content), 160));

And the TextArea always contains this text:
textarea id=content name=tabs:panel:form:content:text

This is driving me absolutely mad! Anyone have any ideas?
-- 
View this message in context: 
http://www.nabble.com/FormComponentPanel-woes-tp22720502p22720502.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: Dutch Wicket workshop?

2009-03-26 Thread Erik van Oosten

Hi Linda,

We will shortly start offering the jWeekend course in The Netherlands. 
See http://blog.jteam.nl/2009/03/24/jteam-announces-wicket-training/ for 
more information.


Regards,
   Erik.


Linda van der Pal wrote:
Triggered by the news of a London Wicket Event, I wondered if there is 
any (Dutch) Wicket guru who would like to give a workshop about 
Wicket? I am the founder and chairwoman of Duchess 
(http://jduchess.org) and we try to have workshops about five times a 
year. I've just started working with Wicket, and it would be cool to 
have a workshop about it.


A location can be arranged if necessary. We're a small foundation, so 
we can only offer a link on our sponsor page in recompense.


Regards,
Linda



--
Erik van Oosten
http://day-to-day-stuff.blogspot.com/



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



Re: FormComponentPanel woes

2009-03-26 Thread Linda van der Pal

Hi

Did you override onBeforeRender and convertInput?

Regards,
Linda

triswork wrote:

Hi

I am getting really frustrated here because I can't figure out what I am
doing wrong. I am creating a new TextArea form component that is limited to
a particular number of characters. The trouble is, that my text area is
always rendered containing its own HTML.

Basically, I have:

public class LimitedTextArea extends FormComponentPanel implements
IHeaderContributor {
public LimitedTextArea(String id, IModel model, int limit) {
super(id, model);
TextArea textField = new TextArea(content, model);
add(textField);
...
}
}

And it is being called like this:
form.add(new LimitedTextArea(content, new PropertyModel(message,
content), 160));

And the TextArea always contains this text:
textarea id=content name=tabs:panel:form:content:text

This is driving me absolutely mad! Anyone have any ideas?
  




No virus found in this incoming message.
Checked by AVG - www.avg.com 
Version: 8.5.278 / Virus Database: 270.11.29/2023 - Release Date: 03/25/09 18:54:00


  



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



Re: FormComponentPanel woes

2009-03-26 Thread Steve Flasby

shoudn't that be:

textarea wicket:id=content name=tabs:panel:form:content:text

or am I missing something?

Cheers - Steve


triswork wrote:

Hi

I am getting really frustrated here because I can't figure out what I am
doing wrong. I am creating a new TextArea form component that is limited to
a particular number of characters. The trouble is, that my text area is
always rendered containing its own HTML.

Basically, I have:

public class LimitedTextArea extends FormComponentPanel implements
IHeaderContributor {
public LimitedTextArea(String id, IModel model, int limit) {
super(id, model);
TextArea textField = new TextArea(content, model);
add(textField);
...
}
}

And it is being called like this:
form.add(new LimitedTextArea(content, new PropertyModel(message,
content), 160));

And the TextArea always contains this text:
textarea id=content name=tabs:panel:form:content:text

This is driving me absolutely mad! Anyone have any ideas?


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



Re: FormComponentPanel woes

2009-03-26 Thread triswork

Hi Linda,

No, I haven't :( 
I didn't realise I had to... Do you know where I can find some documentation
explaining this?

Thanks

T


Linda van der Pal wrote:
 
 Hi
 
 Did you override onBeforeRender and convertInput?
 
 Regards,
 Linda
 

-- 
View this message in context: 
http://www.nabble.com/FormComponentPanel-woes-tp22720502p22720806.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: FormComponentPanel woes

2009-03-26 Thread triswork

Sorry... That last bit isn't my markup. It is the text that is appearing in
my textarea component.
My markup looks like this:

wicket:panel
textarea id=content wicket:id=content/textarea
p class=note(Maximum characters: 100) /p
/wicket:panel

T


Steve Flasby wrote:
 
 shoudn't that be:
 
 textarea wicket:id=content name=tabs:panel:form:content:text
 
 or am I missing something?
 
 Cheers - Steve
 

-- 
View this message in context: 
http://www.nabble.com/FormComponentPanel-woes-tp22720502p22720956.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: FormComponentPanel woes

2009-03-26 Thread Linda van der Pal

I found it in the book Wicket in Action.

triswork wrote:

Hi Linda,

No, I haven't :( 
I didn't realise I had to... Do you know where I can find some documentation

explaining this?

Thanks

T


Linda van der Pal wrote:
  

Hi

Did you override onBeforeRender and convertInput?

Regards,
Linda




  




No virus found in this incoming message.
Checked by AVG - www.avg.com 
Version: 8.5.278 / Virus Database: 270.11.29/2023 - Release Date: 03/25/09 18:54:00


  



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



RE: FormComponentPanel woes

2009-03-26 Thread Stefan Lindner
textarea id=content name=tabs:panel:form:content:text
/textarea

Should do it

-Ursprüngliche Nachricht-
Von: triswork [mailto:tristan.k...@gmail.com] 
Gesendet: Donnerstag, 26. März 2009 13:14
An: users@wicket.apache.org
Betreff: Re: FormComponentPanel woes


Hi Linda,

No, I haven't :( 
I didn't realise I had to... Do you know where I can find some documentation
explaining this?

Thanks

T


Linda van der Pal wrote:
 
 Hi
 
 Did you override onBeforeRender and convertInput?
 
 Regards,
 Linda
 

-- 
View this message in context: 
http://www.nabble.com/FormComponentPanel-woes-tp22720502p22720806.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



Re: toString( ) and naming conventions in Component class

2009-03-26 Thread Johan Compagner
if you have a patch for better toString() impl be my guest and attach it to
jira

Those Changes classes are internal to component, they are inner classes of
Component so they dont have to specify that extra name..
Its just verbose. Also those 2 are protected final but i think they could be
private if you ask me.
So they are just internal

On Thu, Mar 26, 2009 at 02:49, Ricky ricky...@gmail.com wrote:

 Hi,

 This concerns Wicket Version : 1.4-rc2


 In componentModelChange class, we see the following :
@Override
public String toString()
{
return ComponentModelChange[component:  + getPath() + ];
}

 ComponentModelChange[ piece of it, in toString( ) shouldn't that be
 this.getClass().getSimpleName( ) + [ or something in those lines, I see
 that most of the component change classes are based on a format like that
 ... am i missing something? If we see the Behaviour Change code that
 follows
 , we use more dynamic this.getClass() to spit out toString( ); If I may
 ask,
 is the Behavior change toString ( ) and OtherChange format different by
 some
 agreeable convention ?  Also the toString( ) seems to be missing on
 ComponentBorderChange class.

 One more small observation, our naming conventions on Change class are
 inconsistent in many cases, for example, VisibilityChange and EnabledChange
 .. for what? question comes to mind, and the answer is component ... that
 to
 me infers that either it should be:
 1.) ChangeCOMPONENT extends Component
 if above is not acceptable, then
 2.) name it like ComponentEnabledChange or something in those lines?

 Just some thoughts.
 Sorry If questions have already been answered or are not appropriate,
 thought i'd ask the programming elites of wicket ;)

 Regards
 Vyas, Anirudh
 ||  ॐ  ||



Open Session in View Pattern: some basic questions

2009-03-26 Thread Kaspar Fischer
I am learning about the OSIV pattern and have so far read the  
introduction at hibernate.org [1], the Spring JavaDoc for  
OpenSessionInViewFilter [2], the excellent MysticCoders tutorial [3]  
that uses Spring's OpenSessionInViewFilter, and some more.


I have basic questions:

1. Is it correct that there are two variants of the pattern?

In one variant there is a single transaction (and a single session)  
that gets committed at the end of the request, as described in [1]. If  
I am not mistaken, James's wicket-advanced application [5] also uses  
this variant.


In the second variant, there is an intermediate commit. We therefore  
have two transactions (and one or two Hibernate sessions). Examples  
for this are WicketRAD and the London-Wicket PDF [4].


2. The first variant has the disadvantage that the code handling the  
request cannot handle errors itself as the commit takes place at the  
end of the request, in a filter. Correct?


As a concrete example, this means that if my code inserts an item that  
already exists and does not explicitly check for duplicates, the  
request will result in a rollback and the default error page. Where I  
would have preferred to see a feedback message This item already  
exists. (It seems to me, however, that it is not a good practice to  
move error checking concerns to the database integrity layer, so the  
code *should* check for duplicates...)


4. Which variant(s) doe Spring's OpenSessionInViewFilter support and  
how does it work?


I do not fully understand the documentation of the class but have the  
feeling it implements the second, and you can specify whether you want  
a single or two Hibernate sessions. I read [3]:


NOTE: This filter will by default not flush the Hibernate Session,  
with the flush mode set to FlushMode.NEVER. It assumes to be used in  
combination with service layer transactions that care for the  
flushing: The active transaction manager will temporarily change the  
flush mode to FlushMode.AUTO during a read-write transaction, with the  
flush mode reset toFlushMode.NEVER at the end of each transaction. If  
you intend to use this filter without transactions, consider changing  
the default flush mode (through the flushMode property).


Here is my understanding of this, assuming I have configured a Spring  
transaction manager and use transaction annotations:


When a request starts, a Hibernate session is opened. When the first  
method with a @Transactional annotation is encountered, a transaction  
is started, and Hibernate's session is associated with this  
transaction. When the method exits, the transaction is committed but  
the session is left open (the OSIV behaviour). At the end of the  
request, the session is closed. Is this correct?


Thanks for a reply and sorry for the lengthy post,
Kaspar

--
[1] http://www.hibernate.org/43.html
[2] 
http://static.springframework.org/spring/docs/2.5.x/api/org/springframework/orm/hibernate3/support/OpenSessionInViewFilter.html
[3] 
http://www.mysticcoders.com/blog/2009/03/13/5-days-of-wicket-putting-it-all-together/
[4] 
http://code.google.com/p/londonwicket/downloads/detail?name=LondonWicket-OpenSessionInView.pdfcan=2q=
[5] http://markmail.org/message/ittmrmwsn5l6usx7

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



Re: Open Session in View Pattern: some basic questions

2009-03-26 Thread James Carman
On Thu, Mar 26, 2009 at 8:31 AM, Kaspar Fischer fisch...@inf.ethz.ch wrote:
 1. Is it correct that there are two variants of the pattern?

 In one variant there is a single transaction (and a single session) that
 gets committed at the end of the request, as described in [1]. If I am not
 mistaken, James's wicket-advanced application [5] also uses this variant.

My example doesn't use that pattern (called transaction-per-request).
The OSIV filter in my example merely opens the session.  I rely on
@Transactional methods to begin/commit transactions for me.

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



RE: FormComponentPanel woes

2009-03-26 Thread triswork

Hi Stefan

You have completely lost me on this one. 
All I want to do is have my TextArea (contained within my
FormComponentPanel) to render properly without sticking arbitrary bits of
markup inside itself.
That markup you have quoted is being generated by Wicket - not by me :(


Stefan Lindner wrote:
 
 textarea id=content name=tabs:panel:form:content:text
 /textarea
 
 Should do it
 

Linda,

I don't have that book unfortunately. The javadocs do mention those two
methods, but it seems targeted at compound components. Mine is pretty
simple. I just want to decorate my textarea with some text and some
Javascript...


Linda van der Pal wrote:
 
 I found it in the book Wicket in Action.
 

-- 
View this message in context: 
http://www.nabble.com/FormComponentPanel-woes-tp22720502p22721375.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: FormComponentPanel woes

2009-03-26 Thread Stefan Lindner
I had the same problem some time ago an in my case it was the missing closing 
/textarea. An in your original post you had only

textarea id=content name=tabs:panel:form:content:text

Without closing /textarea.

So it could have been the problem.
I'm sorry if this was missleading you.

Stefan

-Ursprüngliche Nachricht-
Von: triswork [mailto:tristan.k...@gmail.com] 
Gesendet: Donnerstag, 26. März 2009 13:52
An: users@wicket.apache.org
Betreff: RE: FormComponentPanel woes


Hi Stefan

You have completely lost me on this one. 
All I want to do is have my TextArea (contained within my
FormComponentPanel) to render properly without sticking arbitrary bits of
markup inside itself.
That markup you have quoted is being generated by Wicket - not by me :(


Stefan Lindner wrote:
 
 textarea id=content name=tabs:panel:form:content:text
 /textarea
 
 Should do it
 

Linda,

I don't have that book unfortunately. The javadocs do mention those two
methods, but it seems targeted at compound components. Mine is pretty
simple. I just want to decorate my textarea with some text and some
Javascript...


Linda van der Pal wrote:
 
 I found it in the book Wicket in Action.
 

-- 
View this message in context: 
http://www.nabble.com/FormComponentPanel-woes-tp22720502p22721375.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



Re: FormComponentPanel woes

2009-03-26 Thread Linda van der Pal
quote: To keep the models of the nested components and the top 
component synchronized,
we need to override two methods: onBeforeRender, which prepares for 
rendering,

and convertInput, which handles receiving input.

So your code would become something like this:

public class LimitedTextArea extends FormComponentPanel implements
IHeaderContributor {
*private String text;
private TextArea textField;
*public LimitedTextArea(String id, IModel model, int limit) {
   super(id, model);
*   PropertyModel textModel = new PropertyModel(this, text);*
   *textField *= new TextArea(content, *textModel*);
   add(textField);
   ...
   }

*...@override   
public void onBeforeRender() {
text = (String) getModelObject();
super.onBeforeRender();
}

@Override
public void convertInput() {
String text = (String) textField.getConvertedInput();
setConvertedInput(text);
}

*}


Mind you, I'm a newbie too, so this is what I got from the book. (And 
for your example I haven't checked if it works.)


Linda

triswork wrote:

Hi Stefan

You have completely lost me on this one. 
All I want to do is have my TextArea (contained within my

FormComponentPanel) to render properly without sticking arbitrary bits of
markup inside itself.
That markup you have quoted is being generated by Wicket - not by me :(


Stefan Lindner wrote:
  

textarea id=content name=tabs:panel:form:content:text
/textarea

Should do it




Linda,

I don't have that book unfortunately. The javadocs do mention those two
methods, but it seems targeted at compound components. Mine is pretty
simple. I just want to decorate my textarea with some text and some
Javascript...


Linda van der Pal wrote:
  

I found it in the book Wicket in Action.




  




No virus found in this incoming message.
Checked by AVG - www.avg.com 
Version: 8.5.278 / Virus Database: 270.11.29/2023 - Release Date: 03/25/09 18:54:00


  




Re: FormComponentPanel woes

2009-03-26 Thread Linda van der Pal
Arg, I wanted to make my changes bold. But now I see stars. Not sure if 
you get those too, but if you do: leave out the stars :)


Linda van der Pal wrote:
quote: To keep the models of the nested components and the top 
component synchronized,
we need to override two methods: onBeforeRender, which prepares for 
rendering,

and convertInput, which handles receiving input.

So your code would become something like this:

public class LimitedTextArea extends FormComponentPanel implements
IHeaderContributor {
*private String text;
private TextArea textField;
*public LimitedTextArea(String id, IModel model, int limit) {
   super(id, model);
*PropertyModel textModel = new PropertyModel(this, text);*
   *textField *= new TextArea(content, *textModel*);
   add(textField);
   ...
   }

*...@override   
public void onBeforeRender() {

text = (String) getModelObject();
super.onBeforeRender();
}

@Override
public void convertInput() {
String text = (String) textField.getConvertedInput();
setConvertedInput(text);
}

*}


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



Fwd: Question on LinkTree implementation

2009-03-26 Thread Ajayi Yinka
i will appreciate anyone that can help me look into this problem. I think I
lack the knowledge on proper implementation on ListTree.

I had surfed the net, I couldn't find something that could be of help.

Please,  could anyone help me out.

-- Forwarded message --
From: Ajayi Yinka iamstyaj...@googlemail.com
Date: Thu, Mar 26, 2009 at 9:32 AM
Subject: Fwd: Question on LinkTree implementation
To: users@wicket.apache.org


I found out that if no node is added to the node1, The onclick method works
as supposed.

But if I try to add one sub-node to it, I begin to have the same type of
error as below.

I am sure there is a problem somewhere that I have not been able to trace (I
am a new to wicket framework). Could anyoen help me out.

Thanks



-- Forwarded message --
From: Ajayi Yinka iamstyaj...@googlemail.com
Date: Thu, Mar 26, 2009 at 8:34 AM
Subject: Question on LinkTree implementation
To: users@wicket.apache.org




hi all,

I am having problems in implementing LinkTree in my page.

I use to get the component not found exception (

WicketMessage: close tag not found for tag: ul id=node11
wicket:id=node1. Component: [MarkupContainer [Component id = node1]]

Root cause:

org.apache.wicket.markup.MarkupException: close tag not found for tag: ul
id=node11 wicket:id=node1. Component: [MarkupContainer [Component id =
node1]]
at
org.apache.wicket.markup.html.panel.Panel.onComponentTagBody(Panel.java:121)
at org.apache.wicket.Component.renderComponent(Component.java:2480)
at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1411)
at org.apache.wicket.Component.render(Component.java:2317)
at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1297)
at
org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1476)
at
org.apache.wicket.MarkupContainer.renderAssociatedMarkup(MarkupContainer.java:639)
at
org.apache.wicket.markup.html.panel.Panel.onComponentTagBody(Panel.java:112)
at org.apache.wicket.Component.renderComponent(Component.java:2480)
at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1411)
at org.apache.wicket.Component.render(Component.java:2317)
at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1297)
at org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1427)
at org.apache.wicket.Page.onRender(Page.java:1470)
at org.apache.wicket.Component.render(Component.java:2317)
at org.apache.wicket.Page.renderPage(Page.java:904)
at
org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:231)
at
org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:104)
at
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1181)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1252)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1353)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:355)
at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:200)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:250)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:218)
at
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:250)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:218)
at
org.apache.catalina.core.StandardWrapperValve.preInvoke(StandardWrapperValve.java:460)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:139)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:186)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:719)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:657)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:96)
at
com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:98)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:187)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:719)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:657)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:651)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1030)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:142)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:719)
at

Re: FormComponentPanel woes

2009-03-26 Thread triswork

Thanks Linda,

That was very helpful.
I also figured out that I am a complete cretin... I forgot to replace the
textarea tags with  tags in my original markup (where I replaced the
TextArea with my LimitedTextArea *sigh*). At least that explains why I was
getting weird content all the time :)

T


Linda van der Pal wrote:
 
 Arg, I wanted to make my changes bold. But now I see stars. Not sure if 
 you get those too, but if you do: leave out the stars :)
 

-- 
View this message in context: 
http://www.nabble.com/FormComponentPanel-woes-tp22720502p22721785.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: Extensible wicket application

2009-03-26 Thread Daniel Dominik Holúbek
Your application works, but it seems a bit complicated to me :)
I would like to know the exact exception, but I do not know how, it tells me
to call getNextException to see the cause, but ho do I do that?

Have a nice day!

On Thu, Mar 26, 2009 at 12:22 PM, reiern70 reier...@gmail.com wrote:


 Can you provide an stack trace or some more info? Is this happening when
 you
 run your application in eclipse or just on the bridge setting? Right now
 I'm
 using hibernate+OSGi on some project and it works just fine... provided
 Hibernate can load you entity classes by name.

 Best,

 Ernesto


 Daniel Dominik Holúbek wrote:
 
  Hi,
  I'm still trying to solve the database problem...
  I think it could be useful to mention, that I get an exception at these
  lines:
 
  HibernateTemplate ht = new HibernateTemplate(sessionFactory);
  ht.save(msg); -- HERE!
 
  and if I change the code to this:
 
  Session session = sessionFactory.openSession();
   session.getTransaction().begin();
   session.save(msg);
   session.getTransaction().commit(); -- HERE!
 
  I have read something regarding OSGi having problems with Session - isn't
  this exactly that problem?
 
  Thanks! :)
 
  On Sun, Mar 22, 2009 at 2:10 AM, Brill Pappin br...@pappin.ca wrote:
 
  I'm assuming your using the 1.4 snapshot...
 
  I think that images will be relative to the component (or at least one
 if
  them up the tree).
 
  The image component uses a resource that will use the arc attribute to
  look
  for the images, so if the arc attribute is bogus, then one of the other
  methods of locating it better be correct.
 
  - Brill Pappin
   Sent from my mobile.
 
 
  On 21-Mar-09, at 5:29 PM, Daniel Dominik Holúbek dankodo...@gmail.com
  wrote:
 
   Ernesto, thank you very much :)
  If my application ever goes to the production, it will be thanks to you
  :)
 
  Regarding the images problem: I think I did not explain it well. I'm
 not
  asking where to place them. I placed them almost everywhere, but I
 still
  can't access them - in the bundle. You see, I have an images
  directory,
  and in HTML files, I am accessing them as img src=images/blah.jpg,
  but
  I
  still can't get this working. I am expecting only a hint - how are you
  doing
  this?
 
  And the database problem - I have the same application deployed as
  standard
  webapp, and there it works. I only wanted to know if it isn't some
  specific
  Wicket-Hibernate-OSGi problem you might have solved before :)
 
  But thank you all again!
 
  On Sat, Mar 21, 2009 at 6:06 PM, Brill Pappin br...@pappin.ca wrote:
 
   Yah, the whole argument about where the resources should go or the one
  before that about top posting or bottom posting.
  You'd think we didn't have any actual work to do :)
 
  - Brill
 
 
  On 21-Mar-09, at 12:39 PM, Ernesto Reinaldo Barreiro wrote:
 
  useless thread?
 
 
  On Sat, Mar 21, 2009 at 4:17 PM, Brill Pappin br...@pappin.ca
 wrote:
 
  At the risk of starting another useless thread, this is what I do for
 
  images and other non HTML resources that are shared:
  - if the project is small, they can just sit with the HTML.
  - if the project is larger then it might be useful to keep them more
  separate, under an images directory and use the base page to ref
 them
  or
  even create a loader to manage them.
 
  Ether way, you use them the same way, only prefix the resource name
  with
  the subdir if you have separated them out.
 
  As for your db error, that looks like something out side the scope
 of
  wicket.
 
  - Brill Pappin
  Sent from my mobile.
 
 
 
  On 21-Mar-09, at 9:38 AM, Daniel Dominik Holúbek 
 dankodo...@gmail.co
  m
  wrote:
 
  Thanks a lot, it works now.
 
   However, two more questions. Where should I place images folder and
  how
  should I access it in my html files (or style.css as well)?
  And the second one: when i try to insert a record with hibernate
  into
  my
  database, i get this exception:
 
  Batch entry 0 insert into forum.anim_forum (autor, email, title,
  text,
  datum, ip, id) values (...) was aborted.
 
  and
 
  org.hibernate.exception.DataException: Could not execute JDBC batch
  update
 
  Could you (or possibly anyone else) help me with this? :)
  Thanks!
 
  On Fri, Mar 20, 2009 at 10:27 PM, Ernesto Reinaldo Barreiro 
  reier...@gmail.com wrote:
 
  One more thing. As far as I remember the servlet bridge makes a
  'work
 
   copy'
  of the plugins folder if you see you make changes, export the
  plugins,
  and
  changes do not 'propagate' to the application, try deleting
  works/Catalina
  folder.
 
  On Fri, Mar 20, 2009 at 9:58 PM, Ernesto Reinaldo Barreiro 
  reier...@gmail.com wrote:
 
  Hi Daniel,
 
 
  I found some time to get it working! The key to the problem was
 
 
 
 
 
 
 
 http://dev.eclipse.org/newslists/news.eclipse.technology.equinox/msg04838.html
 
 
   So, if you synchronize the projects
 
  com.antilia.wstarter
  com.antilia.wstarter.demo
 
  exports them to you bridge it 

Re: best way to add tooltips in wicket

2009-03-26 Thread Roman Zechner

have a look at sweet titles

http://www.dustindiaz.com/sweet-titles/

James Carman wrote:

If you're interested in using static tooltips that are styled, we've
had good luck with overlib.

On Thu, Mar 26, 2009 at 5:34 AM, RoyBatty math...@afjochnick.net wrote:
  

Right, thanks for all the input.

I did try mootips now, and they both work fine. One thing i noticed, though,
was that mootips seemed to glich more than prototips, i.e. i seems more
performance-heavy? Am i imagining this? :) (i'm setting the mootip up as in
the example)

Currently we have no need for ajax-fetched tooltips, but i guess it's good
to use the one that has the functionality.



nino martinez wael wrote:


Yeah there are dozens of ways doing it easy with static tooltips.. But
if you want easy ajax tooltips, mootip are the only way with wicket
right now I believe. Especially because they are truly dynamic.

And im not saying mootip are the best, it was just the only one (at
the time and which I found) which fitted good with wicket ajax.

  

--
View this message in context: 
http://www.nabble.com/best-way-to-add-tooltips-in-wicket-tp22697930p22718604.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

  


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



Re: TextField setPersistent is not remembering emails, only the username part of them

2009-03-26 Thread Jeremy2009

Hi,

The spec. for
http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/http/Cookie.html#setValue(java.lang.String)
says it cannot include '@' so the value needs to be encoded/escaped before
storing.

Problem is i can't see any easy way to add this functionality without taking
my own copies of CookieValuePersister and parent calling classes OR to find
a place where I can encode/escape the textfield's model in time before it's
stored.

I found this entry:
http://www.nabble.com/Related-to%3A---1531861---CookieValuePersister-support-more-encoding-td5891998.html#a5891998
but i can't see where it's been applied to the class...

Anyone got any ideas?

Cheers
Jeremy


fafa wrote:
 
 Hi there!
 
 First of all, i am a newbie, and I might be all the way wrong, but, I
 cannot think of any other alternative than ask you guys. Sorry if this is
 a sd question. :-$
 
 I am using the lastest rc of wicket
   wicket.version1.4-rc2/wicket.version
 and using as a reference the SignIn panel provided by the examples (done
 for 1.3.4).
 
 I change the idea from username to email. Nowaday nobody uses a username
 but to access an email.
 
 I cannot make it remeber the entire email, it is just remembering the
 username (the part to the left of the @) I checked everything: 
 - cookies (by using liveheader plugin of firefox i know that the cookie is
 well setted; why wicket is cuting a part of the string?)
 - disabling generics
 
 Is it possible to be a problem with the rc2?
 
 I am lost, please help.
 

-- 
View this message in context: 
http://www.nabble.com/TextField-setPersistent-is-not-remembering-emails%2C-only-the-username-part-of-them-tp22686406p22724185.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: best way to add tooltips in wicket

2009-03-26 Thread RoyBatty

Allright... i don't think i fetch it with ajax, but it doesn't matter. 

One other thing though - i couldn't see that it was possible to create a
MooTip without a header, is that so? I couldn't see that there was a way to
set the addTitle boolean to false.

nino martinez wael wrote:
 
 There's some settings in regard to the glitch thing I think a timer or
 something I think, but this is only in regard when using ajax..
 
 regards
 
 2009/3/26 RoyBatty math...@afjochnick.net:

 Right, thanks for all the input.

 I did try mootips now, and they both work fine. One thing i noticed,
 though,
 was that mootips seemed to glich more than prototips, i.e. i seems more
 performance-heavy? Am i imagining this? :) (i'm setting the mootip up as
 in
 the example)

 Currently we have no need for ajax-fetched tooltips, but i guess it's
 good
 to use the one that has the functionality.



 nino martinez wael wrote:

 Yeah there are dozens of ways doing it easy with static tooltips.. But
 if you want easy ajax tooltips, mootip are the only way with wicket
 right now I believe. Especially because they are truly dynamic.

 And im not saying mootip are the best, it was just the only one (at
 the time and which I found) which fitted good with wicket ajax.


 --
 View this message in context:
 http://www.nabble.com/best-way-to-add-tooltips-in-wicket-tp22697930p22718604.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
 
 
 

-- 
View this message in context: 
http://www.nabble.com/best-way-to-add-tooltips-in-wicket-tp22697930p22724402.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: toString( ) and naming conventions in Component class

2009-03-26 Thread Ricky
thanks, i'll create a JIRA issue and submit a patch tonight, appreciate your
time!

On Thu, Mar 26, 2009 at 8:31 AM, Johan Compagner jcompag...@gmail.comwrote:

 if you have a patch for better toString() impl be my guest and attach it to
 jira

 Those Changes classes are internal to component, they are inner classes of
 Component so they dont have to specify that extra name..
 Its just verbose. Also those 2 are protected final but i think they could
 be
 private if you ask me.
 So they are just internal

 On Thu, Mar 26, 2009 at 02:49, Ricky ricky...@gmail.com wrote:

  Hi,
 
  This concerns Wicket Version : 1.4-rc2
 
 
  In componentModelChange class, we see the following :
 @Override
 public String toString()
 {
 return ComponentModelChange[component:  + getPath() + ];
 }
 
  ComponentModelChange[ piece of it, in toString( ) shouldn't that be
  this.getClass().getSimpleName( ) + [ or something in those lines, I see
  that most of the component change classes are based on a format like that
  ... am i missing something? If we see the Behaviour Change code that
  follows
  , we use more dynamic this.getClass() to spit out toString( ); If I may
  ask,
  is the Behavior change toString ( ) and OtherChange format different by
  some
  agreeable convention ?  Also the toString( ) seems to be missing on
  ComponentBorderChange class.
 
  One more small observation, our naming conventions on Change class are
  inconsistent in many cases, for example, VisibilityChange and
 EnabledChange
  .. for what? question comes to mind, and the answer is component ... that
  to
  me infers that either it should be:
  1.) ChangeCOMPONENT extends Component
  if above is not acceptable, then
  2.) name it like ComponentEnabledChange or something in those lines?
 
  Just some thoughts.
  Sorry If questions have already been answered or are not appropriate,
  thought i'd ask the programming elites of wicket ;)
 
  Regards
  Vyas, Anirudh
  ||  ॐ  ||
 




-- 

Regards
Vyas, Anirudh
||  ॐ  ||


Link not getting onclick event

2009-03-26 Thread Seven Corners

I have link that is not receiving an onclick event.  It links to a page in my
application, and I do not want it bookmarkable.  It's in a RefreshingView. 
The browser renders the link with the correct style for a link, but if you
hover over the link, you don't get the URL to show up in the status bar.  So
something is very whacked.

The HTML looks like this:

...
  table
  tr wicket:id=snmpSubscription
td wicket:id=trapIdCell  /td
...


and the code is like this:

private class SNMPTrapEventSubscriptionView extends
RefreshingViewSNMPTrapEventSubscriptionBean
{
...
@Override
protected void populateItem( ItemSNMPTrapEventSubscriptionBean
item )
{
final SNMPTrapEventSubscriptionBean bean =
item.getModelObject();

WebMarkupContainer cell = new WebMarkupContainer( trapIdCell
);
Link snmpLink = new Link( snmpLink )
{
private static final long serialVersionUID = 1L;

@Override
public void onClick()
{
-- we never gettry 
here{
PageParameters params = new PageParameters();
params.add( SettingsPage.kbMANAGE_SNMP,
Boolean.toString( true ) );  
params.add( SettingsPage.kiSUBSCRIPTION_ID,
Integer.toString( bean.getId() ) );

EventSubscriptionsPanel.this.setResponsePage(
SettingsPage.class, params );
}   
catch( Throwable t )
{
logger.error( t.getMessage(), t );
}
}
};
snmpLink.add( new Label( id ) );
cell.add( snmpLink );
item.add( cell );
...

Place a breakpoint in the onClick() handler and we never get there.  In the
browser, the anchor text shows up blue, indicating that the browser knows
it's a link, but you click on it and nothing happens.  In the HTML output,
this is the link's href:

href=?wicket:interface=:4:rightHandContentPanel:tabs:panel:tableWrapper:snmpSubscription:3:trapIdCell:snmpLink::ILinkListener::

It doesn't look like the href has the right class but I don't know.

The model is a CompoundPropertyModel of my SNMPTrapEventSubscriptionBean
bean; I had a provider that's a
LoadableDetachableModelListSNMPTrapEventSubscriptionBean, and I load a
list of data from the server.  I am getting accurate data; it's the link
that isn't working.

Anyone have a clue what I'm doing wrong?

Thanks in advance.

 
-- 
View this message in context: 
http://www.nabble.com/Link-not-getting-onclick-event-tp22725492p22725492.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



nested loop view

2009-03-26 Thread Luther Baker
I'm trying to create a page - similar to Jira's BROWSE PROJECTS.

My initial take amounts to a loop in a loop.

The outer loop is CATEGORIES and the inner loop is PROJECTS in said
category.

| CATEGORY 1
| p1
| p2
| p3

| CATEGORY 2
| p4
| p5
| p6

...

I've attached code below but if I removed the nested loop, I can easily loop
over just CATEGORIES but as soon as I add the nested loop, it fails with the
following

WicketMessage: Error attaching this container for rendering: [Page class =
com.fuzzybearings.milestones.web.page.user.ProjectsPage, id = 3, version =
0]

Root cause:

java.lang.IllegalArgumentException: A child with id 'projects' already
exists:
[MarkupContainer [Component id = categories]]


My intuition tells me that 'wicket:id=projects' is repeating since it is
contained in an outer loop ... but I'm not sure how else to identify this
type of structure in a general way. Is there a loop container more suited to
this ... open to suggestions.

Thanks in advance,

-Luther



*.html snippet

div wicket:id=categories
table
tr wicket:id=projects
tda wicket:id=projectLink href=#span
wicket:id=projectLabel[project]/span/a/td
/tr
/table
/div


*.java snippet

public ProjectsPage(ResourceModel bodyTitle)
{
super(bodyTitle);

ListView categories = new ListView(categories,
this.getCategories())
{

@Override
protected void populateItem(ListItem item)
{
Category category = (Category) item.getModelObject();

ListView projects = new ListView(projects,
ProjectsPage.this.getProjects(category))
{

@Override
protected void populateItem(ListItem item)
{
Project project = (Project) item.getModelObject();
Link link = new Link(projectLink, item.getModel())
{

@Override
public void onClick() { ... }
};
link.add(new Label(projectLabel,
project.getName()));
item.add(link);
}
};
this.add(projects);
}
};
this.add(categories);
}


How to secure a Wicket 1.4 application?

2009-03-26 Thread Christian Helmbold

Hello,

what would be your prefered way to secure a Wicket 1.4 application? 

Spring Security and Wicket-auth-roles seems to be outdated. This project 
suggests to use Wicket-Security. So it is presumably not the best idea to use 
it.
http://cwiki.apache.org/WICKET/spring-security-and-wicket-auth-roles.html

Wicket-Security seems also to be not up to date and supports only Wicket 1.3. 
http://wicketstuff.org/confluence/display/STUFFWIKI/Wicket-Security
Somewhere I've read that a version of Wicket-Security for Wicket 1.4 exists in 
a SVN repository. Maybe that makes Wicket-Security a candidate. But this 
framework looks quite complicated to me - WiComSec, WASP, Hive, SWARM sounds 
confusing. Is Wicket-Security limited to use JAAS permissions?
http://wicketstuff.org/confluence/display/STUFFWIKI/Getting+started+with+Swarm
I don't like JAAS very much ...

My first impression is, that it is easier to write custom authentication and 
authorization, than to use Wicket-Security. How are your experiences?

Regards
Christian





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



Can client cache pages effectively?

2009-03-26 Thread Jim Pinkham
I've found a few posts about how to mark dynamic pages so they won't be
cached.

I've got a different situation that I think is fairly common - the 'home'
page of my app is effectively a (cheesr-like) catalog of items that changes
infrequently.   Users didn't like paging, so it's about 300 items in a
simple scrollable page.  Once a user views it, they often drill down into an
item, then use the back button (or sometimes the Home link) to re-display
it.

The db query is actually pretty fast; I think the bottleneck seems to be
fetching the HTML.

My question is, can I use some kind of header caching hint with a version
number so that once the content is identified as being the same as a
previously fetched page, the user's browser will repaint it from a local
cache?  (I know this is typically done with images, but I was wondering if
this would make sense to do also do with content that technically 'dynamic'
but actually is 'fairly static' ?   (I say version number rather than time
to expire so that in case I add/change an item I can increment the catalog
version)

Thanks,
-- Jim


Re: nested loop view

2009-03-26 Thread Olivier Michallat
I think you have to add projects to the current category item, not
to this (which would refer to the categories listview itself).

So try replacing:
   this.add(projects);
By:
   item.add(projects);

2009/3/26 Luther Baker lutherba...@gmail.com:
 I'm trying to create a page - similar to Jira's BROWSE PROJECTS.

 My initial take amounts to a loop in a loop.

 The outer loop is CATEGORIES and the inner loop is PROJECTS in said
 category.

 | CATEGORY 1
 | p1
 | p2
 | p3

 | CATEGORY 2
 | p4
 | p5
 | p6

 ...

 I've attached code below but if I removed the nested loop, I can easily loop
 over just CATEGORIES but as soon as I add the nested loop, it fails with the
 following

 WicketMessage: Error attaching this container for rendering: [Page class =
 com.fuzzybearings.milestones.web.page.user.ProjectsPage, id = 3, version =
 0]

 Root cause:

 java.lang.IllegalArgumentException: A child with id 'projects' already
 exists:
 [MarkupContainer [Component id = categories]]


 My intuition tells me that 'wicket:id=projects' is repeating since it is
 contained in an outer loop ... but I'm not sure how else to identify this
 type of structure in a general way. Is there a loop container more suited to
 this ... open to suggestions.

 Thanks in advance,

 -Luther



 *.html snippet

        div wicket:id=categories
        table
            tr wicket:id=projects
                tda wicket:id=projectLink href=#span
 wicket:id=projectLabel[project]/span/a/td
            /tr
        /table
        /div


 *.java snippet

    public ProjectsPage(ResourceModel bodyTitle)
    {
        super(bodyTitle);

        ListView categories = new ListView(categories,
 this.getCategories())
        {

           �...@override
            protected void populateItem(ListItem item)
            {
                Category category = (Category) item.getModelObject();

                ListView projects = new ListView(projects,
 ProjectsPage.this.getProjects(category))
                {

                   �...@override
                    protected void populateItem(ListItem item)
                    {
                        Project project = (Project) item.getModelObject();
                        Link link = new Link(projectLink, item.getModel())
                        {

                           �...@override
                            public void onClick() { ... }
                        };
                        link.add(new Label(projectLabel,
 project.getName()));
                        item.add(link);
                    }
                };
                this.add(projects);
            }
        };
        this.add(categories);
    }


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



Re: nested loop view

2009-03-26 Thread Jonathan Locke


i think you mean to add the projects listview to the categories list view
/item/

your structure is a little dangerous here because you have one ListItem item
obscuring the other. if the outer one were called outerItem and the inner
one 
were called innerItem, i think you meant to say outerItem.add(projects) and 
innerItem.add(link)


luther.baker wrote:
 
 I'm trying to create a page - similar to Jira's BROWSE PROJECTS.
 
 My initial take amounts to a loop in a loop.
 
 The outer loop is CATEGORIES and the inner loop is PROJECTS in said
 category.
 
 | CATEGORY 1
 | p1
 | p2
 | p3
 
 | CATEGORY 2
 | p4
 | p5
 | p6
 
 ...
 
 I've attached code below but if I removed the nested loop, I can easily
 loop
 over just CATEGORIES but as soon as I add the nested loop, it fails with
 the
 following
 
 WicketMessage: Error attaching this container for rendering: [Page class =
 com.fuzzybearings.milestones.web.page.user.ProjectsPage, id = 3, version =
 0]
 
 Root cause:
 
 java.lang.IllegalArgumentException: A child with id 'projects' already
 exists:
 [MarkupContainer [Component id = categories]]
 
 
 My intuition tells me that 'wicket:id=projects' is repeating since it is
 contained in an outer loop ... but I'm not sure how else to identify this
 type of structure in a general way. Is there a loop container more suited
 to
 this ... open to suggestions.
 
 Thanks in advance,
 
 -Luther
 
 
 
 *.html snippet
 
 div wicket:id=categories
 table
 tr wicket:id=projects
 td # [project] /td
 /tr
 /table
 /div
 
 
 *.java snippet
 
 public ProjectsPage(ResourceModel bodyTitle)
 {
 super(bodyTitle);
 
 ListView categories = new ListView(categories,
 this.getCategories())
 {
 
 @Override
 protected void populateItem(ListItem item)
 {
 Category category = (Category) item.getModelObject();
 
 ListView projects = new ListView(projects,
 ProjectsPage.this.getProjects(category))
 {
 
 @Override
 protected void populateItem(ListItem item)
 {
 Project project = (Project) item.getModelObject();
 Link link = new Link(projectLink,
 item.getModel())
 {
 
 @Override
 public void onClick() { ... }
 };
 link.add(new Label(projectLabel,
 project.getName()));
 item.add(link);
 }
 };
 this.add(projects);
 }
 };
 this.add(categories);
 }
 
 

-- 
View this message in context: 
http://www.nabble.com/nested-loop-view-tp22726252p22726455.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: nested loop view

2009-03-26 Thread Jonathan Locke


uh, well maybe not dangerous, just less clear than it could be.


Jonathan Locke wrote:
 
 
 i think you mean to add the projects listview to the categories list view
 /item/
 
 your structure is a little dangerous here because you have one ListItem
 item
 obscuring the other. if the outer one were called outerItem and the inner
 one 
 were called innerItem, i think you meant to say outerItem.add(projects)
 and 
 innerItem.add(link)
 
 
 luther.baker wrote:
 
 I'm trying to create a page - similar to Jira's BROWSE PROJECTS.
 
 My initial take amounts to a loop in a loop.
 
 The outer loop is CATEGORIES and the inner loop is PROJECTS in said
 category.
 
 | CATEGORY 1
 | p1
 | p2
 | p3
 
 | CATEGORY 2
 | p4
 | p5
 | p6
 
 ...
 
 I've attached code below but if I removed the nested loop, I can easily
 loop
 over just CATEGORIES but as soon as I add the nested loop, it fails with
 the
 following
 
 WicketMessage: Error attaching this container for rendering: [Page class
 =
 com.fuzzybearings.milestones.web.page.user.ProjectsPage, id = 3, version
 =
 0]
 
 Root cause:
 
 java.lang.IllegalArgumentException: A child with id 'projects' already
 exists:
 [MarkupContainer [Component id = categories]]
 
 
 My intuition tells me that 'wicket:id=projects' is repeating since it
 is
 contained in an outer loop ... but I'm not sure how else to identify this
 type of structure in a general way. Is there a loop container more suited
 to
 this ... open to suggestions.
 
 Thanks in advance,
 
 -Luther
 
 
 
 *.html snippet
 
 div wicket:id=categories
 table
 tr wicket:id=projects
 td # [project] /td
 /tr
 /table
 /div
 
 
 *.java snippet
 
 public ProjectsPage(ResourceModel bodyTitle)
 {
 super(bodyTitle);
 
 ListView categories = new ListView(categories,
 this.getCategories())
 {
 
 @Override
 protected void populateItem(ListItem item)
 {
 Category category = (Category) item.getModelObject();
 
 ListView projects = new ListView(projects,
 ProjectsPage.this.getProjects(category))
 {
 
 @Override
 protected void populateItem(ListItem item)
 {
 Project project = (Project)
 item.getModelObject();
 Link link = new Link(projectLink,
 item.getModel())
 {
 
 @Override
 public void onClick() { ... }
 };
 link.add(new Label(projectLabel,
 project.getName()));
 item.add(link);
 }
 };
 this.add(projects);
 }
 };
 this.add(categories);
 }
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/nested-loop-view-tp22726252p22726482.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



Equivalent of StackPanel for Wicket

2009-03-26 Thread HHB

Hey,
I want to employ something like StackPanel of GWT in my Wicket application.
Any production ready component?
Thanks for help and time. 
-- 
View this message in context: 
http://www.nabble.com/Equivalent-of-StackPanel-for-Wicket-tp22726615p22726615.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: Wicket architecture diagram?

2009-03-26 Thread Jeremy Thomerson
While I agree that you could take out LDM specifically, I really think that
you should replace it with IModel - I think it is critical to show that
IModel is the abstraction between a component and where it gets it's data.
This is the number one misundertstood thing that I find among those I teach.

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



On Thu, Mar 26, 2009 at 6:44 AM, jWeekend jweekend_for...@cabouge.comwrote:


 Subbu,

 Thank you!
 I have a quick minute now, so I thought you'd appreciate a few crumbs of
 feedback before I can take a better look, hopefully late this evening.

 0 - this is a great start!
 1 - take out the LDM - this stretches the scope of the diagram beyond what
 it needs to show.
 2 - if the level of abstraction is at a level which includes
 validators/converters etc (possibly form processing is better elaborated in
 a child diagram) ... I think we need to mention FormComponent explicitly.

 More soon, and I hope this will draw some comments from core devs and
 application developers.

 Regards - Cemal
 http://jWeekend.com jWeekend



 subbu_tce wrote:
 
  Based on my understanding, i just prepared a diagram.
  Wicket Contributors.. Please review and let me know your valuable
  feedback.
   http://www.nabble.com/file/p22717793/wicket%2Barchitecture.jpg
 
 
  Thanks,
  Subbu.
 
 
  jWeekend wrote:
 
  Jeremy,
 
  It's one of the first things I looked for when I first stumbled upon
  Wicket 2 years ago, and it is a common request from many architects and
  even some project managers evaluating Wicket.
 
  If the core devs come up with some rough (but correct) sketch they're
 all
  agreed on, even if it's just a first iteration, I'll get someone here to
  create a professional (maybe even glossy) version from that.
 
  Regards - Cemal
   http://jWeekend.com jWeekend
 
 
  Jeremy Thomerson-5 wrote:
 
  Has anyone done a nice Wicket architecture diagram?  I know about the
  architecture chapter in WiA, but someone I know is looking for
 something
  more along the lines of:
 
 
 http://www.icesoft.com/developer_guides/icefaces/htmlguide/devguide/sys_architecture.html
  http://www.ociweb.com/jnb/jsfArchitecture.jpg
 
  Unfortunately, I'm no artist - so I can't help him much.  I was hoping
  someone had already done something similar as part of a presentation
  somewhere.
 
  --
  Jeremy Thomerson
  http://www.wickettraining.com
 
 
 
 
 
 

 --
 View this message in context:
 http://www.nabble.com/Wicket-architecture-diagram--tp22683704p22720354.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: nested loop view

2009-03-26 Thread Luther Baker
Ahh ... but of course!

Thanks both of you. The nested structure did indeed obscure the problem.

Fixed and refactored a bit - and now working as expected.

Thanks for your time!

-Luther



On Thu, Mar 26, 2009 at 12:01 PM, Jonathan Locke
jonathan.lo...@gmail.comwrote:



 uh, well maybe not dangerous, just less clear than it could be.


 Jonathan Locke wrote:
 
 
  i think you mean to add the projects listview to the categories list view
  /item/
 
  your structure is a little dangerous here because you have one ListItem
  item
  obscuring the other. if the outer one were called outerItem and the inner
  one
  were called innerItem, i think you meant to say outerItem.add(projects)
  and
  innerItem.add(link)
 
 
  luther.baker wrote:
 
  I'm trying to create a page - similar to Jira's BROWSE PROJECTS.
 
  My initial take amounts to a loop in a loop.
 
  The outer loop is CATEGORIES and the inner loop is PROJECTS in said
  category.
 
  | CATEGORY 1
  | p1
  | p2
  | p3
 
  | CATEGORY 2
  | p4
  | p5
  | p6
 
  ...
 
  I've attached code below but if I removed the nested loop, I can easily
  loop
  over just CATEGORIES but as soon as I add the nested loop, it fails with
  the
  following
 
  WicketMessage: Error attaching this container for rendering: [Page class
  =
  com.fuzzybearings.milestones.web.page.user.ProjectsPage, id = 3, version
  =
  0]
 
  Root cause:
 
  java.lang.IllegalArgumentException: A child with id 'projects' already
  exists:
  [MarkupContainer [Component id = categories]]
 
 
  My intuition tells me that 'wicket:id=projects' is repeating since it
  is
  contained in an outer loop ... but I'm not sure how else to identify
 this
  type of structure in a general way. Is there a loop container more
 suited
  to
  this ... open to suggestions.
 
  Thanks in advance,
 
  -Luther
 
 
 
  *.html snippet
 
  div wicket:id=categories
  table
  tr wicket:id=projects
  td # [project] /td
  /tr
  /table
  /div
 
 
  *.java snippet
 
  public ProjectsPage(ResourceModel bodyTitle)
  {
  super(bodyTitle);
 
  ListView categories = new ListView(categories,
  this.getCategories())
  {
 
  @Override
  protected void populateItem(ListItem item)
  {
  Category category = (Category) item.getModelObject();
 
  ListView projects = new ListView(projects,
  ProjectsPage.this.getProjects(category))
  {
 
  @Override
  protected void populateItem(ListItem item)
  {
  Project project = (Project)
  item.getModelObject();
  Link link = new Link(projectLink,
  item.getModel())
  {
 
  @Override
  public void onClick() { ... }
  };
  link.add(new Label(projectLabel,
  project.getName()));
  item.add(link);
  }
  };
  this.add(projects);
  }
  };
  this.add(categories);
  }
 
 
 
 

 --
 View this message in context:
 http://www.nabble.com/nested-loop-view-tp22726252p22726482.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: GoAndClearFiler not clearing correctly

2009-03-26 Thread Stephan Koch
I found the cause of this issue so I'm replying to myself here.

This problem was actually related to the way Component#setModelObject is
implemented: before setting a new model object, it is checked via
Component#defaultModelComparator if the new model and the old model are
the same. This is done using equals().

Now, in my case, I implemented equals() for one of my entity objects so
it does not compare *all* properties of that object, but a smaller set
of properties that I felt act as a natural identifier for that object.

Some of the filter columns use the properties that not compared in
equals(). So when the clear button is hit, the model is not changed.

There were some postings of users experiencing the same problem. Should
the behavior of setModelObject be changed or am I just plain wrong
implementing equals() the way I described above for my entities? Any
thoughts?

-stephan



Stephan Koch wrote:
 Hi all,
 
 I use a GoAndClearFilter with a FilterToolbar and DataTable. The table
 contains several ChoiceFilteredPropertyColumns and
 TextFilteredPropertyColumns.
 
 When the user filters using the dropdowns and then clicks the clear
 button, the page refreshes but the  filter state remains the same.
 
 When using the TextFilters, the clear button behaves correctly. Oddly,
 one of my dropdown filters also behaves correctly while the others don't.
 The only thing in which the dropdowns differ is the model, which
 contains different data. Any ideas what might be the problem here?
 
 I'm using 1.3.5.
 
 here's the code...
 
 
 Model modelChoices = new HibernateDropDownChoiceModel(Xyz.class, true);
   ...
 
 columns.add(new ChoiceFilteredPropertyColumn(new Model(Model),
 model, modelChoices));
 ...   
 
 final FilterForm form = new FilterForm(filter-form, provider) {
 
   @Override
   protected void onSubmit() {
   dt.setCurrentPage(0);
   }
   };
 
 
   dt = new DefaultDataTable(datatable, columns, provider, 50);
   dt.addTopToolbar(new FilterToolbar(dt, form, provider));
   form.add(dt);
   form.add(new GoAndClearFilter(filter-buttons, form));
   add(form);
 
 
 
 -Stephan
 
 -
 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: How to secure a Wicket 1.4 application?

2009-03-26 Thread Brill Pappin
I actually find that auth-roles is very simply to use and usually all  
I need... if it is ever deprecated I assure you I'll revive it under  
another source tree.
However although for some reason it says you should use wicket- 
security (not sure why unless wicket-security has the same simple  
implementation) as far as I know its still being maintained and used  
by a large number of the people here.


I think what you use will depend on your application, if all you need  
is a principle and a few roles to protect certain pages (or even a  
single role), then auth-roles is for you. If you need something more  
complex, then wicket-security may be the way to go.


FYI - I usually find wicket-security lags behind the current  
snapshot... or at least it was when I last looked at it. The lag is  
likely because it *is* more complex.


- Brill

On 26-Mar-09, at 12:51 PM, Christian Helmbold wrote:



Hello,

what would be your prefered way to secure a Wicket 1.4 application?

Spring Security and Wicket-auth-roles seems to be outdated. This  
project suggests to use Wicket-Security. So it is presumably not the  
best idea to use it.

http://cwiki.apache.org/WICKET/spring-security-and-wicket-auth-roles.html

Wicket-Security seems also to be not up to date and supports only  
Wicket 1.3.

http://wicketstuff.org/confluence/display/STUFFWIKI/Wicket-Security
Somewhere I've read that a version of Wicket-Security for Wicket 1.4  
exists in a SVN repository. Maybe that makes Wicket-Security a  
candidate. But this framework looks quite complicated to me -  
WiComSec, WASP, Hive, SWARM sounds confusing. Is Wicket-Security  
limited to use JAAS permissions?

http://wicketstuff.org/confluence/display/STUFFWIKI/Getting+started+with+Swarm
I don't like JAAS very much ...

My first impression is, that it is easier to write custom  
authentication and authorization, than to use Wicket-Security. How  
are your experiences?


Regards
Christian





-
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: nested loop view

2009-03-26 Thread Brill Pappin

User error :)


review what element your adding the inner list to... looks like your  
adding it to the ListView instead of the Item.

Change:
this.add(projects);
to
item.add(projects);

- Brill Pappin


On 26-Mar-09, at 12:50 PM, Luther Baker wrote:


I'm trying to create a page - similar to Jira's BROWSE PROJECTS.

My initial take amounts to a loop in a loop.

The outer loop is CATEGORIES and the inner loop is PROJECTS in said
category.

| CATEGORY 1
| p1
| p2
| p3

| CATEGORY 2
| p4
| p5
| p6

...

I've attached code below but if I removed the nested loop, I can  
easily loop
over just CATEGORIES but as soon as I add the nested loop, it fails  
with the

following

WicketMessage: Error attaching this container for rendering: [Page  
class =
com.fuzzybearings.milestones.web.page.user.ProjectsPage, id = 3,  
version =

0]

Root cause:

java.lang.IllegalArgumentException: A child with id 'projects' already
exists:
[MarkupContainer [Component id = categories]]


My intuition tells me that 'wicket:id=projects' is repeating since  
it is
contained in an outer loop ... but I'm not sure how else to identify  
this
type of structure in a general way. Is there a loop container more  
suited to

this ... open to suggestions.

Thanks in advance,

-Luther



*.html snippet

   div wicket:id=categories
   table
   tr wicket:id=projects
   tda wicket:id=projectLink href=#span
wicket:id=projectLabel[project]/span/a/td
   /tr
   /table
   /div


*.java snippet

   public ProjectsPage(ResourceModel bodyTitle)
   {
   super(bodyTitle);

   ListView categories = new ListView(categories,
this.getCategories())
   {

   @Override
   protected void populateItem(ListItem item)
   {
   Category category = (Category) item.getModelObject();

   ListView projects = new ListView(projects,
ProjectsPage.this.getProjects(category))
   {

   @Override
   protected void populateItem(ListItem item)
   {
   Project project = (Project)  
item.getModelObject();
   Link link = new Link(projectLink,  
item.getModel())

   {

   @Override
   public void onClick() { ... }
   };
   link.add(new Label(projectLabel,
project.getName()));
   item.add(link);
   }
   };
   this.add(projects);
   }
   };
   this.add(categories);
   }



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



Re: Open Session in View Pattern: some basic questions

2009-03-26 Thread Igor Vaynberg
there are three patterns to transaction management

the default pattern is session-per-transaction. this is not convenient
because after your business logic closes the transaction you can no
longer use the session in the ui.

there are two ways to solve this: either use session-per-request -
which means on first transaction you open a session, and keep it open
for the duration of the requests. transactions share the session and
even after the transactions are done you still have a session. this is
better because after your business logic is done you have the session
you can use for ui with all the stuff from business logic already
loaded. this is what the spring osiv filter does.

the other way is a single transaction-per-request. this means on first
access you create a session and a transaction. all other operations
inside a request run within that one transaction.

the difference between session-per-request and transaction-per-request
is data integrity from the user's perspective. if the user sees an
error page have his changes been saved to the database to some degree?
with transaction-per-request you are guaranteed that if user sees an
error screen none of their changes have been preserved - because
whatever displayed the error screen also rolled back the transaction.
with session-per-request there is no such guarantee. eg the business
logic runs fine and saves the data but an error in the ui causes an
error page. user sees an error - but the data is already saved - a
little inconsistent.

personally i prefer transaction-per-request but afaik there is nothing
baked into spring that will do that so you will have to roll your own.

-igor

On Thu, Mar 26, 2009 at 5:31 AM, Kaspar Fischer fisch...@inf.ethz.ch wrote:
 I am learning about the OSIV pattern and have so far read the introduction
 at hibernate.org [1], the Spring JavaDoc for OpenSessionInViewFilter [2],
 the excellent MysticCoders tutorial [3] that uses Spring's
 OpenSessionInViewFilter, and some more.

 I have basic questions:

 1. Is it correct that there are two variants of the pattern?

 In one variant there is a single transaction (and a single session) that
 gets committed at the end of the request, as described in [1]. If I am not
 mistaken, James's wicket-advanced application [5] also uses this variant.

 In the second variant, there is an intermediate commit. We therefore have
 two transactions (and one or two Hibernate sessions). Examples for this are
 WicketRAD and the London-Wicket PDF [4].

 2. The first variant has the disadvantage that the code handling the request
 cannot handle errors itself as the commit takes place at the end of the
 request, in a filter. Correct?

 As a concrete example, this means that if my code inserts an item that
 already exists and does not explicitly check for duplicates, the request
 will result in a rollback and the default error page. Where I would have
 preferred to see a feedback message This item already exists. (It seems to
 me, however, that it is not a good practice to move error checking concerns
 to the database integrity layer, so the code *should* check for
 duplicates...)

 4. Which variant(s) doe Spring's OpenSessionInViewFilter support and how
 does it work?

 I do not fully understand the documentation of the class but have the
 feeling it implements the second, and you can specify whether you want a
 single or two Hibernate sessions. I read [3]:

 NOTE: This filter will by default not flush the Hibernate Session, with the
 flush mode set to FlushMode.NEVER. It assumes to be used in combination with
 service layer transactions that care for the flushing: The active
 transaction manager will temporarily change the flush mode to FlushMode.AUTO
 during a read-write transaction, with the flush mode reset toFlushMode.NEVER
 at the end of each transaction. If you intend to use this filter without
 transactions, consider changing the default flush mode (through the
 flushMode property).

 Here is my understanding of this, assuming I have configured a Spring
 transaction manager and use transaction annotations:

 When a request starts, a Hibernate session is opened. When the first method
 with a @Transactional annotation is encountered, a transaction is started,
 and Hibernate's session is associated with this transaction. When the method
 exits, the transaction is committed but the session is left open (the OSIV
 behaviour). At the end of the request, the session is closed. Is this
 correct?

 Thanks for a reply and sorry for the lengthy post,
 Kaspar

 --
 [1] http://www.hibernate.org/43.html
 [2]
 http://static.springframework.org/spring/docs/2.5.x/api/org/springframework/orm/hibernate3/support/OpenSessionInViewFilter.html
 [3]
 http://www.mysticcoders.com/blog/2009/03/13/5-days-of-wicket-putting-it-all-together/
 [4]
 http://code.google.com/p/londonwicket/downloads/detail?name=LondonWicket-OpenSessionInView.pdfcan=2q=
 [5] http://markmail.org/message/ittmrmwsn5l6usx7

 

Re: Can client cache pages effectively?

2009-03-26 Thread Jim Pinkham
Changing my search query to this got some better hits:
http://lmgtfy.com/?q=cacheability
So, allow me to refine my question based on that - has anyone tried some of
these approaches (see first result from above) to generrate and dump content
to a static file (renamed if it chages) and having the wicket home page be a
redirect to that file, or something like that?

Thanks,
-- Jim.
On Thu, Mar 26, 2009 at 12:53 PM, Jim Pinkham pinkh...@gmail.com wrote:

 I've found a few posts about how to mark dynamic pages so they won't be
 cached.

 I've got a different situation that I think is fairly common - the 'home'
 page of my app is effectively a (cheesr-like) catalog of items that changes
 infrequently.   Users didn't like paging, so it's about 300 items in a
 simple scrollable page.  Once a user views it, they often drill down into an
 item, then use the back button (or sometimes the Home link) to re-display
 it.

 The db query is actually pretty fast; I think the bottleneck seems to be
 fetching the HTML.

 My question is, can I use some kind of header caching hint with a version
 number so that once the content is identified as being the same as a
 previously fetched page, the user's browser will repaint it from a local
 cache?  (I know this is typically done with images, but I was wondering if
 this would make sense to do also do with content that technically 'dynamic'
 but actually is 'fairly static' ?   (I say version number rather than time
 to expire so that in case I add/change an item I can increment the catalog
 version)

 Thanks,
 -- Jim



Re: Can client cache pages effectively?

2009-03-26 Thread Jeremy Thomerson
Have you looked at a standard HTTP caching proxy like
http://www.squid-cache.org/ ?


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



On Thu, Mar 26, 2009 at 2:02 PM, Jim Pinkham pinkh...@gmail.com wrote:

 Changing my search query to this got some better hits:
 http://lmgtfy.com/?q=cacheability
 So, allow me to refine my question based on that - has anyone tried some of
 these approaches (see first result from above) to generrate and dump
 content
 to a static file (renamed if it chages) and having the wicket home page be
 a
 redirect to that file, or something like that?

 Thanks,
 -- Jim.
 On Thu, Mar 26, 2009 at 12:53 PM, Jim Pinkham pinkh...@gmail.com wrote:

  I've found a few posts about how to mark dynamic pages so they won't be
  cached.
 
  I've got a different situation that I think is fairly common - the 'home'
  page of my app is effectively a (cheesr-like) catalog of items that
 changes
  infrequently.   Users didn't like paging, so it's about 300 items in a
  simple scrollable page.  Once a user views it, they often drill down into
 an
  item, then use the back button (or sometimes the Home link) to re-display
  it.
 
  The db query is actually pretty fast; I think the bottleneck seems to be
  fetching the HTML.
 
  My question is, can I use some kind of header caching hint with a version
  number so that once the content is identified as being the same as a
  previously fetched page, the user's browser will repaint it from a local
  cache?  (I know this is typically done with images, but I was wondering
 if
  this would make sense to do also do with content that technically
 'dynamic'
  but actually is 'fairly static' ?   (I say version number rather than
 time
  to expire so that in case I add/change an item I can increment the
 catalog
  version)
 
  Thanks,
  -- Jim
 



anyone see error Internal error parsing wicket:interface = iepngfix.htc?

2009-03-26 Thread novotny

Hi,

In order to support .png files on IE we added a fix/hack as documented
here 
http://www.twinhelix.com/css/iepngfix/

However in the logs we're seeing this wicket error:

org.apache.wicket.WicketRuntimeException: Internal error parsing
wicket:interface = iepngfix.htc
   at
org.apache.wicket.protocol.http.request.WebRequestCodingStrategy.addInterfaceParameters(WebRequestCodingStrategy.java:596)
   at
org.apache.wicket.request.target.coding.BookmarkablePageRequestTargetUrlCodingStrategy.decode(BookmarkablePageRequestTargetUrlCodingStrategy.java:104)
   at
com.homeaccount.web.wicket.WebRequestCodingStrategy.targetForRequest(WebRequestCodingStrategy.java:498)
   at
org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:184)
   at org.apache.wicket.RequestCycle.step(RequestCycle.java:1246)

Has anyone else had this problem and is there a way to deal with it?

Thanks, Jason

-- 
View this message in context: 
http://www.nabble.com/anyone-see-error-%22Internal-error-parsing-wicket%3Ainterface-%3D-iepngfix.htc%22--tp22730324p22730324.html
Sent from the Wicket - User mailing list archive at Nabble.com.


Re: Equivalent of StackPanel for Wicket

2009-03-26 Thread Leszek Gawron

HHB wrote:

Hey,
I want to employ something like StackPanel of GWT in my Wicket application.
Any production ready component?
Thanks for help and time. 


the easiest way is to use jQuery, the accordion widget in particular:

http://jqueryui.com/demos/accordion/

--
Leszek Gawron

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



Re: Wicket architecture diagram?

2009-03-26 Thread jWeekend

Jeremy,

Yes, if you believe showing model on such a high level architectural
diagram meant to depict how the major components hang together, then you
should show IModel instead of LDM for sure. And it's true that newcomers
need to understand models and can find this concept hard to grasp if they
have not seen this sort of pattern before, but you don't need to show
everything in the one diagram.

Another comment about the diagram(s) I feel would be most useful (ones I
would have benefited from when I first luckily stumbled upon Wicket) is that
there should be a clear distinction between static and dynamic features of
the framework, for consistency and to avoid confusion for the reader.

I think this is a good start and you can also see some of the Wiki entries
syl put on the Wiki even before he was working with us, like 
http://cwiki.apache.org/WICKET/request-cycle-and-request-cycle-processor.html
this one .

Regards - Cemal
http://jWeekend.com jWeekend 





Jeremy Thomerson-5 wrote:
 
 While I agree that you could take out LDM specifically, I really think
 that
 you should replace it with IModel - I think it is critical to show that
 IModel is the abstraction between a component and where it gets it's data.
 This is the number one misundertstood thing that I find among those I
 teach.
 
 --
 Jeremy Thomerson
 http://www.wickettraining.com
 
 
 
 On Thu, Mar 26, 2009 at 6:44 AM, jWeekend
 jweekend_for...@cabouge.comwrote:
 

 Subbu,

 Thank you!
 I have a quick minute now, so I thought you'd appreciate a few crumbs of
 feedback before I can take a better look, hopefully late this evening.

 0 - this is a great start!
 1 - take out the LDM - this stretches the scope of the diagram beyond
 what
 it needs to show.
 2 - if the level of abstraction is at a level which includes
 validators/converters etc (possibly form processing is better elaborated
 in
 a child diagram) ... I think we need to mention FormComponent explicitly.

 More soon, and I hope this will draw some comments from core devs and
 application developers.

 Regards - Cemal
 http://jWeekend.com jWeekend



 subbu_tce wrote:
 
  Based on my understanding, i just prepared a diagram.
  Wicket Contributors.. Please review and let me know your valuable
  feedback.
   http://www.nabble.com/file/p22717793/wicket%2Barchitecture.jpg
 
 
  Thanks,
  Subbu.
 
 
  jWeekend wrote:
 
  Jeremy,
 
  It's one of the first things I looked for when I first stumbled upon
  Wicket 2 years ago, and it is a common request from many architects
 and
  even some project managers evaluating Wicket.
 
  If the core devs come up with some rough (but correct) sketch they're
 all
  agreed on, even if it's just a first iteration, I'll get someone here
 to
  create a professional (maybe even glossy) version from that.
 
  Regards - Cemal
   http://jWeekend.com jWeekend
 
 
  Jeremy Thomerson-5 wrote:
 
  Has anyone done a nice Wicket architecture diagram?  I know about the
  architecture chapter in WiA, but someone I know is looking for
 something
  more along the lines of:
 
 
 http://www.icesoft.com/developer_guides/icefaces/htmlguide/devguide/sys_architecture.html
  http://www.ociweb.com/jnb/jsfArchitecture.jpg
 
  Unfortunately, I'm no artist - so I can't help him much.  I was
 hoping
  someone had already done something similar as part of a presentation
  somewhere.
 
  --
  Jeremy Thomerson
  http://www.wickettraining.com
 
 
 
 
 
 

 --
 View this message in context:
 http://www.nabble.com/Wicket-architecture-diagram--tp22683704p22720354.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


 
 

-- 
View this message in context: 
http://www.nabble.com/Wicket-architecture-diagram--tp22683704p22730737.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: anyone see error Internal error parsing wicket:interface = iepngfix.htc?

2009-03-26 Thread Serkan Camurcuoglu
we had used iepngfix.htc method, but our css file was relative to our 
web application, so iepngfix.htc file was not served through wicket.. 
but I believe it should not be problematic.. does it cause any obvious 
error in the application other than the error log?




novotny wrote:

Hi,

In order to support .png files on IE we added a fix/hack as documented
here 
http://www.twinhelix.com/css/iepngfix/


However in the logs we're seeing this wicket error:

org.apache.wicket.WicketRuntimeException: Internal error parsing
wicket:interface = iepngfix.htc
   at
org.apache.wicket.protocol.http.request.WebRequestCodingStrategy.addInterfaceParameters(WebRequestCodingStrategy.java:596)
   at
org.apache.wicket.request.target.coding.BookmarkablePageRequestTargetUrlCodingStrategy.decode(BookmarkablePageRequestTargetUrlCodingStrategy.java:104)
   at
com.homeaccount.web.wicket.WebRequestCodingStrategy.targetForRequest(WebRequestCodingStrategy.java:498)
   at
org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:184)
   at org.apache.wicket.RequestCycle.step(RequestCycle.java:1246)

Has anyone else had this problem and is there a way to deal with it?

Thanks, Jason

  



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



Re: anyone see error Internal error parsing wicket:interface = iepngfix.htc?

2009-03-26 Thread Jeremy Thomerson
Without really digging into this, it looks to me to be an issue where your
CSS file is being served and in your CSS you have a URL in the CSS that is
causing a bad URL to be sent to the server - which Wicket is picking up and
doesn't know what to do with it.

It's this: url(iepngfix.htc)

Use a tool like Firebug or DebugBar for IE to watch what HTTP requests are
made - see where your CSS is requested, and then the browser is likely
requesting a bad URL to load iepngfix.htc.  Make it so that the URL for both
doesn't hit Wicket, and you'll be fine.

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



On Thu, Mar 26, 2009 at 3:53 PM, Serkan Camurcuoglu 
serkan.camurcuo...@telenity.com wrote:

 we had used iepngfix.htc method, but our css file was relative to our web
 application, so iepngfix.htc file was not served through wicket.. but I
 believe it should not be problematic.. does it cause any obvious error in
 the application other than the error log?



 novotny wrote:

 Hi,

 In order to support .png files on IE we added a fix/hack as documented
 here http://www.twinhelix.com/css/iepngfix/

 However in the logs we're seeing this wicket error:

 org.apache.wicket.WicketRuntimeException: Internal error parsing
 wicket:interface = iepngfix.htc
   at

 org.apache.wicket.protocol.http.request.WebRequestCodingStrategy.addInterfaceParameters(WebRequestCodingStrategy.java:596)
   at

 org.apache.wicket.request.target.coding.BookmarkablePageRequestTargetUrlCodingStrategy.decode(BookmarkablePageRequestTargetUrlCodingStrategy.java:104)
   at

 com.homeaccount.web.wicket.WebRequestCodingStrategy.targetForRequest(WebRequestCodingStrategy.java:498)
   at

 org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:184)
   at org.apache.wicket.RequestCycle.step(RequestCycle.java:1246)

 Has anyone else had this problem and is there a way to deal with it?

 Thanks, Jason





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




[SOLVED] TreeTable header div automatically resizes its width infinitely large

2009-03-26 Thread mallet

Before I finished posting this question I figured out the solution to my
problem, but because it was tricky to figure out I thought I would post this
anyway in case somebody else runs into the same issue.
==

I created an editable treetable using the example at
http://www.wicket-library.com/wicket-examples/ajax/ as a guide.  The
treetable displays fine, but there is a weird problem: several times a
second the header div increments its width by a few pixels, causing the
entire treetable to grow wider.  Within a couple seconds the treetable
causes a horizontal scroll bar to appear and if I leave my computer on the
screen for a few minutes it is soon many thousands of pixels across and
growing.

I thought I must have made some mistake so I went and copied the example
code from the example verbatim into my project and yet I have the same
problem.  I am using Wicket 1.4 RC2.

SOLUTION:

Turns out the way my page's CSS was set up was causing the problem.  I have
a #content wrapper div around all my pages.  I had a width: 100%;
attribute on this div.  By simply removing this attribute from the wrapper
div, the treetable quit resizing wider.  I'm guessing either this attribute
was inherited and the div thought it should be able to resize to 100% of
100%, with no fixed max pixel width, or something similar.
-- 
View this message in context: 
http://www.nabble.com/-SOLVED--TreeTable-header-div-automatically-resizes-its-width-infinitely-large-tp22731126p22731126.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: anyone see error Internal error parsing wicket:interface = iepngfix.htc?

2009-03-26 Thread novotny


Hi,

Unfortunately it causes an InternalErrorPage-- we basically have a css file
included in the html:

!--[if IE]link rel=stylesheet href=css/global-ie.css type=text/css
media=screen, projection/![endif]--
 
The css includes the iepng.htc file:

 img {behavior: url('../iepngfix.htc');}

Nothing out of the ordinary :-(

Thanks, Jason

Serkan Camurcuoglu-3 wrote:
 
 we had used iepngfix.htc method, but our css file was relative to our 
 web application, so iepngfix.htc file was not served through wicket.. 
 but I believe it should not be problematic.. does it cause any obvious 
 error in the application other than the error log?
 
 
 
 novotny wrote:
 Hi,

 In order to support .png files on IE we added a fix/hack as documented
 here 
 http://www.twinhelix.com/css/iepngfix/

 However in the logs we're seeing this wicket error:

 org.apache.wicket.WicketRuntimeException: Internal error parsing
 wicket:interface = iepngfix.htc
at
 org.apache.wicket.protocol.http.request.WebRequestCodingStrategy.addInterfaceParameters(WebRequestCodingStrategy.java:596)
at
 org.apache.wicket.request.target.coding.BookmarkablePageRequestTargetUrlCodingStrategy.decode(BookmarkablePageRequestTargetUrlCodingStrategy.java:104)
at
 com.homeaccount.web.wicket.WebRequestCodingStrategy.targetForRequest(WebRequestCodingStrategy.java:498)
at
 org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:184)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1246)

 Has anyone else had this problem and is there a way to deal with it?

 Thanks, Jason

   
 
 
 -
 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/anyone-see-error-%22Internal-error-parsing-wicket%3Ainterface-%3D-iepngfix.htc%22--tp22730324p22731175.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 Session in View Pattern: some basic questions

2009-03-26 Thread Maarten Bosteels
Igor,

IIUC, transaction-per-request will commit AFTER the response has been
rendered, right ?
That means that there's also risk for inconsistency: when the commit
fails, user will think everything is fine, but changes are rolled
back.
Or am I missing something ?

Maarten

On Thu, Mar 26, 2009 at 7:30 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote:
 there are three patterns to transaction management

 the default pattern is session-per-transaction. this is not convenient
 because after your business logic closes the transaction you can no
 longer use the session in the ui.

 there are two ways to solve this: either use session-per-request -
 which means on first transaction you open a session, and keep it open
 for the duration of the requests. transactions share the session and
 even after the transactions are done you still have a session. this is
 better because after your business logic is done you have the session
 you can use for ui with all the stuff from business logic already
 loaded. this is what the spring osiv filter does.

 the other way is a single transaction-per-request. this means on first
 access you create a session and a transaction. all other operations
 inside a request run within that one transaction.

 the difference between session-per-request and transaction-per-request
 is data integrity from the user's perspective. if the user sees an
 error page have his changes been saved to the database to some degree?
 with transaction-per-request you are guaranteed that if user sees an
 error screen none of their changes have been preserved - because
 whatever displayed the error screen also rolled back the transaction.
 with session-per-request there is no such guarantee. eg the business
 logic runs fine and saves the data but an error in the ui causes an
 error page. user sees an error - but the data is already saved - a
 little inconsistent.

 personally i prefer transaction-per-request but afaik there is nothing
 baked into spring that will do that so you will have to roll your own.

 -igor

 On Thu, Mar 26, 2009 at 5:31 AM, Kaspar Fischer fisch...@inf.ethz.ch wrote:
 I am learning about the OSIV pattern and have so far read the introduction
 at hibernate.org [1], the Spring JavaDoc for OpenSessionInViewFilter [2],
 the excellent MysticCoders tutorial [3] that uses Spring's
 OpenSessionInViewFilter, and some more.

 I have basic questions:

 1. Is it correct that there are two variants of the pattern?

 In one variant there is a single transaction (and a single session) that
 gets committed at the end of the request, as described in [1]. If I am not
 mistaken, James's wicket-advanced application [5] also uses this variant.

 In the second variant, there is an intermediate commit. We therefore have
 two transactions (and one or two Hibernate sessions). Examples for this are
 WicketRAD and the London-Wicket PDF [4].

 2. The first variant has the disadvantage that the code handling the request
 cannot handle errors itself as the commit takes place at the end of the
 request, in a filter. Correct?

 As a concrete example, this means that if my code inserts an item that
 already exists and does not explicitly check for duplicates, the request
 will result in a rollback and the default error page. Where I would have
 preferred to see a feedback message This item already exists. (It seems to
 me, however, that it is not a good practice to move error checking concerns
 to the database integrity layer, so the code *should* check for
 duplicates...)

 4. Which variant(s) doe Spring's OpenSessionInViewFilter support and how
 does it work?

 I do not fully understand the documentation of the class but have the
 feeling it implements the second, and you can specify whether you want a
 single or two Hibernate sessions. I read [3]:

 NOTE: This filter will by default not flush the Hibernate Session, with the
 flush mode set to FlushMode.NEVER. It assumes to be used in combination with
 service layer transactions that care for the flushing: The active
 transaction manager will temporarily change the flush mode to FlushMode.AUTO
 during a read-write transaction, with the flush mode reset toFlushMode.NEVER
 at the end of each transaction. If you intend to use this filter without
 transactions, consider changing the default flush mode (through the
 flushMode property).

 Here is my understanding of this, assuming I have configured a Spring
 transaction manager and use transaction annotations:

 When a request starts, a Hibernate session is opened. When the first method
 with a @Transactional annotation is encountered, a transaction is started,
 and Hibernate's session is associated with this transaction. When the method
 exits, the transaction is committed but the session is left open (the OSIV
 behaviour). At the end of the request, the session is closed. Is this
 correct?

 Thanks for a reply and sorry for the lengthy post,
 Kaspar

 --
 [1] http://www.hibernate.org/43.html
 [2]
 

Re: HTML can't reference a component (Label) multiple times?

2009-03-26 Thread Scott Swank
Surprisingly getDebugSettings().setComponentUseCheck(false) allows
this behavior, at least on 1.3.

   add(new Label(authorName));

   span wicket:id=authorName/span
   span wicket:id=authorName/span

... not that I'm advocating this side effect.

Scott


On Fri, Feb 13, 2009 at 10:26 AM, Igor Vaynberg igor.vaynb...@gmail.com wrote:
 not to mention it doesnt make sense for a lot of usecases, eg
 setoutputmarkupid() if you call it then the two rendered components
 will have the same markup id - whoops. which means this will break
 javascript, ajax, etc, etc.

 -igor

 On Fri, Feb 13, 2009 at 2:59 AM, Martijn Dashorst
 martijn.dasho...@gmail.com wrote:
 99.99% of the time this is an error: a component is referenced
 multiple times in markup. Therefore we don't allow one component to be
 rendering in multiple places. For that 0.01% of useful cases, it is
 not too difficult to just add the label component twice.

 Martijn


 On Thu, Feb 12, 2009 at 8:54 PM, Phil Grimm phil.gr...@gmail.com wrote:
 Guys,

 If I need to reference a Label multiple times on the page.
 Is there a better way than creating multiple redundant but distinct labels?

 Is this the only option?

 add(new Label(authorName1));
 add(new Label(authorName2));
 add(new Label(authorName3));

 span wicket:id=authorName1/span
 span wicket:id=authorName2/span
 span wicket:id=authorName3/span

 This (non-one-to-one) usage...

 add(new Label(authorName));

 span wicket:id=authorName/span
 span wicket:id=authorName/span

 ... causes error:

 WicketMessage: The component [Component id = author.name] has the same
 wicket:id as another component already added at the same level


 Phil

 --
 Phil Grimm
 Mobile: (858) 335-3426
 Skype: philgrimm336




 --
 Become a Wicket expert, learn from the best: http://wicketinaction.com
 Apache Wicket 1.3.5 is released
 Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

 -
 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: HTML can't reference a component (Label) multiple times?

2009-03-26 Thread Scott Swank
Should I open a JIRA for this, or is this an accepted side-effect?

Scott


On Thu, Mar 26, 2009 at 2:39 PM, Scott Swank scott.sw...@gmail.com wrote:
 Surprisingly getDebugSettings().setComponentUseCheck(false) allows
 this behavior, at least on 1.3.

   add(new Label(authorName));

   span wicket:id=authorName/span
   span wicket:id=authorName/span

 ... not that I'm advocating this side effect.

 Scott


 On Fri, Feb 13, 2009 at 10:26 AM, Igor Vaynberg igor.vaynb...@gmail.com 
 wrote:
 not to mention it doesnt make sense for a lot of usecases, eg
 setoutputmarkupid() if you call it then the two rendered components
 will have the same markup id - whoops. which means this will break
 javascript, ajax, etc, etc.

 -igor

 On Fri, Feb 13, 2009 at 2:59 AM, Martijn Dashorst
 martijn.dasho...@gmail.com wrote:
 99.99% of the time this is an error: a component is referenced
 multiple times in markup. Therefore we don't allow one component to be
 rendering in multiple places. For that 0.01% of useful cases, it is
 not too difficult to just add the label component twice.

 Martijn


 On Thu, Feb 12, 2009 at 8:54 PM, Phil Grimm phil.gr...@gmail.com wrote:
 Guys,

 If I need to reference a Label multiple times on the page.
 Is there a better way than creating multiple redundant but distinct labels?

 Is this the only option?

 add(new Label(authorName1));
 add(new Label(authorName2));
 add(new Label(authorName3));

 span wicket:id=authorName1/span
 span wicket:id=authorName2/span
 span wicket:id=authorName3/span

 This (non-one-to-one) usage...

 add(new Label(authorName));

 span wicket:id=authorName/span
 span wicket:id=authorName/span

 ... causes error:

 WicketMessage: The component [Component id = author.name] has the same
 wicket:id as another component already added at the same level


 Phil

 --
 Phil Grimm
 Mobile: (858) 335-3426
 Skype: philgrimm336




 --
 Become a Wicket expert, learn from the best: http://wicketinaction.com
 Apache Wicket 1.3.5 is released
 Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

 -
 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: HTML can't reference a component (Label) multiple times?

2009-03-26 Thread Jeremy Thomerson
I think it is accepted and should be left that way.  By default in
development, component use check is on - so you should catch these unless
you're explicitly ignoring them by turning CUC off.

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



On Thu, Mar 26, 2009 at 4:41 PM, Scott Swank scott.sw...@gmail.com wrote:

 Should I open a JIRA for this, or is this an accepted side-effect?

 Scott


 On Thu, Mar 26, 2009 at 2:39 PM, Scott Swank scott.sw...@gmail.com
 wrote:
  Surprisingly getDebugSettings().setComponentUseCheck(false) allows
  this behavior, at least on 1.3.
 
add(new Label(authorName));
 
span wicket:id=authorName/span
span wicket:id=authorName/span
 
  ... not that I'm advocating this side effect.
 
  Scott
 
 
  On Fri, Feb 13, 2009 at 10:26 AM, Igor Vaynberg igor.vaynb...@gmail.com
 wrote:
  not to mention it doesnt make sense for a lot of usecases, eg
  setoutputmarkupid() if you call it then the two rendered components
  will have the same markup id - whoops. which means this will break
  javascript, ajax, etc, etc.
 
  -igor
 
  On Fri, Feb 13, 2009 at 2:59 AM, Martijn Dashorst
  martijn.dasho...@gmail.com wrote:
  99.99% of the time this is an error: a component is referenced
  multiple times in markup. Therefore we don't allow one component to be
  rendering in multiple places. For that 0.01% of useful cases, it is
  not too difficult to just add the label component twice.
 
  Martijn
 
 
  On Thu, Feb 12, 2009 at 8:54 PM, Phil Grimm phil.gr...@gmail.com
 wrote:
  Guys,
 
  If I need to reference a Label multiple times on the page.
  Is there a better way than creating multiple redundant but distinct
 labels?
 
  Is this the only option?
 
  add(new Label(authorName1));
  add(new Label(authorName2));
  add(new Label(authorName3));
 
  span wicket:id=authorName1/span
  span wicket:id=authorName2/span
  span wicket:id=authorName3/span
 
  This (non-one-to-one) usage...
 
  add(new Label(authorName));
 
  span wicket:id=authorName/span
  span wicket:id=authorName/span
 
  ... causes error:
 
  WicketMessage: The component [Component id = author.name] has the
 same
  wicket:id as another component already added at the same level
 
 
  Phil
 
  --
  Phil Grimm
  Mobile: (858) 335-3426
  Skype: philgrimm336
 
 
 
 
  --
  Become a Wicket expert, learn from the best: http://wicketinaction.com
  Apache Wicket 1.3.5 is released
  Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.
 
  -
  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 Session in View Pattern: some basic questions

2009-03-26 Thread James Carman
On Thu, Mar 26, 2009 at 5:34 PM, Maarten Bosteels
mbosteels@gmail.com wrote:
 Igor,

 IIUC, transaction-per-request will commit AFTER the response has been
 rendered, right ?
 That means that there's also risk for inconsistency: when the commit
 fails, user will think everything is fine, but changes are rolled
 back.
 Or am I missing something ?

Yes, that's a problem.  That's why I just make sure I call
@Transactional methods and let them begin/commit the transaction.

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



Re: Can client cache pages effectively?

2009-03-26 Thread Jim Pinkham
Thanks Jerry; I think that applies only to static pages.

My next idea is to try overridding WebPage.setHeaders and just set the

response.setHeader(Cache-Control, max-age=3600, must-revalidate);

response.setHeader(ETag, 1);  // I'll use a checksum on the data coming
back from my search (Even better would be a checksum on the rendered page
data - any idea how to do that?)
Initial test (above) seems promising...

Thanks,
-- Jim.

On Thu, Mar 26, 2009 at 3:22 PM, Jeremy Thomerson jer...@wickettraining.com
 wrote:

 Have you looked at a standard HTTP caching proxy like
 http://www.squid-cache.org/ ?


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



 On Thu, Mar 26, 2009 at 2:02 PM, Jim Pinkham pinkh...@gmail.com wrote:

  Changing my search query to this got some better hits:
  http://lmgtfy.com/?q=cacheability
  So, allow me to refine my question based on that - has anyone tried some
 of
  these approaches (see first result from above) to generrate and dump
  content
  to a static file (renamed if it chages) and having the wicket home page
 be
  a
  redirect to that file, or something like that?
 
  Thanks,
  -- Jim.
  On Thu, Mar 26, 2009 at 12:53 PM, Jim Pinkham pinkh...@gmail.com
 wrote:
 
   I've found a few posts about how to mark dynamic pages so they won't be
   cached.
  
   I've got a different situation that I think is fairly common - the
 'home'
   page of my app is effectively a (cheesr-like) catalog of items that
  changes
   infrequently.   Users didn't like paging, so it's about 300 items in a
   simple scrollable page.  Once a user views it, they often drill down
 into
  an
   item, then use the back button (or sometimes the Home link) to
 re-display
   it.
  
   The db query is actually pretty fast; I think the bottleneck seems to
 be
   fetching the HTML.
  
   My question is, can I use some kind of header caching hint with a
 version
   number so that once the content is identified as being the same as a
   previously fetched page, the user's browser will repaint it from a
 local
   cache?  (I know this is typically done with images, but I was wondering
  if
   this would make sense to do also do with content that technically
  'dynamic'
   but actually is 'fairly static' ?   (I say version number rather than
  time
   to expire so that in case I add/change an item I can increment the
  catalog
   version)
  
   Thanks,
   -- Jim
  
 



Re: Can client cache pages effectively?

2009-03-26 Thread Jeremy Thomerson
How is this going to help you?  Scenario as I understand it:


   1. User requests homepage - pulls from site - with your etag in it
   2. User requests homepage again - calls site - your server does all of
   the loading of data - then you calculate / set etag
   3. Browser now knows that it is the same as before and does not have to
   pull the HTML down

The user saves what is likely a very short time in the overall scheme of
things - downloading the HTML.
The user still has to sit through the process of you loading the data from
the search / DB / etc. and generating HTML
Your server saves no load - but a little bandwidth.

I'd look at caching before it even gets to your server.  Otherwise your user
will likely not see much benefit unless you are sending multiple MB of data
back.  Sounds like premature optimization to me.

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



On Thu, Mar 26, 2009 at 5:26 PM, Jim Pinkham pinkh...@gmail.com wrote:

 Thanks Jerry; I think that applies only to static pages.

 My next idea is to try overridding WebPage.setHeaders and just set the

 response.setHeader(Cache-Control, max-age=3600, must-revalidate);

 response.setHeader(ETag, 1);  // I'll use a checksum on the data coming
 back from my search (Even better would be a checksum on the rendered page
 data - any idea how to do that?)
 Initial test (above) seems promising...

 Thanks,
 -- Jim.

 On Thu, Mar 26, 2009 at 3:22 PM, Jeremy Thomerson 
 jer...@wickettraining.com
  wrote:

  Have you looked at a standard HTTP caching proxy like
  http://www.squid-cache.org/ ?
 
 
  --
  Jeremy Thomerson
  http://www.wickettraining.com
 
 
 
  On Thu, Mar 26, 2009 at 2:02 PM, Jim Pinkham pinkh...@gmail.com wrote:
 
   Changing my search query to this got some better hits:
   http://lmgtfy.com/?q=cacheability
   So, allow me to refine my question based on that - has anyone tried
 some
  of
   these approaches (see first result from above) to generrate and dump
   content
   to a static file (renamed if it chages) and having the wicket home page
  be
   a
   redirect to that file, or something like that?
  
   Thanks,
   -- Jim.
   On Thu, Mar 26, 2009 at 12:53 PM, Jim Pinkham pinkh...@gmail.com
  wrote:
  
I've found a few posts about how to mark dynamic pages so they won't
 be
cached.
   
I've got a different situation that I think is fairly common - the
  'home'
page of my app is effectively a (cheesr-like) catalog of items that
   changes
infrequently.   Users didn't like paging, so it's about 300 items in
 a
simple scrollable page.  Once a user views it, they often drill down
  into
   an
item, then use the back button (or sometimes the Home link) to
  re-display
it.
   
The db query is actually pretty fast; I think the bottleneck seems to
  be
fetching the HTML.
   
My question is, can I use some kind of header caching hint with a
  version
number so that once the content is identified as being the same as a
previously fetched page, the user's browser will repaint it from a
  local
cache?  (I know this is typically done with images, but I was
 wondering
   if
this would make sense to do also do with content that technically
   'dynamic'
but actually is 'fairly static' ?   (I say version number rather than
   time
to expire so that in case I add/change an item I can increment the
   catalog
version)
   
Thanks,
-- Jim
   
  
 



Re: Open Session in View Pattern: some basic questions

2009-03-26 Thread Igor Vaynberg
not if you buffer the response like wicket does by default :)

-igor

On Thu, Mar 26, 2009 at 2:34 PM, Maarten Bosteels
mbosteels@gmail.com wrote:
 Igor,

 IIUC, transaction-per-request will commit AFTER the response has been
 rendered, right ?
 That means that there's also risk for inconsistency: when the commit
 fails, user will think everything is fine, but changes are rolled
 back.
 Or am I missing something ?

 Maarten

 On Thu, Mar 26, 2009 at 7:30 PM, Igor Vaynberg igor.vaynb...@gmail.com 
 wrote:
 there are three patterns to transaction management

 the default pattern is session-per-transaction. this is not convenient
 because after your business logic closes the transaction you can no
 longer use the session in the ui.

 there are two ways to solve this: either use session-per-request -
 which means on first transaction you open a session, and keep it open
 for the duration of the requests. transactions share the session and
 even after the transactions are done you still have a session. this is
 better because after your business logic is done you have the session
 you can use for ui with all the stuff from business logic already
 loaded. this is what the spring osiv filter does.

 the other way is a single transaction-per-request. this means on first
 access you create a session and a transaction. all other operations
 inside a request run within that one transaction.

 the difference between session-per-request and transaction-per-request
 is data integrity from the user's perspective. if the user sees an
 error page have his changes been saved to the database to some degree?
 with transaction-per-request you are guaranteed that if user sees an
 error screen none of their changes have been preserved - because
 whatever displayed the error screen also rolled back the transaction.
 with session-per-request there is no such guarantee. eg the business
 logic runs fine and saves the data but an error in the ui causes an
 error page. user sees an error - but the data is already saved - a
 little inconsistent.

 personally i prefer transaction-per-request but afaik there is nothing
 baked into spring that will do that so you will have to roll your own.

 -igor

 On Thu, Mar 26, 2009 at 5:31 AM, Kaspar Fischer fisch...@inf.ethz.ch wrote:
 I am learning about the OSIV pattern and have so far read the introduction
 at hibernate.org [1], the Spring JavaDoc for OpenSessionInViewFilter [2],
 the excellent MysticCoders tutorial [3] that uses Spring's
 OpenSessionInViewFilter, and some more.

 I have basic questions:

 1. Is it correct that there are two variants of the pattern?

 In one variant there is a single transaction (and a single session) that
 gets committed at the end of the request, as described in [1]. If I am not
 mistaken, James's wicket-advanced application [5] also uses this variant.

 In the second variant, there is an intermediate commit. We therefore have
 two transactions (and one or two Hibernate sessions). Examples for this are
 WicketRAD and the London-Wicket PDF [4].

 2. The first variant has the disadvantage that the code handling the request
 cannot handle errors itself as the commit takes place at the end of the
 request, in a filter. Correct?

 As a concrete example, this means that if my code inserts an item that
 already exists and does not explicitly check for duplicates, the request
 will result in a rollback and the default error page. Where I would have
 preferred to see a feedback message This item already exists. (It seems to
 me, however, that it is not a good practice to move error checking concerns
 to the database integrity layer, so the code *should* check for
 duplicates...)

 4. Which variant(s) doe Spring's OpenSessionInViewFilter support and how
 does it work?

 I do not fully understand the documentation of the class but have the
 feeling it implements the second, and you can specify whether you want a
 single or two Hibernate sessions. I read [3]:

 NOTE: This filter will by default not flush the Hibernate Session, with the
 flush mode set to FlushMode.NEVER. It assumes to be used in combination with
 service layer transactions that care for the flushing: The active
 transaction manager will temporarily change the flush mode to FlushMode.AUTO
 during a read-write transaction, with the flush mode reset toFlushMode.NEVER
 at the end of each transaction. If you intend to use this filter without
 transactions, consider changing the default flush mode (through the
 flushMode property).

 Here is my understanding of this, assuming I have configured a Spring
 transaction manager and use transaction annotations:

 When a request starts, a Hibernate session is opened. When the first method
 with a @Transactional annotation is encountered, a transaction is started,
 and Hibernate's session is associated with this transaction. When the method
 exits, the transaction is committed but the session is left open (the OSIV
 behaviour). At the end of the request, the 

Re: Open Session in View Pattern: some basic questions

2009-03-26 Thread James Carman
On Thu, Mar 26, 2009 at 6:32 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote:
 not if you buffer the response like wicket does by default :)

Right, but you have to make sure your filters fire in the correct
order, then.  If your OSIV wraps around WicketFilter, then buffering
won't fix the problem.  The exception will happen after Wicket's done.
 Right?

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



Re: Open Session in View Pattern: some basic questions

2009-03-26 Thread Igor Vaynberg
i already said OSIV that comes with spring doesnt support
transaction-per-request, so what makes you think i am using it or any
other filter? :) wicket has plenty of hooks to do this.

-igor

On Thu, Mar 26, 2009 at 3:36 PM, James Carman
jcar...@carmanconsulting.com wrote:
 On Thu, Mar 26, 2009 at 6:32 PM, Igor Vaynberg igor.vaynb...@gmail.com 
 wrote:
 not if you buffer the response like wicket does by default :)

 Right, but you have to make sure your filters fire in the correct
 order, then.  If your OSIV wraps around WicketFilter, then buffering
 won't fix the problem.  The exception will happen after Wicket's done.
  Right?

 -
 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: toString( ) and naming conventions in Component class

2009-03-26 Thread Ricky
https://issues.apache.org/jira/browse/WICKET-2187

done. thank you.

On Thu, Mar 26, 2009 at 11:40 AM, Ricky ricky...@gmail.com wrote:

 thanks, i'll create a JIRA issue and submit a patch tonight, appreciate
 your time!


 On Thu, Mar 26, 2009 at 8:31 AM, Johan Compagner jcompag...@gmail.comwrote:

 if you have a patch for better toString() impl be my guest and attach it
 to
 jira

 Those Changes classes are internal to component, they are inner classes of
 Component so they dont have to specify that extra name..
 Its just verbose. Also those 2 are protected final but i think they could
 be
 private if you ask me.
 So they are just internal

 On Thu, Mar 26, 2009 at 02:49, Ricky ricky...@gmail.com wrote:

  Hi,
 
  This concerns Wicket Version : 1.4-rc2
 
 
  In componentModelChange class, we see the following :
 @Override
 public String toString()
 {
 return ComponentModelChange[component:  + getPath() + ];
 }
 
  ComponentModelChange[ piece of it, in toString( ) shouldn't that be
  this.getClass().getSimpleName( ) + [ or something in those lines, I
 see
  that most of the component change classes are based on a format like
 that
  ... am i missing something? If we see the Behaviour Change code that
  follows
  , we use more dynamic this.getClass() to spit out toString( ); If I may
  ask,
  is the Behavior change toString ( ) and OtherChange format different by
  some
  agreeable convention ?  Also the toString( ) seems to be missing on
  ComponentBorderChange class.
 
  One more small observation, our naming conventions on Change class are
  inconsistent in many cases, for example, VisibilityChange and
 EnabledChange
  .. for what? question comes to mind, and the answer is component ...
 that
  to
  me infers that either it should be:
  1.) ChangeCOMPONENT extends Component
  if above is not acceptable, then
  2.) name it like ComponentEnabledChange or something in those lines?
 
  Just some thoughts.
  Sorry If questions have already been answered or are not appropriate,
  thought i'd ask the programming elites of wicket ;)
 
  Regards
  Vyas, Anirudh
  ||  ॐ  ||
 




 --

 Regards
 Vyas, Anirudh
 ||  ॐ  ||




-- 

Regards
Vyas, Anirudh
||  ॐ  ||


Re: toString( ) and naming conventions in Component class

2009-03-26 Thread Ricky
 I tried to implement something like:

// java docs removed for clarity
public abstract class ChangeFORMER extends IClusterable implements
IClusterable {

private static final long serialVersionUID = 1L;

   // former type
public FORMER former;

protected Change(final FORMER former)
{
setFormer(former);
}
public final FORMER getFormer()
{
return former;
}
public final void setFormer(FORMER former)
{
this.former = former;
}

public abstract void undo();
}

Then i changed a sample Change class code to something like:  (renamed the
VisibilityChange to ComponentVisibility for more explicit name)
ComponentVisibilityChange implements ChangeComponent
{

protected ComponentVisibilityChage(final Component component)
{
   super(component);
}

public void undo()
{
  do something (getFormer() );
}
}
This reduces a lot state maintainence on part on concrete change classes and
makes their names more explicitly apparent based on FORMER parameter type
given to Change, hence my boiler plate code is less in concrete change
classes. But then i saw classes like CurrentPageChange where current page
type is given as an int ... =( and not something like new
ModelInteger(currentPage);

I thought IClusterable served as a namespace of sorts for everything
associated with wicket, especially for the change track bound entities type
...  (something better than just an int) ... ?

some thoughts/questions thought i'd ask.

Thanks for your time.
Regards
Vyas, Anirudh
On Thu, Mar 26, 2009 at 9:13 PM, Ricky ricky...@gmail.com wrote:

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

 done. thank you.


 On Thu, Mar 26, 2009 at 11:40 AM, Ricky ricky...@gmail.com wrote:

 thanks, i'll create a JIRA issue and submit a patch tonight, appreciate
 your time!


 On Thu, Mar 26, 2009 at 8:31 AM, Johan Compagner jcompag...@gmail.comwrote:

 if you have a patch for better toString() impl be my guest and attach it
 to
 jira

 Those Changes classes are internal to component, they are inner classes
 of
 Component so they dont have to specify that extra name..
 Its just verbose. Also those 2 are protected final but i think they could
 be
 private if you ask me.
 So they are just internal

 On Thu, Mar 26, 2009 at 02:49, Ricky ricky...@gmail.com wrote:

  Hi,
 
  This concerns Wicket Version : 1.4-rc2
 
 
  In componentModelChange class, we see the following :
 @Override
 public String toString()
 {
 return ComponentModelChange[component:  + getPath() + ];
 }
 
  ComponentModelChange[ piece of it, in toString( ) shouldn't that be
  this.getClass().getSimpleName( ) + [ or something in those lines, I
 see
  that most of the component change classes are based on a format like
 that
  ... am i missing something? If we see the Behaviour Change code that
  follows
  , we use more dynamic this.getClass() to spit out toString( ); If I may
  ask,
  is the Behavior change toString ( ) and OtherChange format different by
  some
  agreeable convention ?  Also the toString( ) seems to be missing on
  ComponentBorderChange class.
 
  One more small observation, our naming conventions on Change class are
  inconsistent in many cases, for example, VisibilityChange and
 EnabledChange
  .. for what? question comes to mind, and the answer is component ...
 that
  to
  me infers that either it should be:
  1.) ChangeCOMPONENT extends Component
  if above is not acceptable, then
  2.) name it like ComponentEnabledChange or something in those lines?
 
  Just some thoughts.
  Sorry If questions have already been answered or are not appropriate,
  thought i'd ask the programming elites of wicket ;)
 
  Regards
  Vyas, Anirudh
  ||  ॐ  ||
 




 --

 Regards
 Vyas, Anirudh
 ||  ॐ  ||




 --

 Regards
 Vyas, Anirudh
 ||  ॐ  ||




-- 

Regards
Vyas, Anirudh
||  ॐ  ||