Partial refresh/reload in a repeatcontrol of a xpage - custom-controls

I've created a customcontrol with a repeatcontrol showing a panel for each related document (of a notes doccollection). The xpage arround the cc is bound to a maindocument.
The panel in the repeatcontrol contains some inputfields, a fileuploadcontrol, a filedownloadcontrol and an action-button.
If the user select a file in the fileuploadcontrol an press the button, then the document bound to the panel is saved and an notesagent replace the old attachment with the new selected.
After that, the current panel should be refreshed, so that the filedownloadcontrol shows the right attachment for download. But only the current panel should be refreshed, not the complete xpage or other panels in the repeatcontrol (context.reloadPage is not the solution I need).
Any idea?

I suggest you put all your code in the button and then partial refresh the panel in the button.
But I suspect that the question refres to that you cannot save a file attachment using partial refresh. which is true. there are a few solutions to this, like using an iframe. do a google search on that

An example for using iframes is described at the Domino development wiki. The mentioned approach is used in the Lead Manager X example at OpenNTF.
However, depending on whether or not that fits your needs, you may also consider using the XPages Exension Library, specifically the Dynamic Pages therein.

did you try giving the partial refresh id for the panel containing the document? If that doesnt work.. get the handle of the particular panel in clientside and refresh it. Panel inside repeat can be identified with its index.

Related

Buttons in a view in Dynamics 365

I am new with Dynamics 365 and are not sure of how I can achieve this.
I am looking into having some buttons in a view.
Maybe a view isn't the best way of doing it, but what I want to do is to have a list of records connected to the logged in user (similar to a view)
But on each row/record I want to have multiple buttons. These buttons can be like 'Complete' (Changes status on task and updates the view) , 'Send email'(Starts a workflow) and so on.
What are some of the ways of doing this? Either with Javascript/C#/plugin or something else.
You cannot add buttons in views/subgrids directly.
That’s when we add ribbon/command bar buttons using Ribbon workbench usually.
Create a Workflow Short Cut Ribbon Button (No Code Solution!)
Update:
There is a PowerApps Components Framework (PCF - preview) coming out soon, then we can build custom grid control with the layout/buttons we want.
This can be achieved with RibbonWorkbench. My answer does not differ much with #arun vinoth answer but just added few explanation lines.
https://ribbonworkbench.uservoice.com/knowledgebase/articles/132235-create-a-workflow-short-cut-ribbon-button-no-code
If you look at view below where I have selected number of contact and then I have a Button at top "Nominieren" which is shown and clicking on it will perform whatever action is needed.
There will be java-script on click of button, from Java script you could call Action or workflow or perform operation in Java script itself.
Link for Adding new Button : https://community.dynamics.com/crm/b/crmtipsfromadeveloper/archive/2017/07/26/know-how-add-a-ribbon-button-using-ribbon-workbench
Now when you look at image below I have no contact selected and it does not show button on Ribbon.
It might be possible. I haven't tried this but you can write JavaScript for a view column now (since CRM 2016).
If you go to a view you can double click on a view column to view its properties. There are two properties you might be interested in:
Web Resource
Function
Here's a link to an MS page that explains how to use these options to add an icon. It might be possible to create a clickable button which uses CRM's WebApi to perform some actions: Docs # Microsoft

Display of object class in page frame for visual foxpro 6

I've bundle of control save in .vcx file but I need to activate it to display it when i switch to different activepage in pageframe.
Could anyone guide me how to code and which kinds of event should i make on page frame switch, click or whatelse UIENABLEEVENT.
Thanks.
First, you might want to click on Help -> Tour for site etiquette and start voting / checking your answers so people know what worked or not that help you and others with similar issues.
Now, back to you question... If you have a form with a pageframe, make sure you have the "Properties" sheet open, it helps to ensure which object you are actually working with until you get more familiar with the IDE.
Once you click on the pageframe control, if you right-click and then select "Edit", that will bring you to the individual PAGE level of the pageframe. Once the PAGE is the basis of the focus you can put any control on it from either the toolbar, or if your project is open and you expand your .VCX class library, you can grab any control and put in on the page.
If you have multiple pages, once you click on the alternate pages, you will see that the first page (or whatever page) is no longer visible and the new page is available for you.
The actual handling of the pages on the pageframe for clicking / focus is automatically handled for you unless you want to do something extra.

Having tabs and none tabs regions in the same container

I have the two classics areas toolbar and content.
My problem is that I want to have different forms / areas that have tabs in the same region.
One of the areas / form have a document search form and when you click on a row in the search result a document is displayed in a new tab. The user will see a tab for the search form and a tab for each document.
when I click on the menu to show another form e.g. Administration I want to show the administration form in the same content area and when I i click on the search document menu I want to go back to my previous search result.
Do I create a form without content with only and area for the search form? or can areas coexist?
I am using the prism navigation framework.
Right now I have created a search form with only a tabregion and nothing else. The problem is that prism can't navigate to the searchform region before the form is loaded. Thats not a big problem, I can use the regionmanger to load the form if it's not loaded. I just wonder if prism somehow can handle this without custom code.
As commented above on the question, the scenario you described would be a particular Region on which you want to show an Administration or a Search View, and multiple tabs aside when showing the Search View.
You could accomplish this scenario by having a MenuRegion where Administration and Search Views are registered, and defining then a SearchTabRegion on a TabsControl in the SearchContentView where you would add each TabView.
You may find more related information on the UI Composition Prism Guide chapter:
7: Composing the User Interface Using the Prism Library 5.0 for WPF
Regards.

Displaying a .pdf in WebBroser WP7

I have an application which has a listbox. When an item in the list is clicked the app takes us to a new page with a web browser which displays the contents of that particular item (we get these from a particular list which is previously parsed xml data) in a web browser (because they also contain html elements). This all works perfectly fine.
Now, there are a few items in the list which contain a link. The link displays in the browser and when clicked it takes us to a .pdf file (still in the webbrowser) which is not being displayed.
What I now wonder is:
How to check if the link is being clicked? Is there an event for that?
How can I display the .pdf within the webbrowser control without the aid of other application?
Thank you,
Should you need any code that's currently working and written just ask.
To know if the link is clicked, you can use the Navigating event of the webbrowser.
Unfortunately, you can't use the webbrowser to display the PDF. You'll have to use a WebBrowserTask instead.
To sum it up, in your case you can use the Navigating event to detect the click on the link (since it's apparently important from you), then cancel the navigation (by setting e.Cancel = true in the event handler), then call the WebBrowserTask to display the PDF document.

Sharepoint 2010 - create page with cropping image field

I'm using Sharepoint 2010 (as a beginner). I need to find the best way to allow a user to create a new page inside a sharepoint site. The page must have an image field which the user can crop when he creates the page.
I have 3 problems concerning this:
How can I allow my user to create the page in a single step. The default behaviour is: create page with Title, Url and Content type and the edit the page layout or the page properties. Is there a way to do this in a single step?
What view should my user use when editing the page? The "Edit page" view, or the "Edit properties"? I don't like the "Edit page" view because... it doesn't look like the right way to do it... BUT, I like the fact that I can use my custom BaseFieldControls in this view. The "Edit properties" look great, BUT, customizing it looks like a nightmare. And, of course, I cannot ask the user to use both views...
One of my requests is to allow the user to upload a sharepoint image for the page, and then to crop tree different sizes using the base image. The big question is: where should I allow my user to do this?
In a webpart inside the "Edit properties" window? - Not very easy to integrate it. It seems almost impossible.
In a custom BaseFieldControl in the "Edit page"? Would be great, but, I don't want the user to use this view.
Create my own Asses Picker aspx page for the "Upload image" field, and replace the default one - _layouts/AssetImagePicker.aspx? Is this even possible?
I dont have an answer for everything but for number 1, maybe:
Check out SPServices. It is a Jquery project which is designed to help people use Jquery on Sharepoint sites. It is really useful for accessing, editing, and writing data is less lines of code than ever before... Unless you are a genius and have SP figured out which most do not.
To be honest, the only way to do things in "1 step" is with javascript anyway...
Hopefully you have heard of Jquery:

Resources