Documentation for a historical release of Infusion: 1.3
Please view the Infusion Documentation site for the latest documentation.
If you're looking for Fluid Project coordination, design, communication, etc, try the Fluid Project Wiki.

Skip to end of metadata
Go to start of metadata

Pager

 How do I set the initial page size in Pager?
Question
How do I set the initial page size in Pager?

Answer
To adjust initial page size, you will have to first locate where the pager is initialized, then add the
following block into your pager options:

model: {
    pageSize: <new page size>
}

If you created your pager based on the Pager tutorial at http://wiki.fluidproject.org/display/fluid/Pager+Tutorial, then look for the following block:

jQuery(document).ready(function () {
    var opts = {
        // we'll go into this in a moment
    };
    fluid.pager("#demo-pager-container", opts);
});

Next, checking the Pager API, http://wiki.fluidproject.org/display/fluid/Pager+API#PagerAPI-optionsdescription, under header "The Pager Model", we see the following:

Field

Type

Primary/Computed

Description

pageSize

integer

Primary

The number of "items" which may be shown on a page

This tells us that if we want to modify the initial pageSize, we will have to modify the model option, as follow:

var opts = {
     model: {
        pageSize: <new page size>
    }
};

Now, let's put this option into the pager, assuming 20 is the new page size

jQuery(document).ready(function () {
    var opts = {
        model: {
            pageSize: 20
        }
    };
    fluid.pager("#demo-pager-container", opts);
});

That's it! More information can be found here http://wiki.fluidproject.org/display/fluid/Pager+Tutorial.

 How to make entire header of sortable column clickable?
Question:
I have a pager setup with sortable columns, the table head looks like:
<tr rsf:id="header:">
    <th>
      <a href="javascript:;" rsf:id="date">Date</a>
    </th>
</tr>

How do you make it so the user can click anywhere in the <th> to sort (instead of clicking just the link)?

Answer:
To sort the column with the entire table header, you just need to move the "rsf:id" out from the anchor(<a>)to the table header(<th>), as follow:

<tr rsf:id="header:">
    <th rsf:id="date">
      <a href="javascript:;">Date</a>
    </th>
</tr>

Reorderer

 How do I send new order back to the server?
Question
For reorders, how do I send new order back to the server?

Answer
Take a look at: http://wiki.fluidproject.org/display/fluid/Talking+to+the+Server+Using+The+afterMove+Event

Inline Edit

 Is it possible to have a multiline inline edit, without the Rich Text functionality?
Question
Is it possible to have a multiline inline edit, without the "Rich Text" functionality?

Answer
No. You will have to use the "Rich Text".

Uploader

 How to save my uploaded files to where I want them to?
Question
My uploaded files aren't saving where I want them to - why?

Answer
Check your server script, this problem has nothing to do with the FLUID uploader. The server script handles where the files save to. This server script is specified by the uploadURL variable, which is located at the queueSettings block,

ie.

queueSettings: {
    uploadURL: "/sakai-imagegallery2-web/site/multiFileUpload.jsp",
    fileTypes: "*.gif;*.jpeg;*.jpg;*.png;*.tiff;*.tif"
},

In this case, the script is "/sakai-imagegallery2-web/site/multiFileUpload.jsp".

IoC

 What is "fluid.defaults()"?
Q. What's fluid.defaults()?
A.
fluid.defaults() stores and retrieve a component's default settings. "Settings" are the options that are basically configuration to a components. On run time, components settings are generated by merging the default settings (which is by fluids.defaults()) and the users' instance of option (which is the last argument to a component creator).
The fluid.defaults() API can be found here.
 What is "fluid.demands()"?
Q: What is fluid.demands(), why do we need it, and what does it do?

A:
Infusion includes an Inversion of Control (IoC) system, which helps developers organize dependencies between objects in their application. This makes code easier to reuse and test. Instead of directly instantiating other objects or dependencies, a component "demands" them from the Infusion IoC system. When the component is instantiated, the framework automatically sets up everything the component needs in order to operate. Dependencies are declared, or "wired up," using the fluid.demands() framework function. More information on using fluid.demands() can be found at Demands Specification and the fluid.demands() API page.

  • No labels