also ognl btw

YourLink : WOHyperlink {
        href = ~'javascript:ShowContent("Image' + 
sess.selectedPerformance.primaryKey + '")';
}

one of the few uses of ognl in templates that doesn't disgust me.

ms

On Feb 18, 2010, at 11:23 AM, Mike Schrag wrote:

> you can just have a method that returns "javascript:ShowContent('Image" + id 
> + ")')" and use WOGenericContainer/Element for the div and WOHyperlink for 
> the link
> 
> On Feb 18, 2010, at 11:11 AM, Johan Henselmans wrote:
> 
>> 
>> On 18 feb 2010, at 17:05, Anjo Krank wrote:
>> 
>>> 
>>>> Thanks for the suggestion, but I wanted to make it a little bit more 
>>>> variable: ie, changing the contents of the wod or wo/html file without 
>>>> having to recompile the application. 
>>> 
>>> If you are running in debug mode, you can simply change the code? Or do you 
>>> mean in deployment? Srzly?!?
>> 
>> No, I meant that I wanted to make the wod more readable without having to 
>> resort to java code that is generating HTML. 
>> 
>> It is a bit weird to have this type of code in your java class, especially 
>> the css style information. 
>> 
>> 
>>      public String bigPictureHref(){
>>              return "<a 
>> href=\"javascript:ShowContent('Image"+mySess().selectedPerformance().primaryKey()+"')\"
>>  onMouseOver = 
>> \"ShowContent('Image"+mySess().selectedPerformance().primaryKey()+"'); 
>> return true;\"  onMouseOut = 
>> \"HideContent('Image"+mySess().selectedPerformance().primaryKey()+"'); 
>> return true;\" >";
>>      }
>> 
>> 
>>      public String bigPictureDivID(){
>>              return "<div 
>> id=\"Image"+mySess().selectedPerformance().primaryKey()+"\" 
>> style=\"display:none; position:absolute; border-style: solid; 
>> background-color: #b53f1d; padding: 5px; width: 200px\" >";
>>      }
>> 
>> 
>> 
>> 
>>> 
>>> Cheers, Anjo
>>> 
>>> Am 18.02.2010 um 16:59 schrieb Johan Henselmans:
>>> 
>>>> 
>>>> On 18 feb 2010, at 12:11, Henrique Gomes wrote:
>>>> 
>>>>> 
>>>>> On Feb 18, 2010, at 8:45 AM, Johan Henselmans wrote:
>>>>> 
>>>>>> I am trying to call a webobjects string in an a href;
>>>>>> 
>>>>>> First i tried this:
>>>>>> 
>>>>>> <a href = "javascript:ShowContent('<wo:WOString value 
>>>>>> ="[mySess.selectedPerformance.primaryKey]"/>') "; 
>>>>>> onMouseOver = "ShowContent('<wo:WOString 
>>>>>> value="[mySess.selectedPerformance.primaryKey]"/>'); return true;"
>>>>>> onMouseOut = "HideContent('<wo:WOString value 
>>>>>> ="[mySess.selectedPerformance.primaryKey]"/>'); return true;">
>>>>> 
>>>>> Humble suggestion: why not write a method that would return the all href, 
>>>>> onMouse, etc?
>>>>> 
>>>>> The method can do all the string operations in java... 
>>>>> "Javascript:ShowContent('" + mySess.selectedPerformance.primaryKey +"')"
>>>>> 
>>>>> 
>>>>> HG
>>>>> 
>>>> 
>>>> 
>>>> 
>>>> Thanks for the suggestion, but I wanted to make it a little bit more 
>>>> variable: ie, changing the contents of the wod or wo/html file without 
>>>> having to recompile the application. 
>>>> 
>>>> Johan Henselmans
>>>> [email protected]
>>>> 
>>>> 
>>>> 
>>>> _______________________________________________
>>>> Do not post admin requests to the list. They will be ignored.
>>>> Webobjects-dev mailing list      ([email protected])
>>>> Help/Unsubscribe/Update your Subscription:
>>>> http://lists.apple.com/mailman/options/webobjects-dev/anjo%40krank.net
>>>> 
>>>> This email sent to [email protected]
>>> 
>> 
>> Johan Henselmans
>> [email protected]
>> 
>> 
>> 
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list      ([email protected])
>> Help/Unsubscribe/Update your Subscription:
>> http://lists.apple.com/mailman/options/webobjects-dev/mschrag%40mdimension.com
>> 
>> This email sent to [email protected]
> 
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list      ([email protected])
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/webobjects-dev/mschrag%40mdimension.com
> 
> This email sent to [email protected]

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to