Dec 21, 2010, 10:03 PM
[CLOSED] i wana handle my web service when replay with {d:null}
i wana set at my Dataview a specific string when my web service return to my store {d:null}, perhaps below code will help you:
the store:
the store:
<ext:Store ID="ProspectingStore" runat="server">
<Proxy>
<ext:HttpProxy DisableCaching="true" Json="true" Method="Post" Url="http://localhost:65000/UtilitiesWebService.asmx/strGetDelearProspecting">
</ext:HttpProxy>
</Proxy>
<BaseParams>
<ext:Parameter Name="delarLocationID">
</ext:Parameter>
</BaseParams>
<Reader>
<ext:JsonReader Root="d.Data" TotalProperty="d.TotalRecords">
<Fields>
<ext:RecordField Name="PublishDate" Type="Date" />
<ext:RecordField Name="ProfileImage" />
<ext:RecordField Name="AuthorName" />
<ext:RecordField Name="Content" />
<ext:RecordField Name="AuthorScreenName" />
<ext:RecordField Name="ProspectID" />
<ext:RecordField Name="FacebookDateTimeStyle" />
</Fields>
</ext:JsonReader>
</Reader>
<Listeners>
<LoadException Handler="var e = e || {message: response.responseText};" />
</Listeners>
</ext:Store>
the dataview: <ext:Panel ID="ImagePanel" runat="server" Cls="images-view" Frame="true" AutoHeight="true"
Width="400" Collapsible="false" Layout="Fit" HideLabel="true">
<Items>
<ext:DataView ID="ImageView" runat="server" StoreID="ProspectingStore" AutoHeight="true" Width="400"
MultiSelect="true" OverClass="x-view-over" ItemSelector="div.thumb-wrap" EmptyText="No images to display">
<Template ID="Template2" runat="server">
<Html>
<tpl for=".">
<div class="thumb-wrap" id="{AuthorName}">
<div class="thumb"><img src="{ProfileImage}" title="{AuthorName}"></div>
<span class="x-editable">{Content} {PublishDate}</span>
<span class="x-editable">{FacebookDateTimeStyle}</span>
</div>
</tpl>
<div class="x-clear"></div>
</Html>
</Template>
</ext:DataView>
</Items>
</ext:Panel>
Last edited by Daniil; Dec 24, 2010 at 5:28 AM.
Reason: [CLOSED]