href in tiled view

I want to put a link ( href ) in my tiledview . To do it simple , the

text for the link is static for now, but I want the value to be

dynamic so I create my field this way :

if (name.equals(CHILD_NUMERO)) {

HREF child = new HREF(

this,

getPrimaryModel(),

CHILD_NUMERO,

null);

return child;

}

It looks good in the JSP , and when I click on the first link

I get this exception :

com.iplanet.jato.model.ModelControlException: Location is beyond the

end of the current bean array (0 > -1)

at

com.iplanet.jato.model.BeanAdapterModel.setLocation(BeanAdapterModel.java:356)

at

com.iplanet.jato.view.TiledViewBase.getChild(TiledViewBase.java:302)

at

com.iplanet.jato.view.TiledViewBase.mapRequestParameters(TiledViewBase.java:611 )

at

com.iplanet.jato.view.ContainerViewBase.mapRequestParameters(ContainerViewBase. j\

ava:1010)

at

com.iplanet.jato.view.ViewBeanBase.mapRequestParameters(ViewBeanBase.java:1183)

.....

here is the url sent when I click :

<a href="http://rully:81/tbd/main/ListProjects?ListProjects.projectTiled2[0].numer o=2000&\">http://rully:81/tbd/main/ListProjects?ListProjects.projectTiled 2[0].numero=2000&\</a>

jato.pageSession=

or for the second link :

<a href="http://rully:81/tbd/main/ListProjects?ListProjects.projectTiled2[1].numer o=2002&\">http://rully:81/tbd/main/ListProjects?ListProjects.projectTiled 2[1].numero=2002&\</a>

jato.pageSession=

The JSP page has two rows printed, because my bean tab has to

elements, so I do not understand why it is saying that the current

bean array is always -1.

It seems that the handleNumeroRequest() method is not even called in

my code.

Do you know what I'm missing ?

Again thank you for your help

Michel

[1984 byte] By [Guest] at [2007-11-25 9:26:19]
# 1

Michel

Oh... BeanAdapterModel. Not sure if there should be a difference between

that and any other type of Model though.

Maybe Matt, Mike or Todd can shed some light when they get in today.

But here are some questions.

Is the primary model of your tiled view getting the BAM instance

consistantly the same way?

Can you print out the values of the HttpRequest attr's and see the value

of the Href?

craig

mchlbgs wrote:

> craig,

>

> The signature is correct. When I override the setLocation method in a

> derived class from BeanAdapterModel, the program pass reach the

> "handleNumeroRequest" method.Anyway the method call:

> getDisplayFieldValue(CHILD_NUMERO);

> returns null :-(

>

> As you seen the url sent is :

>

<a href="http://rully:81/tbd/main/ListProjects?ListProjects.projectTiled2[1].numer o=2002&\">http://rully:81/tbd/main/ListProjects?ListProjects.projectTiled 2[1].numero=2002&\</a>

jato.pageSession=

>

<<a href="http://rully:81/tbd/main/ListProjects?ListProjects.projectTiled2%5B1%5D.n umero=\">http://rully:81/tbd/main/ListProjects?ListProjects.projectTiled2%5B1 %5D.numero=\</a>

2002&jato.pageSession=>

>

>

> When the exception occurs the model has been instanciated but there is

> no beans associated with the model, in my understanding that 's why

> the current location is -1 ?

>

> Michel

>

>

>

> In <a href="/group/SunONE-JATO/post?protectID=246075234167171124217231170221059165026 144204051183019182055105236158076086020224">SunONE-JATO@yahoogroups.com</a >, "Craig V. Conover"

> <<a href="/group/SunONE-JATO/post?protectID=219212113009229091025149066024064239039 098031046209130">craig.conover@s...</a>> wrote:

> > Michel

> >

> > It might be that your method signature is incorrect (unlikely if you

> are

> > using the Studio tools though).

> > The Array exception might be the way you are handling the request.

> > Here is what needs to be in the request to handle the row that was

> clicked:

> >

> > public void handleNumeroRequest(RequestInvocationEvent event) throws

> > Exception

> > {

> > // Because the HREF is bound to the primary model, it contains the

> > // HREF's submitted value on the row that was activated. The

> primary

> > // model is always reset to the first() position during submit,

> so we

> > // need to make sure we move to the right location in the model

> before

> > // reading the HREF's value. Otherwise, we would always read

> the first

> > // row's value.

> >

> >

>

getPrimaryModel().setLocation(((TiledViewRequestInvocationEvent)event).getTileN u\

mber());

> >

> > // get the href's value at the row that was clicked

> > Object numeroVal = getDisplayFieldValue(CHILD_NUMERO);

> >

> > getParentViewBean().forwardTo(getRequestContext());

> > }

> >

> > Let us know if this solves your issues.

> > craig

> >

> >

> > mchlbgs wrote:

> >

> > > I want to put a link ( href ) in my tiledview . To do it simple , the

> > > text for the link is static for now, but I want the value to be

> > > dynamic so I create my field this way :

> > > if (name.equals(CHILD_NUMERO)) {

> > > HREF child = new HREF(

> > > this,

> > > getPrimaryModel(),

> > > CHILD_NUMERO,

> > > null);

> > > return child;

> > > }

> > >

> > > It looks good in the JSP , and when I click on the first link

> > > I get this exception :

> > > com.iplanet.jato.model.ModelControlException: Location is beyond the

> > > end of the current bean array (0 > -1)

> > > at

> > >

> com.iplanet.jato.model.BeanAdapterModel.setLocation(BeanAdapterModel.java:356)

> > > at

> > > com.iplanet.jato.view.TiledViewBase.getChild(TiledViewBase.java:302)

> > > at

> > >

>

com.iplanet.jato.view.TiledViewBase.mapRequestParameters(TiledViewBase.java:611 )

> > > at

> > >

>

com.iplanet.jato.view.ContainerViewBase.mapRequestParameters(ContainerViewBase. j\

ava:1010)

> > > at

> > >

>

com.iplanet.jato.view.ViewBeanBase.mapRequestParameters(ViewBeanBase.java:1183)

> > > .....

> > >

> > > here is the url sent when I click :

> > >

> > >

>

<a href="http://rully:81/tbd/main/ListProjects?ListProjects.projectTiled2[0].numer o=2000&\">http://rully:81/tbd/main/ListProjects?ListProjects.projectTiled 2[0].numero=2000&\</a>

jato.pageSession=

>

<<a href="http://rully:81/tbd/main/ListProjects?ListProjects.projectTiled2%5B0%5D.n umero=\">http://rully:81/tbd/main/ListProjects?ListProjects.projectTiled2%5B0 %5D.numero=\</a>

2000&jato.pageSession=>

>

> > >

>

<<a href="http://rully:81/tbd/main/ListProjects?ListProjects.projectTiled2%5B0%5D.n umero=\">http://rully:81/tbd/main/ListProjects?ListProjects.projectTiled2%5B0 %5D.numero=\</a>

2000&jato.pageSession=

>

<<a href="http://rully:81/tbd/main/ListProjects?ListProjects.projectTiled2%5B0%5D.n umero=\">http://rully:81/tbd/main/ListProjects?ListProjects.projectTiled2%5B0 %5D.numero=\</a>

2000&jato.pageSession=>>

> > > or for the second link :

> > >

>

<a href="http://rully:81/tbd/main/ListProjects?ListProjects.projectTiled2[1].numer o=2002&\">http://rully:81/tbd/main/ListProjects?ListProjects.projectTiled 2[1].numero=2002&\</a>

jato.pageSession=

>

<<a href="http://rully:81/tbd/main/ListProjects?ListProjects.projectTiled2%5B1%5D.n umero=\">http://rully:81/tbd/main/ListProjects?ListProjects.projectTiled2%5B1 %5D.numero=\</a>

2002&jato.pageSession=>

>

> > >

>

<<a href="http://rully:81/tbd/main/ListProjects?ListProjects.projectTiled2%5B1%5D.n umero=\">http://rully:81/tbd/main/ListProjects?ListProjects.projectTiled2%5B1 %5D.numero=\</a>

2002&jato.pageSession=

>

<<a href="http://rully:81/tbd/main/ListProjects?ListProjects.projectTiled2%5B1%5D.n umero=\">http://rully:81/tbd/main/ListProjects?ListProjects.projectTiled2%5B1 %5D.numero=\</a>

2002&jato.pageSession=>>

> > >

> > > The JSP page has two rows printed, because my bean tab has to

> > > elements, so I do not understand why it is saying that the current

> > > bean array is always -1.

> > > It seems that the handleNumeroRequest() method is not even called in

> > > my code.

> > > Do you know what I'm missing ?

> > > Again thank you for your help

> > >

> > > Michel

> > >

> > >

> > >

> > >

> > >

> > >

> > >

> > > To download the latest version of S1AF (JATO), please visit one of

> the

> > > following locations:

> > >

> > > Framework + IDE plugin for Sun ONE Studio 4 Update 1, Community

> Edition:

> > > <a href="http://wwws.sun.com/software/download/products/Appl_Frmwk_2.0_CE.html"> ;http://wwws.sun.com/software/download/products/Appl_Frmwk_2.0_CE.html</a>

> > >

> > > Framework + IDE pluign for Sun ONE Studio 4 Update 1, Enterprise

> Edition:

> > > <a href="http://wwws.sun.com/software/download/products/Appl_Frmwk_2.0_EE.html"> ;http://wwws.sun.com/software/download/products/Appl_Frmwk_2.0_EE.html</a>

> > >

> > > Previous versions of JATO:

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

> > >

> > >

> >

> >

> >

> >

> > [Non-text portions of this message have been removed]

>

>

>

>

>

> To download the latest version of S1AF (JATO), please visit one of the

> following locations:

>

> Framework + IDE plugin for Sun ONE Studio 4 Update 1, Community Edition:

> <a href="http://wwws.sun.com/software/download/products/Appl_Frmwk_2.0_CE.html"> ;http://wwws.sun.com/software/download/products/Appl_Frmwk_2.0_CE.html</a>

>

> Framework + IDE pluign for Sun ONE Studio 4 Update 1, Enterprise Edition:

> <a href="http://wwws.sun.com/software/download/products/Appl_Frmwk_2.0_EE.html"> ;http://wwws.sun.com/software/download/products/Appl_Frmwk_2.0_EE.html</a>

>

> Previous versions of JATO:

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

>

>

[Non-text portions of this message have been removed]

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

Craig,

Yes I can see the value of the Href, I even parse myself the value (

in the old way...) as a workaround ..

and I get the bam instance always the same way...

Michel

In <a href="/group/SunONE-JATO/post?protectID=246075234167171124217231170221059165026 144204051183019182055105236158076086020224">SunONE-JATO@yahoogroups.com</a >, "Craig V. Conover"

<<a href="/group/SunONE-JATO/post?protectID=219212113009229091025149066024064239039 098031046209130">craig.conover@s...</a>> wrote:

> Michel

> Oh... BeanAdapterModel. Not sure if there should be a difference

between

> that and any other type of Model though.

> Maybe Matt, Mike or Todd can shed some light when they get in today.

>

> But here are some questions.

> Is the primary model of your tiled view getting the BAM instance

> consistantly the same way?

> Can you print out the values of the HttpRequest attr's and see the

value

> of the Href?

>

> craig

>

>

> mchlbgs wrote:

>

> > craig,

> >

> > The signature is correct. When I override the setLocation method in a

> > derived class from BeanAdapterModel, the program pass reach the

> > "handleNumeroRequest" method.Anyway the method call:

> > getDisplayFieldValue(CHILD_NUMERO);

> > returns null :-(

> >

> > As you seen the url sent is :

> >

<a href="http://rully:81/tbd/main/ListProjects?ListProjects.projectTiled2[1].numer o=2002&\">http://rully:81/tbd/main/ListProjects?ListProjects.projectTiled 2[1].numero=2002&\</a>

jato.pageSession=

> >

<<a href="http://rully:81/tbd/main/ListProjects?ListProjects.projectTiled2%5B1%5D.n umero=\">http://rully:81/tbd/main/ListProjects?ListProjects.projectTiled2%5B1 %5D.numero=\</a>

2002&jato.pageSession=>

> >

> >

> > When the exception occurs the model has been instanciated but there is

> > no beans associated with the model, in my understanding that 's why

> > the current location is -1 ?

> >

> > Michel

> >

> >

> >

> > In <a href="/group/SunONE-JATO/post?protectID=246075234167171124217231170221059165026 144204051183019182055105236158076086020224">SunONE-JATO@yahoogroups.com</a >, "Craig V. Conover"

> > <<a href="/group/SunONE-JATO/post?protectID=219212113009229091025149066024064239039 098031046209130">craig.conover@s...</a>> wrote:

> > > Michel

> > >

> > > It might be that your method signature is incorrect (unlikely if you

> > are

> > > using the Studio tools though).

> > > The Array exception might be the way you are handling the request.

> > > Here is what needs to be in the request to handle the row that was

> > clicked:

> > >

> > > public void handleNumeroRequest(RequestInvocationEvent event) throws

> > > Exception

> > > {

> > > // Because the HREF is bound to the primary model, it

contains the

> > > // HREF's submitted value on the row that was activated. The

> > primary

> > > // model is always reset to the first() position during submit,

> > so we

> > > // need to make sure we move to the right location in the model

> > before

> > > // reading the HREF's value. Otherwise, we would always read

> > the first

> > > // row's value.

> > >

> > >

> >

getPrimaryModel().setLocation(((TiledViewRequestInvocationEvent)event).getTileN u\

mber());

> > >

> > > // get the href's value at the row that was clicked

> > > Object numeroVal = getDisplayFieldValue(CHILD_NUMERO);

> > >

> > > getParentViewBean().forwardTo(getRequestContext());

> > > }

> > >

> > > Let us know if this solves your issues.

> > > craig

> > >

> > >

> > > mchlbgs wrote:

> > >

> > > > I want to put a link ( href ) in my tiledview . To do it

simple , the

> > > > text for the link is static for now, but I want the value to be

> > > > dynamic so I create my field this way :

> > > > if (name.equals(CHILD_NUMERO)) {

> > > > HREF child = new HREF(

> > > > this,

> > > > getPrimaryModel(),

> > > > CHILD_NUMERO,

> > > > null);

> > > > return child;

> > > > }

> > > >

> > > > It looks good in the JSP , and when I click on the first link

> > > > I get this exception :

> > > > com.iplanet.jato.model.ModelControlException: Location is

beyond the

> > > > end of the current bean array (0 > -1)

> > > > at

> > > >

> >

com.iplanet.jato.model.BeanAdapterModel.setLocation(BeanAdapterModel.java:356)

> > > > at

> > > >

com.iplanet.jato.view.TiledViewBase.getChild(TiledViewBase.java:302)

> > > > at

> > > >

> >

com.iplanet.jato.view.TiledViewBase.mapRequestParameters(TiledViewBase.java:611 )

> > > > at

> > > >

> >

com.iplanet.jato.view.ContainerViewBase.mapRequestParameters(ContainerViewBase. j\

ava:1010)

> > > > at

> > > >

> >

com.iplanet.jato.view.ViewBeanBase.mapRequestParameters(ViewBeanBase.java:1183)

> > > > .....

> > > >

> > > > here is the url sent when I click :

> > > >

> > > >

> >

<a href="http://rully:81/tbd/main/ListProjects?ListProjects.projectTiled2[0].numer o=2000&\">http://rully:81/tbd/main/ListProjects?ListProjects.projectTiled 2[0].numero=2000&\</a>

jato.pageSession=

> >

<<a href="http://rully:81/tbd/main/ListProjects?ListProjects.projectTiled2%5B0%5D.n umero=\">http://rully:81/tbd/main/ListProjects?ListProjects.projectTiled2%5B0 %5D.numero=\</a>

2000&jato.pageSession=>

> >

> > > >

> >

<<a href="http://rully:81/tbd/main/ListProjects?ListProjects.projectTiled2%5B0%5D.n umero=\">http://rully:81/tbd/main/ListProjects?ListProjects.projectTiled2%5B0 %5D.numero=\</a>

2000&jato.pageSession=

> >

<<a href="http://rully:81/tbd/main/ListProjects?ListProjects.projectTiled2%5B0%5D.n umero=\">http://rully:81/tbd/main/ListProjects?ListProjects.projectTiled2%5B0 %5D.numero=\</a>

2000&jato.pageSession=>>

> > > > or for the second link :

> > > >

> >

<a href="http://rully:81/tbd/main/ListProjects?ListProjects.projectTiled2[1].numer o=2002&\">http://rully:81/tbd/main/ListProjects?ListProjects.projectTiled 2[1].numero=2002&\</a>

jato.pageSession=

> >

<<a href="http://rully:81/tbd/main/ListProjects?ListProjects.projectTiled2%5B1%5D.n umero=\">http://rully:81/tbd/main/ListProjects?ListProjects.projectTiled2%5B1 %5D.numero=\</a>

2002&jato.pageSession=>

> >

> > > >

> >

<<a href="http://rully:81/tbd/main/ListProjects?ListProjects.projectTiled2%5B1%5D.n umero=\">http://rully:81/tbd/main/ListProjects?ListProjects.projectTiled2%5B1 %5D.numero=\</a>

2002&jato.pageSession=

> >

<<a href="http://rully:81/tbd/main/ListProjects?ListProjects.projectTiled2%5B1%5D.n umero=\">http://rully:81/tbd/main/ListProjects?ListProjects.projectTiled2%5B1 %5D.numero=\</a>

2002&jato.pageSession=>>

> > > >

> > > > The JSP page has two rows printed, because my bean tab has to

> > > > elements, so I do not understand why it is saying that the current

> > > > bean array is always -1.

> > > > It seems that the handleNumeroRequest() method is not even

called in

> > > > my code.

> > > > Do you know what I'm missing ?

> > > > Again thank you for your help

> > > >

> > > > Michel

> > > >

> > > >

> > > >

> > > >

> > > >

> > > >

> > > >

> > > > To download the latest version of S1AF (JATO), please visit one of

> > the

> > > > following locations:

> > > >

> > > > Framework + IDE plugin for Sun ONE Studio 4 Update 1, Community

> > Edition:

> > > >

<a href="http://wwws.sun.com/software/download/products/Appl_Frmwk_2.0_CE.html"> ;http://wwws.sun.com/software/download/products/Appl_Frmwk_2.0_CE.html</a>

> > > >

> > > > Framework + IDE pluign for Sun ONE Studio 4 Update 1, Enterprise

> > Edition:

> > > >

<a href="http://wwws.sun.com/software/download/products/Appl_Frmwk_2.0_EE.html"> ;http://wwws.sun.com/software/download/products/Appl_Frmwk_2.0_EE.html</a>

> > > >

> > > > Previous versions of JATO:

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

> > > >

> > > >

Service

> > >

> > >

> > >

> > >

> > > [Non-text portions of this message have been removed]

> >

> >

> >

> >

> >

> >

> > To download the latest version of S1AF (JATO), please visit one of

the

> > following locations:

> >

> > Framework + IDE plugin for Sun ONE Studio 4 Update 1, Community

Edition:

> > <a href="http://wwws.sun.com/software/download/products/Appl_Frmwk_2.0_CE.html"> ;http://wwws.sun.com/software/download/products/Appl_Frmwk_2.0_CE.html</a>

> >

> > Framework + IDE pluign for Sun ONE Studio 4 Update 1, Enterprise

Edition:

> > <a href="http://wwws.sun.com/software/download/products/Appl_Frmwk_2.0_EE.html"> ;http://wwws.sun.com/software/download/products/Appl_Frmwk_2.0_EE.html</a>

> >

> > Previous versions of JATO:

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

> >

> >

>

>

>

>

> [Non-text portions of this message have been removed]

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

Todd,

Ok it is clear,thanks. But the MVC pattern would apply equally to any

model isnt it ? It seems that the jato framework would have to call

some "retrieve" method for getting the model before to call

SetLocation ?

Michel

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

> The problem is that your BeanAdapterModel (BAM) is not populate with any

> beans when parameter mapping occurs on the TiledView. BAM is a little

> different from other models in that it doesn't have a mechanism for

storage

> for data except the beans you provide to it. Therefore, whenever

this model

> is going to be used, it has to be pre-populated with some beans.

>

> So, in order to fix this issue, you need to make sure you populate some

> beans into the model before parameter mapping occurs (via the call to

> mapRequestParameters() on the TiledView).

>

> One approach would be to store the model in the session if

appropriate for

> the beans in question. There are variations of the

ModelManager.getModel()

> method that can help you do this easily.

>

> Another approach would be to subclass the BAM and override the

constructor

> or setRequestContext() method to populate the set of beans. This

would end

> up preparing the model subclass any time it is constructed via the

> ModelManager.

>

> Finally, you could override the TiledView's mapRequestParameters()

method to

> obtain the model and populate its set of beans (don't forget to call

> super.mapRequestParameters!).

>

> Todd

>

> -- Original Message --

> From: <<a href="/group/SunONE-JATO/post?protectID=029176219122056153033171065119100015177 222044214209130152">michel.bouyges@s...</a>>

> Sent: Tuesday, January 28, 2003 10:48 AM

> Subject: [SunONE-JATO] Re: href in tiled view

>

>

> > Craig,

> >

> > Yes I can see the value of the Href, I even parse myself the value (

> > in the old way...) as a workaround ..

> > and I get the bam instance always the same way...

> >

> > Michel

> >

> > In <a href="/group/SunONE-JATO/post?protectID=246075234167171124217231170221059165026 144204051183019182055105236158076086020224">SunONE-JATO@yahoogroups.com</a >, "Craig V. Conover"

> > <<a href="/group/SunONE-JATO/post?protectID=219212113009229091025149066024064239039 098031046209130">craig.conover@s...</a>> wrote:

> > > Michel

> > > Oh... BeanAdapterModel. Not sure if there should be a difference

> > between

> > > that and any other type of Model though.

> > > Maybe Matt, Mike or Todd can shed some light when they get in today.

> > >

> > > But here are some questions.

> > > Is the primary model of your tiled view getting the BAM instance

> > > consistantly the same way?

> > > Can you print out the values of the HttpRequest attr's and see the

> > value

> > > of the Href?

> > >

> > > craig

> > >

> > >

> > > mchlbgs wrote:

> > >

> > > > craig,

> > > >

> > > > The signature is correct. When I override the setLocation

method in a

> > > > derived class from BeanAdapterModel, the program pass reach the

> > > > "handleNumeroRequest" method.Anyway the method call:

> > > > getDisplayFieldValue(CHILD_NUMERO);

> > > > returns null :-(

> > > >

> > > > As you seen the url sent is :

> > > >

> >

>

<a href="http://rully:81/tbd/main/ListProjects?ListProjects.projectTiled2[1].numer o=2">http://rully:81/tbd/main/ListProjects?ListProjects.projectTiled2[1].nume ro=2</a>

> 002&jato.pageSession=

> >

> > > >

> >

>

<<a href="http://rully:81/tbd/main/ListProjects?ListProjects.projectTiled2%5B1%5D.n um">http://rully:81/tbd/main/ListProjects?ListProjects.projectTiled2%5B1%5D.n um</a>

> ero=2002&jato.pageSession=>

> > > >

> > > >

> > > > When the exception occurs the model has been instanciated but

there is

> > > > no beans associated with the model, in my understanding that

's why

> > > > the current location is -1 ?

> > > >

> > > > Michel

> > > >

> > > >

> > > >

> > > > "Craig V. Conover" wrote:

> > > > > Michel

> > > > >

> > > > > It might be that your method signature is incorrect

(unlikely if you

> > > > are

> > > > > using the Studio tools though).

> > > > > The Array exception might be the way you are handling the

request.

> > > > > Here is what needs to be in the request to handle the row

that was

> > > > clicked:

> > > > >

> > > > > public void handleNumeroRequest(RequestInvocationEvent

event) throws

> > > > > Exception

> > > > > {

> > > > > // Because the HREF is bound to the primary model, it

> > contains the

> > > > > // HREF's submitted value on the row that was activated.

The

> > > > primary

> > > > > // model is always reset to the first() position during

submit,

> > > > so we

> > > > > // need to make sure we move to the right location in

the model

> > > > before

> > > > > // reading the HREF's value. Otherwise, we would always

read

> > > > the first

> > > > > // row's value.

> > > > >

> > > > >

> > > >

> >

>

getPrimaryModel().setLocation(((TiledViewRequestInvocationEvent)event).getTi

> leNumber());

> > > > >

> > > > > // get the href's value at the row that was clicked

> > > > > Object numeroVal = getDisplayFieldValue(CHILD_NUMERO);

> > > > >

> > > > > getParentViewBean().forwardTo(getRequestContext());

> > > > > }

> > > > >

> > > > > Let us know if this solves your issues.

> > > > > craig

> > > > >

> > > > >

> > > > > mchlbgs wrote:

> > > > >

> > > > > > I want to put a link ( href ) in my tiledview . To do it

> > simple , the

> > > > > > text for the link is static for now, but I want the value

to be

> > > > > > dynamic so I create my field this way :

> > > > > > if (name.equals(CHILD_NUMERO)) {

> > > > > > HREF child = new HREF(

> > > > > > this,

> > > > > > getPrimaryModel(),

> > > > > > CHILD_NUMERO,

> > > > > > null);

> > > > > > return child;

> > > > > > }

> > > > > >

> > > > > > It looks good in the JSP , and when I click on the first

link

> > > > > > I get this exception :

> > > > > > com.iplanet.jato.model.ModelControlException: Location is

> > beyond the

> > > > > > end of the current bean array (0 > -1)

> > > > > > at

> > > > > >

> > > >

> >

>

com.iplanet.jato.model.BeanAdapterModel.setLocation(BeanAdapterModel.java:35

> 6)

> > > > > > at

> > > > > >

> > com.iplanet.jato.view.TiledViewBase.getChild(TiledViewBase.java:302)

> > > > > > at

> > > > > >

> > > >

> >

>

com.iplanet.jato.view.TiledViewBase.mapRequestParameters(TiledViewBase.java:

> 611)

> > > > > > at

> > > > > >

> > > >

> >

>

com.iplanet.jato.view.ContainerViewBase.mapRequestParameters(ContainerViewBa

> se.java:1010)

> > > > > > at

> > > > > >

> > > >

> >

>

com.iplanet.jato.view.ViewBeanBase.mapRequestParameters(ViewBeanBase.java:11

> 83)

> > > > > > .....

> > > > > >

> > > > > > here is the url sent when I click :

> > > > > >

> > > > > >

> > > >

> >

>

<a href="http://rully:81/tbd/main/ListProjects?ListProjects.projectTiled2[0].numer o=2">http://rully:81/tbd/main/ListProjects?ListProjects.projectTiled2[0].nume ro=2</a>

> 000&jato.pageSession=

> >

> > > >

> >

>

<<a href="http://rully:81/tbd/main/ListProjects?ListProjects.projectTiled2%5B0%5D.n um">http://rully:81/tbd/main/ListProjects?ListProjects.projectTiled2%5B0%5D.n um</a>

> ero=2000&jato.pageSession=>

> > > >

> > > > > >

> > > >

> >

>

<<a href="http://rully:81/tbd/main/ListProjects?ListProjects.projectTiled2%5B0%5D.n um">http://rully:81/tbd/main/ListProjects?ListProjects.projectTiled2%5B0%5D.n um</a>

> ero=2000&jato.pageSession=

> >

> > > >

> >

>

<<a href="http://rully:81/tbd/main/ListProjects?ListProjects.projectTiled2%5B0%5D.n um">http://rully:81/tbd/main/ListProjects?ListProjects.projectTiled2%5B0%5D.n um</a>

> ero=2000&jato.pageSession=>>

> > > > > > or for the second link :

> > > > > >

> > > >

> >

>

<a href="http://rully:81/tbd/main/ListProjects?ListProjects.projectTiled2[1].numer o=2">http://rully:81/tbd/main/ListProjects?ListProjects.projectTiled2[1].nume ro=2</a>

> 002&jato.pageSession=

> >

> > > >

> >

>

<<a href="http://rully:81/tbd/main/ListProjects?ListProjects.projectTiled2%5B1%5D.n um">http://rully:81/tbd/main/ListProjects?ListProjects.projectTiled2%5B1%5D.n um</a>

> ero=2002&jato.pageSession=>

> > > >

> > > > > >

> > > >

> >

>

<<a href="http://rully:81/tbd/main/ListProjects?ListProjects.projectTiled2%5B1%5D.n um">http://rully:81/tbd/main/ListProjects?ListProjects.projectTiled2%5B1%5D.n um</a>

> ero=2002&jato.pageSession=

> >

> > > >

> >

>

<<a href="http://rully:81/tbd/main/ListProjects?ListProjects.projectTiled2%5B1%5D.n um">http://rully:81/tbd/main/ListProjects?ListProjects.projectTiled2%5B1%5D.n um</a>

> ero=2002&jato.pageSession=>>

> > > > > >

> > > > > > The JSP page has two rows printed, because my bean tab has to

> > > > > > elements, so I do not understand why it is saying that the

current

> > > > > > bean array is always -1.

> > > > > > It seems that the handleNumeroRequest() method is not even

> > called in

> > > > > > my code.

> > > > > > Do you know what I'm missing ?

> > > > > > Again thank you for your help

> > > > > >

> > > > > > Michel

> > > > > >

> > > > > >

> > > > > >

> > > > > >

> > > > > >

> > > > > >

> > > > > >

> > > > > > To download the latest version of S1AF (JATO), please

visit one of

> > > > the

> > > > > > following locations:

> > > > > >

> > > > > > Framework + IDE plugin for Sun ONE Studio 4 Update 1,

Community

> > > > Edition:

> > > > > >

> > <a href="http://wwws.sun.com/software/download/products/Appl_Frmwk_2.0_CE.html"> ;http://wwws.sun.com/software/download/products/Appl_Frmwk_2.0_CE.html</a>

> > > > > >

> > > > > > Framework + IDE pluign for Sun ONE Studio 4 Update 1,

Enterprise

> > > > Edition:

> > > > > >

> > <a href="http://wwws.sun.com/software/download/products/Appl_Frmwk_2.0_EE.html"> ;http://wwws.sun.com/software/download/products/Appl_Frmwk_2.0_EE.html</a>

> > > > > >

> > > > > > Previous versions of JATO:

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

> > > > > >

> > > > > >

> > Service

> > > > >

> > > > >

> > > > >

> > > > >

> > > > > [Non-text portions of this message have been removed]

> > > >

> > > >

> > > >

> >

>

> >

> > > >

> > > >

> > > >

> > > > To download the latest version of S1AF (JATO), please visit one of

> > the

> > > > following locations:

> > > >

> > > > Framework + IDE plugin for Sun ONE Studio 4 Update 1, Community

> > Edition:

> > > >

<a href="http://wwws.sun.com/software/download/products/Appl_Frmwk_2.0_CE.html"> ;http://wwws.sun.com/software/download/products/Appl_Frmwk_2.0_CE.html</a>

> > > >

> > > > Framework + IDE pluign for Sun ONE Studio 4 Update 1, Enterprise

> > Edition:

> > > >

<a href="http://wwws.sun.com/software/download/products/Appl_Frmwk_2.0_EE.html"> ;http://wwws.sun.com/software/download/products/Appl_Frmwk_2.0_EE.html</a>

> > > >

> > > > Previous versions of JATO:

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

> > > >

> > > >

Service

> > >

> > >

> > >

> > >

> > > [Non-text portions of this message have been removed]

> >

> >

> > To download the latest version of S1AF (JATO), please visit one of the

> following locations:

> >

> > Framework + IDE plugin for Sun ONE Studio 4 Update 1, Community

Edition:

> > <a href="http://wwws.sun.com/software/download/products/Appl_Frmwk_2.0_CE.html"> ;http://wwws.sun.com/software/download/products/Appl_Frmwk_2.0_CE.html</a>

> >

> > Framework + IDE pluign for Sun ONE Studio 4 Update 1, Enterprise

Edition:

> > <a href="http://wwws.sun.com/software/download/products/Appl_Frmwk_2.0_EE.html"> ;http://wwws.sun.com/software/download/products/Appl_Frmwk_2.0_EE.html</a>

> >

> > Previous versions of JATO:

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

> >

> >

> >

> >

> >

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