- This topic has 24 replies, 3 voices, and was last updated 20 years, 11 months ago by
Riyad Kalla.
-
AuthorPosts
-
Steve BangMemberWhen a custom tag uses only attribute values and does not include run-time expression values, objects defined in the custom tag can be scripted to just fine. But, when a JSP expression is included in a tag attribute’s value, the object cannot be resolved. This is a common practice for our customers and field engineers.
Code with comments below.
Steve
===========================================
<%@ page contentType=”text/html;charset=UTF-8″ %>
<%@ taglib uri=”bloxtld” prefix=”blox”%>
<%
String query = “select from [sales]”;%>
<blox:present
id=”queryWithoutExpressionPB”
visible=”false”>
<blox:chart visible=”false” />
<blox:grid defaultCellFormat=”$#,###,###.00;[red]($#,###,###.00)”/>
<blox:data dataSourceName=”foodmart” query = “select from sales” />
</blox:present>// the object below is resolved just fine
<%
queryWithoutExpressionPB.getPageBlox();
%><blox:present
id=”queryWithExpressionPB”
visible=”false”>
<blox:chart visible=”false” />
<blox:grid defaultCellFormat=”$#,###,###.00;[red]($#,###,###.00)”/>
<blox:data dataSourceName=”foodmart” query = “<%= query %>” />
</blox:present>// the one below doesn’t work if there is a Java expression
//in the query tag (remove the Java expression & replace
// with the string – it then works
<%queryWithExpressionPB.
%>
March 10, 2004 at 4:39 am #204560
No OperationMemberwhere can I download that taglib?
NOP
March 10, 2004 at 11:29 am #204594
Steve BangMemberIt’s our company’s proprietary taglib for creating interactive interfaces for use with multidimensional and relational data sources. Multidimensional data sources, if you don’t know, are primarily used by financial analysts and business managers for drilling into aggregated data and are typically return data much faster than relational queries. The major multidimensional data sources Alphablox supports include Hyperion Essbase and Microsoft Analysis Services.
The problem should be reproducible with other tag libraries. And, the above example works fine in IntelliJ,correctly resolving the objects.
Steve
March 10, 2004 at 12:18 pm #204605
Riyad KallaMemberSteve,
This is odd, I have fired this off to Scott/Michael to see what they find and in parallel imagine NOP won’t sleep until he can figure out what is going on 😉Just wanted to update you to let you know we are on it.
March 10, 2004 at 2:50 pm #204616
No OperationMembermaybe this is related to:
https://www.genuitec.com/forums/topic/jsp-code-completion-problem-bug/&highlight=8NOP
March 10, 2004 at 5:35 pm #204624
Steve BangMemberI can’t tell that it is. But, interestingly, if I collapse the JSP scriptlet to a single line, the debugging error moves to the line with the closing tag of the PresentBlox (</blox:present>). The same error (queryWithExpressionPB.out cannot be resolved or is not a field) occurs either way, but it points to a different location.
Below is the snippet showing the change:
<blox:present
id=”queryWithExpressionPB”
visible=”false”>
<blox:chart visible=”false” />
<blox:grid defaultCellFormat=”$#,###,###.00;[red]($#,###,###.00)”/>
<blox:data dataSourceName=”foodmart” query = “<%= query %>” />
</blox:present>// the one below doesn’t work if there is a Java expression in the query tag
// (remove the Java expression & replace with the string – it then works<% queryWithExpressionPB. %>
Does that help? If you think the fix for the other bug is related, you could send me a build with that fix and I’ll test it.
Steve
March 10, 2004 at 5:44 pm #204625
Riyad KallaMemberSteve,
Do you have EL enabled for this app? Can you insert the value of query using an EL statement instead of a scriplet? I wonder if that works (this is odd indeed)March 10, 2004 at 5:59 pm #204628
Steve BangMemberNo it’s not enabled and won’t run in a 2.0 container, but perhaps I can come up with another test case later. I imagine it will be easy to reproduce with JSF components, since we’re a lot alike.
Steve
March 11, 2004 at 1:26 am #204656
No OperationMemberI tried similar code:
<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %> <bean:define id="queryWithoutExpressionPB" type="java.lang.String" value="a" /> <% queryWithoutExpressionPB.toUpperCase(); %> <bean:define id="queryWithExpressionPB" type="java.lang.String" value='<%= "b" %>' /> <% queryWithExpressionPB. %>
and it works as it should…
NOP
March 11, 2004 at 9:41 am #204674
Riyad KallaMemberSteve,
Can you confirm the example code that NOP just posted works in your installation of MyEclipse? If it does, then I think there may be some issue with the taglib… if it doesn’t work, then we can troubleshoot an installation problem.March 12, 2004 at 3:46 pm #204748
Steve BangMemberI can try this later tonight or tomorrow. Or, is there an email address that I can send the relevant files (JAR and TLD)? I don’t think it’s a taglib issue, since it works fine in IntelliJ. But, it’s possible.
Steve
March 13, 2004 at 3:33 pm #204763
Steve BangMemberNOP’s code example exhibited the same behavior as mine. I assume that NOP has a more recent build than mine and the problem is fixed there. 🙂
Steve
March 13, 2004 at 7:39 pm #204768
Riyad KallaMemberSteve,
Are you using MyEclipse 2.7 GA? You can check from the Help->About page and click the MyEclipse icon.March 13, 2004 at 8:22 pm #204771
Steve BangMemberSorry, I thought I had said earlier that I am using 3.7 RC2, but it looks like I forgot to mention it. What was NOP testing?
Steve
March 13, 2004 at 11:32 pm #204773
Riyad KallaMemberSteve,
It is possible that NOP is testing the 3.7 GA release internally that hasn’t been released quite yet. What we can do from this point is:
1) have you test your project using Eclipse 2.1.2 and MyEclipse 2.7 GA
OR
2) wait until 3.7 GA is released (next week possibly) and wait until that time to try and see if your problem still exists.Do these approaches sound reasonable to you?
-
AuthorPosts