Foren

Open list with button

Luca Lupo, geändert vor 11 Jahren.

Open list with button

Regular Member Beiträge: 106 Beitrittsdatum: 01.10.12 Neueste Beiträge
Hi Guys,

I'm still new of Liferay and I do not have a lot of experience, especially regarding the view layer. I hope you can help me.

I have to create a button (aui or not?) on a portlet (jsp side) inside a form. By clicking on this button i would like to open (as a sort of popup) a list of entries. Every row is a icon. I try to attach a picture to explain better.

https://dl.dropbox.com/u/1127848/Screen%20Shot%202012-10-07%20at%202.56.46%20PM.png

However, instead icon and text i will use only icon.

Do you have any idea about doing that?

Thanks,

Luca
thumbnail
Paul ., geändert vor 11 Jahren.

RE: Open list with button (Antwort)

Liferay Master Beiträge: 522 Beitrittsdatum: 29.08.11 Neueste Beiträge
The easiest way I could think of is to use the code similar to add_asset.jspf
There is varaible 'message' that contains the text. To render the list, the tag
<liferay-ui:icon></liferay-ui:icon>
is used, you can pass the
message
attribute as "empty" so the code will look something like:

<liferay-ui:icon message="" src="<%= assetRendererFactory.getIconPath(renderRequest) %>" url="<%= taglibEditURL %>" />


Hope it helps
Luca Lupo, geändert vor 11 Jahren.

RE: Open list with button

Regular Member Beiträge: 106 Beitrittsdatum: 01.10.12 Neueste Beiträge
Thanks Bart...I'm trying with that...but it seems that it is not possible to use custom images emoticon
thumbnail
Bart Simpson, geändert vor 11 Jahren.

RE: Open list with button

Liferay Master Beiträge: 522 Beitrittsdatum: 29.08.11 Neueste Beiträge
In my comment above, the line
src="&lt;%= assetRendererFactory.getIconPath(renderRequest) %&gt;"
contains the source of icon image. You can change it to you'r custom value and should be able to get the custom image.
thumbnail
Tanweer Ahmed ., geändert vor 1 Jahr.

RE: Open list with button (Antwort)

Expert Beiträge: 322 Beitrittsdatum: 11.03.10 Neueste Beiträge
Luca Lupo:
Thanks Bart...I'm trying with that...but it seems that it is not possible to use custom images emoticon


Hi Luca,

Try the below Tested solution

In JSP,
<liferay-ui:icon image="yourImage" message=" " url="put your url here" />


In Themes,
GoTo YourTheme/images/common And put the yourImage.png image there.

Make sure the image format is png.

Let me know if this helps.


Regards,
Tanweer,
LIUG Member