Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem with display tag

 
Meenatchi Sundar
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hI,
this is MeenatchiSundar.Iam new to struts.I have problem with the display tags.Problem is that i have an Location Form.jsp page..in that there is an comment field which is an text area...When i give long piece of text in it and click submit,in the view page it is displayed as long text from top to bottom..that text should come from left to rigt and not from top to bottomThat view is written in display tag.can anyone solve the issues.
 
Tom Rispoli
Ranch Hand
Posts: 349
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sounds like the width of the space you provided to display the text might be to narrow. Posting your JSP and indicating which display you are talking about would probably help.
 
Meenatchi Sundar
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hI,
this is MeenatchiSundar.Iam new to struts.I have problem with the display tags.Problem is that i have an Location Form.jsp page..in that there is an comment field which is an text area...When i give long piece of text in it and click submit,in the view page it is displayed as long text from top to bottom..that text should come from left to rigt and not from top to bottomThat view is written in display tag.can anyone solve the issues.

this is my Location.jsp page...in it display tag for view is written..
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="display" uri="http://displaytag.sf.net"%>
<%@ taglib prefix="sx" uri="/struts-dojo-tags"%>

<%@page import="com.rooster.hcmone.vo.LocationVO"%>
<html>
<head>
<!-- include css here -->
<jsp:include page="common/css.jsp" flush="true"/>
<title><s:text name="label.header.location.name"/></title>
<sx:head cache="true"/>
</head>
<body>
<div id="submenu_Location_div">
<div class="submenu_bg">
<s:if test="#session.LOCATION_ADD == true">
<sx:a href="setUpLocation.action" targets="submenu_Location_div" indicator="indicatorSubMenuLocation" cssClass="link"><s:text name="MTIAddLocation" /></sx:a> |
</s:if>
<s:if test="#session.LOCATION_VIEW == true">
<sx:a href="getAllLocation.action" targets="submenu_Location_div" indicator="indicatorSubMenuLocation" cssClass="link"><s:text name="MTIViewLocation"/></sx:a> |
<sx:a href="locationSearchForm.action" targets="submenu_Location_div" indicator="indicatorSubMenuLocation" cssClass="link"><s:text name="MTISearchLocation"/></sx:a>
</s:if>
</div>




<s:if test="#session.USER_NAME==null"><%try{response.sendRedirect("doLogout.action");}catch(Exception e){e.printStackTrace();}%></s:if>
<jsp:include page="common/messages.jsp" flush="true"/>

<div class="informationMessageSingle">
  • <span><s:text name="label.title.location.list"/></span>
  • </div>
    <s:set name="NO_OF_RECORDS" value="#session.NO_OF_RECORDS"></s:set>
    <s:text name="label.header.location.name" var="HLocationName"></s:text>
    <s:text name="label.header.country.name" var="HLocationCountryName"></s:text>
    <s:text name="label.header.region.name" var="HLocationRegionName"></s:text>
    <s:text name="label.header.common.address1" var="HLocationAddress1"></s:text>
    <s:text name="label.header.common.address2" var="HLocationAddress2"></s:text>
    <s:text name="label.header.common.city" var="HLocationCity"></s:text>
    <s:text name="label.header.common.phone" var="HLocationPhone"></s:text>
    <s:text name="label.header.common.fax" var="HLocationFax"></s:text>
    <s:text name="label.header.common.zipCode" var="HLocationZipCode"></s:text>
    <s:text name="label.header.common.comments" var="HLocationComment"></s:text>
    <s:text name="label.common.link.view" var="HView"></s:text>
    <s:text name="label.common.link.edit" var="HEdit"></s:text>
    <s:text name="label.common.link.delete" var="HDelete"></s:text>

    <display:table class="tableborder" id="locationListId" name="location" pagesize="${NO_OF_RECORDS}" requestURI="getAllLocation.action" sort="list" defaultsort="1" defaultorder="ascending" export="true">
    <%
    try{
    String sLocationId = ((LocationVO)pageContext.getAttribute("locationListId")).getHcmolocationId().toString();
    request.setAttribute("LocationId", sLocationId);
    }catch(NullPointerException ne){
    }
    %>
    <display:column property="locationName" title="${HLocationName}" sortable="true" headerClass="sortable"/>
    <display:column property="country.countryName" title="${HLocationCountryName}" sortable="true" headerClass="sortable"/>
    <display:column property="region" title="${HLocationRegionName}" sortable="true" headerClass="sortable"/>
    <display:column property="address1" title="${HLocationAddress1}" sortable="true" headerClass="sortable"/>
    <display:column property="address2" title="${HLocationAddress2}" sortable="true" headerClass="sortable"/>
    <display:column property="city" title="${HLocationCity}" sortable="true" headerClass="sortable"/>
    <display:column property="phone" title="${HLocationPhone}" sortable="true" headerClass="sortable"/>
    <display:column property="fax" title="${HLocationFax}" sortable="true" headerClass="sortable"/>
    <display:column property="zipcode" title="${HLocationZipCode}" sortable="true" headerClass="sortable"/>
    <display:column property="comments" title="${HLocationComment}" sortable="true" headerClass="sortable"/>

    <s:if test="#session.LOCATION_VIEW==true">
    <display:column title="${HView}" class="viewedit" media="html">
    <s:url id="listViewLocation" action="locationView">
    <s:param name="loc.hcmolocationId" value="#request.LocationId"></s:param>
    </s:url>
    <sx:a href="%{listViewLocation}" targets="submenu_Location_div" indicator="indicatorSubMenuLocation"><s:text name="View"/></sx:a>
    </display:column>
    </s:if>
    <s:if test="#session.LOCATION_UPDATE==true">
    <display:column title="${HEdit}" class="viewedit" media="html">
    <s:url id="listSetUpLocation" action="setUpLocation">
    <s:param name="loc.hcmolocationId" value="#request.LocationId"></s:param>
    </s:url>
    <sx:a href="%{listSetUpLocation}" targets="submenu_Location_div" indicator="indicatorSubMenuLocation"><s:text name="Edit"/></sx:a>
    </display:column>
    </s:if>
    <s:if test="#session.LOCATION_DELETE==true">
    <display:column title="${HDelete}" class="viewedit" media="html">
    <s:url id="listDeleteLocation" action="deleteLocation">
    <s:param name="loc.hcmolocationId" value="#request.LocationId"></s:param>
    </s:url>
    <sx:a href="%{listDeleteLocation}" targets="submenu_Location_div" indicator="indicatorSubMenuLocation"><s:text name="Delete"/></sx:a>
    </display:column>
    </s:if>
    <display:setProperty name="export.csv.filename" value="Location.csv"/>
    <display:setProperty name="export.excel.filename" value="Location.xls"/>
    <display:setProperty name="export.xml.filename" value="Location.xml"/>
    </display:table>
    </div>
    </body>
    </html>
     
    Tom Rispoli
    Ranch Hand
    Posts: 349
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Have you tried setting the width of the columns by using the style attribute? It sounds like your columns are too narrow. You might also need to change the width of the table if that isn't wide enough.
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic