TFS-2010 - Custom Work Item Control not showing up: "Form Rendering Failed: Object reference not set to an instance of an object." - user-controls

I'm developing a custom control for Task/Bug Work Items so I can query for shelvesets related to the Work Item.
First off I tested a simple control with nothing but a listbox with an Item. When I preview the layout form in the Process Editor in VS2010, it shows up alright, but when I create a new Task, upon loading it shows a message instead of my control:
"Form Rendering Failed: Object reference not set to an instance of an object."
What I really like about these error messages is that they're always crystal clear... I'm clueless, what could be causing this behavior?
Thanks in advance!
Clark
~

Place the dll and .wicc of the custom control you created in:
C:\Users\All Users\Microsoft\Team Foundation\Work Item Tracking\Custom Controls\10.0
Make sure your .wicc file directs to your dll correctly.
Refresh the team project in the team explorer.
If your WIT control is functional it should work.
Good Luck!

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)

404 Item not found When Providing access to existing documents from an XPage View

I have been following the tutorial here for creating an XPage application. Unfortunately I am encountering an Error 404 HTTP Web Server: Item Not Found Exception when you try to follow a link to another document from the main view XPage. Everything else seems to function properly until that point.
It happens when you select "XPage associated with the documents form".
According to some googling I simply needed to rebuild my project but that didn't work. That was the only fix I was able to find.
The link for my xpage for my view is : http://localhost/ExpenseClaims.nsf/xclaimsview.xsp
The link to a xpage with the 404 error from my view is: http://localhost/ExpenseClaims.nsf/%24%24OpenDominoDocument.xsp?documentId=15DA9966C77908D385257C150070483D&action=openDocument
The problem has returned for my "claim" xpage that represents a form document named "claim". My response documents open as needed.
My associations are:
Views: Xpage:
Claims -> xclaimsView
Forms: Xpage:
claim -> claim
response -> response
Most likely the connection between your XPage and the form didn't work. Open the form, then in the properties pick the XPage you want to open. Save it and try again.
There's one special case when you have an XPage with the same name as the form, where that should happen automatically, but it is safer if you specify the property in the form (second tab on the property box)
The data connection from the xpage to the form seems to be breaking down that's a possible cause but not an acceptable answer. The reasons are everything from the project build being broken to the port that domino designer is using as default being occupied.
Cleaning then building the project may help (Project -> Clean) but in my case it didn't. Opening the Page by selecting it by name is helpful but not if you are opening two different pages from the same view(View Properties -> at run time open selected document). There was another suggestion that said to move the default domino test port(File -> Preferences -> Domino Designer) but that didn't work for me.
The final answer was to go to each form's properties box and link it to it's corresponding xpage (second tab form properties). (see answer marked as correct for a link to IBM with a better explanation)

Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED)): ActiveX and C# Console Application

So, I am playing around with ActiveX and C# and ways how both of them can work together. the thing is I have hit the wall right in the beginning with mentioned error. Steps I have followed:
In VS2010 I selected MFC ActiveX Control project. Then I added a method "SHORT Multiply( SHORT a, SHORT b);" by clicking the Add method option in the menu that pops when you right click _DProjectname under ProjectnameLib in solution explorer. The code for the method is as follows:
SHORT CSampleProgramActivex01Ctrl::Multiply(SHORT a, SHORT b)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
// TODO: Add your dispatch handler code here
return ( a * b);
}
Now I have created a simple C# console application that references the generated COM file and when I try to use the method, the application stops with the above mentioned error. I have searched the error on the internet but no clear solution is mentioned. Any help appreciated. If you guys want clarification, let me know.
I don't know whether this is considered as solving the problem or not but I found a workaround:
First instead of C# console application, I created C# windows form application. After creating the form, I have added the whole ocx as component in the toolbox. You do this by right-clicking the Toolbox types in Toolbox menu. In the new menu, you click Choose Items. This pops up new menu and in that select the COM tab and in that check your COM component and the COM component will be added to the Toolbox menu. Now drag and drop the component on the menu and you should be good to go.
This seems to be workaround that everybody is following. Not neat but that is the norm I think.
look at here: How to use an OLE control as an automation server in Visual C++
http://support.microsoft.com/kb/146120/en-us

The WebPart menu doesn't work in SharePoint 2010

I created a WebPart,and it works in SharePoint 2007,I can edit or delete it.But the menu of this WebPart does't work in SharePoint 2010,when I click the menu,it shows nothing.I can't delete or edit it.
The error message is "The value of the property 'UpdateWebPartMenuFocus' is null or undefined, not a Function object",which points to:
UpdateWebPartMenuFocus(this, 'ms-wpselectlinkfocus', 'ms-WPEditTextVisible')
So I want to know the probable reasons for this problem,or any mistake I may have made with my codes.
Thanks!
The method UpdateWebPartMenuainFocus is defined in Core.js.
You need a reference to Core.js, either from your page or from a master page that your page uses.

Resources