Style and variant

2009-06-01 Thread Carlos Pita
Hi all, we have a site where some pages/components implement variant V. Now there is a requirement to sell a mainly reskinned version S of this site to a customer. So my first thought was to implement this site-wide "variant" S as a style. But soon I realised that _V wouldn't match variant V for s

Re: null lastPage at restoreAfterSerialization

2008-11-22 Thread Carlos Pita
one plus the num for the put log in the same session. I think that here the second pagemap (30) is created with a default lastPage = null that never is assigned a non null page, because put is being called on the first pagemap (29) instead. I still don't know where the second pagemap is created, b

Re: null lastPage at restoreAfterSerialization

2008-11-19 Thread Carlos Pita
d. I added couple of warnings and null check to 1.4 > trunk. I wonder if that helps it though. > > -Matej > > On Wed, Nov 19, 2008 at 12:44 PM, Carlos Pita <[EMAIL PROTECTED]> wrote: >> The last one of the saga for now, I badly need to sleep. >> >> I've been

Re: null lastPage at restoreAfterSerialization

2008-11-19 Thread Carlos Pita
ue; <-- ideally we should be here } . remove(session.getIdInternal()); } catch (Exception e) { . remove(keys[i]); <-- but instead /u01/tomcatWork/_/.session is prematurely removed here } HIH -Carlos On Wed, Nov 19, 2008 at

Re: null lastPage at restoreAfterSerialization

2008-11-19 Thread Carlos Pita
ov 19, 2008 at 7:13 AM, Carlos Pita <[EMAIL PROTECTED]> wrote: > Hi all, > > as I've a requirement to maintain long lived sessions (~120s) I'm > using tomcat's PersistentManager to avoid keeping lots of sessions in > memory, each one with its own lastPage. I&#

null lastPage at restoreAfterSerialization

2008-11-19 Thread Carlos Pita
Hi all, as I've a requirement to maintain long lived sessions (~120s) I'm using tomcat's PersistentManager to avoid keeping lots of sessions in memory, each one with its own lastPage. I'm observing, specially in a heavy loaded production environment, permanent errors with a trace like Nov 19, 200

renderJavascript with null id during ajax request

2008-11-13 Thread Carlos Pita
Hi, I've observed a behavior which I'm not sure is intentional or a bug. The fact is that when contributing to the header during an ajax response with response.renderJavascript(myScript, null), the branch for eval(myScript) in wicket-ajax.js/processScript is taken (because of the null id in the s

Re: Wicket Widget

2008-07-10 Thread Carlos Pita
> > i would say just run it through xslt to transform it to whatever you need. > > -igor > > On Tue, Jul 8, 2008 at 8:53 AM, Carlos Pita <[EMAIL PROTECTED]> wrote: >> Hi all, >> >> I'm looking for a fine and dandy (or just fine) way to create widgets

Wicket Widget

2008-07-08 Thread Carlos Pita
Hi all, I'm looking for a fine and dandy (or just fine) way to create widgets for igoogle, facebook and others. I would like to reuse our wicket components and pages because the widgets are not that different from our site but a shrunk version of it. The main problem I'm facing is that wicket outp

Reloading on demand (a different approach to reloading)

2008-02-19 Thread Carlos Pita
Hi all, I have worked out a reloading classloader (loosely inspired by Jean Baptiste's one) that reloads classes upon entering of an http request, instead of monitoring and reloading on saved changes. There are 2 observations that motivated me to implement this variant: 1) the current reloading c

Re: Page serialization and reloading don't get on

2008-02-19 Thread Carlos Pita
; } I would like to see an error page instead, errors of this kind end up showing themselves as obscure page expiration issues that are hard to trace if you don't know where to look. Regards -Carlos On Feb 19, 2008 7:59 PM, Carlos Pita <[EMAIL PROTECTED]> wr

Re: Page serialization and reloading don't get on

2008-02-19 Thread Carlos Pita
> > > > Of course, I'm proposing this just for >development environments that > > use the reloading filter<. Thanks for the remark, anyway. Perhaps I > > should have been clearer, as I'm throwing this in the open. > > Of course it is only a concern when you will deploy with the disk > store, and de

Re: Page serialization and reloading don't get on

2008-02-19 Thread Carlos Pita
aps I should have been clearer, as I'm throwing this in the open. Regards -Carlos > Martijn > > > On 2/19/08, Carlos Pita <[EMAIL PROTECTED]> wrote: > > Just in case someone else is having the same problem, I solved it for > > the time being overriding > > &

Re: Page serialization and reloading don't get on

2008-02-19 Thread Carlos Pita
session in memory, so it works out of the box. But other servers could offer other default session store strategies. Regards -Carlos On Feb 19, 2008 6:02 PM, Carlos Pita <[EMAIL PROTECTED]> wrote: > Hi all, > > I've finally taken the time to trace some insidious reloading filter

Page serialization and reloading don't get on

2008-02-19 Thread Carlos Pita
Hi all, I've finally taken the time to trace some insidious reloading filter bugs that tend to show up as: org.apache.wicket.WicketRuntimeException: Parameter clazz must be an instance of com.livra.cereza.web.user.login.LoginPage, but is a com.livra.cereza.web.layout.CerezaPage at org.apache.wic

Re: Mounting shared resources

2008-02-01 Thread Carlos Pita
Hi edvin, pictures are not my only goal, I would like to serve compressed js and css also, and to take advantage of wicket resource caching (http header generation). Anyway, I wrote a simple requesttargeturlcodingstrategy that fulfills my needs. If anyone is interested, here it is: public class Sh

Mounting shared resources

2008-02-01 Thread Carlos Pita
Hi all, is it possible to alias resource paths like /resources/scope/name to simply, say, /mount_point/name? I know there is a scope alias for shared resources, but that only works for the scope (class) part of the path, so it can't get shorter that /resources/alias/path. Then there is the moun

Re: Experiences with ReloadingWicketFilter

2007-09-25 Thread Carlos Pita
A time ago I filed a bug relating markup inheritance with the reloading servlet (although inline frames are involved too in my somewhat contrived example). Enjoy the cocktail here https://issues.apache.org/jira/browse/WICKET-965. Regards, Carlos O

Re: More extend points

2007-09-14 Thread Carlos Pita
...also, if you need multiple markup extension points for the same component, fragments will give you the ultimate flexibility, although at the cost of some (little) added complexity. I'll use them only if the other approaches are inappropriate. Regards, Carlos On 9/14/07, Carlos Pita &l

Re: More extend points

2007-09-14 Thread Carlos Pita
You can use border/body in a similar way than child/extend. Also, if the form incarnations haven't a lot of common markup between them, you can use the form as the webmarkupcontainer it is and put its logic in one place but the markup everywhere the form is. Regards, Carlos On 9/14/07, fero <[EM

Re: PageLink and markup inheritance problem

2007-09-13 Thread Carlos Pita
It only happens when using the ReloadingWicketServlet. This is waking into an evil combination of iframes, reloading and links, I still can't cut it down to a simpler example. Any ideas? Jean Baptiste? Regards, Carlos On 9/13/07, Carlos Pita <[EMAIL PROTECTED]> wrote: > Mh... my ch

Re: How to create my own components with HiddenFiled and TextField

2007-09-13 Thread Carlos Pita
What about PropertyModel with TextField and HiddenField, the usual way? add(new HiddenField("hiddenField", new PropertyModel(bean, "property1"))); add(new TextField("displayField", new PropertyModel(bean, "property2"))); Regards, Carlos On 9/13/07, Kevin Liu <[EMAIL PROTECTED]> wrote: > Hi! >

Re: PageLink and markup inheritance problem

2007-09-12 Thread Carlos Pita
> i tried it with beta3 and latest trunk. both work as expected. > > gerolf > > On 9/13/07, Carlos Pita <[EMAIL PROTECTED]> wrote: > > > > Sorry for the delay Igor, not exactly what you asked for but I have > > filed a new bug with an attached example

Re: PageLink and markup inheritance problem

2007-09-12 Thread Carlos Pita
u build a quickstart that reproduces it? > > -igor > > > On 9/7/07, Carlos Pita <[EMAIL PROTECTED]> wrote: > > > > I'm getting the exception below when following a PageLink, but not > > with a BookmarkablePageLink. This wasn't happening with previous 1.3

Re: TinyMCE Editor with AJAX

2007-09-12 Thread Carlos Pita
Try something like this to call onchange on the textarea: function RichTextField_newInstance(instance){ RichTextField_instance = instance; } function RichTextField_onEvent(e){ if (e.type == 'blur') { var value = RichTextField_instance.getBody().innerHTML; var

Re: Any way to apply wicket:link to with contained ?

2007-09-11 Thread Carlos Pita
ropriate behavior directly in the markup. > > Thanks > > > Carlos Pita-4 wrote: > > > > If it's such a common case in your application write a (trivial) > > component for it, and add it to your hierarchy with a oneliner where > > it's needed. That'

Re: Accessing to session scope attribute

2007-09-11 Thread Carlos Pita
>From wicket.Session javadoc: """ Arbitrary objects can be attached to a Session by installing a session factory on your Application class which creates custom Session subclasses that have typesafe properties specific to the application (see Application for details). To discourage non-typesafe acce

Re: How to get a list of the connected users ?

2007-09-11 Thread Carlos Pita
Maybe you can write a session listener to intercept session destruction (give a look at servlet api, in particular HttpSessionListener). For sessions that do have an associated (logged in) user you can set the isConnected flag to false then. I wouldn't recommend keeping these flags in a persistent

Re: Any way to apply wicket:link to with contained ?

2007-09-11 Thread Carlos Pita
If it's such a common case in your application write a (trivial) component for it, and add it to your hierarchy with a oneliner where it's needed. That's what componentization is mostly about, after all. Regards, Carlos On 9/11/07, mchack <[EMAIL PROTECTED]> wrote: > > Was wondering if there was

Re: Default focus behavior for ajax request

2007-09-11 Thread Carlos Pita
my comments in that issue. > Its not that we have to do something on the serverside this is a clientside > issue. > > johan > > > On 9/11/07, Carlos Pita <[EMAIL PROTECTED]> wrote: > > > > > behavior if the event is onblur. Can you submit RFE? > > >

Re: Default focus behavior for ajax request

2007-09-11 Thread Carlos Pita
> behavior if the event is onblur. Can you submit RFE? Done. I filed it as minor improvement https://issues.apache.org/jira/browse/WICKET-957. > Because currently there is no way during ajax processing to determine > that the event was a focus related one. I think that it's good to Maybe setting

Default focus behavior for ajax request

2007-09-10 Thread Carlos Pita
Hi, why is the default behavior for ajax requests to force focus into some component (normally the one which triggered the event that caused the request, I guess)? This produces some bizarre situations when onfocus or onblur are used for ajax validation. For example, if the form component to be va

Re: Setting up a very simple login page

2007-09-10 Thread Carlos Pita
of your page or form class with a value other than null, of course. In the second case you can instantiate the Employee just once, during page creation, and it will be stored into the wicket session. Regards, Carlos On 9/10/07, Carlos Pita <[EMAIL PROTECTED]> wrote: > > privat

Re: Setting up a very simple login page

2007-09-10 Thread Carlos Pita
> private Employee e; [...] > public LoginForm(final String id) { > super(id); > setModel(new CompoundPropertyModel(e)); Notice that your model is null. Regards, Carlos On 9/10/07, Cristina <[EMAIL PROTECTED]> wrote: > > Hello, > > I'm trying to set up a simpl

Re: FileUpload with AjaxSubmit not working

2007-09-10 Thread Carlos Pita
With the attachment, of course :). On 9/10/07, Carlos Pita <[EMAIL PROTECTED]> wrote: > Maybe you want to try this. > > Regards, > Carlos > > On 8/30/07, Carlos Pita <[EMAIL PROTECTED]> wrote: > > Hi all, > > > > here is a hopefully functional exam

Re: FileUpload with AjaxSubmit not working

2007-09-10 Thread Carlos Pita
Maybe you want to try this. Regards, Carlos On 8/30/07, Carlos Pita <[EMAIL PROTECTED]> wrote: > Hi all, > > here is a hopefully functional example showing how to use an iframe to > upload a file and afterwards call a behavior on a component belonging to the > top frame, s

quechup.com spam

2007-09-09 Thread Carlos Pita
Hola / Hi, queria pedir disculpas y advertir a todo aquel que haya recibido una invitacion mia para quechup.com. Yo me registre por una invitacion que a mi vez recibi de un contacto de confianza, sin prestar demasiada atencion al procedimiento y sin saber muy bien de que se trataba. En determinado

Re: WebMarkupContainer without template markup

2007-09-07 Thread Carlos Pita
You can also make the components to hide implement some listener (or just marker) interface X and then do a visitChildren traversal from page.onBeforeRender as follows: visitChildren(X.class, new IVisitor() { public Object component(Component component) { comp.setVisible(your visibility logi

PageLink and markup inheritance problem

2007-09-07 Thread Carlos Pita
I'm getting the exception below when following a PageLink, but not with a BookmarkablePageLink. This wasn't happening with previous 1.3 snapshots (I updated my wicket copy this morning). The PageLink is created by the (id,class) constructor this way: new PageLink(id, ChangePasswordPage.class) Cha

Re: Problem with DropDownChoice and AjaxFormComponentUpdatingBehavior

2007-09-06 Thread Carlos Pita
the same onchange updating behavior. But as state it's still reading its value from the raw input "Buenos Aires", you won't get it resetted until you also clear this input. Regards, Carlos On 9/7/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote: > so the validation fails

Re: DetachableContactModel question

2007-09-06 Thread Carlos Pita
The point of having a detachable model is to avoid storing the domain object into the wicket session. The constructor you mention is wrongly quoted, the code is in fact: public DetachableContactModel(Contact c) { this(c.getId()); } There isn't even a contact field in the class. If

Re: Problem with DropDownChoice and AjaxFormComponentUpdatingBehavior

2007-09-06 Thread Carlos Pita
I've debugged a simple example and what I described before happens to the letter, both for ajax updating behavior and for wantOnSelectionChangedNotifications/onSelectionChanged. I don't think it's a bug at all, but imo it would be reasonable to clear out the input if the explicit intention of chang

Re: Problem with DropDownChoice and AjaxFormComponentUpdatingBehavior

2007-09-06 Thread Carlos Pita
Now that I think about it: maybe input should be automatically cleared out in case the model is explicitly changed, don't you think? On 9/6/07, Carlos Pita <[EMAIL PROTECTED]> wrote: > Maybe it's because your second and third dropdowns are taking their > input from the post

Re: Problem with DropDownChoice and AjaxFormComponentUpdatingBehavior

2007-09-06 Thread Carlos Pita
Maybe it's because your second and third dropdowns are taking their input from the posted parameters (the raw input) instead of from their model. See the source for FormComponent.getValue(): if (NO_RAW_INPUT.equals(rawInput)) { return getMode

Re: Howto use AttributeModifier

2007-09-06 Thread Carlos Pita
Or a PropertyModel. On 9/6/07, Carlos Pita <[EMAIL PROTECTED]> wrote: > Per, > use a AbstractReadOnlyModel or a DetachableLoadableModel for the > attribute value. > Regards, > Carlos > > On 9/6/07, Per Newgro <[EMAIL PROTECTED]> wrote: > > Ok. I trie

Re: Howto use AttributeModifier

2007-09-06 Thread Carlos Pita
Per, use a AbstractReadOnlyModel or a DetachableLoadableModel for the attribute value. Regards, Carlos On 9/6/07, Per Newgro <[EMAIL PROTECTED]> wrote: > Ok. I tried the Attribute Modifier(String, String, boolean, Model) > Constructor but it didn't worked. There have been exactly the same results

Re: Twice Behavior on the same event handler (wicket 1.2.x)

2007-09-06 Thread Carlos Pita
e handler, or use decorator to add the client-side code. > > Alex > > > paolo di tommaso wrote: > > > > Carlos, > > > > Can you provide an example of your custom implementation of chained > > behaviour? > > > > > > Thanks, Paolo > > &

Re: Twice Behavior on the same event handler (wicket 1.2.x)

2007-09-05 Thread Carlos Pita
> Currently people will have to build it in themselves like you did. We > can investigate whether this can be improved for future versions, but >From my own experience I wouldn't say that wicket should support this. It's too easy to write it yourself just to fit your specific needs, and otoh seems

Re: Twice Behavior on the same event handler (wicket 1.2.x)

2007-09-05 Thread Carlos Pita
We use some kind of custom cascading behavior to achieve this "pipeline of behaviors" effect. The first behavior does it thing, calls the next in the sequence and so on. I don't think wicket provides a standard mechanism for this. The main case of use we found is for ajax form component updating be

Re: Aspectj loadtime weaving and reloading servlet

2007-09-02 Thread Carlos Pita
cation is > being restarted? that means the servlet context is being > reinitialized...why > it would do that i dont know > > -igor > > > On 9/2/07, Carlos Pita < [EMAIL PROTECTED]> wrote: > > > > No, just a custom jetty launcher (I think it's based on

Re: Aspectj loadtime weaving and reloading servlet

2007-09-02 Thread Carlos Pita
ot causing a lot of overhead anyway. Regards, Carlos On 9/2/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote: > > are you deploying on tomcat? i think tomcat monitors the dir and if it > sees > a change it reloads the webapp. you can canfig it not to do that. > > -igor &g

Aspectj loadtime weaving and reloading servlet

2007-09-02 Thread Carlos Pita
Hi all, I'm using a tad of loadtime weaving in a very selective way: just a number of classes in the service layer are being woven. For doing this, aspectj weaver is installed as a java agent and configured to monitor no more than the classes to advice. At the same time, some patterns are included

Re: AjaxButton value attribute

2007-09-01 Thread Carlos Pita
Why would you override onBeforeRender to do that? Just add an attribute modifier that takes a model in your constructor or wherever. Regards, Carlos On 9/1/07, Craig Lenzen <[EMAIL PROTECTED]> wrote: > > > Am I missing something here? Why doesn't the AjaxButton take a IModel > that > sets the val

Re: RadioChoice and ListView

2007-08-30 Thread Carlos Pita
gt; thought I did. What does PropertyModel do that allows the > ParticipationList > to be referenced across the two requests? > Thanks again! > -Alex Pine > > On 8/30/07, Carlos Pita <[EMAIL PROTECTED]> wrote: > > > > This looks wrong too: > > >

Re: RadioChoice and ListView

2007-08-29 Thread Carlos Pita
This looks wrong too: List participationList = exModel.getEx ().getParticipationList(); ListView subjectListView = new ListView("list", participationList) { if your experiment model is intended to be a detachable one, ie. if you are loading it from a database or something, then you

Example of pseudo-ajax file uploading using iframes

2007-08-29 Thread Carlos Pita
Hi all, here is a hopefully functional example showing how to use an iframe to upload a file and afterwards call a behavior on a component belonging to the top frame, so that an ajax action could be carried on in consequence (maybe to get rid of the iframe, or to show an informative message, or wh

Re: RepeatingView : Removing a table row

2007-08-28 Thread Carlos Pita
; > 85. } > 86. > 87. public void setId(int id) { > 88. this.id = id; > 89. } > 90. > 91. public String getBookName() { > 92. return bookName; > 93. } > 94. > 95. public void setBookN

Re: Listview / input components repaint via ajax?

2007-08-27 Thread Carlos Pita
You can set defaultFormProcessing to false too, and post the list with an ajaxsubmitlink. Btw, I have written a very dynamic list that we are using for cases like yours. It consists of nodes that are implemented as a chained list of fragments, each equipped with previous, next and item placeholder

Re: RepeatingView : Removing a table row

2007-08-27 Thread Carlos Pita
> > > I am currently trying to convert the RepeatingView into a ListView, but I > am > having problems > setting the model on the ListView. I call populateItem with a model, but > afterwards the model > is not being set on the view. That's funny. Could you post the related code? Regards, Carlos

Re: AJAX form submit and validation

2007-08-26 Thread Carlos Pita
On 8/26/07, Ian Godman <[EMAIL PROTECTED]> wrote: > > I worked it out. Very simple solution! > > On the AjaxSubmitLink override the onError method and add the feedback > panel to the AjaxRequestTarget ! > > > Ian Yes, that or setDefaultFormProcessing(false) as Eelco suggested before. That's not

Re: RepeatingView : Removing a table row

2007-08-26 Thread Carlos Pita
And now that I *really* look at this while (exerciseTable.iterator().hasNext()) { WebMarkupContainer container = (WebMarkupContainer) exerciseTable.iterator().next(); if (container.get ("exerciseSelected").getModelObjectAsString().equals(StaticData

Re: RepeatingView : Removing a table row

2007-08-26 Thread Carlos Pita
Hi, it worked fine for me, I attach my own code so you can compare. Btw, why don't you just use a listview with a model that filters out the selected items? Imo it's simpler and more elegant. And another remark: you can bind your checkbox to a boolean (see my example). Regards, Carlos On 8/26/07

Saving another page into session from ajax request

2007-08-25 Thread Carlos Pita
Hi all, how should i save a page -that I'm modifying from an ajax request originated at another page- into the session, if possible? The target page is an iframe nested inside the source one. For the record, I'm doing this trick not for the pleasure it brings but because of the need to upload fil

Re: Template tags

2007-08-18 Thread Carlos Pita
per(id, model); > add(new AbstractTransformerBehavior() { >public CharSequence transform(Component c, CharSequence output) { > return new > TextTemplate(output).asString((Map)Template.this.getModelObject()); >} > }); > } > } > > -igor > >

Template tags

2007-08-18 Thread Carlos Pita
Hi all, one need that repeatedly araises in our project is the one to write some javascript support code to be called from event behaviors or to integrate external libraries. Often these code fragments need to reference other wicket managed tags that have their own auto generated ids. So normally w

Re: Ajax submit form with empty file input

2007-08-13 Thread Carlos Pita
ingle fields and submit behaviors do its job for the entire form, so afaik it's a matter of all or nothing (well, all or one) just right now. On 8/13/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote: > > no, ajax submits do not support multipart forms. > > -igor > > > On 8

Ajax submit form with empty file input

2007-08-13 Thread Carlos Pita
Hi all, is it possible to ajax submit a form that has a file input between its fields, even if this input is always empty at the time of submission? For example, the following example throws a 'ServletRequest does not contain multipart content' exception when clicking the ajaxSubmit button, even

Re: contributing to header (was: Must renderHead even if setVisible(false))

2007-07-31 Thread Carlos Pita
ld be > invoked, because if the components are not visible, they might not be > even built (like in the listView example). Also this doesn't solve the > problem when you add component later to the page (using ajax.) > > -Matej > > On 7/31/07, Carlos Pita <[EMAIL PROTECTED

Re: contributing to header (was: Must renderHead even if setVisible(false))

2007-07-31 Thread Carlos Pita
and a component that is not visible is anyway dynamically contributing its header if added to the ajax target). Cheers, Carlos On 7/31/07, Carlos Pita <[EMAIL PROTECTED]> wrote: > > Because of a security restriction at the browser (firefox) side. I can't > dynamically incl

Re: contributing to header (was: Must renderHead even if setVisible(false))

2007-07-31 Thread Carlos Pita
;t really understand what your problem is. Wicket has AJAX header > contribution, which should load the javascript dynamically for you. > Doesn't this work for you? > > -Matej > > On 7/31/07, Carlos Pita <[EMAIL PROTECTED]> wrote: > > Yes Gwen, > > > > ther

Re: contributing to header (was: Must renderHead even if setVisible(false))

2007-07-31 Thread Carlos Pita
Yes Gwen, there are a couple of workarounds, of course, I could call renderHead explicitly from the page too. But the case seems not too uncommon imo (a component that includes some external javascript and isn't showed at first). Maybe it should be supported directly by wicket, after all a compone

Must renderHead even if setVisible(false)

2007-07-30 Thread Carlos Pita
Hi all, I have a component that contributes some javascript to the header. Initially the component won't be shown but an ajax event could make it visible. The problem is that the javascript is contributed later, during the ajax response, and there is a security concern with firefox: "permission den