react-admin ArrayInput - admin-on-rest

ReferenceInput not working with ArrayInput.
How to do something like the following?
<ArrayInput source="comments">
<SimpleFormIterator>
<ReferenceInput source="comments" reference="user">
<AutocompleteInput optionText="username" />
</ReferenceInput>
</SimpleFormIterator>
</ArrayInput>

It was an issue and it has been fixed in 2.1.5. See https://github.com/marmelab/react-admin/pull/2079 for the pull request and https://github.com/marmelab/react-admin/releases/tag/v2.1.5 for the release.

Related

Can someone explain the attributes of <pending_xref> tag?

I noticed that after upgrading to sphinx 6.1.3, there's a default value for attribute refdoc in pending_xref tag.
https://github.com/sphinx-doc/sphinx/pull/9685
What does refdoc and the other attributes means?
Example:
<pending_xref py:class="BlobClient" py:module="azure.storage.blob.aio" refdoc="azure.storage.blob.aio" refdomain="py" refspecific="False" reftarget="str" reftype="class">
Run sphinx 6.1.3 in local.

ColdFusion Proxy Server

I'm trying to create a basic proxy server so I can keep track of what my kids are doing web wise - I know there are products out there but I thought it would be an interesting exercise to write one myself.
I have the following code that kind of works but doesn't pull any images or css through - I guess because it makes another call to the remote server and gets confused
<cfhttp url="https://www.bbc.co.uk">
<cfhttpparam type="header" name="Proxy-Connection" value="keep-alive" >
<cfhttpparam type="header" name="Accept" value="application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5">
<cfhttpparam type="header" name="Accept-Language" value="en-US,en;q=0.8">
<cfhttpparam type="header" name="Accept-Charset" value="ISO-8859-1,utf-8;q=0.7,*;q=0.3">
</cfhttp>
<cfset html = cfhttp.FileContent />
<cfoutput>#html#</cfoutput>`
What am I missing?
What you want to use is the resolveurl parameter of - set it to yes/true. This defaults to no.
What this parameter does is resolves relative paths to absolute paths automatically for you.
Now, if you want to change those paths as well, you would change them to also route through your http proxy script, but there won't be much use as you won't know much about the content regardless.
resolveurl should hook you up with what you are looking for. cheers.
https://cfdocs.org/cfhttp (look for resolveurl tag attribute)

Spring Integration - Move File After Xpath-splitter

i'm working with spring integration and i have the next case: i'm reading a XML file with an int-file:inbound-channel-adapter and i split the file with a int-xml:xpath-splitter, the thing is that i need to move the file after been splitted.
I want all features of int-xml:xpath-splitter plus moving the file, should i implement a custom splitter extending XPathMessageSplitter? or is there any other way to do that with an out-of-box components?
Thanks.
<int-xml:xpath-splitter id="salesTransSplitter"
input-channel="salesInputChannel"
output-channel="splitterOutChannel" order="1">
<int-xml:xpath-expression expression="/sales_transactions/trans"/>
</int-xml:xpath-splitter>
Something like this should work...
<int-file:inbound ... channel="foo" />
<int:publish-subscribe-channel id="foo" />
<int-xml:xpath-splitter input-channel="foo" ... order="1" />
<int-service-activator input-channel="foo" order="2"
expression="payload.renameTo(new java.io.File('/newDir/' + payload.name)" output-channel="nullChannel" />
If you want to test the rename was successful, send to some other channel other than nullChannel - boolean true means success.
EDIT
Sorry about that; order should be supported on every consuming endpoint, I will open a JIRA issue.
The order is not strictly necessary; if no order is present, the order they appear in the configuration will be used; I just prefer to make it explicit.
There are (at least) two work arounds:
Remvoe the order attribute from BOTH consumers and they will be invoked in the order they appear in the XML.
Configure the XPath splitter as a normal splitter, which does support order...
<int:splitter id="salesTransSplitter" order="1"
input-channel="salesInputChannel"
output-channel="splitterOutChannel" order="1">
<bean class="org.springframework.integration.xml.splitter.XPathMessageSplitter">
<constructor-arg value="/sales_transactions/trans" />
</bean>
</int-xml:xpath-splitter>

G:textfield remote function advice needed

i need advice on groovy. My remote function's not working. here is my codes. please advice.
<g:textField name="name"
onchange="${remoteFunction(action:'validateName',update:'errorName', params:'\'name=\' + this.value' )}"/>
The remote constraints plugin does most of the work for you.
And, if you want to use only the ajax function you have to use the "remoteConstraints" tag:
<g:remoteConstraints
beanName="Test"
fieldName="name"
template="/shared/error"
var="errorBean"
updateElement="errorsDiv"/>

Howto use configurable Merge Modules in Wix?

AFAIK it's done like this:
Product:
<Merge Id ="HelpInstaller" SourceFile="HelpInstaller.msm" Language="1033" DiskId="1">
<ConfigurationData Name="SurpressInstallation_Config" Value="&HelpFeature"/>
</Merge>
Merge Module:
<Property Id="SupressInstallation" Value='0' />
<Substitution Table='CustomAction' Row='SetSupressInstallationProperty' Column='Target' Value='[=SupressInstallation_Config]'/>
<CustomAction Id='SetSupressInstallationProperty' Property='SupressInstallation' Value='[SupressInstallation]'/>
<InstallExecuteSequence>
<Custom Action='SetSupressInstallationProperty' Before='RegisterHelp' />
<Custom Action='RegisterHelp' After='CostFinalize'>(NOT Installed) AND (NOT UPGRADINGPRODUCTCODE) AND SupressInstallation = 3) </Custom>
</InstallExecuteSequence>
But when i did it like above i get an error:
Encountered an unexpected merge error of type 'msmErrorDataRequestFailed' for which therer is currently no error messagte to display.
Can anyone tell me howto solve that problem? What i basically want to do is to execute a custom action in the merge module only when a certain feature is selected..Is this the right way to do it? Thanks Daniel
You have to define Configuration node under module:
<Property Id="SupressInstallation" Value='0' />
<Configuration Name="SupressInstallation_Config" Format="Text"/>
<Substitution Table='CustomAction' Row='SetSupressInstallationProperty' Column='Target' Value='[=SupressInstallation_Config]'/>
<CustomAction Id='SetSupressInstallationProperty' Property='SupressInstallation' Value='[SupressInstallation]'/>
<InstallExecuteSequence>
<Custom Action='SetSupressInstallationProperty' Before='RegisterHelp' />
<Custom Action='RegisterHelp' After='CostFinalize'>(NOT Installed) AND (NOT UPGRADINGPRODUCTCODE) AND SupressInstallation = 3) </Custom>
</InstallExecuteSequence>
That sounds like a bug. You should at least get a more descriptive error message explaining what went wrong. Feel free to file the bug at http://wixtoolset.org/bugs
A feature has a dependency on a merge module, not the other way around. Nothing in the merge module should have a reference to anything outside of the merge module such as a ProductName, ProductCode or Feature name because that would tightly couple the merge module to a specific product rather then being a generic reusable module. Doing such would essentially create a circular reference and is not idea.
What you probably need ( hard to say without knowing more information ) is to use the action state of one of the Components in the merge module for your condition.
For example if component1 has file1 and you need customaction1 to fire when this component/file is being installed then you'd use an expression of:
$component1=3 //INSTALLSTATE_LOCAL
That way if this merge module gets merged into Product1, Product 2 or Product3 with Feature Name A, B or C it won't matter because the association is at the component level.
If the feature you are trying to tie off of is a different feature then this all needs to be moved into a different merge module that get's merged into that feature. You might need to create a dummy component to associate to.
Now if you want to ignore all of this advice, then look at the Feature Action state operator and tightly couple away.
Conditional Statement Syntax

Resources