It is possible to open a Lotus Notes Composite Application (CA) using a syntax like this:
cai:///uniqueappid/uniquepageid?hint
According to a wiki-article -
Passing context to components when opening composite applications - you can pass a Dynamic property to a Composite Application and let the components in the CA read it.
The article has an example like this:
String[] values = data.getPreference("com.ibm.portal.app.input.NiklasTest");
Which should be able to read the parameter from a URL formatted like this:
cai:///uniqueappid/uniquepageid?hint&NiklasTest=xxxxx
I am looking for what my options are in order to get a handle on such a property.
Coding a java component. It seems likely that this would work.
Coding an xPage component. Would it be able to get a handle on the Dynamic
Property?
Coding a Portlet component. Would it be able to get a
handle on the Dynamic Property?
Coding a NSF form- or page-based
component. Are there LotusScript or #functions that can get a handle
on the Dynamic Property?
I am not looking for the best soloution. I am looking for a list of options that are known to work. Basically weeding out in my list above.
I know nothing of Composite Applications, and what exactly is a Dynamic Property, but in an XPage you can simply use param.NiklasTest in order to get the xxxxx from the URL.
In a application where we needed to pass parameters (and be able to open the CA multible times).
The (easy) solution was to build the .ca file on the fly (and embed the parameters) and then launch it.
You can build the template for the .ca file with the designer
IBM Wiki
Related
I am working on a Forms Module which provides a FormPart. In the edit mode of this Part i've a listing of other ContentParts (those which implement a custom interface IForm). User can then choose one content part from the available list. The edit mode view of choosen Content Part should then be available underneath. If user changes his selection of content part the edit view should also reflect this change and load appropriate content part.
I know i can Weld Content Parts to content types using ContentHandlers but here the request has already been served and in Edit Mode view the user will specify what content part he wants to be welded.
Any suggestions or insights would be highly thankful.
If you look at the IContentDefinitionService in Orchard.ContentTypes there are several methods that you will probably find useful, primarily this one:
void AddPartToType(string partName, string typeName);
Use the source ;)
According to the code sample on MSDN (http://msdn.microsoft.com/en-us/library/hh552522.aspx) any custom property data that you need to get out of your control should be in a semicolon delimited string in the AccessibleObject's Description property. This does not seem right to me at all. This seems like just a quick and dirty trick to get it working. What is the correct way to get the value of properties from custom controls? And if this actually is how you're supposed to do it, then how are you supposed to set those properties using the SetPropertyValue method? The example in the link above just throws a NotImplementedException in SetPropertyValue.
Since the IAccessible interface has only a limited number of properties the best solution is to cram any extra information into the Description property (that's what they do at the company I work at, and our developers don't work quick and dirty :) ). To modify the return value of this property you have to implement the Iaccessible interface on your control. Or, since you only want to modify the Description property you only need to modify that property and leave the rest to the proxy (I'm not sure how this works exactly but there are tutorials for it on MSDN).
The SetPropertyValue method in the UITestPropertyProvider is for the UItestControls. By overwriting it you can modify the way CUIT interacts with the control during playback. For example, if you overwrite SetPropertyValue for the Text property you can change the way CUIT types strings into the control.
A few times I've attempted to customize a SP2007 page using css, html, or javascript in Sharepoint Designer; however, in Sharepoint Designer I am not able to get direct access to the desired elements since they are generated by a Sharepoint Control (such as a web part or dataview) and appear only AFTER the page is rendered in the browser. I use use IE's F12 to tracked the element I wish to change. Then I can see an identifer such as name or id I can use in my javascript or css.
Example 1: SP2007 generates "name=ctl00$PlaceHolderMain$g_ba9196a9_2842_4607_b048_9a443cb4def5$ff2_1$ctl00$ctl00$BooleanField" for an input text box. I use that name to manipulate the text box as I desire.
Example 2: SP2007 generates "id=zz6_menu" for the "Welcome" text which I use to get the users full name.
So far this has worked out fine. Am I tempting fate?
Can someone refer me to a reference that discusses how these names and other Sharepoint Control element identifiers are generated?
Are they stable? Can I count on them to be the same provided the application I develop with my version of SP isn't updated to a later version of SP? And even if that case I'm thinking I can simply update to the identifiers created by the newer version of SP.
Is this a good practice? Any other comments?
All responses are welcomed.
Thanks.
SharePoint is based on ASP.NET and that's why the Ids are automatically genereated.
cf this article.
You should not use them to identify elements on css or js.
Do not write code that references controls using the value of the
generated UniqueID property. You can treat the UniqueID property as a
handle (for example, by passing it to a process), but you should not
rely on it having a specific structure.
In my opinion, the best way is to rely on the css classes because they are not automatically generated and should not change a lot.
Anyway, if you upgrade to SP2010 or 2013, lot of your modifications won't work anymore because the structure and css changed...
I would like to "customize" my sharepoint wiki by doing something very simple.
I would like to be able to run a regex on wiki pages looking for [math] and [\math] tags, then take the expression written in the middle (assume this value is stored in a variable x) and replace the whole block by
"<img src='http://latex.codecogs.com/gif.latex?" + x +"'/>"
So for example, the shortcode [math]a^2+b^2=c^2[\math] should end up being displayed as an image as follows (thanks to this online tool):
I have never developed anything in sharepoint, and I've been using it for a week.
Can anybody tell me how I should proceed to add such a feature (if it's possible)?
You can use existing solution like ShortPoint.
Sure - this is simmply done via two methods - 1) You could modify the page directly using SharePoint designer - fly in the code where you want it, 2) The better way - add your code to text file, upload the text file to a document library then use the Content Editor web part, drop it on the page, point it (through the properties) to the text file.
Note: The Content Editor part will allow you to modify the background HTML/Script, however, it has a nasty habit of overriding your code and I've had it actually duplicate itself (adding repeat scripts). Using the Text file eliminiates that issue.
If i understand you correctly, I don't think that the content editor web part is the solution you are looking for. I believe you are wanting to implement a shortcodes solution such as that found in WordPress, correct? In that case, the issue becomes a bit more complex. To really get any kind of custom code that would execute at the necessary stages, you would need a custom solution either implementing additional functionality in the existing rich text editor, or roll your own custom rich text editor.
At that point, you would have complete control over how the content is parsed and interpreted, so you could have both server-side and client side processing. You could make use of templating engines like mustache or handlebars.
To do this, you would need to write your own Custom field type, inherit from SPFieldMultiLineText, override the property FieldRenderingControl, and return your custom control. That way you have the option of implementing it in several different places (custom pege fields in a page layout, custom webparts, custom lists, etc.) and you still get the benefits you want from the out-of-the-box control.
I'm using Joomla 1.5 and I'm trying to get the search component in the front-end to reference my custom components, not those just through com_content and com_newsfeeds, etc. A lot of my custom components get data from MySQL so it would help even more if I were able to add the tables for com_search to go through as well (in addition to referencing the actual file for the component itself, where the static HTML surrounding the PHP tags are written). Has anybody tried doing this?
Looks like you need to create search plugin, which will do search through your own component. Check this:
http://docs.joomla.org/Creating_a_search_plugin
Also, would be helpfull to look on default joomla search plugins. They are stored there
\plugins\search\
I hope it will be helpfull.