Re: [Webwork-user] Name collision (FIXED)
Brought to you by:
baldree,
rickardoberg
From: Maurice C . P. <Ma...@Vi...> - 2000-12-12 19:38:35
|
* Rickard Öberg (ri...@jb...) wrote: > > Is this sufficient as naming rules? It looks great! The only thing that I think might be desirable is using a : in the first position of the name to denote the top object in the object hierarchy. For example ":foo:bar" would get you into the second level no matter how deep you are. This is the same way that hierarchial filesystems work (just with slashes instead of colons). I haven't had a chance to look at the new name resolution code, so I'm not sure that this even makes sense. Why functionality like this might be attractive to me is the Jive/Webwork breeding I'm doing. If you look at the threaded messages, they are recursive in nature. I could be at any level but still need info from the original bean. Here is the code that I use to thread the messages (actually it needs to go deeper when before going to production): <webwork:iterator name="discussion"> <%@ include file="message.jsp" %> <ul> <webwork:iterator> <%@ include file="message.jsp" %> <ul> <webwork:iterator> <%@ include file="message.jsp" %> <ul> <webwork:iterator> <%@ include file="message.jsp" %> </webwork:iterator> </ul> </webwork:iterator> </ul> </webwork:iterator> </ul> </webwork:iterator> Here is message.jsp: <p> <span class="messageSubject"><webwork:property name="subject"/></span> <br> <span class="messageByline">Posted by <webwork:property name="user:username"/>, <webwork:property name="fancyDate"/>.</span> <br> <span class="messageBody"><webwork:property name="body"/></span> <br> <span class="messageReply"> ( <a href="CommentForm.action?forumID=<webwork:property name="forumID"/>&threadID=<webwork:property name="forumThread:ID"/>&messageID=<webwork:property name="ID"/>"/>Reply to this comment.</a> ) </span> <br> </p> In the link that I recreate at the end, I am using the the property forumID. This is from the original action bean and I think that the upward search is hurting my performance. If I were able to use name=":forumID", there is some potential to save cycles. BTW, I did use jsp:include tag for all those message.jsp's (about 15 at the time) and it didn't take me long to replace them with the include directive (ouch! 8-). It helped, but my performance is still way below what is typical for the Jive code heavy JSP's (Vodka skin for those who speak Jive 8-). I haven't had a chance to do any profiling or anything to see if it is something that I did in my action bean or if it is Webwork that's slowing me down. The parameter parsing stuff is the first thing that came to mind, only because it gets hit so heavily. After I typed all this it occurred to me that maybe I can us the @ syntax to get to the original action bean, I just don't know how to do it. If that's the answer, a little code snippet could probably get me there. Later, Maurice |