When I update a non-jsf component ( normal html ) the element disappears from the rendering and loses its contents

Asked

Viewed 20 times

0

I’m using an element <span> that is using a javascript library on it.

Remember that JSF features only work on your elements

When I run an "update = id_component" (this id_component is a non-jsf component) it loses its contents and some of the view.

Example. A <span> with "contentEditable = true" in its initial state:

inserir a descrição da imagem aqui

When the update is made it is in the following state:

inserir a descrição da imagem aqui

Only the square clean with nothing..

Does anyone know why this behavior...?

  • Exactly what you said. JSF components do not work well with non-jsf components. Exchange span for an equivalent JSF component.

  • I used an h:outputText and it still didn’t work.. I’m suspecting that in the update jsf is cleaning the html and lib js is unable to find the element again to add the previous state. I’m trying after processing to restart the field through javascript to clear it and get back to normal.. But I’m finding it very strange..

  • How is your Javascript code? Remember that the name of the html component generated from the jsf component has an Random name, so you can’t use this information to access it.

  • I capture via class that adds to it.. and has an id assigned by me tbm.. this defined manual changes?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.