RECENT POSTS
Sharepoint 2010: How To Verify if a site user is site Administrator
In many Sharepoint projects the following code has been user to check if a certain user has full control or not over a specific site: if (!SPContext.Current.Web.CurrentUser.IsSiteAdmin) But this code only check if a user is a Site Collection administrator. Even if the current user is in the owners group, it will not work. And therefore, problems will happen once implemented live. Workaround: I wrote a method that checks if a user belongs to the Owners group: if(!isCurrentUserOwner()) Method: private bool isCurrentUserOwner() { ...
read moreUnable to create a content type – A duplicate content type was found
I found my problem, so if this can help some people some day. Looks like SharePoint have some problems sometimes to update a field in the content database. The field NextChildByte from the dbo.ContentTypes table is the problem. Lets say I create a content type with ID 0x010100ACEA2663B318874AA9192CA9AF678614 with Document as parent (0×0101). SharePoint will create an entry in the dbo.ContentTypes table. When I create an other content type with the first one as parent.. The ID of this new content type will be...
read moreUnable to connect to sharepoint site
After successfull installation of TFS, when trying to create a new team project, first few steps completes, but then it says “unable to connect to sharepoint site” and stops. In the server, Default Website is on port 80 : Displays sharepoint “Home”. Sharepoint admin is on port: 26442 : Displays “Sharepoint Central Admin”. TFS is on port 8080: Displays “Access Forbidden”!! when directly browsed from http://servername:8080. The team explorer successfully connects to the TFS with the same...
read moreWhat is Context in Android
Context is context of current state of the application/object.Its an entity that represents various environment data . Context helps the current activity to interact with out side android environment like local files, databases, class loaders associated to the environment, services including system-level services, and more. A Context is a handle to the system . It provides services like resolving resources, obtaining access to databases and preferences, and so on. An android app has activities. It’s like a handle to the...
read moreHow To Get The ServletContext In Struts 2
In Struts 2 , you can use the following two methods to get the ServletContext object. 1. ServletContextAware Make your class implements the org.apache.struts2.util.ServletContextAware interface. ** UPDATE: Struts 2 Complete tutorial now available here. When Struts 2 “servlet-config” interceptor is seeing that an Action class is implemented the ServletContextAware interface, it will pass a ServletContext reference to the requested Action class via the setServletContext()method. package...
read moreFaster android emulation
It is fun to develop but not fun to test on emulator because of performance issues. Here is what work for me after a long research ( information collected from internet source and books ). If you are running Windows 7 on an i5 processors then this might just work for you without getting into downloading virtual machine or any additional virtual images. Hardware running on: i5 processor ( first generation , but any generation should do ). 3 GB main memory ( As per observation memory is not a constraint, anything more than 3 GB is...
read moreTo Check Whether Internet Connection Available in Android
NetworkInfo class provides a non-static method isAvailable() which will return null if there no internet . getActiveNetworkInfo() method of ConnectivityManager returns a NetworkInfo instance representing the first connected network interface it can find or null if it cant find any connected network. We could find whether internet connection is available by checking this method . ** UPDATE: Android Complete tutorial now available here. Below code snippet will explain it . private boolean doNetworkAvailable() { ...
read moreBean of Prototype scope
Download It Bean of Prototype scope This scope of bean can be utilised when more than one instance of a particular bean is required during the span of an application. It teturn a new bean instance each time a request is made. Step 1 : Define the POJO File : Amount.java package com.simpleCodeStuffs; public class Amount { private String val; public String getVal() { return val; } public void setVal(String val) { this.val = val; } } In prototype scope,a new...
read moreDifference between Struts2 FilterDispatcher and StrutsPrepareAndExecuteFilter?
The FilterDispatcher is used in the early Struts2 development, and it has deprecated since Struts 2.1.3. ** UPDATE: Struts 2 Complete tutorial now available here. If you are using Struts version >= 2.1.3, it’s recommended to upgrade the new filter class StrutsPrepareAndExecuteFilter The new filter was introduced for the following reasons There were a lot of issued with the FilterDispatcher and its deployment. New Filter provides a better way to enable customizations and overrides. Make it crystal clear to...
read moreDesigner Workflow 2010: Unable to load workflow actions from the server. Please contact your server administrator
Unable to load workflow actions from the server
read more