Getting the node icon from tree view in SAP GUI Scripting - sap-gui

I want to automate the FEBAN transaction. Once the tree view is loaded, I am able get all the nodekeys. But I want to get the image/icon along with the text to identify whether its successfully posted or not. I tried getabapimage, getnodeabapimage methods and iconname property. But I am unable to fetch it. Where am I going wrong how to fetch the icon details in GUI Scripting.
Edited:-
I have included the FEBAN screen print. I have also included the code that I used to fetch the text details.
Thanks.
Subramanian S.

Related

Reading a PDF back from an iFrame?

I have a PDF document that is getting generated on the fly, and rendered on the fly to an iFrame within a radwindow. Basically the document is already largely prepopulated, however the user will still have a chunk of information that they are required to enter. I've found a good amount of information about sending a pdf TO an iframe, but not much information about going the other way. I have a button within the radwindow that can access the iframe object, however I'm somewhat lost as to where to go from there.
EDIT: The PDF is an editable form. I'm trying to pull back the entire PDF document as is, after the client side makes their entries to the form.
I think you'll need to send the file to the user so they can edit it locally and instruct them to upload it.
The content-disposition header with value attachment can help with the first task and you can use RadAsyncUpload to upload it: http://demos.telerik.com/aspnet-ajax/asyncupload/examples/overview/defaultcs.aspx.
I am not aware of ways to tap into the PDF viewer plugin the browsers use to show the PDF. Perhaps there is API from Adobe or some other third party plugin but that would rely on them and is out of your control.
Perhaps the JS PDF viewer from FireFox has something: https://mozillalabs.com/en-US/pdfjs/ but I don't know how stable and usable it is.
As per what was described in the comments, I ended up using postbacks through the PDF's themselves along with 1 pixel fields to store data required to identify the documents. It's a little hacky, but functional. I'm leaving this as an actual answer as this is as close to a real solution to the problem I originally had. This has been up and running for close to 4 years in this manner, and thus far hasn't caused any issues.

Extension to the page icon status in SDL Trdidion 2009

We are using SDL Tridion 2009 SP1.
We have implemented a new functionality, an extension in our CMS which allowed us to lock a page.
If a page it is locked it cannot longer be published ( the information of a page that is locked is kept in a database which was created for this extension).
We want to add a new icon which will notify the user on the new status of the page.
Now there are 4 combination of icons ( no action , checked , published , checked and published )
Since I do not have a long experience with the CMS interface I want some help on finding a solution that have no impact on performance and
that it easy to implement in terms of not doing of lot of modification.
Below is my investigation regarding this:
I noticed that the way the icons are render in the cms is not a simple mechanism that can be easy updated.
Each time we click on an item in the left side of the CMS, in order to render the list from the right side a ajax call (with an xml request) is done to the WebGUIResponder.aspx. page.
The response we will get back is a xml that contain the attribute field Icon
<tcm:ListItems xmlns:tcm="http://www.tridion.com/ContentManager/5.0"
ID="tcm:yyy-zzzz-4" Managed="68" ItemType="4">
<tcm:Item ID="tcm:yyy-zzzzz-64" Type="64" Title="NotificationTest"
Modified="2011-05-09T09:42:27" FromPub="400 YYYY Website Master (EN-GB)"
IsNew="false" Icon="T64L0P1"/>
</tcm:ListItems>
Based on this field Icon attribute (Icon="T64L0P1) the image name starts to be processed.
T64 = means it is a page
L0 = is not checked
P1 = it is already published
For such a field the image name result will be = T64.16x16.List.Published.gif
I couldn't find a way to update this field through the page xml, is not an information that is kept in the xml but rather is build in the dll when the
xml request . (Somewhere based on other fields like published and something else this Icon field is calculated.)
So if it is not possible to modify this field the option we may have is:
In order to integrate our change in the CMS without modifying their .dll (this for compatibility with the new version of the SDL Trdion is not good to modify in the dlll)
and without changing too much the logic I was thinking to this approach.
We can make a new Ajax call to a a new page WebGUICheckPageLocked.aspx (need to be tested what will be the impact on the performance).
In the code behind of this page we can determine if the page is locked or not ( used our internal function that determine if the page is locked or not this functionality is already done).
In the page we will change the icon field to something T64L0P1E01 (adding some extra information which will allowed us to determine the new status of the page ).
We will also modify the In the GetPNGIconName javascript function we can then make an extra check taking in consideration the new information E01 ...)
Please if someone have some better idea on this, maybe it is something easy that can be done, maybe it is a way we can update the Icon field.
Kind Regards,
Cristina
I'll paste my answer from the forums here, so everyone can see (and maybe bring ideas on how to do it differently?)...
In 2011 I would use a Data Extender to change the icon.
Since this is 2009 you will need to use the less elegant predecessor: the GUI Responder Extension.
Essentially you need to manipulate the XML that is returned for the relevant requests (such as the GetList on a Folder).
I couldn't immediately find any documentation on this - which is not surprising as it is an older version. But it boils down to this:
Create a .NET assembly containing a class with the following method signature and attribute:
[ResponseMessageHandler]
public XmlDocument HandleMessage(XmlDocument messageXml, string userName, HttpContext httpContext, object tcmSession)
In that method, you can change the icon set in the XML based on your own logic.
In the extension configuration file, add a section to hook into the response for the lists you care about
(substitute "YourResponderExtension.dll" with the name of the assembly you added):
<ProcessResponse>
<!-- GetList -->
<ExecuteWhen>/tcmapi:Message/tcmapi:Response/tcmapi:Request/tcmapi:GetList</ExecuteWhen>
<!-- Handler for all of the above -->
<Execute>/bin/YourResponderExtension.dll</Execute>
</ProcessResponse>
Add more elements before the if applicable - and make the XPath query as specific as you can to avoid your extension being called unnecessarily. You might also need to check for more cases in the .NET code that you can't do with the XPath query.
ZIP up your extension and deploy it with TcmExtensionInstaller.exe.
From your text I'm assuming you've already worked out how to create and package an extension in 2009.
I hope that these smalls steps can get you started.
If you have any trouble or follow-up questions, just let me know and I'll see if I can answer them.

Create dynamic PDF in Flex

Trying to understand from a high-level how this would be accomplished.
Use case:
Flash application embedded in HTML used to create Certificates (just an example).
User enters a bunch of data into a form (Name, Address, What certificate is for, etc.).
User clicks a button which causes the application to create a Certificate in PDF form, with the form data displayed in a format that I define with a bunch of different images).
Ideally, Flex could use the browsers functionality to prompt the user with "What would you like to do with this document, 'Download', 'Open'. So it would function just like clicking on a link to a PDF document inside of a web page.
I already have the form and everything, its just a matter of how I create a PDF from that data. Is there a certain function that can take the current screen and create a PDF image of it? Or is there a certain library for creating PDFs? If anyone can point me in the right direction it would be much appreciated.
There is a AS3 PDF generator library called AlivePDF and can be found here.
Purepdf
is another actionscript library for creating Pdf file.

Performing function on node click in tree and then showing results in text box

I have a tree object which is bound to an XML list. The XML list contains a name for the type of code I have written (e.g. IM client) and also a path to the file where I have some code.
When the user selects a node's child in the tree, I want to load the file from the path of the selected node's child and then show the text in a text box.
How can I go about this? Is it possible without a server side language?
Thanks
All the relevant files are sitting on the server (e.g. code samples). I don't need to get anything from the user's PC.
You need to use HTTPService or a similar object to make a call to your server and when loading is complete you can display it.
Flash is really restrictive on fetching files from the user's computer. To get around this, I have an application running on the user's computer that acts as the middle man between my Flex app and the files on the computer.
Edit: If you want to load files that you have on the server, then you would need something on the server side to relay that information back to your flex app. Flash runs in the browser, on the client-side, therefore it really doesn't have knowledge of where it actually lives.
Though, since you have those file paths, could you just put a relative path from the root of your server on the end of your domain name to find the files?
http://domain.com/path/file.jpg
It's hard to give a solution without knowing the XML data structure. However, a good place to start is to listen to the tree's change event. You can then get the selectedItem from the tree and that should be the XML node which was clicked.
You say you should have a path to the file at this point, so it's just a matter of loading the file with a request using the URLLoader class.

ASP.NET component that allows online Annotation of PDF files

We are trying to develop an application to view and annotate PDF files in ASP.net.
The function involves capturing x,y coordinates from a click and placing the annotation on that specific location.
Are there available components to do this?
Thanks in advance.
I am not sure I have enough information to provide a specific answer to your question, but perhaps this info can get you started...
If I understand correctly, you are going to provide some UI that will enable the user to point to the location of the annotation when viewing the document, then you will modify the PDF on the server, and render it with the annotation at the point selected by the user.
Perhaps one way you can capture mouse input to enable the user to select the location of the annotation is to render an image of the PDF document page and show it on the page, and then capture the mouse location on a click event.
Then, if you have the annotation and the desired location, you could use a PDF library to update the PDF and draw your annotation into the document on the specified page at the specified X,Y coordinates.
We are using a PDF generation library that we are very happy with to render PDF documents on the web server, which we deliver to the browser via our ASP.NET application.
You might want to take a look at this product and see if it can meet your needs:
DynamicPDF from ceTe software: http://dynamicpdf.com/
Hope this helps.
We are also looking at this and found this Java applet which does the job very well.
I've used iTextSharp in the past, to annotate PDFs of Piping & Instrumentation diagrams - worked rather well.
We have also looked at jPDFNotes at qoppa, and had good results with it.

Resources