Kombinierte Ansicht Flache Ansicht Baumansicht
Threads [ Zurück | Nächste ]
Jitendra Rajput
Exception Handling in Velocity Template
3. März 2013 23:05
Antwort

Jitendra Rajput

Rang: Liferay Master

Nachrichten: 873

Eintrittsdatum: 7. Januar 2011

Neue Beiträge

I am using code inside my velocity template which can throw JS error if user dont have permission.
I want to perform exception handling with velocity code. Below is the example code.

 1
 2
 3#if($legacy-QA-URL.getData() && $legacy-QA-URL.getData() != "" && !($legacy-QA-URL.getData().contains("#")))
 4    <p><iframe src="$legacy-QA-URL.getData()&lruserid=$user_ScreenName" style="display: none"></iframe></p>
 5#else
 6    #if($legacy-PROD-URL.getData() && $legacy-PROD-URL.getData() != "" && !($legacy-PROD-URL.getData().contains("#")))
 7        <p><iframe src="$legacy-PROD-URL.getData()&lruserid=$user_ScreenName" style="display: none"></iframe></p>   
 8    #end
 9#end



Any pointer will be really helpful.

- Jitendra