Set Iview Property
Hi All,
I m trying to set the property of an iview like transaction code in a transaction iview...i found many docs to make that possible via EPCD..what i need is to set the iview property..
i have written some code also for that..
Hashtable env = new Hashtable();
env.put(IPcdContext.SECURITY_PRINCIPAL,request.getUser());
env.put(Context.INITIAL_CONTEXT_FACTORY,IPcdContext.PCD_INITIAL_CONTEXT_FACTORY);
env.put(Constants.REQUESTED_ASPECT, PcmConstants.ASPECT_SEMANTICS);
InitialContext ctx = null;
DirContext dirCtx;
List iViewList = null;
ctx = new InitialContext(env);
com.sap.portal.pcm.iview.IiView result = (com.sap.portal.pcm.iview.IiView)ctx.lookup("portal_content/RnDCoKe/ParameterParNew");
I am getting a typecasting exception in the above code..
when i tried to display the returned object it is showing <b>com.sap.portal.pcm.iview.admin.AttributeSetiView</b>
is there anything wrong in my programming??
do i need to set any property in portal??
pls help me as this is so urgent to me...
Thanks..
AD
Hi Alex,
could you solve your issue. I get exactly the same message.
Thanks and regards.
Markus
Similar Messages
-
IView Property: application parameter
Hello,
I have a question regarding the iView property "application parameter": how can I set several application parameters?
For example: first parameter useractionid=UAUSER; second parameter application=V01 - how can I seperate these parameters? with blank, with comma and blank or only comma, semicolon and blank or only semicolon, or anything else?
Thanks
Steffi GründemannHi Steffi,
In the application URL, you can add the required parameters. First parameter followed by '?' question mark then '&' (only AND symbol). See the example below:
http://host:port/testApplication?useractionid=UAUSER&application=V01
Regards,
Satya
[Pls reward points if helpful] -
Setting the property "Cache Level" of the pcd object to "None".
Hi all
I have an EP 6.0 on NW04 SPS 17. I need to solve a problem and found note 960975. My question is, how could we change the setting the property "Cache Level" of the pcd object to "None"? Where should I go? Is it on the NWA, Visual Admin, Configtool or somewhere else?
Many thanks before.
Regards
Agoes
Message was edited by:
Agoes Boedi PoerwantoHi Agoes,
By using the tool Support Desk -> Portal Content Directory -> PCD Administration you can do this. Please note that this tool should only be used in debugging situations.
There is a new section "Release a Unit from the cache cluster wide" in this tool. With this new functionality, you can remove an object from the cache on all nodes in the cluster. If the object is still in use, it will be reread immediately from the database
Releasing the entire PCD cache can severely affect performance. Hence, if there are inconsistencies suspected with a single object, e.g. a role or an iview, the new section "Release a Unit from the cache cluster wide" can be used to evict the given object from the cache on all nodes in the cluster.
Cheers,
shyam -
System option is empty in the url iview property editor
hi
I wanted to create a URL iview. I would also like to specify the System for the url iview. But when I go to the URL iview property editor, when I select the dropdown list next to system, there are no systems listed.
Please explain me how to make the system available for the url iview.
Thanks for the help
-MikeHi,
Can you detail your requirement. URL iviews are iviews in which you can set any URL and the iview will connect directly to it. So, you cannot force set the URL iview to use a System.
I guess you are trying to call some BW report. For this you can try to create an iview based on component
com.sap.portal.appintegrator.sap and then select the application. In this iview you should be able to specify the system.
Cheers!! -
Permanent change of iView property programmatically
Hallo,
I used this code to change iView property from another iView:
private IPcmObject getPcdObject( IPortalComponentRequest pRequest, String pPcdUrl ) throws NamingException
IPcmObjectService pcdFactory = (IPcmObjectService) PortalRuntime.getRuntimeResources().getService( IPcmObjectService.KEY );
Hashtable env = new Hashtable();
env.put( Context.INITIAL_CONTEXT_FACTORY, IPcdContext.PCD_INITIAL_CONTEXT_FACTORY );
env.put( Context.SECURITY_PRINCIPAL, pRequest.getUser() );
IPcmObjectBuilder pcmSrv = pcdFactory.getInitialContext(env);
try {
return( (IPcmObject)pcmSrv.lookup(pPcdUrl) );
catch (NamingException e) {
throw e;
public void onButtonClick_CV(Event event) throws Exception
IPortalComponentRequest aRequest =
(IPortalComponentRequest) this.getRequest();
IPcmObject obj = null;
String iView = "portal_content/Example/com.example";
try {
obj = getPcdObject(aRequest, iView);
} catch (NamingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
obj.getAttributes().put("StartUri","/documents");
obj.getAttributes().put("path","/documents");
..... and when I access property by obj.getAttributes().get("StartUri"), I get right result: "/documents". But this is not permanent change of iView property - when I access this property later, I get old value of this property.
Does somebody knows how to made changes permanent?
Best Regards,
Josef MotlHi All,
I want to read and modify the property of one iview from another iview.
I wrote the following code. but,I am not able to print any property from get method....
How to get and set any property of the iview.
public class MyPortalExample extends AbstractPortalComponent
public void doContent(IPortalComponentRequest aRequest, IPortalComponentResponse response)
IPcmObject obj = null;
String iView = "pcd:portal_content/example/animalselector";
try {
obj = getPcdObject(aRequest, iView);
} catch (NamingException e) {
e.printStackTrace();
response.write("object"+obj.getAttributes().size());
while(obj.getAttributes().getIDs().hasMoreElements())
response.write(obj.getAttributes().get("Change By");
response.write(obj.getAttributes().get("path");
response.write(obj.getAttributes().get("name");
response.write(obj.getAttributes().get(obj.getAttributes().getIDs().nextElement().toString()).+"\n");
i++;
private IPcmObject getPcdObject( IPortalComponentRequest pRequest, String pPcdUrl ) throws NamingException
IPcmObjectService pcdFactory = (IPcmObjectService) PortalRuntime.getRuntimeResources().getService( IPcmObjectService.KEY );
Hashtable env = new Hashtable();
env.put( Context.INITIAL_CONTEXT_FACTORY, IPcdContext.PCD_INITIAL_CONTEXT_FACTORY );
env.put( Context.SECURITY_PRINCIPAL, pRequest.getUser() );
IPcmObjectBuilder pcmSrv = pcdFactory.getInitialContext(env);
try {
return( (IPcmObject)pcmSrv.lookup(pPcdUrl) );
catch (NamingException e) {
throw e; -
Hello,
I have an issue with setting iView Parameters. I do the following:
response.write("Converting...<br/>");
iiv.putAttribute("ApplicationParameter","queryid="+request.getParameter("queryid"));
try
iiv.save();
iiv.notifyAll();
}catch (ValidationException ve)
response.write(ve.toString());
catch (IOException ie)
response.write(ie.toString());
However, when I see the iView properties in the portal the value is not changed. When reading the value programatically, it is changed. Are there two of them or do I have a caching issue here?
I already tried clearing browser cache and so forth, but problem remains.
My code is supposed to change iView-ApplicationParameters..Hi,
I found all information I needed in help.sap.com.
So I wrote a little portal component to update a custom iview parameter and it is working fine for me.
Here's my code:
Sharing References:
<property name="SharingReference" value="com.sap.portal.ivs.api_iview,com.sap.portal.pcd.glservice,com.sap.portal.pcm.admin.apiservice"/>
Custom Parameter in portalapp.xml
<component-profile>
<property name="AuthScheme" value="anonymous"/>
<property name="MTAGCustom" value="Test"/>
</component-profile>
and my Java Code to update(change the value:
Imports:
import java.io.IOException;
import java.util.Hashtable;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import com.inqmy.lib.xml.parser.dtd.ValidationException;
import com.sap.portal.directory.Constants;
import com.sap.portal.pcm.admin.PcmConstants;
import com.sap.portal.pcm.iview.IiView;
import com.sapportals.portal.pcd.gl.IPcdContext;
Code Snippet:
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY,IPcdContext.PCD_INITIAL_CONTEXT_FACTORY);
env.put(Context.SECURITY_PRINCIPAL, request.getUser());
env.put(Constants.REQUESTED_ASPECT, PcmConstants.ASPECT_SEMANTICS);
InitialContext iCtx = null;
try
String iViewID = "pcd:portal_content/com.mtag.test/com.mtag.testcomponent";
iCtx = new InitialContext(env);
IiView myIView =(IiView)iCtx.lookup(iViewID);
myIView.putAttribute("MTAGCustom","newValue");
myIView.save();
myIView.notifyAll();
} catch(Exception Ex) {
Ex.printStackTrace();
I deployed the component and create an IView from PAR. I started the iView in Preview Mode and the Custom Parameter "MTAGCustom" now has the new Value "newValue"
Let me know if it helps (Reward Points are appreciated if helpful
Cheers -
Is their a way to set system property in weblogic console
Hi WL USERS
Is their a way to set system property in weblogic console ie (http://localhost:8080/console) ? if yes, can we access that property in code using System.getProperty()?
Regards
vishyYes, It is Possible.
Please check the Option-1). Mention in the Following Link: http://weblogic-wonders.com/weblogic/2010/03/26/nodemanager-based-managedservers-setting-mem_args/
Here i tried to set a Custom Property "*-Duser.dir=E:/MyDirectory*" through the Admin Console.
NOTE: Setting any Option like JAVA_OPTIONS/CLASSPATh etc through Admin Console will work only when you start your Servers using the NodeManager. It means when you start your ManagedServers through AdminConsole...or Using nodeManager based WLST scripts.
Thanks
Jay SenSharma
http://weblogic-wonders.com/weblogic/ (WebLogic Wonders Are Here) -
Set item property to false and true
when i set item to false and then set item property to true. The item is displayed but its gray out and not enabled. Am i missing something
Set_Item_Property('PUSH_BUTTON_SAVE',VISIBLE,PROPERTY_FALSE);
and then
Set_Item_Property('PUSH_BUTTON_SAVE',VISIBLE,PROPERTY_TRUE);Check the Forms online help on Set_Item_Property, near the bottom in the usage notes. Lots of things happen when you set visible to False:
Setting DISPLAYED to False:
sets the Enabled and Navigable item properties to False
sets the Updateable item property to False
sets the Update_Null item property to False
sets the Required item property to False
sets the Queryable item property to False
So you may need to set more of them back to true in your code when you want to make it re-display. -
How do I set ClientCredentials property to windows credentials?
As per MSDN
http://technet.microsoft.com/en-us/library/92a9678c-bc4f-4d7a-ba44-85989bfe27ca
Building Applications Using the Reporting Web Service and the .NET Framework we have to set Credentials as below
ReportingService2010 rs = new ReportingService2010();
rs.Credentials = System.Net.CredentialCache.DefaultCredentials;
However, after creating the proxy I don't see proxy has Credentials property as MSDN says. The proxy has ClientCredentials property but it is not derived from ICredentials
I'm using http://serverurl/ReportServer/ReportService2010.asmx
How do I set ClientCredentials property to windows credentials in this case?But i dont see "Add web reference" option.
Have you read the link I posted? "Add Service Reference" => button "Advanced" => "Add Web Reference"
to check if the folder already exists
Sure, with
ReportingService2010.ListChildren
Method
Olaf Helper
[ Blog] [ Xing] [ MVP] -
In which function i should set rendered property of components
Hi
Thank you for reading my psot.
it is really making me mad.
can some one tell me which function of a backing bean i should use to set rendered property of some components ?
i tried all of them and none of them seems to apply the rendereing propretiy.It is easy to find out
Add a message group to the Page. Then in each method add
info("At method <method name>");
Run the application and see the results.
- Winston
http://blogs.sun.com/roller/page/winston?catname=Creator -
Restricting the no. of entries in the result set iView
Hi,
Is there a way to restrict the no. of entries in the Result set iView.
Whenever I create a result set iView , it gets loaded with all the entries of the search table it is associated with.
Is there a way to restrict to say 5 or 6 entries.
Best Regards
Sidk
-
Windows installer sets VersionNT property to 603
Hello,
OS: Windows 10 Technical Preview
I've got msi package, which has LaunchConditions based on VersionNT(64) property, but installer sets this property to 603 (corresponding to Win8.1\2012r2). I wrote custom action, where I call VerifyVersionInfo function, and on 9879 build it worked,
but starting from 9926 It doesn't. It seems that VerifyVersionInfo now requires proper GUID in manifest file, that is not possible for binary custom action. What is the proper way to detect Windows 10 version in msi package?
I tried to ask this question at Windows Insider Program, but i was suggested to ask it here.
Thank you.Hello,
OS: Windows 10 Technical Preview
I've got msi package, which has LaunchConditions based on VersionNT(64) property, but installer sets this property to 603 (corresponding to Win8.1\2012r2). I wrote custom action, where I call VerifyVersionInfo function, and on 9879 build it worked, but starting
from 9926 It doesn't. It seems that VerifyVersionInfo now requires proper GUID in manifest file, that is not possible for binary custom action. What is the proper way to detect Windows 10 version in msi package?
I tried to ask this question at Windows Insider Program, but i was suggested to ask it here.
Thank you.
Hello,
1. Windows 10 has not been official released that there is not a solid version for us to detect, and currently issues related to windows 10 are not supported, you could consider submitting this feedback with the
Give us feedback part shared in the following document.
http://windows.microsoft.com/en-us/windows/preview-updates-feedback-pc
2. It's not clear which publishment you are using, if possible, you could share the detailed information like the tool to publish your project and the configuration in that feedback.
Thanks for your understanding.
Regards,
Carl
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
[solved] Using xprop to set a property
xprop(1) has a "-set" option. I can't figure out how to use it. The "surf" browser is scriptable by setting a property named "_SURF_URL" to the URL you want it to load. I've tried these:
$ xprop -id 14680096 -set _SURF_URL http://www.google.com
xprop: error: unsupported conversion for _SURF_URL
$ xprop -id 14680096 -f _SURF_URL STRING -set _SURF_URL http://www.google.com
xprop: error: Bad format: STRING.
(The "id" is the one printed by "surf -x", and is correct, since I can use it to read properties.)
How do I use this?
Last edited by ataraxia (2009-08-12 14:55:01)The -f option isn't that straightforward... see the description of 'format' and 'dformat' in xprop(1).
This should work:
xprop -id 14680096 -f _SURF_URL 8s -set _SURF_URL http://www.google.com -
System not listed in url iview property
hi all,
I am creating an URL iview. In property editor of the URL iview I cannot see not even one system listed. I checked the system, its permission, it does have end user permission.
Can anyone help me to view the system in the url iview property.
Thanks in advance
-PriyaHi Priya,
Here is a complete document on the portal integration of web dynpro applications (NW 2004):
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/d35bb690-0201-0010-988a-d669c8530518
Additionally,
http://help.sap.com/saphelp_nw04/helpdata/en/d8/6ee03fc2269615e10000000a155106/frameset.htm
If you are using NW 2004s,
http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/0c7b2f25-0c01-0010-f2a2-f8a65a9dcad9
Hope this helps.
Regards,
Srinivasan T
Points=>Helpful Answers -
Setting SpaceAfter property with Word ActiveX
I am using the wordreport and Microsoft Word Object 9.0 Object Library instruments to generate a report. I would like set the paragraph Space Before and Space After properties before generating my report. In Word this is part of the paragraph formatting options. I want to set both to 0 for my report. According to the documentation on MSDN, these properties are part of the Paragraph collection in the ActiveX (the following is from http://msdn.microsoft.com/en-us/library/office/bb208789%28v=office.12%29.aspx):
Switching the space before a paragraph between 12 points and none
The following example toggles the space-before formatting of the first paragraph in the selection. The macro retrieves the current space before value, and if the value is 12 points, the space-before formatting is removed (the SpaceBefore property is set to zero). If the space-before value is anything other than 12, the SpaceBefore property is set to 12 points.
Sub ToggleParagraphSpace()
With Selection.Paragraphs(1)
If .SpaceBefore <> 0 Then
.SpaceBefore = 0
Else
.SpaceBefore = 6
End If
End With
End Sub
I cannot find a function in the ActiveX library that sets this property. There are several Paragraph and Selection formatting functions, but none for Space Before or Space After. Is it possible to set these properties through the ActiveX control?
Tony G.Daniel,
Thanks! That's exactly what I was looking for. I didn't realize it was hidden in the SetProperty function. It seems odd that the ActiveX library includes paragraph formatting functions like ParagraphFmtTabIndent and ParagraphFmtSpace1, but it doesn't have explicit functions for SpaceBefore and SpaceAfter.
For the benefit of anyone else who might be following this thread, I had to add a few functions to get some additonal ActiveX collection handles. Here's what the final code looks like:
** GenerateLogFile **
void GenerateLogFile(void)
CAObjHandle DocHandle;
CAObjHandle AppHandle;
CAObjHandle CurrentSelectionHandle;
CAObjHandle ParagraphFormatHandle;
WordRpt_ApplicationNew(VTRUE, &AppHandle);
WordRpt_DocumentNew (AppHandle, &DocHandle);
WordRpt_SetReportLineSpacing (DocHandle, 1);
Word_GetProperty (AppHandle,
NULL,
Word_ApplicationSelection,
CAVT_OBJHANDLE,
&CurrentSelectionHandle);
Word_GetProperty (CurrentSelectionHandle,
NULL,
Word_SelectionParagraphFormat,
CAVT_OBJHANDLE,
&ParagraphFormatHandle);
Word_SetProperty (ParagraphFormatHandle, NULL, Word_ParagraphsSpaceBefore, CAVT_FLOAT, 0.0);
Word_SetProperty (ParagraphFormatHandle, NULL, Word_ParagraphsSpaceAfter, CAVT_FLOAT, 0.0);
// create report using functions like WordRpt_AppendLine and WordRpt_InsertImage
CA_DiscardObjHandle(AppHandle);
CA_DiscardObjHandle(DocHandle);
CA_DiscardObjHandle(CurrentSelectionHandle);
CA_DiscardObjHandle(ParagraphFormatHandle);
} /* GenerateLogFile */
I have one last problem. I've run this program on three different PCs. All three are running the same versions of Windows 7 and Word 2007. And yet on one of the three PCs, the WordRpt_InsertImage function doesn't work. All the other text in the log file is present, but the bitmaps don't get inserted. I thought that maybe there was a difference in the ActiveX control versions, but I can't find a way to determine what version of the ActiveX is intalled on each machine. Or is there something else I should be looking at?
Tony G.
Maybe you are looking for
-
Why would I want to change JPEG quality of photos when exporting them from iPhoto?
Why would I want to change JPEG quality of photos when exporting them from iPhoto? Changing the quality of the print changes the size of the saved file and thus impacts the speed at which it is moved on the internet. But other than size of the file
-
How to use copySubTree in WDCopyService
Hi, I want to copy node elements from node-1 to node-2.. These two node has exactly same structure. These node have child nodes like following:- Node 'Transaction' has two value attributes-> 'tid', 'tname' and a value node 'Combination' which has a v
-
I changed my apple ID email address - can't log out of iCloud
I changed my apple ID email address some time ago - I'm trying to log out of iCloud on my iPad but as 'find my mac' is enabled it wants the password in order to sign out, but the email address is the old one (greyed out); it says password or ID incor
-
When I try to open a new photos in PS Elements that is located in Aperture, I get a programing error "Could not complete your request because of program error" Any idead? I think it is more fo a PS issue but not sure. I can open a folder outside of P
-
"signing in, please wait" message
Whenever I try to log in to adobe story, it shows me the "signing in, please wait..." window, finishes signing in, but then nothing happens. It returns me to the home page of the adobe story and it still only gives me two options "learn more" or "sig