displaytag exporting showing whole HTML tag(for hyperlink) - styles

I'm using displaytag tld for displaying tables and exporting.
The problem is, in my first column, the column content is hyperlink,
and all of this html tag is generated on exporting.
<a class="ajax"
id="msgIDPkView"
href="displaySelect
DashboardDetailsV
iewFullText.do?ref=
501250">501250</
a>
How can I make it only show the value(between ).

if you only decorator for this column use this:
<display:setProperty name="export.decorated" value="false"/>
with this property the decorator doesn't apply to your column while printing!
otherwise you've to create two columns for this property; one to show in web browser and one to show in export!
<display:column property="id" media="html">
<display:column property="id" media="csv">

Related

TIBCO SPOTFIRE 7.5-How to set a document property with checkbox values

In TIBCO SPOTFIRE 7.5 I have a problem to set a document property with values selected in a checkbox: I have to use "OR" clause between 2 checkbox filter (it works always in "AND") so I want to set 2 document properties with checked values (2 checkbox) and use them in a limit expression.
Someone can help me?
Tnx
I will list two possible answers here, that differ in complexity. Which solution to use depends on how strong your requirements are on what UI control you can use.
Option 1 - Use Property Control
Add two property controls to a text area to set the document properties that will be used to limit data. Each property control will be set up to select values from a column in your data, for instance like this with the Film example data:
With two property controls as the one above, add a data limit expression to the visualization (Visualization properties -> Data -> Limit data using expression). Set expression like this:
[Actor] = "${Actor}" OR [Actress] = "${Actress}"
Here I've used the column [Actor] to match the value of the document property Actor or the column [Actress] to match the value of document property Actress.
Option 2 - Use JavaScript
If you really need the UI to be a checkbox, then there is no Spotfire Control to handle that. If the choices you need to allow the user to make is static, then this option is fairly straightforward. If you need the option to be based on the data, then it takes more work.
Let's start with the static case. In a textarea, add an input field and then modify the html to something similar to this:
<label><input type="checkbox" value="check1"> Checkbox1</label><br>
<label><input type="checkbox" value="check2"> Checkbox2</label><br>
<label><input type="checkbox" value="check3"> Checkbox3</label><br>
<div id='mySpotfireControl' style='display:none'>
<SpotfireControl id="344f7da2bc5d4baca88c7e76cb7d429b" />
</div>
Also add a javascript to the text area, similar to this:
$("input[type='checkbox']").change(function(){
var jsValue = $(this).val();
$('#mySpotfireControl input').val(jsValue).blur()
})
This will move the value from the checkbox into the Spotfire Document Property. From there, you can add a limiting expression same as when using solution 1 above.
If you need to generate the set of checkboxes that are available, then you need to generate the html for the text area dynamically. You can do this by writing an IronPython script that inspects the current data, and creates the html for the text area. This IronPython script would need to be invoced somehow, if you want it fully automatic you can trigger it from a data function that runs when the analysis is opened.

Multiple lines of text column not showing in Content query webpart sharepoint

I want to add custom column Document Description in CQWP for this I added below code in ItemStyle.xsl
xsl:value-of select="#Document_x0020_Description" disable-output-escaping="yes"
In wepart I used below code
property name="CommonViewFields" type="string">Document_x0020_Description,Note
but even after doing this CQWP not showing its value, it is coming blank but when I do same steps for "Single line of text" type column then in that case all are workin fine.
Please let me know how to add Multiple lines of text column in CQWP
Try also setting the properties "DataMappingViewFields" and "DataMappings" in the webpart like:
<property name="DataMappings" type="string">LinkUrl:{94f89715-e097-4e8b-ba79-ea02aa8b7adb},FileRef,Lookup;|Description:{691b9a4b-512e-4341-b3f1-68914130d5b2},ShortComment,Text;|ImageUrl:{b9e6f3ae-5632-4b13-b636-9d1a2bd67120},EncodedAbsThumbnailUrl,Computed;{543bc2cf-1f30-488e-8f25-6fe3b689d9ac},PublishingRollupImage,Image;|Title:{fa564e0f-0c70-4ab9-b863-0177e6ddd247},Title,Text;|Ingress:{C0ECDC73-85A2-478B-823D-B882219ACA8A},Ingress,Note;|</property>
<property name="DataMappingViewFields" type="string">{94f89715-e097-4e8b-ba79-ea02aa8b7adb},Lookup;{b9e6f3ae-5632-4b13-b636-9d1a2bd67120},Computed;{543bc2cf-1f30-488e-8f25-6fe3b689d9ac},Image;{fa564e0f-0c70-4ab9-b863-0177e6ddd247},Text;{691b9a4b-512e-4341-b3f1-68914130d5b2},Text;{C0ECDC73-85A2-478B-823D-B882219ACA8A},Note;</property>
The last property here called "Ingress" is a Note-field. Maybe this will make the field available in the xsl?

SharePointWebControls:BooleanField - text inside checkbox

I'm trying to brand a sharepoint site, and in edit mode I got several checkboxes. In some of the checkboxes I want to display text, how?
ex:
<SharePointWebControls:BooleanField ID="Comments" runat="server" FieldName="Comments" />
Text I want to insert into the checkbox "this is a comment"
I've tried
<SharePointWebControls:BooleanField ID="Comments" runat="server" FieldName="Comments" />this is a comment</SharePointWebControls:BooleanField>
You might consider creating a content type for your page layout. This content type can have a field named "Comments" and with a custom display name.

Removing column name from SharePoint RSS feed

I have a SharePoint 2007 site the exposes RSS feeds to a static HTML page. The static page will aggregate and display them via jQuery AJAX. The problem is that SharePoint includes the name and value of the columns in the body of the feed (go to link and search for body) which makes my page look like this:
Note the Body: after the date and before the description. I don't want that there column names in the feed. How do I tell SharePoint to exclude the column names? Here is a section of the feed. You can See Body is included in the feed item description.
<item>
<title>Sample Post #3</title>
<link>http://example.com/ViewPost.aspx?ID=4</link>
<description><![CDATA[<div><b>Body:</b> <div class=ExternalClass2325D3CC73DB4C30BE5AB60A06E681F9><div>
<div id=lipsum>
<p>Lorem ipsum dolor sit amet... </p>
</div></div></div></div>
<div><b>Category:</b> Category 1</div>
<div><b>Published:</b> 12/29/2011 9:11 PM</div>
]]></description>
<!--extraneous elements deleted for brevity -->
</item>
According to this source it's not a very quick and easy thing to do but it can be done. It involves creating your own XSL style sheet (or copying the default one and modifying it) and updating the SharePoint web.config to use it.
Read the source you're pointing to, it tells you that the column title is displayed if you reference several columns in your RSS settings. If you only reference one column, the column name should not be displayed.
As you are using jQuery AJAX, you could parse the RSS content after you retrieve it, and remove the column names. Your other option is to change your RSS settings to have only one column displayed.

Dynamically set cell/row style jsf 2.0

I am using an h:datatable which shows a summary of the data entered by a user in a session. The rows of the table are deletable at the users discretion. if the data meets certain criterion, the specific row in the table must be in red font color, else it should be black.
The methods I have tried so far are:
- Set the style value for h:outputtext component in each column value to red programmatically. But this changes entire columns color.
- Set the rowclasses programmatically, this again changes the style for all previous rows.
I am unable to target just one row or cell. I thought about using javascript, but without the id of the component I am not sure how to get the element.
Thanks.
Use the rowClasses attribute.
<h:dataTable value="#{bean.items}" var="item" rowClasses="#{bean.rowClasses}">
The getRowClasses() must return a comma separated string of CSS class names which are to be applied on rows (more specifically, the <tr> elements) repeatedly. You can create it based on the items inside bean's (post)constructor, action methods and/or even inside the getter.
For some reason, the StringBuffer was being overwritten thats the reason the change wasn't showing. I went with a simpler approach of adding an alert img to the rows that needed to be modified.

Resources