struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Johannes Geppert <jo...@web.de>
Subject Re: Problem with jquery plugin
Date Wed, 16 Dec 2009 07:30:01 GMT

You only link the JSON Result so your Browser download it,
instead of work with the result. 

jsontable.action Show me the data 

Give this url to the GRID ike this example.

    <s:url id="remoteurl" action="jsontable"/> 
    <sj:grid 
        href="%{remoteurl}" 
        id="gridtable" 
        caption="Customer Examples" 
        dataType="json" 
        pager="true" 
        gridModel="gridModel"
        rowList="10,15,20"
        rowNum="15"
        rownumbers="true"
    >
        <sj:gridColumn name="id" index="id" title="ID" formatter="integer"
sortable="false"/>
        <sj:gridColumn name="name" index="name" title="Name"
sortable="true"/>
        <sj:gridColumn name="country" index="country" title="Country"
sortable="false"/>
        <sj:gridColumn name="city" index="city" title="City"
sortable="false"/>
        <sj:gridColumn name="creditLimit" index="creditLimit" title="Credit
Limit" formatter="currency" sortable="false"/>
    </sj:grid>




Oscar Calderón-2 wrote:
> 
> Hi to all, i was exploring the jquery plugin of struts 2 because i read 
> that you can do something like a grid with the tags that provides that 
> plugin, something like displaytag or extremecomponents.
> 
> I follow an example that i found where they simply create a list in 
> action and show the data in the jsp with the grid tags, but i have a 
> problem, when i call the action, the method execute is called normally 
> but finally it "downloads" the action, appears a dialog box in my 
> browser asking if i want to save or open the file someAction.action. I'm 
> using a json result, this is my struts.xml:
> 
> <package name="default" extends="struts-default,json-default" >
>         <action class="com.datasoft.struts.actions.JsonTable" 
> name="jsontable">
>             <result name="success" type="json">/tablaYeison.jsp</result>
>         </action>
>     </package>
> 
> And this is the link with i'm trying to call the action:
> 
>  jsontable.action Show me the data 
> 
> I think that is something about the result.
> 
> Regards.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 


-----
---
web: http://www.jgeppert.com
twitter: http://twitter.com/jogep

-- 
View this message in context: http://old.nabble.com/Problem-with-jquery-plugin-tp26800800p26807253.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


Mime
View raw message