Hli Archives: Tej zaum 2011

PerformancePoint thiab yuam kev 33494

Ib tus neeg tau kuv hu ua hnub no thaum twg PerformancePoint ib puag ncig (nyob rau hauv SharePoint 2010) dam lawm.  Yog ib qhov app servers nyob hauv lub teb twb khiav tsawg ntawm qhov chaw disk.  Hos thaum hais tias, cov neeg uninstalled "ntau heev" thiab cov PP khoom txhua tsis tau hauj lwm.  Ntau qhov chaw hauv web yuav qhia "ib qho yuam kev lawm npaj txhij txog neeg. Yuam kev 33494. In thiaj li txhawb ntxiv tau raug tso rau koj cov neeg khiav dej num":

image

Ntsia cov yuam kev thiab tsis paub dab tsi hais rau "yuam kev 33494" tiam sis no MSDN forums xo yog yuav pab tau: http://social.technet.microsoft.com/forums/en-us/sharepoint2010setup/thread/E1FE189D-7F89-455D-A98B-C1A12D8626AB

Kuv nyob ADOMD.NET nov li ib tivthaiv rau hauv tus neeg rau zaub mov SQL 2008 Feature pob: http://www.microsoft.com/downloads/en/details.aspx?FamilyId=228DE03F-3B5A-428A-923F-58A033D316E1&displaylang=en

image

(nyem qhov ntug)

Download tau thiab ntsia ntawd thiab nws tas txhua yam.

Kuv xav tias qhov no yog ib yam zoo nkauj oddball kev yuam kev, tab sis, yog hais tias koj yuav tsoo nws, koj tsawg kawg yog koj muaj ib qho kev xaiv.

</kawg>

Subscribe rau kuv blog.

Raws li kuv nyob Twitter tom http://www.twitter.com/pagalvin

Lists.asmx, GetListItems thiab Folders

Kuv tau ua tej kev soj ntsuam rau ib tug neeg niaj hnub ncig lub list.asmx Web site pab muaj li ntawm SharePoint 2010 (thiab ua ntej lawm).  Nws tau txais cov ntawv teev khoom ntawm lub hauv paus sis (xws li lub npe ntawm sub-folders), tab sis, tsis tau txais cov khoom nyob rau hauv sub-folders.  Kuv puas tau ib co saib ib ncig ntawm lub internets, thiab nws yog ib qho kuj ceeb tias lo lus nug.  Tsis tau, Kuv tsis tau muab lus teb rau lo lus nug yooj yim zoo, "yog hais tias kuv paub lub ceev, cas kuv yuav tau txais cov khoom nyob rau hauv daim nplaub tshev?”  Yuav tsis ncaj ncees, Kuv ho tsis sim ib tag li vim kuv yeej xav kom daim duab no ib qho tawm ntawm kuv tus kheej ib pliag Luag nyav.

Teeb no, Kuv tsim ib qhov chaw uas hu ua "Blogging Scenarios" thiab cov kev cai sau npe hu ua "Kev cai sau nrog Sub Folders".  Kuv ces zoo folders muaj npe:

  • Xyoo 2005
  • Xyoo 2006
  • Xyoo 2007

Kuv tov ob peb yam khoom rau hauv daim nplaub tshev "xyoo 2006".  Qhov no yog qhov uas nws zoo li:

image

Tab sis kuv cov phooj ywg tsis yog sau ntawv C# code, theej siv Java, vim li ntawd hauv lub hnab ntawv uas tsis yog tshuaj ntxuav tes muaj li nws yeej tau.  Tau tias, Sau tau me ntsis txog cov jQuery thiab ces muab fiddler los mus sib tham HTTP txhua lub sij.

Nov yog yam hais txog cov jQuery (Tau kuv theej lub chaws los hauv qab no yog koj xav luam los muab tshuaj):

image

Lawv thawj qhov tseem ceeb yog kom muaj ob lub <queryOptions> thiab <QueryOptions> ntawm.  Tus yuam sij thib ob uas yog tus <Ceev> ntawm no ib URL uas tus neeg muaj ntaub.

Tej zaum yuav muaj lwm txoj kev kom tau no, tab sis qhov haujlwm zoo rau kuv thaum uas siv cov jQuery.

Nov yog lub hnab ntawv tshuaj ntxuav tes mus rau saum:

<soapenv:Hnab ntawv xmlns:soapenv =’http://schemas.xmlsoap.org/soap/envelope/’>                
  <soapenv:Lub cev>
    <GetListItems xmlns =’
http://schemas.Microsoft.com/sharepoint/soap/’>
      <listName>Kev cai sau nrog Sub Folders</listName>
      <viewFields>  
        <ViewFields>
          <FieldRef Name ='Title’ />
          <FieldRef Name ='EncodedAbsUrl’ />
        </ViewFields>
      </viewFields>
      <queryOptions>
        <QueryOptions>
          <Ceev>
http://demoserver1/Blogging Scenarios/npe/nchuav sau nrog Sub Folders los lub xyoo 2006</Ceev>
        </QueryOptions>
      </queryOptions>
   
</GetListItems>
  </soapenv:Lub cev>
</soapenv:Hnab ntawv>

Ntau cov lus piv ntxwv thiab kev sib sab laj nyob ib ncig ntawm no coj kuv ntseeg tias txhua yam kuv xav tau <QueryOptions> thiab hais kom meej nplaub tshev npe.  Rau kuv, Kuv xav kom neb ob leeg qhwv nws sab hauv <queryOptions> li zoo li qhia kom meej URL mas tsim nyog rau cov <Ceev> ntawm.

Ntawm no yog cov jQuery AJAX teeb:

$(daim ntawv).npaj txhij(muaj nuj nqi() {
       Var soapEnv =
           "<soapenv:Hnab ntawv xmlns:soapenv =’http://schemas.xmlsoap.org/soap/envelope/’> \
               <soapenv:Lub cev> \
                    <GetListItems xmlns =’http://schemas.Microsoft.com/sharepoint/soap/’> \
                       <listName>Kev cai sau nrog Sub Folders</listName> \
                       <viewFields> \
                           <ViewFields> \
                              <FieldRef Name ='Title’ /> \
                              <FieldRef Name ='EncodedAbsUrl’ /> \
                          </ViewFields> \
                       </viewFields> \
                       <queryOptions> \
                         <QueryOptions> \
                           <Ceev>http://demoserver1/Blogging Scenarios/npe/nchuav sau nrog Sub Folders los lub xyoo 2006</Ceev> \
                         </QueryOptions> \
                       </queryOptions> \
                   </GetListItems> \
               </soapenv:Lub cev> \
           </soapenv:Hnab ntawv>";

</kawg>

Subscribe rau kuv blog.

Raws li kuv nyob Twitter tom http://www.twitter.com/pagalvin

Lists.asmx, GetList thiab "tus nqi tsis raug null”

Kuv sab hnub uas cov GetList() txoj kev ua lists.asmx cov qhov Web site yog hu ua tib zoo heev lawm los sis yog nws muab pov ib mysterious kos "Tus nqi tsis tau thov" (thiab cov piv txwv uas yog tias koj tau txais yav tas los tseem heev tshaj generic yuam kev hais, "Kos yam ' Microsoft.SharePoint.SoapServer.SoapServerException’ ces muab pov twb tseg.")  Yeej, Kuv pom tias koj muab tsis tau prefix txhua yam nyob rau hauv cov txujci GetList.  Cov nram qab no jQuery snippet illustrates tus taw tes:

image

Yog hais tias ua li, qhov kev pab cov qhov web teb nrog "Tus nqi tsis tau thov" as per qhov no fiddler-yog muab HTTP transcript:

<?xml version = "1.0 Tub ntxhais" encoding = "utf-8"?>
  <xab npum:Hnab ntawv
     xmlns:xab npum ="
http://schemas.xmlsoap.org/soap/envelope/"    
     xmlns:xsi = "
http://www.w3.org/ 2001/XMLSchema-lom
     xmlns:xsd ="
http://www.w3.org/ 2001/XMLSchema">

  <xab npum:Lub cev>
    <xab npum:Txhaum>
      <faultcode>xab npum:Neeg rau zaub mov</faultcode>
      <faultstring>
        Kos yam ' Microsoft.SharePoint.SoapServer.SoapServerException’ ntawd ces muab pov tseg.
      </faultstring>
      <nthuav dav>
        <errorstring xmlns ="
http://schemas.Microsoft.com/sharepoint/soap/">
Tus nqi tsis tau thov.
        </errorstring>
      </nthuav dav>
    </xab npum:Txhaum>
  </xab npum:Lub cev>
</xab npum:Hnab ntawv>

tau mas, koj ntshe tsis ntxiv ntawd cov prefix "s0" ntawm tus kheej, tiam sis yog nws ua ib co cuab yeej (zoo li cov dab noj hnub).

Qhov no yog tag yim ruam tag / frustrating vim hais tias muaj lwm txoj kev tso ua kawg.  Piv txwv, lub GetListCollection txoj kev tsis mloog yog hais tias nws yog raug prefixed, Txawm tias yog muaj dev paus ua kawg xws li "xyzzy":

image

Qhov no "tus nqi tsis tau thov" rau nkawd MBDD ntau nrog lists.asmx hopefully li no yuav pab lwm tus neeg paub yav.

</kawg>

Subscribe rau kuv blog.

Raws li kuv nyob Twitter tom http://www.twitter.com/pagalvin

Endlessly Nesting <div> Ntawv cim npe thiab jQuery

Qhov no xws li tej tus oddball npe nkawd, Kuv tsis paub hais tias nws yog yeej muaj nqis blogging txog, tab sis cov uas ib txwm tsis lawm ua ntej kuv, yog li no peb yuav mus Luag nyav

Kuv tabtom haujlwm rau ib qhov project uas kuv tabtom rub tau tej ntaub ntawv los ntawm ib tug mus nrhiav, packaging nws rau hauv ib cov lus XML thiab ces tus XML yog kawg transformed rau HTML ntawm XSLT.  Muaj coob heev jQuery muab kev koom tes, ib ntsis uas implements tej cov tabbing functionality.  Thaum twg koj nyem rau ntawm ib tug tab (tiag tiag, ib tug <div>), jQuery invokes .hide() thiab .show() nyob rau ntau yam divs (cov nplooj pib load downloads cov ntsiab lus txhua yam thiaj li muaj muaj tsis muaj postbacks qhov no).

Ib Rev teev dhau los, tus tab switching logic pib coj erratically thiab nws tsis qhia ib qho kuv tabs.  Kuv kawg tracked nws mus txog ntawd qhov internet explorer (tsawg) xav hais tias tus <div> cim npe nested deb deb, deb ntxaum dua intended.Tus tsim tawm toolbar yuav qhia:

-<div daim id = "Tab1Content">
  -<div>
    -<div>
      -<div daim id = "Tab2Content">
        -<div>
           …………………………
                   </div>  <— kaw thaum kawg uas qhia nws tag kev cia rau no!

Li ntawd, Yog hais tias kuv ua ib $("#Tab1Content").nkaum(), Kuv kuj xav nraim Tab2 thiab kuv yuav tsis pom Tab2 yog hais tias kuv tsis tau qhia Tab1.  Tau theej thiab Document lub chaws rau studio siv qhov muag saib thiab nws yuav tsom hauv ob sab qhov div phlu tuaj tag nrho nicely, li lawv thiab yuav tau ua, saib zoo li no:

-<div daim id = "Tab1Content">
  +<div>
  +<div>
-<div daim id = "Tab2Content">
  +<div>
  +<div>

Tuav kuv lub taub hau tiv thaiv phab ntsa ib pliag thiab pom tau tias nyob hauv lub txoos HTML code tau generating empty heev <div> cim npe, zoo li:

<lub cev>

  <div daim id = "Tab1Content">

    <div daim id = "row1" />
    <div daim id = "row2" />

  </div>

  <div daim id = "Tab2Content">

    <div daim id = "row1" />
    <div daim id = "row2" />

  </div>

</lub cev>

(Cov saum no yog waaaaaaaaaaaay oversimplified.  Qhov khoob div cim ua npe yog siv tau lig. Qee yam ntawm kuv <div> cim npe tau tag nrho cov ntsiab lus, tab sis coob tshaj ntawd twb tsis tau.  Kuv tuaj hauv realization uas kuv <xsl:rau-ib> kev tswj tau emitting lub luv-daim ntawv div tags thaum twg tus xsl:rau-ib tsis ' nrhiav tej ntaub ntawv no.  Kuv yuam ua qhov HTML saib mus rau hauv lub qhov zis, li:

image

 

Tom qab kuv puas tau tias, tag nrho cov div lub lined nicely thiab kuv tab switching pib ua hauj lwm.

Li ib txwm, Kuv vam tias qhov no yuav pab lwm tus neeg nyob hauv lub pinch.

</kawg>

Subscribe rau kuv blog.

Raws li kuv nyob Twitter tom http://www.twitter.com/pagalvin

Quick Fix: "Lub npe qha hom lub$ Resources:ReportServerResources … tsis xyaw … cov cim tshwj xeeb”

Kuv twb tau yos ib co tu tuaj ib SharePoint 2010 kawm ntawv thiab yog ib qhov teeb meem txog tu tej koom ib corrupt / incorrectly ntsia SQL neeg rau zaub mov daim ntawv qhia txog cov kev pab no.  Qhov no sawv thaum ib tus kuv lug txhawb cov miv sim kom tseg tau ib qhov chaw li ib template thiab ces tsim tsim tau ib qhov chaw tshiab raws li ntawd template.  Txuag tau rau lub lag luam ua haujlwm fine, tab sis, thaum twg nws sim ua kom muaj qhov chaw tshiab, SharePoint tso tawm kom pom kev ua yuam kev hais nram qab no:

Yuam kev

Cov hom kawm ntawd npe ' $Resources:ReportServerResources,DataSourceContentTypeName;' tsis muaj: \ / : * ? “ # % < > { } | ~ & , dua ob tug sib law liag (..), los yog kev cim tshwj xeeb xws li ib tug tab.

Ntawm no yog ib qho screen CAP ib tug:

 

image

Muaj ib hom kawm ntawd saib nyob rau hauv lub site thiab nrhiav tau qhov no:

image

Cov kawm ntawd txoj kev no tsis zoo hais meej.

No qhov teeb meem rau nkawd tuaj heev nyob rau lub Internets thiab muaj tsis kom zoo tau muaj kev pom zoo nkaus xwb thiaj li daws tau.  Kuv pom ib ke rooj uas mapped rau lub npe phem cov hom rau cov hom npe ntawm no: http://social.technet.microsoft.com/Forums/en-ZA/sharepoint2010programming/thread/cb03e866-8184-4943-acfe-cafffa1b8b7a.  Kuv manually tshiab lawv thusly:

image

(BrightStarr lub npe yog yeem obviously, tab sis nws tsis tau ua Luag nyav )

Qhov no pub kuv mus tsim ib cov template tshiab thiab tsis khis txhua yam nyob rau lwm qhov chaw, xws li ib co khoom PerformancePoint neeg rau zaub mov uas yog ib pab neeg txawv kiag li tau ua haujlwm rau.  Kuv twb ces tau los ua ib qhov chaw tshiab rau lub template.  Zoo!

Kuv tsis paub hais tias qhov no yog ib tug 100% tov, tab sis, nws tau kuv thiab koom tes sawv daws nrog yav tas los no annoying yuam kev.  Yog kuv nrhiav tau tej yam tshiab, Kuv mam li tswg ib qho hloov tshiab.  Kuv nervousness stems ntawm tus fact tias cov npe tsis raug lawm ua tus xub place thiab kho qhov lub npe zaub, Kuv yuav tsis kov lub npe nrog. 

</kawg>

Subscribe rau kuv blog.

Raws li kuv nyob Twitter tom http://www.twitter.com/pagalvin

Ib tug ua rau "tus creator ntawm qhov kev txhaum ho tsis qhia ib vim li cas.”

Kuv twb tau ua hauj lwm SharePoint nrhiav lately thiab lawv cov KeywordQuery kawm ntau, khoom thiab txoj kev.

Yog hais tias koj xav tau tus raug tso rov qab tau above and beyond lub suspects li ib txwm (saib ntawm no), koj ntxiv nws lub SelectedProperties sau, raws li nyob rau hauv:

myKeywordQuery.SelectProperties.Add("xyzzy");

Tsaug ntau thiab ib lub kaus mom rau taub Corey Roth thiab no cov ncej tswv enormously blog (http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2008/02/19/how-to-use-the-moss-enterprise-search-keywordquery-class.aspx)

Hauv kuv tsev neeg, "xyzzy" tsis yog ib tug muaj managed long-term ua tau.  Thaum twg kuv ntxiv nws rau SelectedProperties lawm, SharePoint txawb kuv favorite ib puas runtime ntxiv:

"Tus creator ntawm qhov kev txhaum ho tsis qhia tias koj thiab."

Kuv pheej nyiam lub peev "R" nyob rau hauv vim li cas.  Qhov no kuv suab zoo li .NET sib npaug ntawm"Kuv muaj tsis muaj qhov ncauj, thiab kuv yuav tsum tau scream.”

</kawg>

Subscribe rau kuv blog.

Raws li kuv nyob Twitter tom http://www.twitter.com/pagalvin

Tej kev siv ncaj: Pheej tawm ntawm kev tshawb KeywordQuery

Ua tau rau thaum koj tus tus Execute() txujci nyob ib KeywordQuery, koj muaj peev xwm tsim ib ResultTable le ResultType.RelevantResults.  No lub snippet code illustrates kuv txhais li cas:

ResultTableCollection resultsTableCollection = myKeywordQuery.Execute();

ResultTable searchResultsTable = resultsTableCollection[ResultType.RelevantResults];

Lub rooj resulting yuav muaj rau txhua cov lus nram qab no: 

WorkId
Plaws
Npe
Sau
Loj
Kab
Hauj lwm lawm
Sau ntawv
SiteName
CollapsingStatus
HitHighlightedSummary
HitHighlightedProperties
ContentClass
IsDocument
PictureThumbnailURL
ServerRedirectedURL

Kuv derived daim ntawv los ntawm ib cov SharePoint 2010 ib puag ncig, ib tsab Enterprise.  Hopefully nws yuav ua ke rau ib tug neeg yav.

</kawg>

Subscribe rau kuv blog.

Raws li kuv nyob Twitter tom http://www.twitter.com/pagalvin

Vim li cas ib tug rau: "Tejyam extract cov ntaub cab hauv cov kua”

Tswvyim thaum uas ua hauj lwm los ntawm siv qhov muag saib lub studio Web site qhov npaj hnub no, Kuv puas tau ib tug me re-nrog rau tej ntaub ntawv yuav muab tso rau hauv lub _layouts sis ib feem ntawm txheej txheem txiag. Yeej, Kuv renamed ib .js thov los ntawm "TypeAhead.js" los "TypeAhead(laus).js"  Kuv yuav npaj ua kom tshem nws thaum nws successor "TypeAhead.js" proves puas muaj tseeb.  Nws zoo li no:

image

Qhov no tam sim ntawd vim ib qho teeb meem uas siv qhov muag saib lub studio thaum kuv sim deploy rau peb tes num:

Yuam kev tshwm sim txiag kauj ruam 'Ntxiv kua': Tejyam uas extract tsheb tav xis cov ntaub ntawv nyob rau hauv txoj kev hais haum.

Nws puv kom paub tias koj yuav tsis tso ib tug parenthesis npe rau cov ntaub ntawv.  Kuv tshem tawm cov parens thiab solved qhov teeb meem uas.

</kawg>

Subscribe rau kuv blog.

Raws li kuv nyob Twitter tom http://www.twitter.com/pagalvin