You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Sandor Feher <sf...@bluesystem.hu> on 2012/11/27 13:56:00 UTC

wicket:link + component images

Hi,

I use tinymce as editor, storing the content in a blob field and intro in a
varchar2 field. At my showcontent page I dig this out and display like this:

add(new Label("cikk",new Model(c.getIntro())).setEscapeModelStrings(false));

add(new Label("cikk",new Model(new
String(c.getFullArticle()))).setEscapeModelStrings(false));

...

My showpage.html snippet:
               

So the problem is if I insert some images belong to tinymce component e.g.
emoticons they get broken.
If I put them into intro then it works fine but if i do it the same  into
the content (which is blob) then they get broken.


thnx., Sandor



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-link-component-images-tp4654258.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: wicket:link + component images

Posted by Sandor Feher <sf...@bluesystem.hu>.
Okay. I digged out more deeply.
The bottom line is if the img inside a <p> or a <div> tag then the images
are broken. If there is no surrounding tag or a just a simple <snap> then
everything works fine.
Somehow <wicket:link> ignores those kind of tags.

This works fine.

                <wicket:link>                 
                   <p><wicket:link>
<wicket.contrib.tinymce.InPlaceEditBehavior/wicket.contrib.tinymce.InPlaceEditBehavior/wicket.contrib.tinymce.InPlaceEditBehavior/wicket.contrib.tinymce.InPlaceEditBehavior/plugins/emotions/img/smiley-cool.gif>
</wicket:link></p>                  
                   </wicket:link>
                </div>

But this does not.

                <wicket:link>                 
                   <p><wicket:link>
<wicket.contrib.tinymce.InPlaceEditBehavior/wicket.contrib.tinymce.InPlaceEditBehavior/wicket.contrib.tinymce.InPlaceEditBehavior/wicket.contrib.tinymce.InPlaceEditBehavior/plugins/emotions/img/smiley-cool.gif>
</wicket:link></p>                  
                   </wicket:link>
                </div>

thnx., Sandor



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-link-component-images-tp4654258p4654294.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: wicket:link + component images

Posted by Sandor Feher <sf...@bluesystem.hu>.
The problem has nothing to do with html tags nor the wicket handles
resources. It's related to TinyMCE. 
The editor set this for emoticons
src="../../plugins/emotions/img/smiley-xxxx.gif"
This won't work because the gifs are inside wicket.contrib.tinymce.jar and
they not supposed to be located elsewhere. (Quick hack could be to copy all
the images the path above.)
My solution is to replace src="../../plugins/emotions/img/smiley-xxxx.gif"
with 
src="wicket.contrib.tinymce.tiny_mce/plugins/emotions/img/smiley-xxxx.gif"
before add my Label to the page.
I have a feeling that I spent much more time to solve this problem than it
deserved but my app shines a little bit more :).


regards., Sandor



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-link-component-images-tp4654258p4654332.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: wicket:link + component images

Posted by Sandor Feher <sf...@bluesystem.hu>.
Hi,

(B)LOB is database independent more or less. I use currently postgresql as
db engine but this app should be run on top of oracle db as well. So this is
why I decided to use blob.
But I think it should not be affected to wicket models. I convert byte array
to string and I pass that to the modell then. Both cases the source of model
is string. So it should work in this way too.

thx, Sandor



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-link-component-images-tp4654258p4654262.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: wicket:link + component images

Posted by Sébastien Gautrin <se...@gmail.com>.
Why use a blob rather than a text/longtext field?

Sandor Feher wrote:
> Hi,
>
> I use tinymce as editor, storing the content in a blob field and intro in a
> varchar2 field. At my showcontent page I dig this out and display like this:
>
> add(new Label("cikk",new Model(c.getIntro())).setEscapeModelStrings(false));
>
> add(new Label("cikk",new Model(new
> String(c.getFullArticle()))).setEscapeModelStrings(false));
>
> ...
>
> My showpage.html snippet:
>                 
>
> So the problem is if I insert some images belong to tinymce component e.g.
> emoticons they get broken.
> If I put them into intro then it works fine but if i do it the same  into
> the content (which is blob) then they get broken.
>
>
> thnx., Sandor
>
>
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-link-component-images-tp4654258.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org