Russel Fleming

Greenhorn
+ Follow
since Mar 18, 2013
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Russel Fleming

Could you please tell me how to implement action in the code I have given?
that would be very helpful.
11 years ago
JSF
So you are suggesting me to use ActionListener instead of ValueChangeListener?
11 years ago
JSF
Thanks tim, for your response.
Could you please elaborate a bit more, so that I can implement that on my code?
I am a beginner in JSF.
11 years ago
JSF
This problem is regarding valueChangeEvent.


This is the xhtml where I am setting the BooleanCheckBoxId=#{productItem.uniqueId}

<h:panelGrid columns="2" >
<h:panelGroup>
<h:selectBooleanCheckbox id="#{productItem.uniqueId}"
value="#{productItem.checkedValue}"
disabled="#{productItem.disabled}"
valueChangeListener="#{spcProductModel.productClicked}">
<a4j:support event="onclick"
oncomplete="retrieveActionText(this);"
reRender="paymentFormCard,actionText,includedForm,parametersCardForm,productsPanel,spcTemplateForm,productsPanel,#{paramPanelId}" />
</h:selectBooleanCheckbox>
</h:panelGroup>
<h:panelGroup>
<h:outputLabel>id="#{productItem.uniqueId}"</h:outputLabel>
<h:outputLabel
value=" #{productItem.productRelation.product.productName}"
for="#{productItem.uniqueId}"></h:outputLabel>
</h:panelGroup>
</h:panelGrid>

The unique ID has been generated using the following code:
String uniqueIds = prod.getUniqueId();

Thus the BooleanCheckbox is becoming equal to UniqueIds.
When I am printing the BooleanCheckBoxId in my front end for checking purpose, it reflects the changes made. But when I am fetching it as
String selectedId = (String) vce.getComponent().getId(); and printing the selectedId in logger, it remains same as it generated in the very first time.

SelectedId is remaining same as the old one, It does not change.
Is there anything I need to add?
Because it works fine for the first time. but when the value changes in the previous calling page, it does not work.
11 years ago
JSF