intenter

Greenhorn
+ Follow
since Aug 31, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by intenter

Hi all.
I've got very strange problem in Tiles. All worked fine until I added one more page into definition. I added "contextMenu" line.

Here are my view definitions:
<definition name="template" page="/WEB-INF/jsp/template.jsp">
<put name="body" value="/WEB-INF/jsp/empty.jsp" type="page"/>
<put name="mainMenuIndex" value="0"/>
<put name="userMenuIndex" value="0"/>
<put name="contextMenu" value="/WEB-INF/empty.jsp" type="page"/>
<put name="contextMenuIndex" value="0"/>
<put name="script" value=""/>
<put name="onLoadScript" value=""/>
</definition>

<definition name="feeds.list" extends="template">
<put name="pageTitleKey" value="pages.feeds.list.title"/>
<put name="body" value="/WEB-INF/jsp/feeds/feeds.jsp" type="page"/>
<put name="contextMenu" value="/WEB-INF/jsp/feeds/contexMenu.jsp" type="page"/>
<put name="userMenuIndex" value="2"/>
<put name="contextMenuIndex" value="0"/>
</definition>

Here is template.jsp:
.....
<div id="side-bar">
<div>
<jsp:include page="userMenu.jsp"/>
</div>
<tiles:insert name="contextMenu"/>
</div>
.........

All other pages work fine. They display empty.jsp at proper place. But when "feeds.list" view renders, Tiles display nothing instead of "contextMenu.jsp".
If i put source of "contextMenu.jsp" into "template.jsp" - all works fine, but if I try to use <tiles:insert>, nothing displays.

Please, show me my mistake. Thanks.
18 years ago
Thank you.
I fixed problem using

instad of


Generics is very powerful tool, but it's not easy to understand their logic in cases like this.
18 years ago
Hi all.

I use Java 1.5 for a while and i used new-style "for" to operate collections serveral times. But recently I had received a compilation error, and I don't know why.
If I rewrite cycle using old good interators - all works fine.
Here is code:

Code, that works:



Code, that doesn't work:




Compilation error in the line "for (Map.Entry..."
Error: line (148)incompatible types
found : java.lang.Object
required: java.util.Map.Entry

Please, tell me what's wrong. May be it's me, compilator or smth. elese
I use Sun JDK 5.0 Update 3, IntelliJ IDEA 5.0 (build 3467)
Thanks.
18 years ago
Hi.
I have same problem. I need to refer static const value in JSP.
But there is one condition: not using scriptlets.
Whow to refer constant using JSTL or EL?
Thanks.
19 years ago
JSP


Layout source (take a look at title):

Of cource, i could insert <bean:message> directly into layout page, but in this case, this layout will not be "template" any more.

[ September 01, 2004: Message edited by: Alexander Chasovsky ]
[ September 01, 2004: Message edited by: Alexander Chasovsky ]
19 years ago

Originally posted by sreenath reddy:
Tell me what u need exactly ....



I need to do: <input type="submit" value="LOCALIZED MESSAGE"/>

And also <tiles ut name="value" value="LOCALIZED MESSAGE"/>
19 years ago
Hi.
I need access to message resources from jsp page not using <bean:message key=some.key/>.

So what is the name of bean, whitch stores messages? I found out, that it's name stores in Action.MESSAGES_KEY property of Action class. But i cannot download sources of struts.

Or maybe someone can tell me how to do this:<some_tag value="HERE MUST BE MESSAGE SOME.KEY"/> using JSTL or EL. Not using scriptlets

Thanks.
19 years ago