1

I've got a command button that should rerender some specific region with AJAX.

<a4j:commandButton ajaxSingle="true" actionListener="#{myListener}"
    reRender="ext" value="myButton" />

As long as the region is defined as

<a4j:outputPanel id="ext" layout="none">
   <rich:panel rendered="#{isPanelRendered}">
      ...
   </rich:panel>
</a4j:outputPanel>

it's working. But unfortunately I can't use rich:panel since it's creating an ugly border that I can't override with CSS.

But when changing to

<a4j:outputPanel id="ext" layout="none" rendered="#{isPanelRendered}">
      ...
</a4j:outputPanel>

Also

<a4j:outputPanel id="ext" layout="none">
   <h:panelGrid rendered="#{isPanelRendered}">
      ...
   </h:panelGrid>
</a4j:outputPanel>

isn't working.

How can I rerender my region, that contains fields and markup, without a rich:panel tag?

  • Using the `` should work. Or did you mean with "isn't working" that it also shows a border? Try `` instead of `` then. – BalusC Nov 25 '11 at 12:34
  • No. Unfortunately it's not refreshing. As soon as I'm switchin to rich:panel it works. But I also need AJAX functionality. I hope that `` can provide that. –  Nov 25 '11 at 14:07
  • `rich:panel` is functionally not the same as `h:panelGrid`, but more as `h:panelGroup`. However, that shouldn't matter. It should work equally good as shown in your last code snippet (only if you fix that typo). – BalusC Nov 25 '11 at 14:10
  • I've tried it now with `h:panelGroup`. On page startup, when `#{isPanelRendered}` is `true`, it rendered correctly. Then I send the AJAX request and it won't get rerendered respectivley hidden. Again, when switching the tag to `rich:panel` it'S working without flwas. –  Nov 25 '11 at 14:19
  • Try replacing `` by ``. – BalusC Nov 25 '11 at 14:21
  • Doesn't work. :-( Btw: The panel is embedded inside an `` tag. –  Nov 25 '11 at 14:33

1 Answers1

0

I had the same problem with the style of the rich:panel after searching on the web I find out this:

<style>
    .rich-panel{
        background-color: transparent;
        border: 0px;
    }
    .rich-panel-body{
        background-color: transparent;
        border: 0px;
    }
</style>

And you can forget about that ugly border you dislike.

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
Luiggi Mendoza
  • 85,076
  • 16
  • 154
  • 332
  • Where do I have to insert this? –  Nov 25 '11 at 09:44
  • You can copy the code and place it at the beginning of your page. If you want something more elaborate, you can create a style.css file and add it in your pages like this: – Luiggi Mendoza Nov 25 '11 at 15:09