Fórumok
liferay_ui editor
laxman teja, módosítva 11 év-val korábban
liferay_ui editor
Junior Member Bejegyzések: 30 Csatlakozás dátuma: 2012.04.17. Legújabb bejegyzések
this is my code in view.jsp
<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %>
<%@ taglib uri="http://liferay.com/tld/ui" prefix="liferay-ui" %>
<portlet:defineObjects />
<portlet:actionURL var="actionUrl"/>
<form action="<%=actionUrl.toString()%>" method="post">
<liferay-ui:input-editor name="teja" />
<input type="submit">
</form>
src code is
public void processAction(ActionRequest actionRequest,
ActionResponse actionResponse) throws IOException, PortletException {
String s=actionRequest.getParameter("teja");
String s1=ParamUtil.getString(actionRequest,"teja");
System.out.println("*******************"+s+"*******************************"+s1);
}
i coundn't retrive the value from data from jsp
plz help me in solving this problem
<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %>
<%@ taglib uri="http://liferay.com/tld/ui" prefix="liferay-ui" %>
<portlet:defineObjects />
<portlet:actionURL var="actionUrl"/>
<form action="<%=actionUrl.toString()%>" method="post">
<liferay-ui:input-editor name="teja" />
<input type="submit">
</form>
src code is
public void processAction(ActionRequest actionRequest,
ActionResponse actionResponse) throws IOException, PortletException {
String s=actionRequest.getParameter("teja");
String s1=ParamUtil.getString(actionRequest,"teja");
System.out.println("*******************"+s+"*******************************"+s1);
}
i coundn't retrive the value from data from jsp
plz help me in solving this problem
jelmer kuperus, módosítva 11 év-val korábban
RE: liferay_ui editor
Liferay Legend Bejegyzések: 1191 Csatlakozás dátuma: 2010.03.10. Legújabb bejegyzések
The input-editor component does not submit it's value automatically
On page load you should initialize the value from javascript like this :
And before submitting the form you should save the html the user entered to a hidden form field that could look like this
Using javascript that could look like this
On page load you should initialize the value from javascript like this :
function <portlet:namespace />initEditor() {
return "<%= UnicodeFormatter.toString(BeanParamUtil.getString(objectYouLoadedFromTheDatabaseInCaseOfAnEdit, request, "teja")) %>";
}
And before submitting the form you should save the html the user entered to a hidden form field that could look like this
<aui:input name="teja" type="hidden" />
Using javascript that could look like this
function <portlet:namespace />saveObject() {
document.<portlet:namespace />fm.<portlet:namespace />teja.value = window.<portlet:namespace />editor.getHTML();
submitForm(document.<portlet:namespace />fm);
}
Hitoshi Ozawa, módosítva 11 év-val korábban
RE: liferay_ui editor
Liferay Legend Bejegyzések: 7942 Csatlakozás dátuma: 2010.03.24. Legújabb bejegyzések
jelmer gave a good reply. The following wiki page contains information if you're interested.
http://www.liferay.com/web/guest/community/wiki/-/wiki/Main/How+to+add+a+wysiwyg+html+editor+to+a+portlet
You may also be interested in the following wiki too.
http://www.liferay.com/web/erik.andersson/blog/-/blogs/11490753
http://www.liferay.com/web/guest/community/wiki/-/wiki/Main/How+to+add+a+wysiwyg+html+editor+to+a+portlet
You may also be interested in the following wiki too.
http://www.liferay.com/web/erik.andersson/blog/-/blogs/11490753