TODO tag comments for SSJS in Xpages in Notes Version 9 - xpages

At one of the Lotusspere sessions in Orlando, the //TODO comment tag was mentioned. I thought that this was an extremely useful feature but sadly in looks to me like it does not work in SSJS?
Task Tags in XSP sources
Any chance this has been fixed in version 9? It does work in 8, but you need to place it outside your SSJS code block.

I am using the Domino Designer 9 beta build from December (the public beta). The Task Tags functionality still does not include TODO tags in SSJS script libraries and SSJS code blocks.
--
Do the following to control what contents the Tasks view shows:
Choose the Configure Contents
Select "On any element in same project"
You can do the same with the Problems view.

It may have been my session. It's standard Eclipse functionality, so only works in certain editors like the XML Editor. You may have hit the same gotcha I hit during preparation. Enabling it in the Tasks view is not enough. You need to enable it in the relevant editors in the Preferences. Open up preferences and type "Task" in the filter box. It should then get picked up from any SSJS in the source pane. It gets updated when the project is built.

Related

Command Not Handled Exception

I'm new to Domino Designer. I'm trying to modify an existing application which is running on a remote server. I create a blank xPage and view in browser and it works. I add a label and view in browser and it works. I add a combo box and setup a data source for my xPage. The data source is in the current application and I'm using a view. I setup my combo to point to that data source and specify BindTo value. I view it in browser and I get Error 500 "HTTP Web Server: Command Not Handled Exception" I can open the view that I've used and see all the data in the view. I can even add, edit, and delete from the view.
Ideas... Thnxs in advance.
Additional Info. I've added a "View" from "Container Controls" and used the same data source and the same view and it also works in the browser.
The error being printed is:
javax.faces.el.PropertyNotFoundException: Error getting property 'CompanyName' from bean of type lotus.domino.local.View
com.sun.faces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:119)
com.ibm.xsp.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:144)
com.sun.faces.el.impl.ArraySuffix.evaluate(ArraySuffix.java:182)
com.sun.faces.el.impl.ComplexValue.evaluate(ComplexValue.java:163)
com.sun.faces.el.impl.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.j‌​ava:257)
com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:150) ....
This was already answered in the comments, but I want to write a better answer.
The problem in this case is that a view data source is being used for editing a document. Directly, this is not a possibility, though there are a few great ways to get around this. The first way, and my favorite, is to use an inline form. I think the Extension Library Demo database offers a few great examples of how to go about doing this. One way is to use a tooltip dialog. Another way is an inline form. A repeater is used and for every row in the view, a hidden panel can be made which contains the document data source and all field which are required to be changeable. By clicking on a button or link, the panel is made visible. This is my favorite variant because it is simple, quick, and generally looks great.
Another way to go about this is to have a view data source only, but use scripts to retrieve the document and set the values in the background and then save and release. It all depends on what you are trying to achieve.
My main recommendation is to look at the ExtLib demo and take a look at what they are doing there.

How to overcome the error "The unknown namespace tag xe:applicationLayout cannot be used as a control."

I created a sort of template DB for my Xpages applications. It is not a true template, just a design I can grab code from to start a new Xpages db.
I copied over a cc and got this error:
"The unknown namespace tag xe:applicationLayout cannot be used as a control, as the namespace http://www.ibm.com/xsp/coreex is not known."
I tried to creating a new cc in the target db and just pasting the source in, still got that error. What does that error mean and how can I overcome it?
I mean, come on, I can't copy and past design elements from one db to another???
It means that you haven't enabled the ExtLib in the application's properties. If you do to the Xsp Properties (in 9.0+) or Application Properties (in ancient releases), you can enable the com.ibm.xsp.extlib.library library, assuming you have it installed.
There is an event that can be triggered when dropping a native control onto an XPage or Custom Control. That event is used to enable the library in Xsp Properties. It's also used to enable the relevant abbreviation (xe, xc etc) on the pages. The bottom line is copy and paste isn't that sophisticated!
And it's not exclusive to the Extension Library. Try copying and pasting a Custom Control to a brand new XPage and save it. It will give you virtually the same message, but this time saying "xc" is not bound.
You need to enable the Extension Library manually if you're copying a custom control across. Alternatively, you can just drag and drop any Extension Library control onto any page in the application, then delete it!
If you're copying source code from one XPage to another, if it includes anything other than an xp tag, you need to check the relevant xml namespace is specified in the xp:view tag. So in the case of copying source code for the application layout, also adding xmlns:xe="http://www.ibm.com/xsp/coreex" to the xp:view tag.
(This was too long an elaboration to just add as a comment to Jesse's answer, which I've up-voted)

Adding item to all view menus

In Eclipse, it is possible to extend to any pop-up menu using the following special location URI:
popup:org.eclipse.ui.popup.any
Is it possible to do the same for the view menus (the little triangle in each view)? (I am developing an Eclipse RCP application, not extending the IDE. The purpose for this item is to help debugging and testing of the application.).
The short answer: no, that is not possible, unless you add the items by hand for all views.
The slightly longer answer: yes, if you
manually go through the view registry
create a new AbstractContributionFactory with the location URI "menu:<view-id>" and whatever createContributionItems(...) you want for each. (Alternatively you can create AbstractMenuAdditionCacheEntry or even better MenuAdditionCacheEntry - though these are internal and requires a little extra work... The last allows you to have a centrally defined menus extension point that is used for all these additions.)
add these to the workbench using IMenuService.addContributionFactory(AbstractContributionFactory factory) (use IWorkbenchWindow.getService(IMenuService.class) to acquire the menu service).
I haven't tested the above recipe, but I have used something very similar in an application...

SharePoint 2007 - add additional menu to Global Navigation in a Master Page

In the source code for a master page, there is a section that has the following ASP.NET item: . This contains the "Welcome (User Name)" and Site Actions menus.
How do I create an additional menu that is similar to the look and feel of the Welcome menu? I've tried to create Front End HTML that behaves similar to the out of the box SharePoint menus, but it isn't quite right. I would prefer to utilize an ASP.NET or SharePoint control that acts similar to the SharePoint menu if that is possible.
For example, is <SharePoint:AspMenu> the appropriate control to use?
Thanks,
Robert
i am sure you will get better answer than this but just wanted to point what i have done to do this
i have added javascript library (JQuery) (for some other reason ) and when time come to do this thing i just added a JQuery code that creates another item in the navigation list with appropriate style and css class with the needed link and caption.
You could try another instance of the PersonalActions control with a custom GroupId. But when the control is rendered, it might also say "Welcome, [User]" just like the original.

How do you create your own ADF Faces skin?

We are using the default Oracle ADF Faces 10g default skin. It looks super nice, but we want to make tweaks to it (changing the CSS and also how certain components are rendered -- for example the table component will place buttons above and below the table component-- we want them only on the bottom-- this appears to require a programmatic change in order to change this behavior).
Has anyone had success creating their own ADF Faces skin? Please post what you had to do to change component behavior.
we followed this documentation for webcenter spaces:
http://www.oracle.com/technetwork/middleware/webcenter/owcs-r11-extend-spaces-wp-132596.pdf
The documentation makes use of an already existing oracle extension (how to download the source is in the document).
Once we add the application, we simply added a new entry in the META-INF\trinidad-skins.xml :
<?xml version="1.0" encoding="ISO-8859-1"?>
<skins xmlns="http://myfaces.apache.org/trinidad/skin">
<!-- Previous skins here ... -->
<skin>
<id>myskin.custom.desktop</id>
<family>My Skin</family>
<render-kit-id>org.apache.myfaces.trinidad.desktop</render-kit-id>
<style-sheet-name>custom/spaces/skins/myskin/myskin.css</style-sheet-name>
<extends>default.desktop</extends>
</skin>
</skins>
and added the css and img files inside the MET-INF directory in the specified paths (e.g. META-INF/custom/spaces/skins/myskin/myskin.css).
For custom applications on ADF the procedure should be the same.
Since Oracle 11g, Oracle prodives the so called 'skin editor' for your ADF applications.
Until 11.1.7.0, the skin editor was only available as an external application. In the current versions, you can choose for which application version you want to create the skin for your ADF Application (the wizard will give you an option for that when creating a new skin project).
Download Skin Editor:
http://www.oracle.com/technetwork/developer-tools/adf/downloads/index.html
Install instructions:
https://docs.oracle.com/middleware/1212/skineditor/ADFSI/adfsi.htm#ADFSI102
However, since 11.1.7.0 the skin editor is integrated with the Oracle JDeveloper IDE. I already used it for a couple of projects. Although it is easy to get into it and to configure your custom skin, you have to keep in mind that you have to do a lot of manual work to "fully" replace the default skin. There are some components which rely on icons - therefore you have to replace them one by one, using graphical editors (e.g. adobe photoshop or another comparable editor that suits you).

Resources