I didn't mean to imply that who sees what and when and logic in the JSP is
always a form of business logic.  That is a good example.

I am just trying to figure out a way so that all the logic in the JSPs isn't
duplicated if you need to also support the same functionality in a Swing
app.

I think I heard about a framework which attempts to determine views for Web
and Swing based apps already out there.  Was it Eclipse?

Anyway, in Swing I don't think you need that "drawing" logic.  Once the
components are set, you have an event which triggers showing the correct
tab.  So, I am wondering if you can get rid of that in the JSPs with an
already written or future framework?



-----Original Message-----
From: Brown, Melonie S. - Contractor [mailto:[EMAIL PROTECTED]

Sent: Friday, August 08, 2003 2:26 PM
To: '[EMAIL PROTECTED]'
Subject: [OT] RE: JSTL ot struts taglibs?

I agree that *business* logic shouldn't be in the view, but what about
formatting logic that is specific to web pages?

As an example, let's say that you had the following html code to do tabbed
menus:  [borrowed from http://www.clagnut.com/writings/csstabs/]

<div id="topnav">
  <ul>
        <li><a href="#">Home</a></li>
        <li><a href="#" class="here">About</a></li>
        <li><a href="#">News</a></li>   
  </ul>
</div>


Would you consider the following to be "bad"?  
<div id="topnav">
  <ul>
        <li>
        <c:forEach items="${menu.customizedMenuItems}" var="perms">
                <c:choose>
                  <c:when test='${perms.currentItem eq "Y"}'>
                        <a href="<c:out value='${perms.link}'/>"
class="here">                                                   
                                <c:out value='${perms.description}'/>
                        </a>
                  </c:when>
                  <c:otherwise>
                        <a href="<c:out value='${perms.link}'/>">
                                <c:out value='${perms.description}'/>
                        </a>
                  </c:otherwise>
                </c:choose>

        </c:forEach>
       </li>
</ul>

-------- Original Message --------
Subject: [OT] RE: JSTL ot struts taglibs?
Date: Fri, 8 Aug 2003 13:47:02 -0400
From: Bailey, Shane C. <[EMAIL PROTECTED]>
Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
Newsgroups: gmane.comp.jakarta.struts.user

[snip]

In theory it seems like there should be no logic in the View since 1. who
sees what and when could be considered business logic and 2. you would want
to try and make that who sees what where logic exist in a place where both
your Web app and Swing app (for instance) can get to it.



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

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

Reply via email to