Re: PropertyModel implementing IComponentInheritedModel

2008-07-06 Thread Maurice Marrink
Have you seen BoundCompoundPropertyModel?

It sounds like you are looking for that behavior.

Maurice

On Sun, Jul 6, 2008 at 9:42 AM, Thomas Kappler <[EMAIL PROTECTED]> wrote:
> Thanks, Johan. Perhaps I wasn't clear enough about the motivation.
>
> On Sun, Jul 6, 2008 at 6:51 AM, Johan Compagner <[EMAIL PROTECTED]> wrote:
>> Why should the propertymodel be an inherited?
>
> Well, to have model sharing. So why not just use a CPM? Because it has
> another difference to PM: you don't give the property expression
> explicitly, but the component name is used. When you don't want that
> (keep your HTML independent of your Java), or can't do that (reusable
> panels), you can't use CPM.
>
> So, what I'd like is a CompoundPropertyModel(Object, String) that
> works like in PM: "Construct with a wrapped (IModel) or unwrapped
> (non-IModel) object and a property expression that works on the given
> model.".
>
> I feel like I'm missing something basic here, sorry - perhaps you can
> enlighten me why this wouldn't make sense.
>
> Cheers,
> Thomas
>
> -
> 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: generics

2008-07-06 Thread Matthijs Wensveen

Timo Rantalaiho wrote:

On Fri, 04 Jul 2008, Matthijs Wensveen wrote:
  

How do you cope with deeply nested model properties? For example:

public class PersonViewer extends Component {
..
}

some other component does:
person.getOrders().get(0).setAmount(0); // first order for free (as in beer)



I have no idea of Johan's project, but normally you just 
edit an object in one place at a time, and PersonViewer 
would be a read-only component with a model that always 
pulls the freshest version of the person it is displaying 
from the database.


Best wishes,
Timo

  
The thing is that when using Ajax you have to specifically add 
PersonViewer to the AjaxRequestTarget when 'some other component' 
modifies the Person object. The problem is that 'some other component' 
might not even know about or have access to PersonViewer (maybe it's a 
3rd-party component). OnModelChanged does not work in this case, because 
there is no call to setModelObject, just to some setter of the Person 
object.


While Ajax does very nice things to the GUI, it kinda messes up the 
model-driven (as in wicket model) approach to gui development. That is 
why I was thinking about some aspect-oriented solution to let components 
know about model updates, even when they keep a reference to the same 
object.


Matthijs

--
Matthijs Wensveen
Func. Internet Integration
W http://www.func.nl
T +31 20 423
F +31 20 4223500 



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



Re: No effect of code until restarting netbeans.

2008-07-06 Thread Witold Czaplewski
Am Sat, 5 Jul 2008 18:40:24 +0100
schrieb "Ayodeji Aladejebi" <[EMAIL PROTECTED]>:

> Only that after a while, tomcat will give you perm-gen error which
> will force you to terminate the tomcat instance using Task Manager
> manually before netbeans can continue managing tomcat

You can set the MaxPermSize e.g. to 512m
(Tools --> Servers --> Platform --> VM Options: -XX:MaxPermSize=512m).
At least it seems to work here. :)

Witold

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



RE: Problem with Pagination in Wicket 1.3.4

2008-07-06 Thread Umesh Paliwal
Here is the related Code for the Navigation Panel .


HTML CODE:

[dataview navigator]


JAVA CODE:


PagingNavigator navigator;
navigator = new PagingNavigator("navigator",myDataView)
{
protected void onBeforeRender() {
super.onBeforeRender();
if(pageSize < myDataView.getRowCount()){
System.out.println("INSIDE
DATAVIEW Model changed === true");
navigator.setVisible(true);
}
else
{
navigator.setVisible(false);
System.out.println("INSIDE
DATAVIEW Model changed === false");
}
}
};
navigator.setVisible(false);
System.out.println("INSIDE DATAVIEW
CONSTRUTOR=== false");
if(pageSize < myDataView.getRowCount()){
System.out.println("INSIDE DATAVIEW
CONSTRUTOR=== true");
navigator.setVisible(true);
}
add(navigator);


Thanks and regards,
Umesh Paliwal

-Original Message-
From: Eric Velazquez [mailto:[EMAIL PROTECTED] 
Sent: Friday, July 04, 2008 10:32 PM
To: users@wicket.apache.org
Subject: Re: Problem with Pagination in Wicket 1.3.4


Until 1.3.3 the PagingNavigator class added the navigation links on the
constructor, but on 1.3.4 those links are added on the onBeforeRender
method. Are you overriding the method? would be useful if you provide us
with some related piece of code.




Umesh Paliwal wrote:
> 
> Hi ,
> 
>  
> 
> I had downloaded Wicket 1.3.4 for the Autocomplete issue with IE.
> 
>  
> 
> Now the AutoComplete works fine. But when I click on the table with
> Pagination, I get the following error.
> 
>  
> 
> 
> Unexpected RuntimeException
> 
> WicketMessage: Unable to find component with id 'first' in
> [MarkupContainer [Component id = navigator, page =
> com.osi.nx.objeditor.ClassBuilder, path =
> 0:classattrpanel:panel:navigator.DataViewClassTable$3, isVisible =
true,
> isVersioned = false]]. This means that you declared wicket:id=first in
> your markup, but that you either did not add the component to your
page
> at all, or that the hierarchy does not match.
> [markup =
>
jar:file:/C:/Documents%20and%20Settings/uxp1/.m2/repository/org/apache/w
>
icket/wicket/1.3.4/wicket-1.3.4.jar!/org/apache/wicket/markup/html/navig
> ation/paging/PagingNavigator.html
> 
> 
> 
> 
>   
>  <<   < 
> 
>   # 5 
> 
>  >   >> 
>   
> 
> 
> , index = 3, current = ' ' (line 21, column 2)]
> 
> Root cause:
> 
> org.apache.wicket.markup.MarkupException: Unable to find component
with
> id 'first' in [MarkupContainer [Component id = navigator, page =
> com.osi.nx.objeditor.ClassBuilder, path =
> 0:classattrpanel:panel:navigator.DataViewClassTable$3, isVisible =
true,
> isVersioned = false]]. This means that you declared wicket:id=first in
> your markup, but that you either did not add the component to your
page
> at all, or that the hierarchy does not match.
> [markup =
>
jar:file:/C:/Documents%20and%20Settings/uxp1/.m2/repository/org/apache/w
>
icket/wicket/1.3.4/wicket-1.3.4.jar!/org/apache/wicket/markup/html/navig
> ation/paging/PagingNavigator.html
> 
> 
> 
> 
>   
>  <<   < 
> 
>   # 5 
> 
>  >   >> 
>   
> 
> 
> , index = 3, current = ' ' (line 21, column 2)]
>  at
>
org.apache.wicket.markup.MarkupStream.throwMarkupException(MarkupStream.
> java:464)
>  at
>
org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1344)
>  at
>
org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer
> .java:1476)
>  at
>
org.apache.wicket.MarkupContainer.renderAssociatedMarkup(MarkupContainer
> .java:639)
>  at
>
org.apache.wicket.markup.html.panel.Panel.onComponentTagBody(Panel.java:
> 112)
>  at
org.apache.wicket.Component.renderComponent(Component.java:2481)
>  at
> org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1411)
>  at org.apache.wicket.Component.render(Component.java:2318)
>  at
>
org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1297)
>  at
>
org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer
> .java:1476)
>  at
>
org.apache.wicket.MarkupContainer.renderAssociatedMarkup(MarkupContainer
> .java:639)
>  at
>
org.apache.wicket.markup.html.panel.Panel.onComponentTagBody(Panel.java:
> 112)
>  at
org.apache.wicket.Component.renderComponent(Component.java:2481)
>  at
> org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1411)
>  at org.apache.wicket.Component.render(Component.java:2318)
>  a

SSL support for WebApplication in development branch ..

2008-07-06 Thread Rakesh Sinha
Hi -
  I am looking at the following wiki -
http://cwiki.apache.org/confluence/display/WICKET/How+to+switch+to+SSL+mode#HowtoswitchtoSSLmode-Edit(Wicket1.3.x)%3A
.

  The wiki lists a whole number of options to add SSL support to a web
application including that of the links of controls etc. (Button /
Link etc). I was curious if any of these things are already
incorporated in the development branch already that could be picked
up.

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



MockWebApplication supporting https ?

2008-07-06 Thread Rakesh Sinha
Hi -
  Came across this class -
 org.apache.wicket.protocol.http.MockWebApplication internally used by
WicketTester. It seems to work nice with http:// , but not with SSL.
 I am working with 1.3.4 .  Can we have a future MockObject (may
be a configurable WicketTester , that can take the hostname , ssl port
too) and mock a ssl connection instead of a http:// connection).
Thanks.

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



wicketstuff yui context menu clashes with YUI menu

2008-07-06 Thread Karen Schaper
Hi,

I have a menu at the top of my page that was generated using YUI.

I then have a datatable that is refreshed using ajax.  Each row has an image
that has a

(org.wicketstuff.yui.markup.html.menu2.contextMenu )  attached to it.

My problem is that the top menu is not working when using the right click
context menu on the same page.  The yui menu items are not selectable
anymore.

The context menu is working fine just now I can't navigate to anyplace else.

I tried using the DOJO context menu but can't find an example of how to 
get
the menu items to do anything.

I'm getting so frustrated.  Any suggestions??

Btwthis is an internal domain specific web application.

Thanks

Karen


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



Re: Validators for lists

2008-07-06 Thread atul singh
No it is a text area giving comma separated input.
Any ways I found what I needed: i.e Validatable: the concrete implementation
of IValidatable which can be used outside wicket components

On Sun, Jul 6, 2008 at 10:25 AM, Johan Compagner <[EMAIL PROTECTED]>
wrote:

> So the list of objects is in this case multiple input fields?
> Why do that in a list, just give every email field that validator and
> let wicket be the one that iterates of the list. Then you also have
> much better feedback to the end user
>
> On 7/5/08, atul singh <[EMAIL PROTECTED]> wrote:
> > Can someone please suggest a way to use/extend the current validators to
> > validate list of objects.
> > The problem is i have to write code in the following manner and don't
> know
> > if it is a good approach.
> >
> > EmailAddressValidator validator = EmailAddressValidator.getInstance();
> > for (final Iterator it =
> > invitationForm.getEmailList().iterator(); it.hasNext();)
> > {
> > validator.validate(new IValidatable()
> > {
> >
> > public void error(IValidationError error)
> > {
> > form.error("One or More of email ids are not
> in
> > valid format");
> > }
> >
> > public Object getValue()
> > {
> > return (String)it.next();
> > }
> >
> > public boolean isValid()
> > {
> > return form.hasError();
> > }
> >
> > });
> >
> > if (form.hasError())
> > {
> > break;
> > }
> >}
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: calendar control for wicket ??

2008-07-06 Thread Ayodeji Aladejebi
meanwhile, you can also do this easily in wicket:

import  org.apache.wicket.extensions.yui.calendar.DatePicker; Textfield
dateField = new TextField("birthday", Date.class);
dateField.add(new DatePicker());

your binding bean

private Date birthday;
getter, setter

users can navigate with a DatePicker and everything just binds

thats also an approach

On Sun, Jul 6, 2008 at 9:28 AM, Ayodeji Aladejebi <[EMAIL PROTECTED]>
wrote:

> which DateTextField are you using?
> The one in Wicket Extensions or the one in Wicket-datetime API using JODA
> time API underneath?
> ensure you are using the one in wicket-datetime API then Study the date
> converter class of the wicket-datetime API. it seems to work well for me
>
>
>
> On Sun, Jul 6, 2008 at 5:01 AM, Rakesh Sinha <[EMAIL PROTECTED]>
> wrote:
>
>> Thanks Ayodeji.
>>
>> import org.apache.wicket.extensions.yui.calendar.DateField;
>>
>> This does the trick.
>>
>> But a clarification though -  I am using the default version as
>> specified in the javadoc.
>>
>> java: dateField = new DateField("birthday");
>>
>> html: 
>>
>> I need a couple of modifications to the same. Just curious how I get
>> about doing the same.
>>
>> 1) The textfield (DateTextField) seems to parse the dates in mm/dd/yy
>> format . I need to change the same to dd/mm/yy as the audience for
>> which the application is targeted is going to be using that particular
>> format.
>>
>> 2) When  I enter the date as "14/14/1980", say  (incorrect date to
>> begin with) - for some reason it gets rounded, and appears as
>> "2/14/81"  (a very similar behavior is exhibited by the Calendar class
>> in java.util too). Instead I would like to reminded that the input is
>> actually an error and it is incorrect altogether.
>>  This might be more involved I believe.
>>
>>
>>
>>
>> On 7/5/08, Ayodeji Aladejebi <[EMAIL PROTECTED]> wrote:
>> > are you talking about a DatePicker?
>> >
>> >  On Sun, Jul 6, 2008 at 4:11 AM, Rakesh Sinha <[EMAIL PROTECTED]>
>> >  wrote:
>> >
>> >
>> >  > Hi -
>> >  >   Just curious if there is a Calendar control / class associated with
>> >  > Wicket. Thanks.
>> >  >
>> >
>> > > -
>> >  > 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]
>>
>>
>
>
>


-- 
Aladejebi Ayodeji A.,
DabarObjects Solutions
www.dabarobjects.com


Re: calendar control for wicket ??

2008-07-06 Thread Ayodeji Aladejebi
which DateTextField are you using?
The one in Wicket Extensions or the one in Wicket-datetime API using JODA
time API underneath?
ensure you are using the one in wicket-datetime API then Study the date
converter class of the wicket-datetime API. it seems to work well for me


On Sun, Jul 6, 2008 at 5:01 AM, Rakesh Sinha <[EMAIL PROTECTED]>
wrote:

> Thanks Ayodeji.
>
> import org.apache.wicket.extensions.yui.calendar.DateField;
>
> This does the trick.
>
> But a clarification though -  I am using the default version as
> specified in the javadoc.
>
> java: dateField = new DateField("birthday");
>
> html: 
>
> I need a couple of modifications to the same. Just curious how I get
> about doing the same.
>
> 1) The textfield (DateTextField) seems to parse the dates in mm/dd/yy
> format . I need to change the same to dd/mm/yy as the audience for
> which the application is targeted is going to be using that particular
> format.
>
> 2) When  I enter the date as "14/14/1980", say  (incorrect date to
> begin with) - for some reason it gets rounded, and appears as
> "2/14/81"  (a very similar behavior is exhibited by the Calendar class
> in java.util too). Instead I would like to reminded that the input is
> actually an error and it is incorrect altogether.
>  This might be more involved I believe.
>
>
>
>
> On 7/5/08, Ayodeji Aladejebi <[EMAIL PROTECTED]> wrote:
> > are you talking about a DatePicker?
> >
> >  On Sun, Jul 6, 2008 at 4:11 AM, Rakesh Sinha <[EMAIL PROTECTED]>
> >  wrote:
> >
> >
> >  > Hi -
> >  >   Just curious if there is a Calendar control / class associated with
> >  > Wicket. Thanks.
> >  >
> >
> > > -
> >  > 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: PropertyModel implementing IComponentInheritedModel

2008-07-06 Thread Thomas Kappler
Thanks, Johan. Perhaps I wasn't clear enough about the motivation.

On Sun, Jul 6, 2008 at 6:51 AM, Johan Compagner <[EMAIL PROTECTED]> wrote:
> Why should the propertymodel be an inherited?

Well, to have model sharing. So why not just use a CPM? Because it has
another difference to PM: you don't give the property expression
explicitly, but the component name is used. When you don't want that
(keep your HTML independent of your Java), or can't do that (reusable
panels), you can't use CPM.

So, what I'd like is a CompoundPropertyModel(Object, String) that
works like in PM: "Construct with a wrapped (IModel) or unwrapped
(non-IModel) object and a property expression that works on the given
model.".

I feel like I'm missing something basic here, sorry - perhaps you can
enlighten me why this wouldn't make sense.

Cheers,
Thomas

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