Solved

How to make a link only to a part of a text in JSF

Posted on 2014-04-07
1
166 Views
Last Modified: 2014-04-15
OK, I have a p:commandLink.
This commandLink's' text changes (based on some conditions) from the server side bean. The text string showing in the p:commandLink has this format:

RR999 : The description

RR999 is the link part and "The description" is the description of RR999 which is picked up from a database. RR999 changes like RR891, RR215 RR013 etc.

So my question is how to make the string "RRR999 : The Description" whose ONLY the RR999 part is underlined link and the rest is normal text.

The aboe must be done from a bean.
0
Comment
Question by:prain
1 Comment
 
LVL 35

Accepted Solution

by:
girionis earned 250 total points
ID: 39988075
If you put all the text inside a commandLink element then all the text will be highlighted. You will need to break the text into two components. Have your bean return only the RR999 which you can put inside the commandLink and then have another method in the bean that only returns the description, and put this description outside the commandLink.
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
for loop with Set 4 50
sumDigits  challenge 7 92
ArrayIndexOutOfBoundException 9 83
github account with ecipse 1 48
I had a project requirement for a displaying a user workbench .This workbench would consist multiple data grids .In each grid the user will be able to see a large number of data. These data grids should allow the user to 1. Sort 2. Export the …
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The viewer will learn how to implement Singleton Design Pattern in Java.
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question