-
1. Re: Richfaces 4.3.5 can't override controls of inplaceInput
michpetrov Jul 7, 2014 5:25 AM (in response to desertratx)What makes you unable to set a custom background to the control? If you're seeing the original image use "!important", e.g. background-image: url(…) !important;
-
2. Re: Richfaces 4.3.5 can't override controls of inplaceInput
desertratx Jul 7, 2014 3:14 PM (in response to michpetrov)Judging by my firebug i have this html code:
<span id="j_idt21:j_idt22:inplaceInputBtn" class="rf-ii-btn-cntr" tabindex="-1">
<input id="j_idt21:j_idt22:inplaceInputOkbtn" class="rf-ii-btn" type="image" tabindex="-1" src="/webjsf/faces/javax.faces.resource/ico_ok.gif?ln=org.richfaces" onmouseup="this.className='rf-ii-btn'" onmouseout="this.className='rf-ii-btn'" onmousedown="this.className='rf-ii-btn-p'" name="j_idt21:j_idt22:inplaceInputOkbtn"><input id="j_idt21:j_idt22:inplaceInputCancelbtn" class="rf-ii-btn" type="image" tabindex="-1" src="/webjsf/faces/javax.faces.resource/ico_cancel.gif?ln=org.richfaces" onmouseup="this.className='rf-ii-btn'" onmouseout="this.className='rf-ii-btn'" onmousedown="this.className='rf-ii-btn-press'" name="j_idt21:j_idt22:inplaceInputCancelbtn"></span>
Now as far as i know i can't just change the src of an input via css or am I wrong?
-
3. Re: Re: Richfaces 4.3.5 can't override controls of inplaceInput
michpetrov Jul 8, 2014 4:57 AM (in response to desertratx)Ah right. I was looking on the wrong piece.
You can't change it with CSS but it's possible to change it with JavaScript:
<script type="text/javascript"> $(document).ready(function() { var input = #{rich:component('iinput')}; input.okbtn.attr('src', 'okicon.gif'); input.cancelbtn.attr('src', 'cancelicon.gif'); }); </script> <rich:inplaceInput id="iinput" showControls="true" … />
-
4. Re: Richfaces 4.3.5 can't override controls of inplaceInput
desertratx Jul 8, 2014 12:36 PM (in response to michpetrov)I gonna try that!
The original approach as shown here http://livedemo.exadel.com/richfaces-demo/richfaces/inplaceInput.jsf?c=inplaceInput in the section InplaceInput with customized controls is not possible then with version 4.3.5?
-
5. Re: Richfaces 4.3.5 can't override controls of inplaceInput
michpetrov Jul 9, 2014 6:36 AM (in response to desertratx)That demo is for RF 3.3, demo for RF 4.3.x is at showcase.richfaces.org. The old approach won't work because there is no controls facet, but the "save" and "cancel" methods can still be used.
-
6. Re: Richfaces 4.3.5 can't override controls of inplaceInput
desertratx Jul 9, 2014 7:40 AM (in response to michpetrov)I thought so...
Exchanging the src via java script works fine. Now I just need to find a possibility to nicely exchange the images of all my composite inplaceInputs on my site, but I gonna figure that out on my own
Thx a lot for your help