Grid error for only one record - struts2-jquery

I have bug in struts2-grid-Jquery.Every time grid contains only one record ,grid disappear the record as in hyperlink but if there are more than one record it work fine. My code :
<sjg:grid id="gridtable"
dataType="json"
href="%{remoteurl}"
gridModel="allCustomerRequests"
pager="true"
page="1"
rowNum="10"
pagerButtons="true"
pagerInput="true"
gridview="true"
rowTotal="true"
rownumbers="true"
rowList="10,20,30,40,40,50,60,70,80,90,100"
viewrecords="true"
autowidth="true"
loadonce="true"
viewrecords="true"
>
<sjg:gridColumn name="stRefID" formatter="formatViewLink"
title="%{getText('COMMON_REFERENCE_NUMBER')}" />
<sjg:gridColumn name="requestType.stName"
title="%{getText('RequestTracking_Request_Type')}" />
<sjg:gridColumn name="requestStatus.stStatus"
title="%{getText('RequestTracking_Request_Status')}" />
<sjg:gridColumn name="requestStatus.tsDate"
title="%{getText('DATE')}"
formatoptions="{newformat : 'd/m/Y',
srcformat : 'Y-m-d'}" formatter="date" />
</sjg:grid>
Please help me to solve my bug
enter link description here

I m pretty sure you are expriencing this issue with IE...?
It has nothing to do with the grid plugin but the way IE includes the size of scroll bar when calculating height/width.
A workaround for you is to fix the height of your grid using the height attribute of <sjg:grid />.

Related

How to change the maximum value of a react native slider after it was initialized

I'm trying to find a way to make the slider component from the #react-native-community/slider change it's maximumValue after it was initialized. I can't preset a maximum value since I want to allow my users to decide that value.
<Slider
onValueChange={changeSliderTitle}
step={this.state.value}
minimumValue={1}
maximumValue={this.state.value}
/>
Any help is much appreciated!
You can change the maximumValue after it has been initialized.
There are a few issues with your current code:
<Slider
onValueChange={changeSliderTitle}
step={this.state.value}
minimumValue={1}
maximumValue={this.state.value}
/>
You probably want step to be a fixed value. It determines on what increments you can move the slider by.
maximumValue can be a value from the sate, but it should be separate from the slider value.
A fixed version of the slider could look like this.
<Slider
onValueChange={(value) => {this.setState({value})}}
value={this.state.value}
step={1}
minimumValue={1}
maximumValue={this.state.maxValue}
/>
Now, you can call the following in your code to set the maximum value of the slider dynamically.
this.setState({maxValue: 1000})

SimpleFormIterator focus first field when ADD

We are using SimpleFormIterator inside ArrayInput like follows (as example)
<ArrayInput source="backlinks">
<SimpleFormIterator>
<DateInput source="date" />
<TextInput source="url" />
</SimpleFormIterator>
</ArrayInput>
But when clicking "ADD" to add new fields it is still focused in "ADD" button. Is there any way we can focus on first added field after clicking "ADD"?
You could try adding an autoFocus prop on the DateInput, however, it means the first item will be focused automatically too in an Edit form which is probably not what you want.
I think this should be the job of the SimpleFormIterator. Can you please open a feature request issue on react-admin repository ?
In the mean time, you can make your own form iterator which would handle the focus.

Change part of a label in Titanium or Alloy / Appcelerator

I want to change part of a label dynamically.
This is my code:
<View top="0" height="115">
<Label id="lblMiles" left="15" textAlign="right" right="15" top="0" height="55">
{distance} Miles
</Label>
</View>
I want to be able to change the {distance} portion dynamically.
However currently I can only change the whole thing like this:
$.lblMiles.text = "10 Miles";
In HTML we normally use a span tag like so:
<div id="lblMiles"><span id="distance"></span> Miles</div>
How can I do something similar in Alloy?
If it were up to me, i wouldn't worry about updating only half the label, just reset the whole text,
$.lblMiles.text = "10 Miles";
// and then later on to update it to 15
$.lblMiles.text = "15 Miles";
if for some reason you need to update only half, then you could use two labels and put them in a view with layout set to horizontal.
something looking like this :
<View top="0" height="115">
<View height="Ti.UI.SIZE" width="Ti.UI.SIZE" layout="horizontal">
<Label id="dynamicLabel" />
<Label id="lblMiles" > Miles</Label>
</View>
</View>
and then in your code, just update the dynamic label setting the actual value:
$.dynamicLabel.text = "15";
Now to position the labels on the screen you should play on the attributes of their container's left, right, top and bottom.
You can do this by two three ways
Have two different labels and set it from controller
You can use attributed strings as well.
More reference is here http://docs.appcelerator.com/platform/latest/#!/guide/Attributed_Strings

Display marker using gmaps4jsf(not google api)

I am using gmaps4jsf jar and trying to display marker on map. Marker is displaying fine but not automatic zoom functionality. every time i need to vary zoom value so is there any option in gmaps4jsf so that we can get auto zoom functionality?
<m:map latitude="10.132567" longitude="10.132567" height="400px" width="400px" zoom="6">
<ui:repeat var="p" value="#{pointBean.points2}" varStatus="status" offset="0" step="1" size="#{pointBean.points2.size()}">
<m:marker latitude="#{p.latitude}" longitude="#{p.longitude}" >
<m:htmlInformationWindow htmlText="#{p.latitude}-#{p.longitude}" />
</m:marker>
</ui:repeat>
</m:map>
Thanks in advance!!!
You need to put autoReshape="true" in map tag like,
<m:map autoReshape="true">.....</map>
autoReshape just do adjust marker on map and you will get marker display only.

Is there any analog to property binding via fxml in JavaFX?

In JavaFX property can be bound to some observable value.
Label l = new Label();
l.visibleProperty().bind(l.textProperty().length().isEqualTo(3));
l.setText("123"); // show label
l.setText("1234"); // hide label
Recently I have discovered that binding can be done not only in code but in FXML markup document.
<!-- Label is visible only if input is visible. -->
<Label l="Please input some value:" visible="${value.visible}" />
<TextField fx:id="value" />
Is there similar feature in another languages and markup tools or that is kind of oracle innovation? :-)
update: I added XAML tag because I guess it has something similar.
I have found out that QML has the same feature.