Uploaded image for project: 'Keikai'
  1. Keikai
  2. KEIKAI-41

Resolve a custom function under collaboration mode

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Done
    • Icon: Major Major
    • 6.0.0
    • None
    • None
    • Security Level: Jimmy
    • None
    • None

      User Story

      As an app dev, I want to use a custom function in a formula under collaboration edit mode.

      Details

      Step to reproduce

      1. run the attached example

      Current result

      check C4 that has =EXCHANGE(D4,E4), its value is #NAME?

      Expected result

      the number value, 313

      Related code

      the code below avoids adding a page function mapper, so that zss can't locate a xel function or taglib function declared on a zul page
      Spreadsheet.java

      private void initBook0(SBook book) {
      ...
      				if(isBelowDesktopScope(_book) && _book instanceof EvaluationContributorContainer 
      						&& ((EvaluationContributorContainer)_book).getEvaluationContributor()==null){
      					((EvaluationContributorContainer)_book).setEvaluationContributor(new ComponentEvaluationContributor(this));
      				}
      
      public class ComponentEvaluationContributor implements EvaluationContributor,Serializable {
      
      	@Override
      	public FunctionMapper getFunctionMaper(SBook book) {
      		if(!checkAlive() && !isBelowDesktopScope(book)){
      			//should contribute any thing if the scope large then desktop
      			return null;			
      		}
      

            jumperchen jumperchen
            hawk hawk
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: