Search code examples
liferay-6

Liferay 6:Eqvalinet code of JavaScript for Alloy UI


<portlet:actionURL  name="addBook" var="addBookURL" />



public void addBook(ActionRequest request, ActionResponse response) throws IOException, PortletException {

}

Hi , This is my Alloy UI Code for calling my MVCPortlet's Action class addBook Method .

My question is , I dont want to use Alloy UI in My UI , but pure JavaScript / Jquery .

So Is it possible to have equaveleint code for this in pure JavaScript ??

<aui:form action="<%= addBookURL.toString() %>" method="post">

    <aui:input type="text" name="name"></aui:input>
    <aui:input type="password" name="pwd"></aui:input>
    <aui:button type="submit"></aui:button>
</aui:form>

Solution

  • For this function you can use pure html, something like this:

    <form name="<%= addBookURL.toString() %>" action="<%= addBookURL.toString() %>" method="post">
    
        <input type="text" name="name"></input>
        <input type="password" name="pwd"></input>
        <input type="submit"></input>
    </form>