Unable to display web part error on Custom List Form (New Item) - custom-controls

I'm gonna take my chance at asking a question here because I really cannot find the root cause of this problem.
I'm working on a WSS 3.0 site, using SPD 2007 and I'm fairly new to Sharepoint development in general.
I'm customizing the DispForm.aspx page. The page is a simple edit page but at the end, I add a custom list form web part for adding comments (which are stored in another list) and below, a dataview for viewing the comments associated to the item displayed by the DispForm.aspx page.
What i want to do resembles the functionality displayed on this page, I inspired myself from it and you can in fact see my comments as the latest one :
http://sharepoint.microsoft.com/blogs/GetThePoint/Lists/Posts/Post.aspx?ID=209
Everything was working, until I delete all the comments i had made as a test. Now all i get from my Custom List Form is this "unable to display this web part error".
I've had a look at the logs, I understand what it is complaining about but i have no clue on how to fix it or even understand why there is such an error to begin with.
SPDataSourceView.ExecuteSelect() - selectArguments: IsEmpty=True, MaximumRows=0, RetrieveTotalRowCount=False, SortExpression=, StartRowIndex=0, TotalRowCount=-1
Error while executing web part: System.InvalidOperationException: Unable to open the specified list item. --->
System.ArgumentException: **Value does not fall within the expected range**.
at Microsoft.SharePoint.SPList.**GetItemById**(Int32 id, String strRootFolder, Boolean cacheRowsetAndId)
at Microsoft.SharePoint.SPList.GetItemById(Int32 id)
at Microsoft.SharePoint.WebControls.SPDataSourceView.ExecuteSelect(DataSourceSelectArguments selectArguments) --- End of inner exception stack trace ---
at Microsoft.SharePoint.WebControls.SPDataSourceView.ExecuteSelect(DataSourceSelectArguments selectArguments)
at System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback)
at Microsoft.SharePoint.WebControls.SingleDataSource.GetXPathNavigatorInternal()
at Microsoft.SharePoint.WebControls.SingleDataSource.GetXPathNavigator()
at Microsoft.SharePoint.WebControls.SingleDataSource.GetXPathNavigator(IDataSource datasource, Boolean originalData)
at Microsoft.SharePoint.WebPartPages.DataFormWebPart.GetXPathNavigator(String viewPath)
at Microsoft.SharePoint.WebPartPages.DataFormWebPart.PrepareAndPerformTransform()
InnerException 1: System.ArgumentException: Value does not fall within the expected range.
at Microsoft.SharePoint.SPList.GetItemById(Int32 id, String strRootFolder, Boolean cacheRowsetAndId)
at Microsoft.SharePoint.SPList.GetItemById(Int32 id)
at Microsoft.SharePoint.WebControls.SPDataSourceView.ExecuteSelect(DataSourceSelectArguments selectArguments)
we're talking about a "new item" form, so i don't understand why I'm getting an error on GetItemById. What is it trying to get and how do i fix it?
Finally, I haven't changed the CAML query created by SPD. I did make change to the Comments list such as renaming or deleting unused columns but i don't think it is the cause of the problem because deleting the custom list form and recreating it didn't fix the issue.
Any clues as to where or what I should be looking at? I'm fresh out of ideas.
Thanks.

In Sharepoint Designer, Open the DispForm that you inserted the "Comments" custom list form into.
In Code view, find the DataFormWebPart for the list.
Locate the line <SharePoint:SPDataSource runat="server" DataSourceMode="ListItem" and change the DataSourceMode to DataSourceMode="List"
Inside of the ParameterBindings, find <ParameterBinding Name="ListItemId"..... and change it to <ParameterBinding Name="ListItemId" Location="None" DefaultValue="0"/>

Related

XPage view control search not working

I am new to domino designer and I am required to develop an application with it. I have went through some tutorials and I am stuck at the search function. I have followed guides I found but the search function in view control is not functioning. When I input anything into the search string(even static value), I get a server error 500. The error code is not very useful for solving my problem.(I have the full text index enabled.)
I tried to create my forms and views with the SiteFinderDemo template. I do not get an error but any search string returns 0 results.
I can modify the SiteFinderFinal's codes to work the way I want properly with the demo documents, but the search function else where just cannot work.
I also noticed new documents created with forms or xpages within the SiteFinderDemo instead of the agent do not work with the search function. I assume it has something to do with the full text searching, but I cannot find any information about it. What am I supposed to set up my application so that the search in view control can work without the server error, and what should I do to make new documents work with the search?
Thank you very much and sorry for such a long question.

Debugging linked DataLayers in Logi Info

I have a website built with Logi Info. It keeps logging errors with the following message:
Unable to find the DataLayer for DataLayer.Linked . Set the LinkID to
the ID of a DataLayerLink element. If the DataLayer is defined in
another report definition, ensure that the Target element's
LinkDataLayers = "True".
There does not seem to be a pattern as to what page or user action triggers this error. The only solution I can think of is to read through all the Logi report XML files line by line to find a DataLayer.Linked element with a reference to a DataLayer that does not exist.
What is the best way to go about debugging this error?
Does anyone have experience or advice dealing with Logi Info errors?
Update:
I read through one of the files that was causing errors and confirmed that there were no DataLayer.Linked elements referencing nonexistant DataLayer elements.
What else could be causing this error message?
You don't have to read the files that are causing errors. Just try to open the report file (.lgx) source and look for a datalayer of type Linked as below
<DataLayer
LinkedDataLayerID="This is your link ID which cannot be found"
Type="Linked"
/>
Once you found it, check LinkedDataLayerID if exists. If doesn't exists that is your problem, If exists though, make sure is loaded before your DataLayer Linked element.
I was getting this error when I tried creating group filters and sub-dataTables with the drop down menu. But when I type the column directly into the attribute, I have no problem running the definitions. Hope this helps a bit.
Did you add a Data Layer Link element to your local datalayer? It seems like you forgot to do that. Check this link out on devnet!
http://devnet.logianalytics.com/rdPage.aspx?rdReport=Article&dnDocID=2047&dnProd=2

How to recover from : Workflow Designer encountered problems with your document

As a novice with workflows I create a workflow (in VS2010 workflow designer) with a sequence within which I have a writeline activity. I am experimenting with creating arguments for the workflow so I create 2 arguments in the argument pane w/o doing anything with them at the activity level. (Noteworthy that I dont have a grasp of how to use arguments in the workflow yet). However I save my workflow while the workflow does not show any visible errors( red circles with an excalmation mark). Next time I open the workflow I get the error :
Workflow Designer encountered problems with your document .
Please check the document for invalid content, namespaces,references, or reference loops.
And that seems so final because there is no way that I can have access to my original workflow to possibly correct my error (whatever they might be). when I click on the detail down arrow I see this: Could not find member 'a' in type _8684 .
a is one of the two int32 arguments that I had in the workflow but which I never used in any of the activities.
I would appreciate any help. Thanks in advance.
It seems you're trying to re-host your Workflow Designer and it's not generating correct XAML for you.
The error Could not find member <mname> in type <tname> commonly occurs if the Workflow Designer instance is directly loading a container activity (sequence, flowchart etc.) instead of using an ActivityBuilder first.
If you're already using an ActivityBuilder then you may have missed giving it the root activity namespace. The correct way to add System.Activities.Presentation.WorkflowDesigner is:
this.workflowDesigner = new WorkflowDesigner();
this.workflowDesigner.Load(new ActivityBuilder { Implementation = new Sequence(),
Name = "RootNamespace.RootActivity" });
With the Name set properly WF designer would stop using random types (like _8684 in your case) and generate correct XAML on save/serialization. This should help you get rid of the namespace errors.

Oracle Forms Builder - change to window in another form

We have two forms so far, and need to switch from window1 in from1 (which is login screen) to windowX in formX using button (trigger code below):
begin
show_window('windowX');
go_block('some_block_in_formX');
end;
This gives error FRM-41052: Cannot find Window: invalid ID
So question is, should I add formX into show_window parameter in certain way or is there another approach? Thank you.
Please note, that forms are in different files.
that forms are in different files.
If the forms are different files, you need to call the other form using open form/call form/newform - whatever suits your needs.
show_window/go_block sequence can be used only when you're moving to different windows/blocks of the same form - and the error message
error FRM-41052: Cannot find Window: invalid ID
is complaining that it can't go to that Window because it's in a different form.
Each form effectively has a private namespace for all its windows, blocks, items, etc - and your code always runs within the context of a single form.
To solve this, you'll need a form parameter, plus some code in the other form, e.g.:
in formX, add a parameter ACTION
in form1, pass the value 'XYZ' to ACTION
in formX, in the WHEN-NEW-FORM-INSTANCE trigger, check if :PARAMETER.ACTION = 'XYZ', and if so, do your show_window and go_block. Copy the same code to your WHEN-WINDOW-ACTIVATED trigger.
Of course, you'll need to think about the name of the parameter (e.g. ACTION) and value ('XYZ') that will make sense to people maintaining your forms in the future.

How to show feedback/error messages in a backbone application

I'm working on a simple CRUD proof of concept with Rails/Backbone/JST templating. I've been able to find a lot of examples up to this point. But after much searching and reading, I've yet to find a good example of how to handle these scenarios:
info message: new item successfully added to list (shown on list screen)
info message: item successfully deleted from list
error message: problem with field(s) entry
field level error message: problem with entry
The Backbone objects are:
Collection (of "post" Models) -> Model ("post" object) -> List/Edit/New Views (and a JST template for each of these views)
So, I'm looking for a high level description of how I should organize my code and templates to achieve the level of messaging desired. I already have a handle on how to perform my validation routine on the form inputs whenever they change. But not sure what do with the error messages now that I have them.
Here is the approach I'm considering. Not sure if it's a good one:
Create a "Message" Model, which maps to a "View", which is a sub-view (if that's possible) on my existing views. This view/model can display page level messages and errors in the first three scenarios I mention above. Not sure if it's feasible to have a "sub-view" and how to handle the templating for that. But if it's possible, the parent templates could include the "message" sub-template. The message view could show/hide the sub-template based on the state of the message model. Feasible? Stupid?
For the fourth scenario, the model validation will return an error object with specific messages per each erroneous field each time a "model.set" is called by form field changes. I don't want to interrupt the "model.set" but I do want to display the error message(s) next to each field. I want to know how to factor my edit/new template and Post model/view in such a way that I don't violate the MVC pattern. I.e. I don't want to put references to DOM elements in the wrong plage.
Sorry if this is vague. If you're inclined to help, let me know what code snippets could be helpful (or other details) and I'll provide them.
You create a global eventbus. When ever an error appears trigger an event. Your view that should show the message listen to the events on this eventbus. Doing so, your error message view dont needs to know all of your collection and vice versa. The eventbus is simple:
var eventBus = _.extend({}, Backbone.Events);
Add it to your collection and trigger it when ever add was called:
var myCollection = Backbone.Collection.extend({
initialize: function([],eventbus){
this.bind('add', function(obj){eventbus.trigger('added', obj)}
}
})
Take also a look at the article: http://lostechies.com/derickbailey/2011/07/19/references-routing-and-the-event-aggregator-coordinating-views-in-backbone-js/

Resources