Experience keeps a dear School, but Fools will learn in no other.
---
Benjamin Franklin - Postal official and Weather observer
Tim Holloway wrote:Patience, grasshopper. We don't get paid to do this.
I can't understand your question. Can you have someone who has good English skills help you make it plainer?
Vadim Baranenko wrote:So why don't you use one bean for this actions?
Vadim Baranenko wrote:Oh, I see. I didn't get it. I assuming that small window is a modal panel? than gust try to rerender only part of the page. Use something like that :
<a4j:commandButton type="button" action="#{somsBean.save}" reRender="idThatYouNeed" immediate="true" value="#{messages.button_Save}"/>
Vadim Baranenko wrote:Sorry, but I don't know how it works in primefaces.
Greg Charles wrote:So "danh muc san pham" means category, and "Sua" means fix (or edit). You want to be able to click on the icon next to a category and see a dialog pop up with the name of the category, which you can then change and save. Instead, the first time you click on a category icon you see a dialog with an empty category name, and the second category icon you click creates a dialog with the name of the first category. Is that the problem you're having?
Greg Charles wrote:OK, that makes some sense. However, I don't think it's really necessary hit the server until the user saves the change to the category name. I'd just use client-side code like jQuery or just plain JavaScript to fill in the dialog. There must be a function to pop up the dialog or make it visible anyway. Why not just pass a parameter into that?
If you're determined to hit the server and update the dialog with a session variable, then Ajax with a reRender is the right thing to do. I haven't worked with PrimeFaces either, but I know I sometimes have a terrible time getting my re-rendered sections to actually re-render. There must be a trouble-shooting guide somewhere, but some of the things I've found is the section must be in an Ajax compatible form like <h:form> or <a4j:form> and there are some limits on what kind of sections can be re-rendered. For example <div> probably wouldn't work, but say, <a4j:outputPanel> would. Actually, the last time I used <a4j:outputPanel>, I had to add the attribute ajaxRendered="true" before it worked. I'm still not sure why.
Good luck! Chúc may mắn! And if you don't mind the suggestion, we really encourage using real names on JavaRanch.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |