Re: org.apache.wicket.WicketRuntimeException: No get method defined for class: class java.lang.String expression: userName;

2011-04-20 Thread cablepuff
Hi Martin, yesterday that was the domain (persistent object was called User). 

The command object was call Account hence AccountCommand.

Anyways I solve my problem by adding a additional parameter. 

new DropDownChoice("userChoice", new
CompoundPropertyModel(selectedUser),
   new ListModel(users),
new ChoiceRenderer("userName", "userName")); 

This solve the problem. 

Thanks. 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/org-apache-wicket-WicketRuntimeException-No-get-method-defined-for-class-class-java-lang-String-expr-tp3459462p3465163.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: org.apache.wicket.WicketRuntimeException: No get method defined for class: class java.lang.String expression: userName;

2011-04-20 Thread Martin Grigorov
Yesterday you pasted code with class User which is nowhere in the today's
paste.
We are not oracles. We cannot help you if you give us wrong information.

On Wed, Apr 20, 2011 at 4:28 PM, cablepuff  wrote:

> final LoadableDetachableModel accountCommand = new
> AccountDetachableModel(userId, personId);
>
>
> final AccountForm form = new AccountForm("accountForm", accountCommand);
>
>
> My AccountCommand {
>  private Integer userId;
>private Integer accountId;
>private String  accountName;
>private String  accountFN;
>private String  accountLN;
> }
>
>  it does not have userName field since the userName getters is on the User
> domain object not Account command object.
>
> My AccountDetachableModel is just
>
> @Override
> protected AccountCommand load() {
>AccountCommand accountCommand = new AccountCommand();
>// query id and set the account command field.
>return accountCommand;
> }
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/org-apache-wicket-WicketRuntimeException-No-get-method-defined-for-class-class-java-lang-String-expr-tp3459462p3462988.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com <http://jweekend.com/>


Re: org.apache.wicket.WicketRuntimeException: No get method defined for class: class java.lang.String expression: userName;

2011-04-20 Thread cablepuff
final LoadableDetachableModel accountCommand = new
AccountDetachableModel(userId, personId);


final AccountForm form = new AccountForm("accountForm", accountCommand);


My AccountCommand {
 private Integer userId;
private Integer accountId;
private String  accountName;
private String  accountFN;
private String  accountLN;
}

 it does not have userName field since the userName getters is on the User
domain object not Account command object. 

My AccountDetachableModel is just 

@Override
protected AccountCommand load() {
AccountCommand accountCommand = new AccountCommand();  
// query id and set the account command field. 
return accountCommand;
}

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/org-apache-wicket-WicketRuntimeException-No-get-method-defined-for-class-class-java-lang-String-expr-tp3459462p3462988.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: org.apache.wicket.WicketRuntimeException: No get method defined for class: class java.lang.String expression: userName;

2011-04-18 Thread Clint Checketts
The error is in the model you gave your form. Since you aren't explicitly
stating a model for the DDC, it is assuming a CompoundPropertyModel on the
parent form.

I suspect your form declaration is something like

 new Form("form",new CompoundPropertyModel(getUserName()))

It should be something like

 new Form("form",new CompoundPropertyModel(new User()))

I'm personally not a fan of CPMs and prefer explicitly setting the model for
each of my components.

-Clint

On Mon, Apr 18, 2011 at 11:59 PM, cablepuff  wrote:

> Hi I have the following domain object
>
> public class User {
>   private String email;
>   private String firstName;
>   private String lastName;
>   private Account account;
>
>   public String getUserName() {
>  return this.account.getName();
>   }
>
>   public void setUserName(String username) {
>this.account.setName(username);
>  }
> }
>
> I have a form with dropdownchoice.
>
> final DropDownChoice userChoice = new
> DropDownChoice("userChoice",
>   new ListModel(users),
> new ChoiceRenderer("userName", "userName"));
>
> When the page loads i get this error!
>
> org.apache.wicket.WicketRuntimeException: No get method defined for class:
> class java.lang.String expression: userName
>at
>
> org.apache.wicket.util.lang.PropertyResolver.getGetAndSetter(PropertyResolver.java:492)
>at
>
> org.apache.wicket.util.lang.PropertyResolver.getObjectAndGetSetter(PropertyResolver.java:332)
>at
>
> org.apache.wicket.util.lang.PropertyResolver.getObjectAndGetSetter(PropertyResolver.java:242)
>at
>
> org.apache.wicket.util.lang.PropertyResolver.getValue(PropertyResolver.java:95)
>at
>
> org.apache.wicket.markup.html.form.ChoiceRenderer.getIdValue(ChoiceRenderer.java:145)
>at
>
> org.apache.wicket.markup.html.form.AbstractSingleSelectChoice.getModelValue(AbstractSingleSelectChoice.java:166)
>at
>
> org.apache.wicket.markup.html.form.FormComponent.getValue(FormComponent.java:879)
>at
>
> org.apache.wicket.markup.html.form.AbstractChoice.onComponentTagBody(AbstractChoice.java:353)
>at org.apache.wicket.Component.renderComponent(Component.java:2690)
>at
> org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1539)
>at org.apache.wicket.Component.render(Component.java:2521)
>at
> org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1441)
>at
>
> org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1604)
>at
>
> org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1528)
>at
> org.apache.wicket.markup.html.form.Form.onComponentTagBody(Form.java:2012)
>at org.apache.wicket.Component.renderComponent(Component.java:2690)
>at
> org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1539)
>at org.apache.wicket.Component.render(Component.java:2521)
>at
>
> org.apache.wicket.markup.html.border.Border$BorderBodyContainer.resolve(Border.java:421)
>at
>
> org.apache.wicket.markup.resolver.ComponentResolvers.resolve(ComponentResolvers.java:65)
>at
> org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1445)
>at
>
> org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1604)
>at
>
> org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1528)
>at
>
> org.apache.wicket.markup.html.border.Border$BorderBodyContainer.onComponentTagBody(Border.java:403)
>at org.apache.wicket.Component.renderComponent(Component.java:2690)
>at
> org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1539)
>at org.apache.wicket.Component.render(Component.java:2521)
>at
> org.apache.wicket.markup.html.border.Border.resolve(Border.java:287)
>at
>
> org.apache.wicket.markup.resolver.ComponentResolvers.resolve(ComponentResolvers.java:65)
>at
> org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1445)
>at
>
> org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1604)
>at
>
> org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1528)
>at
>
> org.apache.wicket.markup.html.border.Border$BorderBodyContainer.onComponentTagBody(Border.java:403)
>at org.apache.wicket.Component.renderComponent(Component.java:2690)
>at
> org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1539)
>at org.apache.wicket.Component.render(Compone

org.apache.wicket.WicketRuntimeException: No get method defined for class: class java.lang.String expression: userName;

2011-04-18 Thread cablepuff
Hi I have the following domain object

public class User {
   private String email;
   private String firstName;
   private String lastName;
   private Account account;
   
   public String getUserName() {
  return this.account.getName();
   }

   public void setUserName(String username) {
this.account.setName(username); 
  }
}

I have a form with dropdownchoice.

final DropDownChoice userChoice = new
DropDownChoice("userChoice",
   new ListModel(users),
new ChoiceRenderer("userName", "userName"));

When the page loads i get this error!

org.apache.wicket.WicketRuntimeException: No get method defined for class:
class java.lang.String expression: userName
at
org.apache.wicket.util.lang.PropertyResolver.getGetAndSetter(PropertyResolver.java:492)
at
org.apache.wicket.util.lang.PropertyResolver.getObjectAndGetSetter(PropertyResolver.java:332)
at
org.apache.wicket.util.lang.PropertyResolver.getObjectAndGetSetter(PropertyResolver.java:242)
at
org.apache.wicket.util.lang.PropertyResolver.getValue(PropertyResolver.java:95)
at
org.apache.wicket.markup.html.form.ChoiceRenderer.getIdValue(ChoiceRenderer.java:145)
at
org.apache.wicket.markup.html.form.AbstractSingleSelectChoice.getModelValue(AbstractSingleSelectChoice.java:166)
at
org.apache.wicket.markup.html.form.FormComponent.getValue(FormComponent.java:879)
at
org.apache.wicket.markup.html.form.AbstractChoice.onComponentTagBody(AbstractChoice.java:353)
at org.apache.wicket.Component.renderComponent(Component.java:2690)
at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1539)
at org.apache.wicket.Component.render(Component.java:2521)
at 
org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1441)
at
org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1604)
at
org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1528)
at
org.apache.wicket.markup.html.form.Form.onComponentTagBody(Form.java:2012)
at org.apache.wicket.Component.renderComponent(Component.java:2690)
at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1539)
at org.apache.wicket.Component.render(Component.java:2521)
at
org.apache.wicket.markup.html.border.Border$BorderBodyContainer.resolve(Border.java:421)
at
org.apache.wicket.markup.resolver.ComponentResolvers.resolve(ComponentResolvers.java:65)
at 
org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1445)
at
org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1604)
at
org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1528)
at
org.apache.wicket.markup.html.border.Border$BorderBodyContainer.onComponentTagBody(Border.java:403)
at org.apache.wicket.Component.renderComponent(Component.java:2690)
at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1539)
at org.apache.wicket.Component.render(Component.java:2521)
at org.apache.wicket.markup.html.border.Border.resolve(Border.java:287)
at
org.apache.wicket.markup.resolver.ComponentResolvers.resolve(ComponentResolvers.java:65)
at 
org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1445)
at
org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1604)
at
org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1528)
at
org.apache.wicket.markup.html.border.Border$BorderBodyContainer.onComponentTagBody(Border.java:403)
at org.apache.wicket.Component.renderComponent(Component.java:2690)
at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1539)
at org.apache.wicket.Component.render(Component.java:2521)
at 
org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1441)
at
org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1604)
at
org.apache.wicket.MarkupContainer.renderAssociatedMarkup(MarkupContainer.java:697)
at
org.apache.wicket.markup.html.border.Border.onComponentTagBody(Border.java:328)
at org.apache.wicket.Component.renderComponent(Component.java:2690)
at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1539)
at org.apache.wicket.Component.render(Component.java:2521)
at 
org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1441)
at
org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1604)
at
org.apache.wicket.MarkupContainer.renderAssociatedMarkup(MarkupContainer.java:697)
at
org.apache.wicket.markup.html.border.Border.onComponentTagBody(Border.java:328)
at org.apache.wicket.Component.renderComponent(C

Re: No get method defined for class error

2009-02-20 Thread Martijn Dashorst
the ddc assumes your model.bind() is the list of items to select from,
which you conveniently overwrite after constructing the DDC. Read the
javadoc for each constructor parameter... then provide the readonly
model as a constructor parameter.

Martijn

On Sat, Feb 21, 2009 at 12:03 AM, rjilani  wrote:
>
> Hi: guys I am getting "No get method defined for class RegisteredUser
> expression: countryList" when I try to execute this code
>
> registeredUser = new RegisteredUser();
>Address address = new Address();
>registeredUser.setAddress(address);
>model = new CompoundPropertyModel(registeredUser);
>setModel(model);
>add(new TextField("firstName", model.bind("firstName")));
>add(new TextField("lastName", model.bind("lastName")));
>add(new TextField("userName", model.bind("userName")));
>add(new TextField("emailAddress", model.bind("email")));
>add(new PasswordTextField("password", model.bind("password")));
>
>
>DropDownChoice countryList = new DropDownChoice("countryList",
> model.bind("address.country"));
>countryList.setChoices(new AbstractReadOnlyModel() {
>
>public Object getObject() {
>List list = null;
>try {
>
>}
>});
>
> I don't understand why the errors happens at DropDownChoice even though the
> model object has a complex property address that in turn has a property
> called country. I am not sure what I am missing here
>
> Thanks,
> RJ
>
>
> --
> View this message in context: 
> http://www.nabble.com/No-get-method-defined-for-class-error-tp22130142p22130142.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>



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

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



No get method defined for class error

2009-02-20 Thread rjilani

Hi: guys I am getting "No get method defined for class RegisteredUser
expression: countryList" when I try to execute this code

registeredUser = new RegisteredUser();
Address address = new Address();
registeredUser.setAddress(address);
model = new CompoundPropertyModel(registeredUser);
setModel(model);
add(new TextField("firstName", model.bind("firstName")));
add(new TextField("lastName", model.bind("lastName")));
add(new TextField("userName", model.bind("userName")));
add(new TextField("emailAddress", model.bind("email")));
add(new PasswordTextField("password", model.bind("password")));


DropDownChoice countryList = new DropDownChoice("countryList",
model.bind("address.country"));
countryList.setChoices(new AbstractReadOnlyModel() {

public Object getObject() {
List list = null;
try {

}
});

I don't understand why the errors happens at DropDownChoice even though the
model object has a complex property address that in turn has a property
called country. I am not sure what I am missing here

Thanks,
RJ


-- 
View this message in context: 
http://www.nabble.com/No-get-method-defined-for-class-error-tp22130142p22130142.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: get method defined for class

2008-11-06 Thread Björn-Peter Tietjens

yep, thats what the problem was...

new PropertyModel(artikel, "name")

 indeed was of Type String changing that to Type "Artikel" made it work.
Thanx very much
;-)



Michael Sparer schrieb:

nope that's not true, they don't expect Strings

correct me if i'm wrong, but i think the problem most likely lies here:

add(new DropDownChoice("ddArtikel", new PropertyModel(artikel, "name"),
artikelList, new ChoiceRenderer("name", "id"))); 


--> the choicerenderer looks for the path "id" on the model object, which is
a string in your case (new PropertyModel(artikel, "name")), use e.g. new
Model(artikel)



Jurrie Overgoor-3 wrote:
  

Björn-Peter Tietjens wrote:


Hi all,
i keep getting tis strange error:*
WicketMessage: No get method defined for class: class java.lang.String 
expression: id**

Root cause:**
org.apache.wicket.WicketRuntimeException: No get method defined for 
class: class java.lang.String expression: id***


when executing this line:
*add(new DropDownChoice("ddArtikel", new PropertyModel(artikel, 
"name"), artikelList, new ChoiceRenderer("name", "id")));


*in my class Artikel the "id" property is of type long, when i chang 
it to String then it works...


how do i need to do that to make it work as "long"?
  
I think that PropertyModels (and models in general) expect string return 
values for the POJO's getXXX() methods.


You can try to override the getIdValue() method. Something like this:

ChoiceRenderer c = new ChoiceRenderer("name", "id") {
public String getIdValue(Object object, int index) {
return "" + (long)object;
}
};

Note that this code is untested, and intended as explanation.

--
With kind regards,
Jurrie Overgoor
2go-mobile b.v.




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





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


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



Re: get method defined for class

2008-11-06 Thread Michael Sparer

nope that's not true, they don't expect Strings

correct me if i'm wrong, but i think the problem most likely lies here:

add(new DropDownChoice("ddArtikel", new PropertyModel(artikel, "name"),
artikelList, new ChoiceRenderer("name", "id"))); 

--> the choicerenderer looks for the path "id" on the model object, which is
a string in your case (new PropertyModel(artikel, "name")), use e.g. new
Model(artikel)



Jurrie Overgoor-3 wrote:
> 
> Björn-Peter Tietjens wrote:
>> Hi all,
>> i keep getting tis strange error:*
>> WicketMessage: No get method defined for class: class java.lang.String 
>> expression: id**
>> Root cause:**
>> org.apache.wicket.WicketRuntimeException: No get method defined for 
>> class: class java.lang.String expression: id***
>>
>> when executing this line:
>> *add(new DropDownChoice("ddArtikel", new PropertyModel(artikel, 
>> "name"), artikelList, new ChoiceRenderer("name", "id")));
>>
>> *in my class Artikel the "id" property is of type long, when i chang 
>> it to String then it works...
>>
>> how do i need to do that to make it work as "long"?
> 
> I think that PropertyModels (and models in general) expect string return 
> values for the POJO's getXXX() methods.
> 
> You can try to override the getIdValue() method. Something like this:
> 
> ChoiceRenderer c = new ChoiceRenderer("name", "id") {
> public String getIdValue(Object object, int index) {
> return "" + (long)object;
> }
> };
> 
> Note that this code is untested, and intended as explanation.
> 
> -- 
> With kind regards,
> Jurrie Overgoor
> 2go-mobile b.v.
> 
> 
> 
> 
> -
> 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/get-method-defined-for-class-tp20357843p20358584.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: get method defined for class

2008-11-06 Thread Jurrie Overgoor

Björn-Peter Tietjens wrote:

Hi all,
i keep getting tis strange error:*
WicketMessage: No get method defined for class: class java.lang.String 
expression: id**

Root cause:**
org.apache.wicket.WicketRuntimeException: No get method defined for 
class: class java.lang.String expression: id***


when executing this line:
*add(new DropDownChoice("ddArtikel", new PropertyModel(artikel, 
"name"), artikelList, new ChoiceRenderer("name", "id")));


*in my class Artikel the "id" property is of type long, when i chang 
it to String then it works...


how do i need to do that to make it work as "long"?


I think that PropertyModels (and models in general) expect string return 
values for the POJO's getXXX() methods.


You can try to override the getIdValue() method. Something like this:

   ChoiceRenderer c = new ChoiceRenderer("name", "id") {
   public String getIdValue(Object object, int index) {
   return "" + (long)object;
   }
   };

Note that this code is untested, and intended as explanation.

--
With kind regards,
Jurrie Overgoor
2go-mobile b.v.



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

get method defined for class

2008-11-06 Thread Björn-Peter Tietjens

Hi all,
i keep getting tis strange error:*
WicketMessage: No get method defined for class: class java.lang.String 
expression: id**

Root cause:**
org.apache.wicket.WicketRuntimeException: No get method defined for 
class: class java.lang.String expression: id***


when executing this line:
*add(new DropDownChoice("ddArtikel", new PropertyModel(artikel, "name"), 
artikelList, new ChoiceRenderer("name", "id")));


*in my class Artikel the "id" property is of type long, when i chang it 
to String then it works...


how do i need to do that to make it work as "long"?

Thanx for your help.
Cheers Björn

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



RE: No get method defined for class

2008-04-17 Thread Bruce
Hello Ritesh.

You were correct, it was in a method called that returned a model
incorrectly. 

Thanks very much for your input.

Bruce McGuire


-Original Message-
From: Ritz123 [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, 16 April, 2008 03:46 PM
To: users@wicket.apache.org
Subject: Re: No get method defined for class


It seems like its related to the choice list box, the values of the options
are getting rendered using that class.

Do you not have a  choice list on the page? 

if mwh.entity.PoolRole is your class, check if it has name property - if not
you probably will have to change the choicerenderer model to use different
property


Bruce McGuire-2 wrote:
> 
> Hello.
> 
>  
> 
> I am getting an error that I can't figure out how to track down.  The
> entity
> in the exception doesn't have, nor has it ever had, a piece of data called
> 'name'. Nor does there seem to be a place where this is getting
> instantiated, at least as far as I can tell from the exception trace.
> 
>  
> 
> Would anyone have a thought on how to figure out where the error
> originates?
> 
>  
> 
> org.apache.wicket.WicketRuntimeException: No get method defined for class:
> class mwh.entity.PoolRole expression: name
> 
> 
>  at
>
org.apache.wicket.util.lang.PropertyResolver.getGetAndSetter(PropertyResolve
> r.java:419)
> 
> 
>  at
>
org.apache.wicket.util.lang.PropertyResolver.getObjectAndGetSetter(PropertyR
> esolver.java:283)
> 
> 
>  at
>
org.apache.wicket.util.lang.PropertyResolver.getValue(PropertyResolver.java:
> 89)
> 
> 
>  at
>
org.apache.wicket.markup.html.form.ChoiceRenderer.getDisplayValue(ChoiceRend
> erer.java:119)
> 
> 
>  at
>
org.apache.wicket.markup.html.form.AbstractChoice.appendOptionHtml(AbstractC
> hoice.java:373)
> 
> 
>  at
>
org.apache.wicket.markup.html.form.AbstractChoice.onComponentTagBody(Abstrac
> tChoice.java:350)
> 
> 
>  at org.apache.wicket.Component.renderComponent(Component.java:2189)
> 
> 
>  at
> org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1315)
> 
> 
>  at org.apache.wicket.Component.render(Component.java:2013)
> 
> 
>  at
> org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1200)
> 
> 
>  at
>
org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.jav
> a:1370)
> 
> 
>  at
>
org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:13
> 05)
> 
> 
>  at org.apache.wicket.Component.renderComponent(Component.java:2189)
> 
> 
>  at
> org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1315)
> 
> 
>  at org.apache.wicket.Component.render(Component.java:2013)
> 
> 
>  at
> org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1200)
> 
> 
>  at
>
org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.jav
> a:1370)
> 
> 
>  at
>
org.apache.wicket.MarkupContainer.renderAssociatedMarkup(MarkupContainer.jav
> a:642)
> 
> 
>  at
>
org.apache.wicket.markup.html.panel.Panel.onComponentTagBody(Panel.java:112)
> 
> 
>  at org.apache.wicket.Component.renderComponent(Component.java:2189)
> 
> 
>  at
> org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1315)
> 
> 
>  at org.apache.wicket.Component.render(Component.java:2013)
> 
> 
>  at
> org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1200)
> 
> 
>  at
> org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1332)
> 
> 
>  at org.apache.wicket.Page.onRender(Page.java:1433)
> 
> 
>  at org.apache.wicket.Component.render(Component.java:2013)
> 
> 
>  at org.apache.wicket.Page.renderPage(Page.java:922)
> 
> 
>  at
>
org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.res
> pond(BookmarkablePageRequestTarget.java:225)
> 
> 
>  at
>
org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequ
> estCycleProcessor.java:103)
> 
> 
>  at
>
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:103
> 8)
> 
> 
>  at org.apache.wicket.RequestCycle.step(RequestCycle.java:1108)
> 
> 
>  at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1177)
> 
> 
>  at org.apache.wicket.RequestCycle.request(RequestCycle.java:500)
> 
> 
>  at
> org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:261)
> 
> 
>  at
>
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:127)
> 
> 
>  at
>
o

Re: No get method defined for class

2008-04-16 Thread Ritz123

It seems like its related to the choice list box, the values of the options
are getting rendered using that class.

Do you not have a  choice list on the page? 

if mwh.entity.PoolRole is your class, check if it has name property - if not
you probably will have to change the choicerenderer model to use different
property


Bruce McGuire-2 wrote:
> 
> Hello.
> 
>  
> 
> I am getting an error that I can't figure out how to track down.  The
> entity
> in the exception doesn't have, nor has it ever had, a piece of data called
> 'name'. Nor does there seem to be a place where this is getting
> instantiated, at least as far as I can tell from the exception trace.
> 
>  
> 
> Would anyone have a thought on how to figure out where the error
> originates?
> 
>  
> 
> org.apache.wicket.WicketRuntimeException: No get method defined for class:
> class mwh.entity.PoolRole expression: name
> 
> 
>  at
> org.apache.wicket.util.lang.PropertyResolver.getGetAndSetter(PropertyResolve
> r.java:419)
> 
> 
>  at
> org.apache.wicket.util.lang.PropertyResolver.getObjectAndGetSetter(PropertyR
> esolver.java:283)
> 
> 
>  at
> org.apache.wicket.util.lang.PropertyResolver.getValue(PropertyResolver.java:
> 89)
> 
> 
>  at
> org.apache.wicket.markup.html.form.ChoiceRenderer.getDisplayValue(ChoiceRend
> erer.java:119)
> 
> 
>  at
> org.apache.wicket.markup.html.form.AbstractChoice.appendOptionHtml(AbstractC
> hoice.java:373)
> 
> 
>  at
> org.apache.wicket.markup.html.form.AbstractChoice.onComponentTagBody(Abstrac
> tChoice.java:350)
> 
> 
>  at org.apache.wicket.Component.renderComponent(Component.java:2189)
> 
> 
>  at
> org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1315)
> 
> 
>  at org.apache.wicket.Component.render(Component.java:2013)
> 
> 
>  at
> org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1200)
> 
> 
>  at
> org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.jav
> a:1370)
> 
> 
>  at
> org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:13
> 05)
> 
> 
>  at org.apache.wicket.Component.renderComponent(Component.java:2189)
> 
> 
>  at
> org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1315)
> 
> 
>  at org.apache.wicket.Component.render(Component.java:2013)
> 
> 
>  at
> org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1200)
> 
> 
>  at
> org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.jav
> a:1370)
> 
> 
>  at
> org.apache.wicket.MarkupContainer.renderAssociatedMarkup(MarkupContainer.jav
> a:642)
> 
> 
>  at
> org.apache.wicket.markup.html.panel.Panel.onComponentTagBody(Panel.java:112)
> 
> 
>  at org.apache.wicket.Component.renderComponent(Component.java:2189)
> 
> 
>  at
> org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1315)
> 
> 
>  at org.apache.wicket.Component.render(Component.java:2013)
> 
> 
>  at
> org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1200)
> 
> 
>  at
> org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1332)
> 
> 
>  at org.apache.wicket.Page.onRender(Page.java:1433)
> 
> 
>  at org.apache.wicket.Component.render(Component.java:2013)
> 
> 
>  at org.apache.wicket.Page.renderPage(Page.java:922)
> 
> 
>  at
> org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.res
> pond(BookmarkablePageRequestTarget.java:225)
> 
> 
>  at
> org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequ
> estCycleProcessor.java:103)
> 
> 
>  at
> org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:103
> 8)
> 
> 
>  at org.apache.wicket.RequestCycle.step(RequestCycle.java:1108)
> 
> 
>  at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1177)
> 
> 
>  at org.apache.wicket.RequestCycle.request(RequestCycle.java:500)
> 
> 
>  at
> org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:261)
> 
> 
>  at
> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:127)
> 
> 
>  at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
> FilterChain.java:202)
> 
> 
>  at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
> ain.java:173)
> 
> 
>  at
> org.apache.catalina.core.StandardWrapperValve.invoke(Stan

No get method defined for class

2008-04-16 Thread Bruce McGuire
Hello.

 

I am getting an error that I can't figure out how to track down.  The entity
in the exception doesn't have, nor has it ever had, a piece of data called
'name'. Nor does there seem to be a place where this is getting
instantiated, at least as far as I can tell from the exception trace.

 

Would anyone have a thought on how to figure out where the error originates?

 

org.apache.wicket.WicketRuntimeException: No get method defined for class:
class mwh.entity.PoolRole expression: name


 at
org.apache.wicket.util.lang.PropertyResolver.getGetAndSetter(PropertyResolve
r.java:419)


 at
org.apache.wicket.util.lang.PropertyResolver.getObjectAndGetSetter(PropertyR
esolver.java:283)


 at
org.apache.wicket.util.lang.PropertyResolver.getValue(PropertyResolver.java:
89)


 at
org.apache.wicket.markup.html.form.ChoiceRenderer.getDisplayValue(ChoiceRend
erer.java:119)


 at
org.apache.wicket.markup.html.form.AbstractChoice.appendOptionHtml(AbstractC
hoice.java:373)


 at
org.apache.wicket.markup.html.form.AbstractChoice.onComponentTagBody(Abstrac
tChoice.java:350)


 at org.apache.wicket.Component.renderComponent(Component.java:2189)


 at
org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1315)


 at org.apache.wicket.Component.render(Component.java:2013)


 at
org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1200)


 at
org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.jav
a:1370)


 at
org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:13
05)


 at org.apache.wicket.Component.renderComponent(Component.java:2189)


 at
org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1315)


 at org.apache.wicket.Component.render(Component.java:2013)


 at
org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1200)


 at
org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.jav
a:1370)


 at
org.apache.wicket.MarkupContainer.renderAssociatedMarkup(MarkupContainer.jav
a:642)


 at
org.apache.wicket.markup.html.panel.Panel.onComponentTagBody(Panel.java:112)


 at org.apache.wicket.Component.renderComponent(Component.java:2189)


 at
org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1315)


 at org.apache.wicket.Component.render(Component.java:2013)


 at
org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1200)


 at
org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1332)


 at org.apache.wicket.Page.onRender(Page.java:1433)


 at org.apache.wicket.Component.render(Component.java:2013)


 at org.apache.wicket.Page.renderPage(Page.java:922)


 at
org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.res
pond(BookmarkablePageRequestTarget.java:225)


 at
org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequ
estCycleProcessor.java:103)


 at
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:103
8)


 at org.apache.wicket.RequestCycle.step(RequestCycle.java:1108)


 at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1177)


 at org.apache.wicket.RequestCycle.request(RequestCycle.java:500)


 at
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:261)


 at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:127)


 at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:202)


 at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:173)


 at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:213)


 at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:178)


 at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126
)


 at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105
)


 at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:107)


 at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)


 at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)


 at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processC
onnection(Http11BaseProtocol.java:664)


 at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.jav
a:527)


 at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWo
rkerThread.java:80)


 at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:684)


 at java.lang.Thread.run(Unknown Source)

 

Thanks,

 

Bruce.