Localizing StaticTextField

I have the following constructor:

StaticTextField child = new StaticTextField(this, CHILD_LABEL_LOCKED,

"groupings.locked");

The initial value "groupings.locked" is supposed to be a reference to

the Resources.properties file. I've added this entry to the properties

file but when the page is rendered the actual text...

'groupings.locked' is displayed. What am I doing wrong? The expected

outcome would be the word "Locked" which is the value specified in the

Resources.properties file.

- Billy -

[589 byte] By [Guest] at [2007-11-25 9:26:15]
# 1

hi,

try binding the field to a ResourceBundleModel in the constructor or by

setting the default model.

rgds,

kev.

chubbykidd wrote:

> I have the following constructor:

>

> StaticTextField child = new StaticTextField(this, CHILD_LABEL_LOCKED,

> "groupings.locked");

>

> The initial value "groupings.locked" is supposed to be a reference to

> the Resources.properties file. I've added this entry to the properties

> file but when the page is rendered the actual text...

> 'groupings.locked' is displayed. What am I doing wrong? The expected

> outcome would be the word "Locked" which is the value specified in the

> Resources.properties file.

>

> - Billy -

>

>

>

>

> To download the latest version of JATO, please visit:

> <a href="http://www.sun.com/software/download/developer/5102.html">http://www.s un.com/software/download/developer/5102.html</a>

>

> For more information about JATO, please visit:

> <a href="http://developer.iplanet.com/tech/appserver/framework/index.jsp">http: //developer.iplanet.com/tech/appserver/framework/index.jsp</a>

>

>

>

>

Guest at 2007-7-1 16:30:28 > top of Java-index,Development Tools,Java Tools...
# 2

I tried binding the StaticTextFields to a ResourceBundleModel but now

when the page is rendered I get no text on the page at all. Just empty

<td></td>.

Any ideas as to what I'm doing wrong? Here is a code snippet on how

I'm constructing the field...

StaticTextField child = new StaticTextField(this,

getResourceBundleModel(), CHILD_LABEL_CREATE, "home.create");

return child;

public ResourceBundleModel getResourceBundleModel() {

if(rbModel == null) {

rbModel = (ResourceBundleModel) getModel(ResourceBundleModel.class);

}

return rbModel;

}

If you need the entire class, let me know and I'll send it via e-mail.

Thanks

- Billy -

In <a href="/group/SunONE-JATO/post?protectID=246075234167171124217231170221059165026 048139046">SunONE-JATO@y...</a>, Kevin Hannen <<a href="/group/SunONE-JATO/post?protectID=200056018009078091170098066101130090136 222139046209">kevin.hannen@s...</a>> wrote:

> hi,

>

> try binding the field to a ResourceBundleModel in the constructor or

by

> setting the default model.

>

> rgds,

>

> kev.

>

> chubbykidd wrote:

> > I have the following constructor:

> >

> > StaticTextField child = new StaticTextField(this,

CHILD_LABEL_LOCKED,

> > "groupings.locked");

> >

> > The initial value "groupings.locked" is supposed to be a reference

to

> > the Resources.properties file. I've added this entry to the

properties

> > file but when the page is rendered the actual text...

> > 'groupings.locked' is displayed. What am I doing wrong? The

expected

> > outcome would be the word "Locked" which is the value specified in

the

> > Resources.properties file.

> >

> > - Billy -

> >

> >

> >

> >

> > To download the latest version of JATO, please visit:

> > <a href="http://www.sun.com/software/download/developer/5102.html">http://www.s un.com/software/download/developer/5102.html</a>

> >

> > For more information about JATO, please visit:

> > <a href="http://developer.iplanet.com/tech/appserver/framework/index.jsp">http: //developer.iplanet.com/tech/appserver/framework/index.jsp</a>

> >

> >

> >

> >

Guest at 2007-7-1 16:30:28 > top of Java-index,Development Tools,Java Tools...
# 3

I tried binding the StaticTextFields to a ResourceBundleModel but now

when the page is rendered I get no text on the page at all. Just empty

<td></td>.

Any ideas as to what I'm doing wrong? Here is a code snippet on how

I'm constructing the field...

StaticTextField child = new StaticTextField(this,

getResourceBundleModel(), CHILD_LABEL_CREATE, "home.create");

return child;

public ResourceBundleModel getResourceBundleModel() {

if(rbModel == null) {

rbModel = (ResourceBundleModel) getModel(ResourceBundleModel.class);

}

return rbModel;

}

If you need the entire class, let me know and I'll send it via e-mail.

Thanks

- Billy -

In <a href="/group/SunONE-JATO/post?protectID=246075234167171124217231170221059165026 048139046">SunONE-JATO@y...</a>, Kevin Hannen <<a href="/group/SunONE-JATO/post?protectID=200056018009078091170098066101130090136 222139046209">kevin.hannen@s...</a>> wrote:

> hi,

>

> try binding the field to a ResourceBundleModel in the constructor or

by

> setting the default model.

>

> rgds,

>

> kev.

>

> chubbykidd wrote:

> > I have the following constructor:

> >

> > StaticTextField child = new StaticTextField(this,

CHILD_LABEL_LOCKED,

> > "groupings.locked");

> >

> > The initial value "groupings.locked" is supposed to be a reference

to

> > the Resources.properties file. I've added this entry to the

properties

> > file but when the page is rendered the actual text...

> > 'groupings.locked' is displayed. What am I doing wrong? The

expected

> > outcome would be the word "Locked" which is the value specified in

the

> > Resources.properties file.

> >

> > - Billy -

> >

> >

> >

> >

> > To download the latest version of JATO, please visit:

> > <a href="http://www.sun.com/software/download/developer/5102.html">http://www.s un.com/software/download/developer/5102.html</a>

> >

> > For more information about JATO, please visit:

> > <a href="http://developer.iplanet.com/tech/appserver/framework/index.jsp">http: //developer.iplanet.com/tech/appserver/framework/index.jsp</a>

> >

> >

> >

> >

Guest at 2007-7-1 16:30:28 > top of Java-index,Development Tools,Java Tools...
# 4

Any one have any suggestions on this one? Kinda stuck where I'm at....

In <a href="/group/SunONE-JATO/post?protectID=246075234167171124217231170221059165026 048139046">SunONE-JATO@y...</a>, "chubbykidd" <<a href="/group/SunONE-JATO/post?protectID=014166219007078048234218065036129208"&g t;bacon33@o...</a>> wrote:

> I tried binding the StaticTextFields to a ResourceBundleModel but

now

> when the page is rendered I get no text on the page at all. Just

empty

> <td></td>.

>

> Any ideas as to what I'm doing wrong? Here is a code snippet on how

> I'm constructing the field...

>

> StaticTextField child = new StaticTextField(this,

> getResourceBundleModel(), CHILD_LABEL_CREATE, "home.create");

>

> return child;

>

>

> public ResourceBundleModel getResourceBundleModel() {

>

> if(rbModel == null) {

> rbModel = (ResourceBundleModel)

getModel(ResourceBundleModel.class);

> }

>

> return rbModel;

>

> }

>

>

>

> If you need the entire class, let me know and I'll send it via

e-mail.

>

> Thanks

>

> - Billy -

>

>

>

>

> In <a href="/group/SunONE-JATO/post?protectID=246075234167171124217231170221059165026 048139046">SunONE-JATO@y...</a>, Kevin Hannen <<a href="/group/SunONE-JATO/post?protectID=200056018009078091170098066101130090136 222139046209">kevin.hannen@s...</a>> wrote:

> > hi,

> >

> > try binding the field to a ResourceBundleModel in the constructor

or

> by

> > setting the default model.

> >

> > rgds,

> >

> > kev.

> >

> > chubbykidd wrote:

> > > I have the following constructor:

> > >

> > > StaticTextField child = new StaticTextField(this,

> CHILD_LABEL_LOCKED,

> > > "groupings.locked");

> > >

> > > The initial value "groupings.locked" is supposed to be a

reference

> to

> > > the Resources.properties file. I've added this entry to the

> properties

> > > file but when the page is rendered the actual text...

> > > 'groupings.locked' is displayed. What am I doing wrong? The

> expected

> > > outcome would be the word "Locked" which is the value specified

in

> the

> > > Resources.properties file.

> > >

> > > - Billy -

> > >

> > >

> > >

> > >

> > > To download the latest version of JATO, please visit:

> > > <a href="http://www.sun.com/software/download/developer/5102.html">http://www.s un.com/software/download/developer/5102.html</a>

> > >

> > > For more information about JATO, please visit:

> > > <a href="http://developer.iplanet.com/tech/appserver/framework/index.jsp">http: //developer.iplanet.com/tech/appserver/framework/index.jsp</a>

> > >

> > >

> > >

> > >

Guest at 2007-7-1 16:30:28 > top of Java-index,Development Tools,Java Tools...
# 5

Any one have any suggestions on this one? Kinda stuck where I'm at....

In <a href="/group/SunONE-JATO/post?protectID=246075234167171124217231170221059165026 048139046">SunONE-JATO@y...</a>, "chubbykidd" <<a href="/group/SunONE-JATO/post?protectID=014166219007078048234218065036129208"&g t;bacon33@o...</a>> wrote:

> I tried binding the StaticTextFields to a ResourceBundleModel but

now

> when the page is rendered I get no text on the page at all. Just

empty

> <td></td>.

>

> Any ideas as to what I'm doing wrong? Here is a code snippet on how

> I'm constructing the field...

>

> StaticTextField child = new StaticTextField(this,

> getResourceBundleModel(), CHILD_LABEL_CREATE, "home.create");

>

> return child;

>

>

> public ResourceBundleModel getResourceBundleModel() {

>

> if(rbModel == null) {

> rbModel = (ResourceBundleModel)

getModel(ResourceBundleModel.class);

> }

>

> return rbModel;

>

> }

>

>

>

> If you need the entire class, let me know and I'll send it via

e-mail.

>

> Thanks

>

> - Billy -

>

>

>

>

> In <a href="/group/SunONE-JATO/post?protectID=246075234167171124217231170221059165026 048139046">SunONE-JATO@y...</a>, Kevin Hannen <<a href="/group/SunONE-JATO/post?protectID=200056018009078091170098066101130090136 222139046209">kevin.hannen@s...</a>> wrote:

> > hi,

> >

> > try binding the field to a ResourceBundleModel in the constructor

or

> by

> > setting the default model.

> >

> > rgds,

> >

> > kev.

> >

> > chubbykidd wrote:

> > > I have the following constructor:

> > >

> > > StaticTextField child = new StaticTextField(this,

> CHILD_LABEL_LOCKED,

> > > "groupings.locked");

> > >

> > > The initial value "groupings.locked" is supposed to be a

reference

> to

> > > the Resources.properties file. I've added this entry to the

> properties

> > > file but when the page is rendered the actual text...

> > > 'groupings.locked' is displayed. What am I doing wrong? The

> expected

> > > outcome would be the word "Locked" which is the value specified

in

> the

> > > Resources.properties file.

> > >

> > > - Billy -

> > >

> > >

> > >

> > >

> > > To download the latest version of JATO, please visit:

> > > <a href="http://www.sun.com/software/download/developer/5102.html">http://www.s un.com/software/download/developer/5102.html</a>

> > >

> > > For more information about JATO, please visit:

> > > <a href="http://developer.iplanet.com/tech/appserver/framework/index.jsp">http: //developer.iplanet.com/tech/appserver/framework/index.jsp</a>

> > >

> > >

> > >

> > >

Guest at 2007-7-1 16:30:28 > top of Java-index,Development Tools,Java Tools...
# 6

Any one have any suggestions on this one? Kinda stuck where I'm at....

In <a href="/group/SunONE-JATO/post?protectID=246075234167171124217231170221059165026 048139046">SunONE-JATO@y...</a>, "chubbykidd" <<a href="/group/SunONE-JATO/post?protectID=014166219007078048234218065036129208"&g t;bacon33@o...</a>> wrote:

> I tried binding the StaticTextFields to a ResourceBundleModel but

now

> when the page is rendered I get no text on the page at all. Just

empty

> <td></td>.

>

> Any ideas as to what I'm doing wrong? Here is a code snippet on how

> I'm constructing the field...

>

> StaticTextField child = new StaticTextField(this,

> getResourceBundleModel(), CHILD_LABEL_CREATE, "home.create");

>

> return child;

>

>

> public ResourceBundleModel getResourceBundleModel() {

>

> if(rbModel == null) {

> rbModel = (ResourceBundleModel)

getModel(ResourceBundleModel.class);

> }

>

> return rbModel;

>

> }

>

>

>

> If you need the entire class, let me know and I'll send it via

e-mail.

>

> Thanks

>

> - Billy -

>

>

>

>

> In <a href="/group/SunONE-JATO/post?protectID=246075234167171124217231170221059165026 048139046">SunONE-JATO@y...</a>, Kevin Hannen <<a href="/group/SunONE-JATO/post?protectID=200056018009078091170098066101130090136 222139046209">kevin.hannen@s...</a>> wrote:

> > hi,

> >

> > try binding the field to a ResourceBundleModel in the constructor

or

> by

> > setting the default model.

> >

> > rgds,

> >

> > kev.

> >

> > chubbykidd wrote:

> > > I have the following constructor:

> > >

> > > StaticTextField child = new StaticTextField(this,

> CHILD_LABEL_LOCKED,

> > > "groupings.locked");

> > >

> > > The initial value "groupings.locked" is supposed to be a

reference

> to

> > > the Resources.properties file. I've added this entry to the

> properties

> > > file but when the page is rendered the actual text...

> > > 'groupings.locked' is displayed. What am I doing wrong? The

> expected

> > > outcome would be the word "Locked" which is the value specified

in

> the

> > > Resources.properties file.

> > >

> > > - Billy -

> > >

> > >

> > >

> > >

> > > To download the latest version of JATO, please visit:

> > > <a href="http://www.sun.com/software/download/developer/5102.html">http://www.s un.com/software/download/developer/5102.html</a>

> > >

> > > For more information about JATO, please visit:

> > > <a href="http://developer.iplanet.com/tech/appserver/framework/index.jsp">http: //developer.iplanet.com/tech/appserver/framework/index.jsp</a>

> > >

> > >

> > >

> > >

Guest at 2007-7-1 16:30:28 > top of Java-index,Development Tools,Java Tools...
# 7

Any one have any suggestions on this one? Kinda stuck where I'm at....

In <a href="/group/SunONE-JATO/post?protectID=246075234167171124217231170221059165026 048139046">SunONE-JATO@y...</a>, "chubbykidd" <<a href="/group/SunONE-JATO/post?protectID=014166219007078048234218065036129208"&g t;bacon33@o...</a>> wrote:

> I tried binding the StaticTextFields to a ResourceBundleModel but

now

> when the page is rendered I get no text on the page at all. Just

empty

> <td></td>.

>

> Any ideas as to what I'm doing wrong? Here is a code snippet on how

> I'm constructing the field...

>

> StaticTextField child = new StaticTextField(this,

> getResourceBundleModel(), CHILD_LABEL_CREATE, "home.create");

>

> return child;

>

>

> public ResourceBundleModel getResourceBundleModel() {

>

> if(rbModel == null) {

> rbModel = (ResourceBundleModel)

getModel(ResourceBundleModel.class);

> }

>

> return rbModel;

>

> }

>

>

>

> If you need the entire class, let me know and I'll send it via

e-mail.

>

> Thanks

>

> - Billy -

>

>

>

>

> In <a href="/group/SunONE-JATO/post?protectID=246075234167171124217231170221059165026 048139046">SunONE-JATO@y...</a>, Kevin Hannen <<a href="/group/SunONE-JATO/post?protectID=200056018009078091170098066101130090136 222139046209">kevin.hannen@s...</a>> wrote:

> > hi,

> >

> > try binding the field to a ResourceBundleModel in the constructor

or

> by

> > setting the default model.

> >

> > rgds,

> >

> > kev.

> >

> > chubbykidd wrote:

> > > I have the following constructor:

> > >

> > > StaticTextField child = new StaticTextField(this,

> CHILD_LABEL_LOCKED,

> > > "groupings.locked");

> > >

> > > The initial value "groupings.locked" is supposed to be a

reference

> to

> > > the Resources.properties file. I've added this entry to the

> properties

> > > file but when the page is rendered the actual text...

> > > 'groupings.locked' is displayed. What am I doing wrong? The

> expected

> > > outcome would be the word "Locked" which is the value specified

in

> the

> > > Resources.properties file.

> > >

> > > - Billy -

> > >

> > >

> > >

> > >

> > > To download the latest version of JATO, please visit:

> > > <a href="http://www.sun.com/software/download/developer/5102.html">http://www.s un.com/software/download/developer/5102.html</a>

> > >

> > > For more information about JATO, please visit:

> > > <a href="http://developer.iplanet.com/tech/appserver/framework/index.jsp">http: //developer.iplanet.com/tech/appserver/framework/index.jsp</a>

> > >

> > >

> > >

> > >

Guest at 2007-7-1 16:30:28 > top of Java-index,Development Tools,Java Tools...
# 8

You are passing in the KEY as the VALUE of the field. You need to pass in

the key as the bound name of the field.

Todd

-- Original Message --

From: "chubbykidd" <<a href="/group/SunONE-JATO/post?protectID=014166219007078048234218065176249063000 105238234061130234143025">bacon33@o...</a>>

Sent: Monday, September 16, 2002 8:35 AM

Subject: [SunONE-JATO] Re: Localizing StaticTextField

> I tried binding the StaticTextFields to a ResourceBundleModel but now

> when the page is rendered I get no text on the page at all. Just empty

> <td></td>.

>

> Any ideas as to what I'm doing wrong? Here is a code snippet on how

> I'm constructing the field...

>

> StaticTextField child = new StaticTextField(this,

> getResourceBundleModel(), CHILD_LABEL_CREATE, "home.create");

>

> return child;

>

>

> public ResourceBundleModel getResourceBundleModel() {

>

> if(rbModel == null) {

> rbModel = (ResourceBundleModel) getModel(ResourceBundleModel.class);

> }

>

> return rbModel;

>

> }

>

>

>

> If you need the entire class, let me know and I'll send it via e-mail.

>

> Thanks

>

> - Billy -

>

>

>

>

> In <a href="/group/SunONE-JATO/post?protectID=246075234167171124217231170221059165026 048139046">SunONE-JATO@y...</a>, Kevin Hannen <<a href="/group/SunONE-JATO/post?protectID=200056018009078091170098066101130090136 222139046209">kevin.hannen@s...</a>> wrote:

> > hi,

> >

> > try binding the field to a ResourceBundleModel in the constructor or

> by

> > setting the default model.

> >

> > rgds,

> >

> > kev.

> >

> > chubbykidd wrote:

> > > I have the following constructor:

> > >

> > > StaticTextField child = new StaticTextField(this,

> CHILD_LABEL_LOCKED,

> > > "groupings.locked");

> > >

> > > The initial value "groupings.locked" is supposed to be a reference

> to

> > > the Resources.properties file. I've added this entry to the

> properties

> > > file but when the page is rendered the actual text...

> > > 'groupings.locked' is displayed. What am I doing wrong? The

> expected

> > > outcome would be the word "Locked" which is the value specified in

> the

> > > Resources.properties file.

> > >

> > > - Billy -

> > >

> > >

> > >

> > >

> > > To download the latest version of JATO, please visit:

> > > <a href="http://www.sun.com/software/download/developer/5102.html">http://www.s un.com/software/download/developer/5102.html</a>

> > >

> > > For more information about JATO, please visit:

> > > <a href="http://developer.iplanet.com/tech/appserver/framework/index.jsp">http: //developer.iplanet.com/tech/appserver/framework/index.jsp</a>

> > >

> > >

> > >

> > >

>

>

>

> To download the latest version of JATO, please visit:

> <a href="http://www.sun.com/software/download/developer/5102.html">http://www.s un.com/software/download/developer/5102.html</a>

>

> For more information about JATO, please visit:

> <a href="http://developer.iplanet.com/tech/appserver/framework/index.jsp">http: //developer.iplanet.com/tech/appserver/framework/index.jsp</a>

>

>

>

>

>

Guest at 2007-7-1 16:30:28 > top of Java-index,Development Tools,Java Tools...
# 9

I've also tried this constructor and I get the same result....

StaticTextField child = new StaticTextField(this,

getResourceBundleModel(),

CHILD_LABEL_CREATE, "home.create", "Create", null);

Is this what you mean by passing in the key as the bound name of the

field?

Not sure what else to try :-/

In <a href="/group/SunONE-JATO/post?protectID=246075234167171124217231170221059165026 048139046">SunONE-JATO@y...</a>, Todd Fast <<a href="/group/SunONE-JATO/post?protectID=101233080150035167169232031248066208071 048">Todd.Fast@S...</a>> wrote:

> You are passing in the KEY as the VALUE of the field. You need to

pass in

> the key as the bound name of the field.

>

> Todd

>

> -- Original Message --

> From: "chubbykidd" <<a href="/group/SunONE-JATO/post?protectID=014166219007078048234218065036129208"&g t;bacon33@o...</a>>

> Sent: Monday, September 16, 2002 8:35 AM

> Subject: [SunONE-JATO] Re: Localizing StaticTextField

>

>

> > I tried binding the StaticTextFields to a ResourceBundleModel

but now

> > when the page is rendered I get no text on the page at all. Just

empty

> > <td></td>.

> >

> > Any ideas as to what I'm doing wrong? Here is a code snippet on

how

> > I'm constructing the field...

> >

> > StaticTextField child = new StaticTextField(this,

> > getResourceBundleModel(), CHILD_LABEL_CREATE, "home.create");

> >

> > return child;

> >

> >

> > public ResourceBundleModel getResourceBundleModel() {

> >

> > if(rbModel == null) {

> > rbModel = (ResourceBundleModel) getModel

(ResourceBundleModel.class);

> > }

> >

> > return rbModel;

> >

> > }

> >

> >

> >

> > If you need the entire class, let me know and I'll send it via e-

mail.

> >

> > Thanks

> >

> > - Billy -

> >

> >

> >

> >

> > In <a href="/group/SunONE-JATO/post?protectID=246075234167171124217231170221059165026 048139046">SunONE-JATO@y...</a>, Kevin Hannen <<a href="/group/SunONE-JATO/post?protectID=200056018009078091170098066101130090136 222139046209">kevin.hannen@s...</a>> wrote:

> > > hi,

> > >

> > > try binding the field to a ResourceBundleModel in the

constructor or

> > by

> > > setting the default model.

> > >

> > > rgds,

> > >

> > > kev.

> > >

> > > chubbykidd wrote:

> > > > I have the following constructor:

> > > >

> > > > StaticTextField child = new StaticTextField(this,

> > CHILD_LABEL_LOCKED,

> > > > "groupings.locked");

> > > >

> > > > The initial value "groupings.locked" is supposed to be a

reference

> > to

> > > > the Resources.properties file. I've added this entry to the

> > properties

> > > > file but when the page is rendered the actual text...

> > > > 'groupings.locked' is displayed. What am I doing wrong? The

> > expected

> > > > outcome would be the word "Locked" which is the value

specified in

> > the

> > > > Resources.properties file.

> > > >

> > > > - Billy -

> > > >

> > > >

> > > >

> > > >

> > > > To download the latest version of JATO, please visit:

> > > > <a href="http://www.sun.com/software/download/developer/5102.html">http://www.s un.com/software/download/developer/5102.html</a>

> > > >

> > > > For more information about JATO, please visit:

> > > >

<a href="http://developer.iplanet.com/tech/appserver/framework/index.jsp">http: //developer.iplanet.com/tech/appserver/framework/index.jsp</a>

> > > >

> > > >

> > > >

> > > >

> >

> >

> >

> > To download the latest version of JATO, please visit:

> > <a href="http://www.sun.com/software/download/developer/5102.html">http://www.s un.com/software/download/developer/5102.html</a>

> >

> > For more information about JATO, please visit:

> > <a href="http://developer.iplanet.com/tech/appserver/framework/index.jsp">http: //developer.iplanet.com/tech/appserver/framework/index.jsp</a>

> >

> >

> >

> >

> >

Guest at 2007-7-1 16:30:28 > top of Java-index,Development Tools,Java Tools...