struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Praveen Kumar Mattaparthi (JIRA)" <j...@apache.org>
Subject [jira] Created: (WW-3073) showLoadingText attribute Issue in sx:div.
Date Fri, 03 Apr 2009 10:52:06 GMT
showLoadingText attribute Issue in sx:div. 
-------------------------------------------

                 Key: WW-3073
                 URL: https://issues.apache.org/struts/browse/WW-3073
             Project: Struts 2
          Issue Type: Bug
          Components: Plugin - Dojo Tags
    Affects Versions: 2.1.2
            Reporter: Praveen Kumar Mattaparthi


Hi All,
  I was had problem with showLoadingText attribute in sx:div.
  I had a jsp that display content in Grid from the database using Dojo. see the below code.

Parent JSP:

<s:form id="frmSearch" name="frmSearch" action="" theme="simple">
    <s:hidden name="recordsPerPage" id="recordsPerPage" value="17"/>
    <s:url id="url_myAcc" action="myUserData" />
    <sx:div id="userListTab" label="Users List" formId="frmSearch" href="%{url_myAcc}"
 theme="simple" listenTopics="Get_MyAccounts" showLoadingText="true" loadingText="Loading
Please Wait" cssStyle="overflow:auto;" >
    </sx:div>
</s:form>

Child JSP

<s:hidden name="limitValue" id="limitValue" value="%{limitValue}"/>
<s:hidden name="totalRecords" id="totalRecords" value="%{totalRecords}"/>
<div style="padding-left:20px;" >
    <table class="gridTable" width="700px" >  
        <s:if test="accountsList1.size > 0">
            <s:iterator value="accountsList1">
                <tr class="gridRowEven">
                    <td class="gridRowEven"><a href="getUser.action?id=<s:property
value="id" />"><s:property value="userName" /></a></td>  
                    <td class="gridRowEven"><s:property value="status" /></td>
                    <td class="gridRowEven"><s:property value="URL" /></td>
                    <td class="gridRowEven"><s:property value="phone" /></td>
                    <td class="gridRowEven"><s:property value="dateLastActivity"
/></td>
                    <td class="gridRowEven"><s:property value="industry" /></td>

                    <td class="gridRowEven"><s:property value="region" /></td>
 
                    <td class="gridRowEven"><s:property value="territory" /></td>

                </tr>  
            </s:iterator>
        </s:if> 
        <tr class="gridFooter">
            <td colspan="8" class="gridFooter" >
                <img src="/includes/images/DBGrid/First.gif" onclick="showFirst('limitValue')"
style="cursor: pointer" >
                <img src="/includes/images/DBGrid/Previous.gif" onclick="getPrevious('limitValue','recordsPerPage')"
style="cursor: pointer"  >
                <img src="/includes/images/DBGrid/Next.gif" onclick="getNext('limitValue','recordsPerPage','totalRecords')"
style="cursor: pointer" >
                <img src="/includes/images/DBGrid/Last.gif" onclick="getLast('limitValue','recordsPerPage','totalRecords')"
style="cursor: pointer" >
            </td>
        </tr>
    </table>  
</div>

If User Clicks The next image  it calls javascript function getNext(...). Below is my JS file

function getNext(limitValueId,recordsPerPageId,totalRecordsId) {  
    var limitValue = parseInt(document.getElementById(limitValueId).value);
    var recordsPerPage = parseInt(document.getElementById(recordsPerPageId).value);
    var totalRecords = parseInt(document.getElementById(totalRecordsId).value);
    if((limitValue+recordsPerPage) == totalRecords) {
            alert("You are Already Viewing Last Page");
            return false;
    }else {
       limitValue = limitValue+recordsPerPage;
       document.getElementById(limitValueId).value = limitValue;
       dojo.event.topic.publish("Get_MyAccounts");
   }
}

"limit value" is used get the next set of records from the database. 

Here is my problem. 

If I set showLoadingText="false". I am able to get the Form variables limitValue, recordsPerPage,totalRecords
 in the Action class.
But If I set showLoadingText="true" for displaying the loading message. I am unable to get
form variables limitValue, totalRecords in child JSP but I am able to get recordsPerPage in
Parent JSP.
Can Anyone tell me why showLoadingText is behaving like this?
 If I set it false I am getting All form variables. But I set it false I am unable to get.
I need to use this in my project and it is very important.




-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message