All Forums Viewpoint
Douglas 31 posts Joined 06/10
22 Jul 2010
Newbie Portlet Deployment Questions

First Question:

I am currently developing portlets using the viewpoint pdk on windows. I am trying to deploy it on the production viewpoint server that is on Linux. To deploy the portlet onto that machine, is it the same as deploying it on my windows machine. I mean in terms of using the build script using ant or is there another way that you deploy them.

Second Question:

Is there a way that I can deploy a portlet on the production server and have it not be visible by anyone except me? I have administrative access if there is a setting to be modified.

Douglas 31 posts Joined 06/10
22 Jul 2010

also is there documentation that goes more in depth than the api documentation in terms of explaining what each variable means such as explaining at what point the request collection time is actually computed or explaining a functions return value like when it returns a time and all that is said is that is returns a float but does not say in what format ex. seconds milliseconds.


dfu 22 posts Joined 09/09
23 Jul 2010

I'll attempt to answer some of your questions

Q1: You should be able to drop your WAR into the /opt/teradata/viewpoint/viewpoint-working/liferay-autodeploy dir on the production server.

Q2: You can prevent the portlet from showing up for anyone but you by going to: Admin->Roles Manager and creating a role with only your user in it with the portlet enabled.

Q3: The documentation for some of the components are not as robust as we like it. If you can provide the classes and methods you are interested in, I might be able to get some extra details for you.

Douglas 31 posts Joined 06/10
26 Jul 2010

If I put the WAR into there will it cause it to update the server or will i need to restart it for the new portlet to show up?

dfu 22 posts Joined 09/09
26 Jul 2010

The server will update automatically.

Douglas 31 posts Joined 06/10
28 Jul 2010

There is a function in the SessionDAO called getRequestCount that takes the system id and two timestamps. This functions return type is an integer but it says in the API documentation that it returns an iterator for the sessions. Can you clarify this? Does it mean that it can return an iterator for all the sessions that made requests between the two timestamps or ?

Here is the API explanation


int getRequestCount(int systemId,
java.sql.Timestamp startTime,
java.sql.Timestamp endTime)

Gets the current total request count.

systemId - the system id.
startTime - the start time.
endTime - the end time.
an iterator for the sessions.

dfu 22 posts Joined 09/09
28 Jul 2010

That is a typo in the documentation. The return value is "int", which is the request count for that period of time for that system.

Douglas 31 posts Joined 06/10
05 Aug 2010

I am trying to develop a table widget that when you select a row from the table it will call a function in my view controller. I am using the tablewidget example from the widgetopia portlet but I dont know who to inisialize the urls for the drill down.

TableWidget result = new TableWidget();

// Define the columns
TableColumn[] columns = {
new TableColumn("color", null, null, ColumnType.STRING),
new TableColumn("shape", null, null, ColumnType.STRING) };

// Define the data
Object[][] data = { { "red", "square" }, { "blue", "rectangle" },
{ "green", "oval"} };

// Define the drill-down URL for each row
// How do I tell the Table Widget to use these?
String[] urls = { "/TopWorstQueriesPortlet/dataserver/executeQuery",
"/TopWorstQueriesPortlet/dataserver/executeQuery" };

return result;

Douglas 31 posts Joined 06/10
22 Sep 2010

When I deploy my portlets onto the production machine they are all put under the sample tab in the portlets menu. Is there a way to have it deploy under a different tab.

stever 149 posts Joined 08/09
22 Sep 2010

You can change the "category" setting in the viewpoint-portlet.xml file. The PDK documentation has more detailed information about this file:

Douglas 31 posts Joined 06/10
10 Nov 2010

I am trying to deploy my portlets under another tab called "Custom". That tab doesn't exist and when I specify "custom" in the catagory field in the viewpoint-portlet.xml file it doesn't create that tab automatically it just puts my portlet into sample. I there a way I can create that tab?

stever 149 posts Joined 08/09
12 Nov 2010

Actually, the category setting is only half of the puzzle. This will affect only where the portlet shows up in the Portlet Library. To change the category in the Add Content menu, you must also change the liferay-display.xml file.

Douglas 31 posts Joined 06/10
19 Nov 2010

Also is there a way to change the name of the portlet without having to create a new portlet and rename all of the files and variables?

Douglas 31 posts Joined 06/10
22 Nov 2010

How do you delete a portlet from the server since I changed to portlet over to a new section in the add Content tab it is giving me a warning about not being able to find the old one.

dfu 22 posts Joined 09/09
22 Nov 2010

If you just want to change the "Display Name" of your portlet, edit viewpoint-portlet.xml and change the "label" for the portlet tag.

To delete or undeploy a portlet, type "ant undeploy" from your portlet src directory, or go to YourViewpointServerInstallDir/webapps/YourPortlet and delete the YourPortlet directory.

You must sign in to leave a comment.