jsf - Getting a NullPointerException while Partial rendering via FacesContext -


I have a strange behavior where I am getting NPE while refreshing the page using the context of the face Bean is in the Request Scope then you want to refresh the page after clicking on the command button. I have tried to 'update' but it is behaving strangely on my page. Error: Partial ViewIntex Implave $ ForexServicesVisitClite. Widget: java.lang.NullPointerException

This is my JSF page:

  & lt; H: form id = "form" & gt; & Lt; P: Message autoupdate = "true" /> & Lt; H: Panel grid column = "4" cellpadding = "5" id = "panel grid" sang = "true" & gt; & Lt; P: For output LLL = "s00" value = "# {tk.expense_keyword}" /> & Lt; P: Input Text id = "s00" value = "# {expense.form.keyword}" /> & Lt; P: For output LLL = "s02" value = "# {tk.expense_creatorId}" /> & Lt; P: Input Text id = "s02" value = "# {expense.form.creatorId}" disabled = "# {! Expense.form.canEditCreatorId}" /> & Lt; H: The amount between outputText id = "s10" value = "# {expense.form.amountFrom} and # {expense.form.amountTo}" /> & Lt; H: panelGrid & gt; & Lt; P: Slider = "s11, s12" display = "s10" minValue = "0" maxValue = "1000" style = "width: 200px" range = "true" displayTemplate = "middle amount {min} and {max } "/> & Lt; H: InputHid id = "s11" value = "# {expense.form.amountFrom}" /> & Lt; H: InputHID id = "s12" value = "# {expense.form.amountTo}" /> & Lt; / H: panelGrid & gt; & Lt; / H: panelGrid & gt; & Lt; P: command button value = "# {tk.expense_search}" id = "a01" verb = "# {expense.search}" ajax = "false" instant = "true" /> & Lt; P: DataTable var = "line" varStatus = "loop" value = "# {expense.form.expenseEntryList}" empty message = "# {vaccine expans_table}" id = "datable" & gt; & Lt; P: column headerText = "# {tk.expense_table_creatorId}" & gt; & Lt; H: InputHead = "# {line.oid}" /> & Lt; H: inputtext value = "# {line.creatorId}" /> & Lt; / P: column & gt; & Lt; F: aspect names = "footer" & gt; & Lt; P: command button value = "# {tk.expense_saveAsDraft}" id = "a06" action = "# {expense.saveAsDraft}" /> & Lt; P: Command Button Value = "# {tk.expense_submit}" id = "a07" verb = "# {expense.submitAll}" /> & lt; P: command button value = "# {tk.expense_validate}" id = "a08" verb = "# {expense.validate}" /> & Lt; / Ch: Aspect & gt; & Lt; / P: DataTable & gt; & Lt; / H: form & gt;  

Here when I click on Save as Draft, I want to refresh the page. That's why I'm using FacesContext's method to refresh the page. My method is left here: SDDraft:

  Save public results AsDraft () throws an exception {try {saveAsDraftBody (wrong, incorrect); Add ("Form: Panel Grid"); ** ** ** Getting the error **** getFacesContext (). GetPartialViewContext (). GetRenderIds () Add ("Form: Datasable"); ** ** ** Works fine **** Log.info (this, "getFacesContext (). GetPartialViewContext (). GetRenderIds ():" + getFacesContext (). GetPartialViewContext (). GetRenderIds ()); Return result. UCCC; } Catch (Throbable E) {management error of management (E); }}  

I do not know why this works to refresh the data table, but not for panel grid: (

Firstly you have a bean in the request scope and you are submitting a complete page and here there is no point in partial render. You get the error because you There is a pass component that is basically another form in the form that when presenting the form, the current view Copy will be sent to Bean.


Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -