View panel and pager in different facets - controls

If have a custom control with 2 facets. One to hold e.g. a view panel and another for holding the corresponding pager control for that view panel. The source is that:
<xc:ccPanel footer="true" title="View">
<xp:this.facets>
<xp:div xp:key="footer">
<xp:pager layout="Previous Group Next"
partialRefresh="true" id="pager1" for="viewPanel1">
</xp:pager>
</xp:div>
<xp:viewPanel rows="5" id="viewPanel1"
xp:key="body" viewStyle="width:100%">
<xp:this.data>
<xp:dominoView var="view1"
viewName="all">
</xp:dominoView>
</xp:this.data>
<xp:viewColumn columnName="$0"
id="viewColumn1">
<xp:viewColumnHeader
value="Creation date" id="viewColumnHeader1">
</xp:viewColumnHeader>
</xp:viewColumn>
</xp:viewPanel>
</xp:this.facets>
</xc:ccPanel>
It is odd but the panel does not control the view panel, clicking on any control link does not have any effect on the view. I couldn't figure out what I am missing here.
Maybe you can? Thanks in advance!
UPDATE: I found out that the view is controlled but the pager does not reflect the changes by e.g. showing the current page.

The pager works when it is a child facet of the xp:viewPanel. Try commenting out your xp:div and just enable the pager in the properties for the viewPanel on the Display tab ... enable pager for the header, footer or both. Everything should then be properly tied together and your pager(s) should work with your viewPanel.
If you stick with your current design with the pager outside of the viewPanel facets then remove the partialRefresh="true" from the pager.

Related

Is there any version of Angular Material md-select with select all option

I have been using Angular Material in one of my project. Suddenly I realized the need for having a select all option on md-select. I think I will pull a git request for the same.
However, currently I am looking for a similar drop down structure with checkboxes (like md-select multiple) but also a select all option.
I am aware that I can push a dummy empty entry into md-select option array and manipulate reverse way on its selection. But it would require a lot of code change in my current structure and would also not be a elegant thing to do.
I tried looking for it in bootstrap and jQuery-UI, but could not find one yet. Is there any such control known to anyone. Any redirection will be helpful.
You can do that easily inside the HTML. It requires only one line of code, or two lines, if you want a "select none" option as well. For example
<md-input-container>
<label>Users</label>
<md-select ng-model="selectedUser" multiple=""
ng-model-options="{trackBy: '$value.id'}">
<md-optgroup label="Users">
<md-option ng-repeat="user in users"
ng-value="user">{{ user.name }}</md-option>
</md-optgroup>
</md-select>
</md-input-container>
<button ng-click="selectedUser=users">all</button>
<button ng-click="selectedUser=[]">none</button>
Example in Plunker.
Edit: I updated the below Plunker to show the "all" button inside the select box next to the "Users" optgroup title. The relevant change:
<md-select ng-model="selectedUser" multiple="" ng-model-options="{trackBy: '$value.id'}">
<button ng-click="doSelectedUser()" style="float:right">all</button>
<md-optgroup label="Users">

How would you represent a dropdown menu in ARIA?

I am adding ARIA tags to my code and I was wondering what is the right way of adding a role attribute to a dropdown menu?
Is it role="option" or role="combobox" or role="listbox"?
Use role=combobox for dropdown.
See example here:
http://test.cita.illinois.edu/aria/combobox/index.php
http://test.cita.illinois.edu/aria/combobox/combobox1.php

Can I set scoped variable with onclick event in (link) column within Data Table?

The scoped variable is used to pass the selected rowdata id to a panel which displays more detail. This works when the link column is in a view control, but not a Data Table. The example below uses a requestScope but I have also tried sessionScope and viewScope for a dialogToolTip version of the details panel. In each case, full or partial refresh will occur, but the scoped variable is always null. Note: the data table is normally nested within a tabbed panel, but I have also tested it on a clean XPage with no table nesting, with the same result. Domino release 8.5.3 w/ extension lib.
<xp:column id="column11">
<xp:this.facets>
<xp:label value="INVOICE NBR" id="label7" xp:key="header"
style="font-weight:bold">
</xp:label>
</xp:this.facets>
<xp:link escape="true" id="link1" value="#{id:column11}">
<xp:this.text><![CDATA[#{javascript:return rowdoc.getItemValueString("StorInvID");}]]>
</xp:this.text>
<xp:eventHandler event="onclick" submit="true"
refreshMode="complete">
<xp:this.action><![CDATA[#{javascript:requestScope.invCompare = rowdoc.getItemValueString("StorInvID");}]]></xp:this.action>
</xp:eventHandler>
</xp:link>
</xp:column>
Repeat after me:
Client-side always takes precedence over server-side :-)
The value attribute for the xp:link control causes the server side event not to be executed at all. When clicking the link it just performs a HTTP GET to the resource in question.
So if you remove the value attribute, your onclick serverside event should be triggered. You can then do a serverside redirect using context.redirectToPage("pagename").

Joomla 1.7 modules - What am I missing?

I am trying to work through building a template in Joomla and seem to be missing a fundamental logic here on how modules work. I have read the wiki and several tutorials which all speak of earlier versions than 1.7 so havent helped much.
Basically I have created two menus:
"Main Menu" menu type mainmenu
"Sub Menu" menu type submenu
When I go into Module Manager though, I see both menus as follows:
"Main Menu" type: Menu
"Sub Menu" type: Menu
So in my index.php the only way I can get the menu to display is with the following:
<jdoc:include type="module" name="menu" title="Main Menu"/>
<jdoc:include type="module" name="menu" title="Sub Menu"/>
if I try setting name="mainmenu" or name="submenu" they simply dont display. This basically just shows two copies of the same menu (the one set to "home" I think).
I am missing something here and I dont know what. Isnt the title suppose to tell Joomla which to display here?
I have tried setting their positions in the module manager, then wrapping them in divs with the same id as the position, that didnt change anything either. Im lost...
Could someone please explain how I am suppose to display these menus?
Any help is greatly appreciated!
You need to use module positions.
<jdoc:include type="modules" name="mainmenu-position" />
<jdoc:include type="modules" name="submenu-position" />
or you can load both menu modules into one single position
<jdoc:include type="modules" name="menus" />
Important thing is to assing the modules to the positions they get displayed in (backend).
There is only one type of menu module in Joomla, not separate module types for mainmenu and submenu.
You mention that you have two modules of type "menu" in the Module Manager.
Open them up and take a look at the paramaters under "Basic Options". Set your Main Menu 'start level' to 1 and 'end level' to 2, and set your Submenu 'start level' to 2 and 'end level' to 'all'.
That should do the trick.

Primefaces Change menu entry via ajax an rerender content on full layout

I am trying to get a simple full layout to work with a navigation on the left side.
That works but I want to reload the center (content) via ajax on menu item selection.
The reason is, that I have a MP3 player on the right side and if the whole page reloads the mp3 player
start the playback again.
On Richfaces I did that with a session bean which holds the actual filename that needs to be rendered in the center
and on menu click the action method analyses the menu entry ID and sets the filename to its corresponding.
Actually that works a little bit for primefaces as well, but the content doesn't render correctly. After punshing F5
it is perfect.
Does anybody can give me a real simple example how I can do that?
Many greetings,
Hauke
I have never use menuitem but with commandButton I just use 'update' notation to refresh the form located in the center content via ajax.
On navigation layoutUnit
<p:commandButton
value="Enter"
image="ui-icon ui-icon-comment"
update="form_input_console form_output_console:tabbed_contents"
actionListener="#{dashboardUi.processCommand}" />
and on the center layout unit
<p:layoutUnit position="center">
<h:form id="form_output_console">
<p:tabView
id="tabbed_contents"
dynamic="true">

Resources