Hi,
I have a component which iterates over an array of context assets
(images) using the "For" component. This component works fine, except
when put it in a form.
In a form, it fails with "java.lang.IllegalArgumentException: Could not
find a strategy instance for class
org.apache.tapestry.asset.ContextAsset". The problem seems to be that
when The ForBean renders, its StoreSourceDataIterator.next() is trying
to insert a hidden value in the form. The method called is
ForBean.getStringRepFromValue() which fails on DataSqueezer.squeeze()
method with the exception previously mentioned. The reason for the
failure is that no squeeze strategy can be found for the ContextAsset
object.
Here is the relevant part of the stackstrace:
Caused by: java.lang.IllegalArgumentException: Could not find a strategy
instance for class org.apache.tapestry.asset.ContextAsset.
at
org.apache.hivemind.lib.util.StrategyRegistryImpl.searchForAdaptor(StrategyRegistryImpl.java:176)
at
org.apache.hivemind.lib.util.StrategyRegistryImpl.getStrategy(StrategyRegistryImpl.java:74)
at
org.apache.tapestry.util.io.DataSqueezerImpl.squeeze(DataSqueezerImpl.java:125)
at $DataSqueezer_110eadc1cb3.squeeze($DataSqueezer_110eadc1cb3.java)
at
org.apache.tapestry.components.ForBean.getStringRepFromValue(ForBean.java:397)
at
org.apache.tapestry.components.ForBean$StoreSourceDataIterator.next(ForBean.java:365)
at
org.apache.tapestry.components.ForBean.renderComponent(ForBean.java:125)
I'm not sure where the problem lies but I "fixed" it by unrolling my for
loop (there are only and always 5 elements in it).
Ciao
JPB
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]