Disable Create form on datatable with inline edit turn on - gvnix

I intended to use datatable in GvNix on an entity where the create and delete are managed by some backend logic. Only allow View and Update on the entity using inline edit datatable. I managed to use the delete=false and create=false option in the table.tagx for the particular entity. But this only disable the create and delete icon. The create form is still there. Is there a ways to disable the create form above the datatable once the datatable has been created with inline edit?

It seems like there is an error on file table.tagx when validate create property.
I've fixed it with the following change:
Replace the line ~373 of file table.tagx from:
<c:if test="${inlineCreating}">
to:
<c:if test="${inlineCreating and create}">
I've applied these changes on commit: https://github.com/gvSIGAssociation/gvnix/commit/dd1ad58ab90998b3dcc5379fd98b8c484e61e76e
Please try it and tell me if it worked to you.
Hope this helps.
Regards.

Related

How to implement PXFormulaCombo or Formula Builder control?

As per title. I need to customise AM207500 - Configuration Maintenance screen to add another custom field that will allow me to enter formula similar to QtyRequired field.
I got as far as displaying the correct dialog. But its missing the fields selection.
I believe I'm missing the OnRootFieldsNeeded property. But every time I try to edit the ASPX and manually add this. Its being cleared by Acumatica.
Am I in the right direction ? And how do I force this property in my ASPX ?
TIA
A bit unconventional, but have you tried updating the ASPX page on the custom pages and then clicking on the files section to update the file? This will then ensure the file update occurs before publish and hold the configuration

Custom Form issue - NGM Forum thread section in Orchard CMS

I am using the external module, NGM Forum.
In thread create form the Save button is not inside the <form> tag.
So when I press save it's not submitting the form.
How can I get the Save button back inside the form?
Please refer to the attached images:
Placement.info
It could be that you have customised the form somehow with your placement.info file and moved the save button down.
Edit form on create form?
Looking at the code from your screenshot it looks like you are on the /Create/ action, and your form tag confirms this with the id="thread-create". Code.
But the Save button is for the Edit action with submit.Save.
You must have made some mistakes with your changes before this point so you will need to explain how you built this form further I think for anyone to help you resolve it.

Liferay add categories to artical hook

i tried too automaticaly add some categories to an newly created artical via hook. but i don't know which action i should hook into. I tried hook in to the AssetEntry Model actions, But it's a failure. Can anyone help me ?
Categories are populated through asset_categories_selector taglib UI for assets. html/taglib/ui/asset_categories_selector/page.jsp is where categories gets populated.
You can override[using hook] JournalArticleLocalServiceImpl's addArticle method and add your logic to add categories to created JournalArticle OR you can have categories default selected by overriding jsp[categorization.jsp] .

compute dynamically the allowDelete property of file download xpages

I am using a file download control and I would like to set the value of the "allowDelete" property dynamically depending on whether the document is in edit or read mode. However, this
property is computed onload of the page. I tried calling the function "setAllowDelete(boolean)" on the onclick event of a button or the "beforeRenderResponse" event of a custom control and a partial or full update to change the value of the property, but it didn't change.
Do you know if there is a way to do this?
Thanks a lot in advance!
I have encountered the same problem. There are two options to workaround it.
1) To use two controls, one with deletion enabled, the other with deletion disabled, and use rendered properties according to edit state (or user role).
2) Render download controls by your own, as data table or repeat. However, this solution has its own problems, too.
Have you tried just calculating the property like this?
<xp:fileDownload .... >
<xp:this.allowDelete><![CDATA[${javascript:
return document.isEditable()}]]>
</xp:this.allowDelete>
</xp:fileDownload>

Modifying sharepoint edit dialog

I have successfully created a feature in sharepoint that modifies the existing edit dialog and adds a custom button to it like this.
and I am aware that I can pass back data when the user clicks the custom button like this.
<CommandUIHandlers>
<CommandUIHandler Command="ActivateUser" CommandAction="/_layouts/MyFeature/MakeUserActive.aspx?ListID={ListId}&ItemID={ItemId}&ItemUrl={ItemUrl}&ListUrlDir={ListUrlDir}" />
</CommandUIHandlers>
As detailed here
I can now handle the list item and perform my required actions on it BUT given that this button has been added in the modify context (IE: Inside the sharepoint edit item dialog) what if you want to save changes to the data itself?
To me it seems like using your custom button would always mean losing any changes the user has made to the data. Is there a way around this?
Good question!
You actually already linked to the solution: Right now you are simply redirecting the user by using a URL as your CommandAction: CommandAction="/_layouts/MyFeature/MakeUserActive.aspx?ListID={ListId}&ItemID={ItemId}&ItemUrl={ItemUrl}&ListUrlDir={ListUrlDir}"
This if course redirects the user to another page without saving the current entry. What you want to do is use Javascript as linked in the MSDN article:
CommandAction="javascript:alert('here be dragons');"
You can either work the the SharePoint Javascript object model here and use something like SP.ListOperation.Selection.getSelectedItems(); or you could use complete custom code.
From your aspx page name I can see you want to "make a use active" (btw: wouldn't "ActivateUser.aspx" be nicer?). If this simply means setting a property in another list you could do that with the SharePoint OM, if it is some custom stuff you would need a webservice which you can call from JavaScript and "activate the user" like that. You can of course always access the current form and pass on the values the user entered. Or you could create a custom save button which does some stuff (activate user) before saving.
Lastly: You can also have postbacks in your custom button where you could do anything you'd like.

Resources