Re: inMethod Grid component, id="main"

2008-01-25 Thread Matej Knopp
Hi,

this is actually a bug. The id 'main' should not be in markup at all. This
will be fixed in svn soon. Thanks for reporting it.

-Matej

On Jan 25, 2008 6:24 PM, Ryan McKinley <[EMAIL PROTECTED]> wrote:

> First off - this component is excellent!  thank you thank you!
>
> I could just drop it in to some existing projects and it works no
> problem.  But on one project it looked all funky.  After inspecting what
> was happening, it looks like my layout used the id "main", and the grid
> adds another "main":
>   
>
> Perhaps it should use a less commonly used id?
>
>
> thanks again
> ryan
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Resizable and reorderable grid components.
http://www.inmethod.com


Re: a wicket tutorial

2008-01-25 Thread Jonathan Locke


cool! is there a url where i can see this live?
that would be fairly simple, but a big addition to the article 
because then people can see it working and decide that 
the article is worth reading from that.
   
jon


karthikg wrote:
> 
> Hi All,
> 
> Just to let you know that I posted a small tutorial on writing custom
> component here -
> 
> http://karthikg.wordpress.com/2008/01/24/developing-a-custom-apache-wicket-component/
> 
> I just wrote it to get a breather from my day job which is all about
> processing xml schemas and wsdls that c'd get really boring. Wicket , that
> way is probably more like your new born baby that you want to go back to
> everyday evening after work :)
> 
> The component is based on prototype. Igor suggested using (the better?)
> Jquery instead but I just didn't have the bandwidth to learn jquery. Hope
> the article proves to be of some help to newbies to custom component
> development.
> 
> The jsf enthusiasm (misplaced / otherwise) seems to have died down and the
> tapestry 5 crowd also seems pretty silent. This is probably a good time
> for
> wicket users to make more noise :).
> 
> Very soon we will have the eagerly awaited Wicket in Action. I was
> wondering
> what could be really cool next. We all know that the wicket team 'listens'
> to its users. So how about "wicket cookbook, oreilly?, by..ahem one
> Mr..Vaynberg / the wicket team" ??!!  ;)
> 
> Karthik
> 
> 

-- 
View this message in context: 
http://www.nabble.com/a-wicket-tutorial-tp15095191p15100387.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]



Controlling render for DropDownChoice

2008-01-25 Thread Mathias P.W Nilsson

Is there anyway to control the rendering of a dropdownchoice? 
I don't mean implementing IChoiceRenderer but to set style on option tag in
select parent tag.
I tried to indent the name in a select tag by implementing the
IChoiceRenderer but it doens't work. 
See getDisplayValue



 class TestChoiceRenderer implements IChoiceRenderer {

public Object getDisplayValue(Object object) {
// I don't know if it can be anything other...??
if (object instanceof se.boardstore.model.Category) {
se.boardstore.model.Category so =
(se.boardstore.model.Category) object;
if( ! so.isParent() ) {
return "  " + so.getName();
}else{
return so.getName();
}


}
return null;
}

public String getIdValue(Object key, int index) {
// I don't know if it can be anything other...??
if (key instanceof se.boardstore.model.Category) {
se.boardstore.model.Category selectOption =
(se.boardstore.model.Category) key;
return selectOption.getId().toString();

}
return null;
}

}

-- 
View this message in context: 
http://www.nabble.com/Controlling-render-for-DropDownChoice-tp15100129p15100129.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: create new model object of a Form from one of its FormComp values??

2008-01-25 Thread Igor Vaynberg
if account doesnt have these setters then how do you expect the form
to mutate the object?

-igor


On Jan 25, 2008 3:03 PM, infodoc <[EMAIL PROTECTED]> wrote:
>
> [offline conversation returned to thread]
>
> Igor,
>
> I understand about using the AccountBean.  That is not where the problem
> lies.
>
> Problem: how to update encapsulated field(s) of the Account object from the
> AccountBean???  See details below.  Account does NOT have set methods for
> these fields, so I cannot simply copy properties from the bean to the
> newly-created object.  That is the difficulty.
>
> Thanks,
>
> RDC
>
>
>
> i dont see why you have to give up encapsulation of anything...
>
> the bean you create does not extend account, in fact it extends
> nothing, just implements serializable. you only need this bean when
> you are creating a new instance of account.
>
> then in onsubmit() you do
>
> onsubmit() {
>   AccountBean bean=getModelObject();
>   Account acc=new Account(bean.getEmail());
>   // copy other properties from bean to acc
>
>   dao.save(acc);
>   // ^ at this point you should have the id set by hibernate
>   setModel(new HibernateEntityModel(acc));
>   // ^ notice we set a new model, from now on this form will operate
> on the instance of Account object
> }
>
>
> -igor
>
>
>
> On Jan 24, 2008 6:42 PM, RDC <[EMAIL PROTECTED]> wrote:
> > Igor,
> >
> > Thanks again for your time.
> >
> > Here's the difficulty I am having with implementing the bean idea.
> >
> > Account is a subclass of another class, let's call it Persistable.
> > Persistable has a
> private rowId field which represents the id of the object in a relational
> db.  That class
> implements a public getRowId() method, but NOT a setRowId method.  This is
> the design
> recommended by Hiberate, which I am using as my ORM.  Hibernates sets the
> rowId field
> directly reflexively, using a value provided by the db.
> >
> > Let's say the Form has an AccountBean as its model object.  That bean gets
> > updated by
> the FormComponents without problem.  It also gets saved to the db, and
> Hibernate sets its
> rowId field.  So far, so good.
> >
> > The problem: how to set the rowId of the newly-created Account object from
> > the
> AccountBean, while at the same time keeping respecting the encapsulation of
> rowId
> Only two choices I see are:
> >
> > 1. create a protected setRowID() method in Persistable (Persistable and
> > Account are
> in different packages); or
> > 2. set the rowId field reflexively.
> >
> > As in all good software engineering, both have pluses and minuses and
> > involve
> tradeoffs.  I am really hesitant to give up the safety of the strong
> encapsulation of the
> rowId field.  Plus, there are other fields with similar limitation.  This
> prompted me to
> try to find a different solution.
> >
> > Would love your thoughts on this.  Like everyone, my knowledge of java is
> > incomplete.
>  Do you see any other options?
> >
>
> > RDC
>
>
>
> > > Although I believe your solution is the best because of its simplicity,
> > due to
> other (non-wicket) constraints in my design (encapsulation of fields of an
> Account
> superclass), I was unable to use a bean or subclass the form.
> >
> > not really sure why this is an issue for you. give
> > class Account { private String email,name; public Account(String
> > email) { ... } ... }
> >
> > you can always do
> >
> > class AccountBean { private String email,name;}
> >
> > set instance of AccountBean as the model object of the form and then
> > in onsubmit() { AccountBean bean=getModelObject(); Account account=new
> > Account(bean.getEmail()); account.setName(bean.getName());
> > form.setModelObject(account); }
> >
> > you dont break any encapsulation...
> >
> >
> > cheers,
> > -igor
>
>
> and it is also more elegant to e.g. create a copy constructor or
> utility object for copying so that you don't have your submit method
> littered with code to copy properties. That's largely a matter of
> taste though.
>
> --
> View this message in context: 
> http://www.nabble.com/create-new-model-object-of-a-Form-from-one-of-its-FormComp-values---tp14983110p15098864.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: create new model object of a Form from one of its FormComp values??

2008-01-25 Thread infodoc

[offline conversation returned to thread]

Igor,

I understand about using the AccountBean.  That is not where the problem
lies.

Problem: how to update encapsulated field(s) of the Account object from the
AccountBean???  See details below.  Account does NOT have set methods for
these fields, so I cannot simply copy properties from the bean to the
newly-created object.  That is the difficulty.

Thanks,

RDC



i dont see why you have to give up encapsulation of anything...

the bean you create does not extend account, in fact it extends
nothing, just implements serializable. you only need this bean when
you are creating a new instance of account.

then in onsubmit() you do

onsubmit() {
  AccountBean bean=getModelObject();
  Account acc=new Account(bean.getEmail());
  // copy other properties from bean to acc

  dao.save(acc);
  // ^ at this point you should have the id set by hibernate
  setModel(new HibernateEntityModel(acc));
  // ^ notice we set a new model, from now on this form will operate
on the instance of Account object
}

-igor



On Jan 24, 2008 6:42 PM, RDC <[EMAIL PROTECTED]> wrote:
> Igor,
>
> Thanks again for your time.
>
> Here's the difficulty I am having with implementing the bean idea.
>
> Account is a subclass of another class, let's call it Persistable. 
> Persistable has a 
private rowId field which represents the id of the object in a relational
db.  That class 
implements a public getRowId() method, but NOT a setRowId method.  This is
the design 
recommended by Hiberate, which I am using as my ORM.  Hibernates sets the
rowId field 
directly reflexively, using a value provided by the db.
>
> Let's say the Form has an AccountBean as its model object.  That bean gets
> updated by 
the FormComponents without problem.  It also gets saved to the db, and
Hibernate sets its 
rowId field.  So far, so good.
>
> The problem: how to set the rowId of the newly-created Account object from
> the 
AccountBean, while at the same time keeping respecting the encapsulation of
rowId  
Only two choices I see are:
>
> 1. create a protected setRowID() method in Persistable (Persistable and
> Account are 
in different packages); or
> 2. set the rowId field reflexively.
>
> As in all good software engineering, both have pluses and minuses and
> involve 
tradeoffs.  I am really hesitant to give up the safety of the strong
encapsulation of the 
rowId field.  Plus, there are other fields with similar limitation.  This
prompted me to 
try to find a different solution.
>
> Would love your thoughts on this.  Like everyone, my knowledge of java is
> incomplete. 
 Do you see any other options?
>

> RDC



> > Although I believe your solution is the best because of its simplicity,
> due to 
other (non-wicket) constraints in my design (encapsulation of fields of an
Account 
superclass), I was unable to use a bean or subclass the form.
>
> not really sure why this is an issue for you. give
> class Account { private String email,name; public Account(String
> email) { ... } ... }
>
> you can always do
>
> class AccountBean { private String email,name;}
>
> set instance of AccountBean as the model object of the form and then
> in onsubmit() { AccountBean bean=getModelObject(); Account account=new
> Account(bean.getEmail()); account.setName(bean.getName());
> form.setModelObject(account); }
>
> you dont break any encapsulation...
>
>
> cheers,
> -igor


and it is also more elegant to e.g. create a copy constructor or
utility object for copying so that you don't have your submit method
littered with code to copy properties. That's largely a matter of
taste though.

-- 
View this message in context: 
http://www.nabble.com/create-new-model-object-of-a-Form-from-one-of-its-FormComp-values---tp14983110p15098864.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: About NiceUrl(s)/Mounting ?

2008-01-25 Thread Igor Vaynberg
you cant.

the whole point of a bookmarkable page is that it can be created
without state (default constructor) or only from state encoded in the
url (page params constructor). that is what makes bookmarkable urls
possible.

-igor


On Jan 25, 2008 2:34 PM, mfs <[EMAIL PROTECTED]> wrote:
>
> So may be my question aint that clear enough..so i will put it in a better
> way..
>
> I have got a LoginPage with no Default or PageParameter constructor, I do
> have a public constructor with object/interface taken in as an argument(as
> below) ..
>
> public LoginPage(final ILoginPageHandler loginPageHandler)
>
> I mount this LoginPage as follows
>
> mount(new HybridUrlCodingStrategy("/myloginpage", LoginPage.class));
>
> Now when i browse this page the url does appear as specfied, but i want to
> have the link (to this page) show the same mount-ed url..now for
> bookmarkable-pages the same is done using BookmarkablePageLink i wonder how
> would it be done for pages which are not Bookmarkable.. ?
>
> Thanks in advance..
>
>
>
>
>
> mfs wrote:
> >
> > It is..thanks..
> >
> > But how to create link to these pages (i.e. the ones mounted through
> > HybridUrlCodingStrategy or rather not mounted through
> > bookmarkableURLCodingStrategy) such that the link on the status bar appear
> > the same as in the address-bar when the page is actually viewed...
> >
> > I know the same could be achieved for BookmarkablePages by creating a
> > bookmarkablePageLink..
> >
> >
> >
> >
> > Gerolf Seitz wrote:
> >>
> >> you might find HybridUrlCodingStrategy useful.
> >>
> >>   gerolf
> >>
> >> On Jan 23, 2008 2:32 AM, mfs <[EMAIL PROTECTED]> wrote:
> >>
> >>>
> >>> Guys,
> >>>
> >>> Was just reading about having nice-urls for pages through the use
> >>> mounting,
> >>> and was wondering if having nice-urls is just restricted to bookmarkable
> >>> pages, what about non-bookmarkable pages ?
> >>>
> >>> --
> >>> View this message in context:
> >>> http://www.nabble.com/About-NiceUrl%28s%29-Mounting---tp15033072p15033072.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]
> >>>
> >>>
> >>
> >>
> >
> >
>
> --
> View this message in context: 
> http://www.nabble.com/About-NiceUrl%28s%29-Mounting---tp15033072p15098225.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: About NiceUrl(s)/Mounting ?

2008-01-25 Thread mfs

So may be my question aint that clear enough..so i will put it in a better
way..

I have got a LoginPage with no Default or PageParameter constructor, I do
have a public constructor with object/interface taken in as an argument(as
below) ..

public LoginPage(final ILoginPageHandler loginPageHandler)

I mount this LoginPage as follows 

mount(new HybridUrlCodingStrategy("/myloginpage", LoginPage.class));

Now when i browse this page the url does appear as specfied, but i want to
have the link (to this page) show the same mount-ed url..now for
bookmarkable-pages the same is done using BookmarkablePageLink i wonder how
would it be done for pages which are not Bookmarkable.. ? 

Thanks in advance..





mfs wrote:
> 
> It is..thanks.. 
> 
> But how to create link to these pages (i.e. the ones mounted through
> HybridUrlCodingStrategy or rather not mounted through
> bookmarkableURLCodingStrategy) such that the link on the status bar appear
> the same as in the address-bar when the page is actually viewed...
> 
> I know the same could be achieved for BookmarkablePages by creating a
> bookmarkablePageLink..
> 
> 
> 
> 
> Gerolf Seitz wrote:
>> 
>> you might find HybridUrlCodingStrategy useful.
>> 
>>   gerolf
>> 
>> On Jan 23, 2008 2:32 AM, mfs <[EMAIL PROTECTED]> wrote:
>> 
>>>
>>> Guys,
>>>
>>> Was just reading about having nice-urls for pages through the use
>>> mounting,
>>> and was wondering if having nice-urls is just restricted to bookmarkable
>>> pages, what about non-bookmarkable pages ?
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/About-NiceUrl%28s%29-Mounting---tp15033072p15033072.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]
>>>
>>>
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/About-NiceUrl%28s%29-Mounting---tp15033072p15098225.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 problem

2008-01-25 Thread Mathias P.W Nilsson

Yes, I have read all about it. It solved when I used just new Model() and not
PropertyModel


-- 
View this message in context: 
http://www.nabble.com/DropDownChoice-problem-tp15095051p15097813.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: a wicket tutorial

2008-01-25 Thread Eelco Hillenius
> > Very soon we will have the eagerly awaited Wicket in Action. I was wondering
> > what could be really cool next. We all know that the wicket team 'listens'
> > to its users. So how about "wicket cookbook, oreilly?, by..ahem one
> > Mr..Vaynberg / the wicket team" ??!!  ;)

Actually... what would be really really great is a *good, in-depth*
explanation of how page numbering and versioning works. With images
and examples and such. Maybe something for your next blog item
Karthik? :-)

Eelco

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



Re: when cookies are disabled

2008-01-25 Thread mfs

Actually just to be sure i deleted all the existing cookies against my app,
and i still face the issue...

Well for wicketstuff i do get to see the jsessionId appended to the url for
all the examples i browsed and it seem to be working fine..btw just for
information what web/app-server are the above examples deployed on..so you
dont think i have to do any particular configuration on the web-server for
this..

btw forminput example is taking me to internal-error page with/without
cookie-enabled..has to do with something else..

Thanks in advance..





Johan Compagner wrote:
> 
> Are you sure there isnt some cookie reuse of the previous sessions?
> All urls go through urlEncode so that should alter the url, just as it
> does the first time.
> 
> What happens if you test it with http://wicketstuff.org/wicket13 ?
> 
> On 1/25/08, mfs <[EMAIL PROTECTED]> wrote:
>>
>> Thats what i expected to happen to, i am using tomcat right now and
>> checking
>> if there is any configuration i need to do..actually so far none of the
>> urls/link have session-id embedded in them..which is the reason for the
>> behavior..
>>
>>
>>
>>
>> Johan Compagner wrote:
>> >
>> > That shouldnt happen. If cookies are disabled you should get a
>> > jsessionid in every url so that the container can track you
>> >
>> > On 1/25/08, mfs <[EMAIL PROTECTED]> wrote:
>> >>
>> >> Guys,
>> >>
>> >> When i disable the cookies on my browser (which i havent really played
>> >> with
>> >> before), pretty much every link i click takes me to the
>> Session-Expired
>> >> page..something i need to handle/cater too...
>> >>
>> >> I have created my own custom session by overriding newSession as
>> follows
>> >>
>> >> public Session newSession(Request request,Response response) {
>> >>   return new UserRegistrationSession(this,request);
>> >> }
>> >>
>> >> Please comment..
>> >>
>> >>
>> >>
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/when-cookies-are-disabled-tp15078644p15078644.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/when-cookies-are-disabled-tp15078644p15095044.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/when-cookies-are-disabled-tp15078644p15097235.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 problem

2008-01-25 Thread icecode

sorry dudu, i am new to wicket as well, 
have you came across this link yet? 
http://cwiki.apache.org/WICKET/dropdownchoice-examples.html

if not give it a shot


Mathias P.W Nilsson wrote:
> 
> 
> 
> Wicket Quickstart Archetype Homepage
> 
> 
> 
>   
>   
> Wicket Quickstart Archetype Homepage
> 
> message will be here
>   
>   
>   Some Person
>   Some Other Person
> 
> 
>   
>   
> 
> 
> 
> 
> ===
> CODE
> ===
> package se.boardstore.model;
> 
> import java.io.Serializable;
> import java.util.ArrayList;
> import java.util.List;
> 
> import se.boardstore.entities.store.Store;
> 
> public class Category implements Serializable{
>   
>   private Long id;
>   private String identifier;
>   private Long sortOrder;
>   private String name;
>   private String shortDescription;
>   private String longDescription;
>   private Store store;
>   private Long cachedBalance;
>   private List categories = new ArrayList();
>   
>   public Category(){
>   
>   }
> 
>   public String getIdentifier() {
>   return identifier;
>   }
> 
>   public void setIdentifier(String identifier) {
>   this.identifier = identifier;
>   }
> 
>   public Long getSortOrder() {
>   return sortOrder;
>   }
> 
>   public void setSortOrder(Long sortOrder) {
>   this.sortOrder = sortOrder;
>   }
> 
>   public Long getId() {
>   return id;
>   }
>   
>   public String toString(){
>   StringBuffer buffer = new StringBuffer();
>   buffer.append( "[Id: " + id + "]"  );
>   buffer.append( "[Identifier: " + identifier + "]"  );
>   buffer.append( "[Sortorder: " + sortOrder + "]"  );
>   
>   return buffer.toString();
>   }
> 
> 
>   public String getName() {
>   return name;
>   }
> 
> 
>   public void setName(String name) {
>   this.name = name;
>   }
> 
> 
>   public String getShortDescription() {
>   return shortDescription;
>   }
> 
> 
>   public void setShortDescription(String shortDescription) {
>   this.shortDescription = shortDescription;
>   }
> 
> 
>   public String getLongDescription() {
>   return longDescription;
>   }
> 
> 
>   public void setLongDescription(String longDescription) {
>   this.longDescription = longDescription;
>   }
> 
> 
>   public Store getStore() {
>   return store;
>   }
> 
> 
>   public void setStore(Store store) {
>   this.store = store;
>   }
> 
> 
>   public List getCategories() {
>   return categories;
>   }
> 
> 
>   public void setId(Long id) {
>   this.id = id;
>   }
> 
>   public Long getCachedBalance() {
>   return cachedBalance;
>   }
> 
>   public void setCachedBalance(Long cachedBalance) {
>   this.cachedBalance = cachedBalance;
>   }
>   
>   public void addCategory( Category category ){
>   this.categories.add( category );
>   }
>   
> }
> 
> 
> 
> CODE
> =
> 
> 
> package se.edgesoft;
> 
> import java.io.Serializable;
> import java.util.List;
> 
> import org.apache.wicket.PageParameters;
> import org.apache.wicket.extensions.markup.html.form.select.SelectOption;
> import org.apache.wicket.markup.html.WebPage;
> import org.apache.wicket.markup.html.basic.Label;
> import org.apache.wicket.markup.html.form.Button;
> import org.apache.wicket.markup.html.form.DropDownChoice;
> import org.apache.wicket.markup.html.form.Form;
> import org.apache.wicket.markup.html.form.IChoiceRenderer;
> import org.apache.wicket.markup.html.list.ListItem;
> import org.apache.wicket.markup.html.list.ListView;
> import org.apache.wicket.model.LoadableDetachableModel;
> import org.apache.wicket.model.PropertyModel;
> import org.apache.wicket.spring.injection.annot.SpringBean;
> 
> import se.boardstore.dao.CategoryDAO;
> 
> 
> /**
>  * Homepage
>  */
> public class HomePage extends WebPage {
> 
>   private static final long serialVersionUID = 1L;
>   @SpringBean(name="categoryDao")
>   private CategoryDAO categoryDAO;
> List categories;
> public HomePage(final PageParameters parameters) {
>   
> Form form = new LoginForm( "loginForm" );
>   add(form);
> 
> form.add(new Label("message", "If you see this message wicket is
> properly configured and running"));
> 
> categories =
> categoryDAO.getProxiedCategories(se.boardstore.entities.store.Store.EDDYEMERY_EU);
>   
> DropDownCho

Re: when cookies are disabled

2008-01-25 Thread Johan Compagner
Are you sure there isnt some cookie reuse of the previous sessions?
All urls go through urlEncode so that should alter the url, just as it
does the first time.

What happens if you test it with http://wicketstuff.org/wicket13 ?

On 1/25/08, mfs <[EMAIL PROTECTED]> wrote:
>
> Thats what i expected to happen to, i am using tomcat right now and checking
> if there is any configuration i need to do..actually so far none of the
> urls/link have session-id embedded in them..which is the reason for the
> behavior..
>
>
>
>
> Johan Compagner wrote:
> >
> > That shouldnt happen. If cookies are disabled you should get a
> > jsessionid in every url so that the container can track you
> >
> > On 1/25/08, mfs <[EMAIL PROTECTED]> wrote:
> >>
> >> Guys,
> >>
> >> When i disable the cookies on my browser (which i havent really played
> >> with
> >> before), pretty much every link i click takes me to the Session-Expired
> >> page..something i need to handle/cater too...
> >>
> >> I have created my own custom session by overriding newSession as follows
> >>
> >> public Session newSession(Request request,Response response) {
> >>return new UserRegistrationSession(this,request);
> >> }
> >>
> >> Please comment..
> >>
> >>
> >>
> >> --
> >> View this message in context:
> >> http://www.nabble.com/when-cookies-are-disabled-tp15078644p15078644.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/when-cookies-are-disabled-tp15078644p15095044.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: a wicket tutorial

2008-01-25 Thread Per Newgro
Hi Nick Heudecker:
> I've spoken with a publisher about writing just such a cookbook, but my
> current work schedule doesn't allow me to pursue it.
Maybe you could add a chapter to the wiki. Then the community can collect some 
interesting themes and one by one could be filled up.

Maybe that way you will not have to invest too much time, but control the 
content.

Cheers
Per

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



Re: DropDownChoice problem

2008-01-25 Thread icecode

can you post some code? and wicket tags?


Mathias P.W Nilsson wrote:
> 
> Hi!
> 
> I can't get the simples DropDownChoice to work! I want to return the
> object in my model but it returns string
> 
> This is what I have so far. I have a ArrayList of Category objects. Each
> of this Objects have a list of child Categories. I want to render the
> Category id and name in the list and when onSelectionChanged is fired I
> want to Category object. Can this be done? In my renderer I want the
> childcategories to be indented
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/DropDownChoice-problem-tp15095051p15096272.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]



DropDownChoice problem

2008-01-25 Thread Mathias P.W Nilsson

Hi!

I can't get the simples DropDownChoice to work! I want to return the object
in my model but it returns string

This is what I have so far. I have a ArrayList of Category objects. Each of
this Objects have a list of child Categories. I want to render the Category
id and name in the list and when onSelectionChanged is fired I want to
Category object. Can this be done? In my renderer I want the childcategories
to be indented


-- 
View this message in context: 
http://www.nabble.com/DropDownChoice-problem-tp15095051p15095051.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: when cookies are disabled

2008-01-25 Thread mfs

Thats what i expected to happen to, i am using tomcat right now and checking
if there is any configuration i need to do..actually so far none of the
urls/link have session-id embedded in them..which is the reason for the
behavior..




Johan Compagner wrote:
> 
> That shouldnt happen. If cookies are disabled you should get a
> jsessionid in every url so that the container can track you
> 
> On 1/25/08, mfs <[EMAIL PROTECTED]> wrote:
>>
>> Guys,
>>
>> When i disable the cookies on my browser (which i havent really played
>> with
>> before), pretty much every link i click takes me to the Session-Expired
>> page..something i need to handle/cater too...
>>
>> I have created my own custom session by overriding newSession as follows
>>
>> public Session newSession(Request request,Response response) {
>>  return new UserRegistrationSession(this,request);
>> }
>>
>> Please comment..
>>
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/when-cookies-are-disabled-tp15078644p15078644.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/when-cookies-are-disabled-tp15078644p15095044.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: Model for previous pages

2008-01-25 Thread Daniel Frisk

Thanks Igor,

with some restructuring of the pages this should be just as useful and  
without the need to access previous pages.


// Daniel


On 2008-01-25, at 18:11, Igor Vaynberg wrote:


string url=urlfor(getpage());
url=requestutils.toabsolutepath(url);

pass url onto paypal to use as the return url and you will come back
to the exact same page...

-igor


On Jan 25, 2008 5:13 AM, Daniel Frisk <[EMAIL PROTECTED]> wrote:
We have a use case in our system where users are redirected to a  
third

party web site (Paypal), they later get redirected back to our site.
How is it now possible to access the previous page or the model for
that page (if we assume that the user continue with the same  
session)?


// Daniel

-
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: a wicket tutorial

2008-01-25 Thread Nick Heudecker
I've spoken with a publisher about writing just such a cookbook, but my
current work schedule doesn't allow me to pursue it.


On Jan 25, 2008 1:49 PM, Eelco Hillenius <[EMAIL PROTECTED]> wrote:

> On Jan 25, 2008 11:30 AM, karthik Guru <[EMAIL PROTECTED]> wrote:
> > Hi All,
> >
> > Just to let you know that I posted a small tutorial on writing custom
> > component here -
> >
> >
> http://karthikg.wordpress.com/2008/01/24/developing-a-custom-apache-wicket-component/
>
> Thanks Karthik!
>
> > The jsf enthusiasm (misplaced / otherwise) seems to have died down and
> the
> > tapestry 5 crowd also seems pretty silent. This is probably a good time
> for
> > wicket users to make more noise :).
>
> Yep. Go community go :-)
>
> > Very soon we will have the eagerly awaited Wicket in Action. I was
> wondering
> > what could be really cool next. We all know that the wicket team
> 'listens'
> > to its users. So how about "wicket cookbook, oreilly?, by..ahem one
> > Mr..Vaynberg / the wicket team" ??!!  ;)
>
> What Wicket would benefit from next is a user guide that combines
> references to relevant articles and WIKI pages so that the information
> we have online (which really is quite a bit by now) is easier to
> digest.
>
> Also, it would be great to have more high quality screen casts. Like
> the one Al created a while back on creating a generic bean editor.
>
> Eelco
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Nick Heudecker
Professional Wicket Training & Consulting
http://www.systemmobile.com

Eventful - Intelligent Event Management
http://www.eventfulhq.com


Re: a wicket tutorial

2008-01-25 Thread Eelco Hillenius
On Jan 25, 2008 11:30 AM, karthik Guru <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> Just to let you know that I posted a small tutorial on writing custom
> component here -
>
> http://karthikg.wordpress.com/2008/01/24/developing-a-custom-apache-wicket-component/

Thanks Karthik!

> The jsf enthusiasm (misplaced / otherwise) seems to have died down and the
> tapestry 5 crowd also seems pretty silent. This is probably a good time for
> wicket users to make more noise :).

Yep. Go community go :-)

> Very soon we will have the eagerly awaited Wicket in Action. I was wondering
> what could be really cool next. We all know that the wicket team 'listens'
> to its users. So how about "wicket cookbook, oreilly?, by..ahem one
> Mr..Vaynberg / the wicket team" ??!!  ;)

What Wicket would benefit from next is a user guide that combines
references to relevant articles and WIKI pages so that the information
we have online (which really is quite a bit by now) is easier to
digest.

Also, it would be great to have more high quality screen casts. Like
the one Al created a while back on creating a generic bean editor.

Eelco

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



Re: a wicket tutorial

2008-01-25 Thread karthik Guru
Yes sure - I will add it as a follow up blog post this weekend.

thanks,
Karthik

On Jan 25, 2008 1:38 PM, Ryan Sonnek <[EMAIL PROTECTED]> wrote:

> If you're using scriptaculous in your example, you might be interested
> in using the wicketstuff-scriptaculous project.  it would simplify
> your custom component by:
> * automatically adding the javascript for you
> * using Java API to do effects instead of writing "String" javascript
> functions.
>
>
> On Jan 25, 2008 1:30 PM, karthik Guru <[EMAIL PROTECTED]> wrote:
> > Hi All,
> >
> > Just to let you know that I posted a small tutorial on writing custom
> > component here -
> >
> >
> http://karthikg.wordpress.com/2008/01/24/developing-a-custom-apache-wicket-component/
> >
> > I just wrote it to get a breather from my day job which is all about
> > processing xml schemas and wsdls that c'd get really boring. Wicket ,
> that
> > way is probably more like your new born baby that you want to go back to
> > everyday evening after work :)
> >
> > The component is based on prototype. Igor suggested using (the better?)
> > Jquery instead but I just didn't have the bandwidth to learn jquery.
> Hope
> > the article proves to be of some help to newbies to custom component
> > development.
> >
> > The jsf enthusiasm (misplaced / otherwise) seems to have died down and
> the
> > tapestry 5 crowd also seems pretty silent. This is probably a good time
> for
> > wicket users to make more noise :).
> >
> > Very soon we will have the eagerly awaited Wicket in Action. I was
> wondering
> > what could be really cool next. We all know that the wicket team
> 'listens'
> > to its users. So how about "wicket cookbook, oreilly?, by..ahem one
> > Mr..Vaynberg / the wicket team" ??!!  ;)
> >
> > Karthik
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
-- karthik --


Re: a wicket tutorial

2008-01-25 Thread Ryan Sonnek
If you're using scriptaculous in your example, you might be interested
in using the wicketstuff-scriptaculous project.  it would simplify
your custom component by:
* automatically adding the javascript for you
* using Java API to do effects instead of writing "String" javascript functions.


On Jan 25, 2008 1:30 PM, karthik Guru <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> Just to let you know that I posted a small tutorial on writing custom
> component here -
>
> http://karthikg.wordpress.com/2008/01/24/developing-a-custom-apache-wicket-component/
>
> I just wrote it to get a breather from my day job which is all about
> processing xml schemas and wsdls that c'd get really boring. Wicket , that
> way is probably more like your new born baby that you want to go back to
> everyday evening after work :)
>
> The component is based on prototype. Igor suggested using (the better?)
> Jquery instead but I just didn't have the bandwidth to learn jquery. Hope
> the article proves to be of some help to newbies to custom component
> development.
>
> The jsf enthusiasm (misplaced / otherwise) seems to have died down and the
> tapestry 5 crowd also seems pretty silent. This is probably a good time for
> wicket users to make more noise :).
>
> Very soon we will have the eagerly awaited Wicket in Action. I was wondering
> what could be really cool next. We all know that the wicket team 'listens'
> to its users. So how about "wicket cookbook, oreilly?, by..ahem one
> Mr..Vaynberg / the wicket team" ??!!  ;)
>
> Karthik
>

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



a wicket tutorial

2008-01-25 Thread karthik Guru
Hi All,

Just to let you know that I posted a small tutorial on writing custom
component here -

http://karthikg.wordpress.com/2008/01/24/developing-a-custom-apache-wicket-component/

I just wrote it to get a breather from my day job which is all about
processing xml schemas and wsdls that c'd get really boring. Wicket , that
way is probably more like your new born baby that you want to go back to
everyday evening after work :)

The component is based on prototype. Igor suggested using (the better?)
Jquery instead but I just didn't have the bandwidth to learn jquery. Hope
the article proves to be of some help to newbies to custom component
development.

The jsf enthusiasm (misplaced / otherwise) seems to have died down and the
tapestry 5 crowd also seems pretty silent. This is probably a good time for
wicket users to make more noise :).

Very soon we will have the eagerly awaited Wicket in Action. I was wondering
what could be really cool next. We all know that the wicket team 'listens'
to its users. So how about "wicket cookbook, oreilly?, by..ahem one
Mr..Vaynberg / the wicket team" ??!!  ;)

Karthik


Re: OutOfMemoryError

2008-01-25 Thread Eelco Hillenius
> Another option is to use a profiler in your dev environment, or a
> production-similar environment and run a jmeter script that simulates users.
> You can then create memory dumps and analyze them for leaks.

Definitively a very good idea to use jmeter and a profiler. Might be a
bit of a pain to get started, but well worth your time when that lets
you find memory leaks.

When defining a test in jmeter (using a proxy to record generally
works well), be sure you start with a fresh session, and close the
session when you end the test. So start a fresh browser instance when
you commence testing, and make sure your last action results in a
session.invalidate/ session.invalidateNow (typically your logoff
functionality, but if you don't have that functionality, simply build
a bookmarkable page that does this, just for the test). Also be sure
you understand how Wicket's page versioning works before you attempt
to build in loops within a session.

Good luck,

Eelco

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



Re: Question About Locale

2008-01-25 Thread Eelco Hillenius
On Jan 24, 2008 2:33 PM, Steve Thompson <[EMAIL PROTECTED]> wrote:
> I have a customer who has requested the ability to view multiple
> locales on a page.  It looks like I can do this fine with Wicket
> through the use of properties files,

Probably combined with overriding getLocale of component for the
pieces of content that should be rendered in a different locale than
the session's.

> but what I would like to do is
> automatically detect which locales there are properties files for.  Is
> this possible, and if so, how?

We don't have a facility for that. Scanning which files exist
relatively to a class is not difficult, but the problem is what you
miss with a component might exist higher up the hierarchy. Also, when
a search would take the regular search hierarchy into account, it
would include custom components, which sometimes ship with more/
different languages than your application supports.

So... I think basing the available locales on which properties (and
xml, we support those too) files are packaged with your components is
not a good idea, unless a scan just directly relative to one component
suffices. Are you sure the available locales isn't application-wide
for your app?

Eelco

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



Re: About NiceUrl(s)/Mounting ?

2008-01-25 Thread mfs

anyone ? 



mfs wrote:
> 
> It is..thanks.. 
> 
> But how to create link to these pages (i.e. the ones mounted through
> HybridUrlCodingStrategy or rather not mounted through
> bookmarkableURLCodingStrategy) such that the link on the status bar appear
> the same as in the address-bar when the page is actually viewed...
> 
> I know the same could be achieved for BookmarkablePages by creating a
> bookmarkablePageLink..
> 
> 
> 
> 
> Gerolf Seitz wrote:
>> 
>> you might find HybridUrlCodingStrategy useful.
>> 
>>   gerolf
>> 
>> On Jan 23, 2008 2:32 AM, mfs <[EMAIL PROTECTED]> wrote:
>> 
>>>
>>> Guys,
>>>
>>> Was just reading about having nice-urls for pages through the use
>>> mounting,
>>> and was wondering if having nice-urls is just restricted to bookmarkable
>>> pages, what about non-bookmarkable pages ?
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/About-NiceUrl%28s%29-Mounting---tp15033072p15033072.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]
>>>
>>>
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/About-NiceUrl%28s%29-Mounting---tp15033072p15093027.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]



inMethod Grid component, id="main"

2008-01-25 Thread Ryan McKinley

First off - this component is excellent!  thank you thank you!

I could just drop it in to some existing projects and it works no 
problem.  But on one project it looked all funky.  After inspecting what 
was happening, it looks like my layout used the id "main", and the grid 
adds another "main":

  

Perhaps it should use a less commonly used id?


thanks again
ryan

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



Re: Model for previous pages

2008-01-25 Thread Igor Vaynberg
string url=urlfor(getpage());
url=requestutils.toabsolutepath(url);

pass url onto paypal to use as the return url and you will come back
to the exact same page...

-igor


On Jan 25, 2008 5:13 AM, Daniel Frisk <[EMAIL PROTECTED]> wrote:
> We have a use case in our system where users are redirected to a third
> party web site (Paypal), they later get redirected back to our site.
> How is it now possible to access the previous page or the model for
> that page (if we assume that the user continue with the same session)?
>
> // Daniel
>
> -
> 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: Any Example or doucument of Rich Edit, such as YUI,FCK

2008-01-25 Thread Igor Vaynberg
there is wicket-contrib-tinymce in wicketstuff

-igor


On Jan 25, 2008 1:59 AM, Mead <[EMAIL PROTECTED]> wrote:
> Hello All,
>   Any Example or doucument of Rich Edit, such as YUI,FCK
> How to integration with wicket?
> There is so little doc about that's
> thanks to provide help
>
> Best regards,
> Mead
> [EMAIL PROTECTED]
> 2008-01-25
>
>
>
> -
> 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: Question About Locale

2008-01-25 Thread Johan Compagner
you have to program that yourself.
that is not somethign wicket or a framework can do

On Jan 25, 2008 3:40 PM, Steve Thompson <[EMAIL PROTECTED]> wrote:

> On 1/25/08, Michael Sparer <[EMAIL PROTECTED]> wrote:
> >
> > steve,
> >
> > wicket by default checks the user's locale (i.e. the locale of the
> session)
> > and looks for matching files. e.g. if your user accesses Foo.html with
> the
> > german locale "de" wicket checks whether there is a Foo_de.html (and/or
> > Foo_de.properties) file existing.
> > Have a look at
> http://cwiki.apache.org/WICKET/general-i18n-in-wicket.html
> >
>
> Thanks for the link Michael.  Unfortunately, this doesn't really
> address my issue.  Let me explain it a bit better.
>
> I have a client that has a page consisting of a number of terms and
> definitions, akin conceptually to a dictionary.  What the client wants
> is for each term to possibly be shown in a number of different
> languages.  So picture if you will a bunch of flags associated with a
> particular term.  If I click on the French flag, I see not only the
> default locale version of the term and its definition, but also the
> French as well.  Likewise, if I then click on the Chinese flag, I'm
> looking at the term in three languages.
>
> My issue is that support for locales will be an incremental thing;
> while I have produced the English version of the terms and
> definitions, the client can come up with support for other languages
> at their leisure.  As this is the case, I would like to make this
> support as intelligent as possible, which means that the application
> should be able to detect when there is a new property file (Spanish
> say) and automatically offer support for it on the page.
>
> I'll be the first to confess that to me, this sounds like an unusual
> scenario.  If it can't be done in a clean fashion, I am open to other
> suggestions as well.
>
> Thanks and best regards as always,
>
>
> Steve
>
> --
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: binding problem :(

2008-01-25 Thread Beyonder Unknown

Actually when I do the form.getModelObject() the debugger shows that it added a 
nestedModel.

Model:classname=[org.apache.wicket.model.CompoundPropertyModel]:nestedModel=[[false,
 false]]
 
--
The only constant in life is change.

- Original Message 
From: Martijn Dashorst <[EMAIL PROTECTED]>
To: users@wicket.apache.org
Sent: Thursday, January 24, 2008 11:42:26 PM
Subject: Re: binding problem :(


Do 
you 
use 
an 
item 
reuse 
strategy 
for 
the 
repeater?
Martijn

On 
1/25/08, 
Beyonder 
Unknown 
<[EMAIL PROTECTED]> 
wrote:
>
>
> 
I 
think 
for 
some 
reason, 
when 
I 
submit, 
it 
overrides 
the 
model 
in 
the
> 
form. 
and 
when 
I 
do 
form.getModelObject() 
it 
returns 
a 
wrong 
value. 
I'm
> 
suspecting 
that 
its 
in 
the 
bind 
part 
of 
my 
populateItem(). 
I 
don't 
know 
why
> 
though.
>
> 
Best,
> 
Wen 
Tong
>
> 
--
> 
The 
only 
constant 
in 
life 
is 
change.
>
> 
- 
Original 
Message 

> 
From: 
Timo 
Rantalaiho 
<[EMAIL PROTECTED]>
> 
To: 
users@wicket.apache.org
> 
Sent: 
Thursday, 
January 
24, 
2008 
8:01:57 
PM
> 
Subject: 
Re: 
binding 
problem 
:(
>
>
> 
On
> 
Thu,
> 
24
> 
Jan
> 
2008,
> 
Beyonder
> 
Unknown
> 
wrote:
> 
>
> 
For
> 
some
> 
reason,
> 
my
> 
checkbox
> 
doesn't
> 
bind
> 
to
> 
my
> 
model.
> 
I
> 
have
> 
a
> 
>
> 
DataView
> 
that
> 
contains
> 
the
> 
Check
> 
component,
> 
and
> 
in
> 
my
> 
button,
> 
onClick,
> 
>
> 
I
> 
use
> 
form.getModelObject(),
> 
but
> 
the
> 
objects
> 
doesn't
> 
get
> 
set.
> 
(Earlier
> 
>
> 
than
> 
this,
> 
I
> 
tried
> 
AjaxButton
> 
and
> 
the
> 
form.getModelObject()
> 
returns
> 
an
> 
>
> 
array
> 
of
> 
boolean)
>
> 
How
> 
you
> 
do
> 
submit
> 
the
> 
form?
> 
Are
> 
there
> 
validation
> 
errors?
> 
Remember
> 
that
> 
aonly
> 
after
> 
successful
> 
validation
> 
and
> 
submit
> 
the
> 
form
> 
and
> 
FormComponents
> 
get
> 
their
> 
models
> 
updated
> 
with
> 
values
> 
from
> 
the
> 
browser.
>
> 
I
> 
don't
> 
know
> 
if
> 
you
> 
need
> 
to
> 
use
> 
CheckGroup.
> 
I
> 
never
> 
used
> 
it,
> 
just
> 
CheckBoxes.
>
> 
>
> 
IndicatingAjaxLink
> 
link
> 
=
> 
IndicatingAjaxLink("link")
> 
{
> 
>
> 
>
>
>
>
>
>
>
>
>
> 
@SuppressWarnings("unchecked")
> 
>
>
>
>
>
>
>
>
>
> 
@Override
> 
>
>
>
>
>
>
>
>
>
> 
public
> 
void
> 
onClick(AjaxRequestTarget
> 
target)
> 
{
> 
>
>
>
>
>
>
>
>
>
>
>
> 
Collection
> 
contactList
> 
=
> 
>
> 
(Collection)
> 
form.getModelObject();
> 
>
>
>
>
>
>
>
>
>
>
>
> 
if(contactList
> 
!=
> 
null
> 
&&
> 
!contactList.isEmpty())
> 
{
> 
>
>
>
>
>
>
>
>
>
>
>
>
>
> 
for(ContactWrapper
> 
contactWrapper:
> 
contactList)
> 
>
> 
{
> 
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> 
System.out.println("contact
> 
selected:
> 
"
> 
+
> 
>
> 
contactList.isSelected()
> 
);
> 
>
>
>
>
>
>
>
>
>
>
>
> 
}
>
>
>
>
>
>
>
>
>
> 
>
>
>
>
>
>
>
>
>
> 
}
>
> 
There
> 
is
> 
something
> 
strange
> 
here
> 
as
> 
Collection
> 
shouldn't
> 
have
> 
isSelected().
> 
The
> 
isEmpty()
> 
call
> 
is
> 
also
> 
redundant.
> 
And
> 
just
> 
clicking
> 
a
> 
link
> 
doesn't
> 
submit
> 
the
> 
form,
> 
you
> 
should
> 
either
> 
submit
> 
the
> 
form
> 
(for
> 
example
> 
with
> 
AjaxFormSubmittingBehavior)
> 
or
> 
process
> 
your
> 
check
> 
box
> 
FormComponents
> 
manually
> 
(probably
> 
AjaxFormComponentUpdatingBehavior
> 
is
> 
needed
> 
to
> 
get
> 
the
> 
values
> 
to
> 
server).
>
> 
Best
> 
wishes,
> 
Timo
>
> 
--
> 
Timo
> 
Rantalaiho
>
>
>
>
>
> 
Reaktor
> 
Innovations
> 
Oy
>
> 
 
http://www.ri.fi/
> 
>
>
> 
-
> 
To
> 
unsubscribe,
> 
e-mail:
> 
[EMAIL PROTECTED]
> 
For
> 
additional
> 
commands,
> 
e-mail:
> 
[EMAIL PROTECTED]
>
>
>
>
>
>
>
>  
  
  
 

> 
Never 
miss 
a 
thing.  
Make 
Yahoo 
your 
home 
page.
> 
http://www.yahoo.com/r/hs
>
> 
-
> 
To 
unsubscribe, 
e-mail: 
[EMAIL PROTECTED]
> 
For 
additional 
commands, 
e-mail: 
[EMAIL PROTECTED]
>
>


-- 
Buy 
Wicket 
in 
Action: 
http://manning.com/dashorst
Apache 
Wicket 
1.3.0 
is 
released
Get 
it 
now: 
http://www.apache.org/dyn/closer.cgi/wicket/1.3.0





  

Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 


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



Re: binding problem :(

2008-01-25 Thread Beyonder Unknown

Hi Martjin,

No. I don't know about item resuse strategy. 

Thanks,
Wen Tong
 
--
The only constant in life is change.

- Original Message 
From: Martijn Dashorst <[EMAIL PROTECTED]>
To: users@wicket.apache.org
Sent: Thursday, January 24, 2008 11:42:26 PM
Subject: Re: binding problem :(


Do 
you 
use 
an 
item 
reuse 
strategy 
for 
the 
repeater?
Martijn

On 
1/25/08, 
Beyonder 
Unknown 
<[EMAIL PROTECTED]> 
wrote:
>
>
> 
I 
think 
for 
some 
reason, 
when 
I 
submit, 
it 
overrides 
the 
model 
in 
the
> 
form. 
and 
when 
I 
do 
form.getModelObject() 
it 
returns 
a 
wrong 
value. 
I'm
> 
suspecting 
that 
its 
in 
the 
bind 
part 
of 
my 
populateItem(). 
I 
don't 
know 
why
> 
though.
>
> 
Best,
> 
Wen 
Tong
>
> 
--
> 
The 
only 
constant 
in 
life 
is 
change.
>
> 
- 
Original 
Message 

> 
From: 
Timo 
Rantalaiho 
<[EMAIL PROTECTED]>
> 
To: 
users@wicket.apache.org
> 
Sent: 
Thursday, 
January 
24, 
2008 
8:01:57 
PM
> 
Subject: 
Re: 
binding 
problem 
:(
>
>
> 
On
> 
Thu,
> 
24
> 
Jan
> 
2008,
> 
Beyonder
> 
Unknown
> 
wrote:
> 
>
> 
For
> 
some
> 
reason,
> 
my
> 
checkbox
> 
doesn't
> 
bind
> 
to
> 
my
> 
model.
> 
I
> 
have
> 
a
> 
>
> 
DataView
> 
that
> 
contains
> 
the
> 
Check
> 
component,
> 
and
> 
in
> 
my
> 
button,
> 
onClick,
> 
>
> 
I
> 
use
> 
form.getModelObject(),
> 
but
> 
the
> 
objects
> 
doesn't
> 
get
> 
set.
> 
(Earlier
> 
>
> 
than
> 
this,
> 
I
> 
tried
> 
AjaxButton
> 
and
> 
the
> 
form.getModelObject()
> 
returns
> 
an
> 
>
> 
array
> 
of
> 
boolean)
>
> 
How
> 
you
> 
do
> 
submit
> 
the
> 
form?
> 
Are
> 
there
> 
validation
> 
errors?
> 
Remember
> 
that
> 
aonly
> 
after
> 
successful
> 
validation
> 
and
> 
submit
> 
the
> 
form
> 
and
> 
FormComponents
> 
get
> 
their
> 
models
> 
updated
> 
with
> 
values
> 
from
> 
the
> 
browser.
>
> 
I
> 
don't
> 
know
> 
if
> 
you
> 
need
> 
to
> 
use
> 
CheckGroup.
> 
I
> 
never
> 
used
> 
it,
> 
just
> 
CheckBoxes.
>
> 
>
> 
IndicatingAjaxLink
> 
link
> 
=
> 
IndicatingAjaxLink("link")
> 
{
> 
>
> 
>
>
>
>
>
>
>
>
>
> 
@SuppressWarnings("unchecked")
> 
>
>
>
>
>
>
>
>
>
> 
@Override
> 
>
>
>
>
>
>
>
>
>
> 
public
> 
void
> 
onClick(AjaxRequestTarget
> 
target)
> 
{
> 
>
>
>
>
>
>
>
>
>
>
>
> 
Collection
> 
contactList
> 
=
> 
>
> 
(Collection)
> 
form.getModelObject();
> 
>
>
>
>
>
>
>
>
>
>
>
> 
if(contactList
> 
!=
> 
null
> 
&&
> 
!contactList.isEmpty())
> 
{
> 
>
>
>
>
>
>
>
>
>
>
>
>
>
> 
for(ContactWrapper
> 
contactWrapper:
> 
contactList)
> 
>
> 
{
> 
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> 
System.out.println("contact
> 
selected:
> 
"
> 
+
> 
>
> 
contactList.isSelected()
> 
);
> 
>
>
>
>
>
>
>
>
>
>
>
> 
}
>
>
>
>
>
>
>
>
>
> 
>
>
>
>
>
>
>
>
>
> 
}
>
> 
There
> 
is
> 
something
> 
strange
> 
here
> 
as
> 
Collection
> 
shouldn't
> 
have
> 
isSelected().
> 
The
> 
isEmpty()
> 
call
> 
is
> 
also
> 
redundant.
> 
And
> 
just
> 
clicking
> 
a
> 
link
> 
doesn't
> 
submit
> 
the
> 
form,
> 
you
> 
should
> 
either
> 
submit
> 
the
> 
form
> 
(for
> 
example
> 
with
> 
AjaxFormSubmittingBehavior)
> 
or
> 
process
> 
your
> 
check
> 
box
> 
FormComponents
> 
manually
> 
(probably
> 
AjaxFormComponentUpdatingBehavior
> 
is
> 
needed
> 
to
> 
get
> 
the
> 
values
> 
to
> 
server).
>
> 
Best
> 
wishes,
> 
Timo
>
> 
--
> 
Timo
> 
Rantalaiho
>
>
>
>
>
> 
Reaktor
> 
Innovations
> 
Oy
>
> 
 
http://www.ri.fi/
> 
>
>
> 
-
> 
To
> 
unsubscribe,
> 
e-mail:
> 
[EMAIL PROTECTED]
> 
For
> 
additional
> 
commands,
> 
e-mail:
> 
[EMAIL PROTECTED]
>
>
>
>
>
>
>
>  
  
  
 

> 
Never 
miss 
a 
thing.  
Make 
Yahoo 
your 
home 
page.
> 
http://www.yahoo.com/r/hs
>
> 
-
> 
To 
unsubscribe, 
e-mail: 
[EMAIL PROTECTED]
> 
For 
additional 
commands, 
e-mail: 
[EMAIL PROTECTED]
>
>


-- 
Buy 
Wicket 
in 
Action: 
http://manning.com/dashorst
Apache 
Wicket 
1.3.0 
is 
released
Get 
it 
now: 
http://www.apache.org/dyn/closer.cgi/wicket/1.3.0





  

Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  
http://tools.search.yahoo.com/newsearch/category.php?category=shopping

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



Re: openlayers

2008-01-25 Thread Nino Saturnino Martinez Vazquez Wael

it's about maps in a dozenz of ways.

Erik van Oosten wrote:

http://openlayers.org/

My summary:
A javascript library to combine spatial information from different
sources on one page.


Nick Heudecker wrote:
  

What is openlayers?

  




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


  


--
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]



manual ajax..

2008-01-25 Thread Nino Saturnino Martinez Vazquez Wael

Hi

Im doing some manual ajax with wicketAjaxGet.. And I need to get a id 
from one of the things added upon the request, how can I get that?


It's for the openlayers contrib, I need the content of the element 
containing the id to be shown in a popup.


regards Nino

--
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: openlayers

2008-01-25 Thread Erik van Oosten
http://openlayers.org/

My summary:
A javascript library to combine spatial information from different
sources on one page.


Nick Heudecker wrote:
> What is openlayers?
>
>   
>

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



Re: openlayers

2008-01-25 Thread Nick Heudecker
What is openlayers?

On Jan 25, 2008 1:59 AM, Peter Neubauer <[EMAIL PROTECTED]> wrote:

> Cool,
> I hope we can get this to a more stable state in the next couple of
> days so others can jump in and help out. Is anyone interested? The OL
> and GeoServer combo seems to be a very appealing combination for
> rolling your own mapping  apps.
>
> /peter
>
> On Jan 24, 2008 5:42 PM, Nino Saturnino Martinez Vazquez Wael
> <[EMAIL PROTECTED]> wrote:
> > i've begun work on this.. currently its VERY unstable and unrecommended
> > to use..
> >
> >
> > Nino Saturnino Martinez Vazquez Wael wrote:
> > > Hi
> > >
> > > At some point someone talked about creating something around open
> > > layers. However nothing but the project structure are checked in, so I
> > > guess i'll continue on that, if its okay?
> > >
> > >
> > > regards
> > >
> >
> > --
> > 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]
> >
> >
>
>
>
> --
> GTalk:neubauer.peter
> Skypepeter.neubauer
> ICQ18762544
> GTalkneubauer.peter
> Phone   +46704 106975
> Mail   [EMAIL PROTECTED]
> LinkedIn   http://www.linkedin.com/in/neubauer
>
> http://www.neo4j.org - New Energy for Data - the Netbase.
> http://www.ops4j.org - New Energy for OSS Communities - Open
> Participation Software.
> http://www.qi4j.org- New Energy for Java - Domain Driven
> Development.
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Nick Heudecker
Professional Wicket Training & Consulting
http://www.systemmobile.com

Eventful - Intelligent Event Management
http://www.eventfulhq.com


Re: Question About Locale

2008-01-25 Thread Steve Thompson
On 1/25/08, Michael Sparer <[EMAIL PROTECTED]> wrote:
>
> steve,
>
> wicket by default checks the user's locale (i.e. the locale of the session)
> and looks for matching files. e.g. if your user accesses Foo.html with the
> german locale "de" wicket checks whether there is a Foo_de.html (and/or
> Foo_de.properties) file existing.
> Have a look at http://cwiki.apache.org/WICKET/general-i18n-in-wicket.html
>

Thanks for the link Michael.  Unfortunately, this doesn't really
address my issue.  Let me explain it a bit better.

I have a client that has a page consisting of a number of terms and
definitions, akin conceptually to a dictionary.  What the client wants
is for each term to possibly be shown in a number of different
languages.  So picture if you will a bunch of flags associated with a
particular term.  If I click on the French flag, I see not only the
default locale version of the term and its definition, but also the
French as well.  Likewise, if I then click on the Chinese flag, I'm
looking at the term in three languages.

My issue is that support for locales will be an incremental thing;
while I have produced the English version of the terms and
definitions, the client can come up with support for other languages
at their leisure.  As this is the case, I would like to make this
support as intelligent as possible, which means that the application
should be able to detect when there is a new property file (Spanish
say) and automatically offer support for it on the page.

I'll be the first to confess that to me, this sounds like an unusual
scenario.  If it can't be done in a clean fashion, I am open to other
suggestions as well.

Thanks and best regards as always,


Steve

--

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



Re: Any Example or doucument of Rich Edit, such as YUI,FCK

2008-01-25 Thread C S

Have you looked at the wicket stuff project for TinyMCE?  The example code
has all the documentation you should need.



Mead-2 wrote:
> 
> Hello All,
>   Any Example or doucument of Rich Edit, such as YUI,FCK
> How to integration with wicket? 
> There is so little doc about that's
> thanks to provide help
> 
> Best regards, 
> Mead
> [EMAIL PROTECTED]
> 2008-01-25
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Any-Example-or-doucument-of-Rich-Edit%2C-such-as-YUI%2CFCK-tp15084335p15088392.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]



Model for previous pages

2008-01-25 Thread Daniel Frisk
We have a use case in our system where users are redirected to a third  
party web site (Paypal), they later get redirected back to our site.  
How is it now possible to access the previous page or the model for  
that page (if we assume that the user continue with the same session)?


// Daniel

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



Re: OutOfMemoryError

2008-01-25 Thread Martijn Dashorst
You can add a parameter to the JVM to dump the memory when the server goes
OOM. This dump is readable by any tool, such as yourkit, jprofiler or the
netbeans profiler if I remember correctly.
-XXdumpheaponoutofmemoryerror (or something similar).

Another option is to use a profiler in your dev environment, or a
production-similar environment and run a jmeter script that simulates users.
You can then create memory dumps and analyze them for leaks.

Martijn

On 1/25/08, Thomas Singer <[EMAIL PROTECTED]> wrote:
>
> Our Wicket-1.3.0-based website running on Tomcat 5.5.23 regularly dies
> after
> approx. 2 weeks with an OutOfMemoryError. Please excuse my ignorance, but
> we
> don't have any experience in profiling/stress testing web applications.
> What
> particular steps we could do to detect memory leaks? Thanks in advance for
> your help.
>
> Tom
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.0 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0


Re: Maintain page state on a panel added as a listItem

2008-01-25 Thread Ned Collyer

ListView is appropriate, just make sure you set the setReuseItems to true.

Other repeaters may well work too, but ListView is the most obvious choice,
so might as well use it.  (I'm a wicket noobie, and had the same problem a
few days back)


Edvin Syse wrote:
> 
> Hi Ned,
> 
> Thanks a lot, that solved my problem. It just occured to me that I guess 
> I could use some other Repeater-component instead, so that the adding of 
> the articles takes place in the constructor :)
> 
> You made my day!
> 
> -- Edvin
> 

-- 
View this message in context: 
http://www.nabble.com/Maintain-page-state-on-a-panel-added-as-a-listItem-tp15084385p15085466.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: Pointer to example use of non-deprecated Fragment contructor

2008-01-25 Thread Paul T

neither the constructor summary nor detail in the javadoc online indicate
which are deprecated or which to use instead - have to check source (or
guess)

Paul T


igor.vaynberg wrote:
> 
> javadoc on the nondeprecated constructor is not good enough?
> 
> -igor
> 
> 
> On 10/27/07, skatz <[EMAIL PROTECTED]> wrote:
>>
>> Hi,
>>
>> The examples seem to use the deprecated constructor for Fragment.  Is
>> there
>> an example/explanation of the non-deprecated ones?
>> --
>> View this message in context:
>> http://www.nabble.com/Pointer-to-example-use-of-non-deprecated--Fragment-contructor-tf4704754.html#a13448026
>> 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/Pointer-to-example-use-of-non-deprecated--Fragment-contructor-tp13448026p15085108.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: Multiple AjaxFormSubmitBehavior's on the same form

2008-01-25 Thread Thies Edeling

Thanks! I missed the first javadoc part in the AjaxFormValidationBehavior:

//Ajax event behavior that submits the form and updates all form feedback 
panels on the page.

//gr
Thies//
//


Michael Sparer wrote:

If your form has an AjaxFormSubmitBehavior you don't need AjaxButtons to
submit it, regular buttons are sufficient (they don't even have to be
controlled by wicket). If you'd like to add an additional Ajaxbutton that
does its own stuff (i.e. you don't want it to submit the form) you can
setDefaultFormProcessing to false

hope that helps

Michael

Thies Edeling wrote:
  

Hi all,

I have a Form which gets submitted by an AjaxButton. Validation of the 
FormComponents is triggered by AjaxFormValidationBehavior.
Both add an AjaxFormSubmitBehavior to the form which bite eachother a 
bit. When the form is submitted by the AjaxButton the
AjaxFormValidationBehavior is invoked as well, trying to add the 
FeedbackPanels to the AjaxRequestTarget. This fails because the
form is already replaced on the clientside by the AjaxButton and I end 
up with a javascript error.


I fixed it by manually triggering the validation from an 
AjaxFormComponentUpdatingBehavior but I thought using a 
AjaxFormValidationBehavior and an AjaxButton together is common practice?


gr
Thies




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







-
Michael Sparer
http://talk-on-tech.blogspot.com
  



--
http://www.ehour.nl/ 
http://blog.ehour.nl/



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



Re: Maintain page state on a panel added as a listItem

2008-01-25 Thread Edvin Syse

Hi Ned,

Thanks a lot, that solved my problem. It just occured to me that I guess 
I could use some other Repeater-component instead, so that the adding of 
the articles takes place in the constructor :)


You made my day!

-- Edvin

Ned Collyer skrev:

Let me know if reading the big warning disclaimer on the ListView javadoc
helps.

http://people.apache.org/~tobrien/wicket/apidocs/org/apache/wicket/markup/html/list/ListView.html

Yes, the default behaviour is quirky (and I feel wrong) but it would be a
nightmare to change it.  A shame really, as it will be like this for
forever!


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



Re: Maintain page state on a panel added as a listItem

2008-01-25 Thread Ned Collyer

Let me know if reading the big warning disclaimer on the ListView javadoc
helps.

http://people.apache.org/~tobrien/wicket/apidocs/org/apache/wicket/markup/html/list/ListView.html

Yes, the default behaviour is quirky (and I feel wrong) but it would be a
nightmare to change it.  A shame really, as it will be like this for
forever!
-- 
View this message in context: 
http://www.nabble.com/Maintain-page-state-on-a-panel-added-as-a-listItem-tp15084385p15084766.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: Any Example or doucument of Rich Edit, such as YUI,FCK

2008-01-25 Thread Edvin Syse
Btw, the postInit "closure" of the wymeditor is for adding extra buttons
etc, all you really need in wyminit.js is:

$(document).ready(function() {
$(".${EDITOR_CLASS}").wymeditor();
});

-- Edvin


Edvin Syse skrev:
> Hi!
> 
> I once created a simple behaviour for WYMEditor like this:
> 
> public class WymEditorBehaviour extends AbstractAjaxBehavior {
>   private static final String EDITOR_CLASS = "wymeditor";
>   public static final String SUBMIT_CLASS = "wymupdate";
> 
>   public WymEditorBehaviour() {
>   }
>   
>   @Override
>   protected void onBind() {
>   super.onBind();
>   
>   getComponent().add(new SimpleAttributeAppender("class", 
> EDITOR_CLASS,
> " "));
>   
>   /* Add the onload javascript */
>   MicroMap vars = new MicroMap("EDITOR_CLASS", EDITOR_CLASS);
>   
> getComponent().add(TextTemplateHeaderContributor.forJavaScript(getClass(),
> "wyminit.js", new Model(vars)));
>   
>   };
>   
>   
>   @Override
>   public void renderHead(IHeaderResponse response) {
>   super.renderHead(response);
>   
>   response.renderJavascriptReference(JQueryBehavior.JQUERY_JS);
>   
> response.renderCSSReference("/js/wymeditor/skins/default/screen.css");
>   
> response.renderJavascriptReference("/js/wymeditor/jquery.wymeditor.pack.js");
>   }
> 
> 
> }
> 
> Then you add it to your textarea:
> 
> TextArea ta = new TextArea("id");
> ta.add(new WymEditorBehaviour());
> 
> Then the save-button of your form needs a special class for WYMEditor to
> do it's think before submit:
> 
> Button saveButton = new Button("saveArticle") {
>   @Override
>   public void onSubmit() {
>   // Save here
>   }
>   
>   @Override
>   protected void onComponentTag(ComponentTag tag) {
>   super.onComponentTag(tag);
>   tag.put("class", WymEditorBehaviour.SUBMIT_CLASS);
>   }
> };
> add(saveButton);
> 
> You can either include wicketstuff-jquery to use this, or change:
> 
> response.renderJavascriptReference(JQueryBehavior.JQUERY_JS);
> 
> .. to irefer to your local copy of jquery.js.
> 
> The wyminit.js file  looks like:
> 
> $(document).ready(function() {
>   $(".${EDITOR_CLASS}").wymeditor({
>   
>   postInit: function(wym) {
>  //construct the button's html
>   var html = ""
>   + "   + " style='background-image:"
>   + " url(/js/wymeditor/skins/default/folder_image.png)'>"
>   + "Add image"
>   + "";
> 
>   //add the button to the tools box
>   jQuery(wym._box)
>   .find(wym._options.toolsSelector +
> wym._options.toolsListSelector)
>   .append(html);
> 
>   //handle click event
>   jQuery(wym._box)
>   .find('li.wym_tools_newbutton a').click(function() {
> 
>   window.open('/admin/files/wym/filechooser',
> 'PopUpWindow', 'width=800,height=600');
>   //console.log("external"); //debug-logging
> 
>   return(false); //supress forwarding
>   });
>   }
>   });
> });
> 
> Hope this helps :)
> 
> -- Edvin
> 
> 
> Mead skrev:
>> Hello All,
>>   Any Example or doucument of Rich Edit, such as YUI,FCK
>> How to integration with wicket? 
>> There is so little doc about that's
>> thanks to provide help
>>
>> Best regards, 
>> Mead
>> [EMAIL PROTECTED]
>> 2008-01-25
>>
>>
>>
>> -
>> 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]



Any Example or doucument of Rich Edit, such as YUI,FCK

2008-01-25 Thread Mead
Hello All,
  Any Example or doucument of Rich Edit, such as YUI,FCK
How to integration with wicket? 
There is so little doc about that's
thanks to provide help

Best regards, 
Mead
[EMAIL PROTECTED]
2008-01-25



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



Re: Any Example or doucument of Rich Edit, such as YUI,FCK

2008-01-25 Thread Edvin Syse
Hi!

I once created a simple behaviour for WYMEditor like this:

public class WymEditorBehaviour extends AbstractAjaxBehavior {
private static final String EDITOR_CLASS = "wymeditor";
public static final String SUBMIT_CLASS = "wymupdate";

public WymEditorBehaviour() {
}

@Override
protected void onBind() {
super.onBind();

getComponent().add(new SimpleAttributeAppender("class", 
EDITOR_CLASS,
" "));

/* Add the onload javascript */
MicroMap vars = new MicroMap("EDITOR_CLASS", EDITOR_CLASS);

getComponent().add(TextTemplateHeaderContributor.forJavaScript(getClass(),
"wyminit.js", new Model(vars)));

};


@Override
public void renderHead(IHeaderResponse response) {
super.renderHead(response);

response.renderJavascriptReference(JQueryBehavior.JQUERY_JS);

response.renderCSSReference("/js/wymeditor/skins/default/screen.css");

response.renderJavascriptReference("/js/wymeditor/jquery.wymeditor.pack.js");
}


}

Then you add it to your textarea:

TextArea ta = new TextArea("id");
ta.add(new WymEditorBehaviour());

Then the save-button of your form needs a special class for WYMEditor to
do it's think before submit:

Button saveButton = new Button("saveArticle") {
@Override
public void onSubmit() {
// Save here
}

@Override
protected void onComponentTag(ComponentTag tag) {
super.onComponentTag(tag);
tag.put("class", WymEditorBehaviour.SUBMIT_CLASS);
}
};
add(saveButton);

You can either include wicketstuff-jquery to use this, or change:

response.renderJavascriptReference(JQueryBehavior.JQUERY_JS);

.. to irefer to your local copy of jquery.js.

The wyminit.js file  looks like:

$(document).ready(function() {
$(".${EDITOR_CLASS}").wymeditor({

postInit: function(wym) {
 //construct the button's html
  var html = ""
  + ""
  + "Add image"
  + "";

  //add the button to the tools box
  jQuery(wym._box)
  .find(wym._options.toolsSelector +
wym._options.toolsListSelector)
  .append(html);

  //handle click event
  jQuery(wym._box)
  .find('li.wym_tools_newbutton a').click(function() {

  window.open('/admin/files/wym/filechooser',
'PopUpWindow', 'width=800,height=600');
  //console.log("external"); //debug-logging

  return(false); //supress forwarding
  });
}
});
});

Hope this helps :)

-- Edvin


Mead skrev:
> Hello All,
>   Any Example or doucument of Rich Edit, such as YUI,FCK
> How to integration with wicket? 
> There is so little doc about that's
> thanks to provide help
> 
> Best regards, 
> Mead
> [EMAIL PROTECTED]
> 2008-01-25
> 
> 
> 
> -
> 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: Localization

2008-01-25 Thread tbt

Hi,

I also found out that can also use  with WicketMessageTagHandler.enable =
true in the application init method.

Thanks


Thomas Gier-2 wrote:
> 
> tbt wrote:
>> Hi
>>
>> I tried to add a attribute to a html tag using the wicket:message tag.
>> The
>> code is as follows
>>
>> HomePage.html
>>
>> > />
>>
>> HomePage.properties
>>
>> button.label=save
>>
>> This method didnt display the label in the html page. Then in the
>> applications init() method I added 
>> WicketMessageTagHandler.enable = true; and modified the tag as
>> > key="value:button.label"
>> />
>>
>> but still it is not working. Can someone tell me how to add an attribute
>> to
>> a tag using wicket:message
>>
>> Thanks
>> Nadeeshan
>>
>>
>> Erik van Oosten-3 wrote:
>>   
>>> Yes, this is possible.
>>>
>>> But actually the previous solution is usally sufficient. You can easily 
>>> define a page that is extended by all other pages. In the base page you 
>>> can include the stylesheet as before and all other pages will get it 
>>> too. (See the wiki for component inheritance.)
>>>
>>> But anyway, here is a non tested approach:
>>> - move the style.css (and variations) somewhere on your classpath. For 
>>> example in the package that contains the java file JustSomeClass.java.
>>> - remove the  from the markup file
>>> - give the stylesheet link a wicket:id, eg.:
>>>   >> wicket:id="abc">
>>> - in the code do something like:
>>>   add(new StyleSheetReference("abc", JustSomeClass.class, "style.css"))
>>>
>>> Regards,
>>>  Erik.
>>>
>>> tbt wrote:
>>> 
 Hi,

 I like to have my css file('style.css') in a seperate folder instead of
 having it in the same folder as HomePage.java because multiple web
 pages
 are
 using the same classes in the css file. Is it possible to have both css
 files(style.css and style_tw.css) in a seperate folder. This applies
 for
 only css files and not property files which I would be happy to keep in
 the
 same folder as the html and java files.

 Thanks


 Erik van Oosten-3 wrote:
   
   
> You can call:
>  getSession().setLocale(new Locale("en", "US"))
>
> In the Java javadocs 
> (http://java.sun.com/j2se/1.4.2/docs/api/java/util/Locale.html) you
> find 
> references to language and country codes. Language code "ta" means
> Tamil 
> so that is probably not what you want. Country Taiwan is represented
> by 
> county code "TW".
>
> Switching css is fairly easy. Put this in the header:
>  href="style.css">
> and move style.css to the same folder as HomePage.html.
>
> Now if you want to add another locale for the stylesheet, you just add
> a 
> file called style_[language code].css. No other changes needed.
>
> Regards,
>  Erik.
>
>
> tbt wrote:
> 
> 
>> Hi
>>
>> I have a html page called HomePage.html
>>
>> 
>> 
>> > />
>> 
>> 
>> English 
>> Taiwanese 
>>
>> 
>>
>>
>> 
>> 
>>
>> and two property files called HomePage.properties and
>> HomePage_ta.properties.
>>
>> These files hold the values which should be replaced inside the
>>  tag.
>> How can I switch between these property files once the user selects a
>> particular language inside my HomePage .java class. I also need to
>> change
>> the css file according to each language.
>>
>> eg:- If Taiwanese is selected it should look like > href="Resources/css/style_ta.css" rel="stylesheet" type="text/css" />
>>
>> 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]
>>>
>>> 
> Hi,
> 
> I use AttributeModifier / AttributeAppender to add attributes to HTML 
> elements. Something like
> 
> yourComponent.add(new AttributeModifier("value", true, new 
> ResourceModel("button.label")));
> 
> should do the trick. The boolean value makes sure that the attribute is 
> added even if it is not present in the HTML.
> 
> HTH
> Tom
> 
> P.S this is my first post to the list so "hello" to everybody :) ...
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

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


-
To unsubscribe, e-mai

Maintain page state on a panel added as a listItem

2008-01-25 Thread Edvin Syse

I have created a CMS in Wicket 1.3 and have run into a problem.

A CMS-page consits of multiple "articles". The articles are laid out on 
the page using a ListView. Normally, an article just displays title, 
text etc, so each article is represented by a simple Fragment that holds 
the fields etc. A simplified version of populateItem looks like:


item.add(new ArticleFragment("article", "articleFragment", 
item.getModel()));


Now I also need to support custom modules (Wicket Panels) as articles, 
so I created a field in my article object that can contain a fully 
qualified class name that should resolve to a Panel, and I do something 
like:


if(article.getArticleType().equals(Article.ARTICLE_TYPE_PANEL_CONTROLLER) 
&& !Strings.isEmpty(article.getControlsPanel())) {

Class panelClass = Class.forName(a.getControlsPanel());
Constructor panelConstructor = panelClass.getConstructor(String.class);
item.add((Panel) panelConstructor.newInstance("article"));
} else
item.add(new ArticleFragment("article", "articleFragment", 
item.getModel()));


This works great. The problem arise when I need to maintain state in a 
panel included this way. When the page rerenders because of a form 
submit, the panel is recreated because of the actions in the 
populateItem method of the page, and I'm screwed.


Any idea of how I could avoid this? I've started getting crazy ideas 
about getting the panel from the pagemap or something and adding it back 
via item.add(), but I don't know how to, or if that will blow up in my 
face :)


Anyone? :)

-- Edvin

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



Any Example or doucument of Rich Edit, such as YUI,FCK

2008-01-25 Thread Mead
Hello All,
  Any Example or doucument of Rich Edit, such as YUI,FCK
How to integration with wicket? 
There is so little doc about that's
thanks to provide help

Best regards, 
Mead
[EMAIL PROTECTED]
2008-01-25



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



Re: openlayers

2008-01-25 Thread Edward Yakop
I'm interested :)

Regards,
Edward Yakop

On 1/25/08, Peter Neubauer <[EMAIL PROTECTED]> wrote:
> Cool,
> I hope we can get this to a more stable state in the next couple of
> days so others can jump in and help out. Is anyone interested? The OL
> and GeoServer combo seems to be a very appealing combination for
> rolling your own mapping  apps.
>
> /peter
>
> On Jan 24, 2008 5:42 PM, Nino Saturnino Martinez Vazquez Wael
> <[EMAIL PROTECTED]> wrote:
> > i've begun work on this.. currently its VERY unstable and unrecommended
> > to use..
> >
> >
> > Nino Saturnino Martinez Vazquez Wael wrote:
> > > Hi
> > >
> > > At some point someone talked about creating something around open
> > > layers. However nothing but the project structure are checked in, so I
> > > guess i'll continue on that, if its okay?
> > >
> > >
> > > regards
> > >
> >
> > --
> > 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]
> >
> >
>
>
>
> --
> GTalk:neubauer.peter
> Skypepeter.neubauer
> ICQ18762544
> GTalkneubauer.peter
> Phone   +46704 106975
> Mail   [EMAIL PROTECTED]
> LinkedIn   http://www.linkedin.com/in/neubauer
>
> http://www.neo4j.org - New Energy for Data - the Netbase.
> http://www.ops4j.org - New Energy for OSS Communities - Open
> Participation Software.
> http://www.qi4j.org- New Energy for Java - Domain Driven
> Development.
>
> -
> 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]



OutOfMemoryError

2008-01-25 Thread Thomas Singer
Our Wicket-1.3.0-based website running on Tomcat 5.5.23 regularly dies after 
approx. 2 weeks with an OutOfMemoryError. Please excuse my ignorance, but we 
don't have any experience in profiling/stress testing web applications. What 
particular steps we could do to detect memory leaks? Thanks in advance for 
your help.


Tom

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



Re: Multiple AjaxFormSubmitBehavior's on the same form

2008-01-25 Thread Michael Sparer

If your form has an AjaxFormSubmitBehavior you don't need AjaxButtons to
submit it, regular buttons are sufficient (they don't even have to be
controlled by wicket). If you'd like to add an additional Ajaxbutton that
does its own stuff (i.e. you don't want it to submit the form) you can
setDefaultFormProcessing to false

hope that helps

Michael

Thies Edeling wrote:
> 
> Hi all,
> 
> I have a Form which gets submitted by an AjaxButton. Validation of the 
> FormComponents is triggered by AjaxFormValidationBehavior.
> Both add an AjaxFormSubmitBehavior to the form which bite eachother a 
> bit. When the form is submitted by the AjaxButton the
> AjaxFormValidationBehavior is invoked as well, trying to add the 
> FeedbackPanels to the AjaxRequestTarget. This fails because the
> form is already replaced on the clientside by the AjaxButton and I end 
> up with a javascript error.
> 
> I fixed it by manually triggering the validation from an 
> AjaxFormComponentUpdatingBehavior but I thought using a 
> AjaxFormValidationBehavior and an AjaxButton together is common practice?
> 
> gr
> Thies
> 
> 
> 
> 
> -
> 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/Multiple-AjaxFormSubmitBehavior%27s-on-the-same-form-tp15076042p15083091.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: Question About Locale

2008-01-25 Thread Michael Sparer

steve, 

wicket by default checks the user's locale (i.e. the locale of the session)
and looks for matching files. e.g. if your user accesses Foo.html with the
german locale "de" wicket checks whether there is a Foo_de.html (and/or
Foo_de.properties) file existing.
Have a look at http://cwiki.apache.org/WICKET/general-i18n-in-wicket.html

Michael

thompson4822 wrote:
> 
> I have a customer who has requested the ability to view multiple
> locales on a page.  It looks like I can do this fine with Wicket
> through the use of properties files, but what I would like to do is
> automatically detect which locales there are properties files for.  Is
> this possible, and if so, how?
> 
> Best regards to all,
> 
> 
> Steve Thompson
> 
> -
> 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/Question-About-Locale-tp15076727p15082988.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]