I get this value always null
up vote
0
down vote
favorite
I have this method in my backing bean, when the user click the bottom this method will be called in order to get the values and update these value in the DB.
public String doApproverActionSendForAwardTeam()
IIMDelegate iimDelegate = new IIMDelegate();
try
if (isUpdateMode)
addIdeaDto.setIdeaId(hiddenIdeaId);
addIdeaDto.setSendForAwardNotes(addIdeaDto.getSendForAwardNotes());
addIdeaDto.setStatusCode(7);
if (addIdeaDto.getSendForAwardNotes() == null)
addInformationMessage("enter the note...");
return null;
iimDelegate.approverActionSendForAwardTeam(addIdeaDto);
addPointForApprover();
addInformationMessage(" Done ...");
return "goSearchIdeasApproverUI";
catch (Exception e)
e.printStackTrace();
addErrorMessage(" Error...");
return null;
The problem is when i click the bottom if the input text is empty the message show in order to enter the value and after I enter the value is stay same the message it show and show , it mean that there is no value for this input and the method not complete the execution.
I make sure that the value bind right but I do not know why its happend like that, it is not first time to use the information message.
this is the jsp page:
<tr>
<td><rich:panel>
<f:facet name="header">
<h:outputText value=" send idea "></h:outputText>
</f:facet>
<table>
<tr>
<td>
<table>
<tr>
<td width="80px" align="left"><h:outputLabel
value="note"></h:outputLabel></td>
<td width="5px"> </td>
<td><h:inputText id="notesId3" maxlength="100" style="width:700px"
value="#ideaDetailsBean.addIdeaDto.sendForAwardNotes"></h:inputText>
</td>
</tr>
</table>
</td>
</tr>
</table>
</rich:panel></td>
</tr>
<tr>
<td width="100%" align="center">
<table>
<td width="3px"><h:commandButton image="6.png" immediate="true"
action="#ideaDetailsBean.doApproverActionSendForAwardTeam">
</h:commandButton></td>
</table>
</td>
</tr>
addIdeaDto class:
public class AddIdeaDto
private Long ideaId;
private Integer statusCode;
private String sendForAwardNotes;
public Long getIdeaId()
return ideaId;
public void setIdeaId(Long ideaId)
this.ideaId = ideaId;
public Integer getStatusCode()
return statusCode;
public void setStatusCode(Integer statusCode)
this.statusCode = statusCode;
public String getSendForAwardNotes()
return sendForAwardNotes;
public void setSendForAwardNotes(String sendForAwardNotes)
this.sendForAwardNotes = sendForAwardNotes;
it stay in this if, it mean the value of it is always null
if (addIdeaDto.getSendForAwardNotes() == null)
addInformationMessage("enter the note...");
return null;
only it show the information message even if I enter the value, and notes that I did not use SendForAwardNotes anywhere before this method
java jsp jsf
add a comment |
up vote
0
down vote
favorite
I have this method in my backing bean, when the user click the bottom this method will be called in order to get the values and update these value in the DB.
public String doApproverActionSendForAwardTeam()
IIMDelegate iimDelegate = new IIMDelegate();
try
if (isUpdateMode)
addIdeaDto.setIdeaId(hiddenIdeaId);
addIdeaDto.setSendForAwardNotes(addIdeaDto.getSendForAwardNotes());
addIdeaDto.setStatusCode(7);
if (addIdeaDto.getSendForAwardNotes() == null)
addInformationMessage("enter the note...");
return null;
iimDelegate.approverActionSendForAwardTeam(addIdeaDto);
addPointForApprover();
addInformationMessage(" Done ...");
return "goSearchIdeasApproverUI";
catch (Exception e)
e.printStackTrace();
addErrorMessage(" Error...");
return null;
The problem is when i click the bottom if the input text is empty the message show in order to enter the value and after I enter the value is stay same the message it show and show , it mean that there is no value for this input and the method not complete the execution.
I make sure that the value bind right but I do not know why its happend like that, it is not first time to use the information message.
this is the jsp page:
<tr>
<td><rich:panel>
<f:facet name="header">
<h:outputText value=" send idea "></h:outputText>
</f:facet>
<table>
<tr>
<td>
<table>
<tr>
<td width="80px" align="left"><h:outputLabel
value="note"></h:outputLabel></td>
<td width="5px"> </td>
<td><h:inputText id="notesId3" maxlength="100" style="width:700px"
value="#ideaDetailsBean.addIdeaDto.sendForAwardNotes"></h:inputText>
</td>
</tr>
</table>
</td>
</tr>
</table>
</rich:panel></td>
</tr>
<tr>
<td width="100%" align="center">
<table>
<td width="3px"><h:commandButton image="6.png" immediate="true"
action="#ideaDetailsBean.doApproverActionSendForAwardTeam">
</h:commandButton></td>
</table>
</td>
</tr>
addIdeaDto class:
public class AddIdeaDto
private Long ideaId;
private Integer statusCode;
private String sendForAwardNotes;
public Long getIdeaId()
return ideaId;
public void setIdeaId(Long ideaId)
this.ideaId = ideaId;
public Integer getStatusCode()
return statusCode;
public void setStatusCode(Integer statusCode)
this.statusCode = statusCode;
public String getSendForAwardNotes()
return sendForAwardNotes;
public void setSendForAwardNotes(String sendForAwardNotes)
this.sendForAwardNotes = sendForAwardNotes;
it stay in this if, it mean the value of it is always null
if (addIdeaDto.getSendForAwardNotes() == null)
addInformationMessage("enter the note...");
return null;
only it show the information message even if I enter the value, and notes that I did not use SendForAwardNotes anywhere before this method
java jsp jsf
Please add the context too, e.g. where does it getaddIdeaDtofrom etc. Also,addIdeaDto.setSendForAwardNotes(addIdeaDto.getSendForAwardNotes());is redundant.
– Darshan Mehta
Nov 10 at 14:19
@GhostCat I update my code
– wadha alketbi
Nov 10 at 14:27
1
@GhostCat I update my code
– wadha alketbi
Nov 10 at 14:38
@ Darshan Mehta what do you mean by redundant?
– wadha alketbi
Nov 10 at 15:45
I find the problem from this addIdeaDto.getSendForAwardNotes() == null that why it returns to me null.. who i can solve it, acutely this value coming from the jsp page??
– wadha alketbi
Nov 10 at 17:58
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have this method in my backing bean, when the user click the bottom this method will be called in order to get the values and update these value in the DB.
public String doApproverActionSendForAwardTeam()
IIMDelegate iimDelegate = new IIMDelegate();
try
if (isUpdateMode)
addIdeaDto.setIdeaId(hiddenIdeaId);
addIdeaDto.setSendForAwardNotes(addIdeaDto.getSendForAwardNotes());
addIdeaDto.setStatusCode(7);
if (addIdeaDto.getSendForAwardNotes() == null)
addInformationMessage("enter the note...");
return null;
iimDelegate.approverActionSendForAwardTeam(addIdeaDto);
addPointForApprover();
addInformationMessage(" Done ...");
return "goSearchIdeasApproverUI";
catch (Exception e)
e.printStackTrace();
addErrorMessage(" Error...");
return null;
The problem is when i click the bottom if the input text is empty the message show in order to enter the value and after I enter the value is stay same the message it show and show , it mean that there is no value for this input and the method not complete the execution.
I make sure that the value bind right but I do not know why its happend like that, it is not first time to use the information message.
this is the jsp page:
<tr>
<td><rich:panel>
<f:facet name="header">
<h:outputText value=" send idea "></h:outputText>
</f:facet>
<table>
<tr>
<td>
<table>
<tr>
<td width="80px" align="left"><h:outputLabel
value="note"></h:outputLabel></td>
<td width="5px"> </td>
<td><h:inputText id="notesId3" maxlength="100" style="width:700px"
value="#ideaDetailsBean.addIdeaDto.sendForAwardNotes"></h:inputText>
</td>
</tr>
</table>
</td>
</tr>
</table>
</rich:panel></td>
</tr>
<tr>
<td width="100%" align="center">
<table>
<td width="3px"><h:commandButton image="6.png" immediate="true"
action="#ideaDetailsBean.doApproverActionSendForAwardTeam">
</h:commandButton></td>
</table>
</td>
</tr>
addIdeaDto class:
public class AddIdeaDto
private Long ideaId;
private Integer statusCode;
private String sendForAwardNotes;
public Long getIdeaId()
return ideaId;
public void setIdeaId(Long ideaId)
this.ideaId = ideaId;
public Integer getStatusCode()
return statusCode;
public void setStatusCode(Integer statusCode)
this.statusCode = statusCode;
public String getSendForAwardNotes()
return sendForAwardNotes;
public void setSendForAwardNotes(String sendForAwardNotes)
this.sendForAwardNotes = sendForAwardNotes;
it stay in this if, it mean the value of it is always null
if (addIdeaDto.getSendForAwardNotes() == null)
addInformationMessage("enter the note...");
return null;
only it show the information message even if I enter the value, and notes that I did not use SendForAwardNotes anywhere before this method
java jsp jsf
I have this method in my backing bean, when the user click the bottom this method will be called in order to get the values and update these value in the DB.
public String doApproverActionSendForAwardTeam()
IIMDelegate iimDelegate = new IIMDelegate();
try
if (isUpdateMode)
addIdeaDto.setIdeaId(hiddenIdeaId);
addIdeaDto.setSendForAwardNotes(addIdeaDto.getSendForAwardNotes());
addIdeaDto.setStatusCode(7);
if (addIdeaDto.getSendForAwardNotes() == null)
addInformationMessage("enter the note...");
return null;
iimDelegate.approverActionSendForAwardTeam(addIdeaDto);
addPointForApprover();
addInformationMessage(" Done ...");
return "goSearchIdeasApproverUI";
catch (Exception e)
e.printStackTrace();
addErrorMessage(" Error...");
return null;
The problem is when i click the bottom if the input text is empty the message show in order to enter the value and after I enter the value is stay same the message it show and show , it mean that there is no value for this input and the method not complete the execution.
I make sure that the value bind right but I do not know why its happend like that, it is not first time to use the information message.
this is the jsp page:
<tr>
<td><rich:panel>
<f:facet name="header">
<h:outputText value=" send idea "></h:outputText>
</f:facet>
<table>
<tr>
<td>
<table>
<tr>
<td width="80px" align="left"><h:outputLabel
value="note"></h:outputLabel></td>
<td width="5px"> </td>
<td><h:inputText id="notesId3" maxlength="100" style="width:700px"
value="#ideaDetailsBean.addIdeaDto.sendForAwardNotes"></h:inputText>
</td>
</tr>
</table>
</td>
</tr>
</table>
</rich:panel></td>
</tr>
<tr>
<td width="100%" align="center">
<table>
<td width="3px"><h:commandButton image="6.png" immediate="true"
action="#ideaDetailsBean.doApproverActionSendForAwardTeam">
</h:commandButton></td>
</table>
</td>
</tr>
addIdeaDto class:
public class AddIdeaDto
private Long ideaId;
private Integer statusCode;
private String sendForAwardNotes;
public Long getIdeaId()
return ideaId;
public void setIdeaId(Long ideaId)
this.ideaId = ideaId;
public Integer getStatusCode()
return statusCode;
public void setStatusCode(Integer statusCode)
this.statusCode = statusCode;
public String getSendForAwardNotes()
return sendForAwardNotes;
public void setSendForAwardNotes(String sendForAwardNotes)
this.sendForAwardNotes = sendForAwardNotes;
it stay in this if, it mean the value of it is always null
if (addIdeaDto.getSendForAwardNotes() == null)
addInformationMessage("enter the note...");
return null;
only it show the information message even if I enter the value, and notes that I did not use SendForAwardNotes anywhere before this method
java jsp jsf
java jsp jsf
edited Nov 10 at 14:43
asked Nov 10 at 13:59
wadha alketbi
274
274
Please add the context too, e.g. where does it getaddIdeaDtofrom etc. Also,addIdeaDto.setSendForAwardNotes(addIdeaDto.getSendForAwardNotes());is redundant.
– Darshan Mehta
Nov 10 at 14:19
@GhostCat I update my code
– wadha alketbi
Nov 10 at 14:27
1
@GhostCat I update my code
– wadha alketbi
Nov 10 at 14:38
@ Darshan Mehta what do you mean by redundant?
– wadha alketbi
Nov 10 at 15:45
I find the problem from this addIdeaDto.getSendForAwardNotes() == null that why it returns to me null.. who i can solve it, acutely this value coming from the jsp page??
– wadha alketbi
Nov 10 at 17:58
add a comment |
Please add the context too, e.g. where does it getaddIdeaDtofrom etc. Also,addIdeaDto.setSendForAwardNotes(addIdeaDto.getSendForAwardNotes());is redundant.
– Darshan Mehta
Nov 10 at 14:19
@GhostCat I update my code
– wadha alketbi
Nov 10 at 14:27
1
@GhostCat I update my code
– wadha alketbi
Nov 10 at 14:38
@ Darshan Mehta what do you mean by redundant?
– wadha alketbi
Nov 10 at 15:45
I find the problem from this addIdeaDto.getSendForAwardNotes() == null that why it returns to me null.. who i can solve it, acutely this value coming from the jsp page??
– wadha alketbi
Nov 10 at 17:58
Please add the context too, e.g. where does it get
addIdeaDto from etc. Also, addIdeaDto.setSendForAwardNotes(addIdeaDto.getSendForAwardNotes()); is redundant.– Darshan Mehta
Nov 10 at 14:19
Please add the context too, e.g. where does it get
addIdeaDto from etc. Also, addIdeaDto.setSendForAwardNotes(addIdeaDto.getSendForAwardNotes()); is redundant.– Darshan Mehta
Nov 10 at 14:19
@GhostCat I update my code
– wadha alketbi
Nov 10 at 14:27
@GhostCat I update my code
– wadha alketbi
Nov 10 at 14:27
1
1
@GhostCat I update my code
– wadha alketbi
Nov 10 at 14:38
@GhostCat I update my code
– wadha alketbi
Nov 10 at 14:38
@ Darshan Mehta what do you mean by redundant?
– wadha alketbi
Nov 10 at 15:45
@ Darshan Mehta what do you mean by redundant?
– wadha alketbi
Nov 10 at 15:45
I find the problem from this addIdeaDto.getSendForAwardNotes() == null that why it returns to me null.. who i can solve it, acutely this value coming from the jsp page??
– wadha alketbi
Nov 10 at 17:58
I find the problem from this addIdeaDto.getSendForAwardNotes() == null that why it returns to me null.. who i can solve it, acutely this value coming from the jsp page??
– wadha alketbi
Nov 10 at 17:58
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53239701%2fi-get-this-value-always-null%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Please add the context too, e.g. where does it get
addIdeaDtofrom etc. Also,addIdeaDto.setSendForAwardNotes(addIdeaDto.getSendForAwardNotes());is redundant.– Darshan Mehta
Nov 10 at 14:19
@GhostCat I update my code
– wadha alketbi
Nov 10 at 14:27
1
@GhostCat I update my code
– wadha alketbi
Nov 10 at 14:38
@ Darshan Mehta what do you mean by redundant?
– wadha alketbi
Nov 10 at 15:45
I find the problem from this addIdeaDto.getSendForAwardNotes() == null that why it returns to me null.. who i can solve it, acutely this value coming from the jsp page??
– wadha alketbi
Nov 10 at 17:58