[JBoss JIRA] (GTNPORTAL-2297) GTN Bug: eXo Javascript is conflicting with some JQuery extensions
by kien nguyen (Created) (JIRA)
GTN Bug: eXo Javascript is conflicting with some JQuery extensions
------------------------------------------------------------------
Key: GTNPORTAL-2297
URL: https://issues.jboss.org/browse/GTNPORTAL-2297
Project: GateIn Portal
Issue Type: Bug
Security Level: Public (Everyone can see)
Reporter: kien nguyen
Priority: Minor
Fix For: 3.2.0-CR01
We test a Portlet that uses:
Jquery 1.5
Ligbox library http://www.balupton/projects/jquery-lightbox
We use the Portlet API to add the CSS and JS files to the HTML header
{code}
protected void doHeaders(RenderRequest request, RenderResponse response)
{
super.doHeaders(request, response);
Element cssFile = response.createElement("link");
cssFile.setAttribute("type", "text/css");
cssFile.setAttribute("href", request.getContextPath() + "/css/jquery/ui/smoothness/jquery-ui-1.8.9.custom.css");
cssFile.setAttribute("rel", "stylesheet");
response.addProperty("javax.portlet.markup.head.element", cssFile);
Element cssFile = response.createElement("link");
cssFile.setAttribute("type", "text/css");
cssFile.setAttribute("href", request.getContextPath() + "/css/jquery/balupton-lightbox/jquery.lightbox.min.css");
cssFile.setAttribute("rel", "stylesheet");
response.addProperty("javax.portlet.markup.head.element", cssFile);
}
{code}
When droping the portlet on a Platform Page or a GateIn page the Jquery effect is not working as expected : Nothing Happened
One of our Javascript is disturbing JQuery and the extension
The Work around is the following:
Modified the portal template "UIPortalApplication.gtmpl"
You can either:
= Move the "var currentContext = '<%=docBase%>' ;: line before the eXo.env.portal.context = "<%=docBase%>" ;
one (do not forget to remove the script tags)
= OR Move the
<%
def headerElements = rcontext.getExtraMarkupHeadersAsStrings();
if (headerElements != null)
{
for (element in headerElements)
{ %> <%=element%> <% }
}
%>
code before the eXo JS declarations
Note:
We need to cleanup our JS code to have less code, documented and sore in JS file not in the HTML code!*
I have attached the sampe portlet
(please refresh the page after droping the portlet on the page, since we have another bug related to adding portlet and do header - will create this bug later)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 5 months
[JBoss JIRA] (GTNPORTAL-2299) Test Transaction's status before commit
by kien nguyen (Created) (JIRA)
Test Transaction's status before commit
---------------------------------------
Key: GTNPORTAL-2299
URL: https://issues.jboss.org/browse/GTNPORTAL-2299
Project: GateIn Portal
Issue Type: Enhancement
Security Level: Public (Everyone can see)
Reporter: kien nguyen
Fix For: 3.2.0-CR01
In PicketLinkIDMOrganizationServiceImpl.endRequest, the transaction.commit is called without testing if the Transaction is active or not.
But in PicketLinkIDMOrganizationServiceImpl.startRequest, you tests on transaction's status.
So you have to do the same in endRequest:
{code}
if (configuration.isUseJTA()) {
UserTransaction tx = (UserTransaction)new InitialContext().lookup("java:comp/UserTransaction");
tx.commit();
} else {
idmService_.getIdentitySession().getTransaction().commit();
}{code}
should become something like this:
{code}
if (configuration.isUseJTA()) {
UserTransaction tx = (UserTransaction)new InitialContext().lookup("java:comp/UserTransaction");
if (tx.getStatus() == Status.STATUS_ACTIVE) {
tx.commit();
}
} else {
if (idmService_.getIdentitySession().getTransaction().isActive()){
idmService_.getIdentitySession().getTransaction().commit();
}
}{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 5 months