• Welcome to KonaKart Community Forum. Please login or sign up.
 

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - pyr0t3chnician

1
Around line 75 is the cart logic for checking an empty shopping cart in the EditCartBody.jsp file:


<div class="body-content-div">
    <logic:empty  property="itemList" name="EditCartForm">
        <div class="msg-box"><bean:message key="edit.cart.body.emptycart"/></div>
    </logic:empty>
    <logic:notEmpty property="itemList" name="EditCartForm">
        //Everything else happens here
        </div>
    </logic:notEmpty>
</html:form>


The nesting is incorrect, so if your cart is empty, you will be missing your closing tag for the 'body-content-div'.
The two fixes for this are adding a closing </div> tag to the <logic:empty> section:

<div class="body-content-div">
    <logic:empty  property="itemList" name="EditCartForm">
        <div class="msg-box"><bean:message key="edit.cart.body.emptycart"/></div>
    </div>
    </logic:empty>
    <logic:notEmpty property="itemList" name="EditCartForm">
        //Everything else happens here
        </div>
    </logic:notEmpty>
</html:form>

OR taking the last </div> in the <logic:notEmpty> tag and putting it just outside the tag:

<div class="body-content-div">
    <logic:empty  property="itemList" name="EditCartForm">
        <div class="msg-box"><bean:message key="edit.cart.body.emptycart"/></div>
    </div>
    </logic:empty>
    <logic:notEmpty property="itemList" name="EditCartForm">
        //Everything else happens here
    </logic:notEmpty>
    </div>
</html:form>


That should help fix any layout issues you may be having with this page.
2
I figured it out and made some modifications after reading up on the tiles strut.  Much better than modifying 20+ jsp files.  I modified the tile_defs and took out the "Empty.jsp" and just made the field blank (ie. ""), and then imported the attribute and checked to see if it was blank.  Thanks for the suggestion though.


  <tiles:importAttribute name="leftTile1" scope="request" />
  <logic:notEqual name="leftTile1" value="">
    <div class="siderBox noMargin">
        <div class="siderBoxTop"></div>
        <div class="siderBoxContent">
           <tiles:insert attribute="leftTile1" />
        </div>
        <div class="siderBoxBottom"></div>
      </div>
    </logic:notEqual>
3
Configuration of KonaKart / Checking if a tile exists.
December 27, 2011, 07:32:53 pm
Hello everyone,
Let me preface this question by letting you know that I work mainly with PHP and can get around with rails and a few other languages/platforms, but I have almost no experience with Java webapps.  I understand what is going on, but to writing my own code is a completely different story.

Anyways, my task at this job is to update KonaKart (done) and then to theme it according to our new website (almost done).  I have the layouts, header, and footer done mostly.  The problem I am having is that the jsp page for the main layout looks like this:


<div class="siderBox noMargin">
    <div class="siderBoxTop"></div>
    <div class="siderBoxContent">
        <tiles:insert attribute="leftTile1" />
    </div>
    <div class="siderBoxBottom"></div>
</div>


The problem is that if leftTile1 has a value of "/WEB-INF/jsp/Empty.jsp", the I get a small blank box.  I want to check if the value of leftTile1!="/WEB-INF/jsp/Empty.jsp" so that I can display the box or hide it if it doesn't exist.  I could go into each tiles .jsp and wrap the content in that html, but there has to be an easier way... I hope.  Any help would be greatly appreciated!  Thanks!