Hi As the expection says "Property videoItem is null" and so videoItem.position will cause an NPE.
regards Taha On May 15, 2012, at 4:48 PM, karthi wrote: > Arno Haase, > > Thank you for your reply. > > I have changed the code to: > > <input t:type="submit" t:id="topLevel" context="videoItem.position" > defer="false" t:value="${videoItem.name}" /> > > public void onSelectedFromTopLevel(int position) { > System.out.println("Selected button item is --> " + position); > } > > but it throws the following error: > > An unexpected application exception has occurred. > > Failure reading parameter 'context' of component Index:toplevel: Property > 'videoItem' (within property expression 'videoItem.position', of > web.app.video.pages.Index@f6ede1) is null. > > > > -- > View this message in context: > http://tapestry.1045711.n5.nabble.com/How-to-send-the-selected-button-value-from-tml-page-to-corr-java-page-tp5709890p5709937.html > Sent from the Tapestry - User mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org