yo dude have u checked if ur using POST instead of GET? sometimes that messes things up. also, try adding a @RequestScoped annotation to ur bean instead of @ViewScoped. that fixed a similar issue for me once. good luck!
I’ve encountered similar issues before. One potential cause could be improper bean initialization. Ensure your SearchBean is correctly registered in faces-config.xml or through annotations. Also, verify that your JSF libraries are up-to-date and compatible with your server version.
Another aspect to check is the lifecycle of your bean. Try adding a constructor or @PostConstruct method to initialize the query field. This can help diagnose if the problem is occurring during bean creation or value binding.
Lastly, consider adding validation messages to your form. This can provide valuable feedback if there are any conversion or validation errors occurring during form submission that might prevent the value from reaching your backend method.