cancel
Showing results for 
Search instead for 
Did you mean: 

Forms/Navigation in Share

matjazmuhic
Champ on-the-rise
Champ on-the-rise
I have a problem when I need to override the navigation in share. I know in explorer it was done editing the faces navigation config. Is there anything similar in share?

Here's the scenario:

- I submit the document (add content) of my custom type
- After I click OK edit medatada form is shown automatically (or my custom modal windows, which one is easier to do)
- After I edit metadata I click Save, metadata should be saved, custom aspect added depending on some metadata property and another custom modal window / dialog  opened to edit that aspect properties
- Then with click on "ok" or "save" evertyhing is saved

How do I do something like this?
9 REPLIES 9

gavinc
Champ in-the-making
Champ in-the-making
Hi,

Unfortunately there isn't a navigation mechanism in Share like there was in Explorer, as far as I know anyway, I'm going to refer you to our Share expert to answer that definitively.

There are pre and post form submission hooks available but I'm not sure how extensible this is with the out of the box pages, you may need to create some custom pages to achieve what your requesting.

The aspect processing however I can help with, Form Filters sound perfect for what you want to do. The form filter can examine the value of the relevant property and apply the aspect if necessary.

mikeh
Star Contributor
Star Contributor
Gavin is correct: Share doesn't have an in-built navigation mechanism. You would have to either create your own custom pages and re-use Share's components, or override the default behaviour and proceed that way.

Note that in 3.4.a and newer you can now POST between Share pages to transfer information - see the Start Workflow form for an example implementation.

Thanks,
Mike

matjazmuhic
Champ on-the-rise
Champ on-the-rise
Thank you very much for your answers, at least I know now where to dig deeper. Smiley Happy

After a consideration I think I'll go with custom site, using document library for document management. However, I have additional questions.
Is it possible for rules to trigger pop-ups? What I want is basically when rule is triggered (document will be moved and aspect added to it) I want to somehow "force" the user to input the aspect properties. Either trough popup showing up or redirection to edit metadata page or if none of this is possible redirection to my custom page?

The problem is, that the aspect will not always be the same. It is gonna be some kind of classification rule that will append aspect depending on some document metadata.

mikeh
Star Contributor
Star Contributor
No, sorry - that's not possible. The rules run on the Repository tier, whereas Share runs on the web tier. Share has no in-built concept of Repository features such as nodes, aspects, rules, etc. - and only deals with static JSON representations thereof. Also, Share wouldn't have the control to prevent a document from being saved if mandatory properties were not populated.

Remember Share is just a UI on top of the Repository remote API. That makes it optional and so the Repository has to be able to function without it, or with a different UI plugged in.

Thanks,
Mike

matjazmuhic
Champ on-the-rise
Champ on-the-rise
I see. With "force" I didn't quite mean that. I just want to ensure the user wont forget to edit additional metadata added by aspect. And I want to make it more userfriendly, because the space the directory will be moved in after first metadata editing will probably be full od other documents.

I'm not sure if I want to create my custom page since share already has the most tools I need (forms, ui, actions..).

By the way, is there any way you can include existing forms in my custom page?

mikeh
Star Contributor
Star Contributor
You can add a status banner to the document (e.g. when you have one checked out) via some simple customization. Or add a new status indicator, again fairly simple.

Forms are a Surf component, so you can include them either as a pop-up or inline. Look at the "create folder" example for the former and "edit metadata" or "document details" for the latter.

Thanks,
Mike

matjazmuhic
Champ on-the-rise
Champ on-the-rise
Just one more question.

Extending share/surf is done similar as in explorer? Pack the files inside "tomcat/shared/classes/alfresco/web-extension/"  with the same structure as "tomcat/webapps/share/WEB-INF/classes/alfresco" has?


Thanks in advance!

P.S.

Can someone move this thread to Alfresco Share Developer section. I realized now it's in wrong section.

mikeh
Star Contributor
Star Contributor
Yes, that's correct. You won't be able to do that with client-side assets, but that can be included via the surf .jar extension mechanism. See Kev's blog post for details.

Thanks,
Mike

pl_componize
Champ in-the-making
Champ in-the-making
You can add a status banner to the document (e.g. when you have one checked out) via some simple customization.

Can you give some details about that? I've only seen indicators related examples, but no status banner ones in the blogs or documentations. Many thanks