Opening of existing data with Primefaces Editor - editor

I have some sample data. I want to open the data(Text) with Primefaces Editor.
How can I do that?

You just need to "connect" it to your bean
<p:editor id="editor" value="#{myBean.myValue}" width="600"/>
look at the showcase
PrimeFaces - ShowCase - Editor

Related

Add tooltip to Excel Add-in Custom Ribbon UI XML

I am creating an Excel Add-In that has a custom Ribbon UI. I would like to add a tooltip for my buttons. What XML attributes can I use to set this?
<button id="insertStuff" label="Insert Stuff" size="large" onAction="InsertStuff_EventHandler" imageMso="AddAccount" />
You can use "screentip" and "supertip":
<button id="insertStuff" screentip="Tooltip title" supertip="Long description" ...
BTW, you should have autocomplete normally when you edit the ribbon XML in VS.
If you don't make sure you have Ribbon schema file available.

Replace ice:selectInputDate with jQuery UI DatePicker

I have a JSF 1.1 with IceFaces 1.6.2 project, where in the form I use <ice:selectInputDate />, but that component uses server resources for rendering Date, I want to change it with JS implementation. How I can do it? I saw that tutorial, but I am a newbie, and I don't exactly know, what files to configure. My implemenation of form is:
<ice:selectInputDate id="genDate"
binding="#{frm_4_20Bean.genDateInput}"
renderAsPopup="true"
highlightUnit="DAY_OF_WEEK"
highlightValue="1,7"
highlightClass="weekend"
required="false"
value="#{frm_4_20Bean.genDate}">
</ice:selectInputDate>
How I can replace it with jQuery UI Datepicker which is described in tutorial above?

create public url to view in portlet

I have simple primefaces portlet, which is connected to the database. I have view (index.xhtml) with the table, which presents all my entries from db (I'm using p:dataTable). I have also a simple view (someView.xhtml), which shows specific information about one selected entry. When I click in the table one entry, browser loads someView.xhtml and page url looks like this:
somepage?p_auth=wRR1tGze&p_p_id=SomePortlet&p_p_lifecycle=1&p_p_state=normal&p_p_mode=view&p_p_col_id=column-1&p_p_col_count=1&_SomePortlet__facesViewIdRender=%2Fviews%2Findex.xhtml
I need to create url which directly shows me page someView.xhtml and get custom parameter from url.
I'm using primefaces 3.5 and liferay 6.2 with bridge 3.2.4.
Thanks in advance.
Marcin
Liferay Faces Bridge has a Facelet implementation of the portlet: JSP tags.
Not sure if that's what you are asking for, but you can do a full page HTTP GET by putting something like this in your facelet view:
<ui:composition xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:portlet="http://java.sun.com/portlet_2_0">
<portlet:renderURL var="renderURL">
<portlet:param name="_jsfBridgeViewId" value="someView.xhtml" />
</portlet:renderURL>
<h:outputLink value="#{renderURL}" />
</ui:composition>

Primefaces Selectors: How to exclude some components when updating the closest form?

I'm using a PrimeFaces commandButton to issue an Ajax request.
I should set the update attribute so that the whole parent form be updated EXCEPT for some specific components (Let's say I've tagged them with styleClass="noupdate").
I'm using PrimeFaces 3.5, so I think PrimeFaces JQuery Selectors may help.
I tried something like this:
<!-- ...some inputs/labels to be updated here... -->
<p:overlayPanel styleClass="noupdate">
<!-- ...some inputs/labels to be updated here... -->
<p:commandButton id="btnDoIt" value="Do it"
update="#(this.closest('form') :not(.noupdate))"/>
</p:overlayPanel>
but it doesn't work (I get a JavaScript Syntax Error).
Is there a way to get what I need?
Notice that:
1) The form id is not known because the button is part of a composite component that can be hosted by any form in different views
2) In my example the <p:overlayPanel> itself must not be updated, but any descendant component do.
3) There are more than one form in the view, and I should work on the "current" one only.
Thank you in advance to anyone can help me.
There's no such thing as this in PrimeFaces selectors. There are definitely no jQuery functions like $.closest() available in PrimeFaces selectors. It has just to be a pure jQuery-compatible CSS selector, not some JavaScript code.
<p:commandButton ... update="#(form :not(.noupdate))"/>
See also:
How to exclude child component in ajax update of a parent component?

not able to find multi select dropdown, only h:selectManyListbox is present

I am looking for a dropdown something like this
I am not able to find any component that suits my need.Only following component is present, but this component is not fulfilling my needs as the data is not showing like a dropdown with multi-select capabilites in it.
<h:selectManyListbox id="option">
<f:selectItems value="#{supportData.states}" />
</h:selectManyListbox>
Please suggest , what shall I do?
you can use SelectCheckboxMenu in primefaces
The primefaces will help you and the showcase is here.
http://www.primefaces.org/showcase/ui/selectCheckboxMenu.jsf

Resources