Wednesday, November 19, 2014

Jsf onclick

<script type="text/javascript">

                

                $( document ).ready(function() {

                    console.log("worksssssssssssssssssssssssssssssssssssssssssssss");

                 $("#testId\\:sendMailInitiateBtn").click();

                });

            </script>

            <h:form id="testId">

                <h:commandButton 

                    id="sendMailInitiateBtn" 

                    style="display: none"

                    action="#{createMailController.mailInit}"                    

                    />

            </h:form>

Monday, November 17, 2014

Jsf call

<h:form>

                                        <c:set var="grpId" value="#{param['grpId']}"  scope="view"/> 

                                        <h:commandButton value="Leave Group!" action="#{groupAction.leaveFromRingIDCircle(grpId)}" >

                                            <f:param value="#{param['grpId']}" name="grpId"/>

                                        </h:commandButton></h:form>







FacesContext fc = FacesContext.getCurrentInstance();

            Map<String, String> params

                    = fc.getExternalContext().getRequestParameterMap();

            long v_grpId = Long.valueOf(params.get("grpId"));

Monday, November 10, 2014

Jquery selector

Div for all div

Div > p all p under div

Div > p: first-child

Div strong decendent of div element

Mycls a all a under mycls div

P: even all even p element

# myid for specific id

. Clsname for all class with same cls name

Strong.myclsname all strong element that has myclsname as cls name

Sunday, November 9, 2014

Jqery additional data onclick

Add data-varName

Get inside onclick

$(this).data("varName") ;