Re: Stale Link Issue

2006-11-12 Thread Peter Stavrinides

Hi David,
A Stale Link Exception usually occurs when data changes between the 
rendering phase and form submission. In other words if any components in 
the page are modified dynamically for instance you might encounter this 
when you submit because the rewind has no recollection of those 
components. (References to the components are stored in a hidden field, 
so when the page submits these are checked, if there are more or less 
fields then the stale link exception is thrown). You should take a look 
at the hints section of the documentation of the For component: 
http://tapestry.apache.org/tapestry4.1/components/general/for.html


Back to your question, it is possible to have multiple textfields, but 
because you are generating them on the fly the stale link exception 
occurs... a quick fix could be to set the parameter volitile=true, 
which prevents the component reference in a hidden field, but you need 
to be carefull using this because form structure will be different for 
render and rewind.


Lastly, also be aware of the data types you use, if you are binding 
objects directly to the component then use a converter 
(IPrimaryKeyConverter 
http://tapestry.apache.org/tapestry4.1/tapestry-framework/apidocs/org/apache/tapestry/components/IPrimaryKeyConverter.html). 



good luck,
Peter

david joffrin wrote:

Hi,

I have defined something like:
tr jwcid=@Foreach 
source=ognl:accountFieldDefinitionsList 
value=ognl:accountFieldDefinition index=ognl:index element=tr

tr
td bgcolor=#EAEAF7 colspan=2img 
border=0 src=images/spacer.gif width=1 height=3//td
td bgcolor=#EAEAF7img border=0 
src=images/spacer.gif width=1 height=3//td

/tr
td bgcolor=#EAEAF7font 
color=#FF/font /td

td bgcolor=#EAEAF7
ba jwcid=@Insert 
value=ognl:accountFieldDefinition.fieldName/:/b

/td
td bgcolor=#FF
input jwcid=@TextField 
value=ognl:fieldValue size=20 maxlength=8/

/td
/tr
trtd bgcolor=#FF colspan=3img 
border=0 src=images/spacer.gif width=1 height=3//td/tr

tr
td colspan=2input jwcid=@Submit 
value=Cancel type=button listener=ognl:listeners.onCancel 
class=buttons//td
td align=rightinput jwcid=@Submit 
value=Confirm type=button listener=ognl:listeners.onConfirm 
class=buttons//td

/tr

I am trying to implement a list of TextField.

When I press the Submit button, I have the Stale Link error page coming!

Any idea why it is not possible to have multiple TextField in a page?

Thanks.
DvJ

_
Windows Live^(TM) Messenger has arrived. Click here to download it for 
free! http://imagine-msn.com/messenger/launch80/?locale=en-gb



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



--
Peter Stavrinides
Albourne Partners (Cyprus) Ltd
Tel: +357 22 750652

If you are not an intended recipient of this e-mail, please notify the sender, delete it and do not read, act upon, print, disclose, copy, retain or redistribute it. Please visit http://www.albourne.com/email.html for important additional terms relating to this e-mail. 



Stale Link Issue

2006-11-10 Thread david joffrin

Hi,

I have defined something like:
	tr jwcid=@Foreach source=ognl:accountFieldDefinitionsList 
value=ognl:accountFieldDefinition index=ognl:index element=tr

tr
			td bgcolor=#EAEAF7 colspan=2img border=0 
src=images/spacer.gif width=1 height=3//td
			td bgcolor=#EAEAF7img border=0 src=images/spacer.gif 
width=1 height=3//td

/tr
td bgcolor=#EAEAF7font 
color=#FF/font /td
td bgcolor=#EAEAF7
			ba jwcid=@Insert 
value=ognl:accountFieldDefinition.fieldName/:/b

/td
td bgcolor=#FF
			input jwcid=@TextField value=ognl:fieldValue size=20 
maxlength=8/

/td
/tr
	trtd bgcolor=#FF colspan=3img border=0 
src=images/spacer.gif width=1 height=3//td/tr

tr
		td colspan=2input jwcid=@Submit value=Cancel type=button 
listener=ognl:listeners.onCancel class=buttons//td
		td align=rightinput jwcid=@Submit value=Confirm type=button 
listener=ognl:listeners.onConfirm class=buttons//td

/tr

I am trying to implement a list of TextField.

When I press the Submit button, I have the Stale Link error page coming!

Any idea why it is not possible to have multiple TextField in a page?

Thanks.
DvJ

_
Windows LiveĀ™ Messenger has arrived. Click here to download it for free! 
http://imagine-msn.com/messenger/launch80/?locale=en-gb



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