Help with ZK component development - rich-internet-application

I'm developing a simple component. My jar structure is:
br/netsoft/zkComponents/Tef.class
META-INF/MANIFEST.MF
metainfo/zk/lang-addon.xml
web/js/br/netsoft/zkComponents.js
web/zkComponents/tef.dsp
My dsp file is:
<c:set var="self" value="${requestScope.arg.self}"/>
<span z.type="br.netsoft.zkComponents.Tef" id="${self.uuid}" ${self.outerAttrs}${self.innerAttrs}>
<applet archive="tef.jar" id="tefApplet" code="br.netsoft.applets.tef.TEFProxy" width="0px" height="0px" />
<span/>
and the language-addon.xml is:
<language-addon>
<addon-name>componentes</addon-name>
<language-name>xul/html</language-name>
<component>
<component-name>tef</component-name>
<component-class>br.netsoft.zkComponents.Tef</component-class>
<mold>
<mold-name>default</mold-name>
<mold-uri>~./zkComponents/tef.dsp</mold-uri>
</mold>
</component>
</language-addon>
When i try to test this component, appears a pop-up showing :
" /js/br/netsoft/zkComponents.js not found"
what is wrong?

if in ZK 5 , you need widget class
or in 3 , you need to specify the javascript location

Related

Vue Jasmine: Two different ways of triggering click result in different results

I am having an issue when trying to switch the way I trigger clicks in my jasmine tests. This is my current setup:
Parent
<li ref="currentMovie">
<MovieData :movie="currentMovieData" :isSubscribed="isSubscribed" #selected="handleMovie(currentMovieData)" />
</li>
Child (MovieData.vue)
<template>
<component :is="unType" v-bind="linkProps" :class="$style.container" data-ut="Movie-link" ref="link">
<div data-ut="Movie-content" #click="showData ? $emit('selected') : false">
</div>
</component>
</template>
When creating my tests in the Parent component, I have:
(first method of triggering a click)
const movie = this.wrapper.vm.$refs.currentMovie;
triggerEvent(movie.querySelector('div'), 'click');
expect(this.wrapper.emitted().selected).toBeTruthy();
this works as expected and passes. I am trying to switch to using from using triggerEvent to data-ut and doing this instead:
(second method of trigger a click)
this.wrapper.find(testID('Movie-content')).trigger('click');
expect(this.wrapper.emitted().selected).toBeTruthy();
I get: ERROR Some of your tests did a full page reload!

FilePond for Vue / Nuxt : Server property set dynamically?

Little question:
<file-pond
name="customImage"
ref="pond"
label-idle="Déposez votre image ici"
:allow-multiple="false"
accepted-file-types="image/jpeg, image/png"
server="http://localhost:3000'"
:files="custom.customImage"
#init="handleFilePondInit"
/>
Is it possible to dynamically set the server value ?
For example :
v-server="apiUrl+'/api/v1/upload'"
Try this one
:server="`${apiUrl}/api/v1/upload`"
I'm using :server but it can be written as v-bind:server and ES6 Template literals for some better looking interpolation.

ModX Eform: Captcha not generating image

I am trying to get CAPTCHA working on the eForm plugin. I have added the input form field:
<label for="cfCaptcha">Captcha:<br />
<img src="[+verimageurl+]" alt="verification code"><br />
<input id="vericode" name="vericode" class="text" type="text">
and I have added
&vericode=`1`
to the eForm call.
and have added the Template Variable [+verimageurl+] to my template.
However, when I preview the form all I see in the image area is <img src="" alt="verification code">
Would anyone know what I am doing wrong?
Did you get this fixed?
Check that you ended the label code. Run it through w3c code checker too.
A few times I have left a element un-closed and it breaks the whole thing.

Exporting More Info Row to PDF using LogiXML not showing up

I am having some trouble trying to export a report to PDF format. I have an action report element to show the more info row, meaning, it is hidden by default (Show Mode : None) until the user clicks a particular element. However, this is creating problems when trying to export since, when I check the option in the Target.PDF element as to "Keep Show Elements", I'm coming up with a blank page. Any help would be appreciated. Thank you.
The best way to troubleshoot these types of export problems is to start simplifying the definition file so that you can easily isolate the issue. For your reports, I might start by remarking the MoreInfoRow so that it's effectively not impacting the export.
-Does the report export to PDF once the MoreInfoRow is gone? If yes, the we can assume the problem has to do with the MoreInfoRow. If no, then there is a different issue. If you've removed the MoreInfoRow and it still doesn't export properly, I might guess that the problem is either : 1) You're passing incorrect showmodes with the export or 2) the report requires parameters to be passed with the Action PDF as well that aren't getting set properly.
For additional details on ShowModes, I'd visit:
http://devnet.logixml.com/rdPage.aspx?rdReport=Article&dnDocID=1043
If the MoreInfoRow is the problem, you might try simplifying the report, in general. Here's a quick example that you can try:
<Report ID="Default" SavedBy="test">
<StyleSheet Theme="SimpleBlue" />
<Body>
<Label Caption="Export PDF" Class="ThemeLinkButton">
<Action Type="PDF">
<Target Type="PDF" KeepShowElements="True" Report="CurrentReport" />
</Action>
</Label>
<LineBreak LineCount="3" />
<DataTable ID="dtExport" Width="450">
<DataLayer Type="Static" ID="myData1">
<StaticDataRow id="001" name="Sample Row 1" />
<StaticDataRow id="002" name="Sample Row 2" />
<StaticDataRow id="003" name="Sample Row 3" />
</DataLayer>
<DataTableColumn ID="colid" Header="id">
<Label ID="lblid" Caption="#Data.id~">
<Action Type="ShowElement" ElementID="mirTest" ID="actShowMir" />
</Label>
</DataTableColumn>
<DataTableColumn ID="colname" Header="name">
<Label ID="lblname" Caption="#Data.name~" />
</DataTableColumn>
<MoreInfoRow ShowModes="None" ID="mirTest">
<Label Caption="This is the More Info Row" />
</MoreInfoRow>
</DataTable>
</Body>
</Report>

struts 2 dojo, can't load partial div tag?

Can anyone help me? I can't load div tag partially!
The flow, I run is like that:
When I click submit btn, it call imporUrl and go to action "import" and then call the importAction in ActionBean.
After that set 'AAA' and 'BBB' to the List.
Finally it is all working , but it reload the whole form, not only div, I want to reload only div partially. Please help thank !
<s:url id="importUrl" action="import">
<s:param name="id" value="%{id}" />
</s:url>
<sx:submit href="%{importUrl}" value="Import" targets="selectedDiv" />
String importAction(){
List.add("AAA");
List.add("BBB");
return SUCCESS;
}
<s:div id="selectedDiv">
<s:iterator value="List">
<s:property/>
</s:iterator>
</s:div>
I think you directly load the div on same page.But you have to do like this.
<sx:submit href="%{importUrl}" value="Import" targets="selectedDiv"
onclick="javascript:show_details();return false;"/>
And put javascript
<script>
function show_details() {
dojo.event.topic.publish("show_detail");
}
</script>
And make ur div tag like :
<sx:div id="details" listenTopics="show_detail" formId="frm_demo" showLoadingText="">
</sx:div>