Nope.  Tried both context and t:context

HTML came out:
<div ns0:context="currentExtension.number" id="extension" 
xmlns:ns0="http://tapestry.apache.org/schema/tapestry_5_3.xsd";>

The prop expansion worked ok for html before (below)
Still get [Ljava.lang.Object@34255245 on the event both ways.


I see that using your suggestion is what happens in the Hi-Lo game, when a 
page's template passes a context to the component.
In my case, I'm in the component template - if that makes a difference?


PS - just been reading your OAuth service blogs - hopefully get to 
understanding those things over the weekend - thanks




On 13/04/2012, at 9:50 PM, Taha Hafeez Siddiqi wrote:

> Hi 
> 
> Try 
> 
> t:context='currentExtension.number' instead of 
> t:context='${currentExtension.number}' 
> 
> regards
> Taha
> 
> On Apr 13, 2012, at 5:13 PM, Chris Mylonas wrote:
> 
>> Hi List,
>> 
>> I tried giving a custom component a context (just a String) but when I go to 
>> use it on an event, I get the output to be [Ljava.lang.Object;@783b110a 
>> instead of "1234" which is what is set during rendering.
>> 
>> The output html looks a little strange compared to the component's tml - 
>> like I'm missing something:
>> 
>> <t:container xmlns:t="http://tapestry.apache.org/schema/tapestry_5_3.xsd";>
>> 
>>      <div id="extension" t:context="${currentExtension.number}">
>> 
>> <div ns0:context="1234" id="extension" 
>> xmlns:ns0="http://tapestry.apache.org/schema/tapestry_5_3.xsd";>
>> 
>> 
>> I'm looking at the PageLink component and it's way of getting a context is 
>> as an Object[] rather than a simple String.
>> I'm guessing when it creates the link, there's some magic that happens 
>> underneath to create the "context" into whatever is used in the template to 
>> a valid portion of a URL
>> 
>>       Link link = resources.createPageLink(page, 
>> resources.isBound("context"), context);
>> 
>>       writeLink(writer, link);
>> 
>> Given my above output "[Ljava.lang.Object;@783b110a" - what's the trick to 
>> turn this object for t:context="${currentExtension.number}" into 
>> context="1234" so that the URL that tapestry spits out during the component 
>> event look like 
>> /christest/draggable6.extension.1234.voicemailzone:zonedrop/ISDN1  (where 
>> 1234 is at the moment omitted)
>> 
>> Any hints would be very helpful!!
>> 
>> Cheers
>> Chris
> 
> 
> ---------------------------------------------------------------------
> 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

Reply via email to