XPath function not() not working.

2006-04-28 Thread Sébastien Brodeur
Hi folks,

We used in the past JSTL 1.0, we are in the process of migrating to JSTL 1.1.

I can't have the XPath not() function working in a x:when expression.  The
expression is always returning true when I test if a node exist.

I try the simpless form I can think.  I test not(true()) and not(false()).  Both
return the good answer.  But when I test a select expression (ex. x:when
select=$xml/books/book[id=$param.bookId]) it doesn't work.  I try the
expression in a x:out and I get a valid value so I know the expression return
a node.

We use WebSphere 6.0 on AIX 5.3.

The original code was working fine using JSTL 1.0 and WebSphere 5 on AIX 5.3.

Any idea beside using Tomcat instead :)


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: XPath function not() not working.

2006-04-28 Thread Kris Schneider

Is bookId a request parameter? If so, what happens with this:

x:when select=not($xml/books/book[id=$param:bookId])

Sébastien Brodeur wrote:

Sébastien Brodeur brodseba at gmail.com writes:

I want to clarify my post.

I check the JSTL 1.1 Specification Maintenance Release, but I found nothing
helpful (except the change in x:forEach having now a varStatus attribute and
the fact that the c:forEach can no longer use a X tags select to iterate.  A
change not highlight into the Appendix A by the way.)

This code work fine using JSTL 1.0, but not with JSTL 1.1.  The expression
($xml/books/book[id=$param.bookId]) ALWAYS return false, so I ALWAYS got
not(false())

x:choose
  x:when select=not($xml/books/book[id=$param.bookId])
%-- There is no valid node in the xml --%
  /x:when
  x:otherwise
%-- Do something with the xml. --%
  /x:otherwise
/x:choose

The easies solution seem obvious.  I should remore the not() and swap the code
segment from when to otherwise.  But not() should work God d**m it.

We have also problem using the AND and OR operator in XPath expression.


--
Kris Schneider mailto:[EMAIL PROTECTED]
D.O.Tech   http://www.dotech.com/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Weblogic 9.0 and JSTL 1.1 ${variable} expansion

2006-04-28 Thread Kris Schneider
If you're using JSP documents (XML format), then it looks like there was a 
bug in 9.0 that's been fixed in 9.1 that *might* be an issue. See CR224130 at:


http://edocs.bea.com/wls/docs91/issues/known_resolved.html#1056681

Otherwise, it's difficult to guess at the problem from the information 
you've provided. The only suggestion I can make is to be sure you haven't 
unintentionally disabled EL evaluation.


One other suggestion I'd make is for all your developers to get on the same 
platform, preferably the same one that will be used in production. That way 
everyone will see the same set of issues and will likely encounter them 
earlier rather than later in the development cycle.


Luca Passani wrote:

Hello,

I'm involved in a distributed project. I develop a web app using 
Tomcat5, JSTL 1.1, Struts, Java 1.5 (but compiling for 1.4) and when I 
am done, someone somewhere else re-builds my app for Weblogic 9.0 and 
integrates with the back-end.

Unfortunately, things are not going 100% smooth.
First we had to figure out that web.xml for servlets 2.4 is not just a 
change in the header (DTD vs schema), but also the syntax has changed in 
subtle ways (taglib tags need to go inside a jsp-config tag with 2.4). 
To add to that, Tomcat5 does not complain but weblogic does! (as an 
aside, which tools do you guy use to validate the web.xml in accordance 
with the 2.4 schema?)


But let me get to my question. In my Struts action I do something like:

request.setAttribute(title, Hi there!);

and in tomcat5, as expected, I am able to read back that value in my 
JSPs as simply as:


a href=#  title=${title}

Alas, in Weblogic they are seeing ${title} not Hi There !

as I said, the web.xml is correctly set (and correctly recognized) as 
2.4. We know for sure that WL 9 is supposed to handle 2.4 and JSP 2.0


http://e-docs.bea.com/wls/docs90/notes/new.html#1225583

any idea of what we may be missing?

Thanks

Luca


--
Kris Schneider mailto:[EMAIL PROTECTED]
D.O.Tech   http://www.dotech.com/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



How to extract the value from Apache DataGrid taglib example

2006-04-28 Thread Ron Karim

Hope someone can help me with this :
I need to be able to extract the values of the row a user may hve 
checked (in the checkbox ) in the DataGrid.
Can anyone tell me how to get the values of the fields in the particular 
row (or rows) a user may have selected ( with the checkbox ?) ?


The Apache DataGrid link is here : 
http://jakarta.apache.org/taglibs/sandbox/doc/datagrid-doc/index.html#examples




The grid looks great, I just can't seem to get the values out of a 
selected grid ...



Thanks
Ron


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]