You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by draegoon Z <dr...@hotmail.com> on 2004/02/02 11:12:10 UTC

Tiles, insert - no output

Hey guys, need some help:

THE LAYOUT:

<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles"%>

<div id="<tiles:insert attribute="style" flush="true" />">

          <tiles:insert attribute="header" flush="true" />

          <tiles:insert attribute="body" flush="true" />
</div>

THE DEFINITIONS:

<definition name="tile.info_box.main" 
path="/dz_white/resources/info_box.jsp" />

  <definition name="tile.info_box.home1" extends="tile.info_box.main">
   <put name="header" value="Only the best..." direct="true" />
    <put name="body" value="/dz_white/resources/info_box_content/home1.jsp" 
type="page"/>
<put name="style" value="info_box_home" direct="true"/>
  </definition>

  <definition name="tile.info_box.service1" extends="tile.info_box.main">
   <put name="header" value="Services that we currently offer..." 
direct="true" />
    <put name="body" 
value="/dz_white/resources/info_box_content/service1.jsp" type="page"/>
<put name="style" value="info_box_service1" direct="true"/>
  </definition>

  <definition name="tile.info_box.service2" extends="tile.info_box.main">
   <put name="header" value="Services we will soon be offering..." 
direct="true" />
    <put name="body" 
value="/dz_white/resources/info_box_content/service2.jsp" type="page"/>
<put name="style" value="info_box_service2" direct="true"/>
  </definition>

THE FIRST PAGE:

<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles"%>

<div class="main">
  <tiles:insert definition="tile.info_box.home1" flush="true" />
</div>

THE SECOND PAGE:

<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles"%>

<div class="main">
  <tiles:insert definition="tile.info_box.service1" flush="true" />
  <br>
  <tiles:insert definition="tile.info_box.service2" flush="true" />
</div>

THE PROBLEM:

The layout table is only showing content from the "body" attribute in the 
first page.
In the second page, no output from body but no error either.
There is output from the "header" and "style" attributes, so I know it's 
seeing my definitions.

Is it something to do with the way a JSP is included?

_________________________________________________________________
What are the 5 hot job markets for 2004? Click here to find out. 
http://msn.careerbuilder.com/Custom/MSN/CareerAdvice/WPI_WhereWillWeFindJobsIn2004.htm?siteid=CBMSN3006&sc_extcmp=JS_wi08_dec03_hotmail1


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Regarding Client side Validations

Posted by Ramachandran <ra...@summitworks.com>.
Hi All,

         I am performing Cleint side validation in an Add Employee form.
Here if i click the cancel button it should goes to the previous page which
list employees.

         Here on click of sumbit button, i am calling my java script. But
even when i am clicking the cancel button, it is asking me the validations
that i am performed. For example if i give the text field for no it asks to
enter.

         But i want to goes to the list employees page with out performing
the validation by clicking the Cancel button.

Here I am Callin the Script:

<html:form action="AddEmployeeAction"
      name="EmployeeForm"
      type="com.summit.EmployeeForm" onsubmit="return FinalCheck();" >

<html:cancel/> button is also inside this form.

In My Action:

if ( isCancelled(request) ) {

      // Cancel pressed back to employee list
      return (mapping.findForward("cancelemp"));
    }

What i have to do for this one.


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org