Get a web property value with REST
Hello,
i want to get the value of a property that i have set in my web property bag using REST call,
is it possible?
Thanks a lot
Hi,
According to your post, my understanding is that you want to get the web property.
Per my knowledge, we could not use the listdata.svc to get the web properties, however, we can use the
Webs web service to achieve it.
https://social.msdn.microsoft.com/Forums/en-US/198dd547-22fd-4fda-89f2-b76553498c3b/get-web-properties-through-web-service
What’s more, we can also use the JavaScript Client Object Model to access the property bag.
http://derekgusoff.wordpress.com/2012/04/24/accessing-the-web-property-bag-with-javascript/
http://www.jeremythake.com/2013/10/using-the-sharepoint-csom-api-to-get-a-property-bag-value/
Thanks & Regards,
Jason
Jason Guo
TechNet Community Support
Similar Messages
-
HibernateSystemException: exception getting property value with CGLIB
I am getting a hibernate exception error
HibernateSystemException: exception getting property value with CGLIB
does anyone know what it means?check the setter method for the property LANG_CD in com.dst.fourx.model.codeModel.CodeGroupDisplay.
it must be like -
setNlsLanguage(CodesGroup xyz) { ... }
The paremeters must be objects, not the type of the database column. We can specify the actual field in CodesGroup which acts as the foreign key in CodeGroupDisplay in the "property-ref" attribute of <many-to-one> element in the mapping file for CodeGroupDisplay.
This worked for me. Hope it works for you too. -
Exception setting property value with CGLIB ( in hibernate)
My hbm.xml file is:
<hibernate-mapping>
<class name="com.dst.fourx.model.codeModel.CodeGroupDisplay" table="CODE_GROUP_DISPAY1">
<composite-id name="codeGroupDisplayKey" class="com.dst.fourx.model.codeModel.CodeGroupDisplayKey">
<key-property name="nlsLanguage" type="java.lang.String" column="LANG_CD" />
<key-many-to-one name="codeGroupCode" class="com.dst.fourx.model.codeModel.CodesGroup" column="CD_GRP_CD" />
</composite-id>
<property name="createDate" column="CREATE_DT" type="java.util.Date" not-null="true"/>
<property name="createUserCode" column="CREATE_USER_CD" type="java.lang.String" not-null="true"/>
<property name="updateDate" column="LAST_MOD_DT" type="java.util.Date"/>
<property name="updateUserCode" column="LAST_MOD_USER_CD" type="java.lang.String"/>
<property name="displayText" column="DISPLAY_TXT" type="java.lang.String" not-null="true"/>
</class>
<query name="findAllEditableCodeGroups">
<![CDATA[from CodeGroupDisplay]]>
</query>
</hibernate-mapping>
I m getting the following error while running the above query:
org.hibernate.PropertyAccessException: exception setting property value with CGLIB (set hibernate.cglib.use_reflection_optimizer=false for more info) setter of com.dst.fourx.model.codeModel.CodeGroupDisplayKey.setCodeGroupCode
at org.hibernate.tuple.PojoComponentTuplizer.setPropertyValues(PojoComponentTuplizer.java:63)
at org.hibernate.type.ComponentType.setPropertyValues(ComponentType.java:262)
at org.hibernate.type.ComponentType.resolve(ComponentType.java:447)
at org.hibernate.type.ComponentType.nullSafeGet(ComponentType.java:182)
at org.hibernate.loader.Loader.getKeyFromResultSet(Loader.java:759)
at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:292)
at org.hibernate.loader.Loader.doQuery(Loader.java:412)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:218)
at org.hibernate.loader.Loader.doList(Loader.java:1593)
at org.hibernate.loader.Loader.list(Loader.java:1577)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:395)
at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:271)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:844)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:74)
at com.dst.fourx.core.impl.ao.dao.actions.HibernateNamedQueryAction.execute(HibernateNamedQueryAction.java:79)
at com.dst.fourx.core.impl.ao.dao.BaseDAOHibernate.execute(BaseDAOHibernate.java:129)
at com.dst.fourx.core.impl.ao.dao.AddEditCodeDAO.getAllFundingTypes(AddEditCodeDAO.java:47)
at com.dst.fourx.core.impl.ao.dao.AddEditDAOTest.testGetCreditBankAccts(AddEditDAOTest.java:29)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: net.sf.cglib.beans.BulkBeanException: com.dst.fourx.model.codeModel.CodesGroup$$EnhancerByCGLIB$$fd9c7e4e
at com.dst.fourx.model.codeModel.CodeGroupDisplayKey$$BulkBeanByCGLIB$$ae2c0401_2.setPropertyValues(<generated>)
at org.hibernate.tuple.PojoComponentTuplizer.setPropertyValues(PojoComponentTuplizer.java:59)
... 32 more
Caused by: java.lang.ClassCastException: com.dst.fourx.model.codeModel.CodesGroup$$EnhancerByCGLIB$$fd9c7e4e
... 34 morecheck the setter method for the property LANG_CD in com.dst.fourx.model.codeModel.CodeGroupDisplay.
it must be like -
setNlsLanguage(CodesGroup xyz) { ... }
The paremeters must be objects, not the type of the database column. We can specify the actual field in CodesGroup which acts as the foreign key in CodeGroupDisplay in the "property-ref" attribute of <many-to-one> element in the mapping file for CodeGroupDisplay.
This worked for me. Hope it works for you too. -
How to get Document Set property values in a SharePoint library in to a CSV file using Powershell
Hi,
How to get Document Set property values in a SharePoint library into a CSV file using Powershell?
Any help would be greatly appreciated.
Thank you.
AA.Hi,
According to your description, my understanding is that you want to you want to get document set property value in a SharePoint library and then export into a CSV file using PowerShell.
I suggest you can get the document sets properties like the PowerShell Command below:
[system.reflection.assembly]::loadwithpartialname("microsoft.sharepoint")
$siteurl="http://sp2013sps/sites/test"
$listname="Documents"
$mysite=new-object microsoft.sharepoint.spsite($siteurl)
$myweb=$mysite.openweb()
$list=$myweb.lists[$listname]
foreach($item in $list.items)
if($item.contenttype.name -eq "Document Set")
if($item.folder.itemcount -eq 0)
write-host $item.title
Then you can use Export-Csv PowerShell Command to export to a CSV file.
More information:
Powershell for document sets
How to export data to CSV in PowerShell?
Using the Export-Csv Cmdlet
Thanks
Best Regards
TechNet Community Support
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
[email protected] -
How to get the 'text' property value of a button in coding?
Hi Experts,
I'm using 10 buttons all are having common action('click'). when i click a button the 'text' value of the button should pass to a function.So the action is same but the passed value will be the 'text' value of the corresponding button. I don't know how to get the 'text' property of a button in coding. Kindly help me to solve this problem.
Thanks and Regards
BasheerHi,
My event is like this.
public void onActionclick(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
String s = ? ; // should get the 'text' property of clicked button
fillInput(s); // function to be called
The called function is,
public void fillInput( java.lang.String id )
String str=wdContext.currentContextElement().getNum();
str = str + id;
wdContext.currentContextElement().setNum(str);
How can i get the 'text' property value of the corresponding button. Click action should be common to all buttons.
Thanks and Regards,
Basheer -
Graph: Get Right Y-Axis value with GetGraphCursor
Hello,
I'm currently developing an application for a customer which contains data being evaluated in a graph control.
There are different scalings of data so I use the left y-axis for digital data and right x-axis for analog data.
Now I want to add an annotation marker with the current X and Y value being displayed, when the user clicks into the graph.
I use those two functions to determine the position and affected plot of the marker:
GetGraphCursor(tabHandle2, TABPANEL_2_GRAPH, 1, &x, &y);
GetGraphCursorIndex(tabHandle2, TABPANEL_2_GRAPH, 1, &plotHandle, &plotIndex);
Now this works fine for the left y-axis, but I can't seem to find a way to get the y-axis value of the right side plot.
I figure plotHandle and plotIndex should help me to get this data, but sadly I don't know how to use this information.Ok to clarify:
I have a graph with plot values on the left and right y axis. Some plots use the left and some the right side.
On default there is no cursor in this graph. But I want to provide the option for the user to enable a cursor.
When the cursor is enabled it snaps on to the closest plot and an annotation shows the respective x and y values of the plot point.
The problem is, when the left y axis is active and the cursor snapped onto a right y axis plot, the displayed y value is wrong (since the left scale is used).
By left clicking into the graph, the user is able to snap the cursor onto another plot.
So the main problem is, when clicking on a plot, the active axis has to change according to the plots respective axis.
I can easily make this decision since the plot styles are different (left side is VAL_FAT_STEP, right side is VAL_FAT_LINE), but for the axis switch to take effect on the cursor, I would need to delete and add the cursor again. But in this process I lose positioning of the cursor and it snaps to a different plot again. -
Urgent: Formular question: get first/last month value with qty value
We've got a query result as the following:
Jan_2007 -- Feb_2007 -- Mar_2007 -- Apr_2007
0 --- 54 --- 0 --- 3
23 ---0 --- 12 --- 7
In the above query result,
1st row shows the sales quantity in Jan_2007 is 0, in Feb_2007 is 54, in Mar_2007 is 0, and in Apr_2007 is 3.
2nd row shows the sales quantity in Jan_2007 is 23, in Feb_2007 is 0, in Mar_2007 is 12, and in Apr_2007 is 7.
We would like to add a new column to get the first/last month value with quantity, e.g., in 1st row, the 1st month value with quantity value (>0) is Feb_2007, and the last month value with quantity value (>0) is Apr_2007. Therefore the 1st month value with qty is Feb_2007 and the last month value with qty is Apr_2007. In 2nd row, the first month value with qty is Jan_2007 and the last month value with qty is Apr_2007. But how to use formular to get the 1st/last month values with qty?
We will give you reward points!Hello Kevin,
You can create forumula using [Boolean Operator|http://help.sap.com/saphelp_nw04/helpdata/en/23/17f13a2f160f28e10000000a114084/content.htm]
IF<Logic Expression> THEN <Expression1> ELSE <Expression2> can also be made using a formula in the form
You can also use the [AND, OR Logical operators |http://help.sap.com/saphelp_nw04/helpdata/en/23/17f13a2f160f28e10000000a114084/content.htm]to check all the keyfigure columns.
Thanks
Chandran -
How to get the iView Property value in NWDS
Hi all,
I my requirement I need to get some of the iView Property Value in NWDS.
Can anybody help me for this?
Helpful answers will appreciate.
Thanks & regards,
Kathiresan RSteps
1. Define the properties in portalapp.xml
<component-profile>
<property name="user" value="asterix">
<property name="personalization" value="dialog"/>
<property name="plainDescription" value="User name"/>
</property>
</component-profile>
2. Within the doContent(request is a signature in doContent) method of your AbstractPortalComponent please
add the following code to access the property:
public void doContent(IPortalComponentRequest request, IPortalComponentResponse response)
IPortalComponentProfile profile = request.getComponentContext().getProfile();
String Name = profile.getProperty("user"); -
How to get bean's property value ?
Hi all,
Hi I'm using JSF 1.2
How can I get and set session bean's property value in request bean action method ?Inject the session scoped bean as managed property of the request scoped bean. You can do this in faces-config.xml as outlined here.
-
Get elements from external sites with rest
Hello!!!
I have a site collection in SPO2013 and i would like to read texts from a Drupal site and show it in my SP site. Is possible to do that with REST? if so, how? Is there some tutorial?
Thanks!!!Hello,
Yes you can create list items inside your SharePoint site using rest api. here is the simple function for your understating,
// Adding a list item with the metadata provided
function addListItem(url, listname, metadata, success, failure) {
// Prepping our update
var item = $.extend({
"__metadata": { "type": getListItemType(listname)}
}, metadata);
// Executing our add
$.ajax({
url: url + "/_api/web/lists/getbytitle('" + listname + "')/items",
type: "POST",
contentType: "application/json;odata=verbose",
data: JSON.stringify(item),
headers: {
"Accept": "application/json;odata=verbose",
"X-RequestDigest": $("#__REQUESTDIGEST").val()
success: function (data) {
success(data); // Returns the newly created list item information
error: function (data) {
failure(data);
you can refer to the article below which explains basic CRUD operations using REST api with simple code examples:
http://www.plusconsulting.com/blog/2013/05/crud-on-list-items-using-rest-services-jquery/
Regards,
Subhash Reddy.
subhash reddy -
Hi All-
I am trying to replace a value from web.xml with one in a weblogic deployment plan. I deployed the application on WL 10.3.2 and used the deployment plan below. No matter what I do it doesn't seem to want to take the value.
web.xml:
<?xml version = '1.0' encoding = 'windows-1252'?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<context-param>
<param-name>TokenGroup</param-name>
<param-value>oldvalue</param-value>
</context-param>
</web-app>
Deployment Plan:
<?xml version='1.0' encoding='UTF-8'?>
<deployment-plan xmlns="http://xmlns.oracle.com/weblogic/deployment-plan"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.oracle.com/weblogic/deployment-plan http://xmlns.oracle.com/weblogic/deployment-plan/1.0/deployment-plan.xsd"
global-variables="false">
<application-name>APPName</application-name>
<variable-definition>
<variable>
<name>TokenGroup</name>
<value>Key123456</value>
</variable>
</variable-definition>
<module-override>
<module-name>APPName.war</module-name>
<module-type>war</module-type>
<module-descriptor external="false">
<root-element>web-app</root-element>
<uri>WEB-INF/web.xml</uri>
<variable-assignment>
<name>TokenGroup</name>
<xpath>/web-app/context-param/[param-name="TokenGroup"]/param-value</xpath>
<operation>replace</operation>
</variable-assignment>
</module-descriptor>
</module-override>
</deployment-plan>
I've also tried other formats for the xpath such as:
/web-app/context-param/{param-name="TokenGroup"}/param-value
/web-app/context-param[param-name="TokenGroup"]/param-value
Any ideas why this doesnt work?
Thanks,
Joe"web.xml"
<?xml version='1.0' encoding='WINDOWS-1252'?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<context-param>
<param-name>name</param-name>
<param-value>Joe</param-value>
</context-param>
<context-param>
<param-name>password</param-name>
<param-value>password</param-value>
</context-param>
<servlet>
<servlet-name>ParameterServlet</servlet-name>
<servlet-class>ParameterServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>ParameterServlet</servlet-name>
<url-pattern>/ParameterServlet</url-pattern>
</servlet-mapping>
</web-app>
ParameterServlet
import java.io.IOException;
import javax.servlet.ServletConfig;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class ParameterServlet extends HttpServlet {
private String dbName = "";
private String dbPassword = "";
public void init(ServletConfig config) throws ServletException {
super.init(config);
ServletContext context = getServletContext();
dbName = context.getInitParameter("name");
dbPassword = context.getInitParameter("password");
public void doGet(HttpServletRequest req, HttpServletResponse res)
throws IOException {
ServletOutputStream out = res.getOutputStream();
res.setContentType("text/html");
out.println("<html><head><title>Basic Servlet</title></head>");
out.println("<body>Database username is <b>" + dbName);
out.println("</b><br>Database password is <b>" + dbPassword + "</b>");
out.println("</body></html>");
"Plan.xml"
<?xml version='1.0' encoding='UTF-8'?>
<deployment-plan xmlns="http://xmlns.oracle.com/weblogic/deployment-plan" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.oracle.com/weblogic/deployment-plan http://xmlns.oracle.com/weblogic/deployment-plan/1.0/deployment-plan.xsd" global-variables="false">
<application-name>virtual</application-name>
<variable-definition>
<variable>
<name>name</name>
<value>akshay1</value>
</variable>
<variable>
<name>password</name>
<value>koul1</value>
</variable>
</variable-definition>
<module-override>
<module-name>virtual</module-name>
<module-type>war</module-type>
<module-descriptor external="false">
<root-element>web-app</root-element>
<uri>WEB-INF/web.xml</uri>
<variable-assignment>
<name>name</name>
<xpath>/web-app/context-param/[param-name="name"]/param-value</xpath>
<operation>replace</operation>
</variable-assignment>
<variable-assignment>
<name>password</name>
<xpath>/web-app/context-param/[param-name="password"]/param-value</xpath>
<operation>replace</operation>
</variable-assignment>
</module-descriptor>
</module-override>
<config-root>C:\DOCUME~1\user\LOCALS~1\Temp\user\.\config\deployments\virtual\plan</config-root>
</deployment-plan>
It works for me... I think your "web.xml" is causing the issue.
Try replacing
<?xml version = '1.0' encoding = 'windows-1252'?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
with
<?xml version='1.0' encoding='WINDOWS-1252'?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
Hope this helps.
-Akshay -
To call a bean function to set a property value with hx:ajaxRefreshRequest
I have an input box
I need to output some text onto an output box,When the input box value changes
I am using Ibm jsf implementation and RSA 7.0,JSF 1.1 implementation
I know how to call a bean property's setter method using this hx:refresh submit and associated behaviours and target actions.
As explained in this tutorial
http://www.ibm.com/developerworks/rational/library/06/1205_kats_rad2/
But my aim is to call a bean function other than the setter method,because i could do some business logic there and give output.This is possible via setters too,but i believe thats a poor programming practice.
Hope ppl have got a clear picture of my problem.
Help me in this.You can use any jsf implementation you want, I suggested you only the steps to accomplish the task but I don't know the components you are using...
You can also accomplish the task without Ajax at all using "classic" http requests but it will be very frustrating for your users...
Catch client side event (input value change) -> fire an action that update the model -> update presentation layer with up to date model values -
Getting a substitution variable value with VB API
Hi,I'm trying to get the value of a specific substitution variable on an application with EsbGetVariable().I get a nice message that says "you do not have sufficient access to get this subsitution variable." and then i get the return code of EsbGetVariable() that is 1051085 (i couldn't find it in any documentation).The funniest thing is that i can get the value of the substitution variable, using Application Manager, with the same Essbase user that tries to get the value in the API.Any help would be welcome...PS : here is the code of the macro i execute (hope it will be readable)...Public Sub ESB_GetVariable()Dim i As IntegerDim nCount As IntegerDim sts As LongDim oVariable As ESB_VARIABLE_TDim hCtx As LongDim AppName As String * ESB_APPNAMELENDim DbName As String * ESB_DBNAMELENDim szApp As IntegerDim szDb As IntegerDim pAccess As IntegerDim X As VariantX = EssVConnect("Feuil1", "xxx", "xxx", "xxx", "Gmo_RvIt", "It_Repr")If X = 0 Then hCtx = EssVGetHctxFromSheet("Feuil1") If hCtx <> 0 Then sts = EsbGetActive(hCtx, AppName, szApp, DbName, szDb, pAccess) oVariable.AppName = AppName oVariable.VarName = "Divers_VR" sts = EsbGetVariable(hCtx, oVariable) MsgBox "status is " & sts MsgBox "Divers_VR value is " & oVariable.VarValue Else MsgBox "EssVGetHctxFromSheet failed with status " & hCtxEnd IfElse MsgBox "EssVConnect failed with status " & XEnd IfEnd Sub
testing formatting ...
0.03965 0.00026 ds ... <save> auth user=nobodyEdited by: gpoz on Apr 18, 2013 12:14 PM -
How can i get the h:selectOneRadio value with javascript
Hi all.
I have this code
<h:selectOneRadio id="color" style="font-family: Arial;font-weight:lighter;font-size: 12px" onclick="showColor()" >
<f:selectItem itemLabel="RED" itemValue="1" />
<f:selectItem itemLabel="BLUE" itemValue="2" />
</h:selectOneRadio>
And javascript function is
function showColor()
var tipoRelacion = document.getElementById("form:color").value;
alert("color" + tipoRelacion);
And what i get is that color is undefined. How can i get the value of the selected radio?
Thanks a lotyou just need to pass this while calling javascript function
check this-
<h:selectOneRadio id="color" style="font-family: Arial;font-weight:lighter;font-size: 12px" onclick="showColor(this)" >
<f:selectItem itemLabel="RED" itemValue="1" />
<f:selectItem itemLabel="BLUE" itemValue="2" />
</h:selectOneRadio>
And javascript function is
function showColor(obj)
var val = obj.value
alert("color" +val);
} -
How do I get a single to appear with rest of album
When I buy singles from iTunes and then buy the rest of the album I can't get the single to appear as part of the album so can't play it as a complete album.
Any ideas?Generally setting a common Album title and Album Artist will fix things.
For deeper problems see Grouping tracks into albums.
tt2
Maybe you are looking for
-
Blocking Goods Receipt for more than one PO
Dear All, We have a requirement. We do not want to do goods receipt for more than one PO.STD SAP is allowing us to do the same. Can we block it ? We want one One Material Doc for One PO .For One PO there can be more than one material docume
-
Proximity Sensor Issue?-Send Feedback
Yes there is an illusive issue with the Proximity Sensor. We can complain. Or we can help. I know Apple does not want people thinking they produce junk. Send Feedback! http://www.apple.com/feedback/iphone.html Describe the conditions when your iPhone
-
CP5 pre-loader questions re: video
Forgive the long post.. I published a Cap 5 project in which the first 4 slides contain short videos. The pre-loader is set to 70%. When playing the course from a server or LMS the initial load ranges from 1 minute to 5 minutes depending on locatio
-
Cannot activate or rejected change list in Integration Builder
I cannot activate any object in Integration Builder, and Activation and Reject buttons are not active in change lists too What can be the reason? PS: there is no problem in Integration Directory. Thanks
-
the sim card inserted in this phone does not apear top be supported, this iphone is not currently setup to work with carrier you attempting to use, please insert another sim card from supported carrier or request that this iphone be unlock