Mozilla is spitting out
DnD is not defined
errors on all of my rich:dragSupport and rich:dropSupport tags. When I check out the generated javascript the DnD object is where it should be and things look ok. Any ideas on why my DnD object is not defined? Has anyone come accross gotchas with using richfaces dnd?
We are using Richfaces 3.2.1 (drag and drop started in 3.0.0 acording to docs)
An example of how we are using this:
<a4j:outputPanel><rich:panel>
<rich:dropSupport dropListener="#{myBean.dropAction}>
<a4j:actionParam value="#{someData}" name="paramData" />
</rich:dropSupport>
<a4j:repeat value="#{myBean.list}" var="item">
<a4j:outputPanel>
<rich:panel>
<rich:dragSupport dragValue="#{someOtherData}">
<a4j:actionparam value="#{someOtherOtherData}" name="secondParam" />
<h:outputText value="#{item.name}"></h:outputText>
</rich:dragSupport>
</rich:panel>
</a4j:outputPanel>
</a4j:repeat>
</rich:panel></a4j:outputPanel>
My Problem: typo in naming of JBoss portlet deployment xml files
Other things to check (from week of research):
Are you deploying the necessary richfaces jar files?
Do you have other js scripts that are causing namespace issues like jQuery or prototype?
It's an old thread, but my answer is: Inside tag < rich:dragSupport/>, must be included < rich:dndParam>.
See http://livedemo.exadel.com/richfaces-demo/richfaces/dragSupport.jsf?tab=usage&cid=289435 for more information.
PD: Sorry for my rustic English, I'm from Argentina...
Related
I have to write a JSF application using navigation rules.
I have a few ManagedBeans that are mostly requestScoped. When a user clicks on a commandLink or commandButton, I want to pass a Parameter (for example the id of the current Bean) so the Bean can fill its modell with the data using this passed id to find the data in the used database.
For this reason, I used following sollution:
...
<navigation-rule>
<display-name>mainpage.xhtml</display-name>
<from-view-id>/mainpage.xhtml</from-view-id>
<navigation-case>
<from-action>#{postBean.findById(post.id)}</from-action>
<from-outcome>single</from-outcome>
<to-view-id>/postpage.xhtml</to-view-id>
<redirect include-view-params="true">
<view-param>
<name>id</name>
<value>#{postBean.post.id}</value>
</view-param>
</redirect>
</navigation-case>
</navigation-rule>
...
This works and the view-param is seen in the URL but Eclipse always shows the error:
cvc-complex-type.2.4.a: Invalid Content was found starting with element 'view-param'. One of '{"http://xmlns.jcp.org/xml/ns/javaee":redirect-param}' is expected.
Do I have to use something else, does eclipse luna jee not recognize the view-param tag, how can I remove this error?
(The faces config is version 2.2, I do not use a framework like primefaces or richfaces)
It is a known issue "redirect-param are ignored #3403" with Mojarra implementation 2.2. You have to use view-param instead of redirect-param to get it work. It is fixed in 2.3.
I wrote a simple and short expressionengine 1x plugin which works well for what I needed.
It is working fine with the following code:
{exp:iv_simple_rss_parser feed="http://imccomunicacion.tumblr.com/rss" strip_tags="yes"}
Title {title}
{exp:word_limit total="20"}{description}{/exp:word_limit}
{link}
{/exp:iv_simple_rss_parser}
I needed to limit the {description} var so I wanted to use the word_limit plugin, like you can see. The fact is that all works ok but the description tag is no limited by word_limit.
It seems that EE is not parsing that nested plugin, it just ignores it, like it was not there.
How can I make EE to parse the word_limit plugin when it is inside of my plugin??
Thanks!
This is because the inner-most plugin tag parses first, and at that point, {description} doesn't exist yet. You can reverse the parse order by adding parse="inward" to your outer plugin tag:
{exp:iv_simple_rss_parser feed="http://imccomunicacion.tumblr.com/rss" strip_tags="yes" parse="inward"}
Title {title}
{exp:word_limit total="20"}{description}{/exp:word_limit}
{link}
{/exp:iv_simple_rss_parser}
I am unable to use the usual i18N localization of GWT to localize a tabs name ('header') in a TabLayoutPanel.
This works:
<g:TabLayoutPanel addStyleNames='LocationsModule' barUnit="PX" barHeight="30" >
<g:tab>
<g:header>Locations</g:header>
But I can't get any other version to work:
<g:header text='{messages.layersTabTitle}' />
or
<g:customHeader>
<g:Label text='{messages.locationsTabTitle}' />
<g:Label>'{messages.locationsTabTitle}'</g:Label>
</g:customHeader>
anyone been able to do this, without resorting to code?
I think you need to use a slightly different syntax here:
check this example:
http://code.google.com/p/google-web-toolkit/source/browse/trunk/user/test/com/google/gwt/uibinder/test/client/I18nMessageTest.ui.xml?r=7940
so it should be something like:
<g:customHeader>
<g:Label><ui:text from="{messages.locationsTabTitle}" /></g:Label>
</g:customHeader>
You can also use the ui:text element directly within the g:header element, avoiding the need for g:customHeader or g:Label, e.g:
<g:header><ui:text from="{messages.locationsTabTitle}" /></g:header>
(This is similar - although not quite the same - to how the file linked to by Arne uses ui:text within an h2 element: http://code.google.com/p/google-web-toolkit/source/browse/trunk/user/test/com/google/gwt/uibinder/test/client/I18nMessageTest.ui.xml?r=7940)
Tested in GWT 2.4.0.
I have a legacy Struts 1.2.8 application that I'm maintaining and porting from Oracle Application Server (OAS) 10g to JBoss 4.2.3. I have a JSP that uses the Struts HTML tag library. The JSP page is backed by EJBs. The user enters an item number and the page displays the details of the item (e.g. item from a product catalog).
On the first 3 times I use this page, the item details are returned correctly. But for some reason, on the fourth submission of the page and on subsequent submissions, some of the item information is missing. I'm using
<html:hidden property="itemNumber"/>
<html:text property="itemNumber"/>
tags. The bizarre part of this problem is that I can't recreate the problem in OAS. In addition, if I replace the above html:text tag with
<input type="text" value="<%=itemForm.getItemNumber() %>" >
The code works correctly. My guess is that this is a session/request/scope problem. But I haven't found the correct configuration.
Is there special configuration required for Struts in JBoss?
Check the scope being used for the action in the struts-config.xml file. Most likely you probably want the scope to be request.
The problem was caching in the Jasper JSP engine. The default configuration is
enablePooling - Determines whether tag handler pooling is enabled. true or false,
default true.
I was able to set enablePooling to false and my problem was resolved. I assume this is a bug in Jasper. This bug appeared when a JSP custom tag (e.g. html:hidden) is followed by a jsp:attribute where the name is "value". See below.
<html:hidden property="itemNumber"/>
.
.
<html:text property="regularPrice" maxlength="9" readonly="<%=disabled%>"
tabindex="9" onkeyup="onRegularPriceChanged(this)">
<jsp:attribute name="value">
<webmodules:currency onlyDisplayValue="false">
<jsp:attribute name="currencyValue">
<bean:write name="updateItemForm" property="regularPrice"/>
</jsp:attribute>
</webmodules:currency>
</jsp:attribute>
</html:text>
There seems to be a namespace and caching conflict between the "value" that is set by the html:hidden and the "value" that is set by the jsp:attribute. After the JSP page was used twice the cached value set by the jsp:attribute was being used as the value for html:hidden.
I'm loading a resource in AEM using SlingRequestProcessor as the example available here.
My page/html file looks like:
<div data-sly-use.stepPlanItem="stepPlanItemTemplate.html"
data-sly-call="${stepPlanItem.step # step = step}"
data-sly-unwrap />
But, when I invoke requestProcessor.processRequest(req, resp, request.getResourceResolver()); nothing happens. I'm getting exactly the same content of the file. Nothing is being parsed.
My main question is: How can I parse sly tags from Java code?
Should I use filters? Which one? This is a page (not an AEM one) just an HTL snippet.
You do not need to parse HTL files, this is done by the Sling Scripting Engine implementation. You are always processing/loading a resource and it needs to be resolved according to the Sling resource resolution.
Assuming you are trying to load a resource at: /content/myapp/mypage.html that has a sling:resourceType=myapp/myfile, you would put the above code snippet in an /apps/myapp/myfile/myfile.html file so that the scripting engine can execute the HTL.