SharePoint BCS creating a hyperlink column - sharepoint

I am using the .NET connector to connect to an SQL database. One of this value is a URL. Now I need to display this as a URL.
Any ideas on how to solve this?

In Sharepoint Designer you can edit the read list and go to the field, so for example you have a field called URL, display it as a label so it would render like
<asp:Label runat="server" id="ff1{$ID}" text="{$thisNode/#URL}" />
Then all you need to do is add an "A href" tag to it so it renders as a url like such
<asp:Label runat="server" id="ff1{$ID}" text="{$thisNode/#URL}" />

Related

Create own customized Web Content List

I'm looking to create my own Web Content List portlet. I exactly want to display the web content of my portal applying some filters.
I'm a little bit lost...
I tried to create a hook but I dont know how to find the possible actions of this portlet.
I don't want to get all the content. I want to use a rules mechanism for filtering the contents(drools portlet), depending on the user information.
Thank you in advance,
Oriol
You can get the list of web contents by using following method:
List<JournalArticle> result = JournalArticleLocalServiceUtil.getArticles(groupId, -1, -1);
You can display the list using liferay search container as:
<liferay-ui:search-container delta="30" emptyResultsMessage="no-users-were-found">`
<liferay-ui:search-container-results>`
results="<%= result%>"
total="<%=result.size() %>" />
<liferay-ui:search-container-row
className="com.liferay.portlet.journal.model.JournalArticle"
keyProperty="articleId"
modelVar="content" >
<liferay-ui:search-container-column-text
name="ID" value="<%= content.getArticleId()%>" /> // You can add multiple columns
</liferay-ui:search-container-row>
<liferay-ui:search-iterator />
</liferay-ui:search-container>
Hope this will help you.

SharePoint FormField doesn't show the content in ControlMode="Display"

I use SharePoint 2010 Standard Edition.
I have custom form for creating/editing items, and few fields with ControlMode="Display", like:
<SharePoint:FieldLabel ID="CustomStatusLabel" runat="server" FieldName="CustomStatus" ControlMode="Display" />
<SharePoint:FormField ID="CustomStatusField" runat="server" FieldName="CustomStatus" ControlMode="Display" />
When I open this form, all fields which are in ControlMode="Edit" displayed properly, but CustomStatus field is displayed exactly like this:
Custom Status ["Custom Status" column value]
Strangely enough, I saw this custom form working on different server...

Sharepoint calendar web part not working in Chrome Browser

I have a calendar web part in my SharePoint site which works fine in Firefox and IE but does not work in chrome browser.
This is the same situation i am facing.
http://answers.flyppdevportal.com/categories/sharepoint2010/sharepoint2010programming.aspx?ID=9dde800d-7ce0-4069-93d7-2adf2c53d94b
Any suggestions ?
One more thing to add here is that , I have a content Query web part which will rotate the Promotions using JQuery cycle plug in. It is on the same page where I have put the list and library web part with calendar Month view as a default view.
If I remove that CQWP with Promotions everything works fine but if it there it wont work
Any suggestions? I have checked for the Jquery conflicts but could not find any of them .
Thanks
I think that I have find the root cause of my problem
There is one CQWP placed on the same page with this Calendar view list.
This CQWP ha call to jquery cycle plugin which will cycle the content after some interval , due to this JQuery conflicts my calendar control is not working in chrome.
Whem I Remove this CQWP everything works like a charm!!!
1st, try to revert back to the OOB v4.master to see if the problem disappears. If it works as expected, this mean that your masterpage have some issue.
One of the most ridiculous bug in SP is that if you don't have the SiteAction control declared before the ribbon control, some javascript codes will fails.
In one of my custom master page, I have to create a second siteactions control, just before the ribbon control. I've put it into a invisible DIV to completely hide it from the user.
It ends with something like this :
<SharePoint:SPRibbon ID="SPRibbon1" runat="server" PlaceholderElementId="RibbonContainer"
CssFile="">
<SharePoint:SPRibbonPeripheralContent ID="SPRibbonPeripheralContent1" runat="server"
Location="TabRowLeft" CssClass="ms-siteactionscontainer s4-notdlg">
<!-- Here is the hidden site actions control -->
<div style="display: none">
<SharePoint:SiteActions runat="server" AccessKey="<%$Resources:wss,tb_SiteActions_AK%>"
ID="SiteActionsMenuMain" PrefixHtml="" SuffixHtml="" MenuNotVisibleHtml="&nbsp;">
<CustomTemplate>
</CustomTemplate>
</SharePoint:SiteActions>
</div>
<asp:ContentPlaceHolder ID="PlaceHolderGlobalNavigation" runat="server" Visible="false">
<SharePoint:PopoutMenu
runat="server"
>
.... Removed for readability ....
</SharePoint:PopoutMenu>
<div class="s4-die">
<asp:ContentPlaceHolder ID="PlaceHolderGlobalNavigationSiteMap" runat="server" Visible="false">
</asp:ContentPlaceHolder>
</div>
</asp:ContentPlaceHolder>
</SharePoint:SPRibbonPeripheralContent>
<SharePoint:SPRibbonPeripheralContent runat="server" Location="TabRowRight" ID="RibbonTabRowRight"
CssClass="s4-trc-container s4-notdlg">
.... Removed for readability ....
</SharePoint:SPRibbonPeripheralContent>
</SharePoint:SPRibbon>
For your information, this behavior is due to one the inner control of the site action (PublishingConsole if I'm right). This inner control will produces some javascript global variable declaration (language and one another). This global variables are required by the ribbon control to works as expected.

How to get document datasource in another Custom Control?

I have an xPage with this content:
<div class="lotusFrame">
<xc:layoutCommonBanner />
<xp:callback facetName="facetTitleBar" id="callbackTitleBar" />
<xc:layoutDiscrepancyPlaceBar />
<div class="lotusMain">
<div class="lotusColLeft">
<xp:callback facetName="facetColLeft" id="callbackColLeft" />
</div>
<div class="lotusColRight">
<xp:callback facetName="facetColRight" id="callbackColRight" />
</div>
<div class="lotusContent">
<xp:callback facetName="facetContent" id="callbackContent" />
</div>
</div>
<xc:layoutCommonFooter />
<xc:layoutCommonLegal />
</div>
As you can see, there are several custom controls in it composing layout. In the facetContent, there is a document with document datasource. It's the only document in the page. I need to get this document somehow in the layoutDiscrepancyPlaceBar custom control.
I found some old articles on the web with undocumented feature called currentDocument. It should be on every page with document datasource. But it doesn's work. I have Domino 8.5.2 and currentDocument seems to be no longer supported.
Can you help me out? How can I get document datasource from one custom control in another custom control. Is it even possible?
Thanks in advance, Jiří
EDIT: OK, it is still supported, but it only works in custom control, that is included inside the one with document datasource. In the case scenario above it doesn't work.
Your best option is to hand over the binding name in a custom property. (lets call it bindto. Then you bind your field to
"${#{"+compositeData.bindto+"}}"
See details here (inside the prezi)
P.S. currentDocument is documented somewhere.
You can also pass a handle on the data source directly to the custom control, as well as the name of the item to bind to on the data source. Because EL supports array syntax as well as dot syntax, this allows you to define expressions like this:
#{compositeData.dsn[compositeData.fieldName]}
(where "dsn" is the property being passed the handle on the data source, and "fieldName" is the property being passed the name of the item to bind to on that data source.)
More details on this approach can be found here.

SharePoint Search on default Masterpage

I am trying to enable the search bar on my default master page. In the source code of the master page there is the following:
<asp:ContentPlaceHolder id="PlaceHolderSearchArea" runat="server">
<SharePoint:DelegateControl runat="server" ControlId="SmallSearchInputBox"/>
</asp:ContentPlaceHolder>
In the render of the page in design mode it says [DelegateControl]. When I publish the page, I do not see a search box, I see nothing... can someone point me in the direction as how to enable search on my default master page, thanks.
I had the exact same problem but eventually found a very simple solution. You just need to make sure your asp:ContentPlaceHolder is within an html form. I don't know exactly why this is the case, but simply changing your code to
<form id="Form1" runat="server">
<asp:ContentPlaceHolder id="PlaceHolderSearchArea" runat="server">
<SharePoint:DelegateControl runat="server" ControlId="SmallSearchInputBox"/>
</asp:ContentPlaceHolder>
</form>
should solve the problem.
I found this very simple application.master page: http://blogs.microsoft.co.il/blogs/justguy/archive/2008/08/31/empty-application-master.aspx
When the search boxes worked using this simple master page, I was able to track down the problem and find the needed element.
Are you certain that you MOSS Search service is correctly configured?
If not, check this article:
http://www.mysharepointblog.com/post/2008/10/Configure-Search-On-MOSS-2007-(Microsoft-Office-SharePoint-Server).aspx
Have you activated the "Office SharePoint Server Standard Site Collection features" from the site features?

Resources