Arkivji ta 'Kull Xahar: Awissu 2007

MOSS customization tfittxija avvanzata — Każ ma materja fit-tfittxija XSLT avvanzata

I ma jimmodifikawx XSLT tfittxija avvanzata ħafna drabi, hekk jidher li huwa simili jien tixbit għoljiet żgħar kull darba.

Lezzjoni ġodda tiegħi huwa dan: Kawża kwistjonijiet meta referenzjar kolonna. Fit-tfittxija avvanzata tiegħi, Għandi kolonni definiti bħala dan:

<root xmlns:XSi="http://www.w3.org/2001/XMLSchema-instance">
<
Kolonni>
<
Kolonna Isem="GafTrainingInvoiceNumber" />
<
Kolonna Isem="GafTrainingInvoiceLocation" />
<
Kolonna Isem="WorkId"/>
<
Kolonna Isem="Rank"/>
<
Kolonna Isem="Titolu"/>
<
Kolonna Isem="Awtur"/>
<
Kolonna Isem="Daqs"/>
<
Kolonna Isem="Path"/>
<
Kolonna Isem="Deskrizzjoni"/>
<
Kolonna Isem="Ikteb"/>
<
Kolonna Isem="SiteName"/>
<
Kolonna Isem="CollapsingStatus"/>
<
Kolonna Isem="HitHighlightedSummary"/>
<
Kolonna Isem="HitHighlightedProperties"/>
<
Kolonna Isem="Contentclass"/>
<
Kolonna Isem="IsDocument"/>
<
Kolonna Isem="PictureThumbnailURL"/>
</
Kolonni>
</
root>

Il XLST li juri n-numru tal-fattura u l-post fattura kien:

<p>
Training Invoice Number: <XSL:il-valur tal- tagħżel="GafTrainingInvoiceNumber"/>
<
br></br>
Training Invoice Location: <XSL:il-valur tal- tagħżel="GafTrainingInvoiceLocation"/>
</
p>

Madankollu, il agħżel għandu referenza l-proprjetà kollha żgħira, kif fil-:

<p>
Training Invoice Number: <XSL:il-valur tal- tagħżel="gaftraininginvoicenumber"/>
<
br></br>
Training Invoice Location: <XSL:il-valur tal- tagħżel="gaftraininginvoicelocation"/>
</
p>


Until I corrected that, search results showed the labels (I.E. "Training Invoice Number") but no data.

MOSS: Eżempju funzjonali - Custom Data Tip

Xenarju Business:

Implimentazzjoni intrapriża wiesgħa ta 'MOSS għall-kumpanija tal-manifattura ma 30+ siti u ta 'dipartimenti ftit għexieren korporattiva.

Għan Business:

Minkejja numru kbir ta 'gruppi ta' negozju (dipartimenti, postijiet, eċċ), ċerta data għandha tinżamm fil-livell globali. Per eżempju, lista kaptan awtorevoli tal-postijiet kollha fiżiċi tal-kumpanija (e.g. faċilitajiet ta 'manifattura, warehouse locations, sales offices) should be maintained in a central location.

Technical Problem:

The enterprise taxonomy was implemented using multiple site collections. We would have liked to create the authoritative list of physical locations in a custom WSS list. Imbagħad, when we needed to have a column in a content type (or a column added to a list or doc library) that contained corporate locations, we would create a column using the "lookup" datatype and point to this master list.

Unfortunately, lookup datatypes must access a source list "locally" meaning that our authoritative list cannot span site collections.

Soluzzjoni teknika:

Implement a new custom data type implemented based on SPField and represented as a DropDownList in the UI whose ListItems populate from the master WSS list.

We created a new site collection called "http://localhost/EnterpriseData". There, we created a custom list named "Corporate Locations". This list just uses the standard "Title" field to contain the list of actual corporate locations.

One follows several discrete steps to create a custom data type in WSS. They are:

  1. Define a class which inherits from SPField (one may inherit from other fields if required).

Here is the code for that:

pubbliku klassi XYZZYCorporateLocationField : SPFieldText
{
pubbliku XYZZYCorporateLocationField
(SPFieldCollection oqsma, string typeName, string displayName)
: base(oqsma, typeName, displayName) { }

pubbliku XYZZYCorporateLocationField
(SPFieldCollection oqsma, string displayName)
: base(oqsma, displayName) { }

pubbliku override BaseFieldControl FieldRenderingControl
{
get
{
BaseFieldControl control = ġdid XYZZYCorporateLocationFieldControl();
control.FieldName = dan.InternalName;
ritorn control;
} //get
} // fieldrenderingcontrol

pubbliku override string GetValidatedString(object valur)
{
jekk (dan.Required || value.ToString().Ugwali(String.Empty))
{
tarmi ġdid SPFieldValidationException ("Department is not assigned.");
}
ritorn base.GetValidatedString(valur);
} // getvalidatedstring

} // XYZZYCorporateLocation

  1. Define another class that inherits from the base field control, kif fil-:

pubbliku klassi XYZZYCorporateLocationFieldControl : BaseFieldControl
{
protetti DropDownList XYZZYCorporateLocationSelector;

protetti override string DefaultTemplateName
{
get
{
ritorn "XYZZYCorporateLocationFieldControl";
}
} // DefaultTemplateName

pubbliku override object Valur
{
get
{
EnsureChildControls();
ritorn dan.XYZZYCorporateLocationSelector.SelectedValue;
} // get
stabbiliti
{
EnsureChildControls();
dan.XYZZYCorporateLocationSelector.SelectedValue = (string)dan.ItemFieldValue;
} // stabbiliti
} // override object Value

protetti override null CreateChildControls()
{

jekk (dan.Field == null || dan.ControlMode == SPControlMode.Display)
ritorn;

base.CreateChildControls();

dan.XYZZYCorporateLocationSelector =
(DropDownList)TemplateContainer.FindControl("XYZZYCorporateLocationSelector");

jekk (dan.XYZZYCorporateLocationSelector == null)
tarmi ġdid Eċċezzjoni("ERROR: Cannot load .ASCX file!");

jekk (!dan.Page.IsPostBack)
{

użu (SPSite site = ġdid SPSite("http://localhost/enterprisedata"))
{
użu (SPWeb web = site.OpenWeb())
{

SPList currentList = web.Lists["Corporate Locations"];

foreach (Bżiq XYZZYCorporateLocation fil currentList.Items)
{
jekk (XYZZYCorporateLocation["Title"] == null) continue;

string theTitle;
theTitle = XYZZYCorporateLocation["Title"].ToString();

dan.XYZZYCorporateLocationSelector.Items.Add
(ġdid ListItem(theTitle, theTitle));

} // foreach

} // using spweb web = site.openweb()
} // using spsite site = new spsite("http://localhost/enterprisedata")

} // if not a postback

} // CreateChildControls

} // XYZZYCorporateLocationFieldControl

The above code basically implements the logic for populating the DropDownList with values from the WSS custom list located at http://localhost/enterprisedata and named "Corporate Departments".

I defined both classes in a single .cs file, compiled it and put it into the GAC (strong required, tal-kors).

  1. Implement a control template (.ascx) kif muri:

<%@ Control Language="C#" Inherits="Microsoft.SharePoint.Portal.ServerAdmin.CreateSiteCollectionPanel1,Microsoft.SharePoint.Portal,Version=12.0.0.0,Culture=neutral,PublicKeyToken = 71e9bce111e9429c" compilationMode="Always" %>
<%
@ Reġistru Tagprefix="wssawc" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Verżjoni = 12.0.0.0, Kultura = newtrali, PublicKeyToken = 71e9bce111e9429c" %> <%@ Reġistru Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Verżjoni = 12.0.0.0, Kultura = newtrali, PublicKeyToken = 71e9bce111e9429c" %>
<SharePoint:RenderingTemplate ID="XYZZYCorporateLocationFieldControl" runat="server">
<Template>
<asp:DropDownList ID="XYZZYCorporateLocationSelector" runat="server" />
</Template>
</
SharePoint:RenderingTemplate>

The above is saved into c:\program files\common files\microsoft shared\web server extensions\12\controltemplates.

  1. Fl-aħħarnett, we create an XML file to save into the …..\12\XML directory. This is CAML that defines our custom data type and for my example, looks like this:

<?xml Verżjoni="1.0" encoding="UTF-8" ?>
<
FieldTypes>
<
FieldType>
<
Field Isem="TypeName">CorporateLocations</Field>
<
Field Isem="ParentType">Test</Field>
<
Field Isem="TypeDisplayName">Corporate Locations</Field>
<
Field Isem="TypeShortDescription">All XYZZY Corporate locations including manufacturing or other facilities.</Field>
<
Field Isem="UserCreatable">TRUE</Field>
<
Field Isem="ShowInListCreate">TRUE</Field>
<
Field Isem="ShowInDocumentLibraryCreate">TRUE</Field>
<
Field Isem="ShowInSurveyCreate">TRUE</Field>
<
Field Isem="ShowInColumnTemplateCreate">TRUE</Field>
<
Field Isem="FieldTypeClass">Conchango.XYZZYCorporateLocationField, XYZZYCorporateLocationField, Verżjoni = 1.0.0.0, Kultura = newtrali, PublicKeyToken=b0b19e85410990c4</Field>
<
RenderPattern Isem="DisplayPattern">
<
Switch>
<
Expr>
<
Kolonna />
</
Expr>

<Case Valur=""/>

<Default>
<
HTML>
<![CDATA[
<span style="color:Red"><b>]]>
</
HTML>

<
Kolonna SubColumnNumber="0" HTMLEncode="TRUE"/>

<HTML><![CDATA[</b></medda>]]></HTML>

</
Default>
</
Switch>

</
RenderPattern>
</
FieldType>
</
FieldTypes>
This XML file adds the custom data type to the WSS "library" and matches it up against the GAC’d assembly.

After moving all these bits into place, iisreset on the server and it should all start working nicely.

WSS: Teknika għall-ħolqien definizzjonijiet qasam CAML.

Kategorija addizzjonali: CAML

Hawnhekk is a great posting by a fellow named "craig" fuq teknika għall-konstatazzjoni definizzjonijiet CAML għal tipi kontenut għelieqi bbażat off definizzjonijiet ħajjin reali mill sit.

Tiegħu kollokament jgħid li kollha. Fil-qosor:

  1. Oħloq tip kontenut.
  2. Jassoċja ma 'lista.
  3. Iftaħ il-lista ma SharePoint Designer.
  4. Export to a "personal web package".
  5. Semmi għal. Kabina.
  6. Oħroġ il-manifest.
  7. Sib tip kontenut tiegħek u assoċjati CAML.

WSS: Sommarju passi biex jippermetti Features utli / elementi / eċċ. IntelliSense fi VS 2005

Kategoriji addizzjonali: Visual Studio 2005

Sabiex jippermettu IntelliSense utli għall Features, elementi, eċċ fl-istudjo viżwali 2005:

  1. Aċċess server WSS.
  2. Navigate to "c:\fajls programm files komuni Microsoft maqsuma estensjonijiet web server 12 TEMPLATE XML"
  3. Iftaħ ieħor twieqi Explorer tipponta lejn: "C:\Program Files Microsoft Visual Studio 8 xml schemos"
  4. Kopja tal-fajls li ġejjin mill-server WSS li VS tiegħek 2005 direttorju iskemi:
    1. Wss.xsd
    2. CamlQuery.xsd
    3. CamlView.xsd
    4. CoreDefintions.xsd
  5. Nerġgħu VS 2005
  6. Żid fajl XML ġdid għal proġett.
  7. Ikklikkja fil-ġisem tal-fajl XML.
  8. Fil-pane proprjetajiet, click on "Schemas" and pick "wss.xsd" mill-għażliet. (Mhuwiex meħtieġ li jintgħażlu oħra xsd tal peress li dawn huma referenzjati mill wss.xsd).

Intellisense issa hija ppermettiet għal dak id-dokument XML.

Ara hawn għal aktar informazzjoni dwar dan is-suġġett u għall-istruzzjonijiet dwar kif awtomatikament jassoċjaw IntelliSense WSS ma 'kwalunkwe fajl XML.

Eżami WSS 70-541, Microsoft Windows SharePoint Servizzi 3.0 – Applikazzjoni għall-Iżvilupp

I ħa u għadda mit-test imsemmi hawn fuq dalgħodu. I sabu l-eżami li jkun diffiċli u ġusti.

Hemm nuqqas relattiv ta 'informazzjoni dwar dan il-eżami fuq il-web. M'inix ċert għaliex.

I ovvjament mhux se tikseb fi kwalunkwe dettall dwar l-eżami I ħa, iżda naħseb I jistgħu b'sigurtà ngħid li ġej:

  1. Trust din ir-rabta: http://www.microsoft.com/learning/exams/70-541.mspx.

    Dan jelenka dak li għandek bżonn tkun taf biex jgħaddi l-eżami u huwa, IMO, preċiż ħafna.

  2. Ir-rabta jirrakkomanda wkoll Ġewwa Microsoft Windows SharePoint Servizzi 3.0 mill Ted Pattison & Daniel Larson. Dan il-ktieb ikopri kważi s-suġġetti kollha li t-test tindirizza. Sibt li huwa li jkun kbir u fih innifsu lil hinn prep eżami sempliċi. Hija tipprovdi eżempji kbira u verament ltqajna me ħsieb dwar xi affarijiet ġodda u interessanti biex jippruvaw. Jekk inti tixtieq li skip ftit bits fil-ktieb, biss cross-reference TOC-ktieb mal-punti fil-link minn fuq.
  3. Xejn taħbita attwali esperjenza prattika. Jekk ikollok ħin u l-interess, isegwu flimkien ma 'l-eżempji fil-ktieb u mbagħad esperiment magħhom. Int ser jkollhom żmien aktar faċli fuq l-eżami kif ukoll verament jitgħallmu programmazzjoni applikazzjoni WSS.

</aħħar>Abbona għall-blog tiegħi!

MOSS / InfoPath Formoli Server (InfoPath 2007) prestazzjoni lista drop-down

Kategorija addizzjonali: InfoPath

Sommarju: An InfoPath 2007 jiffurmaw mobilitati lejn server MOSS jipprovdi lista drop-down ta 'bejjiegħa marbut ma' lista MOSS custom. Malli tagħżel bejjiegħ, regoli tassenja valuri qasam għal numru żgħir ta 'oqsma test bħall-isem rep bejgħ, indirizz, belt, istat, zip u telefon. Prestazzjoni hija horrible. Aħna Avviż li qed isiru agħar prestazzjoni (b'mod mhux lineari) għal kull qasam ieħor aħna aġġornament b'dan il-mod. Jiġifieri, jekk aħna biss taġġorna l-isem rep bejgħ, li tieħu [x] ammont ta 'ħin. Jekk aħna aġġornament bejgħ rep, address1, address2, belt, istat, zip, li tieħu 10 darbiet itwal.

Soluzzjoni: Ikteb servizz web (kodiċi tal-kampjun tista 'tinstab hawn) li jiġi mgħoddi fl-isem ta 'bejjiegħ u dan jirritorna lura d-dettalji bejjiegħ. Imbagħad, tassenja l-oqsma b'dan il-mod. Għalkemm dan ukoll jidher bil-mod, ma kien hemm l-ebda differenza fil-prestazzjoni meta aħna assenjat 1 qasam versus 8 oqsma. Bħala bonus, users get a cool "contacting the server" Cylon effett waqt li jkunu jistennew il-formola jinvokaw u jikkunsmaw ir-riżultati tas-servizz.

MOSS: Eċċezzjoni seħħet. (Eċċezzjoni minn HRESULT: 0x80020009 (DISP_E_EXCEPTION))

UPDATE: Aħna qatt determinat l-kawża ewlenija ta 'din il-problema u qatt ma jerġa' wiċċ.

Aħna Avviż matul l-implimentazzjoni ta 'sit żvilupp li għarrieda, żewġ utenti ma jkollhomx aċċess għall ġabra sit. Dawk il-kontijiet jista 'jawtentika għall-sit prinċipali, iżda meta jippruvaw jiksbu aċċess għas ġabra sit partikolari, huma biss jiksbu Skrin vojt. Ebda żbalji murija, biss paġna vojta abjad.

Aħna login bħala admin ġbir sit u tipprova żżid wieħed minn dawk l-utenti bħala admin sit u dan iż-żmien, upon pressing "OK", irridu jiksbu dan il-messaġġ:

Eċċezzjoni seħħet. (Eċċezzjoni minn HRESULT: 0x80020009 (DISP_E_EXCEPTION))

Aħna qattgħu xi żmien riċerka dan u sfortunatament, ma toħroġ ma 'xi ħaġa utli. Kien hemm xi messaġġi fil-log dijanjostiku, iżda kien diffiċli li jikkorrelataw eżattament bl din il-kwistjoni.

Fl-aħħar, aħna tħassar il-ġbir sit u jerġa 'tinħoloq u li solvuti.

Jekk I ċifra barra dak ikkawżat dan fil-futur, I ser taġġorna din il-kariga.