As the title says, is there any way to import one SSJS library into another? I have a debugging library named debug.jss that I would like to include and use in my other SSJS libraries, but I'm not sure how to go about doing that. It seems like a pretty fundamental question, but I haven't found any answer. Thanks in advance.
At the first line;
import debug;
It will import the second SSJS library.
The related documentation is here.
Related
I'm not usually using Agent in Lotus Notes because I always Lotusscript button only. But recently I need to do a function in Lotus Notes using using an Agent. So in some of an Agent, I found this:
Option Public
Option Declare
Use "ParametersMaster"
Use "CommonFunctions"
Use "Class.QueryString"
Some Lotusscript code...
I don't really understand what are the functions of these "Use" and where to find them. I know this is kinda simple question and I would like somebody help me on this to understand what it is. Thanks!
The "Use" commands loads external script libraries. Usually these script libraries are found in the same database under the Script Libraries design elements.
Refer to the Help in Designer for a much better answer 😀
Does anyone have an example of how to add a field to a Mapped cache extension? I am trying to extend the SalesPrice functionality in 2019R1. It looks a lot like a DAC... but something tells me I cant simply just make an extension for it..
Thanks
Please see below the diagram showing how it works.
In short, you create a generic graph and a class inherited from PXMapppedCacheExtension which will have all the fields that you need for your reusable logic.
Then you declare the mapping to the class and the implementation of the generic graph.
Please find the complete description by the following link.
As I have asked questions in this form - thanks for your many helpful answers - i have found many really neat things that one can do using ExtLibUtil.???? however, other than a bit here and a bit there I have not found anything that gives a listing on the various functions. I one post I read that it is all in the source of the extension Library, and it might be if you really understand where in the source to look. Sure would appreciate a pointer and starting point.
I've been unable to find a JavaDoc for it. The library slipped passed us when we wrote the book - certainly I was not as au fait with Java to be aware of it and all the strength within it. So the best option currently is to look at the source code in Eclipse. Many of the methods are helper methods to easily access things like viewScope etc, which is easy from SSJS but less easy from Java. Most are pretty self-explanatory.
Content assist doesn't seem to work from SSJS, but will from any Java class or, alternatively, open up one of the Java classes created for XPages / Custom Controls under the "local" package in Package Explorer, type "ExtLibUtil." in any method and you'll see the list.
Can somebody give me a use case as to how can the PortletURLListener be used? if it can be used at all?
Like we have ModelListener can we also use PortletURLListener?
Just like in ModelListener we can inject functionality on creation of a model, on update of a model or on delete and so on.
So can we use the PortletURLListener the same way like ModelListener to do
something when a specific URL is called? Any other approach if not PortletURLListener? Since the name is such I thought that could be of help.
And can we use it in a hook? or it is just used by Liferay? Any other practical usecase you have seen or implemented by extending or using this class?
Thanks in advance.
Thanks Mark for the prompt :-)
The PortletURLListener is used e.g. for deploying and undeploying by Liferay core. For more details see Liferay sources for PortletHotDeployListener:
https://github.com/liferay/liferay-portal/blob/master/portal-impl/src/com/liferay/portal/deploy/hot/PortletHotDeployListener.java
Answer after Update:
You can create hook and put servlet.service.events.post=com.my.MyAfterChangeAction propery to the portal.properties. The MyAfterChangeAction class must implements com.liferay.portal.kernel.events.Action.
I would like to read excel file in java. For that no classes are provided by java standard library. I have downloaded required classes but I am not able to import them.
One solution is jsp:usebean but they are near about 300-400 classes so I can't use usebean.
Please suggest another solution.
Do not write Java code in JSP files. There it is not for. Use a real Java class. In this case a Servlet class is the right choice. You can make use of the doGet() method to preprocess requests before displaying results in a JSP file. As it's not entirely clear what you would like to do with the Excel file after all, I can't give a more detailed code example.
To learn more about JSP/Servlets, I can recommend the tutorials at Coreservlets.com.
Good luck.