Sonntag, 10. November 2013

Hilton Santo Domingo

In August 2013 I was three 3 days gust in the Hilton Santo Domingo. The Hotel is on the promenade called Malecon. I enjoyed my stay. The lobby and the personal for the Check-In was charming.
I had a double room with ocean view.
Hilton beds are a dream. And the view on the Atlantic ocean from my 16th floor room was amazing. You can see the promenade Malecon.
The hotel has a Bar with drinks you know from Europe like Caipirinha and there are free nuts and chips served to the drinks.
There is a small pool. It is a pool where you can get some coolness but you will not spend the whole day there.
Behind the pool there is a view on Santo Domingo:
Around the hotel you can walk but I would not recommend it. There is nothing interesting near the hotel and tresspassing the street to the Malecon is in my eyes a little adventure.
I booked without breakfast and the next time I will book with breakfast. For breakfast there is a buffet with fresh made pancakes and eggs by the chef. Very delicious…of course juice, coffee, ham and the other parts of continental breakfast could be found there as buffet too. The room was clean, the personal nice. I was happy with my stay and in January 2014 I will visit it too. The nexttime I will book in advance with breakfast because it is cheaper.

Iberostar Dominicana in Punta Cana, Dominican Republic

I was two times in the Iberostar Dominicana Hotel in Punta Cana in the Dominican Republic and I was two times very satisfied with my stay. This hotel is on the same area with its twin hotel Punta Cana. It is a Hotel with nice personal and good food. Tourists are from the entire world: Europe, Russia, South America and of couse USA and Canada. Animation is good although I personally do not need much animation. There are Juniorsuites that are in bungalows. Each bungalows has 4 Juniorsuits. The normal rooms are in the main building which I personally prefer. Not because of the price – the difference between Juniorsuite and normal room is very small – but I like big building. The big difference between a normal room and an Junior Suite is the bathroom. The Juniorsuite has a bathtub and the normal room only a shower. This is a normal room.
It is in the main building:
A wonderful view from the normal room to the garden of the hotel. The building behind the palms is the twin hotel Iberostar Punta Cana.
And you get one time fruits as a gift from the hotel.
Two pictures of Junior Suite:
And some animals you can find are the famous 3 Flamingos:
Pool is nice and there is the whole day until 18:00 Animation there and at beach too. I personally go for beach and no for pool but pool-fans will be happy in this hotel too.
The beach of Punta Cana is super, these picture are in front of Iberostar Dominicana made:
I can recommend this Hotel and I will visit it again in January 2014. ;-)

Sonntag, 14. November 2010

Open word from java

One easy way to open a certain doc-file from java is here:

public void open(){
Runtime rt= Runtime.getRuntime();
try {
String path="C:/Program Files/Microsoft Office/OFFICE/WINWORD.exe";
String filename="C:/test/myfile.doc";
Process p =rt.exec(path+" "+filename );
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}

Montag, 4. Januar 2010

Caching problem with JavaScript or what else ?

This is an show-case application wich demonstrates a problem.
It consists out of 2 portlets that communicate with each other through IPC.
The whole application is created with ICEFaces 1.8.0 and runs in Liferay 5.22.

In the left portlet an entry from the menu is selected, and the corresponding values are shown in the right portlet. The content in the right portlet is served by a managed bean. The content itself contains much JavaScript, so you can say the managed bean delivers JavaScript-code.







The belonging values to the users selection are showed in the right portlet.
The user chooses an value from the select-menu.
The values of the right portlet - let us call them items - are in an array,
the items array.


var items = new Array();
items[0] = Array('id1','100');
items[1] = Array('id2','200');






If the user clicks on an item, the correspondning value should be shown.
As defined in the items array this is :


100 for item1


200 for item2


If the user click on the id the value is shown in green. In the picture the value 100 is shown for item1.

The function showValue() which has access on the items array prints the corresponding value:


function showValue(number){
document.getElementById('value').innerHTML=""+items[number][1]+"";
document.getElementById('value').style.color="green";
document.getElementById('value').style.paddingTop="25px";

}


The items of the right portlet are defined by html in the following way:


<tr>
<td onclick="showValue('1');">item1</td>
</tr>
<tr>
<td onclick="showValue('2');">item2</td>
</tr>





Problem

Above is described as it should work, but it does not. As mentioned before the workflow is the following:


The user selects an entry in the left portlet, JavaScript-Code is generated in the bean and is setted to the right portlet, and then this is rendered with the ICEFaces mechanism defined though the interfaces Renderable and DisposableBean.
After the render the item in the right porlet are available - as it should be - but the showTable() function doese not work. After an refresh with F5 the function works as it should. It has to be mentioned, that after the render with the ICEFaces-interfaces the showTable HTML-JavaScript code is available and correct but does not work. An explicit refresh with F5 is necessary to get it to work.


Has anybody an idea for the reason?



In this picture you can see further strange behaviour.
If the user select the second entry in the left portlet, the corresponding items are correctly shown in the right portlet. But if you click on item1 it shows the value 100 for the item1 from the last selection insteaf of 333 for the actually selection.


So this behaviour leads me to this point:

The items array with the values that the user sees differs from this one the function showValue() uses. The items array the user sees is the actually one, but the one the function showValue uses is the old one.


Is this a cache problem? And if yes, how to update the items value in the cache? Is this only through F5 possible? The disadvantage with F5 is that all portlets are rendered new on the page instead of the desired ones if it is when using the ICEFaces Renderable and DisposableBean.

The Eclipse-project and the war file is available here:

Liferay-Forum

Best regards,

Gaston

Freitag, 31. Juli 2009

Request missing 'ice.session' required parameter. Dropping connection

You are using icefaces version 1.8.0 and have this problem?
The solution is, just upgrade to version 1.8.1 because this is a bug...

It would be great if all problems could be solved like this ;-)

Montag, 27. Juli 2009

How to access ThemeDisplay from a bean in liferay?



public ThemeDisplay getThemeDisplay(){
FacesContext context = FacesContext.getCurrentInstance();
PortletRequest portletRequest = (PortletRequest)context.getExternalContext().getRequest();
ThemeDisplay themeDisplay = (ThemeDisplay)portletRequest.getAttribute(WebKeys.THEME_DISPLAY);
return themeDisplay;
}

Samstag, 25. Juli 2009

Redirect users in liferay to their private page

Imagine you want that a user after logging in the liferay portal is redirected to his private area. How you can achieve that?

Very easy:

Just add the entry

auth.forward.by.last.path=false

to the portal-ext.properties file

You don't know where the portal-ext.properties file is?


Here:

[liferay-portal]/[servletcontainer]/webapps/ROOT/WEB-INF/classes

If this file does not exist create it please.


Ready!