Skip to main content

conditional statement in template

5 replies [Last post]
dcrossma
Offline
Joined: 2006-05-05

Hi all I am trying to put a conditional statement in my template for the spry accordion widget.

my code is like this
<%@ taglib prefix="c" uri="jstl/c" %>

{uid}

{firstname} {lastname}

{uid}

myId is 2222

myId !2222

The code compiles and runs though the jstl tags seem to be compiled first so even if the id is 2222 the conditional statement always fails...If I make the 2222 and Integer I get a conversion error.

Could someone please tell how to access my Xpath expressions and do a basic if statement with them?

Thanks in advance Dave

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
gmurray71
Offline
Joined: 2003-07-31

I hope to actually allow for URL based content panes and I hope to wire this functionality in soon.

Would you like to be able to use a JSP page as the template?

The way we've designed jMaki this might be difficultto do this but I will ask the jMaki development team if you think it would be useful.

gmurray71
Offline
Joined: 2003-07-31

I've submitted an Request for Enhancement for this at:

https://ajax.dev.java.net/issues/show_bug.cgi?id=71

dcrossma
Offline
Joined: 2006-05-05

Thanks for your quick response. I would prefer to have a jsp page as my template. but I guess it is the feature I am after..It is neat if you can do an if on your Xpath expression and then provide say a different link to the client..

Once again Thanks for your help

dcrossma
Offline
Joined: 2006-05-05

FYI something like what I have below will work... The issue is with when the jsp custom tags are rendered.

args="{
xpath:'/tests/test'
}" />

gmurray71
Offline
Joined: 2003-07-31

I was thinking the same type of example. Give us a few days and we'll see about providing this. Thank you again for your suggestions.