Txheej txheem cej luam:
(HLOOV TSHIAB 12/04/07: Ntxiv ib qho chaw nthuav linking rau lwm cov blog uas no ntawm cov qhov Web site nthuav heev kawg)
No nkag teb chaws blog piav li cas los ua tau ib lub teeb bar hauv SharePoint. No xwb nyob rau hauv WSS thiab NTXHUAB tej kev kawm thaum uas nws tsuas nyob li tej ntaub ntawv saib web ib sab.
Lub zuag qhia tag nrho mus kom ze yog raws li nram no:
- Tsim ib daim ntawv los yog qiv ntaub ntawv uas muaj cov ntaub ntawv koj xav teeb.
- Qhov chaw lub tsev qiv ntawv hauv kab ntawv / kev cai sau mus rau ib sab thiab hloov kom muaj tej ntaub ntawv saib Web site qhov (DVWP).
- Hloov cov DVWP XSL Meskas HTML uas pom tias yog raws li ib lub teeb.
Lag luam Scenario / Teeb:
Kuv tau tsim ib daim ntawv teev kev cai uas muaj qhov Title txheem kem thiab qhia kiag ib tug ntxiv, "Leej twg". Cov qauv no (simplistically heev) ib qho "tso rau nqi" scenario nruab nrab qhov twg lub npe yog peb tes num thiab cov txheej xwm muaj nqis los ntawm cov:
- Npaj siab
- Nyob rau hauv cov txheej txheem
- Stalled
Lub hom phiaj yog tsim kom muaj kev sib tham sib kab rov tav bar teeb uas muaj cov lis dej num uas tsis yog leej twg.
Kuv muaj populated lub npe thiab nws zoo li no:
Ua kom muaj tej ntaub ntawv saib Web site qhov:
Tsim tau lub DVWP los muab cov kev cai teev rau ib sab (qhov chaw nyob sab hauv kuv tsev neeg) thiab ua raws li cov lus qhia ntawm no (http://paulgalvin.spaces.live.com/blog/cns!1CC1EDB3DAA9B8AA!395.entry).
Ntxiv rau qhov tsuas tsim lub DVWP, Peb kuj yuav teev cov cuab yeej paging qhia tag nrho cov muaj natwm. Rau kuv, qhov no zoo li tej yam zoo li no:
Thaum no tus taw tes, Kuv ib txwm nyob SPD thiab qhov browser. Kuv mam li rov qhib rau sab siv qhov browser. Qhov no txhob ntawd mucking txog cov Web site qhov layout nyob rau sab.
Hloov cov XSLT:
Tam sim no lub sij hawm los hloov tus XSLT.
Kuv siv siv qhov muag saib lub studio rau qhov no. (Saib ntawm no kev ceeb toom tseem ceeb txog tus intellisense uas yuav pab tau koj heev).
Kuv tsim ib qhov project khoob ntxiv plaub ntaub ntawv tshiab (hloov lo lus "tseem cia nrog" thiab "New" tsim nyog li):
- Original.xslt
- New.xslt
- Yuavtsum Params.xml
- Params.xml tshiab
Hauv kuv tsev neeg, nws zoo li no:
Hloov hauv cov qhov web thiab luam cov params thiab cov XSL los tseem cia "nrog" Version hauv Studio nrig txog kev pom.
Lub hom phiaj ntawm no yog ua mob rau lub XSL txia qhov txheeb xyuas tau peb mus rov qab los rau cov lus nug DVWP HTML renders li ib lub teeb.
Rau qhov tus kawg, yuav xub xyuas seb cov HTML yuav zoo ua ntej peb ntxov siab insanity uas yog hu ua "XSL". (Yuav tsis ntshiab, cov nram no yog ib tsab ib qho piv txwv; tsis txhob ntaus los yog daim ntawv/muab tshuaj rau studio siv qhov muag saib. Kuv muab ib daim ntawv qhia txog tshuab pib taw tes rau qhov uas rau lub write-up). Cov qauv teeb nram qab no mas nws as per cov HTML tam sim no:
Coj HTML:
<html> <lub cev> <chaw> <table dav = 80%> <tr><Td><chaw>Horizontal Bar teeb</Td></tr> <tr> <Td dlhos = "center"> <rooj ciam teb = "1" dav = 80%> <tr> <Td dav = 10%>Qhib</Td> <Td><rooj cellpadding ="0" cellspacing ="0" ciam teb = 0 dav = 50%><tr bgcolor = liab><Td> </Td></tr></cov lus></Td> </tr> <tr> <Td dav = 10%>Kaw</Td> <Td><rooj cellpadding ="0" cellspacing ="0" ciam teb = 0 dav = 25%><tr bgcolor = liab><Td> </Td></tr></cov lus></Td> </tr> <tr> <Td dav = 10%>Stalled</Td> <Td><rooj cellpadding ="0" cellspacing ="0" ciam teb = 0 dav = 25%><tr bgcolor = liab><Td> </Td></tr></cov lus></Td> </tr> </cov lus> </Td> </tr> </cov lus> </lub cev> </html> |
Kuv siv ib tug tuag yooj yim mus kom ze rau txoj kev Kuv tuav kom tau teem xim tom qab ntawm kom "liab".
Tus take-away no yog qhov no: Thaum kawg, txhua yam peb ua yog tsim HTML natwm thiab txhua.
XSLT Template:
Kuv twb tau theej rau XSLT generates tus kab rov tav bar teeb. Nws tseem zoo haum commented ces kuv yuav tsis ntxiv npaum li cas ntawm no tsuas yog cov sau ntawv:
- Kuv pib nrog lub neej ntawd XSL SharePoint Designer muab kuv thaum uas kuv xub tsim cov DVWP.
- Kuv twb tau txiav no los ntawm tus SPD 657 kab rau 166 kab.
- Kuv ho tsis mess nrog rau cov ntaub ntawv tsis XML (Nws yog ib qho ntawm cov XSL thiab koj mam li paub tias kuv txhais li cas thaum koj mus hloov lub DVWP xwb; muaj cov ntaub ntawv ob tug uas koj yuav tau hloov). Txawm li cas los, yuav kom piv rau nws, Kuv puas tau tshem yuav luag tag nrho rau ntawm tus XSL. Qhov no txhais tau tias yog koj xav siv cov tsis, koj nyuam qhuav tau ntxiv rau lawv kuj tsis paub meej txhais cov ntsiab lus rov qab rau lub XSL. Uas yuav yooj yim vim tias koj yuav ua tau tus thawj XSL kuj tsis paub meej txhais cov ntsiab lus nyob hauv koj qhov project studio siv qhov muag saib.
- Koj mam mus yuav tau luam thiab no paste rau hauv koj qhov project studio siv qhov muag saib. Ces, tshem kuv hu thiab ntxig rau koj tus kheej hu rau "ShowBar".
- Laum rau nram tej hauj lwm tsim ib <ib tug href> li no: http://server/List?FilterField1=fieldname&FilterValue1=actualFilterValue. Txheej txheem no tej zaum yuav nqi rau lwm contexts. Thaum xub thawj, Kuv xav tias kuv yuav tau yoog mus rau ib hom ntawv ntau: http://server/List/AllItems.aspx?View={guid}&FilterField1=blah&FilterValue1=blah, tab sis, nyob hauv kuv ib puag ncig uas yog tsis tsim nyog. Daim ntawv sau URL kis rau peb ntawm SharePoint ces yog qhov no yooj yim heev rau generalize.
Nws tseem nyob ntawm no:
<xsl:stylesheet Version="1.0" exclude-no-ua kawg="Reye z o s ddwrt dt msxsl" |
Soj ntsuam:
XSL cov saum toj ntawm no generates no cov teeb:
Tho tau mus ua cov ntaub ntawv uas lwm los txhaj rau cov kev cai raws li txoj cai:
Concluding xav:
Ua qhov no ua Generalized?
Kuv nyiam no cov tswvyim graphing, tab sis, kuv ntxub cov Disease fact uas kuv yuav tsum mus ua heev tes-coding. Thiab kuv twb tau qhia me ntsis xav mus seb nws yuav tsum generalized kuv optimistic, tab sis kuv kuj hais tias yuav muaj cib ntsa qhov chaw raws li txoj kev uas yuav tsis muaj ib yam hauj lwm-nyob ib ncig ntawm fearful me ntsis. Yog leej twg muaj ib co tswv yim zoo rau hauv no, thov koj ua ib cov lus los yog email rau kuv.
Nstuas ntsug:
Qhov no nws yog ib tug kab rov tav bar teeb. Yeej tau los ua ib ntsug teeb. Yog peb yuav hloov cov HTML. Kuv yuav pib tau ib yam nkaus: Ua kom muaj ib tug sawv cev HTML rau ib ntsug bar teeb thiab mam li xyuas seb tau li cas tias ntawm XSL. Yog leej twg xav tias, Kuv yuav tsum tau persuaded sim kom paub thiab ua tau hauj lwm ua tus kinks. Yog hais tias ib tug neeg muaj twb ua tas lawm, please let me know and I’ll gladly link to your blog 🙂
Kuv xav tias kev sib tw nrog ib ntsug kev teeb yog tias tus ntawv rau lub teeb yuav tsis yooj yim uas tswj tus, tiam sis yeej ua tsis yeej.
Teb lub npe Gotcha tus:
Muaj ntau yam uas tsawg kawg yog ob tug mus nrhiav kom paub cov npe teb.
Ua ntej, Vaj teb nrog rau ib qhov chaw muaj los yuav dim hauv hauv lub XSL. Qhov no tej zaum yuav yog ib qhov teeb meem no:
<xsl:kuj sib txawv thiab lub npe="totalProposed"
xaiv="suav(/dsQueryResponse/natwm/leej[normalize-chaw(@Status) = 'Qhov'])" />
Yog rau koj "lawv" Kem no yeej hu ua "raws li txoj cai Code" ces koj yuav tau reference li "Status_x0020_Code":
<xsl:kuj sib txawv thiab lub npe="totalProposed"
xaiv="suav(/dsQueryResponse/natwm/leej[normalize-chaw(@Status_x0020_Code) = 'Qhov'])" />Thib ob, thiab kuv fuzzy me ntsis ntawm no, koj kuj yuav tsum muab khaws cia rau hauv alert rau teb lub npe hloov. Yog koj teb "raws li txoj cai Code npe koj" thiab tom qab ces nyob, rename los "Leej twg AFE", cov "lub npe" tsis hloov. Lub npe nrog nws tseem yuav "raws li txoj cai Code" thiab yuav tsum tau hais los ua "Status_x0020_Code". Qhov "lwm yam kev pab" kev mus yuav pab tshawb nrhiav thiab kho qhov teeb meem no seb.
Hais txog ntawd xim:
Kuv khaws cov "liab" vim nws yog pleasing rau kuv rau lub caij. Nws yuav tsis tau ib big deal qhia txawv xim sij muab ntau tshaj yog kev piav qhia txog ib tug xov tooj, tab sis, kuj muaj ib pab KPI. Piv txwv, Yog hais tias qhov feem pua ntawm cov "stalled" Yog tus AFE > 10% mam li pom nws liab liab, txwv tsis pub ua hauv dub. Siv <xsl:xaiv> yuav ua kom tiav no.
Lwm yam kev pab:
- Seb lub npe nrog (thiab lwm tus zoo info) rau cov ntaub ntawv nyob rau hauv ib daim ntawv teev: http://paulgalvin.spaces.live.com/blog/cns!1CC1EDB3DAA9B8AA!134.entry
- Qhia tag nrho cov ntaub ntawv los ntawm SharePoint (cov nqaij nyoos XML): http://paulgalvin.spaces.live.com/blog/cns!1CC1EDB3DAA9B8AA!190.entry
- Tau XPATH qhia txog ib tug ncej tag ib: http://paulgalvin.spaces.live.com/blog/cns!1CC1EDB3DAA9B8AA!155.entry
- Lwm mus kom ze siv OWA(?). Kuv muaj tsis khawb rau nws, tab sis tig pheej, tshwj xeeb tshaj yog rau cov ncuav qab zib kab kos: http://www.waka.dk/Blog/PermaLink,guid,e2532e71-d774-4ac9-8f25-883964b830f4.aspx
Zoo siab transforming!
<kawg />
Yuav luag nplooj ntawv no ua tiav cov hauj lwm uas kuv twb nrhiav tau rau.
Kuv muaj ib pab uas xav kom siv SharePoint daim ntawv ntsuam xyuas daim ntawv tsim tau ib cov nyiaj poll. Tus catch? Lawv tsis xav pom cov code… Los sis hloov lawv txhua zaus lawv xa cov poll (los rau ib cov hloov tshiab txhua lub limtiam).
Kuv twb tau txuas nov mus ntsuam xyuas daim ntawv thiab ua tau ib lub teeb nyob rau sab teb thawj zaug. Kuv tsis tau toov li cas ho yog lub qhov tseem ceeb thiab cov ntawv uas cov menyuam yuav tsum mus rau pem suab. Ua kom raws li loj tuaj lawm lawv yuav muaj los teb muaj nyob txhua lub limtiam.
Kuv yuav ua rau koj sim lwm qhov ntawm rooj plaub, tab sis leej twg pom muaj ib txoj kev los tsim natwm thiab cov ntawv raws li off of coob muaj kev xaiv thiab dynamically teev tej no es ib coding tus expected yaam tseem ceeb nuav?
Tsaug Paul. Yuav pab tau heev. Tsaug rau koj qhov chaw ua hauj lwm, Kuv twb tau mus ntxiv rau lub teeb bar sab rau tus uas twb muaj lawm DVWP (e.g. kev paub tab) muaj ib txhia cov kab ntawm koj cov cai yooj yim heev.
Nyob rau hauv SharePoint Designer, Kuv tso ib tug saib cov ntaub ntawv uas muaj qhov Title thiab % sau kom tiav txhua ntawm ib daim ntawv teev neeg ua hauj lwm. Muab tus cursor ib lub hlwb thiab txoj nyem. Kuv xaiv ntxig ib sab mus rau sab xis. Nyob hauv txoj kev pom, Kuv pom cov <Td> thiab hloov cov <xsl:ntawv caij hauv lub cell nrog rau koj qhov chaws:
<rooj cellpadding ="0" cellspacing ="0" ciam teb ="0"
dav = "{kab(@PercentComplete * 100)+1}%">
<tr style = "tom qab-xim:liab">
<xsl:ntawv lov tes taw-zis-escaping = "muaj"><![CDATA[ ]]></xsl:ntawv nyeem>
</tr>
</cov lus>
Nco kuv hloov txoj kab xim chaws ntawm bgcolor = "liab" rau cov style = "tom qab-xim:liab"
Kuj, yog ib qhov txhua tus nyob hauv kuv daim ntawv xaiv tau (@PercentComplete) theej "$BarPercent"
Greg
Lwm txoj kev (siv xwb tus SharePoint UI):
http://pathtosharepoint.wordpress.com/2008/09/02/a-progress-bar-for-your-tasks-list/
http://pathtosharepoint.wordpress.com/2008/10/21/progress-bar-color-coding/
xmlns:__designer =http://schemas.microsoft.com/WebParts/v2/DataView/designer xmlns:asp ="http://schemas.microsoft.com/ASPNET/20">
xaiv = "suav(/dsQueryResponse/natwm/leej[normalize-chaw(@Status)= 'WIP'])" />
http://www.microsoft.com/sharepoint/downloads/components/detail.asp?a1=701Ian Morrish muab lo no hauv ntuj 2006. Kuv sim NTXHUAB 2007 thiab nws zoo xwb. Ntxiv rau qhov GAC, yuav tsum tau execadmsvcjobs thiab iisreset…
Yawm ncej, tsaug!
Yawm ncej, tsaug!
Kuv tuaj los pov!
Cov hauj lwm zoo! I also had something like this in my mind to view SharePoint lists in a graphical way 😉
I have a ‘Using Dashboards in SharePoint’ lus nug. We are a military hospital using MOSS standard for our Intranet and would like to build a dashboard for our Command Group to see ‘real time’ yog ua tau. Yog ib lub ntsiab lus tseem ceeb yog saib lub real-time no workload nyob rau hauv lub chaw tu koj thiab cia saib nws hloov li down (tej zaum yuav tau mus nyem qhov “ua tshiab”/F5).
Ua tsaug ua ntej,
Koj yuav tau ua tej yam uas muaj jQuery yuav ua kom tiav cov nyhuv no pab tau. Email rau kuv galvin.Paul@gmail.com thiab kuv yuav zoo siab mus sim thiab muab ib txhais tes ua.