Jump to content

Recommended Posts

Posted

Say you have project with folder afdb, and you want  to create afdbtooltip

 

Create afdbtooltip.xhtml,

 

in header

<xmlns:composite = " h t t p : // java . sun . com / jsf / composite"> <!- give without spaces ikkada link vastondi anduke changed -->

<h:body>

<composite:interface>

          <composite:attribute name="afdbkey" type="java.lang.String"/>

</composite:interface>

 

<composite:implementation>

        <!-- write your form code here -->

     <h:form>

           <h:link outcome = "#{cc.attrs.afdbkey}">

                 <h:graphicImage >

           </h:link>

      </h:form>

</composite:implementation>

</h:body>

 

 

In your xhtml .. in header give this

 

 

xmlns:afdb="h t t p : java . sun . com / jsf / composite / afdb"  <!- give without spaces ikkada link vastondi anduke changed -->

 

and give this in your code

 

<afdb:afdbtooltip afdbkey="SpiderReddy.xhtml" /> <!-- this will store the value in custom component to navigate to spiderreddy page -->

 

Posted

 

Bhayya that what i need..

 

p:dialog id="ABC" widgetVar="ABC" header="Header Menu "
                        dynamic="true" showEffect="clip" closable="true" onShow="checkEscape()" height="150" width="500" resizable="true">
<f:facet name="header">
                <p:graphicImage id="icon" url="/resources/images/question_mark.gif" />
                <p:tooltip for="icon"  value=" absdfj. " />
                        </f:facet>
                 <ui:include src="/../../xyz.xhtml">
                        <ui:param name="" value="#/>
                        <ui:param name="" value="#"/>
                    </ui:include>
                </p:dialog>
 
i did that but i am getting question mark img.... but i dont see the header text.. the image should be beside Header Menu text...

 

 

instead of using it as graphicimage use it as command button

 

<p:commandButton actionListener="#{buttonView.buttonAction}" id="iconOnly" update="growl" icon="ui-icon-disk" title="Icon Only" />
 

see this link

http://www.primefaces.org/showcase/ui/button/commandButton.xhtml

 

also you will have to play around with css to show its as just ? instead of button with ? symbol.
 

×
×
  • Create New...