Hello,
not sure this is the right forum because it is not really specific to richfaces but JSF generic problem. I want to write a perf test with jmeter. In a page I have the following link:
<h:commandLink value="Refresh" action="#{postBean.resetRecentPosts()}"/>
If I click the link in a browser I see a POST request with the following parameters:
j_idt6:j_idt6 javax.faces.ViewState:### 'j_idt6:j_idt16':'j_idt6:j_idt16'
ViewState is extracted from page and set correctly, that is not a prblem. The problem are the j_idt# values. My understanding is that if page changes these numbers can happily change so the test I have will need to be changed to match the new values. Is there any way to hardcode these numbers in JSF so that even if page changes at some point these stay the same? It is really a pain to extract these values from pages, especially when commandLink is involved.
Thank you!
Use an id for the button and the form.
Like this:
<h:form id="tForm" prependId="true"> <h:commandLink id="cLink" value="Refresh" action="#{postBean.resetRecentPosts()}"/> </h:form>
That will generate something that is more clear for you to read.