Apache Royale Jewel How to use ScrollableSectionContent into ScrollableSectionContent? - scrollbar

I have something like this :
<j:initialView>
<j:ResponsiveView>
<j:ApplicationMainContent width="100%" selectedContent="ssc1">
<j:ScrollableSectionContent name="ssc1" width="100%" /*also tried height="600"*/ >
<j:Card height="600" width="200">
<j:Label text="A"/>
<j:Label text="B"/>
<j:ScrollableSectionContent width="100%" height="50">
<j:Label text="0"/>
<j:Label text="1"/>
<j:Label text="2"/>
<j:Label text="3"/>
<j:Label text="4"/>
<j:Label text="5"/>
</j:ScrollableSectionContent>
<j:Label text="C"/>
</j:Card>
</j:ScrollableSectionContent>
</j:ApplicationMainContent>
</j:ResponsiveView>
</j:initialView>
I don't understand why it isn't working. The above exemple show only ABC :
How to do to have inside a j:Card a 50px height scroll view (to show 0,1,2,3,4,5 in a scrollable content in my example) ?
I want the parent container to be ScrollableSectionContent because if I set browser windows lower than 600px I want to be able to scroll browser windows content to show Card content
Regards

As Carlos said the right way I my example is to use ScrollingViewport,
Here is full working code :
<j:initialView>
<j:ResponsiveView>
<j:ApplicationMainContent width="100%" selectedContent="ssc1">
<j:ScrollableSectionContent name="ssc1" width="100%" >
<j:Card height="600" width="200">
<j:Label text="A"/>
<j:Label text="B"/>
<j:VGroup height="50" width="100%" gap="1">
<j:beads>
<j:ScrollingViewport/>
</j:beads>
<j:Label text="0"/>
<j:Label text="1"/>
<j:Label text="2"/>
<j:Label text="3"/>
<j:Label text="4"/>
<j:Label text="5"/>
</j:VGroup>
<j:Label text="C"/>
</j:Card>
</j:ScrollableSectionContent>
</j:ApplicationMainContent>
</j:ResponsiveView>
</j:initialView>
giving this :

SectionContent (and ScrollableSectionContent) is not visible by default. The original purpose was to use it for navigation, so we create all and only make visible the selected one.
So you need to set isSelected="true" to make it visible.
Maybe we can make it visible by default and then when used in navigation container make invisible...
If you want to just have a scrollable zone, you can add one of the available containers with a ScrollingViewport bead.

Related

HtmlChart - Responsive Chart asp.net

So i was trying telerik:RadHtmlChart to try make my chart more Responsive so that when the user resize the screen the chart resize too , but it is not working ..in the code they write ""
but when i try to put it in my code its say that 'ClientEvents not supported ' any one know whey i checked the web.config and its seem fine
help
<div class="demo-container">
<telerik:RadHtmlChart runat="server" ID="BarChart" Height="300px" Width="100%">
<ClientEvents OnLoad="chartLoad" />
<PlotArea>
<XAxis>
<Items>
<telerik:AxisItem LabelText="Item 1"></telerik:AxisItem>
<telerik:AxisItem LabelText="Item 2"></telerik:AxisItem>
<telerik:AxisItem LabelText="Item 3"></telerik:AxisItem>
</Items>
</XAxis>
<Series>
<telerik:BarSeries Name="Series 1">
<SeriesItems>
<telerik:CategorySeriesItem Y="25"></telerik:CategorySeriesItem>
<telerik:CategorySeriesItem Y="-12"></telerik:CategorySeriesItem>
<telerik:CategorySeriesItem Y="39"></telerik:CategorySeriesItem>
</SeriesItems>
</telerik:BarSeries>
<telerik:BarSeries Name="Series 2">
<SeriesItems>
<telerik:CategorySeriesItem Y="-15"></telerik:CategorySeriesItem>
<telerik:CategorySeriesItem Y="38"></telerik:CategorySeriesItem>
<telerik:CategorySeriesItem Y="-11"></telerik:CategorySeriesItem>
</SeriesItems>
</telerik:BarSeries>
</Series>
</PlotArea>
</telerik:RadHtmlChart>
</div>
The following online resources show how to make RadHtmlChart responsive:
Responsive Telerik RadHtmlChart
https://demos.telerik.com/aspnet-ajax/htmlchart/examples/functionality/responsive-chart/defaultcs.aspx
https://www.telerik.com/support/code-library/radhtmlchart-in-a-responsive-web-page
window.onresize = function () {
$find("<%=RadHtmlChart1.ClientID%>").get_kendoWidget().resize();
}

positionning a command button on the right

I'm using jsf2.2 primefaces 6.0 and i already implemented a graphical solution to view, download and print pictures through galleria component of primefaces.
The issue is that I need help positioning the print commandButton on the right for best ergonomic result.
Here's the wanted result:
Here the XHTML code:
<p:dialog header="Documents numérisés" widgetVar="diag" modal="true"
dynamic="true" showEffect="fade" hideEffect="fade" resizable="true"
position="center" id="diagImages" onShow="download()">
<p:outputPanel id="gal" style="text-align:center;">
<p:galleria value="#{demandeBean.demandeSelectionnee.images}"
panelWidth="500" panelHeight="313" showCaption="false"
autoPlay="false" var="image">
<p:graphicImage id="image"
value="http://localhost:18080/openCars/images/#{image}"
width="500" height="313" />
</p:galleria>
</p:outputPanel>
<p:commandButton value="Print" type="button" icon="ui-icon-print"
style="display:block;margin-bottom: 20px">
<p:printer target="image" />
</p:commandButton>
</p:dialog>
Well, this may not be a perfect solution but it worked for me.
<p:panelGrid>
<p:commandButton value="Print" type="button" icon="ui-icon-print"
style="float:right;">
<p:printer target="image" />
</p:commandButton>
<p:panelGrid>

how to make richfaces popup the popuppanel upwards

The link contains an example of richfaces 4 popuppanel:
richfaces popuppanel example
Here is the code:
<rich:toolbar height="26px" id="tb">
<rich:toolbarGroup location="right">
<h:outputLink value="#">
<rich:componentControl event="click" operation="show" target="ls">
<a4j:param name="event" value="event" noEscape="true" />
<rich:hashParam>
<a4j:param noEscape="true" name="top"
value="jQuery(#{rich:element('tb')}).offset().top + jQuery(#{rich:element('tb')}).height()" />
<a4j:param noEscape="true" name="left"
value="jQuery(#{rich:element('tb')}).offset().left + jQuery(#{rich:element('tb')}).width() - p_width" />
</rich:hashParam>
</rich:componentControl>
Search
</h:outputLink>
</rich:toolbarGroup>
</rich:toolbar>
<rich:popupPanel header="Enter Search Terms" id="ls" autosized="true" modal="false" moveable="false" resizeable="false" followByScroll="false" >
<h:panelGrid columns="3">
<h:outputText value="Search:" />
<h:inputText />
<h:outputLink onclick="#{rich:component('ls')}.hide(event); return false;" value="#">Search
</h:outputLink>
</h:panelGrid>
</rich:popupPanel>
<h:outputScript type="text/javascript" target="body">
p_width = #{rich:component('ls')}.width();
</h:outputScript>
But the popup is appearing in random places, i.e. sometimes under the bar, and then have to scroll and sometimes above. Is it possible to make sure it always appears right above the bar while being attached to it?
The top and left parameters set the position of the panel, change them to where you want the panel to be, or call the method directly:
RichFaces.component('panelId').show(null, {top: "800px", left: "500px"})
You're using the part of the example that specifically sets the panel under the bar so it shouldn't be surprising when the panel appears there.

Jqgrid add dialog box how to change width and height of field?

i'm using jqgrid asp.net component .how can i change a filed width and height (text box or combo) in add and edit dialog boxes?
Thank you
At the last im found it
1 you need to specify edittype attribute
2 after that specify editfiled attributes tag
for text area
<trirand:JQGridColumn DataField="Remarks" HeaderText="Remarks" Editable="true" EditType="TextArea">
<Formatter>
<trirand:CustomFormatter FormatFunction="formatRating" UnFormatFunction="unformatRating" />
</Formatter>
<EditFieldAttributes>
<trirand:JQGridEditFieldAttribute Name="cols" Value="80" />
<trirand:JQGridEditFieldAttribute Name="rows" Value="6" />
</EditFieldAttributes>
</trirand:JQGridColumn>
for text box
<trirand:JQGridColumn DataField="Design" HeaderText="Design" Editable="true" EditDialogFieldSuffix=" (MAX - 10)">
<Formatter>
<trirand:CustomFormatter FormatFunction="formatRating" UnFormatFunction="unformatRating" />
</Formatter>
<EditFieldAttributes>
<trirand:JQGridEditFieldAttribute Name="size" Value="2" />
</EditFieldAttributes>
</trirand:JQGridColumn>

Dock is not working

if i will change SlideDirection to right then it will not work shows blank and no dick pin there but for Left property it works
<center>
<telerik:RadSplitter ID="RadSplitter1" runat="server" Height="300" Width="500">
<telerik:RadPane ID="EndPane" runat="server" Width="220" Scrolling="None">
<telerik:RadSlidingZone ID="RadSlidingZone1" runat="server" Width="22" ClickToOpen="false" SlideDirection="Left">
<telerik:RadSlidingPane ID="RadSlidingPane2" Title="Pane1" runat="server" Width="150"
MinWidth="130">
1
</telerik:RadSlidingPane>
</telerik:RadSlidingZone>
</telerik:RadPane>
</telerik:RadSplitter>
</center>
you can check the size of the pane that may help

Resources