IBM websphere portal programatic page creation - java

I am asked to Create a Portal Website on a Button Click
When a button is clicked on Portlet i have to Create a Page and add content and theme to it programatically using the action method of that portlet
However i am not able to find how to do this using java.
Wherever i have seen i could see how to do it on Websphere Portal Admin
I am using http://wpcertification.blogspot.in/ and http://www-10.lotus.com/ for reference and not able to find how to do this .
For example from UI http:localhost:10039/wps/portal
i can do the same by following steps
1. Click on Administration
2. Click on Manage Pages
3. Create new Page
4. Select default Theme for page
5. goto page
6. Add Content or Portlets
Server used: IBM websphere Portal 8.5
Technology: Java /Spring/Portlet
I am still not sure if portletfactory can do the same work as i am totally new To this so can someone guide on how to move forward
Expected End result: create a portal website with few dynamic portlets created on a button click based on some inputs and the website should be saved on a URL.

You will have to use the Controller SPIs for what you want to do. Here are links to the documentation:
http://www.ibm.com/support/knowledgecenter/SSHRKX_8.5.0/mp/dev/ctrlrapic_ovu.html
http://www.ibm.com/support/knowledgecenter/SSHRKX_8.5.0/mp/dev/ctrlrapit_crt_rsrc.html

Sorry for the late answer, but I was finally able to solve this issue with the help of a post by Georgy Gobozov. I used the Migration Script Created by him to handle the page creation -
Page Create Code and Copy.
This really helped me in solving the issue. With this I was able to create pages on runtime and add portlets to them on a button click.

Related

Is this possible make button or link inside workflow form?

Am using alfresco community edition-5.1.x, created custom workflow in workflow form i need to create button or link is this possible? by default activiti eclipse not available button or link please help me out?

Send content / data from internal eclipse browser to a plug in

I am developing both an eclipse plug in and a website. I want this two to interact with each other. The case is the following.
I have an eclipse plug in and I am using the org.eclipse.ui.browser.IWorkbenchBrowserSupport to open an internal browser and point it to a specific url. User can interact with my website from the eclipse internal browser without a problem.
The next thing I want to achieve is if a user clicks on a specific HTML element in my website (through the internal browser) to trigger an event or something and pass information from the internal browser to my plugin. This information can be something like : an element was clicked with properties a,b and c.
You can think it as something similar with the mailto: directive, when clicking that directive the mail client launches.
Any ideas on how i can achieve that? Any insights to point me to the right direction?
I have found this (Create an Eclipse plugin that responds to links in the internal web browser) similar question which is 2 years old.

Managing content in liferay

I am using liferay 6.2 for migrating my existing web application to liferay.I have done below things:
-->created my own theme extending the _styled theme
-->customized the navigation to have fixed sidebar on the left and content area on the right.
-->Added 3 web content display portlets dynamically and added the content into each of them.
I have all the portlets residing on the same page,these are traversed by using navigation bar on the left side. Now I have new requirement to show content depending on the client.
For e.g. I have 3 client's data right now mixed all together across all portlets ,I have requirement to segregate all the content.For e.g. If user logging in work for X client ,he/she should only see the relevant content . If there is some content which is common to all it should be displayed as it is.
There should also be a way to add/remove client at runtime.Is liferay multi-site capability something I can make use of?
How can I go ahead and achieve this? Any inputs will be highly appreciated.

Simple steps to deploy and test portlet in Liferay

I would appreciate if someone could give few easy steps how to deploy and test portlet in Liferay portal. I tried to search of course but some of the tutorials doesn't apply to new versions, some were overcomplicated and some didn't work for me.
I have a one JSR-286 portlet which I want deploy (I have Tomcat bundle on 6.1 version), add it to same page and see if the portlet works. So if you can can give five steps or so how to do this I would be really grateful.
P.S. This seems to me like in the Boromir meme - one does not simply deploy portlet into Liferay:-)
1.)Run the ant deploy script
2).Log in to the
portal with your default administrator credentials
3). On any page,
click Add in the Dockbar and select More
4). By default, the portlet
you just created would be under the Sample category. Click the Add
button next to whatever portlet you just deployed
Good luck let me know if you have any questions
The best way to deploy portlets in liferay is hot deployment.
Check this link.. Surely it will work
http://docs.liferay.com/portal/4.2/official/liferay-portlet-development-guide-4.2/multipage/ch04.html

GWT home page to login page to actual app example redirecting issue

I am truly struggling with this - i have checked all of the other Stack overflow pages and while this may seem like a duplicate question there are NO other answers I can find anywhere besides potentially using multiple modules (even though this does not seem correct)
All i want to do is have a set of static pages making up a website for my main page, the Login page (i plan to use RequestFactory to pull back the user permissions to display stuff for the app from here - somebody suggested in another post such as this to do it from a "Non-GWT" page - that doesn't sound correct to me), and then when the user logs in successfully he gets directed to the actual app with certain things being displayed based on his current permissions.
Now, i have implemented little test projects with multiple JSPs to do redirects using Window.Location.replace("...") but then I have no idea how to actually populate that particular page with what I want to be replaced.
From just 1 GWT app is it possible to have a full web page in static HTML files (or even JSPs i don't care), a Login Page, and the actual App.
And if this is so, How do you do this?
I use RootLayoutPanel.get() to load up my main App - how does it know which RootLayoutPanel to actually use - i've spent hours fighting with this and a lot of the tutorials / answers to the questions don't provide much depth as to how to actually go about implementing anything. There is obviously something i'm just missing
I want to do something exactly like the example in the showcase: https://www.blueworkslive.com/#!gettingStarted:overview
If you use chrome and check the tags every single page on there says GWT 2.4, so it's definitely not like one answer i came across saying "don't use GWT for the login". This seems like it should be something simple that I just... am not finding or honestly am not getting from any of the examples.
This is close to the last step of my project and any help on this would be greatly appreciated.
I'm using Apache Shiro with GAE, Objectify for a database and RequestFactory - there is only one main html page and the app is simply calling getRootLayoutPanel to load the app. not sure if any of that is useful.
implementing the page isn't the issue it's just the redirecting
To login on GAE, via Google account or federated login, you need to redirect your user to login page. Since you run GWT, which usually only has one page, you have two choices:
Do the normal redirect to login page - in this case browser will go to login page and you will loose GWT app state. After login, you can be redirected back to GWT app. As said - GWT app state will be lost. This is the simple way.
Open the login page in child window or iframe. Set destination URL to a page that closes the window (actually it must install a javascript parent hook, that destination page calls). When login is done, destination page calls JS hook, which notifies parent page thet login procedure is over, closes the child window/iframe and continues. This is more complex, some login pages do not like iframes (in case of OpenID login), but it retains your GWT app state.
To answer your question:
Yes it's possible to have multiple pages in a GWT project (GWT pages/modules and static files). Of course, as you navigate from page to page, you will loose app state. GWT module is only "active" as long as page is loaded in browser.

Categories

Resources