Re: add javascript after AjaxLazyLoadPanel finishes rendering - (was: onAfterRender called twice in AjaxLazyLoadPanel)

2010-01-20 Thread svenmeier
class SomePanel extends Panel implements IHeaderContributor { public SomePanel(String id) { super(id); } public void renderHead(IHeaderResponse response) { response.renderOnDomReadyJavascript("alert('hello');"); } }

Re: add javascript after AjaxLazyLoadPanel finishes rendering - (was: onAfterRender called twice in AjaxLazyLoadPanel)

2010-01-20 Thread Lionel Port
Actually, Ernesto idea sounds much simpler. On Thu, Jan 21, 2010 at 4:19 PM, Ernesto Reinaldo Barreiro wrote: > Why don't you include a

Re: add javascript after AjaxLazyLoadPanel finishes rendering - (was: onAfterRender called twice in AjaxLazyLoadPanel)

2010-01-20 Thread Ernesto Reinaldo Barreiro
Why don't you include a

Re: add javascript after AjaxLazyLoadPanel finishes rendering - (was: onAfterRender called twice in AjaxLazyLoadPanel)

2010-01-20 Thread Steve Swinsburg
Ah. Ok added that, still nothing. I see in the markup that the html has been added to the panel's div, though it's not running. Elsewhere on the page Javascript is working ok so I don't think it's broken, I just don't think the onLoad event is firing for an AjaxLazyLoadPanel. I'll keep going wi

Re: add javascript after AjaxLazyLoadPanel finishes rendering - (was: onAfterRender called twice in AjaxLazyLoadPanel)

2010-01-20 Thread Lionel Port
I guess doesn't need to extend AjaxBehaviour as it doesn't have any ajax. Try. add(new AbstractBehavior() { @Override protected void onComponentTag(ComponentTag tag) { super.onComponentTag(tag); String js = "alert('hello'

Re: add javascript after AjaxLazyLoadPanel finishes rendering - (was: onAfterRender called twice in AjaxLazyLoadPanel)

2010-01-20 Thread Lionel Port
I was looking at the first box. add(new AbstractDefaultAjaxBehavior() { @Override protected void onComponentTag(ComponentTag tag) { super.onComponentTag(tag); String js = "alert('hello');"; tag.

Re: add javascript after AjaxLazyLoadPanel finishes rendering - (was: onAfterRender called twice in AjaxLazyLoadPanel)

2010-01-20 Thread Steve Swinsburg
Typo in the alert, but even adding logging to the AjaxEventBehavior, it never fires. .add(new AjaxEventBehavior("onload"){ protected void onEvent(AjaxRequestTarget target){ log.error("*"); target.a

Re: add javascript after AjaxLazyLoadPanel finishes rendering - (was: onAfterRender called twice in AjaxLazyLoadPanel)

2010-01-20 Thread Steve Swinsburg
Hi Lionel, Thanks and yes, thats what I am trying to do, attach some javascript after something has rendered. So I attached an AjaxEventBehaviour to it and now have this: add(new AjaxLazyLoadPanel("myPanel") { @Override public Component getLazyLoadComponent(String markupId) {

Re: onAfterRender called twice in AjaxLazyLoadPanel

2010-01-20 Thread Lionel Port
Hi Steve, Are you trying to do this.. http://cwiki.apache.org/WICKET/adding-javascript-from-wicket.html with an onload event instead of onblur, or do I misunderstand. regards, Lionel On Thu, Jan 21, 2010 at 2:56 PM, Steve Swinsburg wrote: > So  overriding onAfterRender for a component doesn't

Re: onAfterRender called twice in AjaxLazyLoadPanel

2010-01-20 Thread Steve Swinsburg
So overriding onAfterRender for a component doesn't just override it for that instance of the component? Also I can see the markup is being added to the end of the page after the closing HTML. However, the Javadocs say it is meant to be called after after the actual component is finished rend

Re: onAfterRender called twice in AjaxLazyLoadPanel

2010-01-20 Thread Igor Vaynberg
you are writing out javascript after every component render... perhaps you should keep a boolean flag that marks if you rendered the js yet or not. alternatively you can add a behavior to the panel with istemporary() { return true; } -igor On Wed, Jan 20, 2010 at 7:24 PM, Steve Swinsburg wrote

Re: Cannot get default invisible TextField's ModelObject ?

2010-01-20 Thread smallufo
This is a full functional Page : I found this problem only occurs when the form is in the listView : If I move the form out of the listView , it works like a charm. Bug ? I am not sure... The link is the screen capture : http://xs.to/image-B859_4B57CDD0.gif MyPage.html name more ?

onAfterRender called twice in AjaxLazyLoadPanel

2010-01-20 Thread Steve Swinsburg
I have an AjaxLazyLoadPanel and want some javascript to fire after its loaded it's contents: I assumed I could override onAfterRender and add my javascript like so: add(new AjaxLazyLoadPanel("myPanel") { @Override public Component getLazyLoadComponent(String markupId) {

Re: Cannot get default invisible TextField's ModelObject ?

2010-01-20 Thread Jered Myers
What do you mean by "cannot get their values"? I am wondering if the model's value is not showing in the TextField when it become visible or if the model's value is not getting set based on what you type into the TextField. If your problem is that the value you type into the TextField is not

Re: Cannot get default invisible TextField's ModelObject ?

2010-01-20 Thread smallufo
To make it more clear : When the radio button is clicked , by implement AjaxEventBehavior("onClick") , a default-invisible WebMarkupContainer is set visible , The WebMarkupContainer contains other TextFields , which I cannot get their values at all I've stuck with this problems for half day

Cannot get default invisible TextField's ModelObject ?

2010-01-20 Thread smallufo
I have a form , which contains a radio button. When user clicks the radio button , a default-invisible textfield is set visible. But I cannot get the textfield's Model Object , it is null What's the problem ? Did I miss anything ?

Re: Wicket+Guice

2010-01-20 Thread Peter Karich
Hi, now I blogged about this stuff recently: http://karussell.wordpress.com/2010/01/18/crud-with-wicket-guice-db4o-neodatis/ Comments and requests of reformulations are welcome ;-) ! Question 1. is fixed ... maybe someone could point me to a solution of 2.? Regards, Peter. Hi, Thanks to Jer

Re: Checkbox tree component

2010-01-20 Thread prati
Hi i also am having same kind of problem. I got checkboxes in tree panel ,how to iterate over the selected nodes on checkbox click. Thanks Partibha Edi wrote: > > I am not able to configure the above example Doug. > > Could you give me .war file. please > > thanks and regards, > edi > > > D

Re: moving to spring 3

2010-01-20 Thread Scott Swank
Check out jWeekend's maven archetype generator: Leg Up. Spring 3.0.0 is in there with jdbc & jpa, respectively. http://www.jweekend.com/dev/LegUp Scott On Wed, Jan 20, 2010 at 2:25 PM, tubin gen wrote: > I am using wicket 1.4.1  , can I move to spring 3  ? > ---

moving to spring 3

2010-01-20 Thread tubin gen
I am using wicket 1.4.1 , can I move to spring 3 ?

Re: Thanks for wicket: it is awesome and I'm just getting to know it

2010-01-20 Thread nino martinez wael
And it grows on you, the deeper you dig the more of these things you discover :) 2010/1/19 Chuck Brinkman > Just wanted to say thanks for wicket. > > I have a ListMultipleChoice and wanted to update the page based on at least > one item selected or no items selected. It took a while for me to l

Re: Thanks for wicket: it is awesome and I'm just getting to know it

2010-01-20 Thread nmelen...@getsense.com.ar
yes, looks like real desktop application code but it is web :) On Tue, Jan 19, 2010 at 6:23 PM, Chuck Brinkman wrote: > Just wanted to say thanks for wicket. > > I have a ListMultipleChoice and wanted to update the page based on at least > one item selected or no items selected. It took a while

Re: Objects.cloneModel() on google app engine

2010-01-20 Thread Lionel Port
Thanks Pedro, Hope it helps. From your answer looks like we may have a slightly different problem with the same cause. Looks like the cloneModel() method is depended on from a couple of spots but it all related to versioning of components. Ideally it would be good if we could just replace the impl

Re: Wicket URL Encryption Key

2010-01-20 Thread Jonas
A quick search through wicket's fisheye [1] revealed the default was changed in wicket 1.3.5 to fix [2] [1] [2]

Re: javascript confirm - seems to work fine with link markup but not with button markup (AttributePrepender)

2010-01-20 Thread Steve Whitson
Yep... that did the trick! Thanks much for all your help! -Steve Here's what I did I made a copy of AttributeAppender, and changed the method newValue( String, String ) to this: protected String newValue(String currentValue, String appendValue) { final int appendValueLen =

Re: Wicket URL Encryption Key

2010-01-20 Thread Jonas
I think the book refers to wicket 1.3. The default behaviour of Settings#getCryptFactory has changed in 1.4. I think in 1.3 the default was ClassCryptFactory with a default key as still visible in ISecuritySettings#DEFAULT_ENCRYPTION_KEY. Now in 1.4, the KeyInSessionSunJceCryptFactory with a genera

Re: javascript confirm - seems to work fine with link markup but not with button markup

2010-01-20 Thread Ernesto Reinaldo Barreiro
and maybe donating it back to the community;-) Ernesto On Wed, Jan 20, 2010 at 5:01 PM, Fatih Mehmet Ucar wrote: > yes, if you are gonna use this in several places, creating a class > like AttributePrepender may be a better idea. > > 2010/1/20 Ernesto Reinaldo Barreiro : > > I remember Martijn

Re: dropdown issue

2010-01-20 Thread Jonas
with this code, you're trying to set a PersonnelrecordsDepartment Object into the field called parentId of the object referred to by the 'selected' variable that you're passing to the CompoundPropertyModel. The data types don't match, that's why wicket trys to safe the day using conversion (which o

Re: javascript confirm - seems to work fine with link markup but not with button markup

2010-01-20 Thread Fatih Mehmet Ucar
yes, if you are gonna use this in several places, creating a class like AttributePrepender may be a better idea. 2010/1/20 Ernesto Reinaldo Barreiro : > I remember Martijn advising to copy/paste AttributeAppender and transforming > it to AttributePrepender for such a use case... > > Best, > > Erne

Wicket URL Encryption Key

2010-01-20 Thread MZemeck
On page 331 of "Wicket In Action" is the following excerpt, "Note that you should modify the default encryption key that is stored in ISecuritySettings to prevent malicious hackers from using the default publicly available key as an attack vector." Does this only pertain to when Sun JCE is not

Re: dropdown issue

2010-01-20 Thread chinedu efoagui
@jonas ignore that. i was just refactoring the code for the email. the error is runtime not compile time. I think it is a conversion problem please help The field parentid is integer but the dropdown is expecting object the form IModel zaModel=new CompoundPropertyModel(selected); departmen

Re: dropdown issue

2010-01-20 Thread chinedu efoagui
@jonas ingore that i was just refactoring the code for the email. the error is runtime not compile time. I think it is a conversion problem please help On 1/20/10, Jonas wrote: > not sure if that's the problem, but shouldn't > > setChoices(titles); > > be > > setChoices(departments); > > > > > On

Re: javascript confirm - seems to work fine with link markup but not with button markup

2010-01-20 Thread Ernesto Reinaldo Barreiro
I remember Martijn advising to copy/paste AttributeAppender and transforming it to AttributePrepender for such a use case... Best, Ernesto On Wed, Jan 20, 2010 at 4:26 PM, Steve Whitson wrote: > Thanks for the suggestion... > > It appears as though I need to insert the attribute before the exis

Re: javascript confirm - seems to work fine with link markup but not with button markup

2010-01-20 Thread Fatih Mehmet Ucar
onClick code is created in onComponentTag(), and replaced by getOnClickScript() you can override the getOnClickScript() to prepend custom js code. fmu 2010/1/20 Steve Whitson : > Thanks for the suggestion... > > It appears as though I need to insert the attribute before the existing > onclick att

Re: javascript confirm - seems to work fine with link markup but not with button markup

2010-01-20 Thread Steve Whitson
Thanks for the suggestion... It appears as though I need to insert the attribute before the existing onclick attribute. How do I retrieve the existing onclick attribute? My hope is to retrieve the existing onclick attribute so I can prepend my onclick action and use AttributeModifier to repl

Re: dropdown issue

2010-01-20 Thread Jonas
not sure if that's the problem, but shouldn't setChoices(titles); be setChoices(departments); On Wed, Jan 20, 2010 at 4:14 PM, chinedu efoagui wrote: > Hello , I have a class PersonnelrecordsDepartment >  with the following fields with corresponding getters and setters >   private java.lang

dropdown issue

2010-01-20 Thread chinedu efoagui
Hello , I have a class PersonnelrecordsDepartment with the following fields with corresponding getters and setters private java.lang.Integer id; private java.lang.String departmentname; private java.lang.Integer parentid; I left out the getters and setters . Any the field parentid can re

Re: javascript confirm - seems to work fine with link markup but not with button markup

2010-01-20 Thread Fatih Mehmet Ucar
AttributeAppender should solve your problem. fmu 2010/1/20 Steve Whitson : > Hi, > > I'm new to wicket, and am working on my first app.  Great alternative to > other WebUI frameworks! > > I've added a link to my panel using this code: > >       Link deleteReportLink = new Link( "deletereport" ) {

javascript confirm - seems to work fine with link markup but not with button markup

2010-01-20 Thread Steve Whitson
Hi, I'm new to wicket, and am working on my first app. Great alternative to other WebUI frameworks! I've added a link to my panel using this code: Link deleteReportLink = new Link( "deletereport" ) { @Override public void onClick() { System.out.pri

Re: Wicket mentioned in Maven book...

2010-01-20 Thread nmelen...@getsense.com.ar
cool! On Wed, Jan 20, 2010 at 7:22 AM, nino martinez wael < nino.martinez.w...@gmail.com> wrote: > Hi Guys > > Just wanted to tell that wicket are mentioned here as a noticeable > archetype ( the quickstart ) > > > http://www.sonatype.com/books/mvnref-book/reference/archetype-sect-third-party.htm

Re: Image name changing in dev server

2010-01-20 Thread VGoel
It is capital jpg. But I also think it might be in the same line. Its not finding it and hence may be changing to non-localized. Thanks for the tips. Thanks and Regards, Vandana Goel Edward Zarecor 01/19/2010 08:21 PM Please respond to users@wicket.apache.org To users@wicket.apache.org cc

Custom DropDownChoice with css style

2010-01-20 Thread Alexander Monakhov
Hi, guys. I'm trying to implement DropDownChoice that could render tag with possiblity to add style with css. What do I mean: tag rendering is OS dependent. So, plain element is always ugly. There is no possibility to change arrow, or border of drop down list only with css. One of the ways to r

Re: Adding a form field at run time... is it possible?

2010-01-20 Thread Alexander Elsholz
hi, use a listview. the model contains wicket-components that you put on listview. if you have different html-elements introduce a wrapper: TextfieldWrapper, SpanWrapper etc what are panels that wrapps the component. alex -

JBoss 5, JaaS, Wicket and ThreadLocal

2010-01-20 Thread Alexander Elsholz
Hi, im confused;-) With jboss 5 the security-client interceptor uses the SecurityAssociation Thread-Local variables to get the principal and credentials and put them into the rmi-call. the set will perform in login. hmm, thread local, multi-user-plattform, webcontainer - how should this work?

Re: DataTable : Link with dynamically chaning label

2010-01-20 Thread Ernesto Reinaldo Barreiro
Did you search the list? A very similar question was asked just a few days ago... http://old.nabble.com/How-to-get-a-cell-work-as-a-link-in-AjaxFallbackDefaultDataTable-td27161378.html Regards, Ernesto On Wed, Jan 20, 2010 at 10:10 AM, Ashika Umanga Umagiliya < auma...@biggjapan.com> wrote: >

Re: Objects.cloneModel() on google app engine

2010-01-20 Thread Pedro Santos
Thank u! that will work for me too On Wed, Jan 20, 2010 at 8:21 AM, Lionel Port wrote: > The gae security restriction looks pointless because > Objects.cloneModel is just using a ByteArrayOutputStream (why should > there be restrictions on that?) but because the Objects calls are all > static I

Wicket mentioned in Maven book...

2010-01-20 Thread nino martinez wael
Hi Guys Just wanted to tell that wicket are mentioned here as a noticeable archetype ( the quickstart ) http://www.sonatype.com/books/mvnref-book/reference/archetype-sect-third-party.html And good words from the book : "Apache Wicket is a component-oriented web framework which focused on manag

Re: Objects.cloneModel() on google app engine

2010-01-20 Thread Lionel Port
The gae security restriction looks pointless because Objects.cloneModel is just using a ByteArrayOutputStream (why should there be restrictions on that?) but because the Objects calls are all static I can't override the method with a working clone method also because the OrderByLink.sort method is

Re: Objects.cloneModel() on google app engine

2010-01-20 Thread Pedro Santos
Hi Lionel, I had the same issue, but calling the setDefaultModelObject, that call methods on IPageVersionManager at some point. In my case, the solution was simple change that call for comp.getDefaultModel().setObject() On Tue, Jan 19, 2010 at 11:32 PM, Lionel Port wrote: > Hi, > > I'm using wic

Re: Wicket 1.4.5 : Spring integration problem?

2010-01-20 Thread Pierre Goupil
+1 with Alex. I'm glad to help you, though :-) On Wed, Jan 20, 2010 at 9:55 AM, Alex Objelean wrote: > > You could try the wicket-spring library. It allows a very nice integration > using a SpringBean annotation, similar to Autowired from spring. > > Alex > > > Umanga wrote: > > > > Thanks Pierr

DataTable : Link with dynamically chaning label

2010-01-20 Thread Ashika Umanga Umagiliya
Greetings , I have implemented 'AbstractColumn' to display list of 'id's and when user click on a 'id',it should take to the Page relevant to that 'id'. But in the application, the tablecells just display "[Cell]" and I want to display an anchor () with the dynamically changing label . How

Re: Wicket 1.4.5 : Spring integration problem?

2010-01-20 Thread Alex Objelean
You could try the wicket-spring library. It allows a very nice integration using a SpringBean annotation, similar to Autowired from spring. Alex Umanga wrote: > > Thanks Pierre, > > yes,that was a problem with web.xml , > > I forgot to change the filter setting : > > > applicat