Showing posts with label based. Show all posts
Showing posts with label based. Show all posts

Wednesday, March 28, 2012

Atlas, AJAX and InfoPath

I am working on the architecture of a new application based on Sharepoint Forms Libraries and InfoPath. There are several features of Atlas and AJAX that could be benificial in the contruction and interaction of these forms. So the promary question here is, Is there a way to use Atlas and AJAX in an Infopath form?

TIA

Infopath is a rich client, which basicly means that you can do a lot more in infopath than in a web browser. I'm not sure why would you want to use AJAX with infopath, and I highly doubt that you can use it in infopath.

Check out this website for more info on what you can do with infopath forms
http://www.infopathdev.com/


Also to add to that. Atlas can work on ASP.NET v1.1 (Which is what the current Sharepoint version runs on), however it is designed to work better with ASP.NET v2.0. Microsoft Office Sharepoint Server 2007 (MOSS 2007) will run off of ASP.NET v2.0. Also InfoPath won't just be a Client Application/Windows Application any longer... you will the ability to load the Forms created into a browser with most of the same features that would exist in InfoPath. However, MOSS 2007 and InfoPath 2007 won't be release till the end of this year and possible next year in coordination with Vista.

Good luck!

JoeWeb


Thank you for your prompt response. The reason for considering this scenario is primarily for the UpdatePanel and the Autofill objects. I was thinking that these could minimize network traffic. Also, thank you for the URL.

Harry


Thank you. I am anticipating on having SMS push .NET v2 to all of our client machines. The infopath forms will ba carrying v2 code behind and my thought was include AJAX for the data comunication for lists and lookups.

Just a thought.

Monday, March 26, 2012

Atlas UpdatePanel

I have several textboxes, a gridview and an image in a panel that need to be updated based upon info entered into a textbox. Everything works like a champ when I don't use the Atlas UpdatePanel, but I can't seem to figure out how to get even one section to work. Initially I had all 3 areas wrapped into the UpdatePanel and now I'm just trying to update some textboxes with info returned from the server. Neither one works. I tried the PostBackTrigger and AsynchPostBackTrigger. Can anyone tell me what I'm doing wrong?

<asp:UpdatePanel ID="up" runat="server" UpdateMode="Conditional" >
<ContentTemplate>

<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td style="width:125px" align="right" class="smalltext"><asp:Label ID="lblAccount" AssociatedControlID="txtAccount" runat="server">Account #: </asp:Label></td>
<td class="smalltext" style="width:175px">
<asp:TextBox ID="txtAccount" OnTextChanged="txtAccount_TextChanged" MaxLength="16" runat="server" CssClass="textbox"></asp:TextBox>
<img src="http://pics.10026.com/?src=Images/merge.gif" style="vertical-align:text-bottom" alt="Grab customer info from CSG" onclick="getCustomerInfo()" />

</td>
<td rowspan="2" style="width:70px">
<asp:Panel runat="server" ID="pnlPrevEntries">
<a href="http://links.10026.com/?link=javascript: void(0)" onclick="overlay('caution', 'PrevEntries', 'right')"><img src='Images/caution.png' id='caution' /></a>
</asp:Panel>
</td>
<td style="text-align:center" valign="top" class="smalltext">
<span id="Fullname"><%=Session("Fullname")%></span><span id="extension" style="display:none"><%=Session("extension") %></span><br /><%=Session("Role")%>
</td>
</tr>
<tr>
<td align="right" class="smalltext"><asp:Label ID="lblName" AssociatedControlID="txtName" runat="server">Name (Last, First): </asp:Label></td>
<td>
<asp:TextBox ID="txtName" MaxLength="100" runat="server" CssClass="textbox"></asp:TextBox><!--<input type="text" ID="txtName" MaxLength="100" Class="textbox">-->
<div id="customerInfo">
<asp:TextBox id="txtAddr1" runat="server"></asp:TextBox>
<asp:TextBox id="txtAddr2" runat="server"></asp:TextBox>
<asp:TextBox id="txtCity" runat="server"></asp:TextBox>
<asp:TextBox id="txtState" runat="server"></asp:TextBox>
<asp:TextBox id="txtZip" runat="server"></asp:TextBox>
<asp:TextBox id="txtPhone" runat="server"></asp:TextBox>
<asp:TextBox id="txtRetentionId" runat="server"></asp:TextBox>
<asp:TextBox ID="txtLobChanged" runat="server"></asp:TextBox>
<asp:TextBox ID="txtComments" runat="server"></asp:TextBox>
<asp:TextBox ID="txtPkgID" runat="server"></asp:TextBox>
<asp:TextBox ID="txtReasons" runat="server"></asp:TextBox>
<asp:TextBox ID="txtUncontrollable" runat="server"></asp:TextBox>
<asp:TextBox ID="txtTechProbs" runat="server"></asp:TextBox>
<asp:TextBox ID="txtComps" runat="server"></asp:TextBox>
</div>
</td>
</tr>
</table>
<!-- GridView for previous entries -->
<div id="PrevEntries">
<asp:GridView ID="grdPrevEntries" runat="server"
DataKeyNames="retentionId"
AutoGenerateColumns="False"
CssClass="smGridview"
GridLines="both"
CellPadding="3">
<Columns>
<asp:TemplateField >
<ItemTemplate>
<a href="http://links.10026.com/?link=http://forums.asp.net/AddPost.aspx?ForumID=1007#" id="<%# Eval("retentionId") %>" onclick="selectPrevEntry('<%# Eval("retentionId") %>')">SELECT</a>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="tDate" HeaderText="DATE" DataFormatString="{0:MM/dd/yy}" HtmlEncode="False" />
<asp:BoundField DataField="lob" HeaderText="LOB" />
<asp:BoundField DataField="subreq" HeaderText="SUBREQ" ControlStyle-CssClass="hidden" ItemStyle-CssClass="hidden" HeaderStyle-CssClass="hidden" FooterStyle-CssClass="hidden" />
<asp:BoundField DataField="reason" ControlStyle-CssClass="hidden" ItemStyle-CssClass="hidden" HeaderStyle-CssClass="hidden" FooterStyle-CssClass="hidden" />
<asp:BoundField DataField="inPkg" ControlStyle-CssClass="hidden" ItemStyle-CssClass="hidden" HeaderStyle-CssClass="hidden" FooterStyle-CssClass="hidden" />
<asp:BoundField DataField="outPkg" ControlStyle-CssClass="hidden" ItemStyle-CssClass="hidden" HeaderStyle-CssClass="hidden" FooterStyle-CssClass="hidden" />
<asp:BoundField DataField="offer" ControlStyle-CssClass="hidden" ItemStyle-CssClass="hidden" HeaderStyle-CssClass="hidden" FooterStyle-CssClass="hidden" />
<asp:BoundField DataField="comments" ControlStyle-CssClass="hidden" ItemStyle-CssClass="hidden" HeaderStyle-CssClass="hidden" FooterStyle-CssClass="hidden" />
</Columns>

</asp:GridView>
<p style="text-align:right; margin:20px 3px 3px 0"><a href="http://links.10026.com/?link="#" onclick="overlayclose('PrevEntries');return false"> CLOSE</a></p>
</div> </ContentTemplate>
<Triggers><asp:AsyncPostBackTrigger
<asp:PostBackTrigger ControlID="txtAccount" />

</Triggers>

</asp:UpdatePanel>
<asp:UpdateProgress runat="server" ID="prgPrevEntries">
<ProgressTemplate>
<img src="http://pics.10026.com/?src=Images/xsmloading.gif" alt="Loading" />
</ProgressTemplate>
</asp:UpdateProgress>


One simple thing I can see is that you don't need the triggers since the textbox that's firing the event is actually in the UpdatePanel (you don't need the triggers section at all... triggers are used mainly to handle situations where you want an external control's postback to cause Ajax Postbacks.

Use of javascript is sometimes something to worry about (but usually things fail with javascript that is simply written to the form to execute inline (and not attached to an event)... I don't see anything like that, so my guess is the triggers section.


BTW, you do have a ScriptManager on the form, right? That's the most common error... ScriptManager with EnablePartialRendering="true" it should look like this

<asp:ScriptManager id="sm1" runat="server" EnablePartialRendering="true" />

Jay Kimble
-- The Dev Theologian
-- http://codebetter.com/blogs/jay.kimble/