Thursday, January 31, 2008

Xslt creation complete

One step closer. The xslt-creating part is now over, a successful copy of the xslt created by sharepoint designer for this particular datasource/list is now complete. To make it dynamic though alot of work is left, but so far this is how it looks when using the web service creating the web part:

The following features are complete:

  • The custom web service deployed on the sharepoint server, using code deployed in the GAC

  • The service executes an aspx page containing the DataFormWebPart, all code is created in the code-behind for the aspx-page residing in an assembly in the GAC.

  • The DataFormWebPart is created in the code-behind, making it very easy to dynamically changing the caml-query used in the datasource

  • The xslt-code is all generated from XmlWriter, making it very easy to change any aspect to the transformation. For example adding fields or changing the formatting of the columns

  • Forms authentication is used on the sharepoint server, so that extranet user can use it



Next weeks mission is to create menu-controls, using as much functionality as possible from sharepoints. All links thats present in the menu has to receive javascript popups instead of the original forms, because postbacks are evil and will break everything. The question is how the forms in the popups will be created, because they must be very customizable and adaptive regarding to what list's showing.

Questions!

Argh, Microsoft sucks on documenting their API. Why even have one if its not documented..
Currently I'm trying to figure out how to configure a webcontrol.NewMenu. Possibly i have to create controls of my own. Something like this

Writing xslt

In the current stage of development for my project I'm trying to use the DataFormWebPart used by SharePoint Designer. To configure the web part some input parameters is going to construct the web part according to what the used needs. My goal is to make it very functional, being able to use any datasource while providing some nice filtering and sorting according to more inputs.
An example for an input could be the following:
<datasource>
<protocol>SPList</protocol>
<Name>ListName</name>
<Field>Title, Status, PercentComplete, Priority</Field>
<Order Name="PercentComplete" Ascending="False" >
</datasource>
<Formatting>
<Width>40%</Width>
<Menu>True</Menu>
</Formatting>



And returned from the web service is a well formated list, spanning 40% of the parent-container, with a menu used for CRUD actions. The CRUD is not implemented so far.

That is my vision.

Currently im working with the XmlWriter, used for producing a xsl used for the transformation in the DataFormWebPart.

A minor problem atm is that writer.writeString is creating html-text from htlm, for example "<" becomes & l t ; but without whitespace between.

---------
Edit: problem almost solved, used WriteRaw instead, but this way formatting is screwed.

Wednesday, January 30, 2008

First post

Cool, I've finally realized a blog would fit my project, because the solitude is killing me, I need to think more about what I'm doing regarding my programming.