1
votes
<rich:tree switchType="client" value="#{Bean.tree}" var="one">
                                <rich:treeNode>

                                    <h:commandLink value="#{one.item1}"
                                        action="#{Bean.getItem()}"
                                        style="color:blue;text-decoration:none;"
                                        title="Click here to view details">
                                        <f:param name="ids" value="#{one.id}">          
                                        </f:param>
                                    </h:commandLink>


                                    <a4j:support event="onclick" reRender="productInformation"

                                                                        action="#{Bean.getItem()}"/>
                               </rich:treeNode>
</rich:tree>

<rich:panel id="productInformation">

</rich:panel>

hi I have a page in that tree structure will be present if i click on the link the corresponding action should be performed but by using h:commandlink the whole page will be refreshed.So Iam going for I have a problem here in h:commandlink i was able to transfer the parameter to bean by using f:param but by using how can I acess the value to bean please help me out iam new to jsf.

2
yes do u have any idea of how we can send from a4j to bean - satish

2 Answers

1
votes

Solved the solution by using a4j:commandlink tag and passing the parameter from a function.
< a4j:commandLink ajaxSingle="true" value="#{item.Description}(#{item.name})"
action="#{Bean.getProductLink(item.paramID)}" style="color:blue;text-decoration:none;" title="#{item.productDescription}" reRender="addproductGuidForms"/>

is working fine.

0
votes

Since you are using JSF2 there is no need to pass with f:param just pass it in method args

action="#{Bean.getItem(one.id)}"

b.t.w you better rename the method name into action="#{Bean.retrieveItem(one.id)}"