Sunday, 15 September 2013

tabview - Primefaces scrolling to first message in hided tab -



tabview - Primefaces scrolling to first message in hided tab -

hello using simple tabvies lot of inputs. when sumbiting want scroll view first error. using simple jquery , everythinks works fine, problem when first error showed in tab(for exmaple 2), , tab hided(tab 1 showed). in case ui-message homecoming wird value of offset, homecoming value scroll hided tab. solutions?

code:

$('html').animate({scrolltop: (($('.ui-message-error').first().offset().top) - 10)}, 500); <p:tabview id="tabview"> <p:tab id="tab1" title="1"> <p:inputtext id="value1" value="#{bean.value1}" required="true" ... </p:tab> <p:tab id="tab1" title="2"> <p:inputtext id="value2" value="#{bean.value2}" required="true" ... </p:tab> </p:tabview>

second how bind javascript buttons? maybe jquery click event on class .submit-button or ? think called before action listeners of buttons complete, not good.

primefaces tabview

No comments:

Post a Comment