Thursday, May 31, 2012

Re: Help: GWT Celltable Record (Specific Record Mouseover) ToolTip !!!

Please find the sample code.....

private Column< Contact , SafeHtml> column;

column = new Column<ColluiCuslProxy, SafeHtml>(new SafeHtmlCell()) {

@Override
public SafeHtml getValue( Contact   contact ) {

return getColumnToolTip("column text",     "tooltip text");
}
};


column .setVerticalAlignment(HasVerticalAlignment.ALIGN_TOP);
column .setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT);

----------------------

private SafeHtml getColumnToolTip(String columnText, StringBuilder toolTipText) {

String htmlConstant = "<html>" + "<head><style>" + "A.tip { TEXT-DECORATION: none; color:#1776B3}" + "A.tip:hover  {CURSOR:default;}" + "A.tip span   {DISPLAY:none}" + "A.tip span p {background:#d30300;color:#fff;font-weight:500;border-radius:5px;padding:5px;font-size:12px}" + "A.tip:hover span {border:1px solid #e6e3e5;DISPLAY: block;Z-INDEX: 1000; PADDING: 0px 10px 0px 10px;" + "POSITION:absolute;float:left;background:#ffffd1;   TEXT-DECORATION: none}" + "</style></head>" + "<body>" + "<a href=\"#\" class=\"tip\">" + "(" + columnText + ")" + "<span>" + toolTipText + "</span></a>" + "</body>" + "</html>";
return new SafeHtmlBuilder().appendHtmlConstant(htmlConstant).toSafeHtml();

}


Thanks,
Rajeshwar

On Thu, May 31, 2012 at 10:04 PM, laxman lingampally <lingampall.laxman@gmail.com> wrote:
Hi  Rajeshwar ,

Thanks a lot .

thanks for your answer. 

i am given below code , just see and tell me where i am done mistake.


CellTable<Contact> searchGridCellTable = new CellTable<Contact>();

---------------------------------------
.-------------------------------------
// Add a text column to show the dateLogged.
 TextColumn<Contact> dateLogged = new TextColumn<Contact>() {
     @Override
     public String getValue(Contact object) {
       return object.getDateLogged();
     }
   };
  searchGridCellTable.addColumn(dateLogged, SafeHtmlUtils.fromSafeConstant("<span title='tooltip text goes here'>DateLogged</span>"));

------------------------------------------
------------------------------------------------ 

like this. above code showing Tooltip at Header only,

   but i need only specific record. my cellTable having number of Records.
  can you please tell how can i use, i need to show some values in Tooltip ,(only specific record)

please help me out,

if it passible give me sample code for me .


Thanks & Regards
Laxman


   

On Thu, May 31, 2012 at 4:57 PM, Rajeshwar Mishra <contacttorajeshwar@gmail.com> wrote:
Use  Column<?, SafeHtml> 

Thanks,
Rajeshwar

On Thu, May 31, 2012 at 12:58 PM, laxman lingampally <lingampall.laxman@gmail.com> wrote:
Hi all,

i need a GWT celltable record i.e specific record values in Tooltip ,


In my project i have one search Grid(Celltable) it is having five columns, when ever click on serach button it shows number of recods that is fine,

but , i need to show  some infermation ( like status name , id value like that......) in Tooltip like window.

Any idea or any solution ? 

please help  me out.

Thanks for helping. 

Regards
laxman






--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment