Re: Transactions..... again!

2008-09-18 Thread Igor Vaynberg
aspectj is pretty cool, but its expression language is somewhat
limited. for example salve allows

public void somefunction(@NotNull Integer a, @NotEmpty String b) {}

aspectj, at least when i started salve, did not have an expression
that would let you match a function if its argument was annotated with
a specific annot.

also i need things like removing/adding fields and contributing to
clinit. aspectj is great for quickly matching on something and then
adding something around, not for complex bytecode manipulation.

i started out writing salve with javassist, but i got tired of writing
java code in strings. i wanted to be in complete control of bytecode
to make sure it was as efficient as possible so in the end i learned a
bit about bytecode and ended up using ASM.

-igor

On Thu, Sep 18, 2008 at 7:14 PM, James Carman
<[EMAIL PROTECTED]> wrote:
> On Thu, Sep 18, 2008 at 9:48 PM, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
>> read my email, i said it is possible without salve. salve just makes
>> it easier by letting you put the annotation on any method of any
>> class.
>>
>
> Ok, the Spring annotations/aspects do have a limitation that they need
> to be on at least protected methods, I think.
>
>> salve ships with 3 instrumentation options. there is the agent for
>> load time weaving, a maven2 plugin for compile time weaving, and an
>> eclipse plugin for dev time weaving.
>
> Cool.  So, why doesn't Salve just use aspects and AspectJ to achieve
> what it wants (AspectJ supports the same 3 instrumentation options)?
> Did you write your own instrumentation?  Do you not like the
> syntax/architecture of AspectJ?  Just curious.  I'm all about writing
> stuff my own way. :)
>
>>
>> i have also recently added something cool for wicket - expression
>> checking. if you use salve's contract instrumentor you can have it
>> validate property expressions, so you can do
>>
>> new PropertyModel(contact, new PE(Contact.class,
>> "address.street1").toString()) and get an instrumentation, read
>> compile, time error if there is no contact.getaddress().getstreet1().
>> doesnt refactor like the proxy idea but is also much more light weight
>> and works on map and list properties.
>
> That is pretty cool!
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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



Forwarding to a servlet

2008-09-18 Thread David Leangen

Hi!

What's a clean way to forward a request to another existent non-Wicket
servlet?

I have a wicket page that handles user input, then the input should be
processed by the existing servlet. 

Rather than redirecting to an external URL, I thought it would be nice
to just forward the request to the other servlet. However, I'm worried
that this will leave Wicket is some strange state...


Thanks!
David




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



Re: Tables

2008-09-18 Thread Peter Thomas
Hi,

I think you should use a ListView.  You can easily nest one within another.
For your particular requirement, you can even consider using a single table
instead of embedding a child table.  By controlling "colspan" the attribute
columns can "line up" in case you need that.  Have a look at this example
which is part of a comparison of GWT with Wicket

http://ptrthomas.wordpress.com/2008/09/04/wicket-and-gwt-compared-with-code/


Thanks,

Peter.

On Thu, Sep 18, 2008 at 9:52 PM, michael4321 <[EMAIL PROTECTED]> wrote:

>
> Hi,
>
>   I have a table within a table, basically each row has some main details,
> and the sub table lists attributes for the row.  The issue I'm having is
> that not all attributes should display for each row, and I'm not sure how
> to
> get around this.
>
>
> ex.
> 
>   
>   
>   
>
>
>
>
>
>   
>   
> 
>
> some rows I'd like to only display attrib1 and attrib2 and other rows I may
> display all three,...
> I'm using a RepeatingView to populate the table, I'm guessing that this is
> probably wrong.
>
> Is there a way to  have a a list dependent upon another list? like below?
>
> 
>   
>   
>   
>
>
>
>
>
>   
>   
> 
>
>
>
>
>
>
> --
> View this message in context:
> http://www.nabble.com/Tables-tp19556708p19556708.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Transactions..... again!

2008-09-18 Thread James Carman
On Thu, Sep 18, 2008 at 9:48 PM, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> read my email, i said it is possible without salve. salve just makes
> it easier by letting you put the annotation on any method of any
> class.
>

Ok, the Spring annotations/aspects do have a limitation that they need
to be on at least protected methods, I think.

> salve ships with 3 instrumentation options. there is the agent for
> load time weaving, a maven2 plugin for compile time weaving, and an
> eclipse plugin for dev time weaving.

Cool.  So, why doesn't Salve just use aspects and AspectJ to achieve
what it wants (AspectJ supports the same 3 instrumentation options)?
Did you write your own instrumentation?  Do you not like the
syntax/architecture of AspectJ?  Just curious.  I'm all about writing
stuff my own way. :)

>
> i have also recently added something cool for wicket - expression
> checking. if you use salve's contract instrumentor you can have it
> validate property expressions, so you can do
>
> new PropertyModel(contact, new PE(Contact.class,
> "address.street1").toString()) and get an instrumentation, read
> compile, time error if there is no contact.getaddress().getstreet1().
> doesnt refactor like the proxy idea but is also much more light weight
> and works on map and list properties.

That is pretty cool!

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



Re: Transactions..... again!

2008-09-18 Thread Igor Vaynberg
read my email, i said it is possible without salve. salve just makes
it easier by letting you put the annotation on any method of any
class.

salve ships with 3 instrumentation options. there is the agent for
load time weaving, a maven2 plugin for compile time weaving, and an
eclipse plugin for dev time weaving.

i have also recently added something cool for wicket - expression
checking. if you use salve's contract instrumentor you can have it
validate property expressions, so you can do

new PropertyModel(contact, new PE(Contact.class,
"address.street1").toString()) and get an instrumentation, read
compile, time error if there is no contact.getaddress().getstreet1().
doesnt refactor like the proxy idea but is also much more light weight
and works on map and list properties.

-igor

On Thu, Sep 18, 2008 at 6:42 PM, James Carman
<[EMAIL PROTECTED]> wrote:
> I didn't think so.  My apologies if I misunderstood.  I was talking
> about using the spring-aspects stuff and having the AspectJ compiler
> weave the aspects into your code at compile time.  Isn't Salve a
> load-time weaver?
>
> On Thu, Sep 18, 2008 at 8:37 PM, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
>> isnt that what i said?
>>
>> -igor
>>
>> On Thu, Sep 18, 2008 at 4:11 PM, James Carman
>> <[EMAIL PROTECTED]> wrote:
>>> You don't need Salve for that.  You can just use the AspectJ compiler
>>> and weave the transactional support into your form class.
>>>
>>> On Thu, Sep 18, 2008 at 6:49 PM, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
 with salve you can do a neat thing:

 class transactionalform extends form {
   @Transactional process() {
super.process();
   }
 }

 now if your form uses an ldm that loads an entity you dont even need
 an onsubmit, things just get updated automatically because model
 updates happen within a transaction.

 you can do the same without salve but you will have to manually start
 and commit/rollback the transaction.

 this is probably the easiest way if you have a rich model and it
 doesnt invole the somewhat ugly merge call. of course this wont work
 for all forms, but for most i think it should.

 -igor

 On Thu, Sep 18, 2008 at 3:43 PM, Ryan <[EMAIL PROTECTED]> wrote:
> I know this topic has come up a few times on the list but I wanted to
> rehash some ideas again.
>
> I'm using Spring/Hibernate/Declarative Transactions. We try to keep our
> data-models rich and that helps a lot with transactional support
> (services direct the rich-models and commit at the end of the service
> call).
>
> I still occasionally run into times when I want the onSubmit in a form
> to start a transaction. I've basically decided to just use Spring's
> programmatic transaction demarcation in those areas. Ive seen Igor
> mention Salve, but I could not find any good examples, and I am not very
> familier with Guice.
>
> Aside from these ideas, has anyone used a different method for starting
> transactions inside of wicket when needed?
>
> Thanks!
> Ryan
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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


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

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



Re: Hibernate and DomainLoadableModels

2008-09-18 Thread James Carman
If you're using Spring, you can inject whatever you want into your
listener.  You can add your listener bean to the list of listeners in
your application context configuration file.

On Thu, Sep 18, 2008 at 7:23 PM, Ryan <[EMAIL PROTECTED]> wrote:
> Yea I looked into that, unfortunately I need more information than I
> will have in an interceptor/listener.
>
> -Ryan
>
> On Thu, Sep 18, 2008 at 07:12:31PM -0400, James Carman exclaimed:
>
>>You're probably better off setting up a Hibernate listener if you want
>>to do audit logging.  Check out the Java Persistence with Hibernate
>>book for an example (if you have it).
>>
>>On Thu, Sep 18, 2008 at 6:51 PM, Ryan <[EMAIL PROTECTED]> wrote:
>>> I keep running into a similar issue and it comes down to me missing some
>>> fundamental knowledge of Hibernate, but I was hoping someone here could
>>> help point me in the right direction.
>>>
>>> Consider a Hibernate model called Child and it has a property called
>>> firstName. Now lets say I use a LoadableModel for the Child and tie 
>>> firstName to a
>>> TextField via a property model.
>>>
>>> In Form.onSubmit I want to call some business logic classes and pass in
>>> the Child (so far no problem). Due to the OpenSessionInViewFilter and
>>> LoadableModel the current Hibernate session context has a persistent
>>> Child (that wicket has subsequently called setName on). In this code I
>>> want to be able to query out the Child object as it is in the DB and
>>> compare it to the modified, but uncommitted Child.
>>>
>>> We use this to either create an audit trail or show on the screen:
>>> "Child's First Name changed from X to Y".
>>>
>>> In this simple example I could keep track of this in Wicket, but its
>>> harder with more complex relationships.
>>>
>>> Is it possible with Hibernate to say give me the Child model from the DB
>>> and not the currently active instance that is tied to the session?
>>>
>>> Thanks,
>>> Ryan
>>>
>>> -
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>
>>-
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>For additional commands, e-mail: [EMAIL PROTECTED]
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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



Re: Transactions..... again!

2008-09-18 Thread James Carman
I didn't think so.  My apologies if I misunderstood.  I was talking
about using the spring-aspects stuff and having the AspectJ compiler
weave the aspects into your code at compile time.  Isn't Salve a
load-time weaver?

On Thu, Sep 18, 2008 at 8:37 PM, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> isnt that what i said?
>
> -igor
>
> On Thu, Sep 18, 2008 at 4:11 PM, James Carman
> <[EMAIL PROTECTED]> wrote:
>> You don't need Salve for that.  You can just use the AspectJ compiler
>> and weave the transactional support into your form class.
>>
>> On Thu, Sep 18, 2008 at 6:49 PM, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
>>> with salve you can do a neat thing:
>>>
>>> class transactionalform extends form {
>>>   @Transactional process() {
>>>super.process();
>>>   }
>>> }
>>>
>>> now if your form uses an ldm that loads an entity you dont even need
>>> an onsubmit, things just get updated automatically because model
>>> updates happen within a transaction.
>>>
>>> you can do the same without salve but you will have to manually start
>>> and commit/rollback the transaction.
>>>
>>> this is probably the easiest way if you have a rich model and it
>>> doesnt invole the somewhat ugly merge call. of course this wont work
>>> for all forms, but for most i think it should.
>>>
>>> -igor
>>>
>>> On Thu, Sep 18, 2008 at 3:43 PM, Ryan <[EMAIL PROTECTED]> wrote:
 I know this topic has come up a few times on the list but I wanted to
 rehash some ideas again.

 I'm using Spring/Hibernate/Declarative Transactions. We try to keep our
 data-models rich and that helps a lot with transactional support
 (services direct the rich-models and commit at the end of the service
 call).

 I still occasionally run into times when I want the onSubmit in a form
 to start a transaction. I've basically decided to just use Spring's
 programmatic transaction demarcation in those areas. Ive seen Igor
 mention Salve, but I could not find any good examples, and I am not very
 familier with Guice.

 Aside from these ideas, has anyone used a different method for starting
 transactions inside of wicket when needed?

 Thanks!
 Ryan

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


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

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



Re: Transactions..... again!

2008-09-18 Thread Igor Vaynberg
isnt that what i said?

-igor

On Thu, Sep 18, 2008 at 4:11 PM, James Carman
<[EMAIL PROTECTED]> wrote:
> You don't need Salve for that.  You can just use the AspectJ compiler
> and weave the transactional support into your form class.
>
> On Thu, Sep 18, 2008 at 6:49 PM, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
>> with salve you can do a neat thing:
>>
>> class transactionalform extends form {
>>   @Transactional process() {
>>super.process();
>>   }
>> }
>>
>> now if your form uses an ldm that loads an entity you dont even need
>> an onsubmit, things just get updated automatically because model
>> updates happen within a transaction.
>>
>> you can do the same without salve but you will have to manually start
>> and commit/rollback the transaction.
>>
>> this is probably the easiest way if you have a rich model and it
>> doesnt invole the somewhat ugly merge call. of course this wont work
>> for all forms, but for most i think it should.
>>
>> -igor
>>
>> On Thu, Sep 18, 2008 at 3:43 PM, Ryan <[EMAIL PROTECTED]> wrote:
>>> I know this topic has come up a few times on the list but I wanted to
>>> rehash some ideas again.
>>>
>>> I'm using Spring/Hibernate/Declarative Transactions. We try to keep our
>>> data-models rich and that helps a lot with transactional support
>>> (services direct the rich-models and commit at the end of the service
>>> call).
>>>
>>> I still occasionally run into times when I want the onSubmit in a form
>>> to start a transaction. I've basically decided to just use Spring's
>>> programmatic transaction demarcation in those areas. Ive seen Igor
>>> mention Salve, but I could not find any good examples, and I am not very
>>> familier with Guice.
>>>
>>> Aside from these ideas, has anyone used a different method for starting
>>> transactions inside of wicket when needed?
>>>
>>> Thanks!
>>> Ryan
>>>
>>> -
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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



Re: Hibernate and DomainLoadableModels

2008-09-18 Thread Ryan
Yea I looked into that, unfortunately I need more information than I
will have in an interceptor/listener. 

-Ryan

On Thu, Sep 18, 2008 at 07:12:31PM -0400, James Carman exclaimed:

>You're probably better off setting up a Hibernate listener if you want
>to do audit logging.  Check out the Java Persistence with Hibernate
>book for an example (if you have it).
>
>On Thu, Sep 18, 2008 at 6:51 PM, Ryan <[EMAIL PROTECTED]> wrote:
>> I keep running into a similar issue and it comes down to me missing some
>> fundamental knowledge of Hibernate, but I was hoping someone here could
>> help point me in the right direction.
>>
>> Consider a Hibernate model called Child and it has a property called
>> firstName. Now lets say I use a LoadableModel for the Child and tie 
>> firstName to a
>> TextField via a property model.
>>
>> In Form.onSubmit I want to call some business logic classes and pass in
>> the Child (so far no problem). Due to the OpenSessionInViewFilter and
>> LoadableModel the current Hibernate session context has a persistent
>> Child (that wicket has subsequently called setName on). In this code I
>> want to be able to query out the Child object as it is in the DB and
>> compare it to the modified, but uncommitted Child.
>>
>> We use this to either create an audit trail or show on the screen:
>> "Child's First Name changed from X to Y".
>>
>> In this simple example I could keep track of this in Wicket, but its
>> harder with more complex relationships.
>>
>> Is it possible with Hibernate to say give me the Child model from the DB
>> and not the currently active instance that is tied to the session?
>>
>> Thanks,
>> Ryan
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]

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



Re: Transactions..... again!

2008-09-18 Thread Ryan
Igor,

This looks like it would be ideal, I'll read more about Salve and see if
I can get it working. 

-Ryan

On Thu, Sep 18, 2008 at 03:49:23PM -0700, Igor Vaynberg exclaimed:

>with salve you can do a neat thing:
>
>class transactionalform extends form {
>   @Transactional process() {
>super.process();
>   }
>}
>
>now if your form uses an ldm that loads an entity you dont even need
>an onsubmit, things just get updated automatically because model
>updates happen within a transaction.
>
>you can do the same without salve but you will have to manually start
>and commit/rollback the transaction.
>
>this is probably the easiest way if you have a rich model and it
>doesnt invole the somewhat ugly merge call. of course this wont work
>for all forms, but for most i think it should.
>
>-igor
>
>On Thu, Sep 18, 2008 at 3:43 PM, Ryan <[EMAIL PROTECTED]> wrote:
>> I know this topic has come up a few times on the list but I wanted to
>> rehash some ideas again.
>>
>> I'm using Spring/Hibernate/Declarative Transactions. We try to keep our
>> data-models rich and that helps a lot with transactional support
>> (services direct the rich-models and commit at the end of the service
>> call).
>>
>> I still occasionally run into times when I want the onSubmit in a form
>> to start a transaction. I've basically decided to just use Spring's
>> programmatic transaction demarcation in those areas. Ive seen Igor
>> mention Salve, but I could not find any good examples, and I am not very
>> familier with Guice.
>>
>> Aside from these ideas, has anyone used a different method for starting
>> transactions inside of wicket when needed?
>>
>> Thanks!
>> Ryan
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]

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



Re: Hibernate and DomainLoadableModels

2008-09-18 Thread James Carman
You're probably better off setting up a Hibernate listener if you want
to do audit logging.  Check out the Java Persistence with Hibernate
book for an example (if you have it).

On Thu, Sep 18, 2008 at 6:51 PM, Ryan <[EMAIL PROTECTED]> wrote:
> I keep running into a similar issue and it comes down to me missing some
> fundamental knowledge of Hibernate, but I was hoping someone here could
> help point me in the right direction.
>
> Consider a Hibernate model called Child and it has a property called
> firstName. Now lets say I use a LoadableModel for the Child and tie firstName 
> to a
> TextField via a property model.
>
> In Form.onSubmit I want to call some business logic classes and pass in
> the Child (so far no problem). Due to the OpenSessionInViewFilter and
> LoadableModel the current Hibernate session context has a persistent
> Child (that wicket has subsequently called setName on). In this code I
> want to be able to query out the Child object as it is in the DB and
> compare it to the modified, but uncommitted Child.
>
> We use this to either create an audit trail or show on the screen:
> "Child's First Name changed from X to Y".
>
> In this simple example I could keep track of this in Wicket, but its
> harder with more complex relationships.
>
> Is it possible with Hibernate to say give me the Child model from the DB
> and not the currently active instance that is tied to the session?
>
> Thanks,
> Ryan
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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



Re: Hibernate and DomainLoadableModels

2008-09-18 Thread Ryan
Igor,

Thanks! This is a different project from  my previous email. With
rich-models the models handle this information themselves and it is much
easier.

-Ryan

On Thu, Sep 18, 2008 at 03:59:46PM -0700, Igor Vaynberg exclaimed:

>open another session/transaction and query it from there
>
>-igor
>
>On Thu, Sep 18, 2008 at 3:51 PM, Ryan <[EMAIL PROTECTED]> wrote:
>> I keep running into a similar issue and it comes down to me missing some
>> fundamental knowledge of Hibernate, but I was hoping someone here could
>> help point me in the right direction.
>>
>> Consider a Hibernate model called Child and it has a property called
>> firstName. Now lets say I use a LoadableModel for the Child and tie 
>> firstName to a
>> TextField via a property model.
>>
>> In Form.onSubmit I want to call some business logic classes and pass in
>> the Child (so far no problem). Due to the OpenSessionInViewFilter and
>> LoadableModel the current Hibernate session context has a persistent
>> Child (that wicket has subsequently called setName on). In this code I
>> want to be able to query out the Child object as it is in the DB and
>> compare it to the modified, but uncommitted Child.
>>
>> We use this to either create an audit trail or show on the screen:
>> "Child's First Name changed from X to Y".
>>
>> In this simple example I could keep track of this in Wicket, but its
>> harder with more complex relationships.
>>
>> Is it possible with Hibernate to say give me the Child model from the DB
>> and not the currently active instance that is tied to the session?
>>
>> Thanks,
>> Ryan
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]

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



Re: Transactions..... again!

2008-09-18 Thread James Carman
You don't need Salve for that.  You can just use the AspectJ compiler
and weave the transactional support into your form class.

On Thu, Sep 18, 2008 at 6:49 PM, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> with salve you can do a neat thing:
>
> class transactionalform extends form {
>   @Transactional process() {
>super.process();
>   }
> }
>
> now if your form uses an ldm that loads an entity you dont even need
> an onsubmit, things just get updated automatically because model
> updates happen within a transaction.
>
> you can do the same without salve but you will have to manually start
> and commit/rollback the transaction.
>
> this is probably the easiest way if you have a rich model and it
> doesnt invole the somewhat ugly merge call. of course this wont work
> for all forms, but for most i think it should.
>
> -igor
>
> On Thu, Sep 18, 2008 at 3:43 PM, Ryan <[EMAIL PROTECTED]> wrote:
>> I know this topic has come up a few times on the list but I wanted to
>> rehash some ideas again.
>>
>> I'm using Spring/Hibernate/Declarative Transactions. We try to keep our
>> data-models rich and that helps a lot with transactional support
>> (services direct the rich-models and commit at the end of the service
>> call).
>>
>> I still occasionally run into times when I want the onSubmit in a form
>> to start a transaction. I've basically decided to just use Spring's
>> programmatic transaction demarcation in those areas. Ive seen Igor
>> mention Salve, but I could not find any good examples, and I am not very
>> familier with Guice.
>>
>> Aside from these ideas, has anyone used a different method for starting
>> transactions inside of wicket when needed?
>>
>> Thanks!
>> Ryan
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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



Re: Hibernate and DomainLoadableModels

2008-09-18 Thread Igor Vaynberg
open another session/transaction and query it from there

-igor

On Thu, Sep 18, 2008 at 3:51 PM, Ryan <[EMAIL PROTECTED]> wrote:
> I keep running into a similar issue and it comes down to me missing some
> fundamental knowledge of Hibernate, but I was hoping someone here could
> help point me in the right direction.
>
> Consider a Hibernate model called Child and it has a property called
> firstName. Now lets say I use a LoadableModel for the Child and tie firstName 
> to a
> TextField via a property model.
>
> In Form.onSubmit I want to call some business logic classes and pass in
> the Child (so far no problem). Due to the OpenSessionInViewFilter and
> LoadableModel the current Hibernate session context has a persistent
> Child (that wicket has subsequently called setName on). In this code I
> want to be able to query out the Child object as it is in the DB and
> compare it to the modified, but uncommitted Child.
>
> We use this to either create an audit trail or show on the screen:
> "Child's First Name changed from X to Y".
>
> In this simple example I could keep track of this in Wicket, but its
> harder with more complex relationships.
>
> Is it possible with Hibernate to say give me the Child model from the DB
> and not the currently active instance that is tied to the session?
>
> Thanks,
> Ryan
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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



Hibernate and DomainLoadableModels

2008-09-18 Thread Ryan
I keep running into a similar issue and it comes down to me missing some
fundamental knowledge of Hibernate, but I was hoping someone here could
help point me in the right direction.

Consider a Hibernate model called Child and it has a property called
firstName. Now lets say I use a LoadableModel for the Child and tie firstName 
to a
TextField via a property model.

In Form.onSubmit I want to call some business logic classes and pass in
the Child (so far no problem). Due to the OpenSessionInViewFilter and
LoadableModel the current Hibernate session context has a persistent
Child (that wicket has subsequently called setName on). In this code I
want to be able to query out the Child object as it is in the DB and
compare it to the modified, but uncommitted Child. 

We use this to either create an audit trail or show on the screen:
"Child's First Name changed from X to Y".

In this simple example I could keep track of this in Wicket, but its
harder with more complex relationships.

Is it possible with Hibernate to say give me the Child model from the DB
and not the currently active instance that is tied to the session?

Thanks,
Ryan

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



Re: Transactions..... again!

2008-09-18 Thread Igor Vaynberg
with salve you can do a neat thing:

class transactionalform extends form {
   @Transactional process() {
super.process();
   }
}

now if your form uses an ldm that loads an entity you dont even need
an onsubmit, things just get updated automatically because model
updates happen within a transaction.

you can do the same without salve but you will have to manually start
and commit/rollback the transaction.

this is probably the easiest way if you have a rich model and it
doesnt invole the somewhat ugly merge call. of course this wont work
for all forms, but for most i think it should.

-igor

On Thu, Sep 18, 2008 at 3:43 PM, Ryan <[EMAIL PROTECTED]> wrote:
> I know this topic has come up a few times on the list but I wanted to
> rehash some ideas again.
>
> I'm using Spring/Hibernate/Declarative Transactions. We try to keep our
> data-models rich and that helps a lot with transactional support
> (services direct the rich-models and commit at the end of the service
> call).
>
> I still occasionally run into times when I want the onSubmit in a form
> to start a transaction. I've basically decided to just use Spring's
> programmatic transaction demarcation in those areas. Ive seen Igor
> mention Salve, but I could not find any good examples, and I am not very
> familier with Guice.
>
> Aside from these ideas, has anyone used a different method for starting
> transactions inside of wicket when needed?
>
> Thanks!
> Ryan
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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



Transactions..... again!

2008-09-18 Thread Ryan
I know this topic has come up a few times on the list but I wanted to
rehash some ideas again.

I'm using Spring/Hibernate/Declarative Transactions. We try to keep our
data-models rich and that helps a lot with transactional support
(services direct the rich-models and commit at the end of the service
call).

I still occasionally run into times when I want the onSubmit in a form
to start a transaction. I've basically decided to just use Spring's
programmatic transaction demarcation in those areas. Ive seen Igor
mention Salve, but I could not find any good examples, and I am not very
familier with Guice.

Aside from these ideas, has anyone used a different method for starting
transactions inside of wicket when needed?

Thanks!
Ryan

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



Re: Turning off SWARM for testing?

2008-09-18 Thread Neil McT


Sorry - fairly new to Wicket - don't quite follow. Do you mean subclass
AuthenticatedWebSession in the test environment to always return true on
authenticate() ? How would this play with SWARM?

I have just found an, albeit more convoluted, solution

My TestApplication class overrides setupStrategyFactory to return a dummy
strategy factory which is configured with a stub implementation of
ISecureComponent. Digging about in the SWARM code it seems that only
subclasses of this stub will be authenticated - and as there are no
subclasses, authentication has been essentially circumvented.

Not the prettiest solution but it _seems_ to work.






Martijn Dashorst wrote:
> 
> Why not create an authenticated session instead?
> 
> Martijn
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Turning-off-SWARM-for-testing--tp19557765p19560295.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Turning off SWARM for testing?

2008-09-18 Thread Martijn Dashorst
Why not create an authenticated session instead?

Martijn

On Thu, Sep 18, 2008 at 8:59 PM, Neil McT <[EMAIL PROTECTED]> wrote:
>
>
> I tried that but it didn't work.
>
> But it did remove the need for me to manufacture a unique hive-key per
> WicketTester instance... so it wasn't a total loss :)
>
>
>
>
> Hoover, William wrote:
>>
>> Try HiveMind.unregisterHive(hiveKey);
>>
>>
>>
>
> --
> View this message in context: 
> http://www.nabble.com/Turning-off-SWARM-for-testing--tp19557765p19558799.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



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

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



RE: Turning off SWARM for testing?

2008-09-18 Thread Neil McT


I tried that but it didn't work.

But it did remove the need for me to manufacture a unique hive-key per
WicketTester instance... so it wasn't a total loss :) 




Hoover, William wrote:
> 
> Try HiveMind.unregisterHive(hiveKey); 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Turning-off-SWARM-for-testing--tp19557765p19558799.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Turning off SWARM for testing?

2008-09-18 Thread Igor Vaynberg
thats why we have packages :)

-igor

On Thu, Sep 18, 2008 at 11:37 AM, James Carman
<[EMAIL PROTECTED]> wrote:
> Well, coming from a member of the Apache HiveMind PMC, that's confusing.
>
> On Thu, Sep 18, 2008 at 2:30 PM, Hoover, William <[EMAIL PROTECTED]> wrote:
>> Yeah, really :) the param name in the register method is for the hive
>> key is "queen"... hmmm... I wonder if any exceptions refer to you
>> getting stung
>>
>> -Original Message-
>> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
>> On Behalf Of James Carman
>> Sent: Thursday, September 18, 2008 2:24 PM
>> To: users@wicket.apache.org
>> Subject: Re: Turning off SWARM for testing?
>>
>> Way to poach a name! :)
>>
>> On Thu, Sep 18, 2008 at 2:17 PM, Hoover, William <[EMAIL PROTECTED]>
>> wrote:
>>> Yes, the same org.apache.wicket.security.hive.HiveMind used to
>>> HiveMind.registerHive(getHiveKey(), factory) the factory in
>>> SwarmWebApplication#setUpHive()
>>>
>>> -Original Message-
>>> From: [EMAIL PROTECTED]
>>> [mailto:[EMAIL PROTECTED]
>>> On Behalf Of James Carman
>>> Sent: Thursday, September 18, 2008 2:07 PM
>>> To: users@wicket.apache.org
>>> Subject: Re: Turning off SWARM for testing?
>>>
>>> HiveMind?
>>>
>>> On Thu, Sep 18, 2008 at 2:03 PM, Hoover, William <[EMAIL PROTECTED]>
>>> wrote:
 Try HiveMind.unregisterHive(hiveKey);

 -Original Message-
 From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
 Sent: Thursday, September 18, 2008 1:56 PM
 To: users@wicket.apache.org
 Subject: Re: Turning off SWARM for testing?

 sorry, i dont know anything about swarm itself. maybe during test you
>>
 override setuphive() and give it a policy that allows everything and
 does not require a login.

 -igor

 On Thu, Sep 18, 2008 at 10:45 AM, Neil McT
 <[EMAIL PROTECTED]>
 wrote:
>
> Sorry not sure what you mean by 'swarm auth strategy'
>
> My application class extends SwarmWebApplication and the only SWARM
> specific methods it overrides are getHiveKey() and setUpHive() -
> where

> I add the policy file. Is it one of these that I should be 'nulling
 out' for testing?
>
> Thanks.
>
>
>
>
> igor.vaynberg wrote:
>>
>> have an overrideable method on your application boolean
>> issecurityenabled(), and only add swarm auth strategy if it returns
>>
>> true. that way during tests you can give tester a subclass of your
>> app that returns false.
>>
>> -igor
>>
>>
>
> --
> View this message in context:
> http://www.nabble.com/Turning-off-SWARM-for-testing--tp19557765p1955
> 8
> 1 53.html Sent from the Wicket - User mailing list archive at
> Nabble.com.
>
>
> 
> - To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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



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


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

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



Re: Turning off SWARM for testing?

2008-09-18 Thread James Carman
Well, coming from a member of the Apache HiveMind PMC, that's confusing.

On Thu, Sep 18, 2008 at 2:30 PM, Hoover, William <[EMAIL PROTECTED]> wrote:
> Yeah, really :) the param name in the register method is for the hive
> key is "queen"... hmmm... I wonder if any exceptions refer to you
> getting stung
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> On Behalf Of James Carman
> Sent: Thursday, September 18, 2008 2:24 PM
> To: users@wicket.apache.org
> Subject: Re: Turning off SWARM for testing?
>
> Way to poach a name! :)
>
> On Thu, Sep 18, 2008 at 2:17 PM, Hoover, William <[EMAIL PROTECTED]>
> wrote:
>> Yes, the same org.apache.wicket.security.hive.HiveMind used to
>> HiveMind.registerHive(getHiveKey(), factory) the factory in
>> SwarmWebApplication#setUpHive()
>>
>> -Original Message-
>> From: [EMAIL PROTECTED]
>> [mailto:[EMAIL PROTECTED]
>> On Behalf Of James Carman
>> Sent: Thursday, September 18, 2008 2:07 PM
>> To: users@wicket.apache.org
>> Subject: Re: Turning off SWARM for testing?
>>
>> HiveMind?
>>
>> On Thu, Sep 18, 2008 at 2:03 PM, Hoover, William <[EMAIL PROTECTED]>
>> wrote:
>>> Try HiveMind.unregisterHive(hiveKey);
>>>
>>> -Original Message-
>>> From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
>>> Sent: Thursday, September 18, 2008 1:56 PM
>>> To: users@wicket.apache.org
>>> Subject: Re: Turning off SWARM for testing?
>>>
>>> sorry, i dont know anything about swarm itself. maybe during test you
>
>>> override setuphive() and give it a policy that allows everything and
>>> does not require a login.
>>>
>>> -igor
>>>
>>> On Thu, Sep 18, 2008 at 10:45 AM, Neil McT
>>> <[EMAIL PROTECTED]>
>>> wrote:

 Sorry not sure what you mean by 'swarm auth strategy'

 My application class extends SwarmWebApplication and the only SWARM
 specific methods it overrides are getHiveKey() and setUpHive() -
 where
>>>
 I add the policy file. Is it one of these that I should be 'nulling
>>> out' for testing?

 Thanks.




 igor.vaynberg wrote:
>
> have an overrideable method on your application boolean
> issecurityenabled(), and only add swarm auth strategy if it returns
>
> true. that way during tests you can give tester a subclass of your
> app that returns false.
>
> -igor
>
>

 --
 View this message in context:
 http://www.nabble.com/Turning-off-SWARM-for-testing--tp19557765p1955
 8
 1 53.html Sent from the Wicket - User mailing list archive at
 Nabble.com.


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


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

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



RE: Turning off SWARM for testing?

2008-09-18 Thread Hoover, William
Yeah, really :) the param name in the register method is for the hive
key is "queen"... hmmm... I wonder if any exceptions refer to you
getting stung

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of James Carman
Sent: Thursday, September 18, 2008 2:24 PM
To: users@wicket.apache.org
Subject: Re: Turning off SWARM for testing?

Way to poach a name! :)

On Thu, Sep 18, 2008 at 2:17 PM, Hoover, William <[EMAIL PROTECTED]>
wrote:
> Yes, the same org.apache.wicket.security.hive.HiveMind used to 
> HiveMind.registerHive(getHiveKey(), factory) the factory in
> SwarmWebApplication#setUpHive()
>
> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED]
> On Behalf Of James Carman
> Sent: Thursday, September 18, 2008 2:07 PM
> To: users@wicket.apache.org
> Subject: Re: Turning off SWARM for testing?
>
> HiveMind?
>
> On Thu, Sep 18, 2008 at 2:03 PM, Hoover, William <[EMAIL PROTECTED]>
> wrote:
>> Try HiveMind.unregisterHive(hiveKey);
>>
>> -Original Message-
>> From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
>> Sent: Thursday, September 18, 2008 1:56 PM
>> To: users@wicket.apache.org
>> Subject: Re: Turning off SWARM for testing?
>>
>> sorry, i dont know anything about swarm itself. maybe during test you

>> override setuphive() and give it a policy that allows everything and 
>> does not require a login.
>>
>> -igor
>>
>> On Thu, Sep 18, 2008 at 10:45 AM, Neil McT 
>> <[EMAIL PROTECTED]>
>> wrote:
>>>
>>> Sorry not sure what you mean by 'swarm auth strategy'
>>>
>>> My application class extends SwarmWebApplication and the only SWARM 
>>> specific methods it overrides are getHiveKey() and setUpHive() - 
>>> where
>>
>>> I add the policy file. Is it one of these that I should be 'nulling
>> out' for testing?
>>>
>>> Thanks.
>>>
>>>
>>>
>>>
>>> igor.vaynberg wrote:

 have an overrideable method on your application boolean 
 issecurityenabled(), and only add swarm auth strategy if it returns

 true. that way during tests you can give tester a subclass of your 
 app that returns false.

 -igor


>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Turning-off-SWARM-for-testing--tp19557765p1955
>>> 8
>>> 1 53.html Sent from the Wicket - User mailing list archive at 
>>> Nabble.com.
>>>
>>>
>>> 
>>> - To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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



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



Re: Turning off SWARM for testing?

2008-09-18 Thread James Carman
Way to poach a name! :)

On Thu, Sep 18, 2008 at 2:17 PM, Hoover, William <[EMAIL PROTECTED]> wrote:
> Yes, the same org.apache.wicket.security.hive.HiveMind used to
> HiveMind.registerHive(getHiveKey(), factory) the factory in
> SwarmWebApplication#setUpHive()
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> On Behalf Of James Carman
> Sent: Thursday, September 18, 2008 2:07 PM
> To: users@wicket.apache.org
> Subject: Re: Turning off SWARM for testing?
>
> HiveMind?
>
> On Thu, Sep 18, 2008 at 2:03 PM, Hoover, William <[EMAIL PROTECTED]>
> wrote:
>> Try HiveMind.unregisterHive(hiveKey);
>>
>> -Original Message-
>> From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
>> Sent: Thursday, September 18, 2008 1:56 PM
>> To: users@wicket.apache.org
>> Subject: Re: Turning off SWARM for testing?
>>
>> sorry, i dont know anything about swarm itself. maybe during test you
>> override setuphive() and give it a policy that allows everything and
>> does not require a login.
>>
>> -igor
>>
>> On Thu, Sep 18, 2008 at 10:45 AM, Neil McT
>> <[EMAIL PROTECTED]>
>> wrote:
>>>
>>> Sorry not sure what you mean by 'swarm auth strategy'
>>>
>>> My application class extends SwarmWebApplication and the only SWARM
>>> specific methods it overrides are getHiveKey() and setUpHive() -
>>> where
>>
>>> I add the policy file. Is it one of these that I should be 'nulling
>> out' for testing?
>>>
>>> Thanks.
>>>
>>>
>>>
>>>
>>> igor.vaynberg wrote:

 have an overrideable method on your application boolean
 issecurityenabled(), and only add swarm auth strategy if it returns
 true. that way during tests you can give tester a subclass of your
 app that returns false.

 -igor


>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Turning-off-SWARM-for-testing--tp19557765p19558
>>> 1 53.html Sent from the Wicket - User mailing list archive at
>>> Nabble.com.
>>>
>>>
>>> -
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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



RE: Turning off SWARM for testing?

2008-09-18 Thread Hoover, William
Yes, the same org.apache.wicket.security.hive.HiveMind used to
HiveMind.registerHive(getHiveKey(), factory) the factory in
SwarmWebApplication#setUpHive()

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of James Carman
Sent: Thursday, September 18, 2008 2:07 PM
To: users@wicket.apache.org
Subject: Re: Turning off SWARM for testing?

HiveMind?

On Thu, Sep 18, 2008 at 2:03 PM, Hoover, William <[EMAIL PROTECTED]>
wrote:
> Try HiveMind.unregisterHive(hiveKey);
>
> -Original Message-
> From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
> Sent: Thursday, September 18, 2008 1:56 PM
> To: users@wicket.apache.org
> Subject: Re: Turning off SWARM for testing?
>
> sorry, i dont know anything about swarm itself. maybe during test you 
> override setuphive() and give it a policy that allows everything and 
> does not require a login.
>
> -igor
>
> On Thu, Sep 18, 2008 at 10:45 AM, Neil McT 
> <[EMAIL PROTECTED]>
> wrote:
>>
>> Sorry not sure what you mean by 'swarm auth strategy'
>>
>> My application class extends SwarmWebApplication and the only SWARM 
>> specific methods it overrides are getHiveKey() and setUpHive() - 
>> where
>
>> I add the policy file. Is it one of these that I should be 'nulling
> out' for testing?
>>
>> Thanks.
>>
>>
>>
>>
>> igor.vaynberg wrote:
>>>
>>> have an overrideable method on your application boolean 
>>> issecurityenabled(), and only add swarm auth strategy if it returns 
>>> true. that way during tests you can give tester a subclass of your 
>>> app that returns false.
>>>
>>> -igor
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Turning-off-SWARM-for-testing--tp19557765p19558
>> 1 53.html Sent from the Wicket - User mailing list archive at 
>> Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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



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



Re: Turning off SWARM for testing?

2008-09-18 Thread James Carman
HiveMind?

On Thu, Sep 18, 2008 at 2:03 PM, Hoover, William <[EMAIL PROTECTED]> wrote:
> Try HiveMind.unregisterHive(hiveKey);
>
> -Original Message-
> From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
> Sent: Thursday, September 18, 2008 1:56 PM
> To: users@wicket.apache.org
> Subject: Re: Turning off SWARM for testing?
>
> sorry, i dont know anything about swarm itself. maybe during test you
> override setuphive() and give it a policy that allows everything and
> does not require a login.
>
> -igor
>
> On Thu, Sep 18, 2008 at 10:45 AM, Neil McT <[EMAIL PROTECTED]>
> wrote:
>>
>> Sorry not sure what you mean by 'swarm auth strategy'
>>
>> My application class extends SwarmWebApplication and the only SWARM
>> specific methods it overrides are getHiveKey() and setUpHive() - where
>
>> I add the policy file. Is it one of these that I should be 'nulling
> out' for testing?
>>
>> Thanks.
>>
>>
>>
>>
>> igor.vaynberg wrote:
>>>
>>> have an overrideable method on your application boolean
>>> issecurityenabled(), and only add swarm auth strategy if it returns
>>> true. that way during tests you can give tester a subclass of your
>>> app that returns false.
>>>
>>> -igor
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Turning-off-SWARM-for-testing--tp19557765p195581
>> 53.html Sent from the Wicket - User mailing list archive at
>> Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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



RE: Turning off SWARM for testing?

2008-09-18 Thread Hoover, William
Try HiveMind.unregisterHive(hiveKey); 

-Original Message-
From: Igor Vaynberg [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 18, 2008 1:56 PM
To: users@wicket.apache.org
Subject: Re: Turning off SWARM for testing?

sorry, i dont know anything about swarm itself. maybe during test you
override setuphive() and give it a policy that allows everything and
does not require a login.

-igor

On Thu, Sep 18, 2008 at 10:45 AM, Neil McT <[EMAIL PROTECTED]>
wrote:
>
> Sorry not sure what you mean by 'swarm auth strategy'
>
> My application class extends SwarmWebApplication and the only SWARM 
> specific methods it overrides are getHiveKey() and setUpHive() - where

> I add the policy file. Is it one of these that I should be 'nulling
out' for testing?
>
> Thanks.
>
>
>
>
> igor.vaynberg wrote:
>>
>> have an overrideable method on your application boolean 
>> issecurityenabled(), and only add swarm auth strategy if it returns 
>> true. that way during tests you can give tester a subclass of your 
>> app that returns false.
>>
>> -igor
>>
>>
>
> --
> View this message in context: 
> http://www.nabble.com/Turning-off-SWARM-for-testing--tp19557765p195581
> 53.html Sent from the Wicket - User mailing list archive at 
> Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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



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



Re: Turning off SWARM for testing?

2008-09-18 Thread Igor Vaynberg
sorry, i dont know anything about swarm itself. maybe during test you
override setuphive() and give it a policy that allows everything and
does not require a login.

-igor

On Thu, Sep 18, 2008 at 10:45 AM, Neil McT <[EMAIL PROTECTED]> wrote:
>
> Sorry not sure what you mean by 'swarm auth strategy'
>
> My application class extends SwarmWebApplication and the only SWARM specific
> methods it overrides are getHiveKey() and setUpHive() - where I add the
> policy file. Is it one of these that I should be 'nulling out' for testing?
>
> Thanks.
>
>
>
>
> igor.vaynberg wrote:
>>
>> have an overrideable method on your application boolean
>> issecurityenabled(), and only add swarm auth strategy if it returns
>> true. that way during tests you can give tester a subclass of your app
>> that returns false.
>>
>> -igor
>>
>>
>
> --
> View this message in context: 
> http://www.nabble.com/Turning-off-SWARM-for-testing--tp19557765p19558153.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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



Re: error handling and redirect (was: how to logout and redirect)

2008-09-18 Thread Erik van Oosten
It mainly depends on whether you would like to allow a refresh, and how 
sensitive you are to nice URLs. The key difference is that the user will 
see that he/she lands on another URL when you called setRedirect(true). 
After that a refresh will reload the error page. With redirect set to 
false, the user can try the original URL again.


Regards,
   Erik.

m_salman wrote:

Thanks for your reply.

Since I don't have much understanding of these things -- I am a kicking and
screaming web GUI developer, can you please tell me if I should use the
redirect command for my error handling code.

Really appreciate your help.



jwcarman wrote:
  

The setRedirect(true) call tells Wicket to use the Servlet API to
issue a redirect to go to the response page as opposed to just
streaming it back as the response to the current request.





  



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



Re: Turning off SWARM for testing?

2008-09-18 Thread Neil McT

Sorry not sure what you mean by 'swarm auth strategy'

My application class extends SwarmWebApplication and the only SWARM specific
methods it overrides are getHiveKey() and setUpHive() - where I add the
policy file. Is it one of these that I should be 'nulling out' for testing?

Thanks.




igor.vaynberg wrote:
> 
> have an overrideable method on your application boolean
> issecurityenabled(), and only add swarm auth strategy if it returns
> true. that way during tests you can give tester a subclass of your app
> that returns false.
> 
> -igor
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Turning-off-SWARM-for-testing--tp19557765p19558153.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Localized string retrieved with a warning message

2008-09-18 Thread Erik van Oosten


Are you sure that message is coming from this code? This code looks 
quite alright to me (though you could replace StringResourceModel(x, 
this, null) with ResourceModel(x), and change the parameter type to 
IModel).


Regards,
   Erik.


Azzeddine Daddah wrote:

Thanks Michael,

I did but the warnings are still displayed.

private void addLinks() {
addLink("home", new StringResourceModel("navigationbar.menu.home",
this, null), HomePage.class);
addLink("numberPool", new
StringResourceModel("navigationbar.menu.numberpool", this, null),
NumberPoolPage.class);
addLink("numberPoolLog", new
StringResourceModel("navigationbar.menu.numberpoollog", this, null),
NumberPoolLogPage.class);
addLink("defragment", new
StringResourceModel("navigationbar.menu.defragment", this, null),
DefragmentPage.class);
addLink("search", new
StringResourceModel("navigationbar.menu.search", this, null),
SearchPage.class);
}

private void addLink(String id, StringResourceModel model, final Class pageClass) {
BookmarkablePageLink link = new BookmarkablePageLink(id, pageClass);
link.add(new AttributeModifier("class", true, new
AbstractReadOnlyModel() {
private static final long serialVersionUID = 1L;

@Override
public Object getObject() {
String currentPageName = pageClass.getName();
String parentPageName  = getPage().getClass().getName();
return StringUtils.equals(currentPageName, parentPageName) ?
"current_page_item" : AttributeModifier.VALUELESS_ATTRIBUTE_REMOVE;
}

}));
link.add(new Label("title", model));
add(link);
}

Gr. Azzeddine

  



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



Re: Turning off SWARM for testing?

2008-09-18 Thread Igor Vaynberg
have an overrideable method on your application boolean
issecurityenabled(), and only add swarm auth strategy if it returns
true. that way during tests you can give tester a subclass of your app
that returns false.

-igor

On Thu, Sep 18, 2008 at 10:21 AM, Neil McT <[EMAIL PROTECTED]> wrote:
>
> Is there any way to turn-off / circumvent SWARM for testing?
>
> I'm using WicketTester and any time I attempt to navigate to a protected
> page (i.e. implements ISecurePage) I get bounced back to my login-page.
>
> I'd prefer not to have to go to the lengths of 'logging in' a user, just for
> tests as I'd prefer my unit tests to be as focussed as possible.
>
> Any help much appreciated.
>
> Neil.
> --
> View this message in context: 
> http://www.nabble.com/Turning-off-SWARM-for-testing--tp19557765p19557765.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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



Turning off SWARM for testing?

2008-09-18 Thread Neil McT

Is there any way to turn-off / circumvent SWARM for testing?

I'm using WicketTester and any time I attempt to navigate to a protected
page (i.e. implements ISecurePage) I get bounced back to my login-page.
 
I'd prefer not to have to go to the lengths of 'logging in' a user, just for
tests as I'd prefer my unit tests to be as focussed as possible.

Any help much appreciated.

Neil.
-- 
View this message in context: 
http://www.nabble.com/Turning-off-SWARM-for-testing--tp19557765p19557765.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Wicket not secure?

2008-09-18 Thread Jonathan Locke


to be totally explicit, the third sentence should probably say "explicit
steps must be taken *by the programmer*" ;-)

the last sentence is outdated as wicket provides URL encryption if you want
it


Johan Compagner wrote:
> 
> Why is that sentence ambiguous?
> 
> On 9/18/08, cj91 <[EMAIL PROTECTED]> wrote:
>>
>> My company is planning an extremely large web project and Wicket is a
>> candidate for use. My manager pointed out some unsettling words on the
>> Wicket FAQ, which are ambiguous unfortunately.
>> http://wicket.apache.org/features.html
>>
>Wicket is secure by default. URLs do not expose sensitive information
and
>> all component paths are
>session-relative. Explicit steps must be taken to share information
>> between sessions. There are plans
>for the next version of Wicket to add URL encryption to support highly
>> secure web sites.
>>
>>
>> Can someone please elaborate on what is meant by "Explicit steps must be
>> taken to share information between sessions."
>>
>> Thank you,
>> -Jonathan
>> --
>> View this message in context:
>> http://www.nabble.com/Wicket-not-secure--tp19556259p19556259.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Wicket-not-secure--tp19556259p19557667.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Wicket not secure?

2008-09-18 Thread Igor Vaynberg
afaik wicket is one of very few frameworks to offer this out of the
box if not the only one. this feature is really a side-effect of how
wicket works :)

for complete security you probably want to have a look into
CryptedUrlWebRequestCodingStrategy, it completely encrpypts the urls
so they look something like
?x=sdf7saf7sd9f7sd89f7sadf7sa789sd7f89sdf7sssdf and offers csrf
protection.

-igor

On Thu, Sep 18, 2008 at 10:01 AM, cj91 <[EMAIL PROTECTED]> wrote:
>
> We were kind of reading the sentence backwards, the last poster described it
> very well. Secure URL's would be a 'nice-to-have', but I'm not sure very
> many frameworks support that.
>
> Thanks for the replies,
> -Jonathan
>
>
> Johan Compagner wrote:
>>
>> Why is that sentence ambiguous?
>>
>> On 9/18/08, cj91 <[EMAIL PROTECTED]> wrote:
>>>
>>> My company is planning an extremely large web project and Wicket is a
>>> candidate for use. My manager pointed out some unsettling words on the
>>> Wicket FAQ, which are ambiguous unfortunately.
>>> http://wicket.apache.org/features.html
>>>
>>Wicket is secure by default. URLs do not expose sensitive information
> and
>>> all component paths are
>>session-relative. Explicit steps must be taken to share information
>>> between sessions. There are plans
>>for the next version of Wicket to add URL encryption to support highly
>>> secure web sites.
>>>
>>>
>>> Can someone please elaborate on what is meant by "Explicit steps must be
>>> taken to share information between sessions."
>>>
>>> Thank you,
>>> -Jonathan
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Wicket-not-secure--tp19556259p19556259.html
>>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>>
>>>
>>> -
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>
> --
> View this message in context: 
> http://www.nabble.com/Wicket-not-secure--tp19556259p19557425.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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



Re: Wicket not secure?

2008-09-18 Thread cj91

We were kind of reading the sentence backwards, the last poster described it
very well. Secure URL's would be a 'nice-to-have', but I'm not sure very
many frameworks support that.

Thanks for the replies,
-Jonathan


Johan Compagner wrote:
> 
> Why is that sentence ambiguous?
> 
> On 9/18/08, cj91 <[EMAIL PROTECTED]> wrote:
>>
>> My company is planning an extremely large web project and Wicket is a
>> candidate for use. My manager pointed out some unsettling words on the
>> Wicket FAQ, which are ambiguous unfortunately.
>> http://wicket.apache.org/features.html
>>
>Wicket is secure by default. URLs do not expose sensitive information
and
>> all component paths are
>session-relative. Explicit steps must be taken to share information
>> between sessions. There are plans
>for the next version of Wicket to add URL encryption to support highly
>> secure web sites.
>>
>>
>> Can someone please elaborate on what is meant by "Explicit steps must be
>> taken to share information between sessions."
>>
>> Thank you,
>> -Jonathan
>> --
>> View this message in context:
>> http://www.nabble.com/Wicket-not-secure--tp19556259p19556259.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Wicket-not-secure--tp19556259p19557425.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Wicket not secure?

2008-09-18 Thread Johan Compagner
Why is that sentence ambiguous?

On 9/18/08, cj91 <[EMAIL PROTECTED]> wrote:
>
> My company is planning an extremely large web project and Wicket is a
> candidate for use. My manager pointed out some unsettling words on the
> Wicket FAQ, which are ambiguous unfortunately.
> http://wicket.apache.org/features.html
>
Wicket is secure by default. URLs do not expose sensitive information and
> all component paths are
session-relative. Explicit steps must be taken to share information
> between sessions. There are plans
for the next version of Wicket to add URL encryption to support highly
> secure web sites.
>
>
> Can someone please elaborate on what is meant by "Explicit steps must be
> taken to share information between sessions."
>
> Thank you,
> -Jonathan
> --
> View this message in context:
> http://www.nabble.com/Wicket-not-secure--tp19556259p19556259.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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



Tables

2008-09-18 Thread michael4321

Hi,

   I have a table within a table, basically each row has some main details,
and the sub table lists attributes for the row.  The issue I'm having is
that not all attributes should display for each row, and I'm not sure how to
get around this.


ex.

   
   
   





   
   

   
some rows I'd like to only display attrib1 and attrib2 and other rows I may
display all three,...
I'm using a RepeatingView to populate the table, I'm guessing that this is
probably wrong.  

Is there a way to  have a a list dependent upon another list? like below?


   
   
   





   
   







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


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



Re: Scalability & PageMaps

2008-09-18 Thread James Carman
2008/9/18 Uwe Schäfer <[EMAIL PROTECTED]>:
> James Carman schrieb:
>
> hi James
>
>> That's where I got the 100 thing.
>
> ah, i lost track of that. did not want to sound harsh or anything.
>
>> The folders won't be removed even after all of their
>> subfolders are removed, right?
>
> no empty folder should be left behind (if you stay away from just killing
> the appserver, of course ;)

Ok, cool!  Sorry, but I haven't had a chance to look at the code.  The
10k folders thing just jumped out at me.  It doesn't really matter to
me one way or the other if this is customizable.  I was just trying to
make a friendly suggestion.  Wicket has had some knocks for not being
very customizable compared to other frameworks (not saying I agree
with them; no flame intended).  So, when adding features, it's
important to add in customization hooks, especially if they're easy to
do (and it seems like this one should be).

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



Re: Wicket not secure?

2008-09-18 Thread Igor Vaynberg
urls are session-relative. meaning a url you get from one session will
not work in another. if you want urls to work across session, such as
the case with bookmarkable pages - http://server.com/view/profile/15 -
you must explicitly mount the page to the url.

-igor

On Thu, Sep 18, 2008 at 9:02 AM, cj91 <[EMAIL PROTECTED]> wrote:
>
> My company is planning an extremely large web project and Wicket is a
> candidate for use. My manager pointed out some unsettling words on the
> Wicket FAQ, which are ambiguous unfortunately.
> http://wicket.apache.org/features.html
>
Wicket is secure by default. URLs do not expose sensitive information and
> all component paths are
session-relative. Explicit steps must be taken to share information
> between sessions. There are plans
for the next version of Wicket to add URL encryption to support highly
> secure web sites.
>
>
> Can someone please elaborate on what is meant by "Explicit steps must be
> taken to share information between sessions."
>
> Thank you,
> -Jonathan
> --
> View this message in context: 
> http://www.nabble.com/Wicket-not-secure--tp19556259p19556259.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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



Re: Scalability & PageMaps

2008-09-18 Thread Uwe Schäfer

James Carman schrieb:

hi James

That's where I got the 100 thing.  


ah, i lost track of that. did not want to sound harsh or anything.


The folders won't be removed even after all of their
subfolders are removed, right?


no empty folder should be left behind (if you stay away from just 
killing the appserver, of course ;)


cu uwe

--

THOMAS DAILY GmbH
Adlerstraße 19
79098 Freiburg
Deutschland
T  + 49 761 3 85 59 0
F  + 49 761 3 85 59 550
E  [EMAIL PROTECTED]
www.thomas-daily.de

Geschäftsführer/Managing Directors:
Wendy Thomas, Susanne Larbig
Handelsregister Freiburg i.Br., HRB 3947

Registrieren Sie sich unter http://morningnews.thomas-daily.de für die 
kostenfreien TD Morning News, eine Auswahl aktueller Themen des Tages 
morgens um 9:00 in Ihrer Mailbox.


Hinweis: Der Redaktionsschluss für unsere TD Morning News ist täglich um 
8:30 Uhr. Es werden vorrangig Informationen berücksichtigt, die nach 
16:00 Uhr des Vortages eingegangen sind. Die Email-Adresse unserer 
Redaktion lautet [EMAIL PROTECTED]



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



Wicket not secure?

2008-09-18 Thread cj91

My company is planning an extremely large web project and Wicket is a
candidate for use. My manager pointed out some unsettling words on the
Wicket FAQ, which are ambiguous unfortunately.
http://wicket.apache.org/features.html

>>>Wicket is secure by default. URLs do not expose sensitive information and
all component paths are 
>>>session-relative. Explicit steps must be taken to share information
between sessions. There are plans 
>>>for the next version of Wicket to add URL encryption to support highly
secure web sites.


Can someone please elaborate on what is meant by "Explicit steps must be
taken to share information between sessions."

Thank you,
-Jonathan
-- 
View this message in context: 
http://www.nabble.com/Wicket-not-secure--tp19556259p19556259.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Scalability & PageMaps

2008-09-18 Thread Jan Kriesten

you can order it with windows hpc _or_ red hat linux :-)

> I saw that yesterday.  I wonder if that thing will run linux?  When I
> get rich and infamous, I'm buying one.

>>> Also, looking at this whole thing.
>>> 32000 concurrent sessions on one machine? What are you trying to achieve? I
>>> have yet to see a machine that can handle 32k concurrent users...

>> hehe - the new 'Office Cray' CX1 might be up for the challenge. :D


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



Re: CSS and variation

2008-09-18 Thread Mathias P.W Nilsson

Maybe I should also say that my css files isn't in the container. They are
served thru another servlet. All files are external and is located on a file
server. 

so the /resources/class/. doesn't work for me.
-- 
View this message in context: 
http://www.nabble.com/CSS-and-variation-tp19554325p19554767.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Scalability & PageMaps

2008-09-18 Thread James Carman
Ok, now to get rich and infamous!

On Thu, Sep 18, 2008 at 10:49 AM, Jan Kriesten
<[EMAIL PROTECTED]> wrote:
>
> you can order it with windows hpc _or_ red hat linux :-)
>
>> I saw that yesterday.  I wonder if that thing will run linux?  When I
>> get rich and infamous, I'm buying one.
>
 Also, looking at this whole thing.
 32000 concurrent sessions on one machine? What are you trying to achieve? I
 have yet to see a machine that can handle 32k concurrent users...
>
>>> hehe - the new 'Office Cray' CX1 might be up for the challenge. :D
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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



Re: CSS and variation

2008-09-18 Thread Martijn Dashorst
In his case I'd add a different stylesheet through a
webmarkupcontainer and attribute modifier. No need to go all skinny
dipping imo.

Martijn

On Thu, Sep 18, 2008 at 4:46 PM, James Carman
<[EMAIL PROTECTED]> wrote:
> Take a look at this document.  It should help you.
>
> http://cwiki.apache.org/WICKET/localization-and-skinning-of-applications.html
>
> You'll probably want to use different "styles" for your different skins.
>
> On Thu, Sep 18, 2008 at 10:35 AM, Mathias P.W Nilsson
> <[EMAIL PROTECTED]> wrote:
>>
>> I'm looking at  http://www.csszengarden.com CSS Zengarden  that uses the same
>> html markup and only alters the css. I would like to use variation like this
>> and I'm wondering what my approach should be?
>>
>> I set Session.setVariation( String variation ) in my session object
>> I have the same java and html file
>> How can I create different variation of css files?
>>
>> // Mathias
>> --
>> View this message in context: 
>> http://www.nabble.com/CSS-and-variation-tp19554325p19554325.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



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

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



Re: CSS and variation

2008-09-18 Thread James Carman
Take a look at this document.  It should help you.

http://cwiki.apache.org/WICKET/localization-and-skinning-of-applications.html

You'll probably want to use different "styles" for your different skins.

On Thu, Sep 18, 2008 at 10:35 AM, Mathias P.W Nilsson
<[EMAIL PROTECTED]> wrote:
>
> I'm looking at  http://www.csszengarden.com CSS Zengarden  that uses the same
> html markup and only alters the css. I would like to use variation like this
> and I'm wondering what my approach should be?
>
> I set Session.setVariation( String variation ) in my session object
> I have the same java and html file
> How can I create different variation of css files?
>
> // Mathias
> --
> View this message in context: 
> http://www.nabble.com/CSS-and-variation-tp19554325p19554325.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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



Re: DropDownChoice and lazy loaded choices

2008-09-18 Thread James Carman
Right, I was going to suggest you not use multiple.  That does lead to
problems if you're not careful.

Anyway, in your situation, you're holding onto a "detached" object?
And, it's somehow getting loaded (huh huh, I said "getting loaded")
somewhere else during the same request?



On Thu, Sep 18, 2008 at 10:31 AM, Cédric Thiébault
<[EMAIL PROTECTED]> wrote:
> I tried both but it was worst with multiple session because entities
> were already associated in an other session and it throws
> exceptions...
>
>
> On Thu, Sep 18, 2008 at 10:17 AM, James Carman
> <[EMAIL PROTECTED]> wrote:
>> Are you using the single session setting on OSIV?  Or, are you using
>> multiple sessions?
>>
>> On Thu, Sep 18, 2008 at 9:12 AM, Cédric Thiébault
>> <[EMAIL PROTECTED]> wrote:
>>> In fact my example with the collection updating automatically was
>>> wrong... because, as it was said, the transaction is not committed at
>>> the end.
>>>
>>> But I remember other kind of problems when I wanted to save and commit
>>> my modified entities after I loaded and associated them during the
>>> request (via OSIV) :
>>> I was passing a graph of persistent objects to the manager and I had
>>> exception like "a different object with the same identifier value was
>>> already associated with the session".
>>> I tried then to use a merge but in this case I had other exception (I
>>> don't remember exactly which one)...
>>>
>>> If I don't use OSIV and pass a graph of transient object, it works fine!
>>>
>>> It must be something wrong with my hibernate mapping but it hard to locate 
>>> :-(
>>>
>>> Cedric
>>>
>>>
>>> On Thu, Sep 18, 2008 at 3:26 AM, Maarten Bosteels
>>> <[EMAIL PROTECTED]> wrote:

 Hi,

 I never really used OpenSessionInViewFilter, but I remember Juergen
 Hoeller saying that he sometimes wished he never wrote OSIV because of
 all the potential side-effects.
 At the time a ridiculous big percentage of questions on the spring
 forum where about OSIV.

 This was several years ago though, and I have the impression that a
 lot of people are using OSIV now without problems.

 I guess it all works fine when you know what you're doing :-)

 Maarten


 On Tue, Sep 16, 2008 at 10:28 PM, Cédric Thiébault
 <[EMAIL PROTECTED]> wrote:
 > Ok thanks all...
 > I will read again about Hibernate sessions :-)
 >
 > Cedric
 >
 >
 > On Tue, Sep 16, 2008 at 4:26 PM, Igor Vaynberg <[EMAIL PROTECTED]>wrote:
 >
 >> +1
 >>
 >> -igor
 >>
 >> On Tue, Sep 16, 2008 at 1:24 PM, James Carman
 >> <[EMAIL PROTECTED]> wrote:
 >> > +1, OSIV works for me just fine, too.  You must be doing something
 >> > weird.  The OSIV doesn't commit transactions by default.  So, it
 >> > shouldn't be doing anything weird.
 >> >
 >> > On Tue, Sep 16, 2008 at 1:07 PM, Michael Sparer <[EMAIL PROTECTED]>
 >> wrote:
 >> >>
 >> >> Before dropping OpenSessionInviewFilter I'd suggest to have a more
 >> thorough
 >> >> look at how hibernate works. e.g. have a look at the different 
 >> >> cascade
 >> >> styles hibernate offers and also at transaction management, then it's
 >> easy
 >> >> to know why, and when, hibernate "commits" without explicitly calling
 >> save
 >> >> ... but that's no wicket topic after all. I'm using
 >> opensessioninviewfilter
 >> >> with loadabledetachablemodels in my webapp and never had problems ...
 >> >>
 >> >> just my two cents,
 >> >> Michael
 >> >>
 >> >>
 >> >> thiebal wrote:
 >> >>>
 >> >>> I had lots of problems with a Spring MVC webapp that was using
 >> >>> OpenSessionInViewFilter : beans were associated directly in DB when
 >> they
 >> >>> were added to a collection (like the current Foo/Bar case) even if I
 >> >>> didn't
 >> >>> commit explicitly.
 >> >>> Without the session opened, I can prepare all my entities and just 
 >> >>> save
 >> >>> them
 >> >>> and commit.
 >> >>>
 >> >>> I use this filter on another webapp that just load entities form DB 
 >> >>> but
 >> >>> does
 >> >>> not update them. It works perfectly!
 >> >>>
 >> >>> I though I would have the same kind of errors with Wicket because 
 >> >>> this
 >> is
 >> >>> not a Wicket part but just a Hibernate functionality.
 >> >>>
 >> >>> If in my case, I use the filter, the Bar.foos association will be
 >> loaded
 >> >>> just on demand but if I add it a new created Foo entity 
 >> >>> (transient), it
 >> >>> will
 >> >>> try to save it on flush (so before my save/commit) and I will have 
 >> >>> an
 >> >>> exception.
 >> >>> Maybe I'm wrong but I remember this kind of errors with Spring 
 >> >>> MVC...
 >> >>>
 >> >>> Cedric
 >> >>>
 >> >>>
 >> >>> On Tue, Sep 16, 2008 at 10:16 AM, James Carman
 >> >>> <[EMAIL PROTECT

Re: Scalability & PageMaps

2008-09-18 Thread James Carman
I saw that yesterday.  I wonder if that thing will run linux?  When I
get rich and infamous, I'm buying one.

On Thu, Sep 18, 2008 at 10:32 AM, Jan Kriesten
<[EMAIL PROTECTED]> wrote:
>
>> Also, looking at this whole thing.
>> 32000 concurrent sessions on one machine? What are you trying to achieve? I
>> have yet to see a machine that can handle 32k concurrent users...
>
> hehe - the new 'Office Cray' CX1 might be up for the challenge. :D
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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



Re: Scalability & PageMaps

2008-09-18 Thread Jan Kriesten

> Also, looking at this whole thing.
> 32000 concurrent sessions on one machine? What are you trying to achieve? I
> have yet to see a machine that can handle 32k concurrent users...

hehe - the new 'Office Cray' CX1 might be up for the challenge. :D



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



CSS and variation

2008-09-18 Thread Mathias P.W Nilsson

I'm looking at  http://www.csszengarden.com CSS Zengarden  that uses the same
html markup and only alters the css. I would like to use variation like this
and I'm wondering what my approach should be?

I set Session.setVariation( String variation ) in my session object
I have the same java and html file
How can I create different variation of css files?

// Mathias
-- 
View this message in context: 
http://www.nabble.com/CSS-and-variation-tp19554325p19554325.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: DropDownChoice and lazy loaded choices

2008-09-18 Thread Cédric Thiébault
I tried both but it was worst with multiple session because entities
were already associated in an other session and it throws
exceptions...


On Thu, Sep 18, 2008 at 10:17 AM, James Carman
<[EMAIL PROTECTED]> wrote:
> Are you using the single session setting on OSIV?  Or, are you using
> multiple sessions?
>
> On Thu, Sep 18, 2008 at 9:12 AM, Cédric Thiébault
> <[EMAIL PROTECTED]> wrote:
>> In fact my example with the collection updating automatically was
>> wrong... because, as it was said, the transaction is not committed at
>> the end.
>>
>> But I remember other kind of problems when I wanted to save and commit
>> my modified entities after I loaded and associated them during the
>> request (via OSIV) :
>> I was passing a graph of persistent objects to the manager and I had
>> exception like "a different object with the same identifier value was
>> already associated with the session".
>> I tried then to use a merge but in this case I had other exception (I
>> don't remember exactly which one)...
>>
>> If I don't use OSIV and pass a graph of transient object, it works fine!
>>
>> It must be something wrong with my hibernate mapping but it hard to locate 
>> :-(
>>
>> Cedric
>>
>>
>> On Thu, Sep 18, 2008 at 3:26 AM, Maarten Bosteels
>> <[EMAIL PROTECTED]> wrote:
>>>
>>> Hi,
>>>
>>> I never really used OpenSessionInViewFilter, but I remember Juergen
>>> Hoeller saying that he sometimes wished he never wrote OSIV because of
>>> all the potential side-effects.
>>> At the time a ridiculous big percentage of questions on the spring
>>> forum where about OSIV.
>>>
>>> This was several years ago though, and I have the impression that a
>>> lot of people are using OSIV now without problems.
>>>
>>> I guess it all works fine when you know what you're doing :-)
>>>
>>> Maarten
>>>
>>>
>>> On Tue, Sep 16, 2008 at 10:28 PM, Cédric Thiébault
>>> <[EMAIL PROTECTED]> wrote:
>>> > Ok thanks all...
>>> > I will read again about Hibernate sessions :-)
>>> >
>>> > Cedric
>>> >
>>> >
>>> > On Tue, Sep 16, 2008 at 4:26 PM, Igor Vaynberg <[EMAIL PROTECTED]>wrote:
>>> >
>>> >> +1
>>> >>
>>> >> -igor
>>> >>
>>> >> On Tue, Sep 16, 2008 at 1:24 PM, James Carman
>>> >> <[EMAIL PROTECTED]> wrote:
>>> >> > +1, OSIV works for me just fine, too.  You must be doing something
>>> >> > weird.  The OSIV doesn't commit transactions by default.  So, it
>>> >> > shouldn't be doing anything weird.
>>> >> >
>>> >> > On Tue, Sep 16, 2008 at 1:07 PM, Michael Sparer <[EMAIL PROTECTED]>
>>> >> wrote:
>>> >> >>
>>> >> >> Before dropping OpenSessionInviewFilter I'd suggest to have a more
>>> >> thorough
>>> >> >> look at how hibernate works. e.g. have a look at the different cascade
>>> >> >> styles hibernate offers and also at transaction management, then it's
>>> >> easy
>>> >> >> to know why, and when, hibernate "commits" without explicitly calling
>>> >> save
>>> >> >> ... but that's no wicket topic after all. I'm using
>>> >> opensessioninviewfilter
>>> >> >> with loadabledetachablemodels in my webapp and never had problems ...
>>> >> >>
>>> >> >> just my two cents,
>>> >> >> Michael
>>> >> >>
>>> >> >>
>>> >> >> thiebal wrote:
>>> >> >>>
>>> >> >>> I had lots of problems with a Spring MVC webapp that was using
>>> >> >>> OpenSessionInViewFilter : beans were associated directly in DB when
>>> >> they
>>> >> >>> were added to a collection (like the current Foo/Bar case) even if I
>>> >> >>> didn't
>>> >> >>> commit explicitly.
>>> >> >>> Without the session opened, I can prepare all my entities and just 
>>> >> >>> save
>>> >> >>> them
>>> >> >>> and commit.
>>> >> >>>
>>> >> >>> I use this filter on another webapp that just load entities form DB 
>>> >> >>> but
>>> >> >>> does
>>> >> >>> not update them. It works perfectly!
>>> >> >>>
>>> >> >>> I though I would have the same kind of errors with Wicket because 
>>> >> >>> this
>>> >> is
>>> >> >>> not a Wicket part but just a Hibernate functionality.
>>> >> >>>
>>> >> >>> If in my case, I use the filter, the Bar.foos association will be
>>> >> loaded
>>> >> >>> just on demand but if I add it a new created Foo entity (transient), 
>>> >> >>> it
>>> >> >>> will
>>> >> >>> try to save it on flush (so before my save/commit) and I will have an
>>> >> >>> exception.
>>> >> >>> Maybe I'm wrong but I remember this kind of errors with Spring MVC...
>>> >> >>>
>>> >> >>> Cedric
>>> >> >>>
>>> >> >>>
>>> >> >>> On Tue, Sep 16, 2008 at 10:16 AM, James Carman
>>> >> >>> <[EMAIL PROTECTED]>wrote:
>>> >> >>>
>>> >>  What problems does it cause?
>>> >> 
>>> >>  On Tue, Sep 16, 2008 at 9:14 AM, Cédric Thiébault
>>> >>  <[EMAIL PROTECTED]> wrote:
>>> >>  > Thanks Michael.
>>> >>  >
>>> >>  > But I don't use the OpenSessionInviewFilter and I don't want to 
>>> >>  > use
>>> >> it.
>>> >>  > It creates more problems than it solves in my edit pages.
>>> >>  >
>>> >>  > The LoadableDetachableModel will load the whole list of choices, 
>>> >>  > not
>>> >>  > just 

Re: Scalability & PageMaps

2008-09-18 Thread James Carman
>From Matej's previous email:

e.g. int hash = computeHash(sessionId) % 100;
String folder = "" + hash + "/" + sessionId;

That's where I got the 100 thing.  So, what we're talking about here
is potentially 10k "buckets" for session store folders.  There would
be  the potential for 10k top-level folders.  Perhaps smaller sites
would wish to not have the potential for 10k folders?  I don't know.
A smallish site might just want to make the divisor 1, if they don't
have many users.  The folders won't be removed even after all of their
subfolders are removed, right?

On Thu, Sep 18, 2008 at 3:35 AM, Uwe Schäfer <[EMAIL PROTECTED]> wrote:
> James Carman schrieb:
>
> hi james
>
>> Do you think that modulus number should be customizable?  So, for now,
>> you mod your number of users by 100.  But, for larger sites, they
>> might want to mod it by 1000 or 256 or whatever.
>
> actually, the first level dir is created from hash%1 and the second from
> hash/1%1, while the third level dir is the sessionId itself. i do
> not see a need for more, do you?
>
> why should anyone care of the inner structure of the filestore, as long as
> it cannot lead to problems?
>
> cu uwe
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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



Re: DropDownChoice and lazy loaded choices

2008-09-18 Thread James Carman
Are you using the single session setting on OSIV?  Or, are you using
multiple sessions?

On Thu, Sep 18, 2008 at 9:12 AM, Cédric Thiébault
<[EMAIL PROTECTED]> wrote:
> In fact my example with the collection updating automatically was
> wrong... because, as it was said, the transaction is not committed at
> the end.
>
> But I remember other kind of problems when I wanted to save and commit
> my modified entities after I loaded and associated them during the
> request (via OSIV) :
> I was passing a graph of persistent objects to the manager and I had
> exception like "a different object with the same identifier value was
> already associated with the session".
> I tried then to use a merge but in this case I had other exception (I
> don't remember exactly which one)...
>
> If I don't use OSIV and pass a graph of transient object, it works fine!
>
> It must be something wrong with my hibernate mapping but it hard to locate :-(
>
> Cedric
>
>
> On Thu, Sep 18, 2008 at 3:26 AM, Maarten Bosteels
> <[EMAIL PROTECTED]> wrote:
>>
>> Hi,
>>
>> I never really used OpenSessionInViewFilter, but I remember Juergen
>> Hoeller saying that he sometimes wished he never wrote OSIV because of
>> all the potential side-effects.
>> At the time a ridiculous big percentage of questions on the spring
>> forum where about OSIV.
>>
>> This was several years ago though, and I have the impression that a
>> lot of people are using OSIV now without problems.
>>
>> I guess it all works fine when you know what you're doing :-)
>>
>> Maarten
>>
>>
>> On Tue, Sep 16, 2008 at 10:28 PM, Cédric Thiébault
>> <[EMAIL PROTECTED]> wrote:
>> > Ok thanks all...
>> > I will read again about Hibernate sessions :-)
>> >
>> > Cedric
>> >
>> >
>> > On Tue, Sep 16, 2008 at 4:26 PM, Igor Vaynberg <[EMAIL PROTECTED]>wrote:
>> >
>> >> +1
>> >>
>> >> -igor
>> >>
>> >> On Tue, Sep 16, 2008 at 1:24 PM, James Carman
>> >> <[EMAIL PROTECTED]> wrote:
>> >> > +1, OSIV works for me just fine, too.  You must be doing something
>> >> > weird.  The OSIV doesn't commit transactions by default.  So, it
>> >> > shouldn't be doing anything weird.
>> >> >
>> >> > On Tue, Sep 16, 2008 at 1:07 PM, Michael Sparer <[EMAIL PROTECTED]>
>> >> wrote:
>> >> >>
>> >> >> Before dropping OpenSessionInviewFilter I'd suggest to have a more
>> >> thorough
>> >> >> look at how hibernate works. e.g. have a look at the different cascade
>> >> >> styles hibernate offers and also at transaction management, then it's
>> >> easy
>> >> >> to know why, and when, hibernate "commits" without explicitly calling
>> >> save
>> >> >> ... but that's no wicket topic after all. I'm using
>> >> opensessioninviewfilter
>> >> >> with loadabledetachablemodels in my webapp and never had problems ...
>> >> >>
>> >> >> just my two cents,
>> >> >> Michael
>> >> >>
>> >> >>
>> >> >> thiebal wrote:
>> >> >>>
>> >> >>> I had lots of problems with a Spring MVC webapp that was using
>> >> >>> OpenSessionInViewFilter : beans were associated directly in DB when
>> >> they
>> >> >>> were added to a collection (like the current Foo/Bar case) even if I
>> >> >>> didn't
>> >> >>> commit explicitly.
>> >> >>> Without the session opened, I can prepare all my entities and just 
>> >> >>> save
>> >> >>> them
>> >> >>> and commit.
>> >> >>>
>> >> >>> I use this filter on another webapp that just load entities form DB 
>> >> >>> but
>> >> >>> does
>> >> >>> not update them. It works perfectly!
>> >> >>>
>> >> >>> I though I would have the same kind of errors with Wicket because this
>> >> is
>> >> >>> not a Wicket part but just a Hibernate functionality.
>> >> >>>
>> >> >>> If in my case, I use the filter, the Bar.foos association will be
>> >> loaded
>> >> >>> just on demand but if I add it a new created Foo entity (transient), 
>> >> >>> it
>> >> >>> will
>> >> >>> try to save it on flush (so before my save/commit) and I will have an
>> >> >>> exception.
>> >> >>> Maybe I'm wrong but I remember this kind of errors with Spring MVC...
>> >> >>>
>> >> >>> Cedric
>> >> >>>
>> >> >>>
>> >> >>> On Tue, Sep 16, 2008 at 10:16 AM, James Carman
>> >> >>> <[EMAIL PROTECTED]>wrote:
>> >> >>>
>> >>  What problems does it cause?
>> >> 
>> >>  On Tue, Sep 16, 2008 at 9:14 AM, Cédric Thiébault
>> >>  <[EMAIL PROTECTED]> wrote:
>> >>  > Thanks Michael.
>> >>  >
>> >>  > But I don't use the OpenSessionInviewFilter and I don't want to use
>> >> it.
>> >>  > It creates more problems than it solves in my edit pages.
>> >>  >
>> >>  > The LoadableDetachableModel will load the whole list of choices, 
>> >>  > not
>> >>  > just the one that was selected by the user.
>> >>  > I will encounter the same error except if the
>> >>  > LoadableDetachableModel.load method pre-fetch the associations...
>> >>  >
>> >>  > Cedric
>> >>  >
>> >>  >
>> >>  > On Tue, Sep 16, 2008 at 3:01 AM, Michael Sparer <
>> >> [EMAIL PROTECTED]>
>> >>  wrote:
>> >>  >>
>> >>  >> Use LoadableDe

Re: Scalability & PageMaps

2008-09-18 Thread Matej Knopp
Also, looking at this whole thing.
32000 concurrent sessions on one machine? What are you trying to achieve? I
have yet to see a machine that can handle 32k concurrent users...

-Matej

On Thu, Sep 18, 2008 at 4:12 PM, Matej Knopp <[EMAIL PROTECTED]> wrote:

> I don't you you want to come anywhere near the amount of  32k files in
> single folder.
> I wouldn't assume that every filesystem can handle such amount without
> performance problems.
>
> -Matej
>
>
> On Thu, Sep 18, 2008 at 1:49 PM, Johan Compagner <[EMAIL PROTECTED]>wrote:
>
>> yes having this configurable looks ridiculous to me.
>>
>> The only thing that i can think of is is the 32K limit for all the
>> filesystems?
>> or does another filesystem has another limit?
>>
>> Because if that is the case we could make it so that for example we do 3
>> (1000 dirs) or 4 (1 dirs) numbers per dir
>>
>> hopefully the hash is a bit equally divided so the first dir will make 999
>> dirs before it complete fills up for example 1 dir
>> hope it balances
>>
>>
>>
>> On Thu, Sep 18, 2008 at 1:32 PM, Uwe Schäfer <[EMAIL PROTECTED]
>> >wrote:
>>
>> > James Carman schrieb:
>> >
>> >  So, why are we dividing it up in the first place if it can't lead to
>> >> problems?
>> >>
>> >
>> > before, there was just the sessionId, which - as we all know - could
>> lead
>> > to problems with 32k concurrent sessions.
>> >
>> > what you now have is 8 numbers (like in 100.000.000 minus one) * 32k.
>> > i would be surprised to see that many sessions without having an almost
>> > infinite session timeout.
>> >
>> > > Why are we picking arbitrary divisors?  Are they the
>> >
>> >> "optimal" setting?
>> >>
>> >
>> > one more char per directory can wreck the 32k limit, one less would give
>> > you a 32million (with optimal distribution of course) which i found to
>> be an
>> > 'unnecessary limitation'.
>> >
>> > i´d say reasonable, but i really would not mind to see this
>> configurable.
>> >
>> > i just didn´t because
>> > a) i cannot imagine a valid usecase for more (could be wrong here of
>> > course, and would like to know)
>> > and - more importantly -
>> > b) this is a very small, local patch with no API change with and thus
>> less
>> > opportunities for a rookie like me to screw things up. if it were
>> > configurable... you know... ;)
>> >
>> >
>> > cu uwe
>> >
>> >
>> > -
>> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>> > For additional commands, e-mail: [EMAIL PROTECTED]
>> >
>> >
>>
>
>


Re: Scalability & PageMaps

2008-09-18 Thread Matej Knopp
I don't you you want to come anywhere near the amount of  32k files in
single folder.
I wouldn't assume that every filesystem can handle such amount without
performance problems.

-Matej

On Thu, Sep 18, 2008 at 1:49 PM, Johan Compagner <[EMAIL PROTECTED]>wrote:

> yes having this configurable looks ridiculous to me.
>
> The only thing that i can think of is is the 32K limit for all the
> filesystems?
> or does another filesystem has another limit?
>
> Because if that is the case we could make it so that for example we do 3
> (1000 dirs) or 4 (1 dirs) numbers per dir
>
> hopefully the hash is a bit equally divided so the first dir will make 999
> dirs before it complete fills up for example 1 dir
> hope it balances
>
>
>
> On Thu, Sep 18, 2008 at 1:32 PM, Uwe Schäfer <[EMAIL PROTECTED]
> >wrote:
>
> > James Carman schrieb:
> >
> >  So, why are we dividing it up in the first place if it can't lead to
> >> problems?
> >>
> >
> > before, there was just the sessionId, which - as we all know - could lead
> > to problems with 32k concurrent sessions.
> >
> > what you now have is 8 numbers (like in 100.000.000 minus one) * 32k.
> > i would be surprised to see that many sessions without having an almost
> > infinite session timeout.
> >
> > > Why are we picking arbitrary divisors?  Are they the
> >
> >> "optimal" setting?
> >>
> >
> > one more char per directory can wreck the 32k limit, one less would give
> > you a 32million (with optimal distribution of course) which i found to be
> an
> > 'unnecessary limitation'.
> >
> > i´d say reasonable, but i really would not mind to see this configurable.
> >
> > i just didn´t because
> > a) i cannot imagine a valid usecase for more (could be wrong here of
> > course, and would like to know)
> > and - more importantly -
> > b) this is a very small, local patch with no API change with and thus
> less
> > opportunities for a rookie like me to screw things up. if it were
> > configurable... you know... ;)
> >
> >
> > cu uwe
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>


Re: DropDownChoice and lazy loaded choices

2008-09-18 Thread Cédric Thiébault
In fact my example with the collection updating automatically was
wrong... because, as it was said, the transaction is not committed at
the end.

But I remember other kind of problems when I wanted to save and commit
my modified entities after I loaded and associated them during the
request (via OSIV) :
I was passing a graph of persistent objects to the manager and I had
exception like "a different object with the same identifier value was
already associated with the session".
I tried then to use a merge but in this case I had other exception (I
don't remember exactly which one)...

If I don't use OSIV and pass a graph of transient object, it works fine!

It must be something wrong with my hibernate mapping but it hard to locate :-(

Cedric


On Thu, Sep 18, 2008 at 3:26 AM, Maarten Bosteels
<[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I never really used OpenSessionInViewFilter, but I remember Juergen
> Hoeller saying that he sometimes wished he never wrote OSIV because of
> all the potential side-effects.
> At the time a ridiculous big percentage of questions on the spring
> forum where about OSIV.
>
> This was several years ago though, and I have the impression that a
> lot of people are using OSIV now without problems.
>
> I guess it all works fine when you know what you're doing :-)
>
> Maarten
>
>
> On Tue, Sep 16, 2008 at 10:28 PM, Cédric Thiébault
> <[EMAIL PROTECTED]> wrote:
> > Ok thanks all...
> > I will read again about Hibernate sessions :-)
> >
> > Cedric
> >
> >
> > On Tue, Sep 16, 2008 at 4:26 PM, Igor Vaynberg <[EMAIL PROTECTED]>wrote:
> >
> >> +1
> >>
> >> -igor
> >>
> >> On Tue, Sep 16, 2008 at 1:24 PM, James Carman
> >> <[EMAIL PROTECTED]> wrote:
> >> > +1, OSIV works for me just fine, too.  You must be doing something
> >> > weird.  The OSIV doesn't commit transactions by default.  So, it
> >> > shouldn't be doing anything weird.
> >> >
> >> > On Tue, Sep 16, 2008 at 1:07 PM, Michael Sparer <[EMAIL PROTECTED]>
> >> wrote:
> >> >>
> >> >> Before dropping OpenSessionInviewFilter I'd suggest to have a more
> >> thorough
> >> >> look at how hibernate works. e.g. have a look at the different cascade
> >> >> styles hibernate offers and also at transaction management, then it's
> >> easy
> >> >> to know why, and when, hibernate "commits" without explicitly calling
> >> save
> >> >> ... but that's no wicket topic after all. I'm using
> >> opensessioninviewfilter
> >> >> with loadabledetachablemodels in my webapp and never had problems ...
> >> >>
> >> >> just my two cents,
> >> >> Michael
> >> >>
> >> >>
> >> >> thiebal wrote:
> >> >>>
> >> >>> I had lots of problems with a Spring MVC webapp that was using
> >> >>> OpenSessionInViewFilter : beans were associated directly in DB when
> >> they
> >> >>> were added to a collection (like the current Foo/Bar case) even if I
> >> >>> didn't
> >> >>> commit explicitly.
> >> >>> Without the session opened, I can prepare all my entities and just save
> >> >>> them
> >> >>> and commit.
> >> >>>
> >> >>> I use this filter on another webapp that just load entities form DB but
> >> >>> does
> >> >>> not update them. It works perfectly!
> >> >>>
> >> >>> I though I would have the same kind of errors with Wicket because this
> >> is
> >> >>> not a Wicket part but just a Hibernate functionality.
> >> >>>
> >> >>> If in my case, I use the filter, the Bar.foos association will be
> >> loaded
> >> >>> just on demand but if I add it a new created Foo entity (transient), it
> >> >>> will
> >> >>> try to save it on flush (so before my save/commit) and I will have an
> >> >>> exception.
> >> >>> Maybe I'm wrong but I remember this kind of errors with Spring MVC...
> >> >>>
> >> >>> Cedric
> >> >>>
> >> >>>
> >> >>> On Tue, Sep 16, 2008 at 10:16 AM, James Carman
> >> >>> <[EMAIL PROTECTED]>wrote:
> >> >>>
> >>  What problems does it cause?
> >> 
> >>  On Tue, Sep 16, 2008 at 9:14 AM, Cédric Thiébault
> >>  <[EMAIL PROTECTED]> wrote:
> >>  > Thanks Michael.
> >>  >
> >>  > But I don't use the OpenSessionInviewFilter and I don't want to use
> >> it.
> >>  > It creates more problems than it solves in my edit pages.
> >>  >
> >>  > The LoadableDetachableModel will load the whole list of choices, not
> >>  > just the one that was selected by the user.
> >>  > I will encounter the same error except if the
> >>  > LoadableDetachableModel.load method pre-fetch the associations...
> >>  >
> >>  > Cedric
> >>  >
> >>  >
> >>  > On Tue, Sep 16, 2008 at 3:01 AM, Michael Sparer <
> >> [EMAIL PROTECTED]>
> >>  wrote:
> >>  >>
> >>  >> Use LoadableDetachableModels (and be sure that the
> >>  OpensessionInviewFilter
> >>  >> goes before the wicketfilter) and your hibernate entity will always
> >> be
> >>  in
> >>  >> the right session
> >>  >>
> >>  >> regards,
> >>  >> Michael
> >>  >>
> >>  >> thiebal wrote:
> >>  >>>
> >>  >>> My DropDownChoice contains a list 

Re: Scalability & PageMaps

2008-09-18 Thread Uwe Schäfer

Johan Compagner schrieb:

hi Johan


or does another filesystem has another limit?


from what i´ve googled, all FS i could think of either dont care, or 
limit to (almost) 32k or more. (could be wrong here, anyone?)



hopefully the hash is a bit equally divided so the first dir will make 999
dirs before it complete fills up for example 1 dir


looking at String.hashCode i would say yes, especially for small Strings 
(<32chars) distribution is as good as it gets :>


cu uwe


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



Re: Wicket sample application

2008-09-18 Thread Michael Sparer

just go a click further and you'll find plenty
http://www.wicketstuff.org/wicket13/
http://www.wicketstuff.org/wicket13/ajax/
http://wicketstuff.org/confluence/display/STUFFWIKI/wicket-contrib-examples
http://wicketstuff.org/confluence/display/STUFFWIKI/wicket-phonebook


superoverdrive wrote:
> 
> Hi there!
> 
> I am looking for a Wicket sample application (e.g. something like a
> "Petshop") - ideally once that includes things such as: User registration,
> Admin area, editing data (e.g. with Ajax auto-complete) and an example of
> displaying data in a table that is read incrementally from the database
> (e.g. displaying huge database tables without crashing)
> 
> On the Wicket homepage there are just small examples, but no complete
> websites done in Wicket
> 
> Something like:
> 
> http://bakery.cakephp.org/categories/view/3
> 
> would be good for Wicket:
> 
> Thanks!
> 
> Toby
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 


-
Michael Sparer
http://talk-on-tech.blogspot.com
-- 
View this message in context: 
http://www.nabble.com/Wicket-sample-application-tp19549890p19551321.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Scalability & PageMaps

2008-09-18 Thread Johan Compagner
yes having this configurable looks ridiculous to me.

The only thing that i can think of is is the 32K limit for all the
filesystems?
or does another filesystem has another limit?

Because if that is the case we could make it so that for example we do 3
(1000 dirs) or 4 (1 dirs) numbers per dir

hopefully the hash is a bit equally divided so the first dir will make 999
dirs before it complete fills up for example 1 dir
hope it balances



On Thu, Sep 18, 2008 at 1:32 PM, Uwe Schäfer <[EMAIL PROTECTED]>wrote:

> James Carman schrieb:
>
>  So, why are we dividing it up in the first place if it can't lead to
>> problems?
>>
>
> before, there was just the sessionId, which - as we all know - could lead
> to problems with 32k concurrent sessions.
>
> what you now have is 8 numbers (like in 100.000.000 minus one) * 32k.
> i would be surprised to see that many sessions without having an almost
> infinite session timeout.
>
> > Why are we picking arbitrary divisors?  Are they the
>
>> "optimal" setting?
>>
>
> one more char per directory can wreck the 32k limit, one less would give
> you a 32million (with optimal distribution of course) which i found to be an
> 'unnecessary limitation'.
>
> i´d say reasonable, but i really would not mind to see this configurable.
>
> i just didn´t because
> a) i cannot imagine a valid usecase for more (could be wrong here of
> course, and would like to know)
> and - more importantly -
> b) this is a very small, local patch with no API change with and thus less
> opportunities for a rookie like me to screw things up. if it were
> configurable... you know... ;)
>
>
> cu uwe
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Scalability & PageMaps

2008-09-18 Thread Uwe Schäfer

James Carman schrieb:


So, why are we dividing it up in the first place if it can't lead to
problems?  


before, there was just the sessionId, which - as we all know - could 
lead to problems with 32k concurrent sessions.


what you now have is 8 numbers (like in 100.000.000 minus one) * 32k.
i would be surprised to see that many sessions without having an almost 
infinite session timeout.


> Why are we picking arbitrary divisors?  Are they the

"optimal" setting?


one more char per directory can wreck the 32k limit, one less would give 
you a 32million (with optimal distribution of course) which i found to 
be an 'unnecessary limitation'.


i´d say reasonable, but i really would not mind to see this configurable.

i just didn´t because
a) i cannot imagine a valid usecase for more (could be wrong here of 
course, and would like to know)

and - more importantly -
b) this is a very small, local patch with no API change with and thus 
less opportunities for a rookie like me to screw things up. if it were 
configurable... you know... ;)


cu uwe


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



AW: Wicket and Mootools?

2008-09-18 Thread Agent Mahone
O, thank u very much for ur comments.

I have some questions to you:

1. What is the package mini under contribution package for?
What is the difference to package contribution/wicket-mootools???

2. I also noticed that wicket offers you "scriptaculous" and "jquery".
   Is there any comparsion between that frameworks?

I´ve seen that scriptaculous is much more easier to understand and difinitely 
to use.

Thanks again for any comments





- Ursprüngliche Mail 
Von: Nino Saturnino Martinez Vazquez Wael <[EMAIL PROTECTED]>
An: users@wicket.apache.org
Gesendet: Donnerstag, den 18. September 2008, 09:50:32 Uhr
Betreff: Re: Wicket and Mootools?

You can also check out the new addition to wicket stuff minis, the 
mootips integration..

Agent Mahone wrote:
> Hi all
>
> What is the best way to integrate mootools in wicket ?
>
> Does Mootools slow down the application? Does somebody had good expierence 
> with it?
>
> Thanks in advane for any comments
>
>
> __
> Do You Yahoo!?
> Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz 
> gegen Massenmails. 
> http://mail.yahoo.com 
>  

-- 
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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

__
Do You Yahoo!?
Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen 
Massenmails. 
http://mail.yahoo.com 

Re: [OT] Wicket in Action Jubilation

2008-09-18 Thread Nino Saturnino Martinez Vazquez Wael

Ok.. thanks.. Something must be wrong then...

James Carman wrote:

I got my copy from amazon rather quickly (ordered 9/11 and delivered 9/15)

On Thu, Sep 18, 2008 at 4:02 AM, Nino Saturnino Martinez Vazquez Wael
<[EMAIL PROTECTED]> wrote:
  

Hmm We at jayway ordered the full package(meap + pdf + tree) about a year
ago.. We havent gotten it yet.. Have anybody gotten the book from amazon
yet?

We have moved a level down in our building though..Might be that...

Eelco Hillenius wrote:


And it finally shows up on Amazon:

http://www.amazon.com/Wicket-Action-Martijn-Dashorst/dp/1932394982/ref=pd_bbs_sr_1?ie=UTF8&s=books&qid=1221107314&sr=8-1

We wouldn't mind a few positive reviews on Amazon of course... don't
lie, but don't be shy about sharing either ;-)

Eelco

On Wed, Sep 10, 2008 at 5:09 PM, David Leangen <[EMAIL PROTECTED]> wrote:

  

Mine arrived here in the UK yesterday too!

  

Got mine here in Japan, too. Cool!



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





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


  

--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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





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

  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



RE: Navigating from a Modal Window

2008-09-18 Thread Kai Mütz
Try setWindowClosedCallback(ModalWindow.WindowClosedCallback)

Kai

Eyal Golan  wrote:
> Hi,
> I have a Modal Window that uses a page.
> I want that when the user presses OK in the page, there will be a
> navigation to a new page and the modal window will be closed.
> The navigation should be not in the modal window but in the original
> page itself. Here's what I did:
> In the page that is the content of the window:
> EurekifyAjaxButton okButton = new EurekifyAjaxButton("ok") {
> private static final long serialVersionUID = 1L;
> 
> @Override
> protected void onError(AjaxRequestTarget target, Form
> form) { super.onError(target, form);
> target.addComponent(feedbackPanel); }
> 
> @Override
> protected void onSubmit(AjaxRequestTarget target, Form
> form) {
>
> *window.setReportSrcUrl(getParametersPairsForReport(),
> getReportName());* window.close(target, true); } 
> 
> };
> 
> In the window:
> public final void setReportSrcUrl(Map
> parametersPairsForReport, String reportName) {
> if (reportPage == null) {
> reportPage = new ReportPage(this, link);
> reportPage.setReportSrcUrl(parametersPairsForReport,
> reportName); setResponsePage(reportPage);
> } else {
> reportPage.setReportSrcUrl(parametersPairsForReport,
> reportName); }
> }
> 
> Where reportPage is a class member.
> 
> I thought about keeping a reference to the page where the link that
> opened the popup was. And then do the setResponsePage on it.
> 
> Is there a nicer way?

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



Wicket sample application

2008-09-18 Thread superoverdrive
Hi there!

I am looking for a Wicket sample application (e.g. something like a "Petshop") 
- ideally once that includes things such as: User registration, Admin area, 
editing data (e.g. with Ajax auto-complete) and an example of displaying data 
in a table that is read incrementally from the database (e.g. displaying huge 
database tables without crashing)

On the Wicket homepage there are just small examples, but no complete websites 
done in Wicket

Something like:

http://bakery.cakephp.org/categories/view/3

would be good for Wicket:

Thanks!

Toby

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



Navigating from a Modal Window

2008-09-18 Thread Eyal Golan
Hi,
I have a Modal Window that uses a page.
I want that when the user presses OK in the page, there will be a navigation
to a new page and the modal window will be closed.
The navigation should be not in the modal window but in the original page
itself.
Here's what I did:
In the page that is the content of the window:
EurekifyAjaxButton okButton = new EurekifyAjaxButton("ok") {
private static final long serialVersionUID = 1L;

@Override
protected void onError(AjaxRequestTarget target, Form form) {
super.onError(target, form);
target.addComponent(feedbackPanel);
}

@Override
protected void onSubmit(AjaxRequestTarget target, Form form) {
*window.setReportSrcUrl(getParametersPairsForReport(),
getReportName());*
window.close(target, true);
}

};

In the window:
public final void setReportSrcUrl(Map
parametersPairsForReport,
String reportName) {
if (reportPage == null) {
reportPage = new ReportPage(this, link);
reportPage.setReportSrcUrl(parametersPairsForReport,
reportName);
setResponsePage(reportPage);
} else {
reportPage.setReportSrcUrl(parametersPairsForReport,
reportName);
}
}

Where reportPage is a class member.

I thought about keeping a reference to the page where the link that opened
the popup was.
And then do the setResponsePage on it.

Is there a nicer way?

-- 
Eyal Golan
[EMAIL PROTECTED]

Visit: http://jvdrums.sourceforge.net/
LinkedIn: http://www.linkedin.com/in/egolan74

P Save a tree. Please don't print this e-mail unless it's really necessary


Re: [OT] Wicket in Action Jubilation

2008-09-18 Thread James Carman
I got my copy from amazon rather quickly (ordered 9/11 and delivered 9/15)

On Thu, Sep 18, 2008 at 4:02 AM, Nino Saturnino Martinez Vazquez Wael
<[EMAIL PROTECTED]> wrote:
> Hmm We at jayway ordered the full package(meap + pdf + tree) about a year
> ago.. We havent gotten it yet.. Have anybody gotten the book from amazon
> yet?
>
> We have moved a level down in our building though..Might be that...
>
> Eelco Hillenius wrote:
>>
>> And it finally shows up on Amazon:
>>
>> http://www.amazon.com/Wicket-Action-Martijn-Dashorst/dp/1932394982/ref=pd_bbs_sr_1?ie=UTF8&s=books&qid=1221107314&sr=8-1
>>
>> We wouldn't mind a few positive reviews on Amazon of course... don't
>> lie, but don't be shy about sharing either ;-)
>>
>> Eelco
>>
>> On Wed, Sep 10, 2008 at 5:09 PM, David Leangen <[EMAIL PROTECTED]> wrote:
>>

 Mine arrived here in the UK yesterday too!

>>>
>>> Got mine here in Japan, too. Cool!
>>>
>>>
>>>
>>> -
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
> --
> -Wicket for love
>
> Nino Martinez Wael
> Java Specialist @ Jayway DK
> http://www.jayway.dk
> +45 2936 7684
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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



Re: SessionStore and Detachable Models

2008-09-18 Thread James Carman
You should use LoadableDetachableModel where possible to avoid stale
data (and to preserve memory).

On Thu, Sep 18, 2008 at 4:14 AM, carloc <[EMAIL PROTECTED]> wrote:
>
>hi everyone,
>
> if i use the secondlevelcachesessionstore wicket writes session state into
> the disk
> instead of the httpsession right? It is also the one that is used by
> default.
>
> so is it safe for me to not use abstractdetachablemodels and just use
> compoundpropertymodels since memory is not that big a concern anymore
> --
> View this message in context: 
> http://www.nabble.com/SessionStore-and-Detachable-Models-tp19548105p19548105.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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



Re: Scalability & PageMaps

2008-09-18 Thread James Carman
On Thu, Sep 18, 2008 at 3:35 AM, Uwe Schäfer <[EMAIL PROTECTED]> wrote:
> James Carman schrieb:
>
> hi james
>
>> Do you think that modulus number should be customizable?  So, for now,
>> you mod your number of users by 100.  But, for larger sites, they
>> might want to mod it by 1000 or 256 or whatever.
>
> actually, the first level dir is created from hash%1 and the second from
> hash/1%1, while the third level dir is the sessionId itself. i do
> not see a need for more, do you?
>
> why should anyone care of the inner structure of the filestore, as long as
> it cannot lead to problems?

So, why are we dividing it up in the first place if it can't lead to
problems?  Why are we picking arbitrary divisors?  Are they the
"optimal" setting?
>
> cu uwe
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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



Re: [announce] Wicketstuff Iolite 0.3

2008-09-18 Thread Nino Saturnino Martinez Vazquez Wael
Hmm, it looks like it's related to the svn problems from teamcity:( last 
build were the 03 september..:/


Gwyn Evans wrote:

This looks a little sparse?

[DEBUG] Trying repository wicketstuff-iolite-repo
Downloading: 
http://wicketstuff.org/maven/repository/org/wicketstuff/iolite/wicketstuff-iolite/0.3-SNAPSHOT/wicketstuff-iolite-0.3-SNAPSHOT.jar
13K downloaded
.
.
$ jar tvf 
\Java\Maven2_Repository\org\wicketstuff\iolite\wicketstuff-iolite\0.3-SNAPSHOT\wicketstuff-iolite-0.3-SNAPSHOT.jar
 2087 Wed Sep 03 14:55:12 BST 2008 META-INF/maven/archetype-metadata.xml
 2013 Wed Sep 03 14:55:12 BST 2008 META-INF/maven/archetype.xml
  545 Wed Sep 03 14:55:12 BST 2008 META-INF/NOTICE
11358 Wed Sep 03 14:55:12 BST 2008 META-INF/LICENSE
  448 Wed Sep 03 14:55:12 BST 2008
archetype-resources/core/src/main/resources/META-INF/persistence.xml
 2579 Wed Sep 03 14:55:12 BST 2008
archetype-resources/core/src/main/resources/AllInOneRepositoryContext.xml
  260 Wed Sep 03 14:55:12 BST 2008
archetype-resources/core/src/main/resources/log4j.properties
 2467 Wed Sep 03 14:55:12 BST 2008 archetype-resources/core/pom.xml
 6696 Wed Sep 03 14:55:12 BST 2008 archetype-resources/pom.xml
  401 Wed Sep 03 14:55:12 BST 2008
archetype-resources/web/src/main/java/pages/HomePage.html
  448 Wed Sep 03 14:55:12 BST 2008
archetype-resources/web/src/main/java/pages/BasePage.html
  443 Wed Sep 03 14:55:12 BST 2008
archetype-resources/web/src/main/java/pages/AddMessagePage.html
  417 Wed Sep 03 14:55:12 BST 2008
archetype-resources/web/src/main/resources/log4j.properties
 1827 Wed Sep 03 14:55:12 BST 2008
archetype-resources/web/src/main/webapp/WEB-INF/web.xml
 3710 Wed Sep 03 14:55:12 BST 2008 archetype-resources/web/pom.xml

$

/Gwyn


On Thu, Sep 18, 2008 at 8:57 AM, Nino Saturnino Martinez Vazquez Wael
<[EMAIL PROTECTED]> wrote:
  

Hmmm wierd

It should be working, it are on my pc... Could you try once more.. Im not
sure if you can cache an archetype when specifying a remote repo?



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

  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: [announce] Wicketstuff Iolite 0.3

2008-09-18 Thread Nino Saturnino Martinez Vazquez Wael

Looks to be okay now.. I tried rebuilding

Gwyn Evans wrote:

This looks a little sparse?

[DEBUG] Trying repository wicketstuff-iolite-repo
Downloading: 
http://wicketstuff.org/maven/repository/org/wicketstuff/iolite/wicketstuff-iolite/0.3-SNAPSHOT/wicketstuff-iolite-0.3-SNAPSHOT.jar
13K downloaded
.
.
$ jar tvf 
\Java\Maven2_Repository\org\wicketstuff\iolite\wicketstuff-iolite\0.3-SNAPSHOT\wicketstuff-iolite-0.3-SNAPSHOT.jar
 2087 Wed Sep 03 14:55:12 BST 2008 META-INF/maven/archetype-metadata.xml
 2013 Wed Sep 03 14:55:12 BST 2008 META-INF/maven/archetype.xml
  545 Wed Sep 03 14:55:12 BST 2008 META-INF/NOTICE
11358 Wed Sep 03 14:55:12 BST 2008 META-INF/LICENSE
  448 Wed Sep 03 14:55:12 BST 2008
archetype-resources/core/src/main/resources/META-INF/persistence.xml
 2579 Wed Sep 03 14:55:12 BST 2008
archetype-resources/core/src/main/resources/AllInOneRepositoryContext.xml
  260 Wed Sep 03 14:55:12 BST 2008
archetype-resources/core/src/main/resources/log4j.properties
 2467 Wed Sep 03 14:55:12 BST 2008 archetype-resources/core/pom.xml
 6696 Wed Sep 03 14:55:12 BST 2008 archetype-resources/pom.xml
  401 Wed Sep 03 14:55:12 BST 2008
archetype-resources/web/src/main/java/pages/HomePage.html
  448 Wed Sep 03 14:55:12 BST 2008
archetype-resources/web/src/main/java/pages/BasePage.html
  443 Wed Sep 03 14:55:12 BST 2008
archetype-resources/web/src/main/java/pages/AddMessagePage.html
  417 Wed Sep 03 14:55:12 BST 2008
archetype-resources/web/src/main/resources/log4j.properties
 1827 Wed Sep 03 14:55:12 BST 2008
archetype-resources/web/src/main/webapp/WEB-INF/web.xml
 3710 Wed Sep 03 14:55:12 BST 2008 archetype-resources/web/pom.xml

$

/Gwyn


On Thu, Sep 18, 2008 at 8:57 AM, Nino Saturnino Martinez Vazquez Wael
<[EMAIL PROTECTED]> wrote:
  

Hmmm wierd

It should be working, it are on my pc... Could you try once more.. Im not
sure if you can cache an archetype when specifying a remote repo?



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

  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: [announce] Wicketstuff Iolite 0.3

2008-09-18 Thread Gwyn Evans
This looks a little sparse?

[DEBUG] Trying repository wicketstuff-iolite-repo
Downloading: 
http://wicketstuff.org/maven/repository/org/wicketstuff/iolite/wicketstuff-iolite/0.3-SNAPSHOT/wicketstuff-iolite-0.3-SNAPSHOT.jar
13K downloaded
.
.
$ jar tvf 
\Java\Maven2_Repository\org\wicketstuff\iolite\wicketstuff-iolite\0.3-SNAPSHOT\wicketstuff-iolite-0.3-SNAPSHOT.jar
 2087 Wed Sep 03 14:55:12 BST 2008 META-INF/maven/archetype-metadata.xml
 2013 Wed Sep 03 14:55:12 BST 2008 META-INF/maven/archetype.xml
  545 Wed Sep 03 14:55:12 BST 2008 META-INF/NOTICE
11358 Wed Sep 03 14:55:12 BST 2008 META-INF/LICENSE
  448 Wed Sep 03 14:55:12 BST 2008
archetype-resources/core/src/main/resources/META-INF/persistence.xml
 2579 Wed Sep 03 14:55:12 BST 2008
archetype-resources/core/src/main/resources/AllInOneRepositoryContext.xml
  260 Wed Sep 03 14:55:12 BST 2008
archetype-resources/core/src/main/resources/log4j.properties
 2467 Wed Sep 03 14:55:12 BST 2008 archetype-resources/core/pom.xml
 6696 Wed Sep 03 14:55:12 BST 2008 archetype-resources/pom.xml
  401 Wed Sep 03 14:55:12 BST 2008
archetype-resources/web/src/main/java/pages/HomePage.html
  448 Wed Sep 03 14:55:12 BST 2008
archetype-resources/web/src/main/java/pages/BasePage.html
  443 Wed Sep 03 14:55:12 BST 2008
archetype-resources/web/src/main/java/pages/AddMessagePage.html
  417 Wed Sep 03 14:55:12 BST 2008
archetype-resources/web/src/main/resources/log4j.properties
 1827 Wed Sep 03 14:55:12 BST 2008
archetype-resources/web/src/main/webapp/WEB-INF/web.xml
 3710 Wed Sep 03 14:55:12 BST 2008 archetype-resources/web/pom.xml

$

/Gwyn


On Thu, Sep 18, 2008 at 8:57 AM, Nino Saturnino Martinez Vazquez Wael
<[EMAIL PROTECTED]> wrote:
> Hmmm wierd
>
> It should be working, it are on my pc... Could you try once more.. Im not
> sure if you can cache an archetype when specifying a remote repo?

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



Re: ModalWindow gives Exception

2008-09-18 Thread Ernesto Reinaldo Barreiro
Maybe you are looking for this jar

http://sourceforge.net/project/showfiles.php?group_id=97367&package_id=104212

I'm using version version 1.4... Which is the one maven installed for me...

Ernesto

On Thu, Sep 18, 2008 at 10:10 AM, newbie_to_wicket <[EMAIL PROTECTED]>wrote:

>
> Hi,
>
> I'm using modal window in my application, but it is not instantiating, it
> throws an Exception
>
> java.lang.NoClassDefFoundError: Lorg/joda/time/MutableDateTime;
>
> can any body suggest me which library i have to use to fix this issue.
>
> thanks
>
> --
> View this message in context:
> http://www.nabble.com/ModalWindow-gives-Exception-tp19548046p19548046.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


SessionStore and Detachable Models

2008-09-18 Thread carloc

hi everyone, 

if i use the secondlevelcachesessionstore wicket writes session state into
the disk
instead of the httpsession right? It is also the one that is used by
default.

so is it safe for me to not use abstractdetachablemodels and just use
compoundpropertymodels since memory is not that big a concern anymore
-- 
View this message in context: 
http://www.nabble.com/SessionStore-and-Detachable-Models-tp19548105p19548105.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: ModalWindow gives Exception

2008-09-18 Thread Witold Czaplewski
Hi,

this is Joda Time [1].

Witold

[1] http://joda-time.sourceforge.net

Am Thu, 18 Sep 2008 01:10:05 -0700 (PDT)
schrieb newbie_to_wicket <[EMAIL PROTECTED]>:

> 
> Hi,
> 
> I'm using modal window in my application, but it is not
> instantiating, it throws an Exception
> 
> java.lang.NoClassDefFoundError: Lorg/joda/time/MutableDateTime;
> 
> can any body suggest me which library i have to use to fix this issue.
> 
> thanks
> 

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



ModalWindow gives Exception

2008-09-18 Thread newbie_to_wicket

Hi,

I'm using modal window in my application, but it is not instantiating, it
throws an Exception

java.lang.NoClassDefFoundError: Lorg/joda/time/MutableDateTime;

can any body suggest me which library i have to use to fix this issue.

thanks

-- 
View this message in context: 
http://www.nabble.com/ModalWindow-gives-Exception-tp19548046p19548046.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: [OT] Wicket in Action Jubilation

2008-09-18 Thread Nino Saturnino Martinez Vazquez Wael
Hmm We at jayway ordered the full package(meap + pdf + tree) about a 
year ago.. We havent gotten it yet.. Have anybody gotten the book from 
amazon yet?


We have moved a level down in our building though..Might be that...

Eelco Hillenius wrote:

And it finally shows up on Amazon:
http://www.amazon.com/Wicket-Action-Martijn-Dashorst/dp/1932394982/ref=pd_bbs_sr_1?ie=UTF8&s=books&qid=1221107314&sr=8-1

We wouldn't mind a few positive reviews on Amazon of course... don't
lie, but don't be shy about sharing either ;-)

Eelco

On Wed, Sep 10, 2008 at 5:09 PM, David Leangen <[EMAIL PROTECTED]> wrote:
  

Mine arrived here in the UK yesterday too!
  

Got mine here in Japan, too. Cool!



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





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

  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: [announce] Wicketstuff Iolite 0.3

2008-09-18 Thread Nino Saturnino Martinez Vazquez Wael

Hmmm wierd

It should be working, it are on my pc... Could you try once more.. Im 
not sure if you can cache an archetype when specifying a remote repo?


Gwyn Evans wrote:

On Wed, Sep 3, 2008 at 2:30 PM, Nino Saturnino Martinez Vazquez Wael
<[EMAIL PROTECTED]> wrote:
  

A new version of Iolite archetype are out lot's of cleaning has been done.

Changes:

  * Builds on wicket 1.4
  * Simpler JPA/domain configuration with James Carmans domdrides
(http://sourceforge.net/projects/domdrides/)
  * Now a real archetype using the new archetype-metadata.xml

If you dont know about iolite heres what it are:

A maven archetype that generates a two module project with spring and
JPA-hibernate setup much like the wicket quickstart. This means that you can
run a maven command and get you running in no time with wicket, please see
more here:

http://wicketstuff.org/confluence/display/STUFFWIKI/Wicket-Iolite



Hi Nino,

Might be me, or there might be a problem with this?  In short - no
Java files! :-)

/Gwyn

Details

V:\consulting\Apps\Tmp>mvn archetype:generate
-DarchetypeGroupId=org.wicketstuff.iolite
-DarchetypeArtifactId=wicketstuff-iolite
-DarchetypeVersion=0.3-SNAPSHOT
-DarchetypeRepository=http://wicketstuff.org/maven/repository -Dg
roupId=com.mycompany -DartifactId=myproject -Dpackage=com.mycompany -Dversion=1
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'archetype'.
[INFO] 
[INFO] Building Maven Default Project
[INFO]task-segment: [archetype:generate] (aggregator-style)
[INFO] 
[INFO] Preparing archetype:generate
[INFO] No goals needed for project - skipping
[INFO] Setting property: classpath.resource.loader.class =>
'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'.
[INFO] Setting property: velocimacro.messages.on => 'false'.
[INFO] Setting property: resource.loader => 'classpath'.
[INFO] Setting property: resource.manager.logwhenfound => 'false'.
[INFO] [archetype:generate]
[INFO] Generating project in Interactive mode
[INFO] Archetype defined by properties
[INFO] snapshot
org.wicketstuff.iolite:wicketstuff-iolite:0.3-SNAPSHOT: checking for
updates from wicketstuff-iolite-repo
Confirm properties configuration:
groupId: com.mycompany
artifactId: myproject
version: 1
package: com.mycompany
 Y: :
[INFO] 
[INFO] BUILD SUCCESSFUL
[INFO] 
[INFO] Total time: 6 seconds
[INFO] Finished at: Mon Sep 15 11:49:09 BST 2008
[INFO] Final Memory: 8M/15M
[INFO] 

bash-3.2$ /bin/find
.
./myproject
./myproject/core
./myproject/core/pom.xml
./myproject/core/src
./myproject/core/src/main
./myproject/core/src/main/resources
./myproject/core/src/main/resources/AllInOneRepositoryContext.xml
./myproject/core/src/main/resources/log4j.properties
./myproject/core/src/main/resources/META-INF
./myproject/core/src/main/resources/META-INF/persistence.xml
./myproject/pom.xml
./myproject/web
./myproject/web/pom.xml
./myproject/web/src
./myproject/web/src/main
./myproject/web/src/main/java
./myproject/web/src/main/java/com
./myproject/web/src/main/java/com/mycompany
./myproject/web/src/main/java/com/mycompany/pages
./myproject/web/src/main/java/com/mycompany/pages/AddMessagePage.html
./myproject/web/src/main/java/com/mycompany/pages/BasePage.html
./myproject/web/src/main/java/com/mycompany/pages/HomePage.html
./myproject/web/src/main/resources
./myproject/web/src/main/resources/log4j.properties
./myproject/web/src/main/webapp
./myproject/web/src/main/webapp/WEB-INF
./myproject/web/src/main/webapp/WEB-INF/web.xml

bash-3.2$ mvn -version
Maven version: 2.0.9
Java version: 1.6.0_05
OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows"

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

  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: Wicket and Mootools?

2008-09-18 Thread Nino Saturnino Martinez Vazquez Wael
You can also check out the new addition to wicket stuff minis, the 
mootips integration..


Agent Mahone wrote:

Hi all

What is the best way to integrate mootools in wicket ?

Does Mootools slow down the application? Does somebody had good expierence with 
it?

Thanks in advane for any comments


__
Do You Yahoo!?
Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen Massenmails. 
http://mail.yahoo.com 
  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



IgnoreAjaxRequestException/EmptyAjaxRequestTarget: a way around it?

2008-09-18 Thread Pointbreak
I have a page that in a piece of javascript code does some updates to
the page dom, and then does a wicketajaxpost request. This all works
fine, unless the dom updates trigger loading of page-bound resources
(e.g. images). As it turns out wicket detects during the ajax requests
that other requests are made for the page (the images with their
resourceimage). In that case it just plainly substitutes the ajax
request with an EmptyAjaxRequestTarget, ignoring the original request
without warning.

Is there a way around this?

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



Re: Localized string retrieved with a warning message

2008-09-18 Thread Azzeddine Daddah
Thanks Michael,

I did but the warnings are still displayed.

private void addLinks() {
addLink("home", new StringResourceModel("navigationbar.menu.home",
this, null), HomePage.class);
addLink("numberPool", new
StringResourceModel("navigationbar.menu.numberpool", this, null),
NumberPoolPage.class);
addLink("numberPoolLog", new
StringResourceModel("navigationbar.menu.numberpoollog", this, null),
NumberPoolLogPage.class);
addLink("defragment", new
StringResourceModel("navigationbar.menu.defragment", this, null),
DefragmentPage.class);
addLink("search", new
StringResourceModel("navigationbar.menu.search", this, null),
SearchPage.class);
}

private void addLink(String id, StringResourceModel model, final Class pageClass) {
BookmarkablePageLink link = new BookmarkablePageLink(id, pageClass);
link.add(new AttributeModifier("class", true, new
AbstractReadOnlyModel() {
private static final long serialVersionUID = 1L;

@Override
public Object getObject() {
String currentPageName = pageClass.getName();
String parentPageName  = getPage().getClass().getName();
return StringUtils.equals(currentPageName, parentPageName) ?
"current_page_item" : AttributeModifier.VALUELESS_ATTRIBUTE_REMOVE;
}

}));
link.add(new Label("title", model));
add(link);
}

Gr. Azzeddine

On Thu, Sep 18, 2008 at 9:29 AM, Michael Sparer <[EMAIL PROTECTED]>wrote:

>
> Don't call getString() on your final StringResourceModels, rather just pass
> the models to the links, then you shouldn't bet the warning anymore
>
> regards,
> Michael
>
> Azzeddine Daddah wrote:
> >
> > Hi,
> >
> > I get the following warning message when trying to retrieve a localized
> > string: *Tried to retrieve a localized string for a component that has
> not
> > yet been added to the page. This can sometimes lead to an invalid or no
> > localized resource returned. Make sure you are not calling
> > Component#getString() inside your Component's constructor. Offending
> > component*
> >
> > This how my code look like:
> > public class NavigationBarPanel extends Panel {
> >
> > private static final long serialVersionUID = 1L;
> > /** The navigation bar links */
> > private final String MENU_MENU = new
> > StringResourceModel("navigationbar.menu.home", this, null).getString();
> > private final String NUMBER_POOL_MENU = new
> > StringResourceModel("navigationbar.menu.numberpool", this,
> > null).getString();
> > private final String NUMBER_POOL_LOG_MENU = new
> > StringResourceModel("navigationbar.menu.numberpoollog", this,
> > null).getString();
> > private final String DEFRAGMENT_MENU = new
> > StringResourceModel("navigationbar.menu.defragment", this,
> > null).getString();
> > private final String SEARCH_MENU = new
> > StringResourceModel("navigationbar.menu.search", this, null).getString();
> >
> > public NavigationBarPanel(String id) {
> > super(id);
> > addLinks();
> > }
> >
> > private void addLinks() {
> > addLink("home", MENU_MENU, HomePage.class);
> > addLink("numberPool", NUMBER_POOL_MENU, NumberPoolPage.class);
> > addLink("numberPoolLog", NUMBER_POOL_LOG_MENU,
> > NumberPoolLogPage.class);
> > addLink("defragment", DEFRAGMENT_MENU, DefragmentPage.class);
> > addLink("search", SEARCH_MENU, SearchPage.class);
> > }
> >
> > private void addLink(String id, String title, final Class > Page> pageClass) {
> > BookmarkablePageLink link = new BookmarkablePageLink(id,
> > pageClass);
> > link.add(new AttributeModifier("class", true, new
> > AbstractReadOnlyModel() {
> > private static final long serialVersionUID = 1L;
> >
> > @Override
> > public Object getObject() {
> > String currentPageName = pageClass.getName();
> > String parentPageName  = getPage().getClass().getName();
> > return StringUtils.equals(currentPageName,
> parentPageName)
> > ?
> > "current_page_item" : AttributeModifier.VALUELESS_ATTRIBUTE_REMOVE;
> > }
> >
> > }));
> > link.add(new Label("title", new Model(title)));
> > add(link);
> > }
> > }
> >
> > Could you please tell me why am I getting this warning. I use the same
> > strategy to add localized string to my pages but I don't get warnings.
> >
> > Gr. Azzeddine
> >
> >
>
>
> -
> Michael Sparer
> http://talk-on-tech.blogspot.com
> --
> View this message in context:
> http://www.nabble.com/Localized-string-retrieved-with-a-warning-message-tp19547462p19547514.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Azzeddine Daddah
www.hbi

Re: Localized string retrieved with a warning message

2008-09-18 Thread Michael Sparer

Don't call getString() on your final StringResourceModels, rather just pass
the models to the links, then you shouldn't bet the warning anymore

regards, 
Michael

Azzeddine Daddah wrote:
> 
> Hi,
> 
> I get the following warning message when trying to retrieve a localized
> string: *Tried to retrieve a localized string for a component that has not
> yet been added to the page. This can sometimes lead to an invalid or no
> localized resource returned. Make sure you are not calling
> Component#getString() inside your Component's constructor. Offending
> component*
> 
> This how my code look like:
> public class NavigationBarPanel extends Panel {
> 
> private static final long serialVersionUID = 1L;
> /** The navigation bar links */
> private final String MENU_MENU = new
> StringResourceModel("navigationbar.menu.home", this, null).getString();
> private final String NUMBER_POOL_MENU = new
> StringResourceModel("navigationbar.menu.numberpool", this,
> null).getString();
> private final String NUMBER_POOL_LOG_MENU = new
> StringResourceModel("navigationbar.menu.numberpoollog", this,
> null).getString();
> private final String DEFRAGMENT_MENU = new
> StringResourceModel("navigationbar.menu.defragment", this,
> null).getString();
> private final String SEARCH_MENU = new
> StringResourceModel("navigationbar.menu.search", this, null).getString();
> 
> public NavigationBarPanel(String id) {
> super(id);
> addLinks();
> }
> 
> private void addLinks() {
> addLink("home", MENU_MENU, HomePage.class);
> addLink("numberPool", NUMBER_POOL_MENU, NumberPoolPage.class);
> addLink("numberPoolLog", NUMBER_POOL_LOG_MENU,
> NumberPoolLogPage.class);
> addLink("defragment", DEFRAGMENT_MENU, DefragmentPage.class);
> addLink("search", SEARCH_MENU, SearchPage.class);
> }
> 
> private void addLink(String id, String title, final Class Page> pageClass) {
> BookmarkablePageLink link = new BookmarkablePageLink(id,
> pageClass);
> link.add(new AttributeModifier("class", true, new
> AbstractReadOnlyModel() {
> private static final long serialVersionUID = 1L;
> 
> @Override
> public Object getObject() {
> String currentPageName = pageClass.getName();
> String parentPageName  = getPage().getClass().getName();
> return StringUtils.equals(currentPageName, parentPageName)
> ?
> "current_page_item" : AttributeModifier.VALUELESS_ATTRIBUTE_REMOVE;
> }
> 
> }));
> link.add(new Label("title", new Model(title)));
> add(link);
> }
> }
> 
> Could you please tell me why am I getting this warning. I use the same
> strategy to add localized string to my pages but I don't get warnings.
> 
> Gr. Azzeddine
> 
> 


-
Michael Sparer
http://talk-on-tech.blogspot.com
-- 
View this message in context: 
http://www.nabble.com/Localized-string-retrieved-with-a-warning-message-tp19547462p19547514.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: DropDownChoice and lazy loaded choices

2008-09-18 Thread Maarten Bosteels
Hi,

I never really used OpenSessionInViewFilter, but I remember Juergen
Hoeller saying that he sometimes wished he never wrote OSIV because of
all the potential side-effects.
At the time a ridiculous big percentage of questions on the spring
forum where about OSIV.

This was several years ago though, and I have the impression that a
lot of people are using OSIV now without problems.

I guess it all works fine when you know what you're doing :-)

Maarten


On Tue, Sep 16, 2008 at 10:28 PM, Cédric Thiébault
<[EMAIL PROTECTED]> wrote:
> Ok thanks all...
> I will read again about Hibernate sessions :-)
>
> Cedric
>
>
> On Tue, Sep 16, 2008 at 4:26 PM, Igor Vaynberg <[EMAIL PROTECTED]>wrote:
>
>> +1
>>
>> -igor
>>
>> On Tue, Sep 16, 2008 at 1:24 PM, James Carman
>> <[EMAIL PROTECTED]> wrote:
>> > +1, OSIV works for me just fine, too.  You must be doing something
>> > weird.  The OSIV doesn't commit transactions by default.  So, it
>> > shouldn't be doing anything weird.
>> >
>> > On Tue, Sep 16, 2008 at 1:07 PM, Michael Sparer <[EMAIL PROTECTED]>
>> wrote:
>> >>
>> >> Before dropping OpenSessionInviewFilter I'd suggest to have a more
>> thorough
>> >> look at how hibernate works. e.g. have a look at the different cascade
>> >> styles hibernate offers and also at transaction management, then it's
>> easy
>> >> to know why, and when, hibernate "commits" without explicitly calling
>> save
>> >> ... but that's no wicket topic after all. I'm using
>> opensessioninviewfilter
>> >> with loadabledetachablemodels in my webapp and never had problems ...
>> >>
>> >> just my two cents,
>> >> Michael
>> >>
>> >>
>> >> thiebal wrote:
>> >>>
>> >>> I had lots of problems with a Spring MVC webapp that was using
>> >>> OpenSessionInViewFilter : beans were associated directly in DB when
>> they
>> >>> were added to a collection (like the current Foo/Bar case) even if I
>> >>> didn't
>> >>> commit explicitly.
>> >>> Without the session opened, I can prepare all my entities and just save
>> >>> them
>> >>> and commit.
>> >>>
>> >>> I use this filter on another webapp that just load entities form DB but
>> >>> does
>> >>> not update them. It works perfectly!
>> >>>
>> >>> I though I would have the same kind of errors with Wicket because this
>> is
>> >>> not a Wicket part but just a Hibernate functionality.
>> >>>
>> >>> If in my case, I use the filter, the Bar.foos association will be
>> loaded
>> >>> just on demand but if I add it a new created Foo entity (transient), it
>> >>> will
>> >>> try to save it on flush (so before my save/commit) and I will have an
>> >>> exception.
>> >>> Maybe I'm wrong but I remember this kind of errors with Spring MVC...
>> >>>
>> >>> Cedric
>> >>>
>> >>>
>> >>> On Tue, Sep 16, 2008 at 10:16 AM, James Carman
>> >>> <[EMAIL PROTECTED]>wrote:
>> >>>
>>  What problems does it cause?
>> 
>>  On Tue, Sep 16, 2008 at 9:14 AM, Cédric Thiébault
>>  <[EMAIL PROTECTED]> wrote:
>>  > Thanks Michael.
>>  >
>>  > But I don't use the OpenSessionInviewFilter and I don't want to use
>> it.
>>  > It creates more problems than it solves in my edit pages.
>>  >
>>  > The LoadableDetachableModel will load the whole list of choices, not
>>  > just the one that was selected by the user.
>>  > I will encounter the same error except if the
>>  > LoadableDetachableModel.load method pre-fetch the associations...
>>  >
>>  > Cedric
>>  >
>>  >
>>  > On Tue, Sep 16, 2008 at 3:01 AM, Michael Sparer <
>> [EMAIL PROTECTED]>
>>  wrote:
>>  >>
>>  >> Use LoadableDetachableModels (and be sure that the
>>  OpensessionInviewFilter
>>  >> goes before the wicketfilter) and your hibernate entity will always
>> be
>>  in
>>  >> the right session
>>  >>
>>  >> regards,
>>  >> Michael
>>  >>
>>  >> thiebal wrote:
>>  >>>
>>  >>> My DropDownChoice contains a list of hibernate entities that are
>> not
>>  >>> fully loaded.
>>  >>> But when I select a value in the dropdown I receive a
>>  >>> LazyLoadingException because Wicket tries to add an entry in a
>>  >>> collection that was not previously loaded.
>>  >>>
>>  >>> I tried to use a Converter but it is not called because
>>  >>> PropertyResolverConverter set directly the value (because their
>>  >>> classes are compatible) :
>>  >>> if (clz.isAssignableFrom(object.getClass())) {
>>  >>>   return object;
>>  >>> }
>>  >>>
>>  >>> It works if I preload each entry in the list of choices of the
>>  >>> DropDownChoice but it is very expensive. To display the dropdown,
>> I
>>  >>> just need to retrieve the name of my hibernate entity, not the
>>  >>> collection inside this bean.
>>  >>> I would like to load the collection only when the user select an
>>  >>> option in the select.
>>  >>>
>>  >>> Code :
>>  >>> class Foo {
>>  >>>   Bar bar;
>>  >>>
>>  >>>   void setBar(Bar

Localized string retrieved with a warning message

2008-09-18 Thread Azzeddine Daddah
Hi,

I get the following warning message when trying to retrieve a localized
string: *Tried to retrieve a localized string for a component that has not
yet been added to the page. This can sometimes lead to an invalid or no
localized resource returned. Make sure you are not calling
Component#getString() inside your Component's constructor. Offending
component*

This how my code look like:
public class NavigationBarPanel extends Panel {

private static final long serialVersionUID = 1L;
/** The navigation bar links */
private final String MENU_MENU = new
StringResourceModel("navigationbar.menu.home", this, null).getString();
private final String NUMBER_POOL_MENU = new
StringResourceModel("navigationbar.menu.numberpool", this,
null).getString();
private final String NUMBER_POOL_LOG_MENU = new
StringResourceModel("navigationbar.menu.numberpoollog", this,
null).getString();
private final String DEFRAGMENT_MENU = new
StringResourceModel("navigationbar.menu.defragment", this,
null).getString();
private final String SEARCH_MENU = new
StringResourceModel("navigationbar.menu.search", this, null).getString();

public NavigationBarPanel(String id) {
super(id);
addLinks();
}

private void addLinks() {
addLink("home", MENU_MENU, HomePage.class);
addLink("numberPool", NUMBER_POOL_MENU, NumberPoolPage.class);
addLink("numberPoolLog", NUMBER_POOL_LOG_MENU,
NumberPoolLogPage.class);
addLink("defragment", DEFRAGMENT_MENU, DefragmentPage.class);
addLink("search", SEARCH_MENU, SearchPage.class);
}

private void addLink(String id, String title, final Class pageClass) {
BookmarkablePageLink link = new BookmarkablePageLink(id, pageClass);
link.add(new AttributeModifier("class", true, new
AbstractReadOnlyModel() {
private static final long serialVersionUID = 1L;

@Override
public Object getObject() {
String currentPageName = pageClass.getName();
String parentPageName  = getPage().getClass().getName();
return StringUtils.equals(currentPageName, parentPageName) ?
"current_page_item" : AttributeModifier.VALUELESS_ATTRIBUTE_REMOVE;
}

}));
link.add(new Label("title", new Model(title)));
add(link);
}
}

Could you please tell me why am I getting this warning. I use the same
strategy to add localized string to my pages but I don't get warnings.

Gr. Azzeddine


Re: newbie: best practice for not rendering component?

2008-09-18 Thread Igor Vaynberg
a) interface ierrorlistener { void error(string msg); }
b) abstract class errorreportingdataprovier implements idataprovider {
   private component owner; // setter
   protected abstract internaliterator(int s, int c);
   protected abstract void reporterror(ierrorlistener l, exception e);
   public iterator iterator(int s,int c) {
  try { internaliterator(s,c); }
  catch (exception e) {
 ierrorlistener l=owner.findancestor(ierrorlistener.class);
 reporterror(l,e);
 return new emptyiterator();
   }
}
c) let your dataprovider extend the one in (b)
d) make sure whatever it is you use to render the message renders
after the dataview.

-igor

On Wed, Sep 17, 2008 at 4:54 PM, mfs <[EMAIL PROTECTED]> wrote:
>
> Hello Guys,
>
> I am trying to do something similar where i have a DataView (contained in a
> webmarkupContainer) which shows the results of a search. The whole
> implementation is ajax-based. Attached to the DataView is an IDataprovider
> implementation which is responsible for fetching the data from the database.
>
> Now i want to add this very feature, where in case of any Exception/Error in
> the back-end processing  (which is invoked by the DataProvider) of the
> search, I would want to add a feedback message on the same search-page,
> without being taken to the internal-error-page. As suggested I can certainly
> return an empty-list (from the IDataProvider.iterator()) or size=0 (from the
> IDataProvider.size()) method which would still render the DataView
> component, but i am not sure how to tranform or in other words transfer the
> knowledge of this Exception to the Page itself.
>
> One ugly hack could be to pass on the FeedbackMessage Label component to the
> IDataProvider which based on the success/failure is populated with right
> message, and re-render the feedback-panel on every ajax-response, but that
> looks ugly, i dont want to couple the UI response to DataProvider which
> ideally should work independently of it.
>
> Please suggest..
>
> Thanks and Regards,
>
> Farhan.
>
> i want to display a feedback message in case there is an error at the
>
> Eelco Hillenius wrote:
>>
>>> The basic question was more if I have understood the requirement to
>>> always add a component if the HTML-template named one.
>>
>> Yes.
>>
>>> If so, if there
>>> was some pattern that had evolved for handling alternate or
>>> error-flows when building the component graph.
>>
>> Alternative flows can be handled using panels or fragments possibly
>> combined with component replacements.
>>
>> As for the error-flow, and I don't really see why:
>>
>> try {
>>   ...query the database and build the provider and dataview
>> } catch (SQLException e) {
>>  feedback.error("Very bad things happened");
>>  // What to do here??
>> }
>>
>> should generate a different component structure rather than an error page.
>>
>> Eelco
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>
> --
> View this message in context: 
> http://www.nabble.com/newbie%3A-best-practice-for-not-rendering-component--tp12070364p19543530.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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



Re: Scalability & PageMaps

2008-09-18 Thread Uwe Schäfer

James Carman schrieb:

hi james


Do you think that modulus number should be customizable?  So, for now,
you mod your number of users by 100.  But, for larger sites, they
might want to mod it by 1000 or 256 or whatever.


actually, the first level dir is created from hash%1 and the second 
from hash/1%1, while the third level dir is the sessionId 
itself. i do not see a need for more, do you?


why should anyone care of the inner structure of the filestore, as long 
as it cannot lead to problems?


cu uwe

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