Hi Ed,

        Can you please help me with code, please test with my jsp page and
suggest me with what changes that i need to take for properly displaying my
page without affecting alignment part. i understood from your previous mail,
i shouldn't pass the style sheet file name insted i need to pass the style
value, what about class attribute.

     First time when page is displaying, it is showing alignment, colurs,
fonts every thing according to page settings, when i move from one page to
other( when i click on 2,3,etc links) it is changing the behaviour.

     please help me with the code changes that i need to take, like you
suggested for display:column.

Thanks & Regards
yagna prasad.


On 1/16/08, yagna prasad <[EMAIL PROTECTED]> wrote:
>
> Hi
>  pls reach me immediately with the solution, i am strucked up here very
> badly,
>
>   my table data is not displaying in properly aligned format, it is
> changing the font and styles when we go to next page or previous pages.
>
> pls help me immediately.
>
>
>  On 1/12/08, Chris Pratt <[EMAIL PROTECTED]> wrote:
> >
> > I am trying to use the href attribute on the display:column tag, but
> > it doesn't appear to allow dynamic data.  Well sort of...
> >
> > When I use something like:
> >
> >        <display:column
> > href="javascript:memberPortal('${member.id}','${member.name.lastname}')"
> > scope="row"><img
> > src="${pageContext.request.contextPath}/img/member_portal.gif"
> > /></display:column>
> >
> > It ends up writing out:
> >
> > <a href="javascript:memberPortal('464631314','ADDRESS')"><img
> > src="/client/img/member_portal.gif" /></a>
> > <a href="javascript:memberPortal('464631314','ADDRESS')"><img
> > src="/client/img/member_portal.gif" /></a>
> > <a href="javascript:memberPortal('464631314','ADDRESS')"><img
> > src="/client/img/member_portal.gif" /></a>
> >
> > In other words it always uses the same parameters, but it should be
> > getting a new string from the JSP engine on each iteration.
> >
> > Is there an efficient way of accomplishing this without writing a
> > bunch of table specific Java code?
> > (*Chris*)
> >
> > -------------------------------------------------------------------------
> >
> > Check out the new SourceForge.net Marketplace.
> > It's the best place to buy or sell services for
> > just about anything Open Source.
> >
> > http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
> > _______________________________________________
> > displaytag-user mailing list
> > displaytag-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/displaytag-user
> >
>
>
<%@ include file="../FilePath.jsp" %>
<%@ page import="java.util.*,com.tycoelectronics.rohsc.dto.SearchDTO" %>
<%@ taglib uri="http://displaytag.sf.net"; prefix="display" %>

<HTML>
 <HEAD>
  <TITLE>Add RoHS Data</TITLE>
  
<LINK REL="StyleSheet" HREF="./theme/CLstyle.css" type="text/css">
 
<SCRIPT> 

//Funtction to clear form
function clearForm(){
        obj = document.getElementById('ena');
        obj1 = document.getElementById('dis');                  
        obj.style.display = "block";     
        obj1.style.display = "none";
        
        searchForm.criteria.value="part";
        searchForm.type.value="matches";
        searchForm.type1.value="matches";
        searchForm.value.value="";
        searchForm.value.focus();                
} 

//Function to validate form
function validate(){
        if(searchForm.value.value == ""){ 
        alert('Please Enter Search Value');      
        searchForm.value.focus(); 
        return false;
         } else
         return true;
}

//function to hide type1 div on page load
function hide(item){
        obj = document.getElementById(item);    
        obj.style.display = "none";             
} 

//function to show type selectbox depending upon criteria selected
function selectBox(item,item1){
        obj = document.getElementById(item);
        obj1 = document.getElementById(item1);

        var val = document.getElementById("criteria").value;
        if(val=='desc'){
                obj.style.display = "none";      
                obj1.style.display = "block";   
        }else{
                obj.style.display = "block";     
                obj1.style.display = "none";    
        }
}

//fuction to submit form
function submitForm(){
        if(validate()){
         document.searchForm.submit();
        }
}

//fuction to save the selected record
function saveForm(){


alert('in save');

var part_key_id_val = null;

alert(document.forms[0].rad.length);

for(var i=0;i<document.forms[0].rad.length;i++)
{
if(document.forms[0].rad.checked)
{
part_key_id_val = document.forms[0].rad.value;
}
}

alert(part_key_id_val);



//alert(document.searchForm.rad.value);

//      document.searchForm.action = 'saveAction.do';   
//       document.searchForm.submit();
}

// function to be called on click of radio button

function callURL(parKeyId)
{

alert("I am in radio button click function");
alert('  -----  '+parKeyId);

}

//function to check radiobutton and submit
function addData(){
        chosen="";
        len=document.searchForm.partKeyId.length;       
        for(i = 0; i <len; i++){
                if(document.searchForm.partKeyId[i].checked){
                        chosen = document.searchForm.partKeyId[i].value;
                        alert("******chosen value*******"+chosen);
                }
        }
        if(chosen == ""){
                alert("Please Select a Part Number to view");
        }else{
                alert("part key id-->"+chosen);                 
                document.forms.searchForm.action = 
"<%=request.getContextPath()%>"+"/addUpdateDetails.do";
                document.forms.searchForm.submit();
    }
}

</SCRIPT> 

</HEAD>
 
<body bgcolor="White" onload="javascript:hide('dis');">
<html:form action="addSearchAction.do" name="searchForm" 
type="com.tycoelectronics.rohsc.actionform.SearchForm">
<table width="100%" align='center' >
        <tr class='ez4'>
        <td colspan=2 align=left valign ='bottom' 
class="label"><b><bean:message key = "rohs.add.search"/></b></td>
        </tr>
</table>
<table width="50%" align="center">
     <tr class="ez1">
                <td valign="top"  align="center" class="label" nowrap 
width="50%">
                <bean:message key = "rohs.search.criteria"/></td>
                <td class="mdata" valign="top" width="50%" align="left">
                <select size="1" name="criteria" 
onchange="javascript:selectBox('ena','dis');">
                         <option value="part_no" selected>TE Corporate 
Part</option>
             <option value="ecoc_gpl">ECOC\GPL</option>
             <option value="desc">Description</option>            
        </select></td>
    </tr>
</table>  
  <%
System.out.println("in AddRoHSCSearch.jsp---->");
%>
<div id="ena">  
  <table width="50%" align="center">
     <tr class="ez1">
                <td valign="top"  align="center" class="label" nowrap 
width="50%" >
                <bean:message key = "rohs.search.type"/></td>
                <td class="mdata" valign="top" width="50%" align="left">
                <select size="1" name="type">
                        <option value="startsWith">Starts With</option>
            <option value="matches" selected>Matches</option>
            <option value="contains">Contains</option>  
            <option value="endsWith">Ends With</option>          
         </select></td>
    </tr>
   </table>  
</div>   

<div id="dis">
   <table width="50%" align="center">
     <tr class="ez1">
                <td valign="top"  align="center" class="label" nowrap 
width="50%" >
                <bean:message key = "rohs.search.type"/></td>
                <td class="mdata" valign="top" width="50%" align='left'>
                <select size="1" name="type1">
                        <option value="startsWith">Starts With</option>
            <option value="matches" selected>Matches</option>                   
  
        </select></td>
    </tr>
   </table>  
</div>

<table width="50%" align="center"> 
     <tr class="ez1">
                <td valign="top"  align="center" class="label" nowrap 
width="50%">
                <bean:message key = "rohs.search.value"/><font 
color="#FF0000">*</font></td>
                <td class="mdata" valign="top" width="50%" align="left">
                <input  maxlength=20 type="text" name="value" size="24"></td>
    </tr>
</table>

<table width="50%" align="center">
        <tr class="ez1">
                 <td colspan="0" class="stext" align="right" width="50%">
                 <a href="javascript:submitForm();" class="linkblue">
         <IMG  src="images/arr_bullet.gif"  border="0"  
align="absmiddle">Search</a></td> 
                 <td width="50%" align="left"><a href="javascript:clearForm();" 
class="linkblue">
                 <IMG  src="images/arr_bullet.gif"  border="0" 
align="absmiddle" >Clear</a></td>
   </tr> 
</table>

<br>
<logic:present name="SearchResult" scope="session">

<%!
ArrayList partDetails = null;

%>

<%
partDetails= (ArrayList)session.getAttribute("SearchResult");
         
      Iterator itr= partDetails.iterator();
       while (itr.hasNext()) {
            System.out.println("results found***********"+itr.next());
        }


System.out.println("partDetails "+partDetails);
// out.println("hello inside the arrayList object");
pageContext.setAttribute("partList",partDetails,PageContext.PAGE_SCOPE);

%>

<display:table name="pageScope.partList" pagesize="6" uid="partlistdata" 
style="css/displaytagex.css"> 
<td align="right" class="label" nowrap width="10%">
<display:column class='ez1'>

<% String strPartKeyId = 
(String)((((SearchDTO)pageContext.getAttribute("partlistdata"))).getPartKeyId());
 
System.out.println("------ value of partkey id----"+strPartKeyId);
%>
<input type="radio" name="statusID" value='<%= strPartKeyId %>' 
onclick="javascript:callURL('<%= strPartKeyId %>')"/>
</display:column>
</td>
  <td align="right" class="label" nowrap width="10%" >
 <display:column property="partNum" title="PartNum" url="/addUpdateDetails.do" 
paramId="partKeyId"
     paramProperty="partKeyId" autolink="true" class='ez1'>
  </display:column></td>
  <td align="right" class="label" nowrap width="10%" >
  <display:column property="partRev" title="PartRev" class='ez1'/> 
  </td>
  <td align="right" class="label" nowrap width="20%" >
  <display:column property="partDesc" title="PartDesc"  class='ez1'/> 
  </td>
  <td align="right" class="label" nowrap width="20%" >
  <display:column property="prodCode" title="ProdCode" class='ez1' /> 
  </td>
<td align="right" class="label" nowrap width="10%" >
  <display:column property="gpl" title="Gpl"  class='ez1'/> 
  </td>
   <td align="right" class="label" nowrap width="20%" >
  <display:column property="epup" title="Epup" class='ez1' /> 
  </td>
  <td align="right" class="label" nowrap width="20%" >
  <display:column property="ecoc" title="Ecoc" class='ez1'/> 
  </td>
   <td align="right" class="label" nowrap width="20%" >
  <display:column property="processCode" title="ProcessCode" class='ez1' /> 
  </td>
    <td align="right" class="label" nowrap width="20%" >
  <display:column property="elvCode" title="ElvCode" class='ez1' /> 
  </td>
  <td align="right" class="label" nowrap width="20%" >
  <display:column property="status" title="Status" class='ez1'  /> 
  </td>
   </display:table>
   
  <table width="50%" align="center">
        <tr class="ez1">
                 <td colspan="0" class="stext" align="right" width="50%">
                 <a href="javascript:saveForm();" class="linkblue">
         <IMG  src="images/arr_bullet.gif"  border="0"  
align="absmiddle">Save</a></td> 
                 <td width="50%" align="left"><a href="javascript:clearForm();" 
class="linkblue">
                 <IMG  src="images/arr_bullet.gif"  border="0" 
align="absmiddle" >Cancel</a></td>
   </tr> 
</table>
 
  
</logic:present>

<logic:notPresent name="SearchResult" scope="session">
        <table width="90%" align='center' cellspacing="0" cellpadding="0" >   
                <tr class='ez4'>
                        <td colspan=2 align="CENTER" valign ='bottom' 
class="label" width="100%"><b><bean:message key = 
"rohs.search.results"/></b></td>
                </tr>
        </table>
  <br>
  <table width="90%" align='center' cellspacing="0" cellpadding="0" >   
                <tr class='ez4'>
                        <td colspan=2 align="CENTER" valign ='bottom' 
class="label" width="100%">
                        <b><bean:message key = "rohs.search.noData"/></b></td>
                </tr>
        </table>
</logic:notPresent>

</html:form>
</BODY>
</html:html>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
displaytag-user mailing list
displaytag-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/displaytag-user

Reply via email to