Embed Link in Text (not with XHTML Mode)

Hi,

My scenario is, I have to display data for some limit and if it exceed, i have to show “see more” link right next to the truncated data.

I was trying to use the Button (with LINK_STYLE) but could not make it possible to place it at proper place. So, I come to know i can do it with XHTML and using the URIFragmentUtility from "
Embed Link in Text
", but i dont want to use this implementaion, also it don’t fulfill the requirment

Any suggestions will be much appriciated.

Thanks,
Aamir

I am still stuck with this issue, can anybody help with this ?

Regards,
Aamir

Hi,

Sorry for the late answer.

Quite a nasty requirement, I must say. This should be doable, of course, but somehow no one has tried to do it before (at least that I know of).

Anyhow, you’re trying to place an actual Button component after blurp of text like this, right?

Lorem ipsum dolor sit amet, consectetur adipisicing 
elit, sed do eiusmod tempor incididunt ut labore et dolore 
magna aliqua... [b]
See more button
[/b]

And it’s unacceptable to place it below the text, right? (just checking, that there are no easy ways out :))

As I see it, your only real option is to put the Label into XHTML mode and embed the link there. This is really a limitation in HTML itself, not Vaadin. The text is inside a block level element, and any content outside that block element pays no respect to the text content inside the block element, hence making it impossible to try to position anything next to the text.

It might be doable with some JavaScript magic, that that’s asking for more trouble.

What I suggest, is embed the link inside the Label, trigger some server event from it using UriFragmentUtility and catch that event to trigger the needed behavior.